From cf6afcc86c3078eaacf21cf9caee3557244d401a Mon Sep 17 00:00:00 2001 From: Sebastian Good <2230835+scagood@users.noreply.github.com> Date: Wed, 25 Sep 2024 18:40:55 +0200 Subject: [PATCH 1/6] feat: Node v20.17.0 #333 --- lib/unsupported-features/node-builtins-modules/path.js | 2 +- lib/unsupported-features/node-builtins-modules/stream.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/unsupported-features/node-builtins-modules/path.js b/lib/unsupported-features/node-builtins-modules/path.js index 0a2e5c3b..b4f5869b 100644 --- a/lib/unsupported-features/node-builtins-modules/path.js +++ b/lib/unsupported-features/node-builtins-modules/path.js @@ -10,7 +10,7 @@ const path = { dirname: { [READ]: { supported: ["0.1.16"] } }, extname: { [READ]: { supported: ["0.1.25"] } }, format: { [READ]: { supported: ["0.11.15"] } }, - matchesGlob: { [READ]: { experimental: ["22.5.0"] } }, + matchesGlob: { [READ]: { experimental: ["22.5.0", "20.17.0"] } }, isAbsolute: { [READ]: { supported: ["0.11.2"] } }, join: { [READ]: { supported: ["0.1.16"] } }, normalize: { [READ]: { supported: ["0.1.23"] } }, diff --git a/lib/unsupported-features/node-builtins-modules/stream.js b/lib/unsupported-features/node-builtins-modules/stream.js index 391bf6c9..389c356c 100644 --- a/lib/unsupported-features/node-builtins-modules/stream.js +++ b/lib/unsupported-features/node-builtins-modules/stream.js @@ -45,6 +45,7 @@ const Stream = { finished: { [READ]: { supported: ["10.0.0"] } }, pipeline: { [READ]: { supported: ["10.0.0"] } }, compose: { [READ]: { supported: ["16.9.0"] } }, + duplexPair: { [READ]: { supported: ["20.17.0"] } }, Readable, Writable, From 7343495ec11a05d1d545a09bcd4edc52ee7e4624 Mon Sep 17 00:00:00 2001 From: Sebastian Good <2230835+scagood@users.noreply.github.com> Date: Wed, 25 Sep 2024 18:43:38 +0200 Subject: [PATCH 2/6] feat: Node v22.6.0 #330 --- lib/unsupported-features/node-builtins-modules/inspector.js | 5 +++++ lib/unsupported-features/node-builtins-modules/stream.js | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/unsupported-features/node-builtins-modules/inspector.js b/lib/unsupported-features/node-builtins-modules/inspector.js index 408122fa..6323e663 100644 --- a/lib/unsupported-features/node-builtins-modules/inspector.js +++ b/lib/unsupported-features/node-builtins-modules/inspector.js @@ -20,6 +20,11 @@ const promises_api = { /** @type {import('../types.js').SupportVersionTraceMap} */ const callback_api = { Session: { [READ]: { supported: ["8.0.0"] } }, + Network: { + requestWillBeSent: { [READ]: { experimental: ["22.6.0"] } }, + responseReceived: { [READ]: { experimental: ["22.6.0"] } }, + loadingFinished: { [READ]: { experimental: ["22.6.0"] } }, + }, ...common_objects, } diff --git a/lib/unsupported-features/node-builtins-modules/stream.js b/lib/unsupported-features/node-builtins-modules/stream.js index 389c356c..d8d37df4 100644 --- a/lib/unsupported-features/node-builtins-modules/stream.js +++ b/lib/unsupported-features/node-builtins-modules/stream.js @@ -45,7 +45,7 @@ const Stream = { finished: { [READ]: { supported: ["10.0.0"] } }, pipeline: { [READ]: { supported: ["10.0.0"] } }, compose: { [READ]: { supported: ["16.9.0"] } }, - duplexPair: { [READ]: { supported: ["20.17.0"] } }, + duplexPair: { [READ]: { supported: ["22.6.0", "20.17.0"] } }, Readable, Writable, From 37c6bf156e1f390af2fa2adda070764771def4a2 Mon Sep 17 00:00:00 2001 From: Sebastian Good <2230835+scagood@users.noreply.github.com> Date: Wed, 25 Sep 2024 18:47:32 +0200 Subject: [PATCH 3/6] feat: Node v22.7.0 #334 --- lib/rules/no-deprecated-api.js | 6 ++++++ .../node-builtins-modules/inspector.js | 11 ++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/lib/rules/no-deprecated-api.js b/lib/rules/no-deprecated-api.js index 32efff22..92c03640 100644 --- a/lib/rules/no-deprecated-api.js +++ b/lib/rules/no-deprecated-api.js @@ -330,6 +330,12 @@ const rawModules = { }, }, }, + nextTick: { + [READ]: { + since: "22.7.0", + replacedBy: "'queueMicrotask()'", + }, + }, }, punycode: { [READ]: { diff --git a/lib/unsupported-features/node-builtins-modules/inspector.js b/lib/unsupported-features/node-builtins-modules/inspector.js index 6323e663..f587c149 100644 --- a/lib/unsupported-features/node-builtins-modules/inspector.js +++ b/lib/unsupported-features/node-builtins-modules/inspector.js @@ -4,6 +4,12 @@ const { READ } = require("@eslint-community/eslint-utils") /** @type {import('../types.js').SupportVersionTraceMap} */ const common_objects = { + Network: { + requestWillBeSent: { [READ]: { experimental: ["22.6.0"] } }, + responseReceived: { [READ]: { experimental: ["22.6.0"] } }, + loadingFinished: { [READ]: { experimental: ["22.6.0"] } }, + loadingFailed: { [READ]: { experimental: ["22.7.0"] } }, + }, console: { [READ]: { supported: ["8.0.0"] } }, close: { [READ]: { supported: ["9.0.0"] } }, open: { [READ]: { supported: ["8.0.0"] } }, @@ -20,11 +26,6 @@ const promises_api = { /** @type {import('../types.js').SupportVersionTraceMap} */ const callback_api = { Session: { [READ]: { supported: ["8.0.0"] } }, - Network: { - requestWillBeSent: { [READ]: { experimental: ["22.6.0"] } }, - responseReceived: { [READ]: { experimental: ["22.6.0"] } }, - loadingFinished: { [READ]: { experimental: ["22.6.0"] } }, - }, ...common_objects, } From 0fd7932bd7cfb388d898449b45e66a08fbda5048 Mon Sep 17 00:00:00 2001 From: Sebastian Good <2230835+scagood@users.noreply.github.com> Date: Wed, 25 Sep 2024 21:14:23 +0200 Subject: [PATCH 4/6] feat: Add perf_hooks.performance to unsupported --- .../node-builtins-modules/perf_hooks.js | 32 +++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/lib/unsupported-features/node-builtins-modules/perf_hooks.js b/lib/unsupported-features/node-builtins-modules/perf_hooks.js index e83d3ebe..e50b5b77 100644 --- a/lib/unsupported-features/node-builtins-modules/perf_hooks.js +++ b/lib/unsupported-features/node-builtins-modules/perf_hooks.js @@ -4,7 +4,35 @@ const { READ } = require("@eslint-community/eslint-utils") /** @type {import('../types.js').SupportVersionTraceMap} */ const perf_hooks = { - performance: { [READ]: { supported: ["8.5.0"] } }, + performance: { + [READ]: { supported: ["8.5.0"] }, + clearMarks: { [READ]: { supported: ["8.5.0"] } }, + clearMeasures: { [READ]: { supported: ["16.7.0"] } }, + clearResourceTimings: { [READ]: { supported: ["18.2.0", "v16.17.0"] } }, + eventLoopUtilization: { [READ]: { supported: ["14.10.0", "12.19.0"] } }, + getEntries: { [READ]: { supported: ["16.7.0"] } }, + getEntriesByName: { [READ]: { supported: ["16.7.0"] } }, + getEntriesByType: { [READ]: { supported: ["16.7.0"] } }, + mark: { [READ]: { supported: ["8.5.0"] } }, + markResourceTiming: { [READ]: { supported: ["8.2.0", "16.17.0"] } }, + measure: { [READ]: { supported: ["8.5.0"] } }, + nodeTiming: { + [READ]: { supported: ["8.5.0"] }, + bootstrapComplete: { [READ]: { supported: ["8.5.0"] } }, + environment: { [READ]: { supported: ["8.5.0"] } }, + idleTime: { [READ]: { supported: ["14.10.0", "12.19.0"] } }, + loopExit: { [READ]: { supported: ["8.5.0"] } }, + loopStart: { [READ]: { supported: ["8.5.0"] } }, + nodeStart: { [READ]: { supported: ["8.5.0"] } }, + v8Start: { [READ]: { supported: ["8.5.0"] } }, + }, + now: { [READ]: { supported: ["8.5.0"] } }, + onresourcetimingbufferfull: { [READ]: { supported: ["18.8.0"] } }, + setResourceTimingBufferSize: { [READ]: { supported: ["18.8.0"] } }, + timeOrigin: { [READ]: { supported: ["8.5.0"] } }, + timerify: { [READ]: { supported: ["8.5.0"] } }, + toJSON: { [READ]: { supported: ["16.1.0"] } }, + }, createHistogram: { [READ]: { supported: ["15.9.0", "14.18.0"] } }, monitorEventLoopDelay: { [READ]: { supported: ["11.10.0"] } }, PerformanceEntry: { [READ]: { supported: ["8.5.0"] } }, @@ -16,7 +44,7 @@ const perf_hooks = { PerformanceObserver: { [READ]: { supported: ["8.5.0"] } }, PerformanceObserverEntryList: { [READ]: { supported: ["8.5.0"] } }, Histogram: { [READ]: { supported: ["11.10.0"] } }, - IntervalHistogram: { [READ]: { supported: ["8.5.0"] } }, + IntervalHistogram: { [READ]: { supported: ["11.10.0"] } }, RecordableHistogram: { [READ]: { supported: ["15.9.0", "14.18.0"] } }, } From 1f7a1085fa890d2666e64c33f89a1c9a3209add8 Mon Sep 17 00:00:00 2001 From: Sebastian Good <2230835+scagood@users.noreply.github.com> Date: Wed, 25 Sep 2024 21:14:48 +0200 Subject: [PATCH 5/6] feat: Node v22.8.0 #335 --- lib/unsupported-features/node-builtins-modules/module.js | 7 +++++++ .../node-builtins-modules/perf_hooks.js | 1 + 2 files changed, 8 insertions(+) diff --git a/lib/unsupported-features/node-builtins-modules/module.js b/lib/unsupported-features/node-builtins-modules/module.js index 359206f2..78b468e7 100644 --- a/lib/unsupported-features/node-builtins-modules/module.js +++ b/lib/unsupported-features/node-builtins-modules/module.js @@ -5,6 +5,11 @@ const { READ } = require("@eslint-community/eslint-utils") /** @type {import('../types.js').SupportVersionTraceMap} */ const Module = { builtinModules: { [READ]: { supported: ["9.3.0", "8.10.0", "6.13.0"] } }, + constants: { + compileCacheStatus: { + [READ]: { experimental: ["22.8.0"] }, + }, + }, createRequire: { [READ]: { supported: ["12.2.0"] } }, createRequireFromPath: { [READ]: { @@ -12,6 +17,8 @@ const Module = { deprecated: ["12.2.0"], }, }, + enableCompileCache: { [READ]: { experimental: ["22.8.0"] } }, + getCompileCacheDir: { [READ]: { experimental: ["22.8.0"] } }, isBuiltin: { [READ]: { supported: ["18.6.0", "16.17.0"] } }, register: { [READ]: { experimental: ["20.6.0"] } }, syncBuiltinESMExports: { [READ]: { supported: ["12.12.0"] } }, diff --git a/lib/unsupported-features/node-builtins-modules/perf_hooks.js b/lib/unsupported-features/node-builtins-modules/perf_hooks.js index e50b5b77..6408bd01 100644 --- a/lib/unsupported-features/node-builtins-modules/perf_hooks.js +++ b/lib/unsupported-features/node-builtins-modules/perf_hooks.js @@ -24,6 +24,7 @@ const perf_hooks = { loopExit: { [READ]: { supported: ["8.5.0"] } }, loopStart: { [READ]: { supported: ["8.5.0"] } }, nodeStart: { [READ]: { supported: ["8.5.0"] } }, + uvMetricsInfo: { [READ]: { supported: ["22.8.0"] } }, v8Start: { [READ]: { supported: ["8.5.0"] } }, }, now: { [READ]: { supported: ["8.5.0"] } }, From 8834fab78884c57eda4da01d476a7a78216c2ce5 Mon Sep 17 00:00:00 2001 From: Sebastian Good <2230835+scagood@users.noreply.github.com> Date: Wed, 25 Sep 2024 21:51:46 +0200 Subject: [PATCH 6/6] feat: Node v22.9.0 #340 --- lib/rules/no-deprecated-api.js | 46 +++++++++++++++++ .../node-builtins-modules/repl.js | 49 +++++++++++++++++++ .../node-builtins-modules/util.js | 1 + .../node-builtins-modules/zlib.js | 47 ++++++++++++++---- lib/unsupported-features/node-builtins.js | 1 + 5 files changed, 134 insertions(+), 10 deletions(-) create mode 100644 lib/unsupported-features/node-builtins-modules/repl.js diff --git a/lib/rules/no-deprecated-api.js b/lib/rules/no-deprecated-api.js index 92c03640..68e516b3 100644 --- a/lib/rules/no-deprecated-api.js +++ b/lib/rules/no-deprecated-api.js @@ -357,6 +357,17 @@ const rawModules = { [READ]: { since: "6.0.0", replacedBy: null }, }, }, + repl: { + REPLServer: { + [READ]: { since: "22.9.0", replacedBy: "new repl.REPLServer()" }, + }, + Recoverable: { + [READ]: { since: "22.9.0", replacedBy: "new repl.Recoverable()" }, + }, + REPL_MODE_MAGIC: { + [READ]: { since: "8.0.0", replacedBy: null }, + }, + }, // safe-buffer.Buffer function/constructror is just a re-export of buffer.Buffer // and should be deprecated likewise. "safe-buffer": { @@ -582,6 +593,41 @@ const rawModules = { [READ]: { since: "8.0.0", replacedBy: null }, }, }, + zlib: { + BrotliCompress: { + [CALL]: { + since: "22.9.0", + replacedBy: "new zlib.BrotliCompress()", + }, + }, + BrotliDecompress: { + [CALL]: { + since: "22.9.0", + replacedBy: "new zlib.BrotliDecompress()", + }, + }, + Deflate: { + [CALL]: { since: "22.9.0", replacedBy: "new zlib.Deflate()" }, + }, + DeflateRaw: { + [CALL]: { since: "22.9.0", replacedBy: "new zlib.DeflateRaw()" }, + }, + Gunzip: { + [CALL]: { since: "22.9.0", replacedBy: "new zlib.Gunzip()" }, + }, + Gzip: { + [CALL]: { since: "22.9.0", replacedBy: "new zlib.Gzip()" }, + }, + Inflate: { + [CALL]: { since: "22.9.0", replacedBy: "new zlib.Inflate()" }, + }, + InflateRaw: { + [CALL]: { since: "22.9.0", replacedBy: "new zlib.InflateRaw()" }, + }, + Unzip: { + [CALL]: { since: "22.9.0", replacedBy: "new zlib.Unzip()" }, + }, + }, } const modules = extendTrackmapWithNodePrefix(rawModules) diff --git a/lib/unsupported-features/node-builtins-modules/repl.js b/lib/unsupported-features/node-builtins-modules/repl.js new file mode 100644 index 00000000..c94c11cb --- /dev/null +++ b/lib/unsupported-features/node-builtins-modules/repl.js @@ -0,0 +1,49 @@ +"use strict" + +const { CALL, READ } = require("@eslint-community/eslint-utils") + +/** @type {import('../types.js').SupportVersionTraceMap} */ +const repl = { + start: { + [READ]: { supported: ["0.1.91"] }, + }, + writer: { + [READ]: { supported: ["0.1.91"] }, + }, + REPLServer: { + [READ]: { supported: ["0.1.91"] }, + [CALL]: { deprecated: ["22.9.0"] }, + }, + REPL_MODE_MAGIC: { + [READ]: { + supported: ["4.0.0"], + deprecated: ["8.0.0"], + // removed: ['10.0.0'], + }, + }, + REPL_MODE_SLOPPY: { + [READ]: { supported: ["4.0.0"] }, + }, + REPL_MODE_STRICT: { + [READ]: { supported: ["4.0.0"] }, + }, + Recoverable: { + [READ]: { supported: ["6.2.0"] }, + [CALL]: { deprecated: ["22.9.0"] }, + }, + builtinModules: { + [READ]: { supported: ["14.5.0"] }, + }, +} + +/** @type {import('../types.js').SupportVersionTraceMap} */ +module.exports = { + repl: { + [READ]: { supported: ["0.1.91"] }, + ...repl, + }, + "node:repl": { + [READ]: { supported: ["14.13.1", "12.20.0"] }, + ...repl, + }, +} diff --git a/lib/unsupported-features/node-builtins-modules/util.js b/lib/unsupported-features/node-builtins-modules/util.js index 50bb3768..40932688 100644 --- a/lib/unsupported-features/node-builtins-modules/util.js +++ b/lib/unsupported-features/node-builtins-modules/util.js @@ -88,6 +88,7 @@ const util = { deprecate: { [READ]: { supported: ["0.8.0"] } }, format: { [READ]: { supported: ["0.5.3"] } }, formatWithOptions: { [READ]: { supported: ["10.0.0"] } }, + getCallSite: { [READ]: { supported: ["22.9.0"] } }, getSystemErrorName: { [READ]: { supported: ["9.7.0", "8.12.0"] } }, getSystemErrorMap: { [READ]: { supported: ["16.0.0", "14.17.0"] } }, inherits: { [READ]: { supported: ["0.3.0"] } }, diff --git a/lib/unsupported-features/node-builtins-modules/zlib.js b/lib/unsupported-features/node-builtins-modules/zlib.js index 367c7c44..79a08056 100644 --- a/lib/unsupported-features/node-builtins-modules/zlib.js +++ b/lib/unsupported-features/node-builtins-modules/zlib.js @@ -1,6 +1,6 @@ "use strict" -const { READ } = require("@eslint-community/eslint-utils") +const { CALL, READ } = require("@eslint-community/eslint-utils") /** @type {import('../types.js').SupportVersionTraceMap} */ const zlib = { @@ -33,15 +33,42 @@ const zlib = { inflateRawSync: { [READ]: { supported: ["0.11.12"] } }, unzip: { [READ]: { supported: ["0.6.0"] } }, unzipSync: { [READ]: { supported: ["0.11.12"] } }, - BrotliCompress: { [READ]: { supported: ["11.7.0", "10.16.0"] } }, - BrotliDecompress: { [READ]: { supported: ["11.7.0", "10.16.0"] } }, - Deflate: { [READ]: { supported: ["0.5.8"] } }, - DeflateRaw: { [READ]: { supported: ["0.5.8"] } }, - Gunzip: { [READ]: { supported: ["0.5.8"] } }, - Gzip: { [READ]: { supported: ["0.5.8"] } }, - Inflate: { [READ]: { supported: ["0.5.8"] } }, - InflateRaw: { [READ]: { supported: ["0.5.8"] } }, - Unzip: { [READ]: { supported: ["0.5.8"] } }, + BrotliCompress: { + [CALL]: { deprecated: ["22.9.0"] }, + [READ]: { supported: ["11.7.0", "10.16.0"] }, + }, + BrotliDecompress: { + [CALL]: { deprecated: ["22.9.0"] }, + [READ]: { supported: ["11.7.0", "10.16.0"] }, + }, + Deflate: { + [CALL]: { deprecated: ["22.9.0"] }, + [READ]: { supported: ["0.5.8"] }, + }, + DeflateRaw: { + [CALL]: { deprecated: ["22.9.0"] }, + [READ]: { supported: ["0.5.8"] }, + }, + Gunzip: { + [CALL]: { deprecated: ["22.9.0"] }, + [READ]: { supported: ["0.5.8"] }, + }, + Gzip: { + [CALL]: { deprecated: ["22.9.0"] }, + [READ]: { supported: ["0.5.8"] }, + }, + Inflate: { + [CALL]: { deprecated: ["22.9.0"] }, + [READ]: { supported: ["0.5.8"] }, + }, + InflateRaw: { + [CALL]: { deprecated: ["22.9.0"] }, + [READ]: { supported: ["0.5.8"] }, + }, + Unzip: { + [CALL]: { deprecated: ["22.9.0"] }, + [READ]: { supported: ["0.5.8"] }, + }, } /** @type {import('../types.js').SupportVersionTraceMap} */ diff --git a/lib/unsupported-features/node-builtins.js b/lib/unsupported-features/node-builtins.js index f484096e..99a185ca 100644 --- a/lib/unsupported-features/node-builtins.js +++ b/lib/unsupported-features/node-builtins.js @@ -31,6 +31,7 @@ const NodeBuiltinModules = { ...require("./node-builtins-modules/punycode.js"), ...require("./node-builtins-modules/querystring.js"), ...require("./node-builtins-modules/readline.js"), + ...require("./node-builtins-modules/repl.js"), ...require("./node-builtins-modules/sea.js"), ...require("./node-builtins-modules/stream.js"), ...require("./node-builtins-modules/string_decoder.js"),