Skip to content

Commit 87fb484

Browse files
authored
feat: Update no-unsupported to node v22.9.0 (#342)
* feat: Node v20.17.0 #333 * feat: Node v22.6.0 #330 * feat: Node v22.7.0 #334 * feat: Add perf_hooks.performance to unsupported * feat: Node v22.8.0 #335 * feat: Node v22.9.0 #340
1 parent 8c0a2cc commit 87fb484

File tree

10 files changed

+186
-13
lines changed

10 files changed

+186
-13
lines changed

lib/rules/no-deprecated-api.js

+52
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,12 @@ const rawModules = {
330330
},
331331
},
332332
},
333+
nextTick: {
334+
[READ]: {
335+
since: "22.7.0",
336+
replacedBy: "'queueMicrotask()'",
337+
},
338+
},
333339
},
334340
punycode: {
335341
[READ]: {
@@ -351,6 +357,17 @@ const rawModules = {
351357
[READ]: { since: "6.0.0", replacedBy: null },
352358
},
353359
},
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+
},
354371
// safe-buffer.Buffer function/constructror is just a re-export of buffer.Buffer
355372
// and should be deprecated likewise.
356373
"safe-buffer": {
@@ -576,6 +593,41 @@ const rawModules = {
576593
[READ]: { since: "8.0.0", replacedBy: null },
577594
},
578595
},
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+
},
579631
}
580632
const modules = extendTrackmapWithNodePrefix(rawModules)
581633

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

+6
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ const { READ } = require("@eslint-community/eslint-utils")
44

55
/** @type {import('../types.js').SupportVersionTraceMap} */
66
const common_objects = {
7+
Network: {
8+
requestWillBeSent: { [READ]: { experimental: ["22.6.0"] } },
9+
responseReceived: { [READ]: { experimental: ["22.6.0"] } },
10+
loadingFinished: { [READ]: { experimental: ["22.6.0"] } },
11+
loadingFailed: { [READ]: { experimental: ["22.7.0"] } },
12+
},
713
console: { [READ]: { supported: ["8.0.0"] } },
814
close: { [READ]: { supported: ["9.0.0"] } },
915
open: { [READ]: { supported: ["8.0.0"] } },

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

+7
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,20 @@ const { READ } = require("@eslint-community/eslint-utils")
55
/** @type {import('../types.js').SupportVersionTraceMap} */
66
const Module = {
77
builtinModules: { [READ]: { supported: ["9.3.0", "8.10.0", "6.13.0"] } },
8+
constants: {
9+
compileCacheStatus: {
10+
[READ]: { experimental: ["22.8.0"] },
11+
},
12+
},
813
createRequire: { [READ]: { supported: ["12.2.0"] } },
914
createRequireFromPath: {
1015
[READ]: {
1116
supported: ["10.12.0"],
1217
deprecated: ["12.2.0"],
1318
},
1419
},
20+
enableCompileCache: { [READ]: { experimental: ["22.8.0"] } },
21+
getCompileCacheDir: { [READ]: { experimental: ["22.8.0"] } },
1522
isBuiltin: { [READ]: { supported: ["18.6.0", "16.17.0"] } },
1623
register: { [READ]: { experimental: ["20.6.0"] } },
1724
syncBuiltinESMExports: { [READ]: { supported: ["12.12.0"] } },

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const path = {
1010
dirname: { [READ]: { supported: ["0.1.16"] } },
1111
extname: { [READ]: { supported: ["0.1.25"] } },
1212
format: { [READ]: { supported: ["0.11.15"] } },
13-
matchesGlob: { [READ]: { experimental: ["22.5.0"] } },
13+
matchesGlob: { [READ]: { experimental: ["22.5.0", "20.17.0"] } },
1414
isAbsolute: { [READ]: { supported: ["0.11.2"] } },
1515
join: { [READ]: { supported: ["0.1.16"] } },
1616
normalize: { [READ]: { supported: ["0.1.23"] } },

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

+31-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,36 @@ const { READ } = require("@eslint-community/eslint-utils")
44

55
/** @type {import('../types.js').SupportVersionTraceMap} */
66
const perf_hooks = {
7-
performance: { [READ]: { supported: ["8.5.0"] } },
7+
performance: {
8+
[READ]: { supported: ["8.5.0"] },
9+
clearMarks: { [READ]: { supported: ["8.5.0"] } },
10+
clearMeasures: { [READ]: { supported: ["16.7.0"] } },
11+
clearResourceTimings: { [READ]: { supported: ["18.2.0", "v16.17.0"] } },
12+
eventLoopUtilization: { [READ]: { supported: ["14.10.0", "12.19.0"] } },
13+
getEntries: { [READ]: { supported: ["16.7.0"] } },
14+
getEntriesByName: { [READ]: { supported: ["16.7.0"] } },
15+
getEntriesByType: { [READ]: { supported: ["16.7.0"] } },
16+
mark: { [READ]: { supported: ["8.5.0"] } },
17+
markResourceTiming: { [READ]: { supported: ["8.2.0", "16.17.0"] } },
18+
measure: { [READ]: { supported: ["8.5.0"] } },
19+
nodeTiming: {
20+
[READ]: { supported: ["8.5.0"] },
21+
bootstrapComplete: { [READ]: { supported: ["8.5.0"] } },
22+
environment: { [READ]: { supported: ["8.5.0"] } },
23+
idleTime: { [READ]: { supported: ["14.10.0", "12.19.0"] } },
24+
loopExit: { [READ]: { supported: ["8.5.0"] } },
25+
loopStart: { [READ]: { supported: ["8.5.0"] } },
26+
nodeStart: { [READ]: { supported: ["8.5.0"] } },
27+
uvMetricsInfo: { [READ]: { supported: ["22.8.0"] } },
28+
v8Start: { [READ]: { supported: ["8.5.0"] } },
29+
},
30+
now: { [READ]: { supported: ["8.5.0"] } },
31+
onresourcetimingbufferfull: { [READ]: { supported: ["18.8.0"] } },
32+
setResourceTimingBufferSize: { [READ]: { supported: ["18.8.0"] } },
33+
timeOrigin: { [READ]: { supported: ["8.5.0"] } },
34+
timerify: { [READ]: { supported: ["8.5.0"] } },
35+
toJSON: { [READ]: { supported: ["16.1.0"] } },
36+
},
837
createHistogram: { [READ]: { supported: ["15.9.0", "14.18.0"] } },
938
monitorEventLoopDelay: { [READ]: { supported: ["11.10.0"] } },
1039
PerformanceEntry: { [READ]: { supported: ["8.5.0"] } },
@@ -16,7 +45,7 @@ const perf_hooks = {
1645
PerformanceObserver: { [READ]: { supported: ["8.5.0"] } },
1746
PerformanceObserverEntryList: { [READ]: { supported: ["8.5.0"] } },
1847
Histogram: { [READ]: { supported: ["11.10.0"] } },
19-
IntervalHistogram: { [READ]: { supported: ["8.5.0"] } },
48+
IntervalHistogram: { [READ]: { supported: ["11.10.0"] } },
2049
RecordableHistogram: { [READ]: { supported: ["15.9.0", "14.18.0"] } },
2150
}
2251

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/stream.js

+1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ const Stream = {
4545
finished: { [READ]: { supported: ["10.0.0"] } },
4646
pipeline: { [READ]: { supported: ["10.0.0"] } },
4747
compose: { [READ]: { supported: ["16.9.0"] } },
48+
duplexPair: { [READ]: { supported: ["22.6.0", "20.17.0"] } },
4849

4950
Readable,
5051
Writable,

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)