From c416e3ef0d78114cd3c4adfeacc21373d01df396 Mon Sep 17 00:00:00 2001 From: scagood <2230835+scagood@users.noreply.github.com> Date: Tue, 6 Feb 2024 13:31:27 +0000 Subject: [PATCH 01/11] chore: Update and split-up all supported node-modules --- lib/node-modules/assert.js | 62 +++++++++ lib/node-modules/async_hooks.js | 31 +++++ lib/node-modules/buffer.js | 55 ++++++++ lib/node-modules/child_process.js | 23 ++++ lib/node-modules/cluster.js | 27 ++++ lib/node-modules/console.js | 38 ++++++ lib/node-modules/crypto.js | 101 ++++++++++++++ lib/node-modules/dgram.js | 17 +++ lib/node-modules/diagnostics_channel.js | 28 ++++ lib/node-modules/dns.js | 62 +++++++++ lib/node-modules/domain.js | 16 +++ lib/node-modules/events.js | 108 +++++++++++++++ lib/node-modules/fs.js | 174 ++++++++++++++++++++++++ lib/node-modules/http.js | 31 +++++ lib/node-modules/http2.js | 33 +++++ lib/node-modules/https.js | 21 +++ lib/node-modules/inspector.js | 38 ++++++ lib/node-modules/module.js | 22 +++ lib/node-modules/net.js | 33 +++++ lib/node-modules/os.js | 38 ++++++ lib/node-modules/path.js | 38 ++++++ lib/node-modules/perf_hooks.js | 29 ++++ lib/node-modules/process.js | 89 ++++++++++++ lib/node-modules/punycode.js | 20 +++ lib/node-modules/querystring.js | 21 +++ lib/node-modules/readline.js | 42 ++++++ lib/node-modules/stream.js | 72 ++++++++++ lib/node-modules/string_decoder.js | 16 +++ lib/node-modules/test.js | 42 ++++++ lib/node-modules/timers.js | 52 +++++++ lib/node-modules/tls.js | 33 +++++ lib/node-modules/trace_events.js | 17 +++ lib/node-modules/tty.js | 18 +++ lib/node-modules/url.js | 24 ++++ lib/node-modules/util.js | 118 ++++++++++++++++ lib/node-modules/v8.js | 47 +++++++ lib/node-modules/vm.js | 20 +++ lib/node-modules/wasi.js | 10 ++ lib/node-modules/worker_threads.js | 43 ++++++ lib/node-modules/zlib.js | 49 +++++++ 40 files changed, 1758 insertions(+) create mode 100644 lib/node-modules/assert.js create mode 100644 lib/node-modules/async_hooks.js create mode 100644 lib/node-modules/buffer.js create mode 100644 lib/node-modules/child_process.js create mode 100644 lib/node-modules/cluster.js create mode 100644 lib/node-modules/console.js create mode 100644 lib/node-modules/crypto.js create mode 100644 lib/node-modules/dgram.js create mode 100644 lib/node-modules/diagnostics_channel.js create mode 100644 lib/node-modules/dns.js create mode 100644 lib/node-modules/domain.js create mode 100644 lib/node-modules/events.js create mode 100644 lib/node-modules/fs.js create mode 100644 lib/node-modules/http.js create mode 100644 lib/node-modules/http2.js create mode 100644 lib/node-modules/https.js create mode 100644 lib/node-modules/inspector.js create mode 100644 lib/node-modules/module.js create mode 100644 lib/node-modules/net.js create mode 100644 lib/node-modules/os.js create mode 100644 lib/node-modules/path.js create mode 100644 lib/node-modules/perf_hooks.js create mode 100644 lib/node-modules/process.js create mode 100644 lib/node-modules/punycode.js create mode 100644 lib/node-modules/querystring.js create mode 100644 lib/node-modules/readline.js create mode 100644 lib/node-modules/stream.js create mode 100644 lib/node-modules/string_decoder.js create mode 100644 lib/node-modules/test.js create mode 100644 lib/node-modules/timers.js create mode 100644 lib/node-modules/tls.js create mode 100644 lib/node-modules/trace_events.js create mode 100644 lib/node-modules/tty.js create mode 100644 lib/node-modules/url.js create mode 100644 lib/node-modules/util.js create mode 100644 lib/node-modules/v8.js create mode 100644 lib/node-modules/vm.js create mode 100644 lib/node-modules/wasi.js create mode 100644 lib/node-modules/worker_threads.js create mode 100644 lib/node-modules/zlib.js diff --git a/lib/node-modules/assert.js b/lib/node-modules/assert.js new file mode 100644 index 00000000..b5d99048 --- /dev/null +++ b/lib/node-modules/assert.js @@ -0,0 +1,62 @@ +const { READ } = require("@eslint-community/eslint-utils") + +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, +} + +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/node-modules/async_hooks.js b/lib/node-modules/async_hooks.js new file mode 100644 index 00000000..309ee6fa --- /dev/null +++ b/lib/node-modules/async_hooks.js @@ -0,0 +1,31 @@ +const { READ } = require("@eslint-community/eslint-utils") + +const async_hooks = { + createHook: { [READ]: { supported: ["8.1.0"] } }, + executionAsyncResource: { [READ]: { supported: ["13.9.0", "12.17.0"] } }, + executionAsyncId: { [READ]: { supported: ["8.1.0"] } }, + triggerAsyncId: { [READ]: { supported: ["8.1.0"] } }, + AsyncLocalStorage: { + [READ]: { + experimental: ["13.10.0", "12.17.0"], + supported: ["16.4.0"], + }, + }, + AsyncResource: { + [READ]: { + experimental: ["9.6.0", "8.12.0"], + supported: ["16.4.0"], + }, + }, +} + +module.exports = { + async_hooks: { + [READ]: { supported: ["8.1.0"] }, + ...async_hooks, + }, + "node:async_hooks": { + [READ]: { supported: ["14.13.1", "12.20.0"] }, + ...async_hooks, + }, +} diff --git a/lib/node-modules/buffer.js b/lib/node-modules/buffer.js new file mode 100644 index 00000000..4e9bd8cc --- /dev/null +++ b/lib/node-modules/buffer.js @@ -0,0 +1,55 @@ +const { READ } = require("@eslint-community/eslint-utils") + +const buffer = { + constants: { + [READ]: { supported: ["8.2.0"] }, + MAX_LENGTH: { [READ]: { supported: ["8.2.0"] } }, + MAX_STRING_LENGTH: { [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"], + }, + }, +} + +module.exports = { + buffer: { + [READ]: { supported: ["0.1.90"] }, + ...buffer, + }, + "node:buffer": { + [READ]: { supported: ["14.13.1", "12.20.0"] }, + ...buffer, + }, +} diff --git a/lib/node-modules/child_process.js b/lib/node-modules/child_process.js new file mode 100644 index 00000000..52872700 --- /dev/null +++ b/lib/node-modules/child_process.js @@ -0,0 +1,23 @@ +const { READ } = require("@eslint-community/eslint-utils") + +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"] } }, +} + +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/node-modules/cluster.js b/lib/node-modules/cluster.js new file mode 100644 index 00000000..7fc735e4 --- /dev/null +++ b/lib/node-modules/cluster.js @@ -0,0 +1,27 @@ +const { READ } = require("@eslint-community/eslint-utils") + +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"] } }, +} + +module.exports = { + cluster: { + [READ]: { supported: ["0.7.0"] }, + ...cluster, + }, + "node:cluster": { + [READ]: { supported: ["14.13.1", "12.20.0"] }, + ...cluster, + }, +} diff --git a/lib/node-modules/console.js b/lib/node-modules/console.js new file mode 100644 index 00000000..00569423 --- /dev/null +++ b/lib/node-modules/console.js @@ -0,0 +1,38 @@ +const { READ } = require("@eslint-community/eslint-utils") + +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"] } }, + count: { [READ]: { supported: ["8.3.0"] } }, + countReset: { [READ]: { supported: ["8.3.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"] } }, +} + +module.exports = { + console: { + [READ]: { supported: ["0.1.100"] }, + ...console, + }, + "node:console": { + [READ]: { supported: ["14.13.1", "12.20.0"] }, + ...console, + }, +} diff --git a/lib/node-modules/crypto.js b/lib/node-modules/crypto.js new file mode 100644 index 00000000..ce40f7f8 --- /dev/null +++ b/lib/node-modules/crypto.js @@ -0,0 +1,101 @@ +const { READ } = require("@eslint-community/eslint-utils") + +// TODO: https://nodejs.org/docs/latest/api/webcrypto.html + +const crypto = { + constants: { [READ]: { supported: ["6.3.0"] } }, + fips: { [READ]: { supported: ["6.0.0"], deprecated: ["10.0.0"] } }, + webcrypto: { [READ]: { experimental: ["15.0.0"], supported: ["19.0.0"] } }, + 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"] } }, +} + +module.exports = { + crypto: { + [READ]: { supported: ["0.1.92"] }, + ...crypto, + }, + "node:crypto": { + [READ]: { supported: ["14.13.1", "12.20.0"] }, + ...crypto, + }, +} diff --git a/lib/node-modules/dgram.js b/lib/node-modules/dgram.js new file mode 100644 index 00000000..412ff2b3 --- /dev/null +++ b/lib/node-modules/dgram.js @@ -0,0 +1,17 @@ +const { READ } = require("@eslint-community/eslint-utils") + +const dgram = { + createSocket: { [READ]: { supported: ["0.1.99"] } }, + Socket: { [READ]: { supported: ["0.1.99"] } }, +} + +module.exports = { + dgram: { + [READ]: { supported: ["0.1.99"] }, + ...dgram, + }, + "node:dgram": { + [READ]: { supported: ["14.13.1", "12.20.0"] }, + ...dgram, + }, +} diff --git a/lib/node-modules/diagnostics_channel.js b/lib/node-modules/diagnostics_channel.js new file mode 100644 index 00000000..113b58e6 --- /dev/null +++ b/lib/node-modules/diagnostics_channel.js @@ -0,0 +1,28 @@ +const { READ } = require("@eslint-community/eslint-utils") + +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"] } }, +} + +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/node-modules/dns.js b/lib/node-modules/dns.js new file mode 100644 index 00000000..6c9686b7 --- /dev/null +++ b/lib/node-modules/dns.js @@ -0,0 +1,62 @@ +const { READ } = require("@eslint-community/eslint-utils") + +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"] } }, + }, +} + +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/node-modules/domain.js b/lib/node-modules/domain.js new file mode 100644 index 00000000..0aa23d0c --- /dev/null +++ b/lib/node-modules/domain.js @@ -0,0 +1,16 @@ +const { READ } = require("@eslint-community/eslint-utils") + +const domain = { + create: { [READ]: { supported: ["0.7.8"] } }, + Domain: { [READ]: { supported: ["0.7.8"] } }, +} + +module.exports = { + domain: { + [READ]: { + supported: ["0.7.8"], + deprecated: ["1.4.2"], + }, + ...domain, + }, +} diff --git a/lib/node-modules/events.js b/lib/node-modules/events.js new file mode 100644 index 00000000..911b5000 --- /dev/null +++ b/lib/node-modules/events.js @@ -0,0 +1,108 @@ +const { READ } = require("@eslint-community/eslint-utils") + +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"], + }, + }, +} + +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, +} + +module.exports = { + events: { + [READ]: { supported: ["0.1.26"] }, + ...events, + }, + "node:events": { + [READ]: { supported: ["14.13.1", "12.20.0"] }, + ...events, + }, +} diff --git a/lib/node-modules/fs.js b/lib/node-modules/fs.js new file mode 100644 index 00000000..9b052528 --- /dev/null +++ b/lib/node-modules/fs.js @@ -0,0 +1,174 @@ +const { READ } = require("@eslint-community/eslint-utils") + +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"] } }, +} +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"] } }, + 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"] } }, +} +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"] } }, + 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"] } }, +} + +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"] } }, +} + +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", "12.20.0"] }, + ...promises_api, + }, +} diff --git a/lib/node-modules/http.js b/lib/node-modules/http.js new file mode 100644 index 00000000..96b944b9 --- /dev/null +++ b/lib/node-modules/http.js @@ -0,0 +1,31 @@ +const { READ } = require("@eslint-community/eslint-utils") + +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"] } }, +} + +module.exports = { + http: { + [READ]: { supported: ["0.0.1"] }, + ...http, + }, + "node:http": { + [READ]: { supported: ["14.13.1", "12.20.0"] }, + ...http, + }, +} diff --git a/lib/node-modules/http2.js b/lib/node-modules/http2.js new file mode 100644 index 00000000..a6db42fd --- /dev/null +++ b/lib/node-modules/http2.js @@ -0,0 +1,33 @@ +const { READ } = require("@eslint-community/eslint-utils") + +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"] } }, +} + +module.exports = { + http2: { + [READ]: { experimental: ["8.4.0"], supported: ["10.10.0"] }, + ...http2, + }, + "node:http2": { + [READ]: { supported: ["14.13.1", "12.20.0"] }, + ...http2, + }, +} diff --git a/lib/node-modules/https.js b/lib/node-modules/https.js new file mode 100644 index 00000000..12f9251a --- /dev/null +++ b/lib/node-modules/https.js @@ -0,0 +1,21 @@ +const { READ } = require("@eslint-community/eslint-utils") + +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"] } }, +} + +module.exports = { + http: { + [READ]: { supported: ["0.3.4"] }, + ...http, + }, + "node:http": { + [READ]: { supported: ["14.13.1", "12.20.0"] }, + ...http, + }, +} diff --git a/lib/node-modules/inspector.js b/lib/node-modules/inspector.js new file mode 100644 index 00000000..2eb78905 --- /dev/null +++ b/lib/node-modules/inspector.js @@ -0,0 +1,38 @@ +const { READ } = require("@eslint-community/eslint-utils") + +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"] } }, +} + +const promises_api = { + Session: { [READ]: { supported: ["19.0.0"] } }, + ...common_objects, +} +const callback_api = { + Session: { [READ]: { supported: ["8.0.0"] } }, + ...common_objects, +} + +module.exports = { + inspector: { + [READ]: { supported: ["8.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/node-modules/module.js b/lib/node-modules/module.js new file mode 100644 index 00000000..34329c8b --- /dev/null +++ b/lib/node-modules/module.js @@ -0,0 +1,22 @@ +const { READ } = require("@eslint-community/eslint-utils") + +const module = { + builtinModules: { [READ]: { supported: ["9.3.0", "8.10.0", "6.13.0"] } }, + createRequire: { [READ]: { supported: ["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.exports = { + module: { + [READ]: { supported: ["0.3.7"] }, + ...module, + }, + "node:module": { + [READ]: { supported: ["14.13.1", "12.20.0"] }, + ...module, + }, +} diff --git a/lib/node-modules/net.js b/lib/node-modules/net.js new file mode 100644 index 00000000..fa47147f --- /dev/null +++ b/lib/node-modules/net.js @@ -0,0 +1,33 @@ +const { READ } = require("@eslint-community/eslint-utils") + +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"] } }, +} + +module.exports = { + net: { + [READ]: { supported: ["0.0.1"] }, + ...net, + }, + "node:net": { + [READ]: { supported: ["14.13.1", "12.20.0"] }, + ...net, + }, +} diff --git a/lib/node-modules/os.js b/lib/node-modules/os.js new file mode 100644 index 00000000..bf27114c --- /dev/null +++ b/lib/node-modules/os.js @@ -0,0 +1,38 @@ +const { READ } = require("@eslint-community/eslint-utils") + +const os = { + EOL: { [READ]: { supported: ["0.7.8"] } }, + constants: { [READ]: { supported: ["5.11.0", "6.3.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"] } }, +} + +module.exports = { + os: { + [READ]: { supported: ["0.3.3"] }, + ...os, + }, + "node:os": { + [READ]: { supported: ["14.13.1", "12.20.0"] }, + ...os, + }, +} diff --git a/lib/node-modules/path.js b/lib/node-modules/path.js new file mode 100644 index 00000000..332e2416 --- /dev/null +++ b/lib/node-modules/path.js @@ -0,0 +1,38 @@ +const { READ } = require("@eslint-community/eslint-utils") + +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"] } }, +} + +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/node-modules/perf_hooks.js b/lib/node-modules/perf_hooks.js new file mode 100644 index 00000000..2ffdb6f4 --- /dev/null +++ b/lib/node-modules/perf_hooks.js @@ -0,0 +1,29 @@ +const { READ } = require("@eslint-community/eslint-utils") + +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"] } }, +} + +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/node-modules/process.js b/lib/node-modules/process.js new file mode 100644 index 00000000..7f2a3d92 --- /dev/null +++ b/lib/node-modules/process.js @@ -0,0 +1,89 @@ +const { READ } = require("@eslint-community/eslint-utils") + +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"] } }, + stderr: { [READ]: { supported: ["0.1.3"] } }, + stdin: { [READ]: { supported: ["0.1.3"] } }, + stdout: { [READ]: { supported: ["0.1.3"] } }, + 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: ["8.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"] } }, +} + +module.exports = { + process: { + [READ]: { supported: ["0.1.3"] }, + ...process, + }, + "node:process": { + [READ]: { supported: ["14.13.1", "12.20.0"] }, + ...process, + }, +} diff --git a/lib/node-modules/punycode.js b/lib/node-modules/punycode.js new file mode 100644 index 00000000..41dff2bb --- /dev/null +++ b/lib/node-modules/punycode.js @@ -0,0 +1,20 @@ +const { READ } = require("@eslint-community/eslint-utils") + +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"] } }, +} + +module.exports = { + punycode: { + [READ]: { + supported: ["0.5.1"], + deprecated: ["7.0.0"], + }, + ...punycode, + }, +} diff --git a/lib/node-modules/querystring.js b/lib/node-modules/querystring.js new file mode 100644 index 00000000..7f0eec14 --- /dev/null +++ b/lib/node-modules/querystring.js @@ -0,0 +1,21 @@ +const { READ } = require("@eslint-community/eslint-utils") + +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"] } }, +} + +module.exports = { + querystring: { + [READ]: { supported: ["0.1.25"] }, + ...querystring, + }, + "node:querystring": { + [READ]: { supported: ["14.13.1", "12.20.0"] }, + ...querystring, + }, +} diff --git a/lib/node-modules/readline.js b/lib/node-modules/readline.js new file mode 100644 index 00000000..2a4dc33a --- /dev/null +++ b/lib/node-modules/readline.js @@ -0,0 +1,42 @@ +const { READ } = require("@eslint-community/eslint-utils") + +const promises_api = { + createInterface: { [READ]: { supported: ["17.0.0"] } }, + Interface: { [READ]: { supported: ["17.0.0"] } }, + Readline: { [READ]: { supported: ["17.0.0"] } }, +} + +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"] } }, +} + +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/node-modules/stream.js b/lib/node-modules/stream.js new file mode 100644 index 00000000..da955462 --- /dev/null +++ b/lib/node-modules/stream.js @@ -0,0 +1,72 @@ +const { READ } = require("@eslint-community/eslint-utils") + +// TODO: https://nodejs.org/docs/latest/api/webstreams.html + +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"] } }, +} + +const Writable = { + [READ]: { supported: ["0.9.4"] }, + fromWeb: { [READ]: { experimental: ["17.0.0"] } }, + toWeb: { [READ]: { experimental: ["17.0.0"] } }, +} + +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 + +const promises_api = { + pipeline: { [READ]: { supported: ["15.0.0"] } }, + finished: { [READ]: { supported: ["15.0.0"] } }, +} + +const stream = { + promises: { + [READ]: { supported: ["15.0.0"] }, + ...promises_api, + }, + 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"] } }, +} + +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"] }, + ...promises_api, + }, + "node:stream/promises": { + [READ]: { experimental: ["15.0.0"] }, + ...promises_api, + }, +} diff --git a/lib/node-modules/string_decoder.js b/lib/node-modules/string_decoder.js new file mode 100644 index 00000000..1534b8e8 --- /dev/null +++ b/lib/node-modules/string_decoder.js @@ -0,0 +1,16 @@ +const { READ } = require("@eslint-community/eslint-utils") + +const string_decoder = { + StringDecoder: { [READ]: { supported: ["0.1.99"] } }, +} + +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/node-modules/test.js b/lib/node-modules/test.js new file mode 100644 index 00000000..c807df35 --- /dev/null +++ b/lib/node-modules/test.js @@ -0,0 +1,42 @@ +const { READ } = require("@eslint-community/eslint-utils") + +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 + +module.exports = { + "node:test": { + [READ]: { + experimental: ["18.7.0", "16.17.0"], + supported: ["20.0.0"], + }, + ...test, + }, +} diff --git a/lib/node-modules/timers.js b/lib/node-modules/timers.js new file mode 100644 index 00000000..045a50da --- /dev/null +++ b/lib/node-modules/timers.js @@ -0,0 +1,52 @@ +const { READ } = require("@eslint-community/eslint-utils") + +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"] } }, + }, +} + +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"] } }, + + // active: [Function: deprecated], + // unenroll: [Function: deprecated], + // enroll: [Function: deprecated] +} + +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/node-modules/tls.js b/lib/node-modules/tls.js new file mode 100644 index 00000000..f3750e61 --- /dev/null +++ b/lib/node-modules/tls.js @@ -0,0 +1,33 @@ +const { READ } = require("@eslint-community/eslint-utils") + +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"] } }, +} + +module.exports = { + tls: { + [READ]: { supported: ["0.3.2"] }, + ...tls, + }, + "node:tls": { + [READ]: { supported: ["14.13.1", "12.20.0"] }, + ...tls, + }, +} diff --git a/lib/node-modules/trace_events.js b/lib/node-modules/trace_events.js new file mode 100644 index 00000000..8ad10f70 --- /dev/null +++ b/lib/node-modules/trace_events.js @@ -0,0 +1,17 @@ +const { READ } = require("@eslint-community/eslint-utils") + +const trace_events = { + createTracing: { [READ]: { supported: ["10.0.0"] } }, + getEnabledCategories: { [READ]: { supported: ["10.0.0"] } }, +} + +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/node-modules/tty.js b/lib/node-modules/tty.js new file mode 100644 index 00000000..7e8599dc --- /dev/null +++ b/lib/node-modules/tty.js @@ -0,0 +1,18 @@ +const { READ } = require("@eslint-community/eslint-utils") + +const tty = { + isatty: { [READ]: { supported: ["0.5.8"] } }, + ReadStream: { [READ]: { supported: ["0.5.8"] } }, + WriteStream: { [READ]: { supported: ["0.5.8"] } }, +} + +module.exports = { + tty: { + [READ]: { supported: ["0.5.8"] }, + ...tty, + }, + "node:tty": { + [READ]: { supported: ["14.13.1", "12.20.0"] }, + ...tty, + }, +} diff --git a/lib/node-modules/url.js b/lib/node-modules/url.js new file mode 100644 index 00000000..0b7de740 --- /dev/null +++ b/lib/node-modules/url.js @@ -0,0 +1,24 @@ +const { READ } = require("@eslint-community/eslint-utils") + +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"] } }, + URLSearchParams: { [READ]: { supported: ["7.5.0", "6.13.0"] } }, + Url: { [READ]: { supported: ["0.1.25"] } }, +} + +module.exports = { + url: { + [READ]: { supported: ["0.1.25"] }, + ...url, + }, + "node:url": { + [READ]: { supported: ["14.13.1", "12.20.0"] }, + ...url, + }, +} diff --git a/lib/node-modules/util.js b/lib/node-modules/util.js new file mode 100644 index 00000000..facc34d7 --- /dev/null +++ b/lib/node-modules/util.js @@ -0,0 +1,118 @@ +const { READ } = require("@eslint-community/eslint-utils") + +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"] }, + }, +} + +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"] } }, +} + +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]: { supported: ["8.9.0"], experimental: "8.3.0" } }, + TextEncoder: { [READ]: { supported: ["8.9.0"], experimental: "8.3.0" } }, + + types, + ...deprecated, +} + +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/node-modules/v8.js b/lib/node-modules/v8.js new file mode 100644 index 00000000..66be0856 --- /dev/null +++ b/lib/node-modules/v8.js @@ -0,0 +1,47 @@ +const { READ } = require("@eslint-community/eslint-utils") + +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"] } }, +} + +module.exports = { + v8: v8, + "node:v8": { ...v8, [READ]: { supported: ["14.13.1", "12.20.0"] } }, +} diff --git a/lib/node-modules/vm.js b/lib/node-modules/vm.js new file mode 100644 index 00000000..60000eba --- /dev/null +++ b/lib/node-modules/vm.js @@ -0,0 +1,20 @@ +const { READ } = require("@eslint-community/eslint-utils") + +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: { [READ]: { experimental: ["13.0.0", "12.16.0"] } }, + SourceTextModule: { [READ]: { experimental: ["9.6.0"] } }, + SyntheticModule: { [READ]: { experimental: ["13.0.0", "12.16.0"] } }, +} + +module.exports = { + vm: vm, + "node:vm": { ...vm, [READ]: { supported: ["14.13.1", "12.20.0"] } }, +} diff --git a/lib/node-modules/wasi.js b/lib/node-modules/wasi.js new file mode 100644 index 00000000..e2ef9a17 --- /dev/null +++ b/lib/node-modules/wasi.js @@ -0,0 +1,10 @@ +const { READ } = require("@eslint-community/eslint-utils") + +const wasi = { + WASI: { [READ]: { supported: ["13.3.0", "12.16.0"] } }, +} + +module.exports = { + wasi: wasi, + "node:wasi": { ...wasi, [READ]: { supported: ["14.13.1", "12.20.0"] } }, +} diff --git a/lib/node-modules/worker_threads.js b/lib/node-modules/worker_threads.js new file mode 100644 index 00000000..cd021be7 --- /dev/null +++ b/lib/node-modules/worker_threads.js @@ -0,0 +1,43 @@ +const { READ } = require("@eslint-community/eslint-utils") + +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"] } }, +} + +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/node-modules/zlib.js b/lib/node-modules/zlib.js new file mode 100644 index 00000000..d3eec127 --- /dev/null +++ b/lib/node-modules/zlib.js @@ -0,0 +1,49 @@ +const { READ } = require("@eslint-community/eslint-utils") + +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"] } }, +} + +module.exports = { + zlib: zlib, + "node:zlib": { + ...zlib, + [READ]: { supported: ["14.13.1", "12.20.0"] }, + }, +} From 133fb16ae35298127fbe0909107e78840d698f98 Mon Sep 17 00:00:00 2001 From: scagood <2230835+scagood@users.noreply.github.com> Date: Tue, 6 Feb 2024 14:33:30 +0000 Subject: [PATCH 02/11] chore: Match up with original --- lib/node-modules/async_hooks.js | 21 +++++++--- lib/node-modules/buffer.js | 6 +-- lib/node-modules/console.js | 11 ++++-- lib/node-modules/events.js | 68 ++++++--------------------------- lib/node-modules/fs.js | 10 ++++- lib/node-modules/http2.js | 5 ++- lib/node-modules/inspector.js | 5 ++- lib/node-modules/module.js | 8 ++++ lib/node-modules/os.js | 5 ++- lib/node-modules/process.js | 49 +++++++++++++++++++++--- lib/node-modules/util.js | 4 +- lib/node-modules/v8.js | 2 +- lib/node-modules/vm.js | 3 +- 13 files changed, 111 insertions(+), 86 deletions(-) diff --git a/lib/node-modules/async_hooks.js b/lib/node-modules/async_hooks.js index 309ee6fa..b73b6def 100644 --- a/lib/node-modules/async_hooks.js +++ b/lib/node-modules/async_hooks.js @@ -1,31 +1,40 @@ const { READ } = require("@eslint-community/eslint-utils") const async_hooks = { - createHook: { [READ]: { supported: ["8.1.0"] } }, - executionAsyncResource: { [READ]: { supported: ["13.9.0", "12.17.0"] } }, - executionAsyncId: { [READ]: { supported: ["8.1.0"] } }, - triggerAsyncId: { [READ]: { supported: ["8.1.0"] } }, + 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"] } }, }, } module.exports = { async_hooks: { - [READ]: { supported: ["8.1.0"] }, + [READ]: { + experimental: ["8.1.0"], + supported: ["16.4.0"], + }, ...async_hooks, }, "node:async_hooks": { - [READ]: { supported: ["14.13.1", "12.20.0"] }, + [READ]: { + experimental: ["14.13.1", "12.20.0"], + supported: ["16.4.0"], + }, ...async_hooks, }, } diff --git a/lib/node-modules/buffer.js b/lib/node-modules/buffer.js index 4e9bd8cc..cd679614 100644 --- a/lib/node-modules/buffer.js +++ b/lib/node-modules/buffer.js @@ -1,11 +1,7 @@ const { READ } = require("@eslint-community/eslint-utils") const buffer = { - constants: { - [READ]: { supported: ["8.2.0"] }, - MAX_LENGTH: { [READ]: { supported: ["8.2.0"] } }, - MAX_STRING_LENGTH: { [READ]: { supported: ["8.2.0"] } }, - }, + 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"] } }, diff --git a/lib/node-modules/console.js b/lib/node-modules/console.js index 00569423..43a3d633 100644 --- a/lib/node-modules/console.js +++ b/lib/node-modules/console.js @@ -6,9 +6,9 @@ const console = { timeStamp: { [READ]: { supported: ["8.0.0"] } }, Console: { [READ]: { supported: ["0.1.100"] } }, assert: { [READ]: { supported: ["0.1.101"] } }, - clear: { [READ]: { supported: ["8.3.0"] } }, - count: { [READ]: { supported: ["8.3.0"] } }, - countReset: { [READ]: { supported: ["8.3.0"] } }, + 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"] } }, @@ -24,6 +24,11 @@ const console = { 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"] } }, } module.exports = { diff --git a/lib/node-modules/events.js b/lib/node-modules/events.js index 911b5000..de6eb961 100644 --- a/lib/node-modules/events.js +++ b/lib/node-modules/events.js @@ -1,16 +1,8 @@ const { READ } = require("@eslint-community/eslint-utils") const static = { - defaultMaxListeners: { - [READ]: { - supported: ["0.11.2"], - }, - }, - errorMonitor: { - [READ]: { - supported: ["13.6.0", "12.17.0"], - }, - }, + defaultMaxListeners: { [READ]: { supported: ["0.11.2"] } }, + errorMonitor: { [READ]: { supported: ["13.6.0", "12.17.0"] } }, captureRejections: { [READ]: { experimental: ["13.4.0", "12.16.0"], @@ -23,62 +15,24 @@ const static = { 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"], - }, - }, + 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"] } }, } const events = { - Event: { - [READ]: { - experimental: ["14.5.0"], - supported: ["15.4.0"], - }, - }, + 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"], - }, - }, + CustomEvent: { [READ]: { experimental: ["18.7.0", "16.17.0"] } }, NodeEventTarget: { [READ]: { experimental: ["14.5.0"], diff --git a/lib/node-modules/fs.js b/lib/node-modules/fs.js index 9b052528..e0fc67a0 100644 --- a/lib/node-modules/fs.js +++ b/lib/node-modules/fs.js @@ -67,7 +67,10 @@ const callback_api = { 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"] } }, + 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"] } }, @@ -115,7 +118,10 @@ const synchronous_api = { 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"] } }, + 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"] } }, diff --git a/lib/node-modules/http2.js b/lib/node-modules/http2.js index a6db42fd..9aff500c 100644 --- a/lib/node-modules/http2.js +++ b/lib/node-modules/http2.js @@ -23,7 +23,10 @@ const http2 = { module.exports = { http2: { - [READ]: { experimental: ["8.4.0"], supported: ["10.10.0"] }, + [READ]: { + experimental: ["8.4.0"], + supported: ["10.10.0", "8.13.0"], + }, ...http2, }, "node:http2": { diff --git a/lib/node-modules/inspector.js b/lib/node-modules/inspector.js index 2eb78905..40808aa4 100644 --- a/lib/node-modules/inspector.js +++ b/lib/node-modules/inspector.js @@ -19,7 +19,10 @@ const callback_api = { module.exports = { inspector: { - [READ]: { supported: ["8.0.0"] }, + [READ]: { + experimental: ["8.0.0"], + supported: ["14.0.0"], + }, ...callback_api, }, "node:inspector": { diff --git a/lib/node-modules/module.js b/lib/node-modules/module.js index 34329c8b..12a579c4 100644 --- a/lib/node-modules/module.js +++ b/lib/node-modules/module.js @@ -3,6 +3,12 @@ const { READ } = require("@eslint-community/eslint-utils") 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"] } }, @@ -10,6 +16,8 @@ const module = { SourceMap: { [READ]: { supported: ["13.7.0", "12.17.0"] } }, } +module.Module = module + module.exports = { module: { [READ]: { supported: ["0.3.7"] }, diff --git a/lib/node-modules/os.js b/lib/node-modules/os.js index bf27114c..c129d487 100644 --- a/lib/node-modules/os.js +++ b/lib/node-modules/os.js @@ -2,7 +2,10 @@ const { READ } = require("@eslint-community/eslint-utils") const os = { EOL: { [READ]: { supported: ["0.7.8"] } }, - constants: { [READ]: { supported: ["5.11.0", "6.3.0"] } }, + 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"] } }, diff --git a/lib/node-modules/process.js b/lib/node-modules/process.js index 7f2a3d92..e7b17f1d 100644 --- a/lib/node-modules/process.js +++ b/lib/node-modules/process.js @@ -32,9 +32,44 @@ const process = { }, }, sourceMapsEnabled: { [READ]: { experimental: ["20.7.0"] } }, - stderr: { [READ]: { supported: ["0.1.3"] } }, - stdin: { [READ]: { supported: ["0.1.3"] } }, - stdout: { [READ]: { supported: ["0.1.3"] } }, + 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"] } }, @@ -48,7 +83,7 @@ const process = { cwd: { [READ]: { supported: ["0.1.8"] } }, disconnect: { [READ]: { supported: ["0.7.2"] } }, dlopen: { [READ]: { supported: ["0.1.16"] } }, - emitWarning: { [READ]: { supported: ["8.0.0"] } }, + 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"] } }, @@ -57,8 +92,10 @@ const process = { 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"] } }, + 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"] } }, diff --git a/lib/node-modules/util.js b/lib/node-modules/util.js index facc34d7..5b66d9b3 100644 --- a/lib/node-modules/util.js +++ b/lib/node-modules/util.js @@ -103,8 +103,8 @@ const util = { 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]: { supported: ["8.9.0"], experimental: "8.3.0" } }, - TextEncoder: { [READ]: { supported: ["8.9.0"], experimental: "8.3.0" } }, + TextDecoder: { [READ]: { experimental: ["8.3.0"], supported: ["8.9.0"] } }, + TextEncoder: { [READ]: { experimental: ["8.3.0"], supported: ["8.9.0"] } }, types, ...deprecated, diff --git a/lib/node-modules/v8.js b/lib/node-modules/v8.js index 66be0856..8a493c4d 100644 --- a/lib/node-modules/v8.js +++ b/lib/node-modules/v8.js @@ -42,6 +42,6 @@ const v8 = { } module.exports = { - v8: v8, + v8: { ...v8, [READ]: { supported: ["1.0.0"] } }, "node:v8": { ...v8, [READ]: { supported: ["14.13.1", "12.20.0"] } }, } diff --git a/lib/node-modules/vm.js b/lib/node-modules/vm.js index 60000eba..ee89fe98 100644 --- a/lib/node-modules/vm.js +++ b/lib/node-modules/vm.js @@ -9,7 +9,8 @@ const vm = { runInNewContext: { [READ]: { supported: ["0.3.1"] } }, runInThisContext: { [READ]: { supported: ["0.3.1"] } }, Script: { [READ]: { supported: ["0.3.1"] } }, - Module: { [READ]: { experimental: ["13.0.0", "12.16.0"] } }, + // 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"] } }, } From 81e8bfcdbd472b0607c1acb10cfcde967458f99e Mon Sep 17 00:00:00 2001 From: scagood <2230835+scagood@users.noreply.github.com> Date: Tue, 6 Feb 2024 14:40:03 +0000 Subject: [PATCH 03/11] chore: Add URL static methods --- lib/node-modules/url.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/node-modules/url.js b/lib/node-modules/url.js index 0b7de740..f8be40c0 100644 --- a/lib/node-modules/url.js +++ b/lib/node-modules/url.js @@ -7,7 +7,12 @@ const url = { 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"] } }, + 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"] } }, } From ff9f99caebfa91038c9a603ca0b6a523c43207c0 Mon Sep 17 00:00:00 2001 From: scagood <2230835+scagood@users.noreply.github.com> Date: Wed, 7 Feb 2024 10:51:22 +0000 Subject: [PATCH 04/11] chore: Move to "node-modules" to "unsupported-features" --- .../node-builtins}/assert.js | 0 .../node-builtins}/async_hooks.js | 0 .../node-builtins}/buffer.js | 0 .../node-builtins}/child_process.js | 0 .../node-builtins}/cluster.js | 0 .../node-builtins}/console.js | 0 .../node-builtins}/crypto.js | 0 lib/{node-modules => unsupported-features/node-builtins}/dgram.js | 0 .../node-builtins}/diagnostics_channel.js | 0 lib/{node-modules => unsupported-features/node-builtins}/dns.js | 0 .../node-builtins}/domain.js | 0 .../node-builtins}/events.js | 0 lib/{node-modules => unsupported-features/node-builtins}/fs.js | 0 lib/{node-modules => unsupported-features/node-builtins}/http.js | 0 lib/{node-modules => unsupported-features/node-builtins}/http2.js | 0 lib/{node-modules => unsupported-features/node-builtins}/https.js | 0 .../node-builtins}/inspector.js | 0 .../node-builtins}/module.js | 0 lib/{node-modules => unsupported-features/node-builtins}/net.js | 0 lib/{node-modules => unsupported-features/node-builtins}/os.js | 0 lib/{node-modules => unsupported-features/node-builtins}/path.js | 0 .../node-builtins}/perf_hooks.js | 0 .../node-builtins}/process.js | 0 .../node-builtins}/punycode.js | 0 .../node-builtins}/querystring.js | 0 .../node-builtins}/readline.js | 0 .../node-builtins}/stream.js | 0 .../node-builtins}/string_decoder.js | 0 lib/{node-modules => unsupported-features/node-builtins}/test.js | 0 .../node-builtins}/timers.js | 0 lib/{node-modules => unsupported-features/node-builtins}/tls.js | 0 .../node-builtins}/trace_events.js | 0 lib/{node-modules => unsupported-features/node-builtins}/tty.js | 0 lib/{node-modules => unsupported-features/node-builtins}/url.js | 0 lib/{node-modules => unsupported-features/node-builtins}/util.js | 0 lib/{node-modules => unsupported-features/node-builtins}/v8.js | 0 lib/{node-modules => unsupported-features/node-builtins}/vm.js | 0 lib/{node-modules => unsupported-features/node-builtins}/wasi.js | 0 .../node-builtins}/worker_threads.js | 0 lib/{node-modules => unsupported-features/node-builtins}/zlib.js | 0 40 files changed, 0 insertions(+), 0 deletions(-) rename lib/{node-modules => unsupported-features/node-builtins}/assert.js (100%) rename lib/{node-modules => unsupported-features/node-builtins}/async_hooks.js (100%) rename lib/{node-modules => unsupported-features/node-builtins}/buffer.js (100%) rename lib/{node-modules => unsupported-features/node-builtins}/child_process.js (100%) rename lib/{node-modules => unsupported-features/node-builtins}/cluster.js (100%) rename lib/{node-modules => unsupported-features/node-builtins}/console.js (100%) rename lib/{node-modules => unsupported-features/node-builtins}/crypto.js (100%) rename lib/{node-modules => unsupported-features/node-builtins}/dgram.js (100%) rename lib/{node-modules => unsupported-features/node-builtins}/diagnostics_channel.js (100%) rename lib/{node-modules => unsupported-features/node-builtins}/dns.js (100%) rename lib/{node-modules => unsupported-features/node-builtins}/domain.js (100%) rename lib/{node-modules => unsupported-features/node-builtins}/events.js (100%) rename lib/{node-modules => unsupported-features/node-builtins}/fs.js (100%) rename lib/{node-modules => unsupported-features/node-builtins}/http.js (100%) rename lib/{node-modules => unsupported-features/node-builtins}/http2.js (100%) rename lib/{node-modules => unsupported-features/node-builtins}/https.js (100%) rename lib/{node-modules => unsupported-features/node-builtins}/inspector.js (100%) rename lib/{node-modules => unsupported-features/node-builtins}/module.js (100%) rename lib/{node-modules => unsupported-features/node-builtins}/net.js (100%) rename lib/{node-modules => unsupported-features/node-builtins}/os.js (100%) rename lib/{node-modules => unsupported-features/node-builtins}/path.js (100%) rename lib/{node-modules => unsupported-features/node-builtins}/perf_hooks.js (100%) rename lib/{node-modules => unsupported-features/node-builtins}/process.js (100%) rename lib/{node-modules => unsupported-features/node-builtins}/punycode.js (100%) rename lib/{node-modules => unsupported-features/node-builtins}/querystring.js (100%) rename lib/{node-modules => unsupported-features/node-builtins}/readline.js (100%) rename lib/{node-modules => unsupported-features/node-builtins}/stream.js (100%) rename lib/{node-modules => unsupported-features/node-builtins}/string_decoder.js (100%) rename lib/{node-modules => unsupported-features/node-builtins}/test.js (100%) rename lib/{node-modules => unsupported-features/node-builtins}/timers.js (100%) rename lib/{node-modules => unsupported-features/node-builtins}/tls.js (100%) rename lib/{node-modules => unsupported-features/node-builtins}/trace_events.js (100%) rename lib/{node-modules => unsupported-features/node-builtins}/tty.js (100%) rename lib/{node-modules => unsupported-features/node-builtins}/url.js (100%) rename lib/{node-modules => unsupported-features/node-builtins}/util.js (100%) rename lib/{node-modules => unsupported-features/node-builtins}/v8.js (100%) rename lib/{node-modules => unsupported-features/node-builtins}/vm.js (100%) rename lib/{node-modules => unsupported-features/node-builtins}/wasi.js (100%) rename lib/{node-modules => unsupported-features/node-builtins}/worker_threads.js (100%) rename lib/{node-modules => unsupported-features/node-builtins}/zlib.js (100%) diff --git a/lib/node-modules/assert.js b/lib/unsupported-features/node-builtins/assert.js similarity index 100% rename from lib/node-modules/assert.js rename to lib/unsupported-features/node-builtins/assert.js diff --git a/lib/node-modules/async_hooks.js b/lib/unsupported-features/node-builtins/async_hooks.js similarity index 100% rename from lib/node-modules/async_hooks.js rename to lib/unsupported-features/node-builtins/async_hooks.js diff --git a/lib/node-modules/buffer.js b/lib/unsupported-features/node-builtins/buffer.js similarity index 100% rename from lib/node-modules/buffer.js rename to lib/unsupported-features/node-builtins/buffer.js diff --git a/lib/node-modules/child_process.js b/lib/unsupported-features/node-builtins/child_process.js similarity index 100% rename from lib/node-modules/child_process.js rename to lib/unsupported-features/node-builtins/child_process.js diff --git a/lib/node-modules/cluster.js b/lib/unsupported-features/node-builtins/cluster.js similarity index 100% rename from lib/node-modules/cluster.js rename to lib/unsupported-features/node-builtins/cluster.js diff --git a/lib/node-modules/console.js b/lib/unsupported-features/node-builtins/console.js similarity index 100% rename from lib/node-modules/console.js rename to lib/unsupported-features/node-builtins/console.js diff --git a/lib/node-modules/crypto.js b/lib/unsupported-features/node-builtins/crypto.js similarity index 100% rename from lib/node-modules/crypto.js rename to lib/unsupported-features/node-builtins/crypto.js diff --git a/lib/node-modules/dgram.js b/lib/unsupported-features/node-builtins/dgram.js similarity index 100% rename from lib/node-modules/dgram.js rename to lib/unsupported-features/node-builtins/dgram.js diff --git a/lib/node-modules/diagnostics_channel.js b/lib/unsupported-features/node-builtins/diagnostics_channel.js similarity index 100% rename from lib/node-modules/diagnostics_channel.js rename to lib/unsupported-features/node-builtins/diagnostics_channel.js diff --git a/lib/node-modules/dns.js b/lib/unsupported-features/node-builtins/dns.js similarity index 100% rename from lib/node-modules/dns.js rename to lib/unsupported-features/node-builtins/dns.js diff --git a/lib/node-modules/domain.js b/lib/unsupported-features/node-builtins/domain.js similarity index 100% rename from lib/node-modules/domain.js rename to lib/unsupported-features/node-builtins/domain.js diff --git a/lib/node-modules/events.js b/lib/unsupported-features/node-builtins/events.js similarity index 100% rename from lib/node-modules/events.js rename to lib/unsupported-features/node-builtins/events.js diff --git a/lib/node-modules/fs.js b/lib/unsupported-features/node-builtins/fs.js similarity index 100% rename from lib/node-modules/fs.js rename to lib/unsupported-features/node-builtins/fs.js diff --git a/lib/node-modules/http.js b/lib/unsupported-features/node-builtins/http.js similarity index 100% rename from lib/node-modules/http.js rename to lib/unsupported-features/node-builtins/http.js diff --git a/lib/node-modules/http2.js b/lib/unsupported-features/node-builtins/http2.js similarity index 100% rename from lib/node-modules/http2.js rename to lib/unsupported-features/node-builtins/http2.js diff --git a/lib/node-modules/https.js b/lib/unsupported-features/node-builtins/https.js similarity index 100% rename from lib/node-modules/https.js rename to lib/unsupported-features/node-builtins/https.js diff --git a/lib/node-modules/inspector.js b/lib/unsupported-features/node-builtins/inspector.js similarity index 100% rename from lib/node-modules/inspector.js rename to lib/unsupported-features/node-builtins/inspector.js diff --git a/lib/node-modules/module.js b/lib/unsupported-features/node-builtins/module.js similarity index 100% rename from lib/node-modules/module.js rename to lib/unsupported-features/node-builtins/module.js diff --git a/lib/node-modules/net.js b/lib/unsupported-features/node-builtins/net.js similarity index 100% rename from lib/node-modules/net.js rename to lib/unsupported-features/node-builtins/net.js diff --git a/lib/node-modules/os.js b/lib/unsupported-features/node-builtins/os.js similarity index 100% rename from lib/node-modules/os.js rename to lib/unsupported-features/node-builtins/os.js diff --git a/lib/node-modules/path.js b/lib/unsupported-features/node-builtins/path.js similarity index 100% rename from lib/node-modules/path.js rename to lib/unsupported-features/node-builtins/path.js diff --git a/lib/node-modules/perf_hooks.js b/lib/unsupported-features/node-builtins/perf_hooks.js similarity index 100% rename from lib/node-modules/perf_hooks.js rename to lib/unsupported-features/node-builtins/perf_hooks.js diff --git a/lib/node-modules/process.js b/lib/unsupported-features/node-builtins/process.js similarity index 100% rename from lib/node-modules/process.js rename to lib/unsupported-features/node-builtins/process.js diff --git a/lib/node-modules/punycode.js b/lib/unsupported-features/node-builtins/punycode.js similarity index 100% rename from lib/node-modules/punycode.js rename to lib/unsupported-features/node-builtins/punycode.js diff --git a/lib/node-modules/querystring.js b/lib/unsupported-features/node-builtins/querystring.js similarity index 100% rename from lib/node-modules/querystring.js rename to lib/unsupported-features/node-builtins/querystring.js diff --git a/lib/node-modules/readline.js b/lib/unsupported-features/node-builtins/readline.js similarity index 100% rename from lib/node-modules/readline.js rename to lib/unsupported-features/node-builtins/readline.js diff --git a/lib/node-modules/stream.js b/lib/unsupported-features/node-builtins/stream.js similarity index 100% rename from lib/node-modules/stream.js rename to lib/unsupported-features/node-builtins/stream.js diff --git a/lib/node-modules/string_decoder.js b/lib/unsupported-features/node-builtins/string_decoder.js similarity index 100% rename from lib/node-modules/string_decoder.js rename to lib/unsupported-features/node-builtins/string_decoder.js diff --git a/lib/node-modules/test.js b/lib/unsupported-features/node-builtins/test.js similarity index 100% rename from lib/node-modules/test.js rename to lib/unsupported-features/node-builtins/test.js diff --git a/lib/node-modules/timers.js b/lib/unsupported-features/node-builtins/timers.js similarity index 100% rename from lib/node-modules/timers.js rename to lib/unsupported-features/node-builtins/timers.js diff --git a/lib/node-modules/tls.js b/lib/unsupported-features/node-builtins/tls.js similarity index 100% rename from lib/node-modules/tls.js rename to lib/unsupported-features/node-builtins/tls.js diff --git a/lib/node-modules/trace_events.js b/lib/unsupported-features/node-builtins/trace_events.js similarity index 100% rename from lib/node-modules/trace_events.js rename to lib/unsupported-features/node-builtins/trace_events.js diff --git a/lib/node-modules/tty.js b/lib/unsupported-features/node-builtins/tty.js similarity index 100% rename from lib/node-modules/tty.js rename to lib/unsupported-features/node-builtins/tty.js diff --git a/lib/node-modules/url.js b/lib/unsupported-features/node-builtins/url.js similarity index 100% rename from lib/node-modules/url.js rename to lib/unsupported-features/node-builtins/url.js diff --git a/lib/node-modules/util.js b/lib/unsupported-features/node-builtins/util.js similarity index 100% rename from lib/node-modules/util.js rename to lib/unsupported-features/node-builtins/util.js diff --git a/lib/node-modules/v8.js b/lib/unsupported-features/node-builtins/v8.js similarity index 100% rename from lib/node-modules/v8.js rename to lib/unsupported-features/node-builtins/v8.js diff --git a/lib/node-modules/vm.js b/lib/unsupported-features/node-builtins/vm.js similarity index 100% rename from lib/node-modules/vm.js rename to lib/unsupported-features/node-builtins/vm.js diff --git a/lib/node-modules/wasi.js b/lib/unsupported-features/node-builtins/wasi.js similarity index 100% rename from lib/node-modules/wasi.js rename to lib/unsupported-features/node-builtins/wasi.js diff --git a/lib/node-modules/worker_threads.js b/lib/unsupported-features/node-builtins/worker_threads.js similarity index 100% rename from lib/node-modules/worker_threads.js rename to lib/unsupported-features/node-builtins/worker_threads.js diff --git a/lib/node-modules/zlib.js b/lib/unsupported-features/node-builtins/zlib.js similarity index 100% rename from lib/node-modules/zlib.js rename to lib/unsupported-features/node-builtins/zlib.js From a526a49739a5e0f4b19f9d34c0f8495656e06423 Mon Sep 17 00:00:00 2001 From: scagood <2230835+scagood@users.noreply.github.com> Date: Wed, 7 Feb 2024 10:52:20 +0000 Subject: [PATCH 05/11] feat: Add timers.promises support See: https://github.com/nodejs/node/blob/main/doc/changelogs/CHANGELOG_V21.md#2024-01-15-version-2160-current-rafaelgss --- lib/unsupported-features/node-builtins/timers.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/unsupported-features/node-builtins/timers.js b/lib/unsupported-features/node-builtins/timers.js index 045a50da..f3350be5 100644 --- a/lib/unsupported-features/node-builtins/timers.js +++ b/lib/unsupported-features/node-builtins/timers.js @@ -20,6 +20,8 @@ const timers = { 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] From 2db3d968bbb2bd8592915df35dcf582726f17972 Mon Sep 17 00:00:00 2001 From: scagood <2230835+scagood@users.noreply.github.com> Date: Fri, 9 Feb 2024 13:01:32 +0000 Subject: [PATCH 06/11] feat: Hook up updated builtins --- .../no-unsupported-features/node-builtins.js | 327 +----------------- .../assert.js | 2 + .../async_hooks.js | 2 + .../buffer.js | 2 + .../child_process.js | 2 + .../cluster.js | 2 + .../console.js | 2 + .../crypto.js | 2 + .../dgram.js | 2 + .../diagnostics_channel.js | 2 + .../dns.js | 2 + .../domain.js | 2 + .../events.js | 3 + .../fs.js | 7 + .../http.js | 2 + .../http2.js | 2 + .../https.js | 2 + .../inspector.js | 5 + .../module.js | 10 +- .../net.js | 2 + .../os.js | 2 + .../path.js | 2 + .../perf_hooks.js | 2 + .../process.js | 2 + .../punycode.js | 2 + .../querystring.js | 2 + .../readline.js | 3 + .../stream.js | 6 + .../string_decoder.js | 2 + .../test.js | 2 + .../timers.js | 3 + .../tls.js | 2 + .../trace_events.js | 2 + .../tty.js | 2 + .../url.js | 2 + .../util.js | 4 + .../v8.js | 2 + .../vm.js | 2 + .../wasi.js | 2 + .../worker_threads.js | 2 + .../zlib.js | 2 + lib/unsupported-features/node-builtins.js | 45 +++ lib/unsupported-features/types.js | 14 + lib/util/check-unsupported-builtins.js | 2 +- lib/util/enumerate-property-names.js | 47 ++- 45 files changed, 195 insertions(+), 345 deletions(-) rename lib/unsupported-features/{node-builtins => node-builtins-modules}/assert.js (94%) rename lib/unsupported-features/{node-builtins => node-builtins-modules}/async_hooks.js (91%) rename lib/unsupported-features/{node-builtins => node-builtins-modules}/buffer.js (94%) rename lib/unsupported-features/{node-builtins => node-builtins-modules}/child_process.js (86%) rename lib/unsupported-features/{node-builtins => node-builtins-modules}/cluster.js (89%) rename lib/unsupported-features/{node-builtins => node-builtins-modules}/console.js (93%) rename lib/unsupported-features/{node-builtins => node-builtins-modules}/crypto.js (97%) rename lib/unsupported-features/{node-builtins => node-builtins-modules}/dgram.js (77%) rename lib/unsupported-features/{node-builtins => node-builtins-modules}/diagnostics_channel.js (89%) rename lib/unsupported-features/{node-builtins => node-builtins-modules}/dns.js (96%) rename lib/unsupported-features/{node-builtins => node-builtins-modules}/domain.js (75%) rename lib/unsupported-features/{node-builtins => node-builtins-modules}/events.js (91%) rename lib/unsupported-features/{node-builtins => node-builtins-modules}/fs.js (96%) rename lib/unsupported-features/{node-builtins => node-builtins-modules}/http.js (91%) rename lib/unsupported-features/{node-builtins => node-builtins-modules}/http2.js (92%) rename lib/unsupported-features/{node-builtins => node-builtins-modules}/https.js (83%) rename lib/unsupported-features/{node-builtins => node-builtins-modules}/inspector.js (82%) rename lib/unsupported-features/{node-builtins => node-builtins-modules}/module.js (81%) rename lib/unsupported-features/{node-builtins => node-builtins-modules}/net.js (91%) rename lib/unsupported-features/{node-builtins => node-builtins-modules}/os.js (93%) rename lib/unsupported-features/{node-builtins => node-builtins-modules}/path.js (93%) rename lib/unsupported-features/{node-builtins => node-builtins-modules}/perf_hooks.js (91%) rename lib/unsupported-features/{node-builtins => node-builtins-modules}/process.js (97%) rename lib/unsupported-features/{node-builtins => node-builtins-modules}/punycode.js (83%) rename lib/unsupported-features/{node-builtins => node-builtins-modules}/querystring.js (84%) rename lib/unsupported-features/{node-builtins => node-builtins-modules}/readline.js (88%) rename lib/unsupported-features/{node-builtins => node-builtins-modules}/stream.js (85%) rename lib/unsupported-features/{node-builtins => node-builtins-modules}/string_decoder.js (77%) rename lib/unsupported-features/{node-builtins => node-builtins-modules}/test.js (93%) rename lib/unsupported-features/{node-builtins => node-builtins-modules}/timers.js (90%) rename lib/unsupported-features/{node-builtins => node-builtins-modules}/tls.js (92%) rename lib/unsupported-features/{node-builtins => node-builtins-modules}/trace_events.js (79%) rename lib/unsupported-features/{node-builtins => node-builtins-modules}/tty.js (79%) rename lib/unsupported-features/{node-builtins => node-builtins-modules}/url.js (90%) rename lib/unsupported-features/{node-builtins => node-builtins-modules}/util.js (96%) rename lib/unsupported-features/{node-builtins => node-builtins-modules}/v8.js (95%) rename lib/unsupported-features/{node-builtins => node-builtins-modules}/vm.js (88%) rename lib/unsupported-features/{node-builtins => node-builtins-modules}/wasi.js (69%) rename lib/unsupported-features/{node-builtins => node-builtins-modules}/worker_threads.js (93%) rename lib/unsupported-features/{node-builtins => node-builtins-modules}/zlib.js (95%) create mode 100644 lib/unsupported-features/node-builtins.js create mode 100644 lib/unsupported-features/types.js 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/assert.js b/lib/unsupported-features/node-builtins-modules/assert.js similarity index 94% rename from lib/unsupported-features/node-builtins/assert.js rename to lib/unsupported-features/node-builtins-modules/assert.js index b5d99048..7584c0d3 100644 --- a/lib/unsupported-features/node-builtins/assert.js +++ b/lib/unsupported-features/node-builtins-modules/assert.js @@ -1,5 +1,6 @@ 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"] } }, @@ -42,6 +43,7 @@ assert.strict = { ...assert, } +/** @type {import('../types.js').SupportVersionTree} */ module.exports = { assert: { [READ]: { supported: ["0.1.21"] }, diff --git a/lib/unsupported-features/node-builtins/async_hooks.js b/lib/unsupported-features/node-builtins-modules/async_hooks.js similarity index 91% rename from lib/unsupported-features/node-builtins/async_hooks.js rename to lib/unsupported-features/node-builtins-modules/async_hooks.js index b73b6def..0048b57e 100644 --- a/lib/unsupported-features/node-builtins/async_hooks.js +++ b/lib/unsupported-features/node-builtins-modules/async_hooks.js @@ -1,5 +1,6 @@ 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"] } }, @@ -22,6 +23,7 @@ const async_hooks = { }, } +/** @type {import('../types.js').SupportVersionTree} */ module.exports = { async_hooks: { [READ]: { diff --git a/lib/unsupported-features/node-builtins/buffer.js b/lib/unsupported-features/node-builtins-modules/buffer.js similarity index 94% rename from lib/unsupported-features/node-builtins/buffer.js rename to lib/unsupported-features/node-builtins-modules/buffer.js index cd679614..b041d1f7 100644 --- a/lib/unsupported-features/node-builtins/buffer.js +++ b/lib/unsupported-features/node-builtins-modules/buffer.js @@ -1,5 +1,6 @@ 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"] } }, @@ -39,6 +40,7 @@ const buffer = { }, } +/** @type {import('../types.js').SupportVersionTree} */ module.exports = { buffer: { [READ]: { supported: ["0.1.90"] }, diff --git a/lib/unsupported-features/node-builtins/child_process.js b/lib/unsupported-features/node-builtins-modules/child_process.js similarity index 86% rename from lib/unsupported-features/node-builtins/child_process.js rename to lib/unsupported-features/node-builtins-modules/child_process.js index 52872700..8618ca0c 100644 --- a/lib/unsupported-features/node-builtins/child_process.js +++ b/lib/unsupported-features/node-builtins-modules/child_process.js @@ -1,5 +1,6 @@ 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"] } }, @@ -11,6 +12,7 @@ const child_process = { ChildProcess: { [READ]: { supported: ["2.2.0"] } }, } +/** @type {import('../types.js').SupportVersionTree} */ module.exports = { child_process: { [READ]: { supported: ["0.1.90"] }, diff --git a/lib/unsupported-features/node-builtins/cluster.js b/lib/unsupported-features/node-builtins-modules/cluster.js similarity index 89% rename from lib/unsupported-features/node-builtins/cluster.js rename to lib/unsupported-features/node-builtins-modules/cluster.js index 7fc735e4..cf4004b1 100644 --- a/lib/unsupported-features/node-builtins/cluster.js +++ b/lib/unsupported-features/node-builtins-modules/cluster.js @@ -1,5 +1,6 @@ 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"] } }, @@ -15,6 +16,7 @@ const cluster = { Worker: { [READ]: { supported: ["0.7.0"] } }, } +/** @type {import('../types.js').SupportVersionTree} */ module.exports = { cluster: { [READ]: { supported: ["0.7.0"] }, diff --git a/lib/unsupported-features/node-builtins/console.js b/lib/unsupported-features/node-builtins-modules/console.js similarity index 93% rename from lib/unsupported-features/node-builtins/console.js rename to lib/unsupported-features/node-builtins-modules/console.js index 43a3d633..4359a147 100644 --- a/lib/unsupported-features/node-builtins/console.js +++ b/lib/unsupported-features/node-builtins-modules/console.js @@ -1,5 +1,6 @@ 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"] } }, @@ -31,6 +32,7 @@ const console = { // timelineEnd: { [READ]: { supported: ["8.0.0"] } }, } +/** @type {import('../types.js').SupportVersionTree} */ module.exports = { console: { [READ]: { supported: ["0.1.100"] }, diff --git a/lib/unsupported-features/node-builtins/crypto.js b/lib/unsupported-features/node-builtins-modules/crypto.js similarity index 97% rename from lib/unsupported-features/node-builtins/crypto.js rename to lib/unsupported-features/node-builtins-modules/crypto.js index ce40f7f8..7aea7b29 100644 --- a/lib/unsupported-features/node-builtins/crypto.js +++ b/lib/unsupported-features/node-builtins-modules/crypto.js @@ -2,6 +2,7 @@ const { READ } = require("@eslint-community/eslint-utils") // TODO: https://nodejs.org/docs/latest/api/webcrypto.html +/** @type {import('../types.js').SupportVersionTree} */ const crypto = { constants: { [READ]: { supported: ["6.3.0"] } }, fips: { [READ]: { supported: ["6.0.0"], deprecated: ["10.0.0"] } }, @@ -89,6 +90,7 @@ const crypto = { X509Certificate: { [READ]: { supported: ["15.6.0"] } }, } +/** @type {import('../types.js').SupportVersionTree} */ module.exports = { crypto: { [READ]: { supported: ["0.1.92"] }, diff --git a/lib/unsupported-features/node-builtins/dgram.js b/lib/unsupported-features/node-builtins-modules/dgram.js similarity index 77% rename from lib/unsupported-features/node-builtins/dgram.js rename to lib/unsupported-features/node-builtins-modules/dgram.js index 412ff2b3..cffc4f3e 100644 --- a/lib/unsupported-features/node-builtins/dgram.js +++ b/lib/unsupported-features/node-builtins-modules/dgram.js @@ -1,10 +1,12 @@ 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"] }, diff --git a/lib/unsupported-features/node-builtins/diagnostics_channel.js b/lib/unsupported-features/node-builtins-modules/diagnostics_channel.js similarity index 89% rename from lib/unsupported-features/node-builtins/diagnostics_channel.js rename to lib/unsupported-features/node-builtins-modules/diagnostics_channel.js index 113b58e6..5ae74310 100644 --- a/lib/unsupported-features/node-builtins/diagnostics_channel.js +++ b/lib/unsupported-features/node-builtins-modules/diagnostics_channel.js @@ -1,5 +1,6 @@ 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"] } }, @@ -10,6 +11,7 @@ const diagnostics_channel = { TracingChannel: { [READ]: { experimental: ["19.9.0"] } }, } +/** @type {import('../types.js').SupportVersionTree} */ module.exports = { diagnostics_channel: { [READ]: { diff --git a/lib/unsupported-features/node-builtins/dns.js b/lib/unsupported-features/node-builtins-modules/dns.js similarity index 96% rename from lib/unsupported-features/node-builtins/dns.js rename to lib/unsupported-features/node-builtins-modules/dns.js index 6c9686b7..8440ad0c 100644 --- a/lib/unsupported-features/node-builtins/dns.js +++ b/lib/unsupported-features/node-builtins-modules/dns.js @@ -1,5 +1,6 @@ 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"] } }, @@ -53,6 +54,7 @@ const dns = { }, } +/** @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"] } }, diff --git a/lib/unsupported-features/node-builtins/domain.js b/lib/unsupported-features/node-builtins-modules/domain.js similarity index 75% rename from lib/unsupported-features/node-builtins/domain.js rename to lib/unsupported-features/node-builtins-modules/domain.js index 0aa23d0c..9224614e 100644 --- a/lib/unsupported-features/node-builtins/domain.js +++ b/lib/unsupported-features/node-builtins-modules/domain.js @@ -1,10 +1,12 @@ 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]: { diff --git a/lib/unsupported-features/node-builtins/events.js b/lib/unsupported-features/node-builtins-modules/events.js similarity index 91% rename from lib/unsupported-features/node-builtins/events.js rename to lib/unsupported-features/node-builtins-modules/events.js index de6eb961..c314e8b0 100644 --- a/lib/unsupported-features/node-builtins/events.js +++ b/lib/unsupported-features/node-builtins-modules/events.js @@ -1,5 +1,6 @@ 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"] } }, @@ -24,6 +25,7 @@ const static = { 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: { @@ -50,6 +52,7 @@ const events = { ...static, } +/** @type {import('../types.js').SupportVersionTree} */ module.exports = { events: { [READ]: { supported: ["0.1.26"] }, diff --git a/lib/unsupported-features/node-builtins/fs.js b/lib/unsupported-features/node-builtins-modules/fs.js similarity index 96% rename from lib/unsupported-features/node-builtins/fs.js rename to lib/unsupported-features/node-builtins-modules/fs.js index e0fc67a0..91744b1b 100644 --- a/lib/unsupported-features/node-builtins/fs.js +++ b/lib/unsupported-features/node-builtins-modules/fs.js @@ -1,5 +1,6 @@ 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"] } }, @@ -34,6 +35,8 @@ const promises_api = { 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"] } }, @@ -88,6 +91,8 @@ const callback_api = { 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"] } }, @@ -137,6 +142,7 @@ const synchronous_api = { writevSync: { [READ]: { supported: ["12.9.0"] } }, } +/** @type {import('../types.js').SupportVersionTree} */ const fs = { promises: { [READ]: { @@ -159,6 +165,7 @@ const fs = { common_objects: { [READ]: { supported: ["0.1.8"] } }, } +/** @type {import('../types.js').SupportVersionTree} */ module.exports = { fs: { [READ]: { supported: ["0.1.8"] }, diff --git a/lib/unsupported-features/node-builtins/http.js b/lib/unsupported-features/node-builtins-modules/http.js similarity index 91% rename from lib/unsupported-features/node-builtins/http.js rename to lib/unsupported-features/node-builtins-modules/http.js index 96b944b9..0c729264 100644 --- a/lib/unsupported-features/node-builtins/http.js +++ b/lib/unsupported-features/node-builtins-modules/http.js @@ -1,5 +1,6 @@ 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"] } }, @@ -19,6 +20,7 @@ const http = { OutgoingMessage: { [READ]: { supported: ["0.1.17"] } }, } +/** @type {import('../types.js').SupportVersionTree} */ module.exports = { http: { [READ]: { supported: ["0.0.1"] }, diff --git a/lib/unsupported-features/node-builtins/http2.js b/lib/unsupported-features/node-builtins-modules/http2.js similarity index 92% rename from lib/unsupported-features/node-builtins/http2.js rename to lib/unsupported-features/node-builtins-modules/http2.js index 9aff500c..beeb5628 100644 --- a/lib/unsupported-features/node-builtins/http2.js +++ b/lib/unsupported-features/node-builtins-modules/http2.js @@ -1,5 +1,6 @@ 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"] } }, @@ -21,6 +22,7 @@ const http2 = { Http2ServerResponse: { [READ]: { supported: ["8.4.0"] } }, } +/** @type {import('../types.js').SupportVersionTree} */ module.exports = { http2: { [READ]: { diff --git a/lib/unsupported-features/node-builtins/https.js b/lib/unsupported-features/node-builtins-modules/https.js similarity index 83% rename from lib/unsupported-features/node-builtins/https.js rename to lib/unsupported-features/node-builtins-modules/https.js index 12f9251a..0972066d 100644 --- a/lib/unsupported-features/node-builtins/https.js +++ b/lib/unsupported-features/node-builtins-modules/https.js @@ -1,5 +1,6 @@ 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"] } }, @@ -9,6 +10,7 @@ const http = { Server: { [READ]: { supported: ["0.3.4"] } }, } +/** @type {import('../types.js').SupportVersionTree} */ module.exports = { http: { [READ]: { supported: ["0.3.4"] }, diff --git a/lib/unsupported-features/node-builtins/inspector.js b/lib/unsupported-features/node-builtins-modules/inspector.js similarity index 82% rename from lib/unsupported-features/node-builtins/inspector.js rename to lib/unsupported-features/node-builtins-modules/inspector.js index 40808aa4..21f4fef6 100644 --- a/lib/unsupported-features/node-builtins/inspector.js +++ b/lib/unsupported-features/node-builtins-modules/inspector.js @@ -1,5 +1,6 @@ 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"] } }, @@ -8,15 +9,19 @@ const common_objects = { 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]: { diff --git a/lib/unsupported-features/node-builtins/module.js b/lib/unsupported-features/node-builtins-modules/module.js similarity index 81% rename from lib/unsupported-features/node-builtins/module.js rename to lib/unsupported-features/node-builtins-modules/module.js index 12a579c4..053ba66b 100644 --- a/lib/unsupported-features/node-builtins/module.js +++ b/lib/unsupported-features/node-builtins-modules/module.js @@ -1,6 +1,7 @@ const { READ } = require("@eslint-community/eslint-utils") -const module = { +/** @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: { @@ -16,15 +17,16 @@ const module = { SourceMap: { [READ]: { supported: ["13.7.0", "12.17.0"] } }, } -module.Module = module +Module.Module = Module +/** @type {import('../types.js').SupportVersionTree} */ module.exports = { module: { [READ]: { supported: ["0.3.7"] }, - ...module, + ...Module, }, "node:module": { [READ]: { supported: ["14.13.1", "12.20.0"] }, - ...module, + ...Module, }, } diff --git a/lib/unsupported-features/node-builtins/net.js b/lib/unsupported-features/node-builtins-modules/net.js similarity index 91% rename from lib/unsupported-features/node-builtins/net.js rename to lib/unsupported-features/node-builtins-modules/net.js index fa47147f..34efe041 100644 --- a/lib/unsupported-features/node-builtins/net.js +++ b/lib/unsupported-features/node-builtins-modules/net.js @@ -1,5 +1,6 @@ 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"] } }, @@ -21,6 +22,7 @@ const net = { Socket: { [READ]: { supported: ["0.3.4"] } }, } +/** @type {import('../types.js').SupportVersionTree} */ module.exports = { net: { [READ]: { supported: ["0.0.1"] }, diff --git a/lib/unsupported-features/node-builtins/os.js b/lib/unsupported-features/node-builtins-modules/os.js similarity index 93% rename from lib/unsupported-features/node-builtins/os.js rename to lib/unsupported-features/node-builtins-modules/os.js index c129d487..4829a7a8 100644 --- a/lib/unsupported-features/node-builtins/os.js +++ b/lib/unsupported-features/node-builtins-modules/os.js @@ -1,5 +1,6 @@ const { READ } = require("@eslint-community/eslint-utils") +/** @type {import('../types.js').SupportVersionTree} */ const os = { EOL: { [READ]: { supported: ["0.7.8"] } }, constants: { @@ -29,6 +30,7 @@ const os = { version: { [READ]: { supported: ["13.11.0", "12.17.0"] } }, } +/** @type {import('../types.js').SupportVersionTree} */ module.exports = { os: { [READ]: { supported: ["0.3.3"] }, diff --git a/lib/unsupported-features/node-builtins/path.js b/lib/unsupported-features/node-builtins-modules/path.js similarity index 93% rename from lib/unsupported-features/node-builtins/path.js rename to lib/unsupported-features/node-builtins-modules/path.js index 332e2416..7a5cb7ab 100644 --- a/lib/unsupported-features/node-builtins/path.js +++ b/lib/unsupported-features/node-builtins-modules/path.js @@ -1,5 +1,6 @@ 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"] } }, @@ -16,6 +17,7 @@ const path = { toNamespacedPath: { [READ]: { supported: ["9.0.0"] } }, } +/** @type {import('../types.js').SupportVersionTree} */ module.exports = { path: { [READ]: { supported: ["0.1.16"] }, diff --git a/lib/unsupported-features/node-builtins/perf_hooks.js b/lib/unsupported-features/node-builtins-modules/perf_hooks.js similarity index 91% rename from lib/unsupported-features/node-builtins/perf_hooks.js rename to lib/unsupported-features/node-builtins-modules/perf_hooks.js index 2ffdb6f4..42ac0e58 100644 --- a/lib/unsupported-features/node-builtins/perf_hooks.js +++ b/lib/unsupported-features/node-builtins-modules/perf_hooks.js @@ -1,5 +1,6 @@ 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"] } }, @@ -17,6 +18,7 @@ const perf_hooks = { RecordableHistogram: { [READ]: { supported: ["15.9.0", "14.18.0"] } }, } +/** @type {import('../types.js').SupportVersionTree} */ module.exports = { perf_hooks: { [READ]: { supported: ["8.5.0"] }, diff --git a/lib/unsupported-features/node-builtins/process.js b/lib/unsupported-features/node-builtins-modules/process.js similarity index 97% rename from lib/unsupported-features/node-builtins/process.js rename to lib/unsupported-features/node-builtins-modules/process.js index e7b17f1d..e5b6a386 100644 --- a/lib/unsupported-features/node-builtins/process.js +++ b/lib/unsupported-features/node-builtins-modules/process.js @@ -1,5 +1,6 @@ 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"] } }, @@ -114,6 +115,7 @@ const process = { uptime: { [READ]: { supported: ["0.5.0"] } }, } +/** @type {import('../types.js').SupportVersionTree} */ module.exports = { process: { [READ]: { supported: ["0.1.3"] }, diff --git a/lib/unsupported-features/node-builtins/punycode.js b/lib/unsupported-features/node-builtins-modules/punycode.js similarity index 83% rename from lib/unsupported-features/node-builtins/punycode.js rename to lib/unsupported-features/node-builtins-modules/punycode.js index 41dff2bb..baec2d93 100644 --- a/lib/unsupported-features/node-builtins/punycode.js +++ b/lib/unsupported-features/node-builtins-modules/punycode.js @@ -1,5 +1,6 @@ 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"] } }, @@ -9,6 +10,7 @@ const punycode = { toUnicode: { [READ]: { supported: ["0.6.1"] } }, } +/** @type {import('../types.js').SupportVersionTree} */ module.exports = { punycode: { [READ]: { diff --git a/lib/unsupported-features/node-builtins/querystring.js b/lib/unsupported-features/node-builtins-modules/querystring.js similarity index 84% rename from lib/unsupported-features/node-builtins/querystring.js rename to lib/unsupported-features/node-builtins-modules/querystring.js index 7f0eec14..3e396243 100644 --- a/lib/unsupported-features/node-builtins/querystring.js +++ b/lib/unsupported-features/node-builtins-modules/querystring.js @@ -1,5 +1,6 @@ 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"] } }, @@ -9,6 +10,7 @@ const querystring = { unescape: { [READ]: { supported: ["0.1.25"] } }, } +/** @type {import('../types.js').SupportVersionTree} */ module.exports = { querystring: { [READ]: { supported: ["0.1.25"] }, diff --git a/lib/unsupported-features/node-builtins/readline.js b/lib/unsupported-features/node-builtins-modules/readline.js similarity index 88% rename from lib/unsupported-features/node-builtins/readline.js rename to lib/unsupported-features/node-builtins-modules/readline.js index 2a4dc33a..b8a7343c 100644 --- a/lib/unsupported-features/node-builtins/readline.js +++ b/lib/unsupported-features/node-builtins-modules/readline.js @@ -1,11 +1,13 @@ 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"] }, @@ -21,6 +23,7 @@ const readline = { InterfaceConstructor: { [READ]: { supported: ["0.1.104"] } }, } +/** @type {import('../types.js').SupportVersionTree} */ module.exports = { readline: { [READ]: { supported: ["0.1.98"] }, diff --git a/lib/unsupported-features/node-builtins/stream.js b/lib/unsupported-features/node-builtins-modules/stream.js similarity index 85% rename from lib/unsupported-features/node-builtins/stream.js rename to lib/unsupported-features/node-builtins-modules/stream.js index da955462..c6bb089f 100644 --- a/lib/unsupported-features/node-builtins/stream.js +++ b/lib/unsupported-features/node-builtins-modules/stream.js @@ -2,6 +2,7 @@ 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"] } }, @@ -10,12 +11,14 @@ const Readable = { 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"] } }, @@ -25,11 +28,13 @@ const Duplex = { const Transform = Duplex +/** @type {import('../types.js').SupportVersionTree} */ const promises_api = { 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"] }, @@ -51,6 +56,7 @@ const stream = { setDefaultHighWaterMark: { [READ]: { supported: ["19.9.0", "18.17.0"] } }, } +/** @type {import('../types.js').SupportVersionTree} */ module.exports = { stream: { [READ]: { supported: ["0.9.4"] }, diff --git a/lib/unsupported-features/node-builtins/string_decoder.js b/lib/unsupported-features/node-builtins-modules/string_decoder.js similarity index 77% rename from lib/unsupported-features/node-builtins/string_decoder.js rename to lib/unsupported-features/node-builtins-modules/string_decoder.js index 1534b8e8..5d6932fc 100644 --- a/lib/unsupported-features/node-builtins/string_decoder.js +++ b/lib/unsupported-features/node-builtins-modules/string_decoder.js @@ -1,9 +1,11 @@ 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"] }, diff --git a/lib/unsupported-features/node-builtins/test.js b/lib/unsupported-features/node-builtins-modules/test.js similarity index 93% rename from lib/unsupported-features/node-builtins/test.js rename to lib/unsupported-features/node-builtins-modules/test.js index c807df35..b65ddb9b 100644 --- a/lib/unsupported-features/node-builtins/test.js +++ b/lib/unsupported-features/node-builtins-modules/test.js @@ -1,5 +1,6 @@ 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"] } }, @@ -31,6 +32,7 @@ const test = { test.test = test +/** @type {import('../types.js').SupportVersionTree} */ module.exports = { "node:test": { [READ]: { diff --git a/lib/unsupported-features/node-builtins/timers.js b/lib/unsupported-features/node-builtins-modules/timers.js similarity index 90% rename from lib/unsupported-features/node-builtins/timers.js rename to lib/unsupported-features/node-builtins-modules/timers.js index f3350be5..be987a3d 100644 --- a/lib/unsupported-features/node-builtins/timers.js +++ b/lib/unsupported-features/node-builtins-modules/timers.js @@ -1,5 +1,6 @@ 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"] } }, @@ -10,6 +11,7 @@ const promises_api = { }, } +/** @type {import('../types.js').SupportVersionTree} */ const timers = { Immediate: { [READ]: { supported: ["0.9.1"] } }, Timeout: { [READ]: { supported: ["0.9.1"] } }, @@ -27,6 +29,7 @@ const timers = { // enroll: [Function: deprecated] } +/** @type {import('../types.js').SupportVersionTree} */ module.exports = { timers: { [READ]: { supported: ["0.9.1"] }, diff --git a/lib/unsupported-features/node-builtins/tls.js b/lib/unsupported-features/node-builtins-modules/tls.js similarity index 92% rename from lib/unsupported-features/node-builtins/tls.js rename to lib/unsupported-features/node-builtins-modules/tls.js index f3750e61..27a5aad8 100644 --- a/lib/unsupported-features/node-builtins/tls.js +++ b/lib/unsupported-features/node-builtins-modules/tls.js @@ -1,5 +1,6 @@ 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"] } }, @@ -21,6 +22,7 @@ const tls = { TLSSocket: { [READ]: { supported: ["0.11.4"] } }, } +/** @type {import('../types.js').SupportVersionTree} */ module.exports = { tls: { [READ]: { supported: ["0.3.2"] }, diff --git a/lib/unsupported-features/node-builtins/trace_events.js b/lib/unsupported-features/node-builtins-modules/trace_events.js similarity index 79% rename from lib/unsupported-features/node-builtins/trace_events.js rename to lib/unsupported-features/node-builtins-modules/trace_events.js index 8ad10f70..79261d2d 100644 --- a/lib/unsupported-features/node-builtins/trace_events.js +++ b/lib/unsupported-features/node-builtins-modules/trace_events.js @@ -1,10 +1,12 @@ 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"] }, diff --git a/lib/unsupported-features/node-builtins/tty.js b/lib/unsupported-features/node-builtins-modules/tty.js similarity index 79% rename from lib/unsupported-features/node-builtins/tty.js rename to lib/unsupported-features/node-builtins-modules/tty.js index 7e8599dc..45e2ac32 100644 --- a/lib/unsupported-features/node-builtins/tty.js +++ b/lib/unsupported-features/node-builtins-modules/tty.js @@ -1,11 +1,13 @@ 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"] }, diff --git a/lib/unsupported-features/node-builtins/url.js b/lib/unsupported-features/node-builtins-modules/url.js similarity index 90% rename from lib/unsupported-features/node-builtins/url.js rename to lib/unsupported-features/node-builtins-modules/url.js index f8be40c0..e97a0888 100644 --- a/lib/unsupported-features/node-builtins/url.js +++ b/lib/unsupported-features/node-builtins-modules/url.js @@ -1,5 +1,6 @@ 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"] } }, @@ -17,6 +18,7 @@ const url = { Url: { [READ]: { supported: ["0.1.25"] } }, } +/** @type {import('../types.js').SupportVersionTree} */ module.exports = { url: { [READ]: { supported: ["0.1.25"] }, diff --git a/lib/unsupported-features/node-builtins/util.js b/lib/unsupported-features/node-builtins-modules/util.js similarity index 96% rename from lib/unsupported-features/node-builtins/util.js rename to lib/unsupported-features/node-builtins-modules/util.js index 5b66d9b3..f20bc862 100644 --- a/lib/unsupported-features/node-builtins/util.js +++ b/lib/unsupported-features/node-builtins-modules/util.js @@ -1,5 +1,6 @@ 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"] } }, @@ -49,6 +50,7 @@ const types = { }, } +/** @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"] } }, @@ -71,6 +73,7 @@ const deprecated = { log: { [READ]: { supported: ["0.3.0"], deprecated: ["6.0.0"] } }, } +/** @type {import('../types.js').SupportVersionTree} */ const util = { promisify: { [READ]: { supported: ["8.0.0"] }, @@ -110,6 +113,7 @@ const util = { ...deprecated, } +/** @type {import('../types.js').SupportVersionTree} */ module.exports = { util: util, "node:util": { ...util, [READ]: { supported: ["14.13.1", "12.20.0"] } }, diff --git a/lib/unsupported-features/node-builtins/v8.js b/lib/unsupported-features/node-builtins-modules/v8.js similarity index 95% rename from lib/unsupported-features/node-builtins/v8.js rename to lib/unsupported-features/node-builtins-modules/v8.js index 8a493c4d..e0e73f58 100644 --- a/lib/unsupported-features/node-builtins/v8.js +++ b/lib/unsupported-features/node-builtins-modules/v8.js @@ -1,5 +1,6 @@ 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"] } }, @@ -41,6 +42,7 @@ const v8 = { 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/vm.js b/lib/unsupported-features/node-builtins-modules/vm.js similarity index 88% rename from lib/unsupported-features/node-builtins/vm.js rename to lib/unsupported-features/node-builtins-modules/vm.js index ee89fe98..1a59417d 100644 --- a/lib/unsupported-features/node-builtins/vm.js +++ b/lib/unsupported-features/node-builtins-modules/vm.js @@ -1,5 +1,6 @@ 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"] } }, @@ -15,6 +16,7 @@ const vm = { 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/wasi.js b/lib/unsupported-features/node-builtins-modules/wasi.js similarity index 69% rename from lib/unsupported-features/node-builtins/wasi.js rename to lib/unsupported-features/node-builtins-modules/wasi.js index e2ef9a17..3591cb94 100644 --- a/lib/unsupported-features/node-builtins/wasi.js +++ b/lib/unsupported-features/node-builtins-modules/wasi.js @@ -1,9 +1,11 @@ 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/worker_threads.js b/lib/unsupported-features/node-builtins-modules/worker_threads.js similarity index 93% rename from lib/unsupported-features/node-builtins/worker_threads.js rename to lib/unsupported-features/node-builtins-modules/worker_threads.js index cd021be7..425f5f60 100644 --- a/lib/unsupported-features/node-builtins/worker_threads.js +++ b/lib/unsupported-features/node-builtins-modules/worker_threads.js @@ -1,5 +1,6 @@ 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"] } }, @@ -31,6 +32,7 @@ const worker_threads = { Worker: { [READ]: { supported: ["10.5.0"] } }, } +/** @type {import('../types.js').SupportVersionTree} */ module.exports = { worker_threads: { ...worker_threads, diff --git a/lib/unsupported-features/node-builtins/zlib.js b/lib/unsupported-features/node-builtins-modules/zlib.js similarity index 95% rename from lib/unsupported-features/node-builtins/zlib.js rename to lib/unsupported-features/node-builtins-modules/zlib.js index d3eec127..3345a4e3 100644 --- a/lib/unsupported-features/node-builtins/zlib.js +++ b/lib/unsupported-features/node-builtins-modules/zlib.js @@ -1,5 +1,6 @@ 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"] } }, @@ -40,6 +41,7 @@ const zlib = { Unzip: { [READ]: { supported: ["0.5.8"] } }, } +/** @type {import('../types.js').SupportVersionTree} */ module.exports = { zlib: zlib, "node:zlib": { 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..fab232bb 100644 --- a/lib/util/check-unsupported-builtins.js +++ b/lib/util/check-unsupported-builtins.js @@ -101,7 +101,7 @@ module.exports.checkUnsupportedBuiltins = function checkUnsupportedBuiltins( node, messageId: "unsupported", data: { - name, + name: path.join("."), supported: supportedVersionToString(info), version: options.version.raw, }, 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) + ) } } From 740a9aed1ca7afb6e38ebde7a830bc8389a1d9dd Mon Sep 17 00:00:00 2001 From: scagood <2230835+scagood@users.noreply.github.com> Date: Fri, 9 Feb 2024 14:34:11 +0000 Subject: [PATCH 07/11] fix: node:fs/promises only available in 14.0.0 --- lib/unsupported-features/node-builtins-modules/fs.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/unsupported-features/node-builtins-modules/fs.js b/lib/unsupported-features/node-builtins-modules/fs.js index 91744b1b..4741dee0 100644 --- a/lib/unsupported-features/node-builtins-modules/fs.js +++ b/lib/unsupported-features/node-builtins-modules/fs.js @@ -181,7 +181,7 @@ module.exports = { ...promises_api, }, "node:fs/promises": { - [READ]: { supported: ["14.13.1", "12.20.0"] }, + [READ]: { supported: ["14.13.1"] }, ...promises_api, }, } From 8bd0964e066091e1c4becbf0698700e8bdc3efda Mon Sep 17 00:00:00 2001 From: scagood <2230835+scagood@users.noreply.github.com> Date: Fri, 9 Feb 2024 14:35:02 +0000 Subject: [PATCH 08/11] chore: Go through current no-unsupported node builtins tests --- .../no-unsupported-features/node-builtins.js | 775 ++++++------------ 1 file changed, 245 insertions(+), 530 deletions(-) diff --git a/tests/lib/rules/no-unsupported-features/node-builtins.js b/tests/lib/rules/no-unsupported-features/node-builtins.js index 079065de..f37282a9 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", 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", 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", 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", 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", 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", data: { name: "assert.notDeepStrictEqual", - supported: "4.0.0", - version: "3.9.9", + supported: "1.2.0", + version: "1.1.0", }, }, ], @@ -451,376 +424,224 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( }, ], }, - ], - }, - - //---------------------------------------------------------------------- - // async_hooks - //---------------------------------------------------------------------- - { - valid: [ - { - code: "require('async_hooks')", - options: [{ version: "8.0.0" }], - }, - { - code: "require('node:async_hooks')", - options: [{ version: "8.0.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" }], - }, - { - code: "const { AsyncLocalStorage } = require('async_hooks'); new AsyncLocalStorage();", - options: [{ version: "13.10.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" }], - }, - - // 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();", - options: [ - { - version: "12.16.0", - ignores: ["async_hooks.AsyncLocalStorage"], - }, - ], - }, - { - code: "import hooks from 'async_hooks'; new hooks.AsyncLocalStorage();", - options: [ - { - version: "12.16.0", - ignores: ["async_hooks.AsyncLocalStorage"], - }, - ], - }, - ], - invalid: [ - { - code: "require('async_hooks')", - options: [{ version: "7.9.9" }], + code: "require('node:assert').deepStrictEqual()", + options: [{ version: "3.9.9" }], errors: [ { messageId: "unsupported", data: { - name: "async_hooks", - supported: "8.0.0", - version: "7.9.9", + name: "node:assert", + supported: "14.13.1 (backported: ^12.20.0)", + version: "3.9.9", }, }, ], }, { - code: "require('node:async_hooks')", - options: [{ version: "7.9.9" }], + code: "import assert from 'node:assert';", + options: [{ version: "3.9.9" }], errors: [ { messageId: "unsupported", data: { - name: "async_hooks", - supported: "8.0.0", - version: "7.9.9", + name: "node:assert", + supported: "14.13.1 (backported: ^12.20.0)", + version: "3.9.9", }, }, ], }, + ], + }, + + //---------------------------------------------------------------------- + // async_hooks + //---------------------------------------------------------------------- + { + valid: [ + { + code: "require('async_hooks')", + options: [{ version: "16.4.0" }], + }, { 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: "16.4.0" }], }, { - 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", - }, - }, - ], + code: "const { AsyncLocalStorage } = require('async_hooks'); new AsyncLocalStorage();", + options: [{ version: "16.4.0" }], }, { - code: "import { createHook } from 'async_hooks'", - options: [{ version: "7.9.9" }], - errors: [ - { - messageId: "unsupported", - data: { - name: "async_hooks", - supported: "8.0.0", - version: "7.9.9", - }, - }, - { - messageId: "unsupported", - data: { - name: "async_hooks.createHook", - supported: "8.1.0", - version: "7.9.9", - }, - }, - ], + code: "import hooks from 'async_hooks'; new hooks.AsyncLocalStorage();", + options: [{ version: "16.4.0" }], }, - { - code: "require('async_hooks').createHook()", - options: [{ version: "8.0.9" }], - errors: [ + + // Ignores + ...[ + "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: [ { - messageId: "unsupported", - data: { - name: "async_hooks.createHook", - supported: "8.1.0", - version: "8.0.9", - }, + version: "14.0.0", + ignores: [ + "async_hooks", + "async_hooks.createHook", + "async_hooks.AsyncLocalStorage", + ], }, ], + })), + + { + code: "require('node:async_hooks')", + options: [{ version: "16.4.0" }], }, { - 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: "import hooks from 'node:async_hooks'", + options: [{ version: "16.4.0" }], }, { - 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: "require('node:async_hooks')", + options: [{ version: "12.0.0", ignores: ["async_hooks"] }], }, { - code: "import async_hooks from 'async_hooks'; async_hooks.createHook()", - options: [{ version: "8.0.9" }], + code: "import hooks from 'node:async_hooks'", + options: [{ version: "12.0.0", ignores: ["async_hooks"] }], + }, + ], + invalid: [ + ...[ + "require('async_hooks')", + "import hooks from 'async_hooks'", + ].map(code => ({ + code: code, + options: [{ version: "7.9.9" }], errors: [ { messageId: "unsupported", data: { - name: "async_hooks.createHook", - supported: "8.1.0", - version: "8.0.9", + name: "async_hooks", + supported: "16.4.0", + version: "7.9.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", data: { name: "async_hooks.createHook", - supported: "8.1.0", - version: "8.0.9", + supported: "(none yet)", + 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", 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", 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", 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", 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", }, }, ], @@ -1008,7 +829,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( messageId: "unsupported", data: { name: "Buffer.alloc", - supported: "4.5.0", + supported: "5.10.0 (backported: ^4.5.0)", version: "4.4.9", }, }, @@ -1022,7 +843,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( messageId: "unsupported", data: { name: "Buffer.allocUnsafe", - supported: "4.5.0", + supported: "5.10.0 (backported: ^4.5.0)", version: "4.4.9", }, }, @@ -1036,7 +857,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( messageId: "unsupported", data: { name: "Buffer.allocUnsafeSlow", - supported: "4.5.0", + supported: "5.12.0 (backported: ^4.5.0)", version: "4.4.9", }, }, @@ -1050,7 +871,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( messageId: "unsupported", data: { name: "Buffer.from", - supported: "4.5.0", + supported: "5.10.0 (backported: ^4.5.0)", version: "4.4.9", }, }, @@ -1134,7 +955,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( messageId: "unsupported", data: { name: "buffer.Buffer.alloc", - supported: "4.5.0", + supported: "5.10.0 (backported: ^4.5.0)", version: "4.4.9", }, }, @@ -1148,7 +969,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( messageId: "unsupported", data: { name: "buffer.Buffer.allocUnsafe", - supported: "4.5.0", + supported: "5.10.0 (backported: ^4.5.0)", version: "4.4.9", }, }, @@ -1162,7 +983,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( messageId: "unsupported", data: { name: "buffer.Buffer.allocUnsafeSlow", - supported: "4.5.0", + supported: "5.12.0 (backported: ^4.5.0)", version: "4.4.9", }, }, @@ -1176,7 +997,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( messageId: "unsupported", data: { name: "buffer.Buffer.from", - supported: "4.5.0", + supported: "5.10.0 (backported: ^4.5.0)", version: "4.4.9", }, }, @@ -1218,7 +1039,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( messageId: "unsupported", data: { name: "buffer.Blob", - supported: "(none yet)", + supported: "18.0.0 (backported: ^16.17.0)", version: "15.7.0", }, }, @@ -1232,7 +1053,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( messageId: "unsupported", data: { name: "buffer.Blob", - supported: "(none yet)", + supported: "18.0.0 (backported: ^16.17.0)", version: "15.7.0", }, }, @@ -1534,12 +1355,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 +1373,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: [ { @@ -1754,20 +1557,6 @@ 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" }], @@ -1810,34 +1599,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", - }, - }, - ], - }, ], }, @@ -3044,62 +2805,6 @@ 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" }], @@ -3155,16 +2860,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';", @@ -3199,7 +2904,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( ], }, { - code: "import * as fs from 'node:fs/promises';", + code: "require('fs/promises');", options: [{ version: "13.14.0" }], errors: [ { @@ -3213,7 +2918,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( ], }, { - code: "require('fs/promises');", + code: "const fs = require('fs/promises');", options: [{ version: "13.14.0" }], errors: [ { @@ -3226,6 +2931,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( }, ], }, + { code: "require('node:fs/promises');", options: [{ version: "13.14.0" }], @@ -3233,22 +2939,22 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( { messageId: "unsupported", 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", data: { - name: "fs/promises", - supported: "14.0.0", + name: "node:fs/promises", + supported: "14.13.1", version: "13.14.0", }, }, @@ -3320,6 +3026,14 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( version: "8.3.9", }, }, + { + messageId: "unsupported", + data: { + name: "http2.createServer", + supported: "8.4.0", + version: "8.3.9", + }, + }, ], }, ], @@ -3338,6 +3052,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: [ { @@ -3348,7 +3071,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( messageId: "unsupported", data: { name: "inspector", - supported: "(none yet)", + supported: "14.0.0", version: "7.9.9", }, }, @@ -3362,7 +3085,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( messageId: "unsupported", data: { name: "inspector", - supported: "(none yet)", + supported: "14.0.0", version: "7.9.9", }, }, @@ -3376,7 +3099,15 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( messageId: "unsupported", data: { name: "inspector", - supported: "(none yet)", + supported: "14.0.0", + version: "7.9.9", + }, + }, + { + messageId: "unsupported", + data: { + name: "inspector.open", + supported: "8.0.0", version: "7.9.9", }, }, @@ -3523,7 +3254,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( messageId: "unsupported", data: { name: "os.constants", - supported: "6.3.0", + supported: "6.3.0 (backported: ^5.11.0)", version: "6.2.9", }, }, @@ -3537,7 +3268,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( messageId: "unsupported", data: { name: "os.constants", - supported: "6.3.0", + supported: "6.3.0 (backported: ^5.11.0)", version: "6.2.9", }, }, @@ -3551,7 +3282,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( messageId: "unsupported", data: { name: "os.constants", - supported: "6.3.0", + supported: "6.3.0 (backported: ^5.11.0)", version: "6.2.9", }, }, @@ -3565,7 +3296,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( messageId: "unsupported", data: { name: "os.constants", - supported: "6.3.0", + supported: "6.3.0 (backported: ^5.11.0)", version: "6.2.9", }, }, @@ -3579,7 +3310,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( messageId: "unsupported", data: { name: "os.constants", - supported: "6.3.0", + supported: "6.3.0 (backported: ^5.11.0)", version: "6.2.9", }, }, @@ -4389,19 +4120,11 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( valid: [ { code: "require('trace_events')", - options: [{ version: "10.0.0" }], - }, - { - code: "import trace_events from 'trace_events'", - options: [{ version: "10.0.0" }], - }, - { - code: "require('trace_events')", - options: [{ version: "9.9.9", ignores: ["trace_events"] }], + options: [{ version: "10.0.0", 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: [ @@ -4413,7 +4136,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( messageId: "unsupported", data: { name: "trace_events", - supported: "10.0.0", + supported: "(none yet)", version: "9.9.9", }, }, @@ -4427,7 +4150,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( messageId: "unsupported", data: { name: "trace_events", - supported: "10.0.0", + supported: "(none yet)", version: "9.9.9", }, }, @@ -4435,14 +4158,14 @@ 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", data: { name: "trace_events", - supported: "10.0.0", - version: "9.9.9", + supported: "(none yet)", + version: "10.0.0", }, }, ], @@ -4675,7 +4398,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( messageId: "unsupported", data: { name: "url.domainToASCII", - supported: "7.4.0", + supported: "7.4.0 (backported: ^6.13.0)", version: "7.3.9", }, }, @@ -4689,7 +4412,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( messageId: "unsupported", data: { name: "url.domainToUnicode", - supported: "7.4.0", + supported: "7.4.0 (backported: ^6.13.0)", version: "7.3.9", }, }, @@ -5454,23 +5177,15 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( { valid: [ { - code: "require('vm').Module", - options: [{ version: "9.6.0" }], - }, - { - code: "var vm = require('vm'); vm.Module", - options: [{ version: "9.6.0" }], - }, - { - code: "var { Module } = require('vm'); Module", + code: "require('vm')", options: [{ version: "9.6.0" }], }, { - code: "import vm from 'vm'; vm.Module", + code: "import vm from 'vm';", options: [{ version: "9.6.0" }], }, { - code: "import { Module } from 'vm'; Module", + code: "import * as vm from 'vm';", options: [{ version: "9.6.0" }], }, @@ -5505,7 +5220,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( messageId: "unsupported", data: { name: "vm.Module", - supported: "9.6.0", + supported: "(none yet)", version: "9.5.9", }, }, @@ -5519,7 +5234,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( messageId: "unsupported", data: { name: "vm.Module", - supported: "9.6.0", + supported: "(none yet)", version: "9.5.9", }, }, @@ -5533,7 +5248,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( messageId: "unsupported", data: { name: "vm.Module", - supported: "9.6.0", + supported: "(none yet)", version: "9.5.9", }, }, @@ -5547,7 +5262,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( messageId: "unsupported", data: { name: "vm.Module", - supported: "9.6.0", + supported: "(none yet)", version: "9.5.9", }, }, @@ -5561,7 +5276,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( messageId: "unsupported", data: { name: "vm.Module", - supported: "9.6.0", + supported: "(none yet)", version: "9.5.9", }, }, From a0159d50ef207d74258bcbf0966b0e4c4c21162a Mon Sep 17 00:00:00 2001 From: scagood <2230835+scagood@users.noreply.github.com> Date: Thu, 22 Feb 2024 14:14:05 +0000 Subject: [PATCH 09/11] feat: Add a better error for unsupported builtins --- lib/util/check-unsupported-builtins.js | 31 +- .../no-unsupported-features/es-builtins.js | 182 ++++---- .../no-unsupported-features/node-builtins.js | 439 +++++++++--------- 3 files changed, 331 insertions(+), 321 deletions(-) diff --git a/lib/util/check-unsupported-builtins.js b/lib/util/check-unsupported-builtins.js index fab232bb..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,10 +97,23 @@ 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: path.join("."), supported: supportedVersionToString(info), @@ -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/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 f37282a9..ad0de17d 100644 --- a/tests/lib/rules/no-unsupported-features/node-builtins.js +++ b/tests/lib/rules/no-unsupported-features/node-builtins.js @@ -225,7 +225,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "1.1.0" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "assert.deepStrictEqual", supported: "1.2.0", @@ -239,7 +239,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "1.1.0" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "assert.deepStrictEqual", supported: "1.2.0", @@ -253,7 +253,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "1.1.0" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "assert.deepStrictEqual", supported: "1.2.0", @@ -267,7 +267,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "1.1.0" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "assert.deepStrictEqual", supported: "1.2.0", @@ -281,7 +281,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "1.1.0" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "assert.deepStrictEqual", supported: "1.2.0", @@ -295,7 +295,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "1.1.0" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "assert.notDeepStrictEqual", supported: "1.2.0", @@ -309,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", @@ -323,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", @@ -337,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", @@ -351,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", @@ -365,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)", @@ -379,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)", @@ -387,7 +387,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( }, }, { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "assert.strict.rejects", supported: "10.0.0", @@ -401,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", }, }, @@ -415,10 +414,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", }, }, @@ -429,7 +427,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "3.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "node:assert", supported: "14.13.1 (backported: ^12.20.0)", @@ -443,7 +441,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "3.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "node:assert", supported: "14.13.1 (backported: ^12.20.0)", @@ -553,7 +551,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "7.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "async_hooks", supported: "16.4.0", @@ -577,10 +575,9 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "16.5.0" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-yet", data: { name: "async_hooks.createHook", - supported: "(none yet)", version: "16.5.0", }, }, @@ -600,7 +597,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "13.9.0" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "async_hooks", supported: "16.4.0", @@ -608,7 +605,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( }, }, { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "async_hooks.AsyncLocalStorage", supported: "16.4.0", @@ -623,7 +620,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "7.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "node:async_hooks", supported: "16.4.0", @@ -637,7 +634,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "7.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "node:async_hooks", supported: "16.4.0", @@ -826,7 +823,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "4.4.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "Buffer.alloc", supported: "5.10.0 (backported: ^4.5.0)", @@ -840,7 +837,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "4.4.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "Buffer.allocUnsafe", supported: "5.10.0 (backported: ^4.5.0)", @@ -854,7 +851,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "4.4.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "Buffer.allocUnsafeSlow", supported: "5.12.0 (backported: ^4.5.0)", @@ -868,7 +865,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "4.4.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "Buffer.from", supported: "5.10.0 (backported: ^4.5.0)", @@ -882,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", @@ -896,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", @@ -910,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", @@ -924,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", @@ -938,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", @@ -952,7 +949,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "4.4.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "buffer.Buffer.alloc", supported: "5.10.0 (backported: ^4.5.0)", @@ -966,7 +963,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "4.4.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "buffer.Buffer.allocUnsafe", supported: "5.10.0 (backported: ^4.5.0)", @@ -980,7 +977,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "4.4.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "buffer.Buffer.allocUnsafeSlow", supported: "5.12.0 (backported: ^4.5.0)", @@ -994,7 +991,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "4.4.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "buffer.Buffer.from", supported: "5.10.0 (backported: ^4.5.0)", @@ -1008,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", @@ -1022,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", @@ -1036,7 +1033,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "15.7.0" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "buffer.Blob", supported: "18.0.0 (backported: ^16.17.0)", @@ -1050,7 +1047,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "15.7.0" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "buffer.Blob", supported: "18.0.0 (backported: ^16.17.0)", @@ -1141,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", @@ -1155,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", @@ -1169,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", @@ -1183,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", @@ -1197,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", @@ -1380,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)", @@ -1394,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)", @@ -1408,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)", @@ -1422,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)", @@ -1436,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)", @@ -1450,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)", @@ -1464,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)", @@ -1478,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", @@ -1492,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", @@ -1506,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", @@ -1520,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", @@ -1534,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", @@ -1548,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", @@ -1562,7 +1559,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "7.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "console.profile", supported: "8.0.0", @@ -1576,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", @@ -1590,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", @@ -1835,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", @@ -1849,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", @@ -1863,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", @@ -1877,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", @@ -1891,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", @@ -1905,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", @@ -1919,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", @@ -1933,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", @@ -1947,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", @@ -1961,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", @@ -1975,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", @@ -1989,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", @@ -2003,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", @@ -2017,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", @@ -2031,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)", @@ -2045,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)", @@ -2059,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", @@ -2073,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", @@ -2087,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", @@ -2101,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", @@ -2187,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", @@ -2201,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", @@ -2215,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", @@ -2229,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", @@ -2243,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", @@ -2257,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", @@ -2271,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)", @@ -2540,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)", @@ -2554,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)", @@ -2568,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)", @@ -2582,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)", @@ -2596,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)", @@ -2610,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", @@ -2624,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", @@ -2638,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", @@ -2652,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", @@ -2666,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", @@ -2680,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", @@ -2694,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)", @@ -2708,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)", @@ -2722,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)", @@ -2740,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)", @@ -2754,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", @@ -2768,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", @@ -2782,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", @@ -2796,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", @@ -2810,7 +2807,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "12.11.0" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "fs.Dir", supported: "12.12.0", @@ -2824,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)", @@ -2838,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)", @@ -2894,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", @@ -2908,7 +2905,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", @@ -2922,7 +2919,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", @@ -2937,7 +2934,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "13.14.0" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "node:fs/promises", supported: "14.13.1", @@ -2951,7 +2948,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "13.14.0" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "node:fs/promises", supported: "14.13.1", @@ -2991,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)", @@ -3005,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)", @@ -3019,7 +3016,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)", @@ -3027,7 +3024,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( }, }, { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "http2.createServer", supported: "8.4.0", @@ -3068,7 +3065,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "7.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "inspector", supported: "14.0.0", @@ -3082,7 +3079,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "7.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "inspector", supported: "14.0.0", @@ -3096,7 +3093,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "7.9.9" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "inspector", supported: "14.0.0", @@ -3104,7 +3101,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( }, }, { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "inspector.open", supported: "8.0.0", @@ -3154,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", @@ -3168,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: @@ -3251,7 +3248,7 @@ 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 (backported: ^5.11.0)", @@ -3265,7 +3262,7 @@ 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 (backported: ^5.11.0)", @@ -3279,7 +3276,7 @@ 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 (backported: ^5.11.0)", @@ -3293,7 +3290,7 @@ 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 (backported: ^5.11.0)", @@ -3307,7 +3304,7 @@ 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 (backported: ^5.11.0)", @@ -3321,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", @@ -3335,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", @@ -3426,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", @@ -3440,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", @@ -3454,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", @@ -3468,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", @@ -3482,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", @@ -3522,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", @@ -3536,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", @@ -3550,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", @@ -3734,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", @@ -3748,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", @@ -3762,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", @@ -3776,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", @@ -3790,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", @@ -3804,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", @@ -3818,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", @@ -3832,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", @@ -3846,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", @@ -3860,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", @@ -3874,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", @@ -3888,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: @@ -3903,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", @@ -3917,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", @@ -3931,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", @@ -3945,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", @@ -4031,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", @@ -4045,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", @@ -4059,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", @@ -4073,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", @@ -4087,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", @@ -4101,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", @@ -4133,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: "(none yet)", version: "9.9.9", }, }, @@ -4147,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: "(none yet)", version: "9.9.9", }, }, @@ -4161,10 +4156,9 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( options: [{ version: "10.0.0" }], errors: [ { - messageId: "unsupported", + messageId: "not-supported-yet", data: { name: "trace_events", - supported: "(none yet)", version: "10.0.0", }, }, @@ -4283,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", @@ -4297,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", @@ -4311,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)", @@ -4325,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)", @@ -4339,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)", @@ -4353,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)", @@ -4367,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)", @@ -4381,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)", @@ -4395,7 +4389,7 @@ 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 (backported: ^6.13.0)", @@ -4409,7 +4403,7 @@ 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 (backported: ^6.13.0)", @@ -4585,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", @@ -4599,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", @@ -4613,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", @@ -4627,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", @@ -4641,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", @@ -4655,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", @@ -4669,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)", @@ -4683,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", @@ -4697,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", @@ -4711,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", @@ -4725,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", @@ -4739,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", @@ -4753,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", @@ -4767,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", @@ -4955,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", @@ -4969,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", @@ -4983,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", @@ -4991,7 +4985,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( }, }, { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "v8.cachedDataVersionTag", supported: "8.0.0", @@ -5005,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", @@ -5019,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", @@ -5033,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", @@ -5047,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", @@ -5061,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", @@ -5075,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", @@ -5089,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", @@ -5103,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", @@ -5117,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", @@ -5131,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", @@ -5145,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", @@ -5159,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", @@ -5217,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: "(none yet)", version: "9.5.9", }, }, @@ -5231,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: "(none yet)", version: "9.5.9", }, }, @@ -5245,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: "(none yet)", version: "9.5.9", }, }, @@ -5259,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: "(none yet)", version: "9.5.9", }, }, @@ -5273,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: "(none yet)", version: "9.5.9", }, }, @@ -5323,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", @@ -5337,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", @@ -5351,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", @@ -5367,7 +5356,7 @@ new RuleTester({ languageOptions: { sourceType: "module" } }).run( }, errors: [ { - messageId: "unsupported", + messageId: "not-supported-till", data: { name: "worker_threads", supported: "12.11.0", From 41edd434898d83cb13c40e37200abf5f894675f7 Mon Sep 17 00:00:00 2001 From: scagood <2230835+scagood@users.noreply.github.com> Date: Thu, 22 Feb 2024 15:00:56 +0000 Subject: [PATCH 10/11] feat: Add WebCrypto --- .../node-builtins-modules/crypto.js | 30 +++++++++++++++++-- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/lib/unsupported-features/node-builtins-modules/crypto.js b/lib/unsupported-features/node-builtins-modules/crypto.js index 7aea7b29..d6ff2c6e 100644 --- a/lib/unsupported-features/node-builtins-modules/crypto.js +++ b/lib/unsupported-features/node-builtins-modules/crypto.js @@ -1,13 +1,37 @@ const { READ } = require("@eslint-community/eslint-utils") -// TODO: https://nodejs.org/docs/latest/api/webcrypto.html +/** @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: { [READ]: { experimental: ["15.0.0"], supported: ["19.0.0"] } }, - subtle: { [READ]: { experimental: ["17.4.0"], supported: ["19.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"] } }, From f4c5bfb0a14016ef44153cdfad45bcaef1868ce7 Mon Sep 17 00:00:00 2001 From: scagood <2230835+scagood@users.noreply.github.com> Date: Thu, 22 Feb 2024 15:15:52 +0000 Subject: [PATCH 11/11] feat: Add WebStream and StreamConsumer --- .../node-builtins-modules/stream.js | 65 +++++++++++++++++-- 1 file changed, 58 insertions(+), 7 deletions(-) diff --git a/lib/unsupported-features/node-builtins-modules/stream.js b/lib/unsupported-features/node-builtins-modules/stream.js index c6bb089f..2086a90b 100644 --- a/lib/unsupported-features/node-builtins-modules/stream.js +++ b/lib/unsupported-features/node-builtins-modules/stream.js @@ -29,16 +29,16 @@ const Duplex = { const Transform = Duplex /** @type {import('../types.js').SupportVersionTree} */ -const promises_api = { +const StreamPromise = { pipeline: { [READ]: { supported: ["15.0.0"] } }, finished: { [READ]: { supported: ["15.0.0"] } }, } /** @type {import('../types.js').SupportVersionTree} */ -const stream = { +const Stream = { promises: { [READ]: { supported: ["15.0.0"] }, - ...promises_api, + ...StreamPromise, }, finished: { [READ]: { supported: ["10.0.0"] } }, pipeline: { [READ]: { supported: ["10.0.0"] } }, @@ -56,23 +56,74 @@ const stream = { 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, + ...Stream, }, "node:stream": { [READ]: { supported: ["14.13.1", "12.20.0"] }, - ...stream, + ...Stream, }, "stream/promises": { [READ]: { experimental: ["15.0.0"] }, - ...promises_api, + ...StreamPromise, }, "node:stream/promises": { [READ]: { experimental: ["15.0.0"] }, - ...promises_api, + ...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, }, }