qiwi / multi-semantic-release

Proof of concept that wraps semantic-release to work with monorepos.
BSD Zero Clause License
86 stars 34 forks source link

Missing support for the new semantic-release esm packages #92

Closed prisis closed 1 year ago

prisis commented 1 year ago

Issue type

Expected behavior

@qiwi/multi-semantic-release should support the newest version of semantic-release, the newest versions swiched to be esm packages only

Actual behavior

@qiwi/multi-semantic-release cant run the newest version of semantic-release because of missing esm support

Steps to reproduce

Install semantic-release v21.0.2 and @qiwi/multi-semantic-release v6.7.0 and try to run the multi-semantic-release --dry command, you will get a error like

[19:53:48] › 🎉  msr: Started multirelease! Loading 9 packages...
[19:53:48] › ✖  msr: [multi-semantic-release]: Error [ERR_REQUIRE_ESM]: require() of ES Module /home/visulima/visulima/node_modules/.pnpm/@semantic-release+npm@10.0.3_semantic-release@21.0.2_typescript@5.0.4/node_modules/@semantic-release/npm/index.js from /home/visulima/visulima/node_modules/.pnpm/@semrel-extra+npm@1.2.2/node_modules/@semrel-extra/npm/src/main/js/index.js not supported.
Instead change the require of /home/visulima/visulima/node_modules/.pnpm/@semantic-release+npm@10.0.3_semantic-release@21.0.2_typescript@5.0.4/node_modules/@semantic-release/npm/index.js in /home/visulima/visulima/node_modules/.pnpm/@semrel-extra+npm@1.2.2/node_modules/@semrel-extra/npm/src/main/js/index.js to a dynamic import() which is available in all CommonJS modules.
    at Object.<anonymous> (/home/visulima/visulima/node_modules/.pnpm/@semrel-extra+npm@1.2.2/node_modules/@semrel-extra/npm/src/main/js/index.js:1:16)
    at loadPlugin (/home/visulima/visulima/node_modules/.pnpm/semantic-release@19.0.5_typescript@5.0.4/node_modules/semantic-release/lib/plugins/utils.js:51:36)
    at /home/visulima/visulima/node_modules/.pnpm/semantic-release@19.0.5_typescript@5.0.4/node_modules/semantic-release/lib/plugins/index.js:17:37
    at Array.reduce (<anonymous>)
    at module.exports (/home/visulima/visulima/node_modules/.pnpm/semantic-release@19.0.5_typescript@5.0.4/node_modules/semantic-release/lib/plugins/index.js:14:34)
    at module.exports (/home/visulima/visulima/node_modules/.pnpm/semantic-release@19.0.5_typescript@5.0.4/node_modules/semantic-release/lib/get-config.js:84:35)
    at async getConfigSemantic (file:///home/visulima/visulima/node_modules/.pnpm/@qiwi+multi-semantic-release@6.7.0_typescript@5.0.4/node_modules/@qiwi/multi-semantic-release/lib/getConfigSemantic.js:24:10)
    at async getPackage (file:///home/visulima/visulima/node_modules/.pnpm/@qiwi+multi-semantic-release@6.7.0_typescript@5.0.4/node_modules/@qiwi/multi-semantic-release/lib/multiSemanticRelease.js:173:31)
    at async Promise.all (index 0)
    at async multiSemanticRelease (file:///home/visulima/visulima/node_modules/.pnpm/@qiwi+multi-semantic-release@6.7.0_typescript@5.0.4/node_modules/@qiwi/multi-semantic-release/lib/multiSemanticRelease.js:102:19) {
  code: 'ERR_REQUIRE_ESM'
}

Specifications

prisis commented 1 year ago

The error was in the @semrel-extra/npm, sorry