diff --git a/scripts/create-gitea-release.js b/scripts/create-gitea-release.js index 13f04b2..5916b6d 100644 --- a/scripts/create-gitea-release.js +++ b/scripts/create-gitea-release.js @@ -14,7 +14,9 @@ dotenv.config({ path: "./.env" }); import { createRequire } from "node:module"; const require = createRequire(import.meta.url); -const conventionalChangelog = require("conventional-changelog-conventionalcommits"); +const conventionalChangelog = + require("conventional-changelog-conventionalcommits").default || + require("conventional-changelog-conventionalcommits"); // Resolve the directory of the current script const __filename = fileURLToPath(import.meta.url); @@ -65,9 +67,7 @@ if (result.status !== 0) { } const getLatestChangelog = async () => { - const changelogStream = conventionalChangelog({ - releaseCount: 1, - }); + const changelogStream = conventionalChangelog({ releaseCount: 1 }); let changelog = ""; for await (const chunk of changelogStream) {