From acf2ea6152bd5aa3d1d7897cfda48e84f3d0a9d0 Mon Sep 17 00:00:00 2001 From: Ardis Lu Date: Thu, 4 Sep 2025 23:10:17 -0700 Subject: [PATCH] Pin Node.js and npm versions in `devEngines` `devEngines` is the standardized field for this purpose [0], with varying levels of tooling support. The duplicative and non-standard `.node-version` file will eventually be removed once tooling support for `devEngines` is more widespread. [0] https://github.com/openjs-foundation/package-metadata-interoperability-collab-space --- .node-version | 2 +- npm/prepack.js | 1 + package.json | 10 ++++++++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.node-version b/.node-version index f01a1a0..24ffec1 100644 --- a/.node-version +++ b/.node-version @@ -1 +1 @@ -24.6.0 \ No newline at end of file +24.7.0 \ No newline at end of file diff --git a/npm/prepack.js b/npm/prepack.js index 7f5b176..f9b40e2 100644 --- a/npm/prepack.js +++ b/npm/prepack.js @@ -27,6 +27,7 @@ else { await copyFile('./package.json', './package.backup.json'); } execSync('npm run types'); + execSync('npm pkg delete devEngines'); execSync('npm pkg delete scripts'); execSync('npm pkg delete devDependencies'); } diff --git a/package.json b/package.json index 3010dcb..d58c3c2 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,16 @@ "engines": { "node": ">=20" }, + "devEngines": { + "runtime": { + "name": "node", + "version": "24.7.0" + }, + "packageManager": { + "name": "npm", + "version": "11.6.0" + } + }, "files": [ "./types/*", "./src/*" -- 2.47.3