semantic-release / gitlab

:fox_face: semantic-release plugin to publish a GitLab release
MIT License
269 stars 78 forks source link

Module causes failures in node version 22 #704

Closed aldenbe closed 2 months ago

aldenbe commented 2 months ago

Fails when using node v22 with error:

[semantic-release] › ✘  An error occurred while running semantic-release: SyntaxError: Unexpected identifier 'assert'
    at compileSourceTextModule (node:internal/modules/esm/utils:337:16)
    at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:166:18)
    at callTranslator (node:internal/modules/esm/loader:416:14)
    at ModuleLoader.moduleProvider (node:internal/modules/esm/loader:422:30)
SyntaxError: Unexpected identifier 'assert'

Caused by:

https://github.com/nodejs/node/commit/25c79f3331

esm: drop support for import assertions (Nicolò Ribaudo) #52104

https://github.com/semantic-release/gitlab/blob/e890a0b00700e00908cb14db5b091bf1cf10b2e5/lib/definitions/errors.js#L2

ameliendeshams commented 2 months ago

Same here