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

support esm #141

Open
its-dibo opened this issue Mar 29, 2023 · 8 comments
Open

support esm #141

its-dibo opened this issue Mar 29, 2023 · 8 comments

Comments

@its-dibo
Copy link

the official semantic-release now supporting esm, but it seems that this package doesn't work with esm projects.

I got this error

[12:14:08 AM] › 🎉  Started multirelease! Loading 26 packages...
[multi-semantic-release]: Error [ERR_REQUIRE_ESM]: require() of ES Module /workspace/dibo/release.config.js from /home/gitpod/.npm/_npx/fc5f6a55a6a495a8/node_modules/cosmiconfig/dist/loaders.js not supported.
Instead change the require of release.config.js in /home/gitpod/.npm/_npx/fc5f6a55a6a495a8/node_modules/cosmiconfig/dist/loaders.js to a dynamic import() which is available in all CommonJS modules.
    at module.exports (/home/gitpod/.npm/_npx/fc5f6a55a6a495a8/node_modules/import-fresh/index.js:32:59)
    at loadJs (/home/gitpod/.npm/_npx/fc5f6a55a6a495a8/node_modules/cosmiconfig/dist/loaders.js:16:18)
    at Explorer.loadFileContent (/home/gitpod/.npm/_npx/fc5f6a55a6a495a8/node_modules/cosmiconfig/dist/Explorer.js:84:32)
    at Explorer.createCosmiconfigResult (/home/gitpod/.npm/_npx/fc5f6a55a6a495a8/node_modules/cosmiconfig/dist/Explorer.js:89:36)
    at Explorer.loadSearchPlace (/home/gitpod/.npm/_npx/fc5f6a55a6a495a8/node_modules/cosmiconfig/dist/Explorer.js:70:31)
    at async Explorer.searchDirectory (/home/gitpod/.npm/_npx/fc5f6a55a6a495a8/node_modules/cosmiconfig/dist/Explorer.js:55:27)
    at async run (/home/gitpod/.npm/_npx/fc5f6a55a6a495a8/node_modules/cosmiconfig/dist/Explorer.js:35:22)
    at async cacheWrapper (/home/gitpod/.npm/_npx/fc5f6a55a6a495a8/node_modules/cosmiconfig/dist/cacheWrapper.js:16:18)
    at async Explorer.search (/home/gitpod/.npm/_npx/fc5f6a55a6a495a8/node_modules/cosmiconfig/dist/Explorer.js:27:20)
    at async getConfig (/home/gitpod/.npm/_npx/fc5f6a55a6a495a8/node_modules/multi-semantic-release/lib/getConfig.js:28:17)
    at async multiSemanticRelease (/home/gitpod/.npm/_npx/fc5f6a55a6a495a8/node_modules/multi-semantic-release/lib/multiSemanticRelease.js:66:24) {
  code: 'ERR_REQUIRE_ESM'
}
@ysitbon
Copy link

ysitbon commented Jun 16, 2023

I confirm the issue. We tried to upgrade to latest semantic release packages and we were forced to downgrade because of this.

@antongolub
Copy link
Collaborator

antongolub commented Jun 16, 2023

As a workaround, you can try temporary using https://github.com/qiwi/multi-semantic-release. This fork should be compatible with semrel >=19 and its esm plugins, but, I'm afraid, nobody checked this.

@ysitbon
Copy link

ysitbon commented Jun 17, 2023

Thank you! I'll try.

@andorfermichael
Copy link

an update would be really great

@Wxh16144
Copy link

Any update?

@antongolub
Copy link
Collaborator

I'm afraid, not yet.

@tholu
Copy link

tholu commented Mar 7, 2024

@antongolub Any plans on supporting ESM in this repo or will the fork https://github.com/qiwi/multi-semantic-release be the one that is maintained in the future?

@prisis
Copy link

prisis commented Jun 14, 2024

@tholu if you like you could use my fork https://github.com/anolilab/semantic-release/tree/main/packages/multi-semantic-release it supports cjs and esm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants