-
-
Notifications
You must be signed in to change notification settings - Fork 310
Closed
Labels
releasedThis issue/pull request has been released.This issue/pull request has been released.type:hot fixChanges fix a critical bugChanges fix a critical bug
Description
Description
- Node.js version: 22.2.0
- Gitbeaker version: 40.0.3
- Gitbeaker release (cli, rest, core, requester-utils): core, cli
$ gitbeaker --version
file:///Users/xxx/.asdf/installs/nodejs/22.2.0/lib/node_modules/@gitbeaker/cli/dist/index.mjs:5
import API_MAP from '@gitbeaker/core/map.json' assert { type: 'json' };
^^^^^^
SyntaxError: Unexpected identifier 'assert'
at compileSourceTextModule (node:internal/modules/esm/utils:337:16)
at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:163:18)
at callTranslator (node:internal/modules/esm/loader:430:14)
at ModuleLoader.moduleProvider (node:internal/modules/esm/loader:436:30)
at async ModuleJob._link (node:internal/modules/esm/module_job:106:19)
Node.js v22.2.0
I've encountered an issue where @gitbeaker/cli does not work with Node 22.
This is because the assert
keyword has been removed in Node 22.
Replacing it with the with
keyword should resolve the issue, but the with
keyword does not work on Node versions less than 18.20.0, which may affect the supported Node versions.
- https://www.typescriptlang.org/docs/handbook/release-notes/typescript-5-3.html#import-attributes
- https://github.com/nodejs/node/blob/main/doc/changelogs/CHANGELOG_V18.md#added-support-for-import-attributes
Checklist
- I have checked that this is not a duplicate issue.
- I have read the documentation.
Metadata
Metadata
Assignees
Labels
releasedThis issue/pull request has been released.This issue/pull request has been released.type:hot fixChanges fix a critical bugChanges fix a critical bug