Skip to content

Commit 7a2428f

Browse files
committed
feat: Node v22.9.0 #340
1 parent d27e586 commit 7a2428f

File tree

5 files changed

+134
-10
lines changed

5 files changed

+134
-10
lines changed

lib/rules/no-deprecated-api.js

+46
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,17 @@ const rawModules = {
357357
[READ]: { since: "6.0.0", replacedBy: null },
358358
},
359359
},
360+
repl: {
361+
REPLServer: {
362+
[READ]: { since: "22.9.0", replacedBy: "new repl.REPLServer()" },
363+
},
364+
Recoverable: {
365+
[READ]: { since: "22.9.0", replacedBy: "new repl.Recoverable()" },
366+
},
367+
REPL_MODE_MAGIC: {
368+
[READ]: { since: "8.0.0", replacedBy: null },
369+
},
370+
},
360371
// safe-buffer.Buffer function/constructror is just a re-export of buffer.Buffer
361372
// and should be deprecated likewise.
362373
"safe-buffer": {
@@ -582,6 +593,41 @@ const rawModules = {
582593
[READ]: { since: "8.0.0", replacedBy: null },
583594
},
584595
},
596+
zlib: {
597+
BrotliCompress: {
598+
[CALL]: {
599+
since: "22.9.0",
600+
replacedBy: "new zlib.BrotliCompress()",
601+
},
602+
},
603+
BrotliDecompress: {
604+
[CALL]: {
605+
since: "22.9.0",
606+
replacedBy: "new zlib.BrotliDecompress()",
607+
},
608+
},
609+
Deflate: {
610+
[CALL]: { since: "22.9.0", replacedBy: "new zlib.Deflate()" },
611+
},
612+
DeflateRaw: {
613+
[CALL]: { since: "22.9.0", replacedBy: "new zlib.DeflateRaw()" },
614+
},
615+
Gunzip: {
616+
[CALL]: { since: "22.9.0", replacedBy: "new zlib.Gunzip()" },
617+
},
618+
Gzip: {
619+
[CALL]: { since: "22.9.0", replacedBy: "new zlib.Gzip()" },
620+
},
621+
Inflate: {
622+
[CALL]: { since: "22.9.0", replacedBy: "new zlib.Inflate()" },
623+
},
624+
InflateRaw: {
625+
[CALL]: { since: "22.9.0", replacedBy: "new zlib.InflateRaw()" },
626+
},
627+
Unzip: {
628+
[CALL]: { since: "22.9.0", replacedBy: "new zlib.Unzip()" },
629+
},
630+
},
585631
}
586632
const modules = extendTrackmapWithNodePrefix(rawModules)
587633

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
"use strict"
2+
3+
const { CALL, READ } = require("@eslint-community/eslint-utils")
4+
5+
/** @type {import('../types.js').SupportVersionTraceMap} */
6+
const repl = {
7+
start: {
8+
[READ]: { supported: ["0.1.91"] },
9+
},
10+
writer: {
11+
[READ]: { supported: ["0.1.91"] },
12+
},
13+
REPLServer: {
14+
[READ]: { supported: ["0.1.91"] },
15+
[CALL]: { deprecated: ["22.9.0"] },
16+
},
17+
REPL_MODE_MAGIC: {
18+
[READ]: {
19+
supported: ["4.0.0"],
20+
deprecated: ["8.0.0"],
21+
// removed: ['10.0.0'],
22+
},
23+
},
24+
REPL_MODE_SLOPPY: {
25+
[READ]: { supported: ["4.0.0"] },
26+
},
27+
REPL_MODE_STRICT: {
28+
[READ]: { supported: ["4.0.0"] },
29+
},
30+
Recoverable: {
31+
[READ]: { supported: ["6.2.0"] },
32+
[CALL]: { deprecated: ["22.9.0"] },
33+
},
34+
builtinModules: {
35+
[READ]: { supported: ["14.5.0"] },
36+
},
37+
}
38+
39+
/** @type {import('../types.js').SupportVersionTraceMap} */
40+
module.exports = {
41+
repl: {
42+
[READ]: { supported: ["0.1.91"] },
43+
...repl,
44+
},
45+
"node:repl": {
46+
[READ]: { supported: ["14.13.1", "12.20.0"] },
47+
...repl,
48+
},
49+
}

