Skip to content

Commit 4a685c0

Browse files
authoredMay 14, 2024··
feat(node-builtin): Add node 20.13.0, 22.0.0, and 22.1.0 support (#276)
* feat(node-builtin): Node v22 deprecations * feat(node-builtin): Add node 20.13.0, 22.0.0, and 22.1.0 support
1 parent cb8ffa6 commit 4a685c0

File tree

6 files changed

+45
-17
lines changed

6 files changed

+45
-17
lines changed
 

‎lib/unsupported-features/node-builtins-modules/crypto.js

+11-3
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, CONSTRUCT, READ } = require("@eslint-community/eslint-utils")
44

55
/** @type {import('../types.js').SupportVersionTraceMap} */
66
const WebCrypto = {
@@ -106,8 +106,16 @@ const crypto = {
106106
[READ]: { supported: ["0.11.14"] },
107107
convertKey: { [READ]: { supported: ["10.0.0"] } },
108108
},
109-
Hash: { [READ]: { supported: ["0.1.92"] } },
110-
Hmac: { [READ]: { supported: ["0.1.94"] } },
109+
Hash: {
110+
[READ]: { supported: ["0.1.92"] },
111+
[CALL]: { deprecated: ["22.0.0", "20.13.0"] },
112+
[CONSTRUCT]: { deprecated: ["22.0.0", "20.13.0"] },
113+
},
114+
Hmac: {
115+
[READ]: { supported: ["0.1.94"] },
116+
[CALL]: { deprecated: ["22.0.0", "20.13.0"] },
117+
[CONSTRUCT]: { deprecated: ["22.0.0", "20.13.0"] },
118+
},
111119
KeyObject: {
112120
[READ]: { supported: ["11.6.0"] },
113121
from: { [READ]: { supported: ["15.0.0"] } },

‎lib/unsupported-features/node-builtins-modules/events.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,12 @@ const events = {
3636
supported: ["15.4.0"],
3737
},
3838
},
39-
CustomEvent: { [READ]: { experimental: ["18.7.0", "16.17.0"] } },
39+
CustomEvent: {
40+
[READ]: {
41+
experimental: ["18.7.0", "16.17.0"],
42+
supported: ["22.1.0", "20.13.0"],
43+
},
44+
},
4045
NodeEventTarget: {
4146
[READ]: {
4247
experimental: ["14.5.0"],

‎lib/unsupported-features/node-builtins-modules/fs.js

+20-13
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,34 @@
11
"use strict"
22

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

55
/** @type {import('../types.js').SupportVersionTraceMap} */
66
const promises_api = {
7-
constants: { [READ]: { supported: ["18.4.0", "16.17.0"] } },
7+
FileHandle: { [READ]: { supported: ["10.0.0"] } },
88
access: { [READ]: { supported: ["10.0.0"] } },
99
appendFile: { [READ]: { supported: ["10.0.0"] } },
1010
chmod: { [READ]: { supported: ["10.0.0"] } },
1111
chown: { [READ]: { supported: ["10.0.0"] } },
12+
constants: { [READ]: { supported: ["18.4.0", "16.17.0"] } },
1213
copyFile: { [READ]: { supported: ["10.0.0"] } },
1314
cp: { [READ]: { experimental: ["16.7.0"] } },
15+
glob: { [READ]: { experimental: ["22.0.0"] } },
1416
lchmod: { [READ]: { supported: ["10.0.0"], deprecated: ["10.0.0"] } },
1517
lchown: { [READ]: { supported: ["10.0.0"] } },
16-
lutimes: { [READ]: { supported: ["14.5.0", "12.19.0"] } },
1718
link: { [READ]: { supported: ["10.0.0"] } },
1819
lstat: { [READ]: { supported: ["10.0.0"] } },
20+
lutimes: { [READ]: { supported: ["14.5.0", "12.19.0"] } },
1921
mkdir: { [READ]: { supported: ["10.0.0"] } },
2022
mkdtemp: { [READ]: { supported: ["10.0.0"] } },
2123
open: { [READ]: { supported: ["10.0.0"] } },
2224
opendir: { [READ]: { supported: ["12.12.0"] } },
23-
readdir: { [READ]: { supported: ["10.0.0"] } },
2425
readFile: { [READ]: { supported: ["10.0.0"] } },
26+
readdir: { [READ]: { supported: ["10.0.0"] } },
2527
readlink: { [READ]: { supported: ["10.0.0"] } },
2628
realpath: { [READ]: { supported: ["10.0.0"] } },
2729
rename: { [READ]: { supported: ["10.0.0"] } },
28-
rmdir: { [READ]: { supported: ["10.0.0"] } },
2930
rm: { [READ]: { supported: ["14.14.0"] } },
31+
rmdir: { [READ]: { supported: ["10.0.0"] } },
3032
stat: { [READ]: { supported: ["10.0.0"] } },
3133
statfs: { [READ]: { supported: ["19.6.0", "18.15.0"] } },
3234
symlink: { [READ]: { supported: ["10.0.0"] } },
@@ -35,7 +37,6 @@ const promises_api = {
3537
utimes: { [READ]: { supported: ["10.0.0"] } },
3638
watch: { [READ]: { supported: ["15.9.0", "14.18.0"] } },
3739
writeFile: { [READ]: { supported: ["10.0.0"] } },
38-
FileHandle: { [READ]: { supported: ["10.0.0"] } },
3940
}
4041

4142
/** @type {import('../types.js').SupportVersionTraceMap} */
@@ -57,13 +58,15 @@ const callback_api = {
5758
fsync: { [READ]: { supported: ["0.1.96"] } },
5859
ftruncate: { [READ]: { supported: ["0.8.6"] } },
5960
futimes: { [READ]: { supported: ["0.4.2"] } },
61+
glob: { [READ]: { experimental: ["22.0.0"] } },
6062
lchmod: { [READ]: { supported: ["0.1.8"], deprecated: ["0.4.7"] } },
6163
lchown: { [READ]: { supported: ["0.1.8"] } },
62-
lutimes: { [READ]: { supported: ["14.5.0", "12.19.0"] } },
6364
link: { [READ]: { supported: ["0.1.31"] } },
6465
lstat: { [READ]: { supported: ["0.1.30"] } },
66+
lutimes: { [READ]: { supported: ["14.5.0", "12.19.0"] } },
6567
mkdir: { [READ]: { supported: ["0.1.8"] } },
6668
mkdtemp: { [READ]: { supported: ["5.10.0"] } },
69+
native: { [READ]: { supported: ["9.2.0"] } },
6770
open: { [READ]: { supported: ["0.0.2"] } },
6871
openAsBlob: { [READ]: { experimental: ["19.8.0"] } },
6972
opendir: { [READ]: { supported: ["12.12.0"] } },
@@ -76,10 +79,9 @@ const callback_api = {
7679
[READ]: { supported: ["0.1.31"] },
7780
native: { [READ]: { supported: ["9.2.0"] } },
7881
},
79-
native: { [READ]: { supported: ["9.2.0"] } },
8082
rename: { [READ]: { supported: ["0.0.2"] } },
81-
rmdir: { [READ]: { supported: ["0.0.2"] } },
8283
rm: { [READ]: { supported: ["14.14.0"] } },
84+
rmdir: { [READ]: { supported: ["0.0.2"] } },
8385
stat: { [READ]: { supported: ["0.0.2"] } },
8486
statfs: { [READ]: { supported: ["19.6.0", "18.15.0"] } },
8587
symlink: { [READ]: { supported: ["0.1.31"] } },
@@ -111,13 +113,15 @@ const synchronous_api = {
111113
fsyncSync: { [READ]: { supported: ["0.1.96"] } },
112114
ftruncateSync: { [READ]: { supported: ["0.8.6"] } },
113115
futimesSync: { [READ]: { supported: ["0.4.2"] } },
116+
globSync: { [READ]: { experimental: ["22.0.0"] } },
114117
lchmodSync: { [READ]: { supported: ["0.1.8"], deprecated: ["0.4.7"] } },
115118
lchownSync: { [READ]: { supported: ["0.1.8"] } },
116-
lutimesSync: { [READ]: { supported: ["14.5.0", "12.19.0"] } },
117119
linkSync: { [READ]: { supported: ["0.1.31"] } },
118120
lstatSync: { [READ]: { supported: ["0.1.30"] } },
121+
lutimesSync: { [READ]: { supported: ["14.5.0", "12.19.0"] } },
119122
mkdirSync: { [READ]: { supported: ["0.1.21"] } },
120123
mkdtempSync: { [READ]: { supported: ["5.10.0"] } },
124+
native: { [READ]: { supported: ["9.2.0"] } },
121125
opendirSync: { [READ]: { supported: ["12.12.0"] } },
122126
openSync: { [READ]: { supported: ["0.1.21"] } },
123127
readdirSync: { [READ]: { supported: ["0.1.21"] } },
@@ -129,12 +133,11 @@ const synchronous_api = {
129133
[READ]: { supported: ["0.1.31"] },
130134
native: { [READ]: { supported: ["9.2.0"] } },
131135
},
132-
native: { [READ]: { supported: ["9.2.0"] } },
133136
renameSync: { [READ]: { supported: ["0.1.21"] } },
134137
rmdirSync: { [READ]: { supported: ["0.1.21"] } },
135138
rmSync: { [READ]: { supported: ["14.14.0"] } },
136-
statSync: { [READ]: { supported: ["0.1.21"] } },
137139
statfsSync: { [READ]: { supported: ["19.6.0", "18.15.0"] } },
140+
statSync: { [READ]: { supported: ["0.1.21"] } },
138141
symlinkSync: { [READ]: { supported: ["0.1.31"] } },
139142
truncateSync: { [READ]: { supported: ["0.8.6"] } },
140143
unlinkSync: { [READ]: { supported: ["0.1.21"] } },
@@ -161,7 +164,11 @@ const fs = {
161164
FSWatcher: { [READ]: { supported: ["0.5.8"] } },
162165
StatWatcher: { [READ]: { supported: ["14.3.0", "12.20.0"] } },
163166
ReadStream: { [READ]: { supported: ["0.1.93"] } },
164-
Stats: { [READ]: { supported: ["0.1.21"] } },
167+
Stats: {
168+
[READ]: { supported: ["0.1.21"] },
169+
[CALL]: { deprecated: ["22.0.0", "20.13.0"] },
170+
[CONSTRUCT]: { deprecated: ["22.0.0", "20.13.0"] },
171+
},
165172
StatFs: { [READ]: { supported: ["19.6.0", "18.15.0"] } },
166173
WriteStream: { [READ]: { supported: ["0.1.93"] } },
167174
common_objects: { [READ]: { supported: ["0.1.8"] } },

‎lib/unsupported-features/node-builtins-modules/process.js

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ const { READ } = require("@eslint-community/eslint-utils")
55
/** @type {import('../types.js').SupportVersionTraceMap} */
66
const process = {
77
allowedNodeEnvironmentFlags: { [READ]: { supported: ["10.10.0"] } },
8+
availableMemory: { [READ]: { experimental: ["22.0.0", "20.13.0"] } },
89
arch: { [READ]: { supported: ["0.5.0"] } },
910
argv: { [READ]: { supported: ["0.1.27"] } },
1011
argv0: { [READ]: { supported: ["6.4.0"] } },

‎lib/unsupported-features/node-builtins-modules/test.js

+6
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ const test = {
2020
todo: { [READ]: { supported: ["20.2.0", "18.17.0"] } },
2121
only: { [READ]: { supported: ["20.2.0", "18.17.0"] } },
2222
},
23+
suite: {
24+
[READ]: { supported: ["22.0.0", "20.13.0"] },
25+
skip: { [READ]: { supported: ["22.0.0", "20.13.0"] } },
26+
todo: { [READ]: { supported: ["22.0.0", "20.13.0"] } },
27+
only: { [READ]: { supported: ["22.0.0", "20.13.0"] } },
28+
},
2329
before: { [READ]: { supported: ["18.8.0", "16.18.0"] } },
2430
after: { [READ]: { supported: ["18.8.0", "16.18.0"] } },
2531
beforeEach: { [READ]: { supported: ["18.8.0", "16.18.0"] } },

‎lib/unsupported-features/node-builtins-modules/v8.js

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ const v8 = {
3434
getHeapSnapshot: { [READ]: { supported: ["11.13.0"] } },
3535
getHeapSpaceStatistics: { [READ]: { supported: ["6.0.0"] } },
3636
getHeapStatistics: { [READ]: { supported: ["1.0.0"] } },
37+
queryObjects: { [READ]: { experimental: ["22.0.0", "20.13.0"] } },
3738
setFlagsFromString: { [READ]: { supported: ["1.0.0"] } },
3839
stopCoverage: { [READ]: { supported: ["15.1.0", "14.18.0", "12.22.0"] } },
3940
takeCoverage: { [READ]: { supported: ["15.1.0", "14.18.0", "12.22.0"] } },

0 commit comments

Comments
 (0)
Please sign in to comment.