diff --git a/lib/rules/no-unsupported-features/node-builtins.js b/lib/rules/no-unsupported-features/node-builtins.js index 32def045..1ade4477 100644 --- a/lib/rules/no-unsupported-features/node-builtins.js +++ b/lib/rules/no-unsupported-features/node-builtins.js @@ -11,7 +11,10 @@ const { } = require("../../util/check-unsupported-builtins") const enumeratePropertyNames = require("../../util/enumerate-property-names") const getConfiguredNodeVersion = require("../../util/get-configured-node-version") -const extendTrackMapWithNodePrefix = require("../../util/extend-trackmap-with-node-prefix") + +const { + NodeBuiltinModules, +} = require("../../unsupported-features/node-builtins.js") const trackMap = { globals: { @@ -24,325 +27,7 @@ const trackMap = { }, }, }, - modules: { - assert: { - strict: { - [READ]: { supported: ["9.9.0", "8.13.0"] }, - doesNotReject: { [READ]: { supported: ["10.0.0"] } }, - rejects: { [READ]: { supported: ["10.0.0"] } }, - }, - deepStrictEqual: { [READ]: { supported: ["4.0.0"] } }, - doesNotReject: { [READ]: { supported: ["10.0.0"] } }, - notDeepStrictEqual: { [READ]: { supported: ["4.0.0"] } }, - rejects: { [READ]: { supported: ["10.0.0"] } }, - CallTracker: { - [READ]: { supported: null, experimental: "14.2.0" }, - }, - }, - async_hooks: { - [READ]: { supported: ["8.0.0"] }, - createHook: { [READ]: { supported: ["8.1.0"] } }, - AsyncLocalStorage: { - [READ]: { supported: ["13.10.0", "12.17.0"] }, - }, - }, - buffer: { - Buffer: { - alloc: { [READ]: { supported: ["4.5.0"] } }, - allocUnsafe: { [READ]: { supported: ["4.5.0"] } }, - allocUnsafeSlow: { [READ]: { supported: ["4.5.0"] } }, - from: { [READ]: { supported: ["4.5.0"] } }, - }, - kMaxLength: { [READ]: { supported: ["3.0.0"] } }, - transcode: { [READ]: { supported: ["7.1.0"] } }, - constants: { [READ]: { supported: ["8.2.0"] } }, - Blob: { [READ]: { supported: null, experimental: "15.7.0" } }, - }, - child_process: { - ChildProcess: { [READ]: { supported: ["2.2.0"] } }, - }, - console: { - clear: { [READ]: { supported: ["8.3.0", "6.13.0"] } }, - count: { [READ]: { supported: ["8.3.0", "6.13.0"] } }, - countReset: { - [READ]: { supported: ["8.3.0", "6.13.0"] }, - }, - debug: { [READ]: { supported: ["8.0.0"] } }, - dirxml: { [READ]: { supported: ["8.0.0"] } }, - group: { [READ]: { supported: ["8.5.0"] } }, - groupCollapsed: { [READ]: { supported: ["8.5.0"] } }, - groupEnd: { [READ]: { supported: ["8.5.0"] } }, - table: { [READ]: { supported: ["10.0.0"] } }, - markTimeline: { [READ]: { supported: ["8.0.0"] } }, - profile: { [READ]: { supported: ["8.0.0"] } }, - profileEnd: { [READ]: { supported: ["8.0.0"] } }, - timeLog: { [READ]: { supported: ["10.7.0"] } }, - timeStamp: { [READ]: { supported: ["8.0.0"] } }, - timeline: { [READ]: { supported: ["8.0.0"] } }, - timelineEnd: { [READ]: { supported: ["8.0.0"] } }, - }, - crypto: { - Certificate: { - exportChallenge: { [READ]: { supported: ["9.0.0"] } }, - exportPublicKey: { [READ]: { supported: ["9.0.0"] } }, - verifySpkac: { [READ]: { supported: ["9.0.0"] } }, - }, - ECDH: { [READ]: { supported: ["8.8.0", "6.13.0"] } }, - KeyObject: { [READ]: { supported: ["11.6.0"] } }, - createPrivateKey: { [READ]: { supported: ["11.6.0"] } }, - createPublicKey: { [READ]: { supported: ["11.6.0"] } }, - createSecretKey: { [READ]: { supported: ["11.6.0"] } }, - constants: { [READ]: { supported: ["6.3.0"] } }, - fips: { [READ]: { supported: ["6.0.0"] } }, - generateKeyPair: { [READ]: { supported: ["10.12.0"] } }, - generateKeyPairSync: { [READ]: { supported: ["10.12.0"] } }, - getCurves: { [READ]: { supported: ["2.3.0"] } }, - getFips: { [READ]: { supported: ["10.0.0"] } }, - privateEncrypt: { [READ]: { supported: ["1.1.0"] } }, - publicDecrypt: { [READ]: { supported: ["1.1.0"] } }, - randomFillSync: { - [READ]: { supported: ["7.10.0", "6.13.0"] }, - }, - randomFill: { - [READ]: { supported: ["7.10.0", "6.13.0"] }, - }, - scrypt: { [READ]: { supported: ["10.5.0"] } }, - scryptSync: { [READ]: { supported: ["10.5.0"] } }, - setFips: { [READ]: { supported: ["10.0.0"] } }, - sign: { [READ]: { supported: ["12.0.0"] } }, - timingSafeEqual: { [READ]: { supported: ["6.6.0"] } }, - verify: { [READ]: { supported: ["12.0.0"] } }, - }, - dns: { - Resolver: { [READ]: { supported: ["8.3.0"] } }, - resolvePtr: { [READ]: { supported: ["6.0.0"] } }, - promises: { - [READ]: { - supported: ["11.14.0", "10.17.0"], - experimental: "10.6.0", - }, - }, - }, - events: { - EventEmitter: { - once: { - [READ]: { supported: ["11.13.0", "10.16.0"] }, - }, - }, - once: { [READ]: { supported: ["11.13.0", "10.16.0"] } }, - }, - fs: { - Dirent: { [READ]: { supported: ["10.10.0"] } }, - copyFile: { [READ]: { supported: ["8.5.0"] } }, - copyFileSync: { [READ]: { supported: ["8.5.0"] } }, - mkdtemp: { [READ]: { supported: ["5.10.0"] } }, - mkdtempSync: { [READ]: { supported: ["5.10.0"] } }, - realpath: { - native: { [READ]: { supported: ["9.2.0"] } }, - }, - realpathSync: { - native: { [READ]: { supported: ["9.2.0"] } }, - }, - promises: { - [READ]: { - supported: ["11.14.0", "10.17.0"], - experimental: "10.1.0", - }, - }, - writev: { [READ]: { supported: ["12.9.0"] } }, - writevSync: { [READ]: { supported: ["12.9.0"] } }, - readv: { - [READ]: { supported: ["13.13.0", "12.17.0"] }, - }, - readvSync: { - [READ]: { supported: ["13.13.0", "12.17.0"] }, - }, - lutimes: { - [READ]: { supported: ["14.5.0", "12.19.0"] }, - }, - lutimesSync: { - [READ]: { supported: ["14.5.0", "12.19.0"] }, - }, - opendir: { - [READ]: { supported: ["12.12.0"] }, - }, - opendirSync: { - [READ]: { supported: ["12.12.0"] }, - }, - rm: { - [READ]: { supported: ["14.14.0"] }, - }, - rmSync: { - [READ]: { supported: ["14.14.0"] }, - }, - read: { - [READ]: { supported: ["13.11.0", "12.17.0"] }, - }, - readSync: { - [READ]: { supported: ["13.11.0", "12.17.0"] }, - }, - Dir: { - [READ]: { supported: ["12.12.0"] }, - }, - StatWatcher: { - [READ]: { supported: ["14.3.0", "12.20.0"] }, - }, - }, - "fs/promises": { - [READ]: { - supported: ["14.0.0"], - }, - }, - http2: { - [READ]: { - supported: ["10.10.0", "8.13.0"], - experimental: "8.4.0", - }, - }, - inspector: { - [READ]: { supported: null, experimental: "8.0.0" }, - }, - module: { - Module: { - builtinModules: { - [READ]: { - supported: ["9.3.0", "6.13.0", "8.10.0"], - }, - }, - createRequireFromPath: { [READ]: { supported: ["10.12.0"] } }, - createRequire: { [READ]: { supported: ["12.2.0"] } }, - syncBuiltinESMExports: { [READ]: { supported: ["12.12.0"] } }, - }, - builtinModules: { - [READ]: { - supported: ["9.3.0", "6.13.0", "8.10.0"], - }, - }, - createRequireFromPath: { [READ]: { supported: ["10.12.0"] } }, - createRequire: { [READ]: { supported: ["12.2.0"] } }, - syncBuiltinESMExports: { [READ]: { supported: ["12.12.0"] } }, - }, - os: { - constants: { - [READ]: { supported: ["6.3.0"] }, - priority: { [READ]: { supported: ["10.10.0"] } }, - }, - getPriority: { [READ]: { supported: ["10.10.0"] } }, - homedir: { [READ]: { supported: ["2.3.0"] } }, - setPriority: { [READ]: { supported: ["10.10.0"] } }, - userInfo: { [READ]: { supported: ["6.0.0"] } }, - }, - path: { - toNamespacedPath: { [READ]: { supported: ["9.0.0"] } }, - }, - perf_hooks: { - [READ]: { supported: ["8.5.0"] }, - monitorEventLoopDelay: { [READ]: { supported: ["11.10.0"] } }, - }, - process: { - allowedNodeEnvironmentFlags: { [READ]: { supported: ["10.10.0"] } }, - argv0: { [READ]: { supported: ["6.4.0"] } }, - channel: { [READ]: { supported: ["7.1.0"] } }, - cpuUsage: { [READ]: { supported: ["6.1.0"] } }, - emitWarning: { [READ]: { supported: ["6.0.0"] } }, - getegid: { [READ]: { supported: ["2.0.0"] } }, - geteuid: { [READ]: { supported: ["2.0.0"] } }, - hasUncaughtExceptionCaptureCallback: { - [READ]: { supported: ["9.3.0"] }, - }, - hrtime: { - bigint: { [READ]: { supported: ["10.7.0"] } }, - }, - ppid: { - [READ]: { - supported: ["9.2.0", "6.13.0", "8.10.0"], - }, - }, - release: { [READ]: { supported: ["3.0.0"] } }, - report: { - [READ]: { supported: ["14.0.0"], experimental: "11.8.0" }, - }, - resourceUsage: { [READ]: { supported: ["12.6.0"] } }, - setegid: { [READ]: { supported: ["2.0.0"] } }, - seteuid: { [READ]: { supported: ["2.0.0"] } }, - setUncaughtExceptionCaptureCallback: { - [READ]: { supported: ["9.3.0"] }, - }, - stdout: { - getColorDepth: { [READ]: { supported: ["9.9.0"] } }, - hasColor: { [READ]: { supported: ["11.13.0"] } }, - }, - stderr: { - getColorDepth: { [READ]: { supported: ["9.9.0"] } }, - hasColor: { [READ]: { supported: ["11.13.0"] } }, - }, - }, - stream: { - Readable: { - from: { - [READ]: { supported: ["12.3.0", "10.17.0"] }, - }, - }, - finished: { [READ]: { supported: ["10.0.0"] } }, - pipeline: { [READ]: { supported: ["10.0.0"] } }, - }, - trace_events: { - [READ]: { supported: ["10.0.0"] }, - }, - url: { - URL: { [READ]: { supported: ["7.0.0", "6.13.0"] } }, - URLSearchParams: { - [READ]: { supported: ["7.5.0", "6.13.0"] }, - }, - domainToASCII: { [READ]: { supported: ["7.4.0"] } }, - domainToUnicode: { [READ]: { supported: ["7.4.0"] } }, - }, - util: { - callbackify: { [READ]: { supported: ["8.2.0"] } }, - formatWithOptions: { [READ]: { supported: ["10.0.0"] } }, - getSystemErrorName: { - [READ]: { supported: ["9.7.0", "8.12.0"] }, - }, - inspect: { - custom: { [READ]: { supported: ["6.6.0"] } }, - defaultOptions: { [READ]: { supported: ["6.4.0"] } }, - replDefaults: { [READ]: { supported: ["11.12.0"] } }, - }, - isDeepStrictEqual: { [READ]: { supported: ["9.0.0"] } }, - promisify: { [READ]: { supported: ["8.0.0"] } }, - TextDecoder: { - [READ]: { supported: ["8.9.0"], experimental: "8.3.0" }, - }, - TextEncoder: { - [READ]: { supported: ["8.9.0"], experimental: "8.3.0" }, - }, - types: { - [READ]: { supported: ["10.0.0"] }, - isBoxedPrimitive: { [READ]: { supported: ["10.11.0"] } }, - }, - }, - v8: { - [READ]: { supported: ["1.0.0"] }, - DefaultDeserializer: { [READ]: { supported: ["8.0.0"] } }, - DefaultSerializer: { [READ]: { supported: ["8.0.0"] } }, - Deserializer: { [READ]: { supported: ["8.0.0"] } }, - Serializer: { [READ]: { supported: ["8.0.0"] } }, - cachedDataVersionTag: { [READ]: { supported: ["8.0.0"] } }, - deserialize: { [READ]: { supported: ["8.0.0"] } }, - getHeapCodeStatistics: { [READ]: { supported: ["12.8.0"] } }, - getHeapSnapshot: { [READ]: { supported: ["11.13.0"] } }, - getHeapSpaceStatistics: { [READ]: { supported: ["6.0.0"] } }, - serialize: { [READ]: { supported: ["8.0.0"] } }, - writeHeapSnapshot: { [READ]: { supported: ["11.13.0"] } }, - }, - vm: { - Module: { [READ]: { supported: ["9.6.0"] } }, - compileFunction: { [READ]: { supported: ["10.10.0"] } }, - }, - worker_threads: { - [READ]: { supported: ["12.11.0"], experimental: "10.5.0" }, - }, - }, + modules: NodeBuiltinModules, } Object.assign(trackMap.globals, { Buffer: trackMap.modules.buffer.Buffer, @@ -366,8 +51,6 @@ Object.assign(trackMap.globals, { process: trackMap.modules.process, }) -trackMap.modules = extendTrackMapWithNodePrefix(trackMap.modules) - module.exports = { meta: { docs: { diff --git a/lib/unsupported-features/node-builtins-modules/assert.js b/lib/unsupported-features/node-builtins-modules/assert.js new file mode 100644 index 00000000..7584c0d3 --- /dev/null +++ b/lib/unsupported-features/node-builtins-modules/assert.js @@ -0,0 +1,64 @@ +const { READ } = require("@eslint-community/eslint-utils") + +/** @type {import('../types.js').SupportVersionTree} */ +const assert = { + assert: { [READ]: { supported: ["0.5.9"] } }, + deepEqual: { [READ]: { supported: ["0.1.21"] } }, + deepStrictEqual: { [READ]: { supported: ["1.2.0"] } }, + doesNotMatch: { + [READ]: { + experimental: ["13.6.0", "12.16.0"], + supported: ["16.0.0"], + }, + }, + doesNotReject: { [READ]: { supported: ["10.0.0"] } }, + doesNotThrow: { [READ]: { supported: ["0.1.21"] } }, + equal: { [READ]: { supported: ["0.1.21"] } }, + fail: { [READ]: { supported: ["0.1.21"] } }, + ifError: { [READ]: { supported: ["0.1.97"] } }, + match: { + [READ]: { + experimental: ["13.6.0", "12.16.0"], + supported: ["16.0.0"], + }, + }, + notDeepEqual: { [READ]: { supported: ["0.1.21"] } }, + notDeepStrictEqual: { [READ]: { supported: ["1.2.0"] } }, + notEqual: { [READ]: { supported: ["0.1.21"] } }, + notStrictEqual: { [READ]: { supported: ["0.1.21"] } }, + ok: { [READ]: { supported: ["0.1.21"] } }, + rejects: { [READ]: { supported: ["10.0.0"] } }, + strictEqual: { [READ]: { supported: ["0.1.21"] } }, + throws: { [READ]: { supported: ["0.1.21"] } }, + CallTracker: { + [READ]: { + experimental: ["14.2.0", "12.19.0"], + deprecated: ["20.1.0"], + }, + }, +} + +assert.strict = { + [READ]: { supported: ["9.9.0", "8.13.0"] }, + ...assert, +} + +/** @type {import('../types.js').SupportVersionTree} */ +module.exports = { + assert: { + [READ]: { supported: ["0.1.21"] }, + ...assert, + }, + "node:assert": { + [READ]: { supported: ["14.13.1", "12.20.0"] }, + ...assert, + }, + "assert/strict": { + [READ]: { supported: ["15.0.0"] }, + ...assert.strict, + }, + "node:assert/strict": { + [READ]: { supported: ["15.0.0"] }, + ...assert.strict, + }, +} diff --git a/lib/unsupported-features/node-builtins-modules/async_hooks.js b/lib/unsupported-features/node-builtins-modules/async_hooks.js new file mode 100644 index 00000000..0048b57e --- /dev/null +++ b/lib/unsupported-features/node-builtins-modules/async_hooks.js @@ -0,0 +1,42 @@ +const { READ } = require("@eslint-community/eslint-utils") + +/** @type {import('../types.js').SupportVersionTree} */ +const async_hooks = { + createHook: { [READ]: { experimental: ["8.1.0"] } }, + executionAsyncResource: { [READ]: { experimental: ["13.9.0", "12.17.0"] } }, + executionAsyncId: { [READ]: { experimental: ["8.1.0"] } }, + triggerAsyncId: { [READ]: { experimental: ["8.1.0"] } }, + AsyncLocalStorage: { + [READ]: { + experimental: ["13.10.0", "12.17.0"], + supported: ["16.4.0"], + }, + bind: { [READ]: { experimental: ["19.8.0", "18.16.0"] } }, + snapshot: { [READ]: { experimental: ["19.8.0", "18.16.0"] } }, + }, + AsyncResource: { + [READ]: { + experimental: ["9.6.0", "8.12.0"], + supported: ["16.4.0"], + }, + bind: { [READ]: { supported: ["14.8.0", "12.19.0"] } }, + }, +} + +/** @type {import('../types.js').SupportVersionTree} */ +module.exports = { + async_hooks: { + [READ]: { + experimental: ["8.1.0"], + supported: ["16.4.0"], + }, + ...async_hooks, + }, + "node:async_hooks": { + [READ]: { + experimental: ["14.13.1", "12.20.0"], + supported: ["16.4.0"], + }, + ...async_hooks, + }, +} diff --git a/lib/unsupported-features/node-builtins-modules/buffer.js b/lib/unsupported-features/node-builtins-modules/buffer.js new file mode 100644 index 00000000..b041d1f7 --- /dev/null +++ b/lib/unsupported-features/node-builtins-modules/buffer.js @@ -0,0 +1,53 @@ +const { READ } = require("@eslint-community/eslint-utils") + +/** @type {import('../types.js').SupportVersionTree} */ +const buffer = { + constants: { [READ]: { supported: ["8.2.0"] } }, + INSPECT_MAX_BYTES: { [READ]: { supported: ["0.5.4"] } }, + kMaxLength: { [READ]: { supported: ["3.0.0"] } }, + kStringMaxLength: { [READ]: { supported: ["3.0.0"] } }, + atob: { [READ]: { supported: ["15.13.0", "14.17.0"] } }, + btoa: { [READ]: { supported: ["15.13.0", "14.17.0"] } }, + isAscii: { [READ]: { supported: ["19.6.0", "18.15.0"] } }, + isUtf8: { [READ]: { supported: ["19.4.0", "18.14.0"] } }, + resolveObjectURL: { [READ]: { experimental: ["16.7.0"] } }, + transcode: { [READ]: { supported: ["7.1.0"] } }, + SlowBuffer: { [READ]: { supported: ["0.1.90"], deprecated: ["6.0.0"] } }, + Blob: { + [READ]: { + experimental: ["15.7.0", "14.18.0"], + supported: ["18.0.0", "16.17.0"], + }, + }, + Buffer: { + [READ]: { supported: ["0.1.90"] }, + alloc: { [READ]: { supported: ["5.10.0", "4.5.0"] } }, + allocUnsafe: { [READ]: { supported: ["5.10.0", "4.5.0"] } }, + allocUnsafeSlow: { [READ]: { supported: ["5.12.0", "4.5.0"] } }, + byteLength: { [READ]: { supported: ["0.1.90"] } }, + compare: { [READ]: { supported: ["0.11.13"] } }, + concat: { [READ]: { supported: ["0.7.11"] } }, + copyBytesFrom: { [READ]: { supported: ["19.8.0", "18.16.0"] } }, + from: { [READ]: { supported: ["5.10.0", "4.5.0"] } }, + isBuffer: { [READ]: { supported: ["0.1.101"] } }, + isEncoding: { [READ]: { supported: ["0.9.1"] } }, + }, + File: { + [READ]: { + experimental: ["19.2.0", "18.13.0"], + supported: ["20.0.0"], + }, + }, +} + +/** @type {import('../types.js').SupportVersionTree} */ +module.exports = { + buffer: { + [READ]: { supported: ["0.1.90"] }, + ...buffer, + }, + "node:buffer": { + [READ]: { supported: ["14.13.1", "12.20.0"] }, + ...buffer, + }, +} diff --git a/lib/unsupported-features/node-builtins-modules/child_process.js b/lib/unsupported-features/node-builtins-modules/child_process.js new file mode 100644 index 00000000..8618ca0c --- /dev/null +++ b/lib/unsupported-features/node-builtins-modules/child_process.js @@ -0,0 +1,25 @@ +const { READ } = require("@eslint-community/eslint-utils") + +/** @type {import('../types.js').SupportVersionTree} */ +const child_process = { + exec: { [READ]: { supported: ["0.1.90"] } }, + execFile: { [READ]: { supported: ["0.1.91"] } }, + fork: { [READ]: { supported: ["0.5.0"] } }, + spawn: { [READ]: { supported: ["0.1.90"] } }, + execFileSync: { [READ]: { supported: ["0.11.12"] } }, + execSync: { [READ]: { supported: ["0.11.12"] } }, + spawnSync: { [READ]: { supported: ["0.11.12"] } }, + ChildProcess: { [READ]: { supported: ["2.2.0"] } }, +} + +/** @type {import('../types.js').SupportVersionTree} */ +module.exports = { + child_process: { + [READ]: { supported: ["0.1.90"] }, + ...child_process, + }, + "node:child_process": { + [READ]: { supported: ["14.13.1", "12.20.0"] }, + ...child_process, + }, +} diff --git a/lib/unsupported-features/node-builtins-modules/cluster.js b/lib/unsupported-features/node-builtins-modules/cluster.js new file mode 100644 index 00000000..cf4004b1 --- /dev/null +++ b/lib/unsupported-features/node-builtins-modules/cluster.js @@ -0,0 +1,29 @@ +const { READ } = require("@eslint-community/eslint-utils") + +/** @type {import('../types.js').SupportVersionTree} */ +const cluster = { + isMaster: { [READ]: { supported: ["0.8.1"], deprecated: ["16.0.0"] } }, + isPrimary: { [READ]: { supported: ["16.0.0"] } }, + isWorker: { [READ]: { supported: ["0.6.0"] } }, + schedulingPolicy: { [READ]: { supported: ["0.11.2"] } }, + settings: { [READ]: { supported: ["0.7.1"] } }, + worker: { [READ]: { supported: ["0.7.0"] } }, + workers: { [READ]: { supported: ["0.7.0"] } }, + disconnect: { [READ]: { supported: ["0.7.7"] } }, + fork: { [READ]: { supported: ["0.6.0"] } }, + setupMaster: { [READ]: { supported: ["0.7.1"], deprecated: ["16.0.0"] } }, + setupPrimary: { [READ]: { supported: ["16.0.0"] } }, + Worker: { [READ]: { supported: ["0.7.0"] } }, +} + +/** @type {import('../types.js').SupportVersionTree} */ +module.exports = { + cluster: { + [READ]: { supported: ["0.7.0"] }, + ...cluster, + }, + "node:cluster": { + [READ]: { supported: ["14.13.1", "12.20.0"] }, + ...cluster, + }, +} diff --git a/lib/unsupported-features/node-builtins-modules/console.js b/lib/unsupported-features/node-builtins-modules/console.js new file mode 100644 index 00000000..4359a147 --- /dev/null +++ b/lib/unsupported-features/node-builtins-modules/console.js @@ -0,0 +1,45 @@ +const { READ } = require("@eslint-community/eslint-utils") + +/** @type {import('../types.js').SupportVersionTree} */ +const console = { + profile: { [READ]: { supported: ["8.0.0"] } }, + profileEnd: { [READ]: { supported: ["8.0.0"] } }, + timeStamp: { [READ]: { supported: ["8.0.0"] } }, + Console: { [READ]: { supported: ["0.1.100"] } }, + assert: { [READ]: { supported: ["0.1.101"] } }, + clear: { [READ]: { supported: ["8.3.0", "6.13.0"] } }, + count: { [READ]: { supported: ["8.3.0", "6.13.0"] } }, + countReset: { [READ]: { supported: ["8.3.0", "6.13.0"] } }, + debug: { [READ]: { supported: ["8.0.0"] } }, + dir: { [READ]: { supported: ["0.1.101"] } }, + dirxml: { [READ]: { supported: ["8.0.0"] } }, + error: { [READ]: { supported: ["0.1.100"] } }, + group: { [READ]: { supported: ["8.5.0"] } }, + groupCollapsed: { [READ]: { supported: ["8.5.0"] } }, + groupEnd: { [READ]: { supported: ["8.5.0"] } }, + info: { [READ]: { supported: ["0.1.100"] } }, + log: { [READ]: { supported: ["0.1.100"] } }, + table: { [READ]: { supported: ["10.0.0"] } }, + time: { [READ]: { supported: ["0.1.104"] } }, + timeEnd: { [READ]: { supported: ["0.1.104"] } }, + timeLog: { [READ]: { supported: ["10.7.0"] } }, + trace: { [READ]: { supported: ["0.1.104"] } }, + warn: { [READ]: { supported: ["0.1.100"] } }, + + // In original but cant find + // markTimeline: { [READ]: { supported: ["8.0.0"] } }, + // timeline: { [READ]: { supported: ["8.0.0"] } }, + // timelineEnd: { [READ]: { supported: ["8.0.0"] } }, +} + +/** @type {import('../types.js').SupportVersionTree} */ +module.exports = { + console: { + [READ]: { supported: ["0.1.100"] }, + ...console, + }, + "node:console": { + [READ]: { supported: ["14.13.1", "12.20.0"] }, + ...console, + }, +} diff --git a/lib/unsupported-features/node-builtins-modules/crypto.js b/lib/unsupported-features/node-builtins-modules/crypto.js new file mode 100644 index 00000000..d6ff2c6e --- /dev/null +++ b/lib/unsupported-features/node-builtins-modules/crypto.js @@ -0,0 +1,127 @@ +const { READ } = require("@eslint-community/eslint-utils") + +/** @type {import('../types.js').SupportVersionTree} */ +const WebCrypto = { + [READ]: { experimental: ["15.0.0"], supported: ["19.0.0"] }, + subtle: { + [READ]: { supported: ["15.0.0"] }, + decrypt: { [READ]: { supported: ["15.0.0"] } }, + deriveBits: { [READ]: { supported: ["15.0.0"] } }, + deriveKey: { [READ]: { supported: ["15.0.0"] } }, + digest: { [READ]: { supported: ["15.0.0"] } }, + encrypt: { [READ]: { supported: ["15.0.0"] } }, + exportKey: { [READ]: { supported: ["15.0.0"] } }, + generateKey: { [READ]: { supported: ["15.0.0"] } }, + importKey: { [READ]: { supported: ["15.0.0"] } }, + sign: { [READ]: { supported: ["15.0.0"] } }, + unwrapKey: { [READ]: { supported: ["15.0.0"] } }, + verify: { [READ]: { supported: ["15.0.0"] } }, + wrapKey: { [READ]: { supported: ["15.0.0"] } }, + }, + getRandomValues: { [READ]: { supported: ["15.0.0"] } }, + randomUUID: { [READ]: { supported: ["16.7.0"] } }, +} + +/** @type {import('../types.js').SupportVersionTree} */ +const crypto = { + constants: { [READ]: { supported: ["6.3.0"] } }, + fips: { [READ]: { supported: ["6.0.0"], deprecated: ["10.0.0"] } }, + + webcrypto: WebCrypto, + subtle: { + ...WebCrypto.subtle, + [READ]: { experimental: ["17.4.0"], supported: ["19.0.0"] }, + }, + + // methods and properties + checkPrime: { [READ]: { supported: ["15.8.0"] } }, + checkPrimeSync: { [READ]: { supported: ["15.8.0"] } }, + createCipher: { [READ]: { supported: ["0.1.94"], deprecated: ["10.0.0"] } }, + createCipheriv: { [READ]: { supported: ["0.1.94"] } }, + createDecipher: { + [READ]: { supported: ["0.1.94"], deprecated: ["10.0.0"] }, + }, + createDecipheriv: { [READ]: { supported: ["0.1.94"] } }, + createDiffieHellman: { [READ]: { supported: ["0.11.12"] } }, + createDiffieHellmanGroup: { [READ]: { supported: ["0.9.3"] } }, + createECDH: { [READ]: { supported: ["0.11.14"] } }, + createHash: { [READ]: { supported: ["0.1.92"] } }, + createHmac: { [READ]: { supported: ["0.1.94"] } }, + createPrivateKey: { [READ]: { supported: ["11.6.0"] } }, + createPublicKey: { [READ]: { supported: ["11.6.0"] } }, + createSecretKey: { [READ]: { supported: ["11.6.0"] } }, + createSign: { [READ]: { supported: ["0.1.92"] } }, + createVerify: { [READ]: { supported: ["0.1.92"] } }, + diffieHellman: { [READ]: { supported: ["13.9.0", "12.17.0"] } }, + generateKey: { [READ]: { supported: ["15.0.0"] } }, + generateKeyPair: { [READ]: { supported: ["10.12.0"] } }, + generateKeyPairSync: { [READ]: { supported: ["10.12.0"] } }, + generateKeySync: { [READ]: { supported: ["15.0.0"] } }, + generatePrime: { [READ]: { supported: ["15.8.0"] } }, + generatePrimeSync: { [READ]: { supported: ["15.8.0"] } }, + getCipherInfo: { [READ]: { supported: ["15.0.0"] } }, + getCiphers: { [READ]: { supported: ["0.9.3"] } }, + getCurves: { [READ]: { supported: ["2.3.0"] } }, + getDiffieHellman: { [READ]: { supported: ["0.7.5"] } }, + getFips: { [READ]: { supported: ["10.0.0"] } }, + getHashes: { [READ]: { supported: ["0.9.3"] } }, + getRandomValues: { [READ]: { supported: ["17.4.0"] } }, + hkdf: { [READ]: { supported: ["15.0.0"] } }, + hkdfSync: { [READ]: { supported: ["15.0.0"] } }, + pbkdf2: { [READ]: { supported: ["0.5.5"] } }, + pbkdf2Sync: { [READ]: { supported: ["0.9.3"] } }, + privateDecrypt: { [READ]: { supported: ["0.11.14"] } }, + privateEncrypt: { [READ]: { supported: ["1.1.0"] } }, + publicDecrypt: { [READ]: { supported: ["1.1.0"] } }, + publicEncrypt: { [READ]: { supported: ["0.11.14"] } }, + randomBytes: { [READ]: { supported: ["0.5.8"] } }, + randomFillSync: { [READ]: { supported: ["7.10.0", "6.13.0"] } }, + randomFill: { [READ]: { supported: ["7.10.0", "6.13.0"] } }, + randomInt: { [READ]: { supported: ["14.10.0", "12.19.0"] } }, + randomUUID: { [READ]: { supported: ["15.6.0", "14.17.0"] } }, + scrypt: { [READ]: { supported: ["10.5.0"] } }, + scryptSync: { [READ]: { supported: ["10.5.0"] } }, + secureHeapUsed: { [READ]: { supported: ["15.6.0"] } }, + setEngine: { [READ]: { supported: ["0.11.11"] } }, + setFips: { [READ]: { supported: ["10.0.0"] } }, + sign: { [READ]: { supported: ["12.0.0"] } }, + timingSafeEqual: { [READ]: { supported: ["6.6.0"] } }, + verify: { [READ]: { supported: ["12.0.0"] } }, + + // Classes + Certificate: { + [READ]: { supported: ["0.11.8"] }, + exportChallenge: { [READ]: { supported: ["9.0.0"] } }, + exportPublicKey: { [READ]: { supported: ["9.0.0"] } }, + verifySpkac: { [READ]: { supported: ["9.0.0"] } }, + }, + Cipher: { [READ]: { supported: ["0.1.94"] } }, + Decipher: { [READ]: { supported: ["0.1.94"] } }, + DiffieHellman: { [READ]: { supported: ["0.5.0"] } }, + DiffieHellmanGroup: { [READ]: { supported: ["0.7.5"] } }, + ECDH: { + [READ]: { supported: ["0.11.14"] }, + convertKey: { [READ]: { supported: ["10.0.0"] } }, + }, + Hash: { [READ]: { supported: ["0.1.92"] } }, + Hmac: { [READ]: { supported: ["0.1.94"] } }, + KeyObject: { + [READ]: { supported: ["11.6.0"] }, + from: { [READ]: { supported: ["15.0.0"] } }, + }, + Sign: { [READ]: { supported: ["0.1.92"] } }, + Verify: { [READ]: { supported: ["0.1.92"] } }, + X509Certificate: { [READ]: { supported: ["15.6.0"] } }, +} + +/** @type {import('../types.js').SupportVersionTree} */ +module.exports = { + crypto: { + [READ]: { supported: ["0.1.92"] }, + ...crypto, + }, + "node:crypto": { + [READ]: { supported: ["14.13.1", "12.20.0"] }, + ...crypto, + }, +} diff --git a/lib/unsupported-features/node-builtins-modules/dgram.js b/lib/unsupported-features/node-builtins-modules/dgram.js new file mode 100644 index 00000000..cffc4f3e --- /dev/null +++ b/lib/unsupported-features/node-builtins-modules/dgram.js @@ -0,0 +1,19 @@ +const { READ } = require("@eslint-community/eslint-utils") + +/** @type {import('../types.js').SupportVersionTree} */ +const dgram = { + createSocket: { [READ]: { supported: ["0.1.99"] } }, + Socket: { [READ]: { supported: ["0.1.99"] } }, +} + +/** @type {import('../types.js').SupportVersionTree} */ +module.exports = { + dgram: { + [READ]: { supported: ["0.1.99"] }, + ...dgram, + }, + "node:dgram": { + [READ]: { supported: ["14.13.1", "12.20.0"] }, + ...dgram, + }, +} diff --git a/lib/unsupported-features/node-builtins-modules/diagnostics_channel.js b/lib/unsupported-features/node-builtins-modules/diagnostics_channel.js new file mode 100644 index 00000000..5ae74310 --- /dev/null +++ b/lib/unsupported-features/node-builtins-modules/diagnostics_channel.js @@ -0,0 +1,30 @@ +const { READ } = require("@eslint-community/eslint-utils") + +/** @type {import('../types.js').SupportVersionTree} */ +const diagnostics_channel = { + hasSubscribers: { [READ]: { supported: ["15.1.0", "14.17.0"] } }, + channel: { [READ]: { supported: ["15.1.0", "14.17.0"] } }, + subscribe: { [READ]: { supported: ["18.7.0", "16.17.0"] } }, + unsubscribe: { [READ]: { supported: ["18.7.0", "16.17.0"] } }, + tracingChannel: { [READ]: { experimental: ["19.9.0"] } }, + Channel: { [READ]: { supported: ["15.1.0", "14.17.0"] } }, + TracingChannel: { [READ]: { experimental: ["19.9.0"] } }, +} + +/** @type {import('../types.js').SupportVersionTree} */ +module.exports = { + diagnostics_channel: { + [READ]: { + experimental: ["15.1.0", "14.17.0"], + supported: ["19.2.0", "18.13.0"], + }, + ...diagnostics_channel, + }, + "node:diagnostics_channel": { + [READ]: { + experimental: ["15.1.0", "14.17.0"], + supported: ["19.2.0", "18.13.0"], + }, + ...diagnostics_channel, + }, +} diff --git a/lib/unsupported-features/node-builtins-modules/dns.js b/lib/unsupported-features/node-builtins-modules/dns.js new file mode 100644 index 00000000..8440ad0c --- /dev/null +++ b/lib/unsupported-features/node-builtins-modules/dns.js @@ -0,0 +1,64 @@ +const { READ } = require("@eslint-community/eslint-utils") + +/** @type {import('../types.js').SupportVersionTree} */ +const dns = { + Resolver: { [READ]: { supported: ["8.3.0"] } }, + getServers: { [READ]: { supported: ["0.11.3"] } }, + lookup: { [READ]: { supported: ["0.1.90"] } }, + lookupService: { [READ]: { supported: ["0.11.14"] } }, + resolve: { [READ]: { supported: ["0.1.27"] } }, + resolve4: { [READ]: { supported: ["0.1.16"] } }, + resolve6: { [READ]: { supported: ["0.1.16"] } }, + resolveAny: { [READ]: { supported: ["0.1.16"] } }, + resolveCname: { [READ]: { supported: ["0.3.2"] } }, + resolveCaa: { [READ]: { supported: ["15.0.0", "14.17.0"] } }, + resolveMx: { [READ]: { supported: ["0.1.27"] } }, + resolveNaptr: { [READ]: { supported: ["0.9.12"] } }, + resolveNs: { [READ]: { supported: ["0.1.90"] } }, + resolvePtr: { [READ]: { supported: ["6.0.0"] } }, + resolveSoa: { [READ]: { supported: ["0.11.10"] } }, + resolveSrv: { [READ]: { supported: ["0.1.27"] } }, + resolveTxt: { [READ]: { supported: ["0.1.27"] } }, + reverse: { [READ]: { supported: ["0.1.16"] } }, + setDefaultResultOrder: { [READ]: { supported: ["16.4.0", "14.18.0"] } }, + getDefaultResultOrder: { [READ]: { supported: ["20.1.0", "18.17.0"] } }, + setServers: { [READ]: { supported: ["0.11.3"] } }, + + promises: { + [READ]: { + experimental: ["10.6.0"], + supported: ["11.14.0", "10.17.0"], + }, + Resolver: { [READ]: { supported: ["10.6.0"] } }, + cancel: { [READ]: { supported: ["15.3.0", "14.17.0"] } }, + getServers: { [READ]: { supported: ["10.6.0"] } }, + lookup: { [READ]: { supported: ["10.6.0"] } }, + lookupService: { [READ]: { supported: ["10.6.0"] } }, + resolve: { [READ]: { supported: ["10.6.0"] } }, + resolve4: { [READ]: { supported: ["10.6.0"] } }, + resolve6: { [READ]: { supported: ["10.6.0"] } }, + resolveAny: { [READ]: { supported: ["10.6.0"] } }, + resolveCaa: { [READ]: { supported: ["15.0.0", "14.17.0"] } }, + resolveCname: { [READ]: { supported: ["10.6.0"] } }, + resolveMx: { [READ]: { supported: ["10.6.0"] } }, + resolveNaptr: { [READ]: { supported: ["10.6.0"] } }, + resolveNs: { [READ]: { supported: ["10.6.0"] } }, + resolvePtr: { [READ]: { supported: ["10.6.0"] } }, + resolveSoa: { [READ]: { supported: ["10.6.0"] } }, + resolveSrv: { [READ]: { supported: ["10.6.0"] } }, + resolveTxt: { [READ]: { supported: ["10.6.0"] } }, + reverse: { [READ]: { supported: ["10.6.0"] } }, + setDefaultResultOrder: { [READ]: { supported: ["16.4.0", "14.18.0"] } }, + getDefaultResultOrder: { [READ]: { supported: ["20.1.0", "18.17.0"] } }, + setServers: { [READ]: { supported: ["10.6.0"] } }, + }, +} + +/** @type {import('../types.js').SupportVersionTree} */ +module.exports = { + dns: { ...dns, [READ]: { supported: ["0.1.16"] } }, + "node:dns": { ...dns, [READ]: { supported: ["14.13.1", "12.20.0"] } }, + + "dns/promises": { ...dns.promises, [READ]: { supported: ["15.0.0"] } }, + "node:dns/promises": { ...dns.promises, [READ]: { supported: ["15.0.0"] } }, +} diff --git a/lib/unsupported-features/node-builtins-modules/domain.js b/lib/unsupported-features/node-builtins-modules/domain.js new file mode 100644 index 00000000..9224614e --- /dev/null +++ b/lib/unsupported-features/node-builtins-modules/domain.js @@ -0,0 +1,18 @@ +const { READ } = require("@eslint-community/eslint-utils") + +/** @type {import('../types.js').SupportVersionTree} */ +const domain = { + create: { [READ]: { supported: ["0.7.8"] } }, + Domain: { [READ]: { supported: ["0.7.8"] } }, +} + +/** @type {import('../types.js').SupportVersionTree} */ +module.exports = { + domain: { + [READ]: { + supported: ["0.7.8"], + deprecated: ["1.4.2"], + }, + ...domain, + }, +} diff --git a/lib/unsupported-features/node-builtins-modules/events.js b/lib/unsupported-features/node-builtins-modules/events.js new file mode 100644 index 00000000..c314e8b0 --- /dev/null +++ b/lib/unsupported-features/node-builtins-modules/events.js @@ -0,0 +1,65 @@ +const { READ } = require("@eslint-community/eslint-utils") + +/** @type {import('../types.js').SupportVersionTree} */ +const static = { + defaultMaxListeners: { [READ]: { supported: ["0.11.2"] } }, + errorMonitor: { [READ]: { supported: ["13.6.0", "12.17.0"] } }, + captureRejections: { + [READ]: { + experimental: ["13.4.0", "12.16.0"], + supported: ["17.4.0", "16.14.0"], + }, + }, + captureRejectionSymbol: { + [READ]: { + experimental: ["13.4.0", "12.16.0"], + supported: ["17.4.0", "16.14.0"], + }, + }, + getEventListeners: { [READ]: { supported: ["15.2.0", "14.17.0"] } }, + getMaxListeners: { [READ]: { supported: ["19.9.0", "18.17.0"] } }, + once: { [READ]: { supported: ["11.13.0", "10.16.0"] } }, + listenerCount: { [READ]: { supported: ["0.9.12"], deprecated: ["3.2.0"] } }, + on: { [READ]: { supported: ["13.6.0", "12.16.0"] } }, + setMaxListeners: { [READ]: { supported: ["15.4.0"] } }, + addAbortListener: { [READ]: { experimental: ["20.5.0", "18.18.0"] } }, +} + +/** @type {import('../types.js').SupportVersionTree} */ +const events = { + Event: { [READ]: { experimental: ["14.5.0"], supported: ["15.4.0"] } }, + EventTarget: { + [READ]: { + experimental: ["14.5.0"], + supported: ["15.4.0"], + }, + }, + CustomEvent: { [READ]: { experimental: ["18.7.0", "16.17.0"] } }, + NodeEventTarget: { + [READ]: { + experimental: ["14.5.0"], + supported: ["15.4.0"], + }, + }, + EventEmitter: { + [READ]: { supported: ["0.1.26"] }, + ...static, + }, + EventEmitterAsyncResource: { + [READ]: { supported: ["17.4.0", "16.14.0"] }, + ...static, + }, + ...static, +} + +/** @type {import('../types.js').SupportVersionTree} */ +module.exports = { + events: { + [READ]: { supported: ["0.1.26"] }, + ...events, + }, + "node:events": { + [READ]: { supported: ["14.13.1", "12.20.0"] }, + ...events, + }, +} diff --git a/lib/unsupported-features/node-builtins-modules/fs.js b/lib/unsupported-features/node-builtins-modules/fs.js new file mode 100644 index 00000000..4741dee0 --- /dev/null +++ b/lib/unsupported-features/node-builtins-modules/fs.js @@ -0,0 +1,187 @@ +const { READ } = require("@eslint-community/eslint-utils") + +/** @type {import('../types.js').SupportVersionTree} */ +const promises_api = { + constants: { [READ]: { supported: ["18.4.0", "16.17.0"] } }, + access: { [READ]: { supported: ["10.0.0"] } }, + appendFile: { [READ]: { supported: ["10.0.0"] } }, + chmod: { [READ]: { supported: ["10.0.0"] } }, + chown: { [READ]: { supported: ["10.0.0"] } }, + copyFile: { [READ]: { supported: ["10.0.0"] } }, + cp: { [READ]: { experimental: ["16.7.0"] } }, + lchmod: { [READ]: { supported: ["10.0.0"], deprecated: ["10.0.0"] } }, + lchown: { [READ]: { supported: ["10.0.0"] } }, + lutimes: { [READ]: { supported: ["14.5.0", "12.19.0"] } }, + link: { [READ]: { supported: ["10.0.0"] } }, + lstat: { [READ]: { supported: ["10.0.0"] } }, + mkdir: { [READ]: { supported: ["10.0.0"] } }, + mkdtemp: { [READ]: { supported: ["10.0.0"] } }, + open: { [READ]: { supported: ["10.0.0"] } }, + opendir: { [READ]: { supported: ["12.12.0"] } }, + readdir: { [READ]: { supported: ["10.0.0"] } }, + readFile: { [READ]: { supported: ["10.0.0"] } }, + readlink: { [READ]: { supported: ["10.0.0"] } }, + realpath: { [READ]: { supported: ["10.0.0"] } }, + rename: { [READ]: { supported: ["10.0.0"] } }, + rmdir: { [READ]: { supported: ["10.0.0"] } }, + rm: { [READ]: { supported: ["14.14.0"] } }, + stat: { [READ]: { supported: ["10.0.0"] } }, + statfs: { [READ]: { supported: ["19.6.0", "18.15.0"] } }, + symlink: { [READ]: { supported: ["10.0.0"] } }, + truncate: { [READ]: { supported: ["10.0.0"] } }, + unlink: { [READ]: { supported: ["10.0.0"] } }, + utimes: { [READ]: { supported: ["10.0.0"] } }, + watch: { [READ]: { supported: ["15.9.0", "14.18.0"] } }, + writeFile: { [READ]: { supported: ["10.0.0"] } }, + FileHandle: { [READ]: { supported: ["10.0.0"] } }, +} + +/** @type {import('../types.js').SupportVersionTree} */ +const callback_api = { + access: { [READ]: { supported: ["0.11.15"] } }, + appendFile: { [READ]: { supported: ["0.6.7"] } }, + chmod: { [READ]: { supported: ["0.1.30"] } }, + chown: { [READ]: { supported: ["0.1.97"] } }, + close: { [READ]: { supported: ["0.0.2"] } }, + copyFile: { [READ]: { supported: ["8.5.0"] } }, + cp: { [READ]: { 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"] } }, + fchmod: { [READ]: { supported: ["0.4.7"] } }, + fchown: { [READ]: { supported: ["0.4.7"] } }, + fdatasync: { [READ]: { supported: ["0.1.96"] } }, + fstat: { [READ]: { supported: ["0.1.95"] } }, + fsync: { [READ]: { supported: ["0.1.96"] } }, + ftruncate: { [READ]: { supported: ["0.8.6"] } }, + futimes: { [READ]: { supported: ["0.4.2"] } }, + lchmod: { [READ]: { supported: ["0.1.8"], deprecated: ["0.4.7"] } }, + lchown: { [READ]: { supported: ["0.1.8"] } }, + lutimes: { [READ]: { supported: ["14.5.0", "12.19.0"] } }, + link: { [READ]: { supported: ["0.1.31"] } }, + lstat: { [READ]: { supported: ["0.1.30"] } }, + mkdir: { [READ]: { supported: ["0.1.8"] } }, + mkdtemp: { [READ]: { supported: ["5.10.0"] } }, + open: { [READ]: { supported: ["0.0.2"] } }, + openAsBlob: { [READ]: { experimental: ["19.8.0"] } }, + opendir: { [READ]: { supported: ["12.12.0"] } }, + read: { [READ]: { supported: ["0.0.2"] } }, + readdir: { [READ]: { supported: ["0.1.8"] } }, + readFile: { [READ]: { supported: ["0.1.29"] } }, + readlink: { [READ]: { supported: ["0.1.31"] } }, + readv: { [READ]: { supported: ["13.13.0", "12.17.0"] } }, + realpath: { + [READ]: { supported: ["0.1.31"] }, + native: { [READ]: { supported: ["9.2.0"] } }, + }, + native: { [READ]: { supported: ["9.2.0"] } }, + rename: { [READ]: { supported: ["0.0.2"] } }, + rmdir: { [READ]: { supported: ["0.0.2"] } }, + rm: { [READ]: { supported: ["14.14.0"] } }, + stat: { [READ]: { supported: ["0.0.2"] } }, + statfs: { [READ]: { supported: ["19.6.0", "18.15.0"] } }, + symlink: { [READ]: { supported: ["0.1.31"] } }, + truncate: { [READ]: { supported: ["0.8.6"] } }, + unlink: { [READ]: { supported: ["0.0.2"] } }, + unwatchFile: { [READ]: { supported: ["0.1.31"] } }, + utimes: { [READ]: { supported: ["0.4.2"] } }, + watch: { [READ]: { supported: ["0.5.10"] } }, + watchFile: { [READ]: { supported: ["0.1.31"] } }, + write: { [READ]: { supported: ["0.0.2"] } }, + writeFile: { [READ]: { supported: ["0.1.29"] } }, + writev: { [READ]: { supported: ["12.9.0"] } }, +} + +/** @type {import('../types.js').SupportVersionTree} */ +const synchronous_api = { + accessSync: { [READ]: { supported: ["0.11.15"] } }, + appendFileSync: { [READ]: { supported: ["0.6.7"] } }, + chmodSync: { [READ]: { supported: ["0.6.7"] } }, + chownSync: { [READ]: { supported: ["0.1.97"] } }, + closeSync: { [READ]: { supported: ["0.1.21"] } }, + copyFileSync: { [READ]: { supported: ["8.5.0"] } }, + cpSync: { [READ]: { experimental: ["16.7.0"] } }, + existsSync: { [READ]: { supported: ["0.1.21"] } }, + fchmodSync: { [READ]: { supported: ["0.4.7"] } }, + fchownSync: { [READ]: { supported: ["0.4.7"] } }, + fdatasyncSync: { [READ]: { supported: ["0.1.96"] } }, + fstatSync: { [READ]: { supported: ["0.1.95"] } }, + fsyncSync: { [READ]: { supported: ["0.1.96"] } }, + ftruncateSync: { [READ]: { supported: ["0.8.6"] } }, + futimesSync: { [READ]: { supported: ["0.4.2"] } }, + lchmodSync: { [READ]: { supported: ["0.1.8"], deprecated: ["0.4.7"] } }, + lchownSync: { [READ]: { supported: ["0.1.8"] } }, + lutimesSync: { [READ]: { supported: ["14.5.0", "12.19.0"] } }, + linkSync: { [READ]: { supported: ["0.1.31"] } }, + lstatSync: { [READ]: { supported: ["0.1.30"] } }, + mkdirSync: { [READ]: { supported: ["0.1.21"] } }, + mkdtempSync: { [READ]: { supported: ["5.10.0"] } }, + opendirSync: { [READ]: { supported: ["12.12.0"] } }, + openSync: { [READ]: { supported: ["0.1.21"] } }, + readdirSync: { [READ]: { supported: ["0.1.21"] } }, + readFileSync: { [READ]: { supported: ["0.1.8"] } }, + readlinkSync: { [READ]: { supported: ["0.1.31"] } }, + readSync: { [READ]: { supported: ["0.1.21"] } }, + readvSync: { [READ]: { supported: ["13.13.0", "12.17.0"] } }, + realpathSync: { + [READ]: { supported: ["0.1.31"] }, + native: { [READ]: { supported: ["9.2.0"] } }, + }, + native: { [READ]: { supported: ["9.2.0"] } }, + renameSync: { [READ]: { supported: ["0.1.21"] } }, + rmdirSync: { [READ]: { supported: ["0.1.21"] } }, + rmSync: { [READ]: { supported: ["14.14.0"] } }, + statSync: { [READ]: { supported: ["0.1.21"] } }, + statfsSync: { [READ]: { supported: ["19.6.0", "18.15.0"] } }, + symlinkSync: { [READ]: { supported: ["0.1.31"] } }, + truncateSync: { [READ]: { supported: ["0.8.6"] } }, + unlinkSync: { [READ]: { supported: ["0.1.21"] } }, + utimesSync: { [READ]: { supported: ["0.4.2"] } }, + writeFileSync: { [READ]: { supported: ["0.1.29"] } }, + writeSync: { [READ]: { supported: ["0.1.21"] } }, + writevSync: { [READ]: { supported: ["12.9.0"] } }, +} + +/** @type {import('../types.js').SupportVersionTree} */ +const fs = { + promises: { + [READ]: { + experimental: ["10.0.0"], + supported: ["11.14.0", "10.17.0"], + }, + ...promises_api, + }, + ...callback_api, + ...synchronous_api, + constants: { [READ]: { supported: ["0.1.8"] } }, + Dir: { [READ]: { supported: ["12.12.0"] } }, + Dirent: { [READ]: { supported: ["10.10.0"] } }, + FSWatcher: { [READ]: { supported: ["0.5.8"] } }, + StatWatcher: { [READ]: { supported: ["14.3.0", "12.20.0"] } }, + ReadStream: { [READ]: { supported: ["0.1.93"] } }, + Stats: { [READ]: { supported: ["0.1.21"] } }, + StatFs: { [READ]: { supported: ["19.6.0", "18.15.0"] } }, + WriteStream: { [READ]: { supported: ["0.1.93"] } }, + common_objects: { [READ]: { supported: ["0.1.8"] } }, +} + +/** @type {import('../types.js').SupportVersionTree} */ +module.exports = { + fs: { + [READ]: { supported: ["0.1.8"] }, + ...fs, + }, + "node:fs": { + [READ]: { supported: ["14.13.1", "12.20.0"] }, + ...fs, + }, + + "fs/promises": { + [READ]: { supported: ["14.0.0"] }, + ...promises_api, + }, + "node:fs/promises": { + [READ]: { supported: ["14.13.1"] }, + ...promises_api, + }, +} diff --git a/lib/unsupported-features/node-builtins-modules/http.js b/lib/unsupported-features/node-builtins-modules/http.js new file mode 100644 index 00000000..0c729264 --- /dev/null +++ b/lib/unsupported-features/node-builtins-modules/http.js @@ -0,0 +1,33 @@ +const { READ } = require("@eslint-community/eslint-utils") + +/** @type {import('../types.js').SupportVersionTree} */ +const http = { + METHODS: { [READ]: { supported: ["0.11.8"] } }, + STATUS_CODES: { [READ]: { supported: ["0.1.22"] } }, + globalAgent: { [READ]: { supported: ["0.5.9"] } }, + maxHeaderSize: { [READ]: { supported: ["11.6.0", "10.15.0"] } }, + createServer: { [READ]: { supported: ["0.1.13"] } }, + get: { [READ]: { supported: ["0.3.6"] } }, + request: { [READ]: { supported: ["0.3.6"] } }, + validateHeaderName: { [READ]: { supported: ["14.3.0"] } }, + validateHeaderValue: { [READ]: { supported: ["14.3.0"] } }, + setMaxIdleHTTPParsers: { [READ]: { supported: ["18.8.0", "16.18.0"] } }, + Agent: { [READ]: { supported: ["0.3.4"] } }, + ClientRequest: { [READ]: { supported: ["0.1.17"] } }, + Server: { [READ]: { supported: ["0.1.17"] } }, + ServerResponse: { [READ]: { supported: ["0.1.17"] } }, + IncomingMessage: { [READ]: { supported: ["0.1.17"] } }, + OutgoingMessage: { [READ]: { supported: ["0.1.17"] } }, +} + +/** @type {import('../types.js').SupportVersionTree} */ +module.exports = { + http: { + [READ]: { supported: ["0.0.1"] }, + ...http, + }, + "node:http": { + [READ]: { supported: ["14.13.1", "12.20.0"] }, + ...http, + }, +} diff --git a/lib/unsupported-features/node-builtins-modules/http2.js b/lib/unsupported-features/node-builtins-modules/http2.js new file mode 100644 index 00000000..beeb5628 --- /dev/null +++ b/lib/unsupported-features/node-builtins-modules/http2.js @@ -0,0 +1,38 @@ +const { READ } = require("@eslint-community/eslint-utils") + +/** @type {import('../types.js').SupportVersionTree} */ +const http2 = { + constants: { [READ]: { supported: ["8.4.0"] } }, + sensitiveHeaders: { [READ]: { supported: ["15.0.0", "14.18.0"] } }, + createServer: { [READ]: { supported: ["8.4.0"] } }, + createSecureServer: { [READ]: { supported: ["8.4.0"] } }, + connect: { [READ]: { supported: ["8.4.0"] } }, + getDefaultSettings: { [READ]: { supported: ["8.4.0"] } }, + getPackedSettings: { [READ]: { supported: ["8.4.0"] } }, + getUnpackedSettings: { [READ]: { supported: ["8.4.0"] } }, + Http2Session: { [READ]: { supported: ["8.4.0"] } }, + ServerHttp2Session: { [READ]: { supported: ["8.4.0"] } }, + ClientHttp2Session: { [READ]: { supported: ["8.4.0"] } }, + Http2Stream: { [READ]: { supported: ["8.4.0"] } }, + ClientHttp2Stream: { [READ]: { supported: ["8.4.0"] } }, + ServerHttp2Stream: { [READ]: { supported: ["8.4.0"] } }, + Http2Server: { [READ]: { supported: ["8.4.0"] } }, + Http2SecureServer: { [READ]: { supported: ["8.4.0"] } }, + Http2ServerRequest: { [READ]: { supported: ["8.4.0"] } }, + Http2ServerResponse: { [READ]: { supported: ["8.4.0"] } }, +} + +/** @type {import('../types.js').SupportVersionTree} */ +module.exports = { + http2: { + [READ]: { + experimental: ["8.4.0"], + supported: ["10.10.0", "8.13.0"], + }, + ...http2, + }, + "node:http2": { + [READ]: { supported: ["14.13.1", "12.20.0"] }, + ...http2, + }, +} diff --git a/lib/unsupported-features/node-builtins-modules/https.js b/lib/unsupported-features/node-builtins-modules/https.js new file mode 100644 index 00000000..0972066d --- /dev/null +++ b/lib/unsupported-features/node-builtins-modules/https.js @@ -0,0 +1,23 @@ +const { READ } = require("@eslint-community/eslint-utils") + +/** @type {import('../types.js').SupportVersionTree} */ +const http = { + globalAgent: { [READ]: { supported: ["0.5.9"] } }, + createServer: { [READ]: { supported: ["0.3.4"] } }, + get: { [READ]: { supported: ["0.3.6"] } }, + request: { [READ]: { supported: ["0.3.6"] } }, + Agent: { [READ]: { supported: ["0.4.5"] } }, + Server: { [READ]: { supported: ["0.3.4"] } }, +} + +/** @type {import('../types.js').SupportVersionTree} */ +module.exports = { + http: { + [READ]: { supported: ["0.3.4"] }, + ...http, + }, + "node:http": { + [READ]: { supported: ["14.13.1", "12.20.0"] }, + ...http, + }, +} diff --git a/lib/unsupported-features/node-builtins-modules/inspector.js b/lib/unsupported-features/node-builtins-modules/inspector.js new file mode 100644 index 00000000..21f4fef6 --- /dev/null +++ b/lib/unsupported-features/node-builtins-modules/inspector.js @@ -0,0 +1,46 @@ +const { READ } = require("@eslint-community/eslint-utils") + +/** @type {import('../types.js').SupportVersionTree} */ +const common_objects = { + console: { [READ]: { supported: ["8.0.0"] } }, + close: { [READ]: { supported: ["9.0.0"] } }, + open: { [READ]: { supported: ["8.0.0"] } }, + url: { [READ]: { supported: ["8.0.0"] } }, + waitForDebugger: { [READ]: { supported: ["12.7.0"] } }, +} + +/** @type {import('../types.js').SupportVersionTree} */ +const promises_api = { + Session: { [READ]: { supported: ["19.0.0"] } }, + ...common_objects, +} + +/** @type {import('../types.js').SupportVersionTree} */ +const callback_api = { + Session: { [READ]: { supported: ["8.0.0"] } }, + ...common_objects, +} + +/** @type {import('../types.js').SupportVersionTree} */ +module.exports = { + inspector: { + [READ]: { + experimental: ["8.0.0"], + supported: ["14.0.0"], + }, + ...callback_api, + }, + "node:inspector": { + [READ]: { supported: ["14.13.1", "12.20.0"] }, + ...callback_api, + }, + + "inspector/promises": { + [READ]: { experimental: ["19.0.0"] }, + ...promises_api, + }, + "node:inspector/promises": { + [READ]: { experimental: ["19.0.0"] }, + ...promises_api, + }, +} diff --git a/lib/unsupported-features/node-builtins-modules/module.js b/lib/unsupported-features/node-builtins-modules/module.js new file mode 100644 index 00000000..053ba66b --- /dev/null +++ b/lib/unsupported-features/node-builtins-modules/module.js @@ -0,0 +1,32 @@ +const { READ } = require("@eslint-community/eslint-utils") + +/** @type {import('../types.js').SupportVersionTree} */ +const Module = { + builtinModules: { [READ]: { supported: ["9.3.0", "8.10.0", "6.13.0"] } }, + createRequire: { [READ]: { supported: ["12.2.0"] } }, + createRequireFromPath: { + [READ]: { + supported: ["10.12.0"], + deprecated: ["12.2.0"], + }, + }, + isBuiltin: { [READ]: { supported: ["18.6.0", "16.17.0"] } }, + register: { [READ]: { experimental: ["20.6.0"] } }, + syncBuiltinESMExports: { [READ]: { supported: ["12.12.0"] } }, + findSourceMap: { [READ]: { supported: ["13.7.0", "12.17.0"] } }, + SourceMap: { [READ]: { supported: ["13.7.0", "12.17.0"] } }, +} + +Module.Module = Module + +/** @type {import('../types.js').SupportVersionTree} */ +module.exports = { + module: { + [READ]: { supported: ["0.3.7"] }, + ...Module, + }, + "node:module": { + [READ]: { supported: ["14.13.1", "12.20.0"] }, + ...Module, + }, +} diff --git a/lib/unsupported-features/node-builtins-modules/net.js b/lib/unsupported-features/node-builtins-modules/net.js new file mode 100644 index 00000000..34efe041 --- /dev/null +++ b/lib/unsupported-features/node-builtins-modules/net.js @@ -0,0 +1,35 @@ +const { READ } = require("@eslint-community/eslint-utils") + +/** @type {import('../types.js').SupportVersionTree} */ +const net = { + connect: { [READ]: { supported: ["0.0.1"] } }, + createConnection: { [READ]: { supported: ["0.0.1"] } }, + createServer: { [READ]: { supported: ["0.5.0"] } }, + getDefaultAutoSelectFamily: { [READ]: { supported: ["19.4.0"] } }, + setDefaultAutoSelectFamily: { [READ]: { supported: ["19.4.0"] } }, + getDefaultAutoSelectFamilyAttemptTimeout: { + [READ]: { supported: ["19.8.0", "18.18.0"] }, + }, + setDefaultAutoSelectFamilyAttemptTimeout: { + [READ]: { supported: ["19.8.0", "18.18.0"] }, + }, + isIP: { [READ]: { supported: ["0.3.0"] } }, + isIPv4: { [READ]: { supported: ["0.3.0"] } }, + isIPv6: { [READ]: { supported: ["0.3.0"] } }, + BlockList: { [READ]: { supported: ["15.0.0", "14.18.0"] } }, + SocketAddress: { [READ]: { supported: ["15.14.0", "14.18.0"] } }, + Server: { [READ]: { supported: ["0.1.90"] } }, + Socket: { [READ]: { supported: ["0.3.4"] } }, +} + +/** @type {import('../types.js').SupportVersionTree} */ +module.exports = { + net: { + [READ]: { supported: ["0.0.1"] }, + ...net, + }, + "node:net": { + [READ]: { supported: ["14.13.1", "12.20.0"] }, + ...net, + }, +} diff --git a/lib/unsupported-features/node-builtins-modules/os.js b/lib/unsupported-features/node-builtins-modules/os.js new file mode 100644 index 00000000..4829a7a8 --- /dev/null +++ b/lib/unsupported-features/node-builtins-modules/os.js @@ -0,0 +1,43 @@ +const { READ } = require("@eslint-community/eslint-utils") + +/** @type {import('../types.js').SupportVersionTree} */ +const os = { + EOL: { [READ]: { supported: ["0.7.8"] } }, + constants: { + [READ]: { supported: ["5.11.0", "6.3.0"] }, + priority: { [READ]: { supported: ["10.10.0"] } }, + }, + devNull: { [READ]: { supported: ["16.3.0", "14.18.0"] } }, + availableParallelism: { [READ]: { supported: ["19.4.0", "18.14.0"] } }, + arch: { [READ]: { supported: ["0.5.0"] } }, + cpus: { [READ]: { supported: ["0.3.3"] } }, + endianness: { [READ]: { supported: ["0.9.4"] } }, + freemem: { [READ]: { supported: ["0.3.3"] } }, + getPriority: { [READ]: { supported: ["10.10.0"] } }, + homedir: { [READ]: { supported: ["2.3.0"] } }, + hostname: { [READ]: { supported: ["0.3.3"] } }, + loadavg: { [READ]: { supported: ["0.3.3"] } }, + machine: { [READ]: { supported: ["18.9.0", "16.18.0"] } }, + networkInterfaces: { [READ]: { supported: ["0.6.0"] } }, + platform: { [READ]: { supported: ["0.5.0"] } }, + release: { [READ]: { supported: ["0.3.3"] } }, + setPriority: { [READ]: { supported: ["10.10.0"] } }, + tmpdir: { [READ]: { supported: ["0.9.9"] } }, + totalmem: { [READ]: { supported: ["0.3.3"] } }, + type: { [READ]: { supported: ["0.3.3"] } }, + uptime: { [READ]: { supported: ["0.3.3"] } }, + userInfo: { [READ]: { supported: ["6.0.0"] } }, + version: { [READ]: { supported: ["13.11.0", "12.17.0"] } }, +} + +/** @type {import('../types.js').SupportVersionTree} */ +module.exports = { + os: { + [READ]: { supported: ["0.3.3"] }, + ...os, + }, + "node:os": { + [READ]: { supported: ["14.13.1", "12.20.0"] }, + ...os, + }, +} diff --git a/lib/unsupported-features/node-builtins-modules/path.js b/lib/unsupported-features/node-builtins-modules/path.js new file mode 100644 index 00000000..7a5cb7ab --- /dev/null +++ b/lib/unsupported-features/node-builtins-modules/path.js @@ -0,0 +1,40 @@ +const { READ } = require("@eslint-community/eslint-utils") + +/** @type {import('../types.js').SupportVersionTree} */ +const path = { + delimiter: { [READ]: { supported: ["0.9.3"] } }, + sep: { [READ]: { supported: ["0.7.9"] } }, + basename: { [READ]: { supported: ["0.1.25"] } }, + dirname: { [READ]: { supported: ["0.1.16"] } }, + extname: { [READ]: { supported: ["0.1.25"] } }, + format: { [READ]: { supported: ["0.11.15"] } }, + isAbsolute: { [READ]: { supported: ["0.11.2"] } }, + join: { [READ]: { supported: ["0.1.16"] } }, + normalize: { [READ]: { supported: ["0.1.23"] } }, + parse: { [READ]: { supported: ["0.11.15"] } }, + relative: { [READ]: { supported: ["0.5.0"] } }, + resolve: { [READ]: { supported: ["0.3.4"] } }, + toNamespacedPath: { [READ]: { supported: ["9.0.0"] } }, +} + +/** @type {import('../types.js').SupportVersionTree} */ +module.exports = { + path: { + [READ]: { supported: ["0.1.16"] }, + posix: { [READ]: { supported: ["0.11.15"] }, ...path }, + win32: { [READ]: { supported: ["0.11.15"] }, ...path }, + ...path, + }, + "node:path": { + [READ]: { supported: ["14.13.1", "12.20.0"] }, + posix: { [READ]: { supported: ["0.11.15"] }, ...path }, + win32: { [READ]: { supported: ["0.11.15"] }, ...path }, + ...path, + }, + + "path/posix": { [READ]: { supported: ["15.3.0"] }, ...path }, + "node:path/posix": { [READ]: { supported: ["15.3.0"] }, ...path }, + + "path/win32": { [READ]: { supported: ["15.3.0"] }, ...path }, + "node:path/win32": { [READ]: { supported: ["15.3.0"] }, ...path }, +} diff --git a/lib/unsupported-features/node-builtins-modules/perf_hooks.js b/lib/unsupported-features/node-builtins-modules/perf_hooks.js new file mode 100644 index 00000000..42ac0e58 --- /dev/null +++ b/lib/unsupported-features/node-builtins-modules/perf_hooks.js @@ -0,0 +1,31 @@ +const { READ } = require("@eslint-community/eslint-utils") + +/** @type {import('../types.js').SupportVersionTree} */ +const perf_hooks = { + performance: { [READ]: { supported: ["8.5.0"] } }, + createHistogram: { [READ]: { supported: ["15.9.0", "14.18.0"] } }, + monitorEventLoopDelay: { [READ]: { supported: ["11.10.0"] } }, + PerformanceEntry: { [READ]: { supported: ["8.5.0"] } }, + PerformanceMark: { [READ]: { supported: ["18.2.0", "16.17.0"] } }, + PerformanceMeasure: { [READ]: { supported: ["18.2.0", "16.17.0"] } }, + PerformanceNodeEntry: { [READ]: { supported: ["19.0.0"] } }, + PerformanceNodeTiming: { [READ]: { supported: ["8.5.0"] } }, + PerformanceResourceTiming: { [READ]: { supported: ["18.2.0", "16.17.0"] } }, + PerformanceObserver: { [READ]: { supported: ["8.5.0"] } }, + PerformanceObserverEntryList: { [READ]: { supported: ["8.5.0"] } }, + Histogram: { [READ]: { supported: ["11.10.0"] } }, + IntervalHistogram: { [READ]: { supported: ["8.5.0"] } }, + RecordableHistogram: { [READ]: { supported: ["15.9.0", "14.18.0"] } }, +} + +/** @type {import('../types.js').SupportVersionTree} */ +module.exports = { + perf_hooks: { + [READ]: { supported: ["8.5.0"] }, + ...perf_hooks, + }, + "node:perf_hooks": { + [READ]: { supported: ["14.13.1", "12.20.0"] }, + ...perf_hooks, + }, +} diff --git a/lib/unsupported-features/node-builtins-modules/process.js b/lib/unsupported-features/node-builtins-modules/process.js new file mode 100644 index 00000000..e5b6a386 --- /dev/null +++ b/lib/unsupported-features/node-builtins-modules/process.js @@ -0,0 +1,128 @@ +const { READ } = require("@eslint-community/eslint-utils") + +/** @type {import('../types.js').SupportVersionTree} */ +const process = { + allowedNodeEnvironmentFlags: { [READ]: { supported: ["10.10.0"] } }, + arch: { [READ]: { supported: ["0.5.0"] } }, + argv: { [READ]: { supported: ["0.1.27"] } }, + argv0: { [READ]: { supported: ["6.4.0"] } }, + channel: { [READ]: { supported: ["7.1.0"] } }, + config: { [READ]: { supported: ["0.7.7"] } }, + connected: { [READ]: { supported: ["0.7.2"] } }, + debugPort: { [READ]: { supported: ["0.7.2"] } }, + env: { [READ]: { supported: ["0.1.27"] } }, + execArgv: { [READ]: { supported: ["0.7.7"] } }, + execPath: { [READ]: { supported: ["0.1.100"] } }, + exitCode: { [READ]: { supported: ["0.11.8"] } }, + mainModule: { + [READ]: { + supported: ["0.1.17"], + deprecated: ["14.0.0"], + }, + }, + noDeprecation: { [READ]: { supported: ["0.8.0"] } }, + permission: { [READ]: { supported: ["20.0.0"] } }, + pid: { [READ]: { supported: ["0.1.15"] } }, + platform: { [READ]: { supported: ["0.1.16"] } }, + ppid: { [READ]: { supported: ["9.2.0", "8.10.0", "6.13.0"] } }, + release: { [READ]: { supported: ["3.0.0"] } }, + report: { + [READ]: { + experimental: ["11.8.0"], + supported: ["13.12.0", "12.17.0"], + }, + }, + sourceMapsEnabled: { [READ]: { experimental: ["20.7.0"] } }, + stdin: { + [READ]: { supported: ["0.1.3"] }, + + // tty.ReadStream + isRaw: { [READ]: { supported: ["0.7.7"] } }, + isTTY: { [READ]: { supported: ["0.5.8"] } }, + setRawMode: { [READ]: { supported: ["0.7.7"] } }, + }, + stdout: { + [READ]: { supported: ["0.1.3"] }, + + // tty.WriteStream + clearLine: { [READ]: { supported: ["0.7.7"] } }, + clearScreenDown: { [READ]: { supported: ["0.7.7"] } }, + columns: { [READ]: { supported: ["0.7.7"] } }, + cursorTo: { [READ]: { supported: ["0.7.7"] } }, + getColorDepth: { [READ]: { supported: ["9.9.0"] } }, + getWindowSize: { [READ]: { supported: ["0.7.7"] } }, + hasColors: { [READ]: { supported: ["11.13.0", "10.16.0"] } }, + isTTY: { [READ]: { supported: ["0.5.8"] } }, + moveCursor: { [READ]: { supported: ["0.7.7"] } }, + rows: { [READ]: { supported: ["0.7.7"] } }, + }, + stderr: { + [READ]: { supported: ["0.1.3"] }, + + // tty.WriteStream + clearLine: { [READ]: { supported: ["0.7.7"] } }, + clearScreenDown: { [READ]: { supported: ["0.7.7"] } }, + columns: { [READ]: { supported: ["0.7.7"] } }, + cursorTo: { [READ]: { supported: ["0.7.7"] } }, + getColorDepth: { [READ]: { supported: ["9.9.0"] } }, + getWindowSize: { [READ]: { supported: ["0.7.7"] } }, + hasColors: { [READ]: { supported: ["11.13.0", "10.16.0"] } }, + isTTY: { [READ]: { supported: ["0.5.8"] } }, + moveCursor: { [READ]: { supported: ["0.7.7"] } }, + rows: { [READ]: { supported: ["0.7.7"] } }, + }, + throwDeprecation: { [READ]: { supported: ["0.9.12"] } }, + title: { [READ]: { supported: ["0.1.104"] } }, + traceDeprecation: { [READ]: { supported: ["0.8.0"] } }, + version: { [READ]: { supported: ["0.1.3"] } }, + versions: { [READ]: { supported: ["0.2.0"] } }, + + abort: { [READ]: { supported: ["0.7.0"] } }, + chdir: { [READ]: { supported: ["0.1.17"] } }, + constrainedMemory: { [READ]: { experimental: ["19.6.0", "18.15.0"] } }, + cpuUsage: { [READ]: { supported: ["6.1.0"] } }, + cwd: { [READ]: { supported: ["0.1.8"] } }, + disconnect: { [READ]: { supported: ["0.7.2"] } }, + dlopen: { [READ]: { supported: ["0.1.16"] } }, + emitWarning: { [READ]: { supported: ["6.0.0"] } }, + exit: { [READ]: { supported: ["0.1.13"] } }, + getActiveResourcesInfo: { [READ]: { experimental: ["17.3.0", "16.14.0"] } }, + getegid: { [READ]: { supported: ["2.0.0"] } }, + geteuid: { [READ]: { supported: ["2.0.0"] } }, + getgid: { [READ]: { supported: ["0.1.31"] } }, + getgroups: { [READ]: { supported: ["0.9.4"] } }, + getuid: { [READ]: { supported: ["0.1.28"] } }, + hasUncaughtExceptionCaptureCallback: { [READ]: { supported: ["9.3.0"] } }, + hrtime: { + [READ]: { supported: ["0.7.6"] }, + bigint: { [READ]: { supported: ["10.7.0"] } }, + }, + initgroups: { [READ]: { supported: ["0.9.4"] } }, + kill: { [READ]: { supported: ["0.0.6"] } }, + memoryUsage: { [READ]: { supported: ["0.1.16"] } }, + rss: { [READ]: { supported: ["15.6.0", "14.18.0"] } }, + nextTick: { [READ]: { supported: ["0.1.26"] } }, + resourceUsage: { [READ]: { supported: ["12.6.0"] } }, + send: { [READ]: { supported: ["0.5.9"] } }, + setegid: { [READ]: { supported: ["2.0.0"] } }, + seteuid: { [READ]: { supported: ["2.0.0"] } }, + setgid: { [READ]: { supported: ["0.1.31"] } }, + setgroups: { [READ]: { supported: ["0.9.4"] } }, + setuid: { [READ]: { supported: ["0.1.28"] } }, + setSourceMapsEnabled: { [READ]: { experimental: ["16.6.0", "14.18.0"] } }, + setUncaughtExceptionCaptureCallback: { [READ]: { supported: ["9.3.0"] } }, + umask: { [READ]: { supported: ["0.1.19"] } }, + uptime: { [READ]: { supported: ["0.5.0"] } }, +} + +/** @type {import('../types.js').SupportVersionTree} */ +module.exports = { + process: { + [READ]: { supported: ["0.1.3"] }, + ...process, + }, + "node:process": { + [READ]: { supported: ["14.13.1", "12.20.0"] }, + ...process, + }, +} diff --git a/lib/unsupported-features/node-builtins-modules/punycode.js b/lib/unsupported-features/node-builtins-modules/punycode.js new file mode 100644 index 00000000..baec2d93 --- /dev/null +++ b/lib/unsupported-features/node-builtins-modules/punycode.js @@ -0,0 +1,22 @@ +const { READ } = require("@eslint-community/eslint-utils") + +/** @type {import('../types.js').SupportVersionTree} */ +const punycode = { + ucs2: { [READ]: { supported: ["0.7.0"] } }, + version: { [READ]: { supported: ["0.6.1"] } }, + decode: { [READ]: { supported: ["0.5.1"] } }, + encode: { [READ]: { supported: ["0.5.1"] } }, + toASCII: { [READ]: { supported: ["0.6.1"] } }, + toUnicode: { [READ]: { supported: ["0.6.1"] } }, +} + +/** @type {import('../types.js').SupportVersionTree} */ +module.exports = { + punycode: { + [READ]: { + supported: ["0.5.1"], + deprecated: ["7.0.0"], + }, + ...punycode, + }, +} diff --git a/lib/unsupported-features/node-builtins-modules/querystring.js b/lib/unsupported-features/node-builtins-modules/querystring.js new file mode 100644 index 00000000..3e396243 --- /dev/null +++ b/lib/unsupported-features/node-builtins-modules/querystring.js @@ -0,0 +1,23 @@ +const { READ } = require("@eslint-community/eslint-utils") + +/** @type {import('../types.js').SupportVersionTree} */ +const querystring = { + decode: { [READ]: { supported: ["0.1.99"] } }, + encode: { [READ]: { supported: ["0.1.99"] } }, + escape: { [READ]: { supported: ["0.1.25"] } }, + parse: { [READ]: { supported: ["0.1.25"] } }, + stringify: { [READ]: { supported: ["0.1.25"] } }, + unescape: { [READ]: { supported: ["0.1.25"] } }, +} + +/** @type {import('../types.js').SupportVersionTree} */ +module.exports = { + querystring: { + [READ]: { supported: ["0.1.25"] }, + ...querystring, + }, + "node:querystring": { + [READ]: { supported: ["14.13.1", "12.20.0"] }, + ...querystring, + }, +} diff --git a/lib/unsupported-features/node-builtins-modules/readline.js b/lib/unsupported-features/node-builtins-modules/readline.js new file mode 100644 index 00000000..b8a7343c --- /dev/null +++ b/lib/unsupported-features/node-builtins-modules/readline.js @@ -0,0 +1,45 @@ +const { READ } = require("@eslint-community/eslint-utils") + +/** @type {import('../types.js').SupportVersionTree} */ +const promises_api = { + createInterface: { [READ]: { supported: ["17.0.0"] } }, + Interface: { [READ]: { supported: ["17.0.0"] } }, + Readline: { [READ]: { supported: ["17.0.0"] } }, +} + +/** @type {import('../types.js').SupportVersionTree} */ +const readline = { + promises: { + [READ]: { experimental: ["17.0.0"] }, + ...promises_api, + }, + clearLine: { [READ]: { supported: ["0.7.7"] } }, + clearScreenDown: { [READ]: { supported: ["0.7.7"] } }, + createInterface: { [READ]: { supported: ["0.1.98"] } }, + cursorTo: { [READ]: { supported: ["0.7.7"] } }, + moveCursor: { [READ]: { supported: ["0.7.7"] } }, + Interface: { [READ]: { supported: ["0.1.104"] } }, + emitKeypressEvents: { [READ]: { supported: ["0.7.7"] } }, + InterfaceConstructor: { [READ]: { supported: ["0.1.104"] } }, +} + +/** @type {import('../types.js').SupportVersionTree} */ +module.exports = { + readline: { + [READ]: { supported: ["0.1.98"] }, + ...readline, + }, + "node:readline": { + [READ]: { supported: ["14.13.1", "12.20.0"] }, + ...readline, + }, + + "readline/promises": { + [READ]: { experimental: ["17.0.0"] }, + ...promises_api, + }, + "node:readline/promises": { + [READ]: { experimental: ["17.0.0"] }, + ...promises_api, + }, +} diff --git a/lib/unsupported-features/node-builtins-modules/stream.js b/lib/unsupported-features/node-builtins-modules/stream.js new file mode 100644 index 00000000..2086a90b --- /dev/null +++ b/lib/unsupported-features/node-builtins-modules/stream.js @@ -0,0 +1,129 @@ +const { READ } = require("@eslint-community/eslint-utils") + +// TODO: https://nodejs.org/docs/latest/api/webstreams.html + +/** @type {import('../types.js').SupportVersionTree} */ +const Readable = { + [READ]: { supported: ["0.9.4"] }, + from: { [READ]: { supported: ["12.3.0", "10.17.0"] } }, + isDisturbed: { [READ]: { experimental: ["16.8.0"] } }, + fromWeb: { [READ]: { experimental: ["17.0.0"] } }, + toWeb: { [READ]: { experimental: ["17.0.0"] } }, +} + +/** @type {import('../types.js').SupportVersionTree} */ +const Writable = { + [READ]: { supported: ["0.9.4"] }, + fromWeb: { [READ]: { experimental: ["17.0.0"] } }, + toWeb: { [READ]: { experimental: ["17.0.0"] } }, +} + +/** @type {import('../types.js').SupportVersionTree} */ +const Duplex = { + [READ]: { supported: ["0.9.4"] }, + from: { [READ]: { experimental: ["16.8.0"] } }, + fromWeb: { [READ]: { experimental: ["17.0.0"] } }, + toWeb: { [READ]: { experimental: ["17.0.0"] } }, +} + +const Transform = Duplex + +/** @type {import('../types.js').SupportVersionTree} */ +const StreamPromise = { + pipeline: { [READ]: { supported: ["15.0.0"] } }, + finished: { [READ]: { supported: ["15.0.0"] } }, +} + +/** @type {import('../types.js').SupportVersionTree} */ +const Stream = { + promises: { + [READ]: { supported: ["15.0.0"] }, + ...StreamPromise, + }, + finished: { [READ]: { supported: ["10.0.0"] } }, + pipeline: { [READ]: { supported: ["10.0.0"] } }, + compose: { [READ]: { supported: ["16.9.0"] } }, + + Readable, + Writable, + Duplex, + Transform, + + isErrored: { [READ]: { experimental: ["17.3.0", "16.14.0"] } }, + isReadable: { [READ]: { experimental: ["17.4.0", "16.14.0"] } }, + addAbortSignal: { [READ]: { supported: ["15.4.0"] } }, + getDefaultHighWaterMark: { [READ]: { supported: ["19.9.0", "18.17.0"] } }, + setDefaultHighWaterMark: { [READ]: { supported: ["19.9.0", "18.17.0"] } }, +} + +/** @type {import('../types.js').SupportVersionTree} */ +const StreamWeb = { + ReadableStream: { + [READ]: { supported: ["16.5.0"] }, + from: { [READ]: { supported: ["20.6.0"] } }, + }, + ReadableStreamDefaultReader: { [READ]: { supported: ["16.5.0"] } }, + ReadableStreamBYOBReader: { [READ]: { supported: ["16.5.0"] } }, + ReadableStreamDefaultController: { [READ]: { supported: ["16.5.0"] } }, + ReadableByteStreamController: { [READ]: { supported: ["16.5.0"] } }, + ReadableStreamBYOBRequest: { [READ]: { supported: ["16.5.0"] } }, + WritableStream: { [READ]: { supported: ["16.5.0"] } }, + WritableStreamDefaultWriter: { [READ]: { supported: ["16.5.0"] } }, + WritableStreamDefaultController: { [READ]: { supported: ["16.5.0"] } }, + TransformStream: { [READ]: { supported: ["16.5.0"] } }, + TransformStreamDefaultController: { [READ]: { supported: ["16.5.0"] } }, + ByteLengthQueuingStrategy: { [READ]: { supported: ["16.5.0"] } }, + CountQueuingStrategy: { [READ]: { supported: ["16.5.0"] } }, + TextEncoderStream: { [READ]: { supported: ["16.6.0"] } }, + TextDecoderStream: { [READ]: { supported: ["16.6.0"] } }, + CompressionStream: { [READ]: { supported: ["17.0.0"] } }, + DecompressionStream: { [READ]: { supported: ["17.0.0"] } }, +} + +const StreamConsumer = { + [READ]: { supported: ["16.7.0"] }, + arrayBuffer: { [READ]: { supported: ["16.7.0"] } }, + blob: { [READ]: { supported: ["16.7.0"] } }, + buffer: { [READ]: { supported: ["16.7.0"] } }, + json: { [READ]: { supported: ["16.7.0"] } }, + text: { [READ]: { supported: ["16.7.0"] } }, +} + +/** @type {import('../types.js').SupportVersionTree} */ +module.exports = { + stream: { + [READ]: { supported: ["0.9.4"] }, + ...Stream, + }, + "node:stream": { + [READ]: { supported: ["14.13.1", "12.20.0"] }, + ...Stream, + }, + + "stream/promises": { + [READ]: { experimental: ["15.0.0"] }, + ...StreamPromise, + }, + "node:stream/promises": { + [READ]: { experimental: ["15.0.0"] }, + ...StreamPromise, + }, + + "stream/web": { + [READ]: { experimental: ["16.5.0"], supported: ["21.0.0"] }, + ...StreamWeb, + }, + "node:stream/web": { + [READ]: { experimental: ["16.5.0"], supported: ["21.0.0"] }, + ...StreamWeb, + }, + + "stream/consumers": { + [READ]: { supported: ["16.7.0"] }, + ...StreamConsumer, + }, + "node:stream/consumers": { + [READ]: { supported: ["16.7.0"] }, + ...StreamConsumer, + }, +} diff --git a/lib/unsupported-features/node-builtins-modules/string_decoder.js b/lib/unsupported-features/node-builtins-modules/string_decoder.js new file mode 100644 index 00000000..5d6932fc --- /dev/null +++ b/lib/unsupported-features/node-builtins-modules/string_decoder.js @@ -0,0 +1,18 @@ +const { READ } = require("@eslint-community/eslint-utils") + +/** @type {import('../types.js').SupportVersionTree} */ +const string_decoder = { + StringDecoder: { [READ]: { supported: ["0.1.99"] } }, +} + +/** @type {import('../types.js').SupportVersionTree} */ +module.exports = { + string_decoder: { + [READ]: { supported: ["0.1.99"] }, + ...string_decoder, + }, + "node:string_decoder": { + [READ]: { supported: ["14.13.1", "12.20.0"] }, + ...string_decoder, + }, +} diff --git a/lib/unsupported-features/node-builtins-modules/test.js b/lib/unsupported-features/node-builtins-modules/test.js new file mode 100644 index 00000000..b65ddb9b --- /dev/null +++ b/lib/unsupported-features/node-builtins-modules/test.js @@ -0,0 +1,44 @@ +const { READ } = require("@eslint-community/eslint-utils") + +/** @type {import('../types.js').SupportVersionTree} */ +const test = { + run: { [READ]: { supported: ["18.9.0", "16.19.0"] } }, + skip: { [READ]: { supported: ["20.2.0", "18.17.0"] } }, + todo: { [READ]: { supported: ["20.2.0", "18.17.0"] } }, + only: { [READ]: { supported: ["20.2.0", "18.17.0"] } }, + describe: { + [READ]: { supported: ["18.7.0", "16.17.0"] }, + skip: { [READ]: { supported: ["20.2.0", "18.17.0"] } }, + todo: { [READ]: { supported: ["20.2.0", "18.17.0"] } }, + only: { [READ]: { supported: ["20.2.0", "18.17.0"] } }, + }, + it: { + [READ]: { supported: ["18.6.0", "16.17.0"] }, + skip: { [READ]: { supported: ["20.2.0", "18.17.0"] } }, + todo: { [READ]: { supported: ["20.2.0", "18.17.0"] } }, + only: { [READ]: { supported: ["20.2.0", "18.17.0"] } }, + }, + before: { [READ]: { supported: ["18.8.0", "16.18.0"] } }, + 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"] } }, + MockFunctionContext: { [READ]: { supported: ["19.1.0", "18.13.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"] } }, + TestContext: { [READ]: { supported: ["18.0.0", "16.17.0"] } }, + SuiteContext: { [READ]: { supported: ["18.7.0", "16.17.0"] } }, +} + +test.test = test + +/** @type {import('../types.js').SupportVersionTree} */ +module.exports = { + "node:test": { + [READ]: { + experimental: ["18.7.0", "16.17.0"], + supported: ["20.0.0"], + }, + ...test, + }, +} diff --git a/lib/unsupported-features/node-builtins-modules/timers.js b/lib/unsupported-features/node-builtins-modules/timers.js new file mode 100644 index 00000000..be987a3d --- /dev/null +++ b/lib/unsupported-features/node-builtins-modules/timers.js @@ -0,0 +1,57 @@ +const { READ } = require("@eslint-community/eslint-utils") + +/** @type {import('../types.js').SupportVersionTree} */ +const promises_api = { + setTimeout: { [READ]: { supported: ["15.0.0"] } }, + setImmediate: { [READ]: { supported: ["15.0.0"] } }, + setInterval: { [READ]: { supported: ["15.9.0"] } }, + scheduler: { + wait: { [READ]: { experimental: ["17.3.0", "16.14.0"] } }, + yield: { [READ]: { experimental: ["17.3.0", "16.14.0"] } }, + }, +} + +/** @type {import('../types.js').SupportVersionTree} */ +const timers = { + Immediate: { [READ]: { supported: ["0.9.1"] } }, + Timeout: { [READ]: { supported: ["0.9.1"] } }, + setImmediate: { [READ]: { supported: ["0.9.1"] } }, + clearImmediate: { [READ]: { supported: ["0.9.1"] } }, + setInterval: { [READ]: { supported: ["0.0.1"] } }, + clearInterval: { [READ]: { supported: ["0.0.1"] } }, + setTimeout: { [READ]: { supported: ["0.0.1"] } }, + clearTimeout: { [READ]: { supported: ["0.0.1"] } }, + + promises: { ...promises_api, [READ]: { supported: ["21.6.0"] } }, + + // active: [Function: deprecated], + // unenroll: [Function: deprecated], + // enroll: [Function: deprecated] +} + +/** @type {import('../types.js').SupportVersionTree} */ +module.exports = { + timers: { + [READ]: { supported: ["0.9.1"] }, + ...timers, + }, + "node:timers": { + [READ]: { supported: ["14.13.1", "12.20.0"] }, + ...timers, + }, + + "timers/promises": { + [READ]: { + experimental: ["15.0.0"], + supported: ["16.0.0"], + }, + ...promises_api, + }, + "node:timers/promises": { + [READ]: { + experimental: ["15.0.0"], + supported: ["16.0.0"], + }, + ...promises_api, + }, +} diff --git a/lib/unsupported-features/node-builtins-modules/tls.js b/lib/unsupported-features/node-builtins-modules/tls.js new file mode 100644 index 00000000..27a5aad8 --- /dev/null +++ b/lib/unsupported-features/node-builtins-modules/tls.js @@ -0,0 +1,35 @@ +const { READ } = require("@eslint-community/eslint-utils") + +/** @type {import('../types.js').SupportVersionTree} */ +const tls = { + rootCertificates: { [READ]: { supported: ["12.3.0"] } }, + DEFAULT_ECDH_CURVE: { [READ]: { supported: ["0.11.13"] } }, + DEFAULT_MAX_VERSION: { [READ]: { supported: ["11.4.0"] } }, + DEFAULT_MIN_VERSION: { [READ]: { supported: ["11.4.0"] } }, + DEFAULT_CIPHERS: { [READ]: { supported: ["19.8.0", "18.16.0"] } }, + checkServerIdentity: { [READ]: { supported: ["0.8.4"] } }, + connect: { [READ]: { supported: ["0.11.3"] } }, + createSecureContext: { [READ]: { supported: ["0.11.13"] } }, + createSecurePair: { + [READ]: { supported: ["0.3.2"], deprecated: ["0.11.3"] }, + }, + createServer: { [READ]: { supported: ["0.3.2"] } }, + getCiphers: { [READ]: { supported: ["0.10.2"] } }, + SecureContext: { [READ]: { supported: ["0.11.13"] } }, + CryptoStream: { [READ]: { supported: ["0.3.4"], deprecated: ["0.11.3"] } }, + SecurePair: { [READ]: { supported: ["0.3.2"], deprecated: ["0.11.3"] } }, + Server: { [READ]: { supported: ["0.3.2"] } }, + TLSSocket: { [READ]: { supported: ["0.11.4"] } }, +} + +/** @type {import('../types.js').SupportVersionTree} */ +module.exports = { + tls: { + [READ]: { supported: ["0.3.2"] }, + ...tls, + }, + "node:tls": { + [READ]: { supported: ["14.13.1", "12.20.0"] }, + ...tls, + }, +} diff --git a/lib/unsupported-features/node-builtins-modules/trace_events.js b/lib/unsupported-features/node-builtins-modules/trace_events.js new file mode 100644 index 00000000..79261d2d --- /dev/null +++ b/lib/unsupported-features/node-builtins-modules/trace_events.js @@ -0,0 +1,19 @@ +const { READ } = require("@eslint-community/eslint-utils") + +/** @type {import('../types.js').SupportVersionTree} */ +const trace_events = { + createTracing: { [READ]: { supported: ["10.0.0"] } }, + getEnabledCategories: { [READ]: { supported: ["10.0.0"] } }, +} + +/** @type {import('../types.js').SupportVersionTree} */ +module.exports = { + trace_events: { + [READ]: { experimental: ["10.0.0"] }, + ...trace_events, + }, + "node:trace_events": { + [READ]: { experimental: ["14.13.1", "12.20.0"] }, + ...trace_events, + }, +} diff --git a/lib/unsupported-features/node-builtins-modules/tty.js b/lib/unsupported-features/node-builtins-modules/tty.js new file mode 100644 index 00000000..45e2ac32 --- /dev/null +++ b/lib/unsupported-features/node-builtins-modules/tty.js @@ -0,0 +1,20 @@ +const { READ } = require("@eslint-community/eslint-utils") + +/** @type {import('../types.js').SupportVersionTree} */ +const tty = { + isatty: { [READ]: { supported: ["0.5.8"] } }, + ReadStream: { [READ]: { supported: ["0.5.8"] } }, + WriteStream: { [READ]: { supported: ["0.5.8"] } }, +} + +/** @type {import('../types.js').SupportVersionTree} */ +module.exports = { + tty: { + [READ]: { supported: ["0.5.8"] }, + ...tty, + }, + "node:tty": { + [READ]: { supported: ["14.13.1", "12.20.0"] }, + ...tty, + }, +} diff --git a/lib/unsupported-features/node-builtins-modules/url.js b/lib/unsupported-features/node-builtins-modules/url.js new file mode 100644 index 00000000..e97a0888 --- /dev/null +++ b/lib/unsupported-features/node-builtins-modules/url.js @@ -0,0 +1,31 @@ +const { READ } = require("@eslint-community/eslint-utils") + +/** @type {import('../types.js').SupportVersionTree} */ +const url = { + domainToASCII: { [READ]: { supported: ["7.4.0", "6.13.0"] } }, + domainToUnicode: { [READ]: { supported: ["7.4.0", "6.13.0"] } }, + fileURLToPath: { [READ]: { supported: ["10.12.0"] } }, + format: { [READ]: { supported: ["7.6.0"] } }, + pathToFileURL: { [READ]: { supported: ["10.12.0"] } }, + urlToHttpOptions: { [READ]: { supported: ["15.7.0", "14.18.0"] } }, + URL: { + [READ]: { supported: ["7.0.0", "6.13.0"] }, + canParse: { [READ]: { experimental: ["19.9.0"] } }, + createObjectURL: { [READ]: { experimental: ["16.7.0"] } }, + revokeObjectURL: { [READ]: { supported: ["19.9.0", "18.17.0"] } }, + }, + URLSearchParams: { [READ]: { supported: ["7.5.0", "6.13.0"] } }, + Url: { [READ]: { supported: ["0.1.25"] } }, +} + +/** @type {import('../types.js').SupportVersionTree} */ +module.exports = { + url: { + [READ]: { supported: ["0.1.25"] }, + ...url, + }, + "node:url": { + [READ]: { supported: ["14.13.1", "12.20.0"] }, + ...url, + }, +} diff --git a/lib/unsupported-features/node-builtins-modules/util.js b/lib/unsupported-features/node-builtins-modules/util.js new file mode 100644 index 00000000..f20bc862 --- /dev/null +++ b/lib/unsupported-features/node-builtins-modules/util.js @@ -0,0 +1,122 @@ +const { READ } = require("@eslint-community/eslint-utils") + +/** @type {import('../types.js').SupportVersionTree} */ +const types = { + [READ]: { supported: ["10.0.0"] }, + isExternal: { [READ]: { supported: ["10.0.0"] } }, + isDate: { [READ]: { supported: ["10.0.0"] } }, + isArgumentsObject: { [READ]: { supported: ["10.0.0"] } }, + isBigIntObject: { [READ]: { supported: ["10.0.0"] } }, + isBooleanObject: { [READ]: { supported: ["10.0.0"] } }, + isNumberObject: { [READ]: { supported: ["10.0.0"] } }, + isStringObject: { [READ]: { supported: ["10.0.0"] } }, + isSymbolObject: { [READ]: { supported: ["10.0.0"] } }, + isNativeError: { [READ]: { supported: ["10.0.0"] } }, + isRegExp: { [READ]: { supported: ["10.0.0"] } }, + isAsyncFunction: { [READ]: { supported: ["10.0.0"] } }, + isGeneratorFunction: { [READ]: { supported: ["10.0.0"] } }, + isGeneratorObject: { [READ]: { supported: ["10.0.0"] } }, + isPromise: { [READ]: { supported: ["10.0.0"] } }, + isMap: { [READ]: { supported: ["10.0.0"] } }, + isSet: { [READ]: { supported: ["10.0.0"] } }, + isMapIterator: { [READ]: { supported: ["10.0.0"] } }, + isSetIterator: { [READ]: { supported: ["10.0.0"] } }, + isWeakMap: { [READ]: { supported: ["10.0.0"] } }, + isWeakSet: { [READ]: { supported: ["10.0.0"] } }, + isArrayBuffer: { [READ]: { supported: ["10.0.0"] } }, + isDataView: { [READ]: { supported: ["10.0.0"] } }, + isSharedArrayBuffer: { [READ]: { supported: ["10.0.0"] } }, + isProxy: { [READ]: { supported: ["10.0.0"] } }, + isModuleNamespaceObject: { [READ]: { supported: ["10.0.0"] } }, + isAnyArrayBuffer: { [READ]: { supported: ["10.0.0"] } }, + isBoxedPrimitive: { [READ]: { supported: ["10.11.0"] } }, + isArrayBufferView: { [READ]: { supported: ["10.0.0"] } }, + isTypedArray: { [READ]: { supported: ["10.0.0"] } }, + isUint8Array: { [READ]: { supported: ["10.0.0"] } }, + isUint8ClampedArray: { [READ]: { supported: ["10.0.0"] } }, + isUint16Array: { [READ]: { supported: ["10.0.0"] } }, + isUint32Array: { [READ]: { supported: ["10.0.0"] } }, + isInt8Array: { [READ]: { supported: ["10.0.0"] } }, + isInt16Array: { [READ]: { supported: ["10.0.0"] } }, + isInt32Array: { [READ]: { supported: ["10.0.0"] } }, + isFloat32Array: { [READ]: { supported: ["10.0.0"] } }, + isFloat64Array: { [READ]: { supported: ["10.0.0"] } }, + isBigInt64Array: { [READ]: { supported: ["10.0.0"] } }, + isBigUint64Array: { [READ]: { supported: ["10.0.0"] } }, + isKeyObject: { [READ]: { supported: ["16.2.0"] } }, + isCryptoKey: { [READ]: { supported: ["16.2.0"] } }, + isWebAssemblyCompiledModule: { + [READ]: { supported: ["10.0.0"], deprecated: ["14.0.0"] }, + }, +} + +/** @type {import('../types.js').SupportVersionTree} */ +const deprecated = { + _extend: { [READ]: { supported: ["0.7.5"], deprecated: ["6.0.0"] } }, + isArray: { [READ]: { supported: ["0.6.0"], deprecated: ["4.0.0"] } }, + isBoolean: { [READ]: { supported: ["0.11.5"], deprecated: ["4.0.0"] } }, + isBuffer: { [READ]: { supported: ["0.11.5"], deprecated: ["4.0.0"] } }, + isDate: { [READ]: { supported: ["0.6.0"], deprecated: ["4.0.0"] } }, + isError: { [READ]: { supported: ["0.6.0"], deprecated: ["4.0.0"] } }, + isFunction: { [READ]: { supported: ["0.11.5"], deprecated: ["4.0.0"] } }, + isNull: { [READ]: { supported: ["0.11.5"], deprecated: ["4.0.0"] } }, + isNullOrUndefined: { + [READ]: { supported: ["0.11.5"], deprecated: ["4.0.0"] }, + }, + isNumber: { [READ]: { supported: ["0.11.5"], deprecated: ["4.0.0"] } }, + isObject: { [READ]: { supported: ["0.11.5"], deprecated: ["4.0.0"] } }, + isPrimitive: { [READ]: { supported: ["0.11.5"], deprecated: ["4.0.0"] } }, + isRegExp: { [READ]: { supported: ["0.6.0"], deprecated: ["4.0.0"] } }, + isString: { [READ]: { supported: ["0.11.5"], deprecated: ["4.0.0"] } }, + isSymbol: { [READ]: { supported: ["0.11.5"], deprecated: ["4.0.0"] } }, + isUndefined: { [READ]: { supported: ["0.11.5"], deprecated: ["4.0.0"] } }, + log: { [READ]: { supported: ["0.3.0"], deprecated: ["6.0.0"] } }, +} + +/** @type {import('../types.js').SupportVersionTree} */ +const util = { + promisify: { + [READ]: { supported: ["8.0.0"] }, + custom: { [READ]: { supported: ["8.0.0"] } }, + }, + callbackify: { [READ]: { supported: ["8.2.0"] } }, + + debuglog: { [READ]: { supported: ["0.11.3"] } }, + debug: { [READ]: { supported: ["14.9.0"] } }, + deprecate: { [READ]: { supported: ["0.8.0"] } }, + format: { [READ]: { supported: ["0.5.3"] } }, + formatWithOptions: { [READ]: { supported: ["10.0.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"] } }, + inspect: { + [READ]: { supported: ["0.3.0"] }, + custom: { [READ]: { supported: ["6.6.0"] } }, + defaultOptions: { [READ]: { supported: ["6.4.0"] } }, + replDefaults: { [READ]: { supported: ["11.12.0"] } }, + }, + isDeepStrictEqual: { [READ]: { supported: ["9.0.0"] } }, + parseArgs: { + [READ]: { experimental: ["18.3.0", "16.17.0"], supported: ["20.0.0"] }, + }, + stripVTControlCharacters: { [READ]: { supported: ["16.11.0"] } }, + toUSVString: { [READ]: { supported: ["16.8.0", "14.18.0"] } }, + transferableAbortController: { [READ]: { experimental: ["18.11.0"] } }, + transferableAbortSignal: { [READ]: { experimental: ["18.11.0"] } }, + aborted: { [READ]: { experimental: ["19.7.0", "18.16.0"] } }, + MIMEType: { [READ]: { experimental: ["19.1.0", "18.13.0"] } }, + MIMEParams: { [READ]: { supported: ["19.1.0", "18.13.0"] } }, + TextDecoder: { [READ]: { experimental: ["8.3.0"], supported: ["8.9.0"] } }, + TextEncoder: { [READ]: { experimental: ["8.3.0"], supported: ["8.9.0"] } }, + + types, + ...deprecated, +} + +/** @type {import('../types.js').SupportVersionTree} */ +module.exports = { + util: util, + "node:util": { ...util, [READ]: { supported: ["14.13.1", "12.20.0"] } }, + "util/types": { ...types, [READ]: { supported: ["15.3.0"] } }, + "node:util/types": { ...types, [READ]: { supported: ["15.3.0"] } }, +} diff --git a/lib/unsupported-features/node-builtins-modules/v8.js b/lib/unsupported-features/node-builtins-modules/v8.js new file mode 100644 index 00000000..e0e73f58 --- /dev/null +++ b/lib/unsupported-features/node-builtins-modules/v8.js @@ -0,0 +1,49 @@ +const { READ } = require("@eslint-community/eslint-utils") + +/** @type {import('../types.js').SupportVersionTree} */ +const v8 = { + serialize: { [READ]: { supported: ["8.0.0"] } }, + deserialize: { [READ]: { supported: ["8.0.0"] } }, + Serializer: { [READ]: { supported: ["8.0.0"] } }, + Deserializer: { [READ]: { supported: ["8.0.0"] } }, + DefaultSerializer: { [READ]: { supported: ["8.0.0"] } }, + DefaultDeserializer: { [READ]: { supported: ["8.0.0"] } }, + promiseHooks: { + [READ]: { supported: ["17.1.0", "16.14.0"] }, + onInit: { [READ]: { supported: ["17.1.0", "16.14.0"] } }, + onSettled: { [READ]: { supported: ["17.1.0", "16.14.0"] } }, + onBefore: { [READ]: { supported: ["17.1.0", "16.14.0"] } }, + onAfter: { [READ]: { supported: ["17.1.0", "16.14.0"] } }, + createHook: { [READ]: { supported: ["17.1.0", "16.14.0"] } }, + }, + startupSnapshot: { + [READ]: { experimental: ["18.6.0", "16.17.0"] }, + addSerializeCallback: { [READ]: { supported: ["18.6.0", "16.17.0"] } }, + addDeserializeCallback: { + [READ]: { supported: ["18.6.0", "16.17.0"] }, + }, + setDeserializeMainFunction: { + [READ]: { supported: ["18.6.0", "16.17.0"] }, + }, + isBuildingSnapshot: { [READ]: { supported: ["18.6.0", "16.17.0"] } }, + }, + cachedDataVersionTag: { [READ]: { supported: ["8.0.0"] } }, + getHeapCodeStatistics: { [READ]: { supported: ["12.8.0"] } }, + getHeapSnapshot: { [READ]: { supported: ["11.13.0"] } }, + getHeapSpaceStatistics: { [READ]: { supported: ["6.0.0"] } }, + getHeapStatistics: { [READ]: { supported: ["1.0.0"] } }, + setFlagsFromString: { [READ]: { supported: ["1.0.0"] } }, + stopCoverage: { [READ]: { supported: ["15.1.0", "14.18.0", "12.22.0"] } }, + takeCoverage: { [READ]: { supported: ["15.1.0", "14.18.0", "12.22.0"] } }, + writeHeapSnapshot: { [READ]: { supported: ["11.13.0"] } }, + setHeapSnapshotNearHeapLimit: { + [READ]: { experimental: ["18.10.0", "16.18.0"] }, + }, + GCProfiler: { [READ]: { supported: ["19.6.0", "18.15.0"] } }, +} + +/** @type {import('../types.js').SupportVersionTree} */ +module.exports = { + v8: { ...v8, [READ]: { supported: ["1.0.0"] } }, + "node:v8": { ...v8, [READ]: { supported: ["14.13.1", "12.20.0"] } }, +} diff --git a/lib/unsupported-features/node-builtins-modules/vm.js b/lib/unsupported-features/node-builtins-modules/vm.js new file mode 100644 index 00000000..1a59417d --- /dev/null +++ b/lib/unsupported-features/node-builtins-modules/vm.js @@ -0,0 +1,23 @@ +const { READ } = require("@eslint-community/eslint-utils") + +/** @type {import('../types.js').SupportVersionTree} */ +const vm = { + compileFunction: { [READ]: { supported: ["10.10.0"] } }, + createContext: { [READ]: { supported: ["0.3.1"] } }, + isContext: { [READ]: { supported: ["0.11.7"] } }, + measureMemory: { [READ]: { experimental: ["13.10.0"] } }, + runInContext: { [READ]: { supported: ["0.3.1"] } }, + runInNewContext: { [READ]: { supported: ["0.3.1"] } }, + runInThisContext: { [READ]: { supported: ["0.3.1"] } }, + Script: { [READ]: { supported: ["0.3.1"] } }, + // Module was not found in v10 or v11. + Module: { [READ]: { experimental: ["13.0.0", "12.16.0", "9.6.0"] } }, + SourceTextModule: { [READ]: { experimental: ["9.6.0"] } }, + SyntheticModule: { [READ]: { experimental: ["13.0.0", "12.16.0"] } }, +} + +/** @type {import('../types.js').SupportVersionTree} */ +module.exports = { + vm: vm, + "node:vm": { ...vm, [READ]: { supported: ["14.13.1", "12.20.0"] } }, +} diff --git a/lib/unsupported-features/node-builtins-modules/wasi.js b/lib/unsupported-features/node-builtins-modules/wasi.js new file mode 100644 index 00000000..3591cb94 --- /dev/null +++ b/lib/unsupported-features/node-builtins-modules/wasi.js @@ -0,0 +1,12 @@ +const { READ } = require("@eslint-community/eslint-utils") + +/** @type {import('../types.js').SupportVersionTree} */ +const wasi = { + WASI: { [READ]: { supported: ["13.3.0", "12.16.0"] } }, +} + +/** @type {import('../types.js').SupportVersionTree} */ +module.exports = { + wasi: wasi, + "node:wasi": { ...wasi, [READ]: { supported: ["14.13.1", "12.20.0"] } }, +} diff --git a/lib/unsupported-features/node-builtins-modules/worker_threads.js b/lib/unsupported-features/node-builtins-modules/worker_threads.js new file mode 100644 index 00000000..425f5f60 --- /dev/null +++ b/lib/unsupported-features/node-builtins-modules/worker_threads.js @@ -0,0 +1,45 @@ +const { READ } = require("@eslint-community/eslint-utils") + +/** @type {import('../types.js').SupportVersionTree} */ +const worker_threads = { + isMainThread: { [READ]: { supported: ["10.5.0"] } }, + parentPort: { [READ]: { supported: ["10.5.0"] } }, + resourceLimits: { [READ]: { supported: ["13.2.0", "12.16.0"] } }, + SHARE_ENV: { [READ]: { supported: ["11.14.0"] } }, + threadId: { [READ]: { supported: ["10.5.0"] } }, + workerData: { [READ]: { supported: ["10.5.0"] } }, + getEnvironmentData: { + [READ]: { + experimental: ["15.12.0", "14.18.0"], + supported: ["17.5.0", "16.15.0"], + }, + }, + markAsUntransferable: { [READ]: { supported: ["14.5.0", "12.19.0"] } }, + isMarkedAsUntransferable: { [READ]: { supported: ["21.0.0"] } }, + moveMessagePortToContext: { [READ]: { supported: ["11.13.0"] } }, + receiveMessageOnPort: { [READ]: { supported: ["12.3.0"] } }, + setEnvironmentData: { + [READ]: { + experimental: ["15.12.0", "14.18.0"], + supported: ["17.5.0", "16.15.0"], + }, + }, + BroadcastChannel: { + [READ]: { experimental: ["15.4.0"], supported: ["18.0.0"] }, + }, + MessageChannel: { [READ]: { supported: ["10.5.0"] } }, + MessagePort: { [READ]: { supported: ["10.5.0"] } }, + Worker: { [READ]: { supported: ["10.5.0"] } }, +} + +/** @type {import('../types.js').SupportVersionTree} */ +module.exports = { + worker_threads: { + ...worker_threads, + [READ]: { supported: ["12.11.0"], experimental: ["10.5.0"] }, + }, + "node:worker_threads": { + ...worker_threads, + [READ]: { supported: ["14.13.1", "12.20.0"] }, + }, +} diff --git a/lib/unsupported-features/node-builtins-modules/zlib.js b/lib/unsupported-features/node-builtins-modules/zlib.js new file mode 100644 index 00000000..3345a4e3 --- /dev/null +++ b/lib/unsupported-features/node-builtins-modules/zlib.js @@ -0,0 +1,51 @@ +const { READ } = require("@eslint-community/eslint-utils") + +/** @type {import('../types.js').SupportVersionTree} */ +const zlib = { + constants: { [READ]: { supported: ["7.0.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"] } }, + createDeflateRaw: { [READ]: { supported: ["0.5.8"] } }, + createGunzip: { [READ]: { supported: ["0.5.8"] } }, + createGzip: { [READ]: { supported: ["0.5.8"] } }, + createInflate: { [READ]: { supported: ["0.5.8"] } }, + createInflateRaw: { [READ]: { supported: ["0.5.8"] } }, + createUnzip: { [READ]: { supported: ["0.5.8"] } }, + brotliCompress: { [READ]: { supported: ["11.7.0", "10.16.0"] } }, + brotliCompressSync: { [READ]: { supported: ["11.7.0", "10.16.0"] } }, + brotliDecompress: { [READ]: { supported: ["11.7.0", "10.16.0"] } }, + brotliDecompressSync: { [READ]: { supported: ["11.7.0", "10.16.0"] } }, + deflate: { [READ]: { supported: ["0.6.0"] } }, + deflateSync: { [READ]: { supported: ["0.11.12"] } }, + deflateRaw: { [READ]: { supported: ["0.6.0"] } }, + deflateRawSync: { [READ]: { supported: ["0.11.12"] } }, + gunzip: { [READ]: { supported: ["0.6.0"] } }, + gunzipSync: { [READ]: { supported: ["0.11.12"] } }, + gzip: { [READ]: { supported: ["0.6.0"] } }, + gzipSync: { [READ]: { supported: ["0.11.12"] } }, + inflate: { [READ]: { supported: ["0.6.0"] } }, + inflateSync: { [READ]: { supported: ["0.11.12"] } }, + inflateRaw: { [READ]: { supported: ["0.6.0"] } }, + 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"] } }, +} + +/** @type {import('../types.js').SupportVersionTree} */ +module.exports = { + zlib: zlib, + "node:zlib": { + ...zlib, + [READ]: { supported: ["14.13.1", "12.20.0"] }, + }, +} diff --git a/lib/unsupported-features/node-builtins.js b/lib/unsupported-features/node-builtins.js new file mode 100644 index 00000000..308e82d3 --- /dev/null +++ b/lib/unsupported-features/node-builtins.js @@ -0,0 +1,45 @@ +/** @type {import('./types.js').SupportVersionTree} */ +const NodeBuiltinModules = { + ...require("./node-builtins-modules/assert.js"), + ...require("./node-builtins-modules/async_hooks.js"), + ...require("./node-builtins-modules/buffer.js"), + ...require("./node-builtins-modules/child_process.js"), + ...require("./node-builtins-modules/cluster.js"), + ...require("./node-builtins-modules/console.js"), + ...require("./node-builtins-modules/crypto.js"), + ...require("./node-builtins-modules/dgram.js"), + ...require("./node-builtins-modules/diagnostics_channel.js"), + ...require("./node-builtins-modules/dns.js"), + ...require("./node-builtins-modules/domain.js"), + ...require("./node-builtins-modules/events.js"), + ...require("./node-builtins-modules/fs.js"), + ...require("./node-builtins-modules/http2.js"), + ...require("./node-builtins-modules/http.js"), + ...require("./node-builtins-modules/https.js"), + ...require("./node-builtins-modules/inspector.js"), + ...require("./node-builtins-modules/module.js"), + ...require("./node-builtins-modules/net.js"), + ...require("./node-builtins-modules/os.js"), + ...require("./node-builtins-modules/path.js"), + ...require("./node-builtins-modules/perf_hooks.js"), + ...require("./node-builtins-modules/process.js"), + ...require("./node-builtins-modules/punycode.js"), + ...require("./node-builtins-modules/querystring.js"), + ...require("./node-builtins-modules/readline.js"), + ...require("./node-builtins-modules/stream.js"), + ...require("./node-builtins-modules/string_decoder.js"), + ...require("./node-builtins-modules/test.js"), + ...require("./node-builtins-modules/timers.js"), + ...require("./node-builtins-modules/tls.js"), + ...require("./node-builtins-modules/trace_events.js"), + ...require("./node-builtins-modules/tty.js"), + ...require("./node-builtins-modules/url.js"), + ...require("./node-builtins-modules/util.js"), + ...require("./node-builtins-modules/v8.js"), + ...require("./node-builtins-modules/vm.js"), + ...require("./node-builtins-modules/wasi.js"), + ...require("./node-builtins-modules/worker_threads.js"), + ...require("./node-builtins-modules/zlib.js"), +} + +module.exports = { NodeBuiltinModules } diff --git a/lib/unsupported-features/types.js b/lib/unsupported-features/types.js new file mode 100644 index 00000000..f4270ed8 --- /dev/null +++ b/lib/unsupported-features/types.js @@ -0,0 +1,14 @@ +/** + * @typedef {Object} SupportInfo + * @property {string[]} experimental The node versions in which experimental support was added + * @property {string[]} supported The node versions in which stable support was added + * @property {string[]} deprecated The node versions in which support was removed + */ +/** + * @typedef {{ + * [key: readonly unique symbol]: SupportInfo | undefined; + * [key: string]: SupportVersionTree | undefined; + * }} SupportVersionTree + */ + +module.exports = {} diff --git a/lib/util/check-unsupported-builtins.js b/lib/util/check-unsupported-builtins.js index 09958a40..5ef32d31 100644 --- a/lib/util/check-unsupported-builtins.js +++ b/lib/util/check-unsupported-builtins.js @@ -55,10 +55,11 @@ function isSupported({ supported }, configured) { /** * Get the formatted text of a given supported version. * @param {SupportInfo} info The support info. + * @returns {null|string} */ function supportedVersionToString({ supported }) { if (supported == null || supported.length === 0) { - return "(none yet)" + return null } const [latest, ...backported] = rsort(supported) @@ -96,12 +97,25 @@ module.exports.checkUnsupportedBuiltins = function checkUnsupportedBuiltins( const name = unprefixNodeColon(path.join(".")) const supported = isSupported(info, options.version) - if (!supported && !options.ignores.has(name)) { + if (supported === true || options.ignores.has(name)) { + continue + } + const supportedVersion = supportedVersionToString(info) + if (supportedVersion == null) { + context.report({ + node, + messageId: "not-supported-yet", + data: { + name: path.join("."), + version: options.version.raw, + }, + }) + } else { context.report({ node, - messageId: "unsupported", + messageId: "not-supported-till", data: { - name, + name: path.join("."), supported: supportedVersionToString(info), version: options.version.raw, }, @@ -111,6 +125,13 @@ module.exports.checkUnsupportedBuiltins = function checkUnsupportedBuiltins( } exports.messages = { - unsupported: - "The '{{name}}' is not supported until Node.js {{supported}}. The configured version range is '{{version}}'.", + "not-supported-till": [ + "The '{{name}}' is still an experimental feature", + "and is not supported until Node.js {{supported}}.", + "The configured version range is '{{version}}'.", + ].join(" "), + "not-supported-yet": [ + "The '{{name}}' is still an experimental feature", + "The configured version range is '{{version}}'.", + ].join(" "), } diff --git a/lib/util/enumerate-property-names.js b/lib/util/enumerate-property-names.js index e7e72bab..fbf332c4 100644 --- a/lib/util/enumerate-property-names.js +++ b/lib/util/enumerate-property-names.js @@ -9,31 +9,42 @@ const unprefixNodeColon = require("./unprefix-node-colon") /** * Enumerate property names of a given object recursively. - * @param {object} trackMap The map for APIs to enumerate. - * @param {string[]|undefined} path The path to the current map. + * @param {import('../unsupported-features/types.js').SupportVersionTree} trackMap The map for APIs to enumerate. + * @param {string[]} [path] The path to the current map. + * @param {WeakSet} [recursionSet] A WeakSet used to block recursion (eg Module, Module.Module, Module.Module.Module) * @returns {IterableIterator} The property names of the map. */ -function* enumeratePropertyNames(trackMap, path = []) { - for (const key of Object.keys(trackMap)) { - const value = trackMap[key] - if (typeof value !== "object") { - continue - } - path.push(key) +function* enumeratePropertyNames( + trackMap, + path = [], + recursionSet = new WeakSet() +) { + if (recursionSet.has(trackMap)) { + return + } + + for (const key of Object.getOwnPropertyNames(trackMap)) { + const childValue = trackMap[key] + const childPath = [...path, key] + const childName = unprefixNodeColon(childPath.join(".")) - const name = unprefixNodeColon(path.join(".")) - if (value[CALL]) { - yield `${name}()` + if (childValue[CALL]) { + yield `${childName}()` } - if (value[CONSTRUCT]) { - yield `new ${name}()` + + if (childValue[CONSTRUCT]) { + yield `new ${childName}()` } - if (value[READ]) { - yield name + + if (childValue[READ]) { + yield childName } - yield* enumeratePropertyNames(value, path) - path.pop() + yield* enumeratePropertyNames( + childValue, + childPath, + recursionSet.add(trackMap) + ) } } diff --git a/tests/lib/rules/no-unsupported-features/es-builtins.js b/tests/lib/rules/no-unsupported-features/es-builtins.js index a98ca5f9..e71fb0b8 100644 --- a/tests/lib/rules/no-unsupported-features/es-builtins.js +++ b/tests/lib/rules/no-unsupported-features/es-builtins.js @@ -77,7 +77,7 @@ runTests([ options: [{ version: "14.0.0" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "AggregateError", supported: "15.0.0", @@ -110,7 +110,7 @@ runTests([ options: [{ version: "3.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "Array.from", supported: "4.0.0", @@ -143,7 +143,7 @@ runTests([ options: [{ version: "3.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "Array.of", supported: "4.0.0", @@ -176,7 +176,7 @@ runTests([ options: [{ version: "10.3.0" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "BigInt", supported: "10.4.0", @@ -190,7 +190,7 @@ runTests([ options: [{ version: "10.3.0" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "BigInt", supported: "10.4.0", @@ -215,7 +215,7 @@ runTests([ options: [{ version: "14.5.0" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "FinalizationRegistry", supported: "14.6.0", @@ -248,7 +248,7 @@ runTests([ options: [{ version: "0.11.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "Map", supported: "0.12.0", @@ -262,7 +262,7 @@ runTests([ options: [{ version: "0.11.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "Map", supported: "0.12.0", @@ -295,7 +295,7 @@ runTests([ options: [{ version: "0.11.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "Math.acosh", supported: "0.12.0", @@ -328,7 +328,7 @@ runTests([ options: [{ version: "0.11.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "Math.asinh", supported: "0.12.0", @@ -361,7 +361,7 @@ runTests([ options: [{ version: "0.11.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "Math.atanh", supported: "0.12.0", @@ -394,7 +394,7 @@ runTests([ options: [{ version: "0.11.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "Math.cbrt", supported: "0.12.0", @@ -427,7 +427,7 @@ runTests([ options: [{ version: "0.11.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "Math.clz32", supported: "0.12.0", @@ -460,7 +460,7 @@ runTests([ options: [{ version: "0.11.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "Math.cosh", supported: "0.12.0", @@ -493,7 +493,7 @@ runTests([ options: [{ version: "0.11.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "Math.expm1", supported: "0.12.0", @@ -526,7 +526,7 @@ runTests([ options: [{ version: "0.11.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "Math.fround", supported: "0.12.0", @@ -559,7 +559,7 @@ runTests([ options: [{ version: "0.11.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "Math.hypot", supported: "0.12.0", @@ -592,7 +592,7 @@ runTests([ options: [{ version: "0.11.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "Math.imul", supported: "0.12.0", @@ -625,7 +625,7 @@ runTests([ options: [{ version: "0.11.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "Math.log10", supported: "0.12.0", @@ -658,7 +658,7 @@ runTests([ options: [{ version: "0.11.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "Math.log1p", supported: "0.12.0", @@ -691,7 +691,7 @@ runTests([ options: [{ version: "0.11.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "Math.log2", supported: "0.12.0", @@ -724,7 +724,7 @@ runTests([ options: [{ version: "0.11.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "Math.sign", supported: "0.12.0", @@ -757,7 +757,7 @@ runTests([ options: [{ version: "0.11.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "Math.sinh", supported: "0.12.0", @@ -790,7 +790,7 @@ runTests([ options: [{ version: "0.11.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "Math.tanh", supported: "0.12.0", @@ -823,7 +823,7 @@ runTests([ options: [{ version: "0.11.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "Math.trunc", supported: "0.12.0", @@ -856,7 +856,7 @@ runTests([ options: [{ version: "0.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "Number.isFinite", supported: "0.10.0", @@ -889,7 +889,7 @@ runTests([ options: [{ version: "0.11.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "Number.isInteger", supported: "0.12.0", @@ -922,7 +922,7 @@ runTests([ options: [{ version: "0.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "Number.isNaN", supported: "0.10.0", @@ -955,7 +955,7 @@ runTests([ options: [{ version: "0.11.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "Number.isSafeInteger", supported: "0.12.0", @@ -988,7 +988,7 @@ runTests([ options: [{ version: "0.11.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "Number.parseFloat", supported: "0.12.0", @@ -1021,7 +1021,7 @@ runTests([ options: [{ version: "0.11.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "Number.parseInt", supported: "0.12.0", @@ -1054,7 +1054,7 @@ runTests([ options: [{ version: "3.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "Object.assign", supported: "4.0.0", @@ -1087,7 +1087,7 @@ runTests([ options: [{ version: "0.11.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "Object.getOwnPropertySymbols", supported: "0.12.0", @@ -1120,7 +1120,7 @@ runTests([ options: [{ version: "0.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "Object.is", supported: "0.10.0", @@ -1153,7 +1153,7 @@ runTests([ options: [{ version: "0.11.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "Object.setPrototypeOf", supported: "0.12.0", @@ -1182,7 +1182,7 @@ runTests([ options: [{ version: "0.11.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "Promise", supported: "0.12.0", @@ -1196,7 +1196,7 @@ runTests([ options: [{ version: "0.11.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "Promise", supported: "0.12.0", @@ -1225,7 +1225,7 @@ runTests([ options: [{ version: "12.8.1" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "Promise.allSettled", supported: "12.9.0", @@ -1239,7 +1239,7 @@ runTests([ options: [{ version: "12.8.1" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "Promise.allSettled", supported: "12.9.0", @@ -1268,7 +1268,7 @@ runTests([ options: [{ version: "14.0.0" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "Promise.any", supported: "15.0.0", @@ -1282,7 +1282,7 @@ runTests([ options: [{ version: "14.0.0" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "Promise.any", supported: "15.0.0", @@ -1311,7 +1311,7 @@ runTests([ options: [{ version: "5.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "Proxy", supported: "6.0.0", @@ -1325,7 +1325,7 @@ runTests([ options: [{ version: "5.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "Proxy", supported: "6.0.0", @@ -1354,7 +1354,7 @@ runTests([ options: [{ version: "5.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "Reflect", supported: "6.0.0", @@ -1368,7 +1368,7 @@ runTests([ options: [{ version: "5.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "Reflect", supported: "6.0.0", @@ -1397,7 +1397,7 @@ runTests([ options: [{ version: "0.11.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "Set", supported: "0.12.0", @@ -1411,7 +1411,7 @@ runTests([ options: [{ version: "0.11.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "Set", supported: "0.12.0", @@ -1444,7 +1444,7 @@ runTests([ options: [{ version: "3.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "String.fromCodePoint", supported: "4.0.0", @@ -1477,7 +1477,7 @@ runTests([ options: [{ version: "3.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "String.raw", supported: "4.0.0", @@ -1506,7 +1506,7 @@ runTests([ options: [{ version: "0.11.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "Symbol", supported: "0.12.0", @@ -1520,7 +1520,7 @@ runTests([ options: [{ version: "0.11.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "Symbol", supported: "0.12.0", @@ -1549,7 +1549,7 @@ runTests([ options: [{ version: "0.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "Int8Array", supported: "0.10.0", @@ -1563,7 +1563,7 @@ runTests([ options: [{ version: "0.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "Int8Array", supported: "0.10.0", @@ -1592,7 +1592,7 @@ runTests([ options: [{ version: "0.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "Uint8Array", supported: "0.10.0", @@ -1606,7 +1606,7 @@ runTests([ options: [{ version: "0.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "Uint8Array", supported: "0.10.0", @@ -1635,7 +1635,7 @@ runTests([ options: [{ version: "0.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "Uint8ClampedArray", supported: "0.10.0", @@ -1649,7 +1649,7 @@ runTests([ options: [{ version: "0.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "Uint8ClampedArray", supported: "0.10.0", @@ -1678,7 +1678,7 @@ runTests([ options: [{ version: "0.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "Int16Array", supported: "0.10.0", @@ -1692,7 +1692,7 @@ runTests([ options: [{ version: "0.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "Int16Array", supported: "0.10.0", @@ -1721,7 +1721,7 @@ runTests([ options: [{ version: "0.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "Uint16Array", supported: "0.10.0", @@ -1735,7 +1735,7 @@ runTests([ options: [{ version: "0.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "Uint16Array", supported: "0.10.0", @@ -1764,7 +1764,7 @@ runTests([ options: [{ version: "0.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "Int32Array", supported: "0.10.0", @@ -1778,7 +1778,7 @@ runTests([ options: [{ version: "0.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "Int32Array", supported: "0.10.0", @@ -1807,7 +1807,7 @@ runTests([ options: [{ version: "0.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "Uint32Array", supported: "0.10.0", @@ -1821,7 +1821,7 @@ runTests([ options: [{ version: "0.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "Uint32Array", supported: "0.10.0", @@ -1850,7 +1850,7 @@ runTests([ options: [{ version: "10.3.0" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "BigInt64Array", supported: "10.4.0", @@ -1864,7 +1864,7 @@ runTests([ options: [{ version: "10.3.0" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "BigInt64Array", supported: "10.4.0", @@ -1893,7 +1893,7 @@ runTests([ options: [{ version: "10.3.0" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "BigUint64Array", supported: "10.4.0", @@ -1907,7 +1907,7 @@ runTests([ options: [{ version: "10.3.0" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "BigUint64Array", supported: "10.4.0", @@ -1936,7 +1936,7 @@ runTests([ options: [{ version: "0.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "Float32Array", supported: "0.10.0", @@ -1950,7 +1950,7 @@ runTests([ options: [{ version: "0.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "Float32Array", supported: "0.10.0", @@ -1979,7 +1979,7 @@ runTests([ options: [{ version: "0.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "Float64Array", supported: "0.10.0", @@ -1993,7 +1993,7 @@ runTests([ options: [{ version: "0.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "Float64Array", supported: "0.10.0", @@ -2022,7 +2022,7 @@ runTests([ options: [{ version: "0.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "DataView", supported: "0.10.0", @@ -2036,7 +2036,7 @@ runTests([ options: [{ version: "0.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "DataView", supported: "0.10.0", @@ -2065,7 +2065,7 @@ runTests([ options: [{ version: "0.11.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "WeakMap", supported: "0.12.0", @@ -2079,7 +2079,7 @@ runTests([ options: [{ version: "0.11.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "WeakMap", supported: "0.12.0", @@ -2108,7 +2108,7 @@ runTests([ options: [{ version: "14.5.0" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "WeakRef", supported: "14.6.0", @@ -2122,7 +2122,7 @@ runTests([ options: [{ version: "14.5.0" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "WeakRef", supported: "14.6.0", @@ -2151,7 +2151,7 @@ runTests([ options: [{ version: "0.11.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "WeakSet", supported: "0.12.0", @@ -2165,7 +2165,7 @@ runTests([ options: [{ version: "0.11.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "WeakSet", supported: "0.12.0", @@ -2194,7 +2194,7 @@ runTests([ options: [{ version: "8.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "Atomics", supported: "8.10.0", @@ -2208,7 +2208,7 @@ runTests([ options: [{ version: "8.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "Atomics", supported: "8.10.0", @@ -2241,7 +2241,7 @@ runTests([ options: [{ version: "6.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "Object.values", supported: "7.0.0", @@ -2274,7 +2274,7 @@ runTests([ options: [{ version: "6.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "Object.entries", supported: "7.0.0", @@ -2307,7 +2307,7 @@ runTests([ options: [{ version: "6.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "Object.getOwnPropertyDescriptors", supported: "7.0.0", @@ -2336,7 +2336,7 @@ runTests([ options: [{ version: "8.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "SharedArrayBuffer", supported: "8.10.0", @@ -2350,7 +2350,7 @@ runTests([ options: [{ version: "8.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "SharedArrayBuffer", supported: "8.10.0", @@ -2385,7 +2385,7 @@ runTests([ options: [{ version: "11.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "globalThis", supported: "12.0.0", @@ -2399,7 +2399,7 @@ runTests([ options: [{ version: "11.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "globalThis", supported: "12.0.0", @@ -2415,7 +2415,7 @@ runTests([ }, errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "globalThis", supported: "12.0.0", diff --git a/tests/lib/rules/no-unsupported-features/node-builtins.js b/tests/lib/rules/no-unsupported-features/node-builtins.js index 079065de..ad0de17d 100644 --- a/tests/lib/rules/no-unsupported-features/node-builtins.js +++ b/tests/lib/rules/no-unsupported-features/node-builtins.js @@ -39,10 +39,6 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( code: "require('assert').strictEqual()", options: [{ version: "0.12.0" }], }, - { - code: "require('node:assert').strictEqual()", - options: [{ version: "0.12.0" }], - }, { code: "var assert = require('assert'); assert(); assert.strictEqual()", options: [{ version: "0.12.0" }], @@ -63,10 +59,6 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( code: "import assert from 'assert'; assert.deepStrictEqual()", options: [{ version: "4.0.0" }], }, - { - code: "import assert from 'node:assert'; assert.deepStrictEqual()", - options: [{ version: "4.0.0" }], - }, { code: "import { deepStrictEqual } from 'assert'; deepStrictEqual()", options: [{ version: "4.0.0" }], @@ -108,15 +100,6 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( }, ], }, - { - code: "require('node:assert').deepStrictEqual()", - options: [ - { - version: "3.9.9", - ignores: ["assert.deepStrictEqual"], - }, - ], - }, { code: "var assert = require('assert'); assert.deepStrictEqual()", options: [ @@ -217,116 +200,106 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( { version: "14.2.0", ignores: ["assert.CallTracker"] }, ], }, - ], - invalid: [ + { - code: "require('assert').deepStrictEqual()", - options: [{ version: "3.9.9" }], - errors: [ + code: "const assert = require('node:assert'); assert.deepStrictEqual()", + options: [{ version: "12.20.0" }], + }, + { + code: "import assert from 'node:assert'; assert.deepStrictEqual()", + options: [{ version: "14.13.1" }], + }, + { + code: "require('node:assert').match()", + options: [ { - messageId: "unsupported", - data: { - name: "assert.deepStrictEqual", - supported: "4.0.0", - version: "3.9.9", - }, + version: "15.0.0", + ignores: ["assert.match"], }, ], }, + ], + invalid: [ { - code: "require('node:assert').deepStrictEqual()", - options: [{ version: "3.9.9" }], + code: "require('assert').deepStrictEqual()", + options: [{ version: "1.1.0" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "assert.deepStrictEqual", - supported: "4.0.0", - version: "3.9.9", + supported: "1.2.0", + version: "1.1.0", }, }, ], }, { code: "var assert = require('assert'); assert.deepStrictEqual()", - options: [{ version: "3.9.9" }], + options: [{ version: "1.1.0" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "assert.deepStrictEqual", - supported: "4.0.0", - version: "3.9.9", + supported: "1.2.0", + version: "1.1.0", }, }, ], }, { code: "var { deepStrictEqual } = require('assert'); deepStrictEqual()", - options: [{ version: "3.9.9" }], + options: [{ version: "1.1.0" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "assert.deepStrictEqual", - supported: "4.0.0", - version: "3.9.9", + supported: "1.2.0", + version: "1.1.0", }, }, ], }, { code: "import assert from 'assert'; assert.deepStrictEqual()", - options: [{ version: "3.9.9" }], - errors: [ - { - messageId: "unsupported", - data: { - name: "assert.deepStrictEqual", - supported: "4.0.0", - version: "3.9.9", - }, - }, - ], - }, - { - code: "import assert from 'node:assert'; assert.deepStrictEqual()", - options: [{ version: "3.9.9" }], + options: [{ version: "1.1.0" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "assert.deepStrictEqual", - supported: "4.0.0", - version: "3.9.9", + supported: "1.2.0", + version: "1.1.0", }, }, ], }, { code: "import { deepStrictEqual } from 'assert'; deepStrictEqual()", - options: [{ version: "3.9.9" }], + options: [{ version: "1.1.0" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "assert.deepStrictEqual", - supported: "4.0.0", - version: "3.9.9", + supported: "1.2.0", + version: "1.1.0", }, }, ], }, { code: "require('assert').notDeepStrictEqual()", - options: [{ version: "3.9.9" }], + options: [{ version: "1.1.0" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "assert.notDeepStrictEqual", - supported: "4.0.0", - version: "3.9.9", + supported: "1.2.0", + version: "1.1.0", }, }, ], @@ -336,7 +309,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "9.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "assert.rejects", supported: "10.0.0", @@ -350,7 +323,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "9.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "assert.doesNotReject", supported: "10.0.0", @@ -364,7 +337,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "9.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "assert.strict.rejects", supported: "10.0.0", @@ -378,7 +351,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "9.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "assert.strict.doesNotReject", supported: "10.0.0", @@ -392,7 +365,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "9.8.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "assert.strict", supported: "9.9.0 (backported: ^8.13.0)", @@ -406,7 +379,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "9.8.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "assert.strict", supported: "9.9.0 (backported: ^8.13.0)", @@ -414,7 +387,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( }, }, { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "assert.strict.rejects", supported: "10.0.0", @@ -428,10 +401,9 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "14.2.0" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-yet", data: { name: "assert.CallTracker", - supported: "(none yet)", version: "14.2.0", }, }, @@ -442,15 +414,42 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "14.2.0" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-yet", data: { name: "assert.CallTracker", - supported: "(none yet)", version: "14.2.0", }, }, ], }, + { + code: "require('node:assert').deepStrictEqual()", + options: [{ version: "3.9.9" }], + errors: [ + { + messageId: "not-supported-till", + data: { + name: "node:assert", + supported: "14.13.1 (backported: ^12.20.0)", + version: "3.9.9", + }, + }, + ], + }, + { + code: "import assert from 'node:assert';", + options: [{ version: "3.9.9" }], + errors: [ + { + messageId: "not-supported-till", + data: { + name: "node:assert", + supported: "14.13.1 (backported: ^12.20.0)", + version: "3.9.9", + }, + }, + ], + }, ], }, @@ -461,366 +460,185 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( valid: [ { code: "require('async_hooks')", - options: [{ version: "8.0.0" }], - }, - { - code: "require('node:async_hooks')", - options: [{ version: "8.0.0" }], + options: [{ version: "16.4.0" }], }, { code: "import hooks from 'async_hooks'", - options: [{ version: "8.0.0" }], - }, - { - code: "import hooks from 'node:async_hooks'", - options: [{ version: "8.0.0" }], - }, - { - code: "require('async_hooks').createHook()", - options: [{ version: "8.1.0" }], - }, - { - code: "var hooks = require('async_hooks'); hooks.createHook()", - options: [{ version: "8.1.0" }], - }, - { - code: "var { createHook } = require('async_hooks'); createHook()", - options: [{ version: "8.1.0" }], - }, - { - code: "import hooks from 'async_hooks'; hooks.createHook()", - options: [{ version: "8.1.0" }], - }, - { - code: "import { createHook } from 'async_hooks'; createHook()", - options: [{ version: "8.1.0" }], + options: [{ version: "16.4.0" }], }, { code: "const { AsyncLocalStorage } = require('async_hooks'); new AsyncLocalStorage();", - options: [{ version: "13.10.0" }], + options: [{ version: "16.4.0" }], }, { code: "import hooks from 'async_hooks'; new hooks.AsyncLocalStorage();", - options: [{ version: "13.10.0" }], - }, - { - code: "const { AsyncLocalStorage } = require('async_hooks'); new AsyncLocalStorage();", - options: [{ version: "12.17.0" }], - }, - { - code: "import hooks from 'async_hooks'; new hooks.AsyncLocalStorage();", - options: [{ version: "12.17.0" }], + options: [{ version: "16.4.0" }], }, // Ignores - { - code: "require('async_hooks')", - options: [{ version: "7.9.9", ignores: ["async_hooks"] }], - }, - { - code: "require('node:async_hooks')", - options: [{ version: "7.9.9", ignores: ["async_hooks"] }], - }, - { - code: "import hooks from 'async_hooks'", - options: [{ version: "7.9.9", ignores: ["async_hooks"] }], - }, - { - code: "import hooks from 'node:async_hooks'", - options: [{ version: "7.9.9", ignores: ["async_hooks"] }], - }, - { - code: "import { createHook } from 'async_hooks'", - options: [ - { - version: "7.9.9", - ignores: ["async_hooks", "async_hooks.createHook"], - }, - ], - }, - { - code: "require('async_hooks').createHook()", - options: [ - { - version: "8.0.9", - ignores: ["async_hooks.createHook"], - }, - ], - }, - { - code: "var hooks = require('async_hooks'); hooks.createHook()", - options: [ - { - version: "8.0.9", - ignores: ["async_hooks.createHook"], - }, - ], - }, - { - code: "var { createHook } = require('async_hooks'); createHook()", - options: [ - { - version: "8.0.9", - ignores: ["async_hooks.createHook"], - }, - ], - }, - { - code: "import async_hooks from 'async_hooks'; async_hooks.createHook()", - options: [ - { - version: "8.0.9", - ignores: ["async_hooks.createHook"], - }, - ], - }, - { - code: "import { createHook } from 'async_hooks'; createHook()", - options: [ - { - version: "8.0.9", - ignores: ["async_hooks.createHook"], - }, - ], - }, - { - code: "const { AsyncLocalStorage } = require('async_hooks'); new AsyncLocalStorage();", - options: [ - { - version: "13.9.0", - ignores: ["async_hooks.AsyncLocalStorage"], - }, - ], - }, - { - code: "import hooks from 'async_hooks'; new hooks.AsyncLocalStorage();", - options: [ - { - version: "13.9.0", - ignores: ["async_hooks.AsyncLocalStorage"], - }, - ], - }, - { - code: "const { AsyncLocalStorage } = require('async_hooks'); new AsyncLocalStorage();", + ...[ + "require('async_hooks')", + "import hooks from 'async_hooks'", + + "require('async_hooks').createHook()", + "const hooks = require('async_hooks'); hooks.createHook()", + "const { createHook } = require('async_hooks'); createHook()", + + "import * as hooks from 'async_hooks'; hooks.createHook()", + "import hooks from 'async_hooks'; hooks.createHook()", + "import { createHook } from 'async_hooks'; createHook()", + + "new require('async_hooks').AsyncLocalStorage()", + "const hooks = require('async_hooks'); new hooks.AsyncLocalStorage()", + "const { AsyncLocalStorage } = require('async_hooks'); new AsyncLocalStorage()", + + "import * as hooks from 'async_hooks'; new hooks.AsyncLocalStorage()", + "import hooks from 'async_hooks'; new hooks.AsyncLocalStorage()", + "import { AsyncLocalStorage } from 'async_hooks'; new AsyncLocalStorage()", + + "require('node:async_hooks').createHook()", + "const hooks = require('node:async_hooks'); hooks.createHook()", + "const { createHook } = require('node:async_hooks'); createHook()", + + "import * as hooks from 'node:async_hooks'; hooks.createHook()", + "import hooks from 'node:async_hooks'; hooks.createHook()", + "import { createHook } from 'node:async_hooks'; createHook()", + + "new require('node:async_hooks').AsyncLocalStorage()", + "const hooks = require('node:async_hooks'); new hooks.AsyncLocalStorage()", + "const { AsyncLocalStorage } = require('node:async_hooks'); new AsyncLocalStorage()", + + "import * as hooks from 'node:async_hooks'; new hooks.AsyncLocalStorage()", + "import hooks from 'node:async_hooks'; new hooks.AsyncLocalStorage()", + "import { AsyncLocalStorage } from 'node:async_hooks'; new AsyncLocalStorage()", + ].map(code => ({ + code: code, options: [ { - version: "12.16.0", - ignores: ["async_hooks.AsyncLocalStorage"], + version: "14.0.0", + ignores: [ + "async_hooks", + "async_hooks.createHook", + "async_hooks.AsyncLocalStorage", + ], }, ], - }, + })), + { - code: "import hooks from 'async_hooks'; new hooks.AsyncLocalStorage();", - options: [ - { - version: "12.16.0", - ignores: ["async_hooks.AsyncLocalStorage"], - }, - ], + code: "require('node:async_hooks')", + options: [{ version: "16.4.0" }], }, - ], - invalid: [ { - code: "require('async_hooks')", - options: [{ version: "7.9.9" }], - errors: [ - { - messageId: "unsupported", - data: { - name: "async_hooks", - supported: "8.0.0", - version: "7.9.9", - }, - }, - ], + code: "import hooks from 'node:async_hooks'", + options: [{ version: "16.4.0" }], }, { code: "require('node:async_hooks')", - options: [{ version: "7.9.9" }], - errors: [ - { - messageId: "unsupported", - data: { - name: "async_hooks", - supported: "8.0.0", - version: "7.9.9", - }, - }, - ], - }, - { - code: "import hooks from 'async_hooks'", - options: [{ version: "7.9.9" }], - errors: [ - { - messageId: "unsupported", - data: { - name: "async_hooks", - supported: "8.0.0", - version: "7.9.9", - }, - }, - ], + options: [{ version: "12.0.0", ignores: ["async_hooks"] }], }, { code: "import hooks from 'node:async_hooks'", - options: [{ version: "7.9.9" }], - errors: [ - { - messageId: "unsupported", - data: { - name: "async_hooks", - supported: "8.0.0", - version: "7.9.9", - }, - }, - ], + options: [{ version: "12.0.0", ignores: ["async_hooks"] }], }, - { - code: "import { createHook } from 'async_hooks'", + ], + invalid: [ + ...[ + "require('async_hooks')", + "import hooks from 'async_hooks'", + ].map(code => ({ + code: code, options: [{ version: "7.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "async_hooks", - supported: "8.0.0", - version: "7.9.9", - }, - }, - { - messageId: "unsupported", - data: { - name: "async_hooks.createHook", - supported: "8.1.0", + supported: "16.4.0", version: "7.9.9", }, }, ], - }, - { - code: "require('async_hooks').createHook()", - options: [{ version: "8.0.9" }], - errors: [ - { - messageId: "unsupported", - data: { - name: "async_hooks.createHook", - supported: "8.1.0", - version: "8.0.9", - }, - }, - ], - }, - { - code: "var hooks = require('async_hooks'); hooks.createHook()", - options: [{ version: "8.0.9" }], - errors: [ - { - messageId: "unsupported", - data: { - name: "async_hooks.createHook", - supported: "8.1.0", - version: "8.0.9", - }, - }, - ], - }, - { - code: "var { createHook } = require('async_hooks'); createHook()", - options: [{ version: "8.0.9" }], - errors: [ - { - messageId: "unsupported", - data: { - name: "async_hooks.createHook", - supported: "8.1.0", - version: "8.0.9", - }, - }, - ], - }, - { - code: "import async_hooks from 'async_hooks'; async_hooks.createHook()", - options: [{ version: "8.0.9" }], - errors: [ - { - messageId: "unsupported", - data: { - name: "async_hooks.createHook", - supported: "8.1.0", - version: "8.0.9", - }, - }, - ], - }, - { - code: "import { createHook } from 'async_hooks'; createHook()", - options: [{ version: "8.0.9" }], + })), + + ...[ + "require('async_hooks').createHook()", + "const { createHook } = require('async_hooks')", + "const { createHook } = require('async_hooks'); createHook()", + "const hooks = require('async_hooks'); hooks.createHook()", + + "import { createHook } from 'async_hooks'", + "import { createHook } from 'async_hooks'; createHook()", + "import async_hooks from 'async_hooks'; async_hooks.createHook()", + ].map(code => ({ + code: code, + options: [{ version: "16.5.0" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-yet", data: { name: "async_hooks.createHook", - supported: "8.1.0", - version: "8.0.9", + version: "16.5.0", }, }, ], - }, - { - code: "const { AsyncLocalStorage } = require('async_hooks'); new AsyncLocalStorage();", + })), + + ...[ + // "new require('async_hooks').AsyncLocalStorage()", + "const hooks = require('async_hooks'); new hooks.AsyncLocalStorage()", + // "const { AsyncLocalStorage } = require('async_hooks'); new AsyncLocalStorage()", + + "import * as hooks from 'async_hooks'; new hooks.AsyncLocalStorage()", + "import hooks from 'async_hooks'; new hooks.AsyncLocalStorage()", + "import { AsyncLocalStorage } from 'async_hooks'; new AsyncLocalStorage()", + ].map(code => ({ + code: code, options: [{ version: "13.9.0" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { - name: "async_hooks.AsyncLocalStorage", - supported: "13.10.0 (backported: ^12.17.0)", + name: "async_hooks", + supported: "16.4.0", version: "13.9.0", }, }, - ], - }, - { - code: "import hooks from 'async_hooks'; new hooks.AsyncLocalStorage();", - options: [{ version: "13.9.0" }], - errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "async_hooks.AsyncLocalStorage", - supported: "13.10.0 (backported: ^12.17.0)", + supported: "16.4.0", version: "13.9.0", }, }, ], - }, + })), + { - code: "const { AsyncLocalStorage } = require('async_hooks'); new AsyncLocalStorage();", - options: [{ version: "12.16.0" }], + code: "require('node:async_hooks')", + options: [{ version: "7.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { - name: "async_hooks.AsyncLocalStorage", - supported: "13.10.0 (backported: ^12.17.0)", - version: "12.16.0", + name: "node:async_hooks", + supported: "16.4.0", + version: "7.9.9", }, }, ], }, { - code: "import hooks from 'async_hooks'; new hooks.AsyncLocalStorage();", - options: [{ version: "12.16.0" }], + code: "import hooks from 'node:async_hooks'", + options: [{ version: "7.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { - name: "async_hooks.AsyncLocalStorage", - supported: "13.10.0 (backported: ^12.17.0)", - version: "12.16.0", + name: "node:async_hooks", + supported: "16.4.0", + version: "7.9.9", }, }, ], @@ -1005,10 +823,10 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "4.4.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "Buffer.alloc", - supported: "4.5.0", + supported: "5.10.0 (backported: ^4.5.0)", version: "4.4.9", }, }, @@ -1019,10 +837,10 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "4.4.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "Buffer.allocUnsafe", - supported: "4.5.0", + supported: "5.10.0 (backported: ^4.5.0)", version: "4.4.9", }, }, @@ -1033,10 +851,10 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "4.4.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "Buffer.allocUnsafeSlow", - supported: "4.5.0", + supported: "5.12.0 (backported: ^4.5.0)", version: "4.4.9", }, }, @@ -1047,10 +865,10 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "4.4.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "Buffer.from", - supported: "4.5.0", + supported: "5.10.0 (backported: ^4.5.0)", version: "4.4.9", }, }, @@ -1061,7 +879,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "8.1.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "buffer.constants", supported: "8.2.0", @@ -1075,7 +893,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "8.1.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "buffer.constants", supported: "8.2.0", @@ -1089,7 +907,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "8.1.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "buffer.constants", supported: "8.2.0", @@ -1103,7 +921,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "8.1.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "buffer.constants", supported: "8.2.0", @@ -1117,7 +935,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "8.1.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "buffer.constants", supported: "8.2.0", @@ -1131,10 +949,10 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "4.4.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "buffer.Buffer.alloc", - supported: "4.5.0", + supported: "5.10.0 (backported: ^4.5.0)", version: "4.4.9", }, }, @@ -1145,10 +963,10 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "4.4.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "buffer.Buffer.allocUnsafe", - supported: "4.5.0", + supported: "5.10.0 (backported: ^4.5.0)", version: "4.4.9", }, }, @@ -1159,10 +977,10 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "4.4.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "buffer.Buffer.allocUnsafeSlow", - supported: "4.5.0", + supported: "5.12.0 (backported: ^4.5.0)", version: "4.4.9", }, }, @@ -1173,10 +991,10 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "4.4.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "buffer.Buffer.from", - supported: "4.5.0", + supported: "5.10.0 (backported: ^4.5.0)", version: "4.4.9", }, }, @@ -1187,7 +1005,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "2.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "buffer.kMaxLength", supported: "3.0.0", @@ -1201,7 +1019,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "7.0.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "buffer.transcode", supported: "7.1.0", @@ -1215,10 +1033,10 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "15.7.0" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "buffer.Blob", - supported: "(none yet)", + supported: "18.0.0 (backported: ^16.17.0)", version: "15.7.0", }, }, @@ -1229,10 +1047,10 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "15.7.0" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "buffer.Blob", - supported: "(none yet)", + supported: "18.0.0 (backported: ^16.17.0)", version: "15.7.0", }, }, @@ -1320,7 +1138,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "2.1.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "child_process.ChildProcess", supported: "2.2.0", @@ -1334,7 +1152,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "2.1.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "child_process.ChildProcess", supported: "2.2.0", @@ -1348,7 +1166,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "2.1.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "child_process.ChildProcess", supported: "2.2.0", @@ -1362,7 +1180,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "2.1.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "child_process.ChildProcess", supported: "2.2.0", @@ -1376,7 +1194,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "2.1.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "child_process.ChildProcess", supported: "2.2.0", @@ -1534,12 +1352,6 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( code: "console.table()", options: [{ version: "9.9.9", ignores: ["console.table"] }], }, - { - code: "console.markTimeline()", - options: [ - { version: "7.9.9", ignores: ["console.markTimeline"] }, - ], - }, { code: "console.profile()", options: [ @@ -1558,18 +1370,6 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( { version: "7.9.9", ignores: ["console.timeStamp"] }, ], }, - { - code: "console.timeline()", - options: [ - { version: "7.9.9", ignores: ["console.timeline"] }, - ], - }, - { - code: "console.timelineEnd()", - options: [ - { version: "7.9.9", ignores: ["console.timelineEnd"] }, - ], - }, ], invalid: [ { @@ -1577,7 +1377,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "8.2.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "console.clear", supported: "8.3.0 (backported: ^6.13.0)", @@ -1591,7 +1391,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "8.2.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "console.clear", supported: "8.3.0 (backported: ^6.13.0)", @@ -1605,7 +1405,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "8.2.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "console.clear", supported: "8.3.0 (backported: ^6.13.0)", @@ -1619,7 +1419,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "8.2.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "console.clear", supported: "8.3.0 (backported: ^6.13.0)", @@ -1633,7 +1433,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "8.2.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "console.clear", supported: "8.3.0 (backported: ^6.13.0)", @@ -1647,7 +1447,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "8.2.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "console.count", supported: "8.3.0 (backported: ^6.13.0)", @@ -1661,7 +1461,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "8.2.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "console.countReset", supported: "8.3.0 (backported: ^6.13.0)", @@ -1675,7 +1475,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "7.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "console.debug", supported: "8.0.0", @@ -1689,7 +1489,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "7.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "console.dirxml", supported: "8.0.0", @@ -1703,7 +1503,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "8.4.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "console.group", supported: "8.5.0", @@ -1717,7 +1517,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "8.4.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "console.groupCollapsed", supported: "8.5.0", @@ -1731,7 +1531,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "8.4.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "console.groupEnd", supported: "8.5.0", @@ -1745,7 +1545,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "9.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "console.table", supported: "10.0.0", @@ -1754,26 +1554,12 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( }, ], }, - { - code: "console.markTimeline()", - options: [{ version: "7.9.9" }], - errors: [ - { - messageId: "unsupported", - data: { - name: "console.markTimeline", - supported: "8.0.0", - version: "7.9.9", - }, - }, - ], - }, { code: "console.profile()", options: [{ version: "7.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "console.profile", supported: "8.0.0", @@ -1787,7 +1573,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "7.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "console.profileEnd", supported: "8.0.0", @@ -1801,7 +1587,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "7.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "console.timeStamp", supported: "8.0.0", @@ -1810,34 +1596,6 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( }, ], }, - { - code: "console.timeline()", - options: [{ version: "7.9.9" }], - errors: [ - { - messageId: "unsupported", - data: { - name: "console.timeline", - supported: "8.0.0", - version: "7.9.9", - }, - }, - ], - }, - { - code: "console.timelineEnd()", - options: [{ version: "7.9.9" }], - errors: [ - { - messageId: "unsupported", - data: { - name: "console.timelineEnd", - supported: "8.0.0", - version: "7.9.9", - }, - }, - ], - }, ], }, @@ -2074,7 +1832,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "6.2.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "crypto.constants", supported: "6.3.0", @@ -2088,7 +1846,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "6.2.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "crypto.constants", supported: "6.3.0", @@ -2102,7 +1860,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "6.2.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "crypto.constants", supported: "6.3.0", @@ -2116,7 +1874,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "6.2.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "crypto.constants", supported: "6.3.0", @@ -2130,7 +1888,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "6.2.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "crypto.constants", supported: "6.3.0", @@ -2144,7 +1902,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "8.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "crypto.Certificate.exportChallenge", supported: "9.0.0", @@ -2158,7 +1916,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "8.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "crypto.Certificate.exportChallenge", supported: "9.0.0", @@ -2172,7 +1930,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "8.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "crypto.Certificate.exportPublicKey", supported: "9.0.0", @@ -2186,7 +1944,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "8.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "crypto.Certificate.verifySpkac", supported: "9.0.0", @@ -2200,7 +1958,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "5.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "crypto.fips", supported: "6.0.0", @@ -2214,7 +1972,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "2.2.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "crypto.getCurves", supported: "2.3.0", @@ -2228,7 +1986,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "9.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "crypto.getFips", supported: "10.0.0", @@ -2242,7 +2000,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "1.0.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "crypto.privateEncrypt", supported: "1.1.0", @@ -2256,7 +2014,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "1.0.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "crypto.publicDecrypt", supported: "1.1.0", @@ -2270,7 +2028,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "7.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "crypto.randomFillSync", supported: "7.10.0 (backported: ^6.13.0)", @@ -2284,7 +2042,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "7.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "crypto.randomFill", supported: "7.10.0 (backported: ^6.13.0)", @@ -2298,7 +2056,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "10.4.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "crypto.scrypt", supported: "10.5.0", @@ -2312,7 +2070,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "10.4.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "crypto.scryptSync", supported: "10.5.0", @@ -2326,7 +2084,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "9.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "crypto.setFips", supported: "10.0.0", @@ -2340,7 +2098,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "6.5.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "crypto.timingSafeEqual", supported: "6.6.0", @@ -2426,7 +2184,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "8.2.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "dns.Resolver", supported: "8.3.0", @@ -2440,7 +2198,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "8.2.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "dns.Resolver", supported: "8.3.0", @@ -2454,7 +2212,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "8.2.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "dns.Resolver", supported: "8.3.0", @@ -2468,7 +2226,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "8.2.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "dns.Resolver", supported: "8.3.0", @@ -2482,7 +2240,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "8.2.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "dns.Resolver", supported: "8.3.0", @@ -2496,7 +2254,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "5.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "dns.resolvePtr", supported: "6.0.0", @@ -2510,7 +2268,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "11.13.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "dns.promises", supported: "11.14.0 (backported: ^10.17.0)", @@ -2779,7 +2537,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "11.13.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "fs.promises", supported: "11.14.0 (backported: ^10.17.0)", @@ -2793,7 +2551,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "11.13.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "fs.promises", supported: "11.14.0 (backported: ^10.17.0)", @@ -2807,7 +2565,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "11.13.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "fs.promises", supported: "11.14.0 (backported: ^10.17.0)", @@ -2821,7 +2579,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "11.13.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "fs.promises", supported: "11.14.0 (backported: ^10.17.0)", @@ -2835,7 +2593,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "11.13.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "fs.promises", supported: "11.14.0 (backported: ^10.17.0)", @@ -2849,7 +2607,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "8.4.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "fs.copyFile", supported: "8.5.0", @@ -2863,7 +2621,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "8.4.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "fs.copyFileSync", supported: "8.5.0", @@ -2877,7 +2635,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "5.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "fs.mkdtemp", supported: "5.10.0", @@ -2891,7 +2649,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "5.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "fs.mkdtempSync", supported: "5.10.0", @@ -2905,7 +2663,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "9.1.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "fs.realpath.native", supported: "9.2.0", @@ -2919,7 +2677,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "9.1.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "fs.realpathSync.native", supported: "9.2.0", @@ -2933,7 +2691,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "14.4.0" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "fs.lutimes", supported: "14.5.0 (backported: ^12.19.0)", @@ -2947,7 +2705,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "14.4.0" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "fs.lutimesSync", supported: "14.5.0 (backported: ^12.19.0)", @@ -2961,7 +2719,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "13.12.0" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "fs.readv", supported: "13.13.0 (backported: ^12.17.0)", @@ -2979,7 +2737,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( ], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "fs.readvSync", supported: "13.13.0 (backported: ^12.17.0)", @@ -2993,7 +2751,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "12.11.0" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "fs.opendir", supported: "12.12.0", @@ -3007,7 +2765,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "12.11.0" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "fs.opendirSync", supported: "12.12.0", @@ -3021,7 +2779,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "14.13.0" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "fs.rm", supported: "14.14.0", @@ -3035,7 +2793,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "14.13.0" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "fs.rmSync", supported: "14.14.0", @@ -3044,68 +2802,12 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( }, ], }, - { - code: "require('fs').read", - options: [{ version: "13.10.0" }], - errors: [ - { - messageId: "unsupported", - data: { - name: "fs.read", - supported: "13.11.0 (backported: ^12.17.0)", - version: "13.10.0", - }, - }, - ], - }, - { - code: "require('fs').readSync", - options: [{ version: "13.10.0" }], - errors: [ - { - messageId: "unsupported", - data: { - name: "fs.readSync", - supported: "13.11.0 (backported: ^12.17.0)", - version: "13.10.0", - }, - }, - ], - }, - { - code: "require('fs').read", - options: [{ version: "12.16.0" }], - errors: [ - { - messageId: "unsupported", - data: { - name: "fs.read", - supported: "13.11.0 (backported: ^12.17.0)", - version: "12.16.0", - }, - }, - ], - }, - { - code: "require('fs').readSync", - options: [{ version: "12.16.0" }], - errors: [ - { - messageId: "unsupported", - data: { - name: "fs.readSync", - supported: "13.11.0 (backported: ^12.17.0)", - version: "12.16.0", - }, - }, - ], - }, { code: "require('fs').Dir", options: [{ version: "12.11.0" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "fs.Dir", supported: "12.12.0", @@ -3119,7 +2821,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "14.2.0" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "fs.StatWatcher", supported: "14.3.0 (backported: ^12.20.0)", @@ -3133,7 +2835,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "12.19.0" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "fs.StatWatcher", supported: "14.3.0 (backported: ^12.20.0)", @@ -3155,16 +2857,16 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "14.0.0" }], }, { - code: "import * as fs from 'node:fs/promises';", + code: "require('fs/promise')", options: [{ version: "14.0.0" }], }, { - code: "require('fs/promise')", - options: [{ version: "14.0.0" }], + code: "import * as fs from 'node:fs/promises';", + options: [{ version: "14.13.1" }], }, { code: "require('node:fs/promise')", - options: [{ version: "14.0.0" }], + options: [{ version: "14.13.1" }], }, { code: "import * as fs from 'fs/promises';", @@ -3189,7 +2891,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "13.14.0" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "fs/promises", supported: "14.0.0", @@ -3199,11 +2901,11 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( ], }, { - code: "import * as fs from 'node:fs/promises';", + code: "require('fs/promises');", options: [{ version: "13.14.0" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "fs/promises", supported: "14.0.0", @@ -3213,11 +2915,11 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( ], }, { - code: "require('fs/promises');", + code: "const fs = require('fs/promises');", options: [{ version: "13.14.0" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "fs/promises", supported: "14.0.0", @@ -3226,29 +2928,30 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( }, ], }, + { code: "require('node:fs/promises');", options: [{ version: "13.14.0" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { - name: "fs/promises", - supported: "14.0.0", + name: "node:fs/promises", + supported: "14.13.1", version: "13.14.0", }, }, ], }, { - code: "const fs = require('fs/promises');", + code: "import * as fs from 'node:fs/promises';", options: [{ version: "13.14.0" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { - name: "fs/promises", - supported: "14.0.0", + name: "node:fs/promises", + supported: "14.13.1", version: "13.14.0", }, }, @@ -3285,7 +2988,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "8.3.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "http2", supported: "10.10.0 (backported: ^8.13.0)", @@ -3299,7 +3002,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "8.3.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "http2", supported: "10.10.0 (backported: ^8.13.0)", @@ -3313,13 +3016,21 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "8.3.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "http2", supported: "10.10.0 (backported: ^8.13.0)", version: "8.3.9", }, }, + { + messageId: "not-supported-till", + data: { + name: "http2.createServer", + supported: "8.4.0", + version: "8.3.9", + }, + }, ], }, ], @@ -3338,6 +3049,15 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( code: "import inspector from 'inspector'", options: [{ version: "7.9.9", ignores: ["inspector"] }], }, + { + code: "import { open } from 'inspector'", + options: [ + { + version: "7.9.9", + ignores: ["inspector", "inspector.open"], + }, + ], + }, ], invalid: [ { @@ -3345,10 +3065,10 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "7.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "inspector", - supported: "(none yet)", + supported: "14.0.0", version: "7.9.9", }, }, @@ -3359,10 +3079,10 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "7.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "inspector", - supported: "(none yet)", + supported: "14.0.0", version: "7.9.9", }, }, @@ -3373,10 +3093,18 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "7.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "inspector", - supported: "(none yet)", + supported: "14.0.0", + version: "7.9.9", + }, + }, + { + messageId: "not-supported-till", + data: { + name: "inspector.open", + supported: "8.0.0", version: "7.9.9", }, }, @@ -3423,7 +3151,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "8.8.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "require.resolve.paths", supported: "8.9.0", @@ -3437,7 +3165,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "9.2.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "module.builtinModules", supported: @@ -3520,10 +3248,10 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "6.2.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "os.constants", - supported: "6.3.0", + supported: "6.3.0 (backported: ^5.11.0)", version: "6.2.9", }, }, @@ -3534,10 +3262,10 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "6.2.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "os.constants", - supported: "6.3.0", + supported: "6.3.0 (backported: ^5.11.0)", version: "6.2.9", }, }, @@ -3548,10 +3276,10 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "6.2.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "os.constants", - supported: "6.3.0", + supported: "6.3.0 (backported: ^5.11.0)", version: "6.2.9", }, }, @@ -3562,10 +3290,10 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "6.2.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "os.constants", - supported: "6.3.0", + supported: "6.3.0 (backported: ^5.11.0)", version: "6.2.9", }, }, @@ -3576,10 +3304,10 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "6.2.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "os.constants", - supported: "6.3.0", + supported: "6.3.0 (backported: ^5.11.0)", version: "6.2.9", }, }, @@ -3590,7 +3318,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "2.2.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "os.homedir", supported: "2.3.0", @@ -3604,7 +3332,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "5.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "os.userInfo", supported: "6.0.0", @@ -3695,7 +3423,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "8.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "path.toNamespacedPath", supported: "9.0.0", @@ -3709,7 +3437,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "8.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "path.toNamespacedPath", supported: "9.0.0", @@ -3723,7 +3451,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "8.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "path.toNamespacedPath", supported: "9.0.0", @@ -3737,7 +3465,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "8.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "path.toNamespacedPath", supported: "9.0.0", @@ -3751,7 +3479,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "8.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "path.toNamespacedPath", supported: "9.0.0", @@ -3791,7 +3519,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "8.4.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "perf_hooks", supported: "8.5.0", @@ -3805,7 +3533,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "8.4.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "perf_hooks", supported: "8.5.0", @@ -3819,7 +3547,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "8.4.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "perf_hooks", supported: "8.5.0", @@ -4003,7 +3731,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "6.3.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "process.argv0", supported: "6.4.0", @@ -4017,7 +3745,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "6.3.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "process.argv0", supported: "6.4.0", @@ -4031,7 +3759,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "6.3.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "process.argv0", supported: "6.4.0", @@ -4045,7 +3773,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "6.3.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "process.argv0", supported: "6.4.0", @@ -4059,7 +3787,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "6.3.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "process.argv0", supported: "6.4.0", @@ -4073,7 +3801,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "7.0.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "process.channel", supported: "7.1.0", @@ -4087,7 +3815,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "6.0.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "process.cpuUsage", supported: "6.1.0", @@ -4101,7 +3829,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "5.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "process.emitWarning", supported: "6.0.0", @@ -4115,7 +3843,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "1.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "process.getegid", supported: "2.0.0", @@ -4129,7 +3857,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "1.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "process.geteuid", supported: "2.0.0", @@ -4143,7 +3871,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "9.2.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "process.hasUncaughtExceptionCaptureCallback", supported: "9.3.0", @@ -4157,7 +3885,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "9.1.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "process.ppid", supported: @@ -4172,7 +3900,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "2.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "process.release", supported: "3.0.0", @@ -4186,7 +3914,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "1.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "process.setegid", supported: "2.0.0", @@ -4200,7 +3928,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "1.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "process.seteuid", supported: "2.0.0", @@ -4214,7 +3942,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "9.2.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "process.setUncaughtExceptionCaptureCallback", supported: "9.3.0", @@ -4300,7 +4028,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "9.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "stream.finished", supported: "10.0.0", @@ -4314,7 +4042,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "9.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "stream.finished", supported: "10.0.0", @@ -4328,7 +4056,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "9.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "stream.finished", supported: "10.0.0", @@ -4342,7 +4070,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "9.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "stream.finished", supported: "10.0.0", @@ -4356,7 +4084,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "9.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "stream.finished", supported: "10.0.0", @@ -4370,7 +4098,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "9.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "stream.pipeline", supported: "10.0.0", @@ -4389,19 +4117,11 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( valid: [ { code: "require('trace_events')", - options: [{ version: "10.0.0" }], + options: [{ version: "10.0.0", ignores: ["trace_events"] }], }, { code: "import trace_events from 'trace_events'", - options: [{ version: "10.0.0" }], - }, - { - code: "require('trace_events')", - options: [{ version: "9.9.9", ignores: ["trace_events"] }], - }, - { - code: "import trace_events from 'trace_events'", - options: [{ version: "9.9.9", ignores: ["trace_events"] }], + options: [{ version: "10.0.0", ignores: ["trace_events"] }], }, ], invalid: [ @@ -4410,10 +4130,9 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "9.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-yet", data: { name: "trace_events", - supported: "10.0.0", version: "9.9.9", }, }, @@ -4424,10 +4143,9 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "9.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-yet", data: { name: "trace_events", - supported: "10.0.0", version: "9.9.9", }, }, @@ -4435,14 +4153,13 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( }, { code: "import { createTracing } from 'trace_events'", - options: [{ version: "9.9.9" }], + options: [{ version: "10.0.0" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-yet", data: { name: "trace_events", - supported: "10.0.0", - version: "9.9.9", + version: "10.0.0", }, }, ], @@ -4560,7 +4277,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "9.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "URL", supported: "10.0.0", @@ -4574,7 +4291,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "9.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "URLSearchParams", supported: "10.0.0", @@ -4588,7 +4305,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "6.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "url.URL", supported: "7.0.0 (backported: ^6.13.0)", @@ -4602,7 +4319,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "6.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "url.URL", supported: "7.0.0 (backported: ^6.13.0)", @@ -4616,7 +4333,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "6.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "url.URL", supported: "7.0.0 (backported: ^6.13.0)", @@ -4630,7 +4347,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "6.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "url.URL", supported: "7.0.0 (backported: ^6.13.0)", @@ -4644,7 +4361,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "6.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "url.URL", supported: "7.0.0 (backported: ^6.13.0)", @@ -4658,7 +4375,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "7.4.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "url.URLSearchParams", supported: "7.5.0 (backported: ^6.13.0)", @@ -4672,10 +4389,10 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "7.3.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "url.domainToASCII", - supported: "7.4.0", + supported: "7.4.0 (backported: ^6.13.0)", version: "7.3.9", }, }, @@ -4686,10 +4403,10 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "7.3.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "url.domainToUnicode", - supported: "7.4.0", + supported: "7.4.0 (backported: ^6.13.0)", version: "7.3.9", }, }, @@ -4862,7 +4579,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "8.1.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "util.callbackify", supported: "8.2.0", @@ -4876,7 +4593,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "8.1.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "util.callbackify", supported: "8.2.0", @@ -4890,7 +4607,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "8.1.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "util.callbackify", supported: "8.2.0", @@ -4904,7 +4621,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "8.1.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "util.callbackify", supported: "8.2.0", @@ -4918,7 +4635,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "8.1.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "util.callbackify", supported: "8.2.0", @@ -4932,7 +4649,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "9.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "util.formatWithOptions", supported: "10.0.0", @@ -4946,7 +4663,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "9.6.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "util.getSystemErrorName", supported: "9.7.0 (backported: ^8.12.0)", @@ -4960,7 +4677,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "6.5.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "util.inspect.custom", supported: "6.6.0", @@ -4974,7 +4691,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "6.3.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "util.inspect.defaultOptions", supported: "6.4.0", @@ -4988,7 +4705,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "8.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "util.isDeepStrictEqual", supported: "9.0.0", @@ -5002,7 +4719,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "7.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "util.promisify", supported: "8.0.0", @@ -5016,7 +4733,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "8.8.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "util.TextDecoder", supported: "8.9.0", @@ -5030,7 +4747,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "8.8.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "util.TextEncoder", supported: "8.9.0", @@ -5044,7 +4761,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "9.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "util.types", supported: "10.0.0", @@ -5232,7 +4949,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "0.12.99" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "v8", supported: "1.0.0", @@ -5246,7 +4963,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "0.12.99" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "v8", supported: "1.0.0", @@ -5260,7 +4977,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "0.12.99" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "v8", supported: "1.0.0", @@ -5268,7 +4985,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( }, }, { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "v8.cachedDataVersionTag", supported: "8.0.0", @@ -5282,7 +4999,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "7.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "v8.cachedDataVersionTag", supported: "8.0.0", @@ -5296,7 +5013,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "7.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "v8.cachedDataVersionTag", supported: "8.0.0", @@ -5310,7 +5027,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "7.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "v8.cachedDataVersionTag", supported: "8.0.0", @@ -5324,7 +5041,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "7.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "v8.cachedDataVersionTag", supported: "8.0.0", @@ -5338,7 +5055,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "7.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "v8.cachedDataVersionTag", supported: "8.0.0", @@ -5352,7 +5069,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "5.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "v8.getHeapSpaceStatistics", supported: "6.0.0", @@ -5366,7 +5083,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "7.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "v8.serialize", supported: "8.0.0", @@ -5380,7 +5097,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "7.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "v8.deserialize", supported: "8.0.0", @@ -5394,7 +5111,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "7.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "v8.Serializer", supported: "8.0.0", @@ -5408,7 +5125,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "7.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "v8.Deserializer", supported: "8.0.0", @@ -5422,7 +5139,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "7.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "v8.DefaultSerializer", supported: "8.0.0", @@ -5436,7 +5153,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "7.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "v8.DefaultDeserializer", supported: "8.0.0", @@ -5454,23 +5171,15 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( { valid: [ { - code: "require('vm').Module", - options: [{ version: "9.6.0" }], - }, - { - code: "var vm = require('vm'); vm.Module", + code: "require('vm')", options: [{ version: "9.6.0" }], }, { - code: "var { Module } = require('vm'); Module", + code: "import vm from 'vm';", options: [{ version: "9.6.0" }], }, { - code: "import vm from 'vm'; vm.Module", - options: [{ version: "9.6.0" }], - }, - { - code: "import { Module } from 'vm'; Module", + code: "import * as vm from 'vm';", options: [{ version: "9.6.0" }], }, @@ -5502,10 +5211,9 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "9.5.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-yet", data: { name: "vm.Module", - supported: "9.6.0", version: "9.5.9", }, }, @@ -5516,10 +5224,9 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "9.5.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-yet", data: { name: "vm.Module", - supported: "9.6.0", version: "9.5.9", }, }, @@ -5530,10 +5237,9 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "9.5.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-yet", data: { name: "vm.Module", - supported: "9.6.0", version: "9.5.9", }, }, @@ -5544,10 +5250,9 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "9.5.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-yet", data: { name: "vm.Module", - supported: "9.6.0", version: "9.5.9", }, }, @@ -5558,10 +5263,9 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "9.5.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-yet", data: { name: "vm.Module", - supported: "9.6.0", version: "9.5.9", }, }, @@ -5608,7 +5312,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "10.5.0" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "worker_threads", supported: "12.11.0", @@ -5622,7 +5326,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "10.5.0" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "worker_threads", supported: "12.11.0", @@ -5636,7 +5340,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "10.5.0" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "worker_threads", supported: "12.11.0", @@ -5652,7 +5356,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( }, errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "worker_threads", supported: "12.11.0",