saitho / semantic-release-backmerge

:twisted_rightwards_arrows: semantic-release plugin to back-merge a release into a develop branch
https://saitho.github.io/semantic-release-backmerge/
57 stars 11 forks source link

bug: fails with latest semantic-release version #38

Closed EinfachHans closed 1 year ago

EinfachHans commented 1 year ago

Is there an existing issue for this?

Current Behavior

Just received this error:

[8:42:47 AM] [semantic-release] [@saithodev/semantic-release-backmerge] › ✘  Error [ERR_REQUIRE_ESM]: require() of ES Module /Users/runner/work/xxx/node_modules/semantic-release/lib/get-git-auth-url.js from /Users/runner/work/xxx/node_modules/@saithodev/semantic-release-backmerge/dist/perform-backmerge.js not supported. 
[282](https://github.com/xxx/actions/runs/3890965311/jobs/6640863500#step:7:283)
Instead change the require of get-git-auth-url.js in /Users/runner/work/xxx/node_modules/@saithodev/semantic-release-backmerge/dist/perform-backmerge.js to a dynamic import() which is available in all CommonJS modules.
[283](https://github.com/xxx/actions/runs/3890965311/jobs/6640863500#step:7:284)
    at /Users/runner/work/xxx/node_modules/@saithodev/semantic-release-backmerge/dist/perform-backmerge.js:73:31
[284](https://github.com/xxx/actions/runs/3890965311/jobs/6640863500#step:7:285)
    at Generator.next (<anonymous>)
[285](https://github.com/xxx/actions/runs/3890965311/jobs/6640863500#step:7:286)
    at fulfilled (/Users/runner/work/xxx/node_modules/@saithodev/semantic-release-backmerge/dist/perform-backmerge.js:5:58)
[286](https://github.com/xxx/actions/runs/3890965311/jobs/6640863500#step:7:287)
Error: Process completed with exit code 1.

Probably relevant to breaking change in 20.0.0 that semantic release is now ESM-only

Expected Behavior

It should work with 20.0.0

Steps To Reproduce

Use this plugin with the latest semantic-release version

Environment

- **semantic-release/semantic-release** version: 20.0.2
- **@saithodev/semantic-release-backmerge** version: 2.1.2

Anything else?

No response

saitho commented 1 year ago

Thanks for the report. I'll take a look at it. For now I published a bugfix release that prevents installing this plugin with semantic-release v20.

saitho commented 1 year ago

:tada: This issue has been resolved in version 3.0.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: