From 1f198e0fbf84b0565da7e7ace4f34bfb83e2800a Mon Sep 17 00:00:00 2001 From: Esteban Abaroa Date: Sun, 25 Feb 2024 23:17:10 +0000 Subject: [PATCH] refactor: convert to esm --- scripts/release-body.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/release-body.js b/scripts/release-body.js index 287cbc6..7f8b1d5 100644 --- a/scripts/release-body.js +++ b/scripts/release-body.js @@ -1,6 +1,8 @@ -const {execSync} = require('child_process') -const path = require('path') -const conventionalChangelog = path.join('node_modules', '.bin', 'conventional-changelog') +import {execSync} from 'child_process' +import path from 'path' +import {fileURLToPath} from 'url' +const dirname = path.join(path.dirname(fileURLToPath(import.meta.url))) +const conventionalChangelog = path.join(dirname, '..', 'node_modules', '.bin', 'conventional-changelog') // sometimes release-count 1 is empty let releaseChangelog =