Skip to content

Commit 88c602a

Browse files
committed
chore(deps): bump engine support matrix
BREAKING CHANGE: drop support for Node.js 20 and 25
1 parent 964d8cf commit 88c602a

6 files changed

Lines changed: 457 additions & 1416 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ jobs:
4747
fail-fast: false
4848
matrix:
4949
node:
50-
- 20
5150
- 22
5251
- 24
52+
- 26
5353
platform:
5454
- ubuntu-latest
5555
- macos-latest

package.json

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,22 @@
1010
"url": "https://github.com/nodejs/corepack.git"
1111
},
1212
"engines": {
13-
"node": "^20.10.0 || ^22.11.0 || >=24.0.0"
13+
"node": "^22.22.0 || ^24.15.0 || >=26.0.0"
1414
},
1515
"exports": {
1616
"./package.json": "./package.json"
1717
},
1818
"license": "MIT",
19-
"packageManager": "yarn@4.11.0+sha224.209a3e277c6bbc03df6e4206fbfcb0c1621c27ecf0688f79a0c619f0",
19+
"packageManager": "yarn@4.14.1+sha224.88b7a7244bbd9040380c417f7eb556d85c67640b651f113cb4c72113",
2020
"devDependencies": {
2121
"@types/debug": "^4.1.5",
22-
"@types/node": "^20.4.6",
22+
"@types/node": "^22.0.0",
2323
"@types/proxy-from-env": "^1",
2424
"@types/semver": "^7.1.0",
2525
"@types/which": "^3.0.0",
2626
"@yarnpkg/eslint-config": "^3.0.0",
2727
"@yarnpkg/fslib": "^3.0.0-rc.48",
2828
"@zkochan/cmd-shim": "^6.0.0",
29-
"better-sqlite3": "^11.7.2",
3029
"clipanion": "patch:clipanion@npm%3A3.2.1#~/.yarn/patches/clipanion-npm-3.2.1-fc9187f56c.patch",
3130
"debug": "^4.1.1",
3231
"esbuild": "^0.27.0",
@@ -42,6 +41,11 @@
4241
"vitest": "^3.0.5",
4342
"which": "^5.0.0"
4443
},
44+
"dependenciesMeta": {
45+
"esbuild": {
46+
"built": true
47+
}
48+
},
4549
"resolutions": {
4650
"undici-types": "6.x"
4751
},

sources/corepackUtils.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,6 @@ export async function runVersion(locator: Locator, installSpec: InstallSpec & {s
409409
if (!binPath)
410410
throw new Error(`Assertion failed: Unable to locate path for bin '${binName}'`);
411411

412-
// @ts-expect-error - Missing types
413412
if (!Module.enableCompileCache) {
414413
// Node.js segfaults when using npm@>=9.7.0 and v8-compile-cache
415414
// $ docker run -it node:20.3.0-slim corepack npm@9.7.1 --version
@@ -443,9 +442,7 @@ export async function runVersion(locator: Locator, installSpec: InstallSpec & {s
443442
// the stack trace of the package manager.
444443
process.nextTick(Module.runMain, binPath);
445444

446-
// @ts-expect-error - No types
447445
if (Module.flushCompileCache) {
448-
// @ts-expect-error - No types
449446
setImmediate(Module.flushCompileCache);
450447
}
451448
}

tests/main.test.ts

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -682,10 +682,7 @@ describe(`when called on a project without any defined packageManager`, () => {
682682
});
683683
});
684684

685-
it(`should modify package.json if enabled by .corepack.env`, async t => {
686-
// Skip that test on Node.js 18.x as it lacks support for .env files.
687-
if (process.version.startsWith(`v18.`)) t.skip();
688-
685+
it(`should modify package.json if enabled by .corepack.env`, async () => {
689686
await xfs.mktempPromise(async cwd => {
690687
await xfs.writeJsonPromise(ppath.join(cwd, `package.json` as Filename), {
691688
// empty package.json file
@@ -1343,10 +1340,7 @@ describe(`should pick up COREPACK_INTEGRITY_KEYS from env`, () => {
13431340
});
13441341
});
13451342

1346-
it(`from .corepack.env file`, async t => {
1347-
// Skip that test on Node.js 18.x as it lacks support for .env files.
1348-
if (process.version.startsWith(`v18.`)) t.skip();
1349-
1343+
it(`from .corepack.env file`, async () => {
13501344
await xfs.mktempPromise(async cwd => {
13511345
await xfs.writeJsonPromise(ppath.join(cwd, `package.json` as Filename), {
13521346
});
@@ -1366,10 +1360,7 @@ describe(`should pick up COREPACK_INTEGRITY_KEYS from env`, () => {
13661360
});
13671361
});
13681362

1369-
it(`from env file defined by COREPACK_ENV_FILE`, async t => {
1370-
// Skip that test on Node.js 18.x as it lacks support for .env files.
1371-
if (process.version.startsWith(`v18.`)) t.skip();
1372-
1363+
it(`from env file defined by COREPACK_ENV_FILE`, async () => {
13731364
await xfs.mktempPromise(async cwd => {
13741365
await xfs.writeJsonPromise(ppath.join(cwd, `package.json` as Filename), {
13751366
});
@@ -1416,10 +1407,7 @@ describe(`should pick up COREPACK_INTEGRITY_KEYS from env`, () => {
14161407
});
14171408
});
14181409

1419-
it(`should ignore .corepack.env file if COREPACK_ENV_FILE is set to 0`, async t => {
1420-
// Skip that test on Node.js 18.x as it lacks support for .env files.
1421-
if (process.version.startsWith(`v18.`)) t.skip();
1422-
1410+
it(`should ignore .corepack.env file if COREPACK_ENV_FILE is set to 0`, async () => {
14231411
await xfs.mktempPromise(async cwd => {
14241412
await xfs.writeJsonPromise(ppath.join(cwd, `package.json` as Filename), {
14251413
});
@@ -1442,10 +1430,7 @@ describe(`should pick up COREPACK_INTEGRITY_KEYS from env`, () => {
14421430
});
14431431
});
14441432

1445-
it(`from env file defined by COREPACK_ENV_FILE`, async t => {
1446-
// Skip that test on Node.js 18.x as it lacks support for .env files.
1447-
if (process.version.startsWith(`v18.`)) t.skip();
1448-
1433+
it(`from env file defined by COREPACK_ENV_FILE`, async () => {
14491434
process.env.COREPACK_ENV_FILE = `.other.env`;
14501435
await xfs.mktempPromise(async cwd => {
14511436
await xfs.writeJsonPromise(ppath.join(cwd, `package.json` as Filename), {

tests/recordRequests.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"use strict";
22
const path = require(`node:path`);
33
const crypto = require(`node:crypto`);
4-
const SQLite3 = require(`better-sqlite3`);
4+
const {DatabaseSync: SQLite3} = require(`node:sqlite`);
55

66
const db = new SQLite3(path.join(__dirname, `nocks.db`));
77
process.once(`exit`, () => {

0 commit comments

Comments
 (0)