lib/unsupported-features/node-builtins-modules/util.js

+1
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ const util = {
8888
deprecate: { [READ]: { supported: ["0.8.0"] } },
8989
format: { [READ]: { supported: ["0.5.3"] } },
9090
formatWithOptions: { [READ]: { supported: ["10.0.0"] } },
91+
getCallSite: { [READ]: { supported: ["22.9.0"] } },
9192
getSystemErrorName: { [READ]: { supported: ["9.7.0", "8.12.0"] } },
9293
getSystemErrorMap: { [READ]: { supported: ["16.0.0", "14.17.0"] } },
9394
inherits: { [READ]: { supported: ["0.3.0"] } },

lib/unsupported-features/node-builtins-modules/zlib.js

+37-10
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"use strict"
22

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

55
/** @type {import('../types.js').SupportVersionTraceMap} */
66
const zlib = {
@@ -33,15 +33,42 @@ const zlib = {
3333
inflateRawSync: { [READ]: { supported: ["0.11.12"] } },
3434
unzip: { [READ]: { supported: ["0.6.0"] } },
3535
unzipSync: { [READ]: { supported: ["0.11.12"] } },
36-
BrotliCompress: { [READ]: { supported: ["11.7.0", "10.16.0"] } },
37-
BrotliDecompress: { [READ]: { supported: ["11.7.0", "10.16.0"] } },
38-
Deflate: { [READ]: { supported: ["0.5.8"] } },
39-
DeflateRaw: { [READ]: { supported: ["0.5.8"] } },
40-
Gunzip: { [READ]: { supported: ["0.5.8"] } },
41-
Gzip: { [READ]: { supported: ["0.5.8"] } },
42-
Inflate: { [READ]: { supported: ["0.5.8"] } },
43-
InflateRaw: { [READ]: { supported: ["0.5.8"] } },
44-
Unzip: { [READ]: { supported: ["0.5.8"] } },
36+
BrotliCompress: {
37+
[CALL]: { deprecated: ["22.9.0"] },
38+
[READ]: { supported: ["11.7.0", "10.16.0"] },
39+
},
40+
BrotliDecompress: {
41+
[CALL]: { deprecated: ["22.9.0"] },
42+
[READ]: { supported: ["11.7.0", "10.16.0"] },
43+
},
44+
Deflate: {
45+
[CALL]: { deprecated: ["22.9.0"] },
46+
[READ]: { supported: ["0.5.8"] },
47+
},
48+
DeflateRaw: {
49+
[CALL]: { deprecated: ["22.9.0"] },
50+
[READ]: { supported: ["0.5.8"] },
51+
},
52+
Gunzip: {
53+
[CALL]: { deprecated: ["22.9.0"] },
54+
[READ]: { supported: ["0.5.8"] },
55+
},
56+
Gzip: {
57+
[CALL]: { deprecated: ["22.9.0"] },
58+
[READ]: { supported: ["0.5.8"] },
59+
},
60+
Inflate: {
61+
[CALL]: { deprecated: ["22.9.0"] },
62+
[READ]: { supported: ["0.5.8"] },
63+
},
64+
InflateRaw: {
65+
[CALL]: { deprecated: ["22.9.0"] },
66+
[READ]: { supported: ["0.5.8"] },
67+
},
68+
Unzip: {
69+
[CALL]: { deprecated: ["22.9.0"] },
70+
[READ]: { supported: ["0.5.8"] },
71+
},
4572
}
4673

4774
/** @type {import('../types.js').SupportVersionTraceMap} */

lib/unsupported-features/node-builtins.js

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ const NodeBuiltinModules = {
3131
...require("./node-builtins-modules/punycode.js"),
3232
...require("./node-builtins-modules/querystring.js"),
3333
...require("./node-builtins-modules/readline.js"),
34+
...require("./node-builtins-modules/repl.js"),
3435
...require("./node-builtins-modules/sea.js"),
3536
...require("./node-builtins-modules/stream.js"),
3637
...require("./node-builtins-modules/string_decoder.js"),

0 commit comments

Comments
 (0)