Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions lib/rules/no-deprecated-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,9 @@ const rawModules = {
REPL_MODE_MAGIC: {
[READ]: { since: "8.0.0", replacedBy: null },
},
builtinModules: {
[READ]: { since: "22.16.0", replacedBy: "module.builtinModules" },
},
},
// safe-buffer.Buffer function/constructror is just a re-export of buffer.Buffer
// and should be deprecated likewise.
Expand Down
2 changes: 2 additions & 0 deletions lib/unsupported-features/node-builtins-modules/assert.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const { READ } = require("@eslint-community/eslint-utils")
* @satisfies {import('../types.js').SupportVersionTraceMap}
*/
const assert = {
Assert: { [READ]: { supported: ["22.19.0"] } },
assert: { [READ]: { supported: ["0.5.9"] } },
deepEqual: { [READ]: { supported: ["0.1.21"] } },
deepStrictEqual: { [READ]: { supported: ["1.2.0"] } },
Expand All @@ -31,6 +32,7 @@ const assert = {
notEqual: { [READ]: { supported: ["0.1.21"] } },
notStrictEqual: { [READ]: { supported: ["0.1.21"] } },
ok: { [READ]: { supported: ["0.1.21"] } },
partialDeepStrictEqual: { [READ]: { experimental: ["22.13.0"] } },
rejects: { [READ]: { supported: ["10.0.0"] } },
strictEqual: { [READ]: { supported: ["0.1.21"] } },
throws: { [READ]: { supported: ["0.1.21"] } },
Expand Down
14 changes: 12 additions & 2 deletions lib/unsupported-features/node-builtins-modules/async_hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,18 @@ const async_hooks = {
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"] } },
bind: {
[READ]: {
experimental: ["19.8.0", "18.16.0"],
supported: ["22.15.0"],
},
},
snapshot: {
[READ]: {
experimental: ["19.8.0", "18.16.0"],
supported: ["22.15.0"],
},
},
},
AsyncResource: {
[READ]: {
Expand Down
2 changes: 2 additions & 0 deletions lib/unsupported-features/node-builtins-modules/dns.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const dns = {
resolvePtr: { [READ]: { supported: ["6.0.0"] } },
resolveSoa: { [READ]: { supported: ["0.11.10"] } },
resolveSrv: { [READ]: { supported: ["0.1.27"] } },
resolveTlsa: { [READ]: { supported: ["22.15.0"] } },
resolveTxt: { [READ]: { supported: ["0.1.27"] } },
reverse: { [READ]: { supported: ["0.1.16"] } },
setDefaultResultOrder: { [READ]: { supported: ["16.4.0", "14.18.0"] } },
Expand Down Expand Up @@ -50,6 +51,7 @@ const dns = {
resolvePtr: { [READ]: { supported: ["10.6.0"] } },
resolveSoa: { [READ]: { supported: ["10.6.0"] } },
resolveSrv: { [READ]: { supported: ["10.6.0"] } },
resolveTlsa: { [READ]: { supported: ["22.15.0"] } },
resolveTxt: { [READ]: { supported: ["10.6.0"] } },
reverse: { [READ]: { supported: ["10.6.0"] } },
setDefaultResultOrder: { [READ]: { supported: ["16.4.0", "14.18.0"] } },
Expand Down
4 changes: 3 additions & 1 deletion lib/unsupported-features/node-builtins-modules/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ const EventEmitterStatic = {
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"] } },
addAbortListener: {
[READ]: { experimental: ["20.5.0", "18.18.0"], supported: ["22.16.0"] },
},
}

/**
Expand Down
10 changes: 6 additions & 4 deletions lib/unsupported-features/node-builtins-modules/fs.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const promises_api = {
constants: { [READ]: { supported: ["18.4.0", "16.17.0"] } },
copyFile: { [READ]: { supported: ["10.0.0"] } },
cp: { [READ]: { supported: ["22.3.0"], experimental: ["16.7.0"] } },
glob: { [READ]: { experimental: ["22.0.0"] } },
glob: { [READ]: { experimental: ["22.0.0"], supported: ["22.17.0"] } },
lchmod: { [READ]: { supported: ["10.0.0"], deprecated: ["10.0.0"] } },
lchown: { [READ]: { supported: ["10.0.0"] } },
link: { [READ]: { supported: ["10.0.0"] } },
Expand Down Expand Up @@ -62,7 +62,7 @@ const callback_api = {
fsync: { [READ]: { supported: ["0.1.96"] } },
ftruncate: { [READ]: { supported: ["0.8.6"] } },
futimes: { [READ]: { supported: ["0.4.2"] } },
glob: { [READ]: { experimental: ["22.0.0"] } },
glob: { [READ]: { experimental: ["22.0.0"], supported: ["22.17.0"] } },
lchmod: { [READ]: { supported: ["0.1.8"], deprecated: ["0.4.7"] } },
lchown: { [READ]: { supported: ["0.1.8"] } },
link: { [READ]: { supported: ["0.1.31"] } },
Expand All @@ -72,7 +72,9 @@ const callback_api = {
mkdtemp: { [READ]: { supported: ["5.10.0"] } },
native: { [READ]: { supported: ["9.2.0"] } },
open: { [READ]: { supported: ["0.0.2"] } },
openAsBlob: { [READ]: { experimental: ["19.8.0"] } },
openAsBlob: {
[READ]: { experimental: ["19.8.0"], supported: ["22.17.0"] },
},
opendir: { [READ]: { supported: ["12.12.0"] } },
read: { [READ]: { supported: ["0.0.2"] } },
readdir: { [READ]: { supported: ["0.1.8"] } },
Expand Down Expand Up @@ -119,7 +121,7 @@ const synchronous_api = {
fsyncSync: { [READ]: { supported: ["0.1.96"] } },
ftruncateSync: { [READ]: { supported: ["0.8.6"] } },
futimesSync: { [READ]: { supported: ["0.4.2"] } },
globSync: { [READ]: { experimental: ["22.0.0"] } },
globSync: { [READ]: { experimental: ["22.0.0"], supported: ["22.17.0"] } },
lchmodSync: { [READ]: { supported: ["0.1.8"], deprecated: ["0.4.7"] } },
lchownSync: { [READ]: { supported: ["0.1.8"] } },
linkSync: { [READ]: { supported: ["0.1.31"] } },
Expand Down
18 changes: 18 additions & 0 deletions lib/unsupported-features/node-builtins-modules/http.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,22 @@ module.exports = {
[READ]: { supported: ["14.13.1", "12.20.0"] },
...http,
},
"node:_http_agent": {
[READ]: { deprecated: ["22.19.0"] },
},
"node:_http_client": {
[READ]: { deprecated: ["22.19.0"] },
},
"node:_http_common": {
[READ]: { deprecated: ["22.19.0"] },
},
"node:_http_incoming": {
[READ]: { deprecated: ["22.19.0"] },
},
"node:_http_outgoing": {
[READ]: { deprecated: ["22.19.0"] },
},
"node:_http_server": {
[READ]: { deprecated: ["22.19.0"] },
},
}
5 changes: 5 additions & 0 deletions lib/unsupported-features/node-builtins-modules/inspector.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,16 @@ const { READ } = require("@eslint-community/eslint-utils")
*/
const common_objects = {
Network: {
dataReceived: { [READ]: { supported: ["22.17.0"] } },
dataSent: { [READ]: { supported: ["22.18.0"] } },
loadingFailed: { [READ]: { experimental: ["22.7.0", "20.18.0"] } },
loadingFinished: { [READ]: { experimental: ["22.6.0", "20.18.0"] } },
requestWillBeSent: { [READ]: { experimental: ["22.6.0", "20.18.0"] } },
responseReceived: { [READ]: { experimental: ["22.6.0", "20.18.0"] } },
},
NetworkResources: {
put: { [READ]: { experimental: ["22.19.0"] } },
},
console: { [READ]: { supported: ["8.0.0"] } },
close: { [READ]: { supported: ["9.0.0"] } },
open: { [READ]: { supported: ["8.0.0"] } },
Expand Down
7 changes: 5 additions & 2 deletions lib/unsupported-features/node-builtins-modules/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,15 @@ const Module = {
},
},
enableCompileCache: { [READ]: { experimental: ["22.8.0"] } },
findPackageJSON: { [READ]: { experimental: ["23.2.0"] } },
findPackageJSON: { [READ]: { experimental: ["23.2.0", "22.14.0"] } },
flushCompileCache: { [READ]: { experimental: ["23.0.0", "22.10.0"] } },
getCompileCacheDir: { [READ]: { experimental: ["22.8.0"] } },
getSourceMapsSupport: { [READ]: { supported: ["22.14.0"] } },
isBuiltin: { [READ]: { supported: ["18.6.0", "16.17.0"] } },
registerHooks: { [READ]: { experimental: ["22.15.0"] } },
register: { [READ]: { experimental: ["20.6.0"] } },
stripTypeScriptTypes: { [READ]: { experimental: ["23.2.0"] } },
setSourceMapsSupport: { [READ]: { supported: ["22.14.0"] } },
stripTypeScriptTypes: { [READ]: { experimental: ["23.2.0", "22.13.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"] } },
Expand Down
10 changes: 8 additions & 2 deletions lib/unsupported-features/node-builtins-modules/net.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,14 @@ const net = {
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"] } },
BlockList: {
[READ]: { supported: ["15.0.0", "14.18.0"] },
isBlockList: { [READ]: { supported: ["22.13.0"] } },
},
SocketAddress: {
[READ]: { supported: ["15.14.0", "14.18.0"] },
parse: { [READ]: { supported: ["22.13.0"] } },
},
Server: { [READ]: { supported: ["0.1.90"] } },
Socket: { [READ]: { supported: ["0.3.4"] } },
}
Expand Down
37 changes: 27 additions & 10 deletions lib/unsupported-features/node-builtins-modules/process.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ const { READ } = require("@eslint-community/eslint-utils")
*/
const process = {
allowedNodeEnvironmentFlags: { [READ]: { supported: ["10.10.0"] } },
availableMemory: { [READ]: { experimental: ["22.0.0", "20.13.0"] } },
availableMemory: {
[READ]: { experimental: ["22.0.0", "20.13.0"], supported: ["22.16.0"] },
},
arch: { [READ]: { supported: ["0.5.0"] } },
argv: { [READ]: { supported: ["0.1.27"] } },
argv0: { [READ]: { supported: ["6.4.0"] } },
Expand All @@ -18,19 +20,27 @@ const process = {
env: { [READ]: { supported: ["0.1.27"] } },
execArgv: { [READ]: { supported: ["0.7.7"] } },
execPath: { [READ]: { supported: ["0.1.100"] } },
execve: { [READ]: { experimental: ["22.15.0"] } },
exitCode: { [READ]: { supported: ["0.11.8"] } },
features: {
cached_builtins: { [READ]: { supported: ["12.0.0"] } },
debug: { [READ]: { supported: ["0.5.5"] } },
inspector: { [READ]: { supported: ["11.10.0"] } },
ipv6: { [READ]: { supported: ["0.5.3"] } },
ipv6: {
[READ]: {
supported: ["0.5.3"],
deprecated: ["22.13.0"],
},
},
require_module: { [READ]: { supported: ["23.0.0", "22.10.0"] } },
tls: { [READ]: { supported: ["0.5.3"] } },
tls_alpn: { [READ]: { supported: ["4.8.0"] } },
tls_ocsp: { [READ]: { supported: ["0.11.13"] } },
tls_sni: { [READ]: { supported: ["0.5.3"] } },
tls: { [READ]: { supported: ["0.5.3"], deprecated: ["22.13.0"] } },
tls_alpn: { [READ]: { supported: ["4.8.0"], deprecated: ["22.13.0"] } },
tls_ocsp: {
[READ]: { supported: ["0.11.13"], deprecated: ["22.13.0"] },
},
tls_sni: { [READ]: { supported: ["0.5.3"], deprecated: ["22.13.0"] } },
typescript: { [READ]: { experimental: ["23.0.0", "22.10.0"] } },
uv: { [READ]: { supported: ["0.5.3"] } },
uv: { [READ]: { supported: ["0.5.3"], deprecated: ["22.13.0"] } },
},
finalization: {
register: { [READ]: { experimental: ["22.5.0"] } },
Expand All @@ -49,13 +59,14 @@ const process = {
pid: { [READ]: { supported: ["0.1.15"] } },
platform: { [READ]: { supported: ["0.1.16"] } },
ppid: { [READ]: { supported: ["9.2.0", "8.10.0", "6.13.0"] } },
ref: { [READ]: { experimental: ["22.14.0"] } },
release: { [READ]: { supported: ["3.0.0"] } },
report: {
[READ]: {
experimental: ["11.8.0"],
supported: ["13.12.0", "12.17.0"],
},
excludeEnv: { [READ]: { supported: ["23.3.0"] } },
excludeEnv: { [READ]: { supported: ["23.3.0", "22.13.0"] } },
},
sourceMapsEnabled: { [READ]: { experimental: ["20.7.0"] } },
stdin: {
Expand Down Expand Up @@ -96,6 +107,7 @@ const process = {
moveCursor: { [READ]: { supported: ["0.7.7"] } },
rows: { [READ]: { supported: ["0.7.7"] } },
},
threadCpuUsage: { [READ]: { supported: ["22.19.0"] } },
throwDeprecation: { [READ]: { supported: ["0.9.12"] } },
title: { [READ]: { supported: ["0.1.104"] } },
traceDeprecation: { [READ]: { supported: ["0.8.0"] } },
Expand All @@ -104,14 +116,18 @@ const process = {

abort: { [READ]: { supported: ["0.7.0"] } },
chdir: { [READ]: { supported: ["0.1.17"] } },
constrainedMemory: { [READ]: { experimental: ["19.6.0", "18.15.0"] } },
constrainedMemory: {
[READ]: { experimental: ["19.6.0", "18.15.0"], supported: ["22.16.0"] },
},
cpuUsage: { [READ]: { supported: ["6.1.0"] } },
cwd: { [READ]: { supported: ["0.1.8"] } },
disconnect: { [READ]: { supported: ["0.7.2"] } },
dlopen: { [READ]: { supported: ["0.1.16"] } },
emitWarning: { [READ]: { supported: ["6.0.0"] } },
exit: { [READ]: { supported: ["0.1.13"] } },
getActiveResourcesInfo: { [READ]: { experimental: ["17.3.0", "16.14.0"] } },
getActiveResourcesInfo: {
[READ]: { experimental: ["17.3.0", "16.14.0"], supported: ["22.16.0"] },
},
getegid: { [READ]: { supported: ["2.0.0"] } },
geteuid: { [READ]: { supported: ["2.0.0"] } },
getgid: { [READ]: { supported: ["0.1.31"] } },
Expand All @@ -138,6 +154,7 @@ const process = {
setSourceMapsEnabled: { [READ]: { experimental: ["16.6.0", "14.18.0"] } },
setUncaughtExceptionCaptureCallback: { [READ]: { supported: ["9.3.0"] } },
umask: { [READ]: { supported: ["0.1.19"] } },
unref: { [READ]: { experimental: ["22.14.0"] } },
uptime: { [READ]: { supported: ["0.5.0"] } },
}

Expand Down
4 changes: 2 additions & 2 deletions lib/unsupported-features/node-builtins-modules/readline.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ module.exports = {
},

"readline/promises": {
[READ]: { experimental: ["17.0.0"] },
[READ]: { experimental: ["17.0.0"], supported: ["22.17.0"] },
...promises_api,
},
"node:readline/promises": {
[READ]: { experimental: ["17.0.0"] },
[READ]: { experimental: ["17.0.0"], supported: ["22.17.0"] },
...promises_api,
},
}
2 changes: 1 addition & 1 deletion lib/unsupported-features/node-builtins-modules/repl.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const repl = {
[CALL]: { deprecated: ["22.9.0"] },
},
builtinModules: {
[READ]: { supported: ["14.5.0"] },
[READ]: { supported: ["14.5.0"], deprecated: ["22.16.0"] },
},
}

Expand Down
28 changes: 25 additions & 3 deletions lib/unsupported-features/node-builtins-modules/sqlite.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,33 @@ const { READ } = require("@eslint-community/eslint-utils")
* @satisfies {import('../types.js').SupportVersionTraceMap}
*/
const sqlite = {
constants: {
[READ]: { supported: ["22.13.0"] },
SQLITE_CHANGESET_OMIT: { [READ]: { supported: ["22.13.0"] } },
SQLITE_CHANGESET_REPLACE: { [READ]: { supported: ["22.13.0"] } },
SQLITE_CHANGESET_ABORT: { [READ]: { supported: ["22.13.0"] } },
},
backup: { [READ]: { supported: ["22.16.0"] } },
DatabaseSync: { [READ]: { supported: ["22.5.0"] } },
StatementSync: { [READ]: { supported: ["22.5.0"] } },
SQLITE_CHANGESET_OMIT: { [READ]: { supported: ["22.12.0"] } },
SQLITE_CHANGESET_REPLACE: { [READ]: { supported: ["22.12.0"] } },
SQLITE_CHANGESET_ABORT: { [READ]: { supported: ["22.12.0"] } },
SQLITE_CHANGESET_OMIT: {
[READ]: {
experimental: ["22.12.0"],
deprecated: ["22.13.0"],
},
},
SQLITE_CHANGESET_REPLACE: {
[READ]: {
experimental: ["22.12.0"],
deprecated: ["22.13.0"],
},
},
SQLITE_CHANGESET_ABORT: {
[READ]: {
experimental: ["22.12.0"],
deprecated: ["22.13.0"],
},
},
}

/**
Expand Down
24 changes: 15 additions & 9 deletions lib/unsupported-features/node-builtins-modules/stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,20 @@ const { READ } = require("@eslint-community/eslint-utils")
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"] } },
isDisturbed: {
[READ]: { experimental: ["16.8.0"], supported: ["22.17.0"] },
},
fromWeb: { [READ]: { experimental: ["17.0.0"], supported: ["22.17.0"] } },
toWeb: { [READ]: { experimental: ["17.0.0"], supported: ["22.17.0"] } },
}

/**
* @satisfies {import('../types.js').SupportVersionTraceMap}
*/
const Writable = {
[READ]: { supported: ["0.9.4"] },
fromWeb: { [READ]: { experimental: ["17.0.0"] } },
toWeb: { [READ]: { experimental: ["17.0.0"] } },
fromWeb: { [READ]: { experimental: ["17.0.0"], supported: ["22.17.0"] } },
toWeb: { [READ]: { experimental: ["17.0.0"], supported: ["22.17.0"] } },
}

/**
Expand All @@ -28,8 +30,8 @@ const Writable = {
const Duplex = {
[READ]: { supported: ["0.9.4"] },
from: { [READ]: { supported: ["16.8.0"] } },
fromWeb: { [READ]: { experimental: ["17.0.0"] } },
toWeb: { [READ]: { experimental: ["17.0.0"] } },
fromWeb: { [READ]: { experimental: ["17.0.0"], supported: ["22.17.0"] } },
toWeb: { [READ]: { experimental: ["17.0.0"], supported: ["22.17.0"] } },
}

const Transform = Duplex
Expand Down Expand Up @@ -60,8 +62,12 @@ const Stream = {
Duplex,
Transform,

isErrored: { [READ]: { experimental: ["17.3.0", "16.14.0"] } },
isReadable: { [READ]: { experimental: ["17.4.0", "16.14.0"] } },
isErrored: {
[READ]: { experimental: ["17.3.0", "16.14.0"], supported: ["22.17.0"] },
},
isReadable: {
[READ]: { experimental: ["17.4.0", "16.14.0"], supported: ["22.17.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"] } },
Expand Down
Loading
Loading