semantic-release-action
semantic-release-action copied to clipboard
Time to upgrade semantic release?
Hi, is it time to upgrade the semantic-release package to the latest upstream version?
I had a problem recently with using an ESM packaged preset conventional-changelog-conventionalcommits
Thank you
can you elaborate on what you were trying to do and what error you saw?
Configuration of
- uses: codfish/semantic-release-action@9a999e0cdb207de2c9d9d4276860435727818989 # v3.4.1
with:
additional-packages: conventional-changelog-conventionalcommits
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
and a separate config file setting preset: conventionalcommits
Error
[7:40:11 PM] [semantic-release] › ✘ An error occurred while running semantic-release: Error [ERR_REQUIRE_ESM]: require() of ES Module /github/workspace/node_modules/conventional-changelog-conventionalcommits/src/index.js from /github/workspace/noop.js not supported.
Instead change the require of index.js in /github/workspace/noop.js to a dynamic import() which is available in all CommonJS modules.
at module.exports (/action/node_modules/import-from/index.js:5:100)
at default (file:///action/node_modules/@semantic-release/commit-analyzer/lib/load-parser-config.js:25:74)
at analyzeCommits (file:///action/node_modules/@semantic-release/commit-analyzer/index.js:31:24)
at validator (file:///action/node_modules/semantic-release/lib/plugins/normalize.js:36:[30](https://github.com/dafyddj/tmp-winrepo-transform/actions/runs/11581228579/job/32241494076#step:5:31))
at file:///action/node_modules/semantic-release/lib/plugins/pipeline.js:38:42 {
code: 'ERR_REQUIRE_ESM',
pluginName: '@semantic-release/commit-analyzer'
}
Error: Error [ERR_REQUIRE_ESM]: require() of ES Module /github/workspace/node_modules/conventional-changelog-conventionalcommits/src/index.js from /github/workspace/noop.js not supported.
Instead change the require of index.js in /github/workspace/noop.js to a dynamic import() which is available in all CommonJS modules.
Workaround is to pin to an older version of conventionalcommits
additional-packages: [email protected]
No error seen when testing locally with the latest semantic-release version.
Any thoughts on this?
@dafyddj yea, definitely time for an upgrade. I will work on it.
No error seen when testing locally with the latest semantic-release version.
Do me a favor, can you test locally using semantic-release v22 and node 20? Let me know if you get the same error
Hi, I've tried various versions back to node v20.12.1 and semantic-release v22.05 but I can't actually reproduce the error when testing locally 🤷🏻
I have the same issues. Downgrading conventional-changelog-conventionalcommits to v7 solved the issue, as a workaround.
Please fix/upgrade the package to support conventional-changelog-conventionalcommits v8
:tada: This issue has been resolved in version 4.0.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:
Thank you!