semantic-release-action icon indicating copy to clipboard operation
semantic-release-action copied to clipboard

Time to upgrade semantic release?

Open dafyddj opened this issue 1 year ago • 6 comments

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

dafyddj avatar Oct 31 '24 16:10 dafyddj

can you elaborate on what you were trying to do and what error you saw?

codfish avatar Oct 31 '24 20:10 codfish

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.

dafyddj avatar Nov 02 '24 02:11 dafyddj

Any thoughts on this?

dafyddj avatar Nov 14 '24 20:11 dafyddj

@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

codfish avatar Nov 15 '24 22:11 codfish

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 🤷🏻

dafyddj avatar Nov 18 '24 18:11 dafyddj

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

platoyuval avatar Nov 22 '24 15:11 platoyuval

: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:

github-actions[bot] avatar Aug 18 '25 20:08 github-actions[bot]

Thank you!

dafyddj avatar Aug 18 '25 20:08 dafyddj