Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backmerge is incompatible with semantic-release v22 #57

Closed
1 task done
christian98 opened this issue Sep 20, 2023 · 5 comments
Closed
1 task done

Backmerge is incompatible with semantic-release v22 #57

christian98 opened this issue Sep 20, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@christian98
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

After upgrading to semantic-release v22, I am getting the following console output:

[9:59:18 AM] [semantic-release] › ℹ  Running semantic-release version 22.0.0
(node:26) ExperimentalWarning: Import assertions are not a stable feature of the JavaScript language. Avoid relying on their current behavior and syntax as those might change in a future version of Node.js.
(Use `node --trace-warnings ...` to show where the warning was created)
(node:26) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
[9:59:19 AM] [semantic-release] › ✘  An error occurred while running semantic-release: Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/get-git-auth-url.js' is not defined by "exports" in /usr/local/lib/node_modules/semantic-release/package.json imported from /usr/local/lib/node_modules/@saithodev/semantic-release-backmerge/dist/perform-backmerge.js
    at new NodeError (node:internal/errors:405:5)
    at exportsNotFound (node:internal/modules/esm/resolve:259:10)
    at packageExportsResolve (node:internal/modules/esm/resolve:589:9)
    at packageResolve (node:internal/modules/esm/resolve:763:14)
    at moduleResolve (node:internal/modules/esm/resolve:829:20)
    at defaultResolve (node:internal/modules/esm/resolve:1034:11)
    at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:375:12)
    at ModuleLoader.resolve (node:internal/modules/esm/loader:344:25)
    at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:220:38)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:85:39) {
  code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/get-git-auth-url.js' is not defined by "exports" in /usr/local/lib/node_modules/semantic-release/package.json imported from /usr/local/lib/node_modules/@saithodev/semantic-release-backmerge/dist/perform-backmerge.js
    at new NodeError (node:internal/errors:405:5)
    at exportsNotFound (node:internal/modules/esm/resolve:259:10)
    at packageExportsResolve (node:internal/modules/esm/resolve:589:9)
    at packageResolve (node:internal/modules/esm/resolve:763:14)
    at moduleResolve (node:internal/modules/esm/resolve:829:20)
    at defaultResolve (node:internal/modules/esm/resolve:1034:11)
    at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:375:12)
    at ModuleLoader.resolve (node:internal/modules/esm/loader:344:25)
    at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:220:38)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:85:39) {
  code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}

Expected Behavior

It should work 😛

Steps To Reproduce

  1. Install semantic-release v22 and this package
  2. Run the cli command.

Environment

- **semantic-release/semantic-release** version: 22.0.0
- **@saithodev/semantic-release-backmerge** version: 3.2.0

Anything else?

The problem is, that the commit semantic-release/semantic-release@72ab317 introduced the exports property in the package.json which makes it impossible to import internal files of the package. There is also already an issue discussing this issue on the semantic-release repo: semantic-release/semantic-release#2968.

I just wanted to drop the info here if anybody else is experiencing this issue. But also to be aware of any possible fix discussed in the linked issue of the semantic-release repo.

@christian98 christian98 added the bug Something isn't working label Sep 20, 2023
@jagiella
Copy link

I confirm, we have the same problem

@saitho
Copy link
Owner

saitho commented Sep 20, 2023

I restricted the dependencies to disallow using it with v22 for now.
I am not actively maintaining this plugin anymore, so I'd appreciate pull requests for any open issues.

@luckyf
Copy link

luckyf commented Sep 21, 2023

I restricted the dependencies to disallow using it with v22 for now. I am not actively maintaining this plugin anymore, so I'd appreciate pull requests for any open issues.

Thanks a lot @saitho. Could you trigger a new Release with your change from yesterday?

My current workaround:
Add manual resolution of the semantic-release package to the package.json and then recreate the lockfile.
Tested it with Yarn v1 and prevents it from installing semantic-release v22 as a dependency for @saithodev/semantic-release-backmerge.

{
  ...
  "devDependencies": {
    ...
    "@saithodev/semantic-release-backmerge": "3.2.0",
    "semantic-release": "21.1.2",
    ...
  },
  ...
  "resolutions": {
    "semantic-release": "21.1.2"
  },
  ...
}

@saitho
Copy link
Owner

saitho commented Sep 21, 2023

Oh right, the build failed. Fixed and new version is released.

@saitho saitho closed this as completed Sep 21, 2023
@travi
Copy link

travi commented Sep 23, 2023

see https://github.com/semantic-release/semantic-release/releases/tag/v22.0.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants