Skip to content

fix(deps)!: Upgrade node/npm engine spec #524

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tysonclugg
Copy link

@tysonclugg tysonclugg commented Apr 17, 2025

The engine spec applied here matches the minimum requirements of all transient dependencies (in package-lock.json). The engine requirement is changed from npm version to node version to better match with the engine spec discovered as outlined in the install attempts below (nobody seems to depend on npm versions, only node version).

With engine-strict=true in .npmrc, I attempted to install with old versions of node/npm, until successfully installed and tested.

Minimum spec install attempt 1:

$ nvm install v18.1.0
v18.1.0 is already installed.
Now using node v18.1.0 (npm v8.8.0)
$ npm install
npm ERR! code EBADENGINE
npm ERR! engine Unsupported engine
npm ERR! engine Not compatible with your version of node/npm: @semantic-release/[email protected]
npm ERR! notsup Not compatible with your version of node/npm: @semantic-release/[email protected]
npm ERR! notsup Required: {"node":">=20.8.1"}
npm ERR! notsup Actual:   {"npm":"8.8.0","node":"v18.1.0"}

Minimum spec install attempt 2:

$ nvm install v20.8.1
v20.8.1 is already installed.
Now using node v20.8.1 (npm v10.1.0)
$ npm install
npm ERR! code EBADENGINE
npm ERR! engine Unsupported engine
npm ERR! engine Not compatible with your version of node/npm: [email protected]
npm ERR! notsup Not compatible with your version of node/npm: [email protected]
npm ERR! notsup Required: {"node":"^18.18.0 || ^20.9.0 || >=21.1.0"}
npm ERR! notsup Actual:   {"npm":"10.1.0","node":"v20.8.1"}

Minimum spec install attempt 3:

$ nvm install v20.9.0
v20.9.0 is already installed.
Now using node v20.9.0 (npm v10.1.0)
$ npm install
npm WARN deprecated @humanwhocodes/[email protected]: Use @eslint/config-array instead
npm WARN deprecated [email protected]: Rimraf versions prior to v4 are no longer supported
npm WARN deprecated [email protected]: Rimraf versions prior to v4 are no longer supported
npm WARN deprecated [email protected]: Glob versions prior to v9 are no longer supported
npm WARN deprecated [email protected]: Glob versions prior to v9 are no longer supported
npm WARN deprecated [email protected]: Glob versions prior to v9 are no longer supported

> @chainsafe/[email protected] prepare
> npm run build

> @chainsafe/[email protected] build
> aegir build

[10:23:50] tsc [started]
[10:23:52] tsc [completed]
[10:23:52] esbuild [started]
[10:23:52] esbuild [completed]

added 219 packages, removed 312 packages, changed 607 packages, and audited 1896 packages in 14s

363 packages are looking for funding
  run `npm fund` for details

17 vulnerabilities (16 moderate, 1 high)

To address issues that do not require attention, run:
  npm audit fix

To address all issues possible (including breaking changes), run:
  npm audit fix --force

Some issues need review, and may require choosing
a different dependency.

Run `npm audit` for details.

BREAKING CHANGE: Requires Node v20.9.0 or newer

The engine spec applied here matches the minimum requirements of all transient dependencies (in `package-lock.json`). The engine requirement is changed from `npm` version to `node` version to better match with the engine spec discovered as outlined in the install attempts below (nobody seems to depend on npm versions, only node version).

With `engine-strict=true` in `.npmrc`, I attempted to install with old versions of node/npm, until successfully installed and tested.

Minimum spec install attempt ChainSafe#1:
```
$ nvm install v18.1.0
v18.1.0 is already installed.
Now using node v18.1.0 (npm v8.8.0)
$ npm install
npm ERR! code EBADENGINE
npm ERR! engine Unsupported engine
npm ERR! engine Not compatible with your version of node/npm: @semantic-release/[email protected]
npm ERR! notsup Not compatible with your version of node/npm: @semantic-release/[email protected]
npm ERR! notsup Required: {"node":">=20.8.1"}
npm ERR! notsup Actual:   {"npm":"8.8.0","node":"v18.1.0"}
```

Minimum spec install attempt ChainSafe#2:
```
$ nvm install v20.8.1
v20.8.1 is already installed.
Now using node v20.8.1 (npm v10.1.0)
$ npm install
npm ERR! code EBADENGINE
npm ERR! engine Unsupported engine
npm ERR! engine Not compatible with your version of node/npm: [email protected]
npm ERR! notsup Not compatible with your version of node/npm: [email protected]
npm ERR! notsup Required: {"node":"^18.18.0 || ^20.9.0 || >=21.1.0"}
npm ERR! notsup Actual:   {"npm":"10.1.0","node":"v20.8.1"}
```

Minimum spec install attempt ChainSafe#3:
```
$ nvm install v20.9.0
v20.9.0 is already installed.
Now using node v20.9.0 (npm v10.1.0)
$ npm install
npm WARN deprecated @humanwhocodes/[email protected]: Use @eslint/config-array instead
npm WARN deprecated [email protected]: Rimraf versions prior to v4 are no longer supported
npm WARN deprecated [email protected]: Rimraf versions prior to v4 are no longer supported
npm WARN deprecated [email protected]: Glob versions prior to v9 are no longer supported
npm WARN deprecated [email protected]: Glob versions prior to v9 are no longer supported
npm WARN deprecated [email protected]: Glob versions prior to v9 are no longer supported

> @chainsafe/[email protected] prepare
> npm run build

> @chainsafe/[email protected] build
> aegir build

[10:23:50] tsc [started]
[10:23:52] tsc [completed]
[10:23:52] esbuild [started]
[10:23:52] esbuild [completed]

added 219 packages, removed 312 packages, changed 607 packages, and audited 1896 packages in 14s

363 packages are looking for funding
  run `npm fund` for details

17 vulnerabilities (16 moderate, 1 high)

To address issues that do not require attention, run:
  npm audit fix

To address all issues possible (including breaking changes), run:
  npm audit fix --force

Some issues need review, and may require choosing
a different dependency.

Run `npm audit` for details.
```

BREAKING CHANGE: Requires Node v20.9.0 or newer
@tysonclugg tysonclugg requested a review from a team as a code owner April 17, 2025 00:48
@tysonclugg
Copy link
Author

I'm aware that npm audit reports several issues including 1 high severity vulnerability, but that is the subject of a separate PR (#513).

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

Successfully merging this pull request may close these issues.

1 participant