From 73e2bed2e76dc9382069268954ae894665f18538 Mon Sep 17 00:00:00 2001 From: Sebastian Good <2230835+scagood@users.noreply.github.com> Date: Fri, 26 Jul 2024 03:03:23 +0100 Subject: [PATCH] feat(no-unsupported): Support node 22.3.0 and 20.16.0 (#315) feat(no-unsupported): Support node 20.16.0 --- lib/unsupported-features/node-builtins-modules/fs.js | 6 +++--- .../node-builtins-modules/http.js | 1 + .../node-builtins-modules/process.js | 1 + .../node-builtins-modules/test.js | 6 ++++++ .../node-builtins-modules/zlib.js | 2 +- lib/unsupported-features/node-globals.js | 11 +++++++++-- 6 files changed, 21 insertions(+), 6 deletions(-) diff --git a/lib/unsupported-features/node-builtins-modules/fs.js b/lib/unsupported-features/node-builtins-modules/fs.js index cf02e86e..0875405a 100644 --- a/lib/unsupported-features/node-builtins-modules/fs.js +++ b/lib/unsupported-features/node-builtins-modules/fs.js @@ -11,7 +11,7 @@ const promises_api = { chown: { [READ]: { supported: ["10.0.0"] } }, constants: { [READ]: { supported: ["18.4.0", "16.17.0"] } }, copyFile: { [READ]: { supported: ["10.0.0"] } }, - cp: { [READ]: { experimental: ["16.7.0"] } }, + cp: { [READ]: { supported: ["22.3.0"], experimental: ["16.7.0"] } }, glob: { [READ]: { experimental: ["22.0.0"] } }, lchmod: { [READ]: { supported: ["10.0.0"], deprecated: ["10.0.0"] } }, lchown: { [READ]: { supported: ["10.0.0"] } }, @@ -47,7 +47,7 @@ const callback_api = { chown: { [READ]: { supported: ["0.1.97"] } }, close: { [READ]: { supported: ["0.0.2"] } }, copyFile: { [READ]: { supported: ["8.5.0"] } }, - cp: { [READ]: { experimental: ["16.7.0"] } }, + cp: { [READ]: { supported: ["22.3.0"], experimental: ["16.7.0"] } }, createReadStream: { [READ]: { supported: ["0.1.31"] } }, createWriteStream: { [READ]: { supported: ["0.1.31"] } }, exists: { [READ]: { supported: ["0.0.2"], deprecated: ["1.0.0"] } }, @@ -104,7 +104,7 @@ const synchronous_api = { chownSync: { [READ]: { supported: ["0.1.97"] } }, closeSync: { [READ]: { supported: ["0.1.21"] } }, copyFileSync: { [READ]: { supported: ["8.5.0"] } }, - cpSync: { [READ]: { experimental: ["16.7.0"] } }, + cpSync: { [READ]: { supported: ["22.3.0"], experimental: ["16.7.0"] } }, existsSync: { [READ]: { supported: ["0.1.21"] } }, fchmodSync: { [READ]: { supported: ["0.4.7"] } }, fchownSync: { [READ]: { supported: ["0.4.7"] } }, diff --git a/lib/unsupported-features/node-builtins-modules/http.js b/lib/unsupported-features/node-builtins-modules/http.js index dd422e5f..b163354f 100644 --- a/lib/unsupported-features/node-builtins-modules/http.js +++ b/lib/unsupported-features/node-builtins-modules/http.js @@ -20,6 +20,7 @@ const http = { ServerResponse: { [READ]: { supported: ["0.1.17"] } }, IncomingMessage: { [READ]: { supported: ["0.1.17"] } }, OutgoingMessage: { [READ]: { supported: ["0.1.17"] } }, + WebSocket: { [READ]: { supported: ["22.5.0"] } }, } /** @type {import('../types.js').SupportVersionTraceMap} */ diff --git a/lib/unsupported-features/node-builtins-modules/process.js b/lib/unsupported-features/node-builtins-modules/process.js index 75127134..6024b778 100644 --- a/lib/unsupported-features/node-builtins-modules/process.js +++ b/lib/unsupported-features/node-builtins-modules/process.js @@ -22,6 +22,7 @@ const process = { registerBeforeExit: { [READ]: { experimental: ["22.5.0"] } }, unregister: { [READ]: { experimental: ["22.5.0"] } }, }, + getBuiltinModule: { [READ]: { supported: ["22.3.0", "20.16.0"] } }, mainModule: { [READ]: { supported: ["0.1.17"], diff --git a/lib/unsupported-features/node-builtins-modules/test.js b/lib/unsupported-features/node-builtins-modules/test.js index 15bb9b02..1ccab03f 100644 --- a/lib/unsupported-features/node-builtins-modules/test.js +++ b/lib/unsupported-features/node-builtins-modules/test.js @@ -30,7 +30,13 @@ const test = { after: { [READ]: { supported: ["18.8.0", "16.18.0"] } }, beforeEach: { [READ]: { supported: ["18.8.0", "16.18.0"] } }, afterEach: { [READ]: { supported: ["18.8.0", "16.18.0"] } }, + snapshot: { + [READ]: { experimental: ["22.3.0"] }, + setDefaultSnapshotSerializers: { [READ]: { experimental: ["22.3.0"] } }, + setResolveSnapshotPath: { [READ]: { experimental: ["22.3.0"] } }, + }, MockFunctionContext: { [READ]: { supported: ["19.1.0", "18.13.0"] } }, + MockModuleContext: { [READ]: { experimental: ["22.3.0"] } }, MockTracker: { [READ]: { supported: ["19.1.0", "18.13.0"] } }, MockTimers: { [READ]: { experimental: ["20.4.0"] } }, TestsStream: { [READ]: { supported: ["18.9.0", "16.19.0"] } }, diff --git a/lib/unsupported-features/node-builtins-modules/zlib.js b/lib/unsupported-features/node-builtins-modules/zlib.js index ee215ebc..367c7c44 100644 --- a/lib/unsupported-features/node-builtins-modules/zlib.js +++ b/lib/unsupported-features/node-builtins-modules/zlib.js @@ -5,7 +5,7 @@ const { READ } = require("@eslint-community/eslint-utils") /** @type {import('../types.js').SupportVersionTraceMap} */ const zlib = { constants: { [READ]: { supported: ["7.0.0"] } }, - crc32: { [READ]: { supported: ["22.2.0"] } }, + crc32: { [READ]: { supported: ["22.2.0", "20.15.0"] } }, createBrotliCompress: { [READ]: { supported: ["11.7.0", "10.16.0"] } }, createBrotliDecompress: { [READ]: { supported: ["11.7.0", "10.16.0"] } }, createDeflate: { [READ]: { supported: ["0.5.8"] } }, diff --git a/lib/unsupported-features/node-globals.js b/lib/unsupported-features/node-globals.js index a2594518..87723f1d 100644 --- a/lib/unsupported-features/node-globals.js +++ b/lib/unsupported-features/node-globals.js @@ -89,10 +89,12 @@ const nodeGlobals = { Response: { [READ]: { experimental: ["17.5.0", "16.15.0"], supported: ["21.0.0"] }, }, - Storage: { [READ]: { experimental: ["22.4.0"] } }, WebAssembly: { [READ]: { supported: ["8.0.0"] } }, WebSocket: { - [READ]: { experimental: ["21.0.0", "20.10.0"], supported: ["22.4.0"] }, + [READ]: { + experimental: ["21.0.0", "20.10.0"], + supported: ["22.4.0"], + }, }, fetch: { @@ -112,6 +114,11 @@ const nodeGlobals = { }, structuredClone: { [READ]: { supported: ["17.0.0"] } }, + // --experimental-webstorage + localStorage: { [READ]: { experimental: ["22.4.0"] } }, + sessionStorage: { [READ]: { experimental: ["22.4.0"] } }, + Storage: { [READ]: { experimental: ["22.4.0"] } }, + // module.buffer Blob: buffer.Blob, Buffer: {