Skip to content

Commit

Permalink
feat: Node v22.9.0 #340
Browse files Browse the repository at this point in the history
  • Loading branch information
scagood committed Sep 25, 2024
1 parent d27e586 commit 7a2428f
Show file tree
Hide file tree
Showing 5 changed files with 134 additions and 10 deletions.
46 changes: 46 additions & 0 deletions lib/rules/no-deprecated-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,17 @@ const rawModules = {
[READ]: { since: "6.0.0", replacedBy: null },
},
},
repl: {
REPLServer: {
[READ]: { since: "22.9.0", replacedBy: "new repl.REPLServer()" },
},
Recoverable: {
[READ]: { since: "22.9.0", replacedBy: "new repl.Recoverable()" },
},
REPL_MODE_MAGIC: {
[READ]: { since: "8.0.0", replacedBy: null },
},
},
// safe-buffer.Buffer function/constructror is just a re-export of buffer.Buffer
// and should be deprecated likewise.
"safe-buffer": {
Expand Down Expand Up @@ -582,6 +593,41 @@ const rawModules = {
[READ]: { since: "8.0.0", replacedBy: null },
},
},
zlib: {
BrotliCompress: {
[CALL]: {
since: "22.9.0",
replacedBy: "new zlib.BrotliCompress()",
},
},
BrotliDecompress: {
[CALL]: {
since: "22.9.0",
replacedBy: "new zlib.BrotliDecompress()",
},
},
Deflate: {
[CALL]: { since: "22.9.0", replacedBy: "new zlib.Deflate()" },
},
DeflateRaw: {
[CALL]: { since: "22.9.0", replacedBy: "new zlib.DeflateRaw()" },
},
Gunzip: {
[CALL]: { since: "22.9.0", replacedBy: "new zlib.Gunzip()" },
},
Gzip: {
[CALL]: { since: "22.9.0", replacedBy: "new zlib.Gzip()" },
},
Inflate: {
[CALL]: { since: "22.9.0", replacedBy: "new zlib.Inflate()" },
},
InflateRaw: {
[CALL]: { since: "22.9.0", replacedBy: "new zlib.InflateRaw()" },
},
Unzip: {
[CALL]: { since: "22.9.0", replacedBy: "new zlib.Unzip()" },
},
},
}
const modules = extendTrackmapWithNodePrefix(rawModules)

Expand Down
49 changes: 49 additions & 0 deletions lib/unsupported-features/node-builtins-modules/repl.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
"use strict"

const { CALL, READ } = require("@eslint-community/eslint-utils")

/** @type {import('../types.js').SupportVersionTraceMap} */
const repl = {
start: {
[READ]: { supported: ["0.1.91"] },
},
writer: {
[READ]: { supported: ["0.1.91"] },
},
REPLServer: {
[READ]: { supported: ["0.1.91"] },
[CALL]: { deprecated: ["22.9.0"] },
},
REPL_MODE_MAGIC: {
[READ]: {
supported: ["4.0.0"],
deprecated: ["8.0.0"],
// removed: ['10.0.0'],
},
},
REPL_MODE_SLOPPY: {
[READ]: { supported: ["4.0.0"] },
},
REPL_MODE_STRICT: {
[READ]: { supported: ["4.0.0"] },
},
Recoverable: {
[READ]: { supported: ["6.2.0"] },
[CALL]: { deprecated: ["22.9.0"] },
},
builtinModules: {
[READ]: { supported: ["14.5.0"] },
},
}

/** @type {import('../types.js').SupportVersionTraceMap} */
module.exports = {
repl: {
[READ]: { supported: ["0.1.91"] },
...repl,
},
"node:repl": {
[READ]: { supported: ["14.13.1", "12.20.0"] },
...repl,
},
}
1 change: 1 addition & 0 deletions lib/unsupported-features/node-builtins-modules/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ const util = {
deprecate: { [READ]: { supported: ["0.8.0"] } },
format: { [READ]: { supported: ["0.5.3"] } },
formatWithOptions: { [READ]: { supported: ["10.0.0"] } },
getCallSite: { [READ]: { supported: ["22.9.0"] } },
getSystemErrorName: { [READ]: { supported: ["9.7.0", "8.12.0"] } },
getSystemErrorMap: { [READ]: { supported: ["16.0.0", "14.17.0"] } },
inherits: { [READ]: { supported: ["0.3.0"] } },
Expand Down
47 changes: 37 additions & 10 deletions lib/unsupported-features/node-builtins-modules/zlib.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use strict"

const { READ } = require("@eslint-community/eslint-utils")
const { CALL, READ } = require("@eslint-community/eslint-utils")

/** @type {import('../types.js').SupportVersionTraceMap} */
const zlib = {
Expand Down Expand Up @@ -33,15 +33,42 @@ const zlib = {
inflateRawSync: { [READ]: { supported: ["0.11.12"] } },
unzip: { [READ]: { supported: ["0.6.0"] } },
unzipSync: { [READ]: { supported: ["0.11.12"] } },
BrotliCompress: { [READ]: { supported: ["11.7.0", "10.16.0"] } },
BrotliDecompress: { [READ]: { supported: ["11.7.0", "10.16.0"] } },
Deflate: { [READ]: { supported: ["0.5.8"] } },
DeflateRaw: { [READ]: { supported: ["0.5.8"] } },
Gunzip: { [READ]: { supported: ["0.5.8"] } },
Gzip: { [READ]: { supported: ["0.5.8"] } },
Inflate: { [READ]: { supported: ["0.5.8"] } },
InflateRaw: { [READ]: { supported: ["0.5.8"] } },
Unzip: { [READ]: { supported: ["0.5.8"] } },
BrotliCompress: {
[CALL]: { deprecated: ["22.9.0"] },
[READ]: { supported: ["11.7.0", "10.16.0"] },
},
BrotliDecompress: {
[CALL]: { deprecated: ["22.9.0"] },
[READ]: { supported: ["11.7.0", "10.16.0"] },
},
Deflate: {
[CALL]: { deprecated: ["22.9.0"] },
[READ]: { supported: ["0.5.8"] },
},
DeflateRaw: {
[CALL]: { deprecated: ["22.9.0"] },
[READ]: { supported: ["0.5.8"] },
},
Gunzip: {
[CALL]: { deprecated: ["22.9.0"] },
[READ]: { supported: ["0.5.8"] },
},
Gzip: {
[CALL]: { deprecated: ["22.9.0"] },
[READ]: { supported: ["0.5.8"] },
},
Inflate: {
[CALL]: { deprecated: ["22.9.0"] },
[READ]: { supported: ["0.5.8"] },
},
InflateRaw: {
[CALL]: { deprecated: ["22.9.0"] },
[READ]: { supported: ["0.5.8"] },
},
Unzip: {
[CALL]: { deprecated: ["22.9.0"] },
[READ]: { supported: ["0.5.8"] },
},
}

/** @type {import('../types.js').SupportVersionTraceMap} */
Expand Down
1 change: 1 addition & 0 deletions lib/unsupported-features/node-builtins.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const NodeBuiltinModules = {
...require("./node-builtins-modules/punycode.js"),
...require("./node-builtins-modules/querystring.js"),
...require("./node-builtins-modules/readline.js"),
...require("./node-builtins-modules/repl.js"),
...require("./node-builtins-modules/sea.js"),
...require("./node-builtins-modules/stream.js"),
...require("./node-builtins-modules/string_decoder.js"),
Expand Down

0 comments on commit 7a2428f

Please sign in to comment.