diff --git a/lib/rules/no-deprecated-api.js b/lib/rules/no-deprecated-api.js index 32efff22..68e516b3 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]: { @@ -351,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": { @@ -576,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/inspector.js b/lib/unsupported-features/node-builtins-modules/inspector.js index 408122fa..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"] } }, 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/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/perf_hooks.js b/lib/unsupported-features/node-builtins-modules/perf_hooks.js index e83d3ebe..6408bd01 100644 --- a/lib/unsupported-features/node-builtins-modules/perf_hooks.js +++ b/lib/unsupported-features/node-builtins-modules/perf_hooks.js @@ -4,7 +4,36 @@ 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"] } }, + uvMetricsInfo: { [READ]: { supported: ["22.8.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 +45,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"] } }, } 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/stream.js b/lib/unsupported-features/node-builtins-modules/stream.js index 391bf6c9..d8d37df4 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: ["22.6.0", "20.17.0"] } }, Readable, Writable, 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"),