Skip to content

Commit

Permalink
feat(node-builtin): Add node 20.13.0, 22.0.0, and 22.1.0 support (#276)
Browse files Browse the repository at this point in the history
* feat(node-builtin): Node v22 deprecations

* feat(node-builtin): Add node 20.13.0, 22.0.0, and 22.1.0 support
  • Loading branch information
scagood committed May 14, 2024
1 parent cb8ffa6 commit 4a685c0
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 17 deletions.
14 changes: 11 additions & 3 deletions lib/unsupported-features/node-builtins-modules/crypto.js
@@ -1,6 +1,6 @@
"use strict"

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

/** @type {import('../types.js').SupportVersionTraceMap} */
const WebCrypto = {
Expand Down Expand Up @@ -106,8 +106,16 @@ const crypto = {
[READ]: { supported: ["0.11.14"] },
convertKey: { [READ]: { supported: ["10.0.0"] } },
},
Hash: { [READ]: { supported: ["0.1.92"] } },
Hmac: { [READ]: { supported: ["0.1.94"] } },
Hash: {
[READ]: { supported: ["0.1.92"] },
[CALL]: { deprecated: ["22.0.0", "20.13.0"] },
[CONSTRUCT]: { deprecated: ["22.0.0", "20.13.0"] },
},
Hmac: {
[READ]: { supported: ["0.1.94"] },
[CALL]: { deprecated: ["22.0.0", "20.13.0"] },
[CONSTRUCT]: { deprecated: ["22.0.0", "20.13.0"] },
},
KeyObject: {
[READ]: { supported: ["11.6.0"] },
from: { [READ]: { supported: ["15.0.0"] } },
Expand Down
7 changes: 6 additions & 1 deletion lib/unsupported-features/node-builtins-modules/events.js
Expand Up @@ -36,7 +36,12 @@ const events = {
supported: ["15.4.0"],
},
},
CustomEvent: { [READ]: { experimental: ["18.7.0", "16.17.0"] } },
CustomEvent: {
[READ]: {
experimental: ["18.7.0", "16.17.0"],
supported: ["22.1.0", "20.13.0"],
},
},
NodeEventTarget: {
[READ]: {
experimental: ["14.5.0"],
Expand Down
33 changes: 20 additions & 13 deletions lib/unsupported-features/node-builtins-modules/fs.js
@@ -1,32 +1,34 @@
"use strict"

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

/** @type {import('../types.js').SupportVersionTraceMap} */
const promises_api = {
constants: { [READ]: { supported: ["18.4.0", "16.17.0"] } },
FileHandle: { [READ]: { supported: ["10.0.0"] } },
access: { [READ]: { supported: ["10.0.0"] } },
appendFile: { [READ]: { supported: ["10.0.0"] } },
chmod: { [READ]: { supported: ["10.0.0"] } },
chown: { [READ]: { supported: ["10.0.0"] } },
constants: { [READ]: { supported: ["18.4.0", "16.17.0"] } },
copyFile: { [READ]: { supported: ["10.0.0"] } },
cp: { [READ]: { experimental: ["16.7.0"] } },
glob: { [READ]: { experimental: ["22.0.0"] } },
lchmod: { [READ]: { supported: ["10.0.0"], deprecated: ["10.0.0"] } },
lchown: { [READ]: { supported: ["10.0.0"] } },
lutimes: { [READ]: { supported: ["14.5.0", "12.19.0"] } },
link: { [READ]: { supported: ["10.0.0"] } },
lstat: { [READ]: { supported: ["10.0.0"] } },
lutimes: { [READ]: { supported: ["14.5.0", "12.19.0"] } },
mkdir: { [READ]: { supported: ["10.0.0"] } },
mkdtemp: { [READ]: { supported: ["10.0.0"] } },
open: { [READ]: { supported: ["10.0.0"] } },
opendir: { [READ]: { supported: ["12.12.0"] } },
readdir: { [READ]: { supported: ["10.0.0"] } },
readFile: { [READ]: { supported: ["10.0.0"] } },
readdir: { [READ]: { supported: ["10.0.0"] } },
readlink: { [READ]: { supported: ["10.0.0"] } },
realpath: { [READ]: { supported: ["10.0.0"] } },
rename: { [READ]: { supported: ["10.0.0"] } },
rmdir: { [READ]: { supported: ["10.0.0"] } },
rm: { [READ]: { supported: ["14.14.0"] } },
rmdir: { [READ]: { supported: ["10.0.0"] } },
stat: { [READ]: { supported: ["10.0.0"] } },
statfs: { [READ]: { supported: ["19.6.0", "18.15.0"] } },
symlink: { [READ]: { supported: ["10.0.0"] } },
Expand All @@ -35,7 +37,6 @@ const promises_api = {
utimes: { [READ]: { supported: ["10.0.0"] } },
watch: { [READ]: { supported: ["15.9.0", "14.18.0"] } },
writeFile: { [READ]: { supported: ["10.0.0"] } },
FileHandle: { [READ]: { supported: ["10.0.0"] } },
}

/** @type {import('../types.js').SupportVersionTraceMap} */
Expand All @@ -57,13 +58,15 @@ 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"] } },
lchmod: { [READ]: { supported: ["0.1.8"], deprecated: ["0.4.7"] } },
lchown: { [READ]: { supported: ["0.1.8"] } },
lutimes: { [READ]: { supported: ["14.5.0", "12.19.0"] } },
link: { [READ]: { supported: ["0.1.31"] } },
lstat: { [READ]: { supported: ["0.1.30"] } },
lutimes: { [READ]: { supported: ["14.5.0", "12.19.0"] } },
mkdir: { [READ]: { supported: ["0.1.8"] } },
mkdtemp: { [READ]: { supported: ["5.10.0"] } },
native: { [READ]: { supported: ["9.2.0"] } },
open: { [READ]: { supported: ["0.0.2"] } },
openAsBlob: { [READ]: { experimental: ["19.8.0"] } },
opendir: { [READ]: { supported: ["12.12.0"] } },
Expand All @@ -76,10 +79,9 @@ const callback_api = {
[READ]: { supported: ["0.1.31"] },
native: { [READ]: { supported: ["9.2.0"] } },
},
native: { [READ]: { supported: ["9.2.0"] } },
rename: { [READ]: { supported: ["0.0.2"] } },
rmdir: { [READ]: { supported: ["0.0.2"] } },
rm: { [READ]: { supported: ["14.14.0"] } },
rmdir: { [READ]: { supported: ["0.0.2"] } },
stat: { [READ]: { supported: ["0.0.2"] } },
statfs: { [READ]: { supported: ["19.6.0", "18.15.0"] } },
symlink: { [READ]: { supported: ["0.1.31"] } },
Expand Down Expand Up @@ -111,13 +113,15 @@ 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"] } },
lchmodSync: { [READ]: { supported: ["0.1.8"], deprecated: ["0.4.7"] } },
lchownSync: { [READ]: { supported: ["0.1.8"] } },
lutimesSync: { [READ]: { supported: ["14.5.0", "12.19.0"] } },
linkSync: { [READ]: { supported: ["0.1.31"] } },
lstatSync: { [READ]: { supported: ["0.1.30"] } },
lutimesSync: { [READ]: { supported: ["14.5.0", "12.19.0"] } },
mkdirSync: { [READ]: { supported: ["0.1.21"] } },
mkdtempSync: { [READ]: { supported: ["5.10.0"] } },
native: { [READ]: { supported: ["9.2.0"] } },
opendirSync: { [READ]: { supported: ["12.12.0"] } },
openSync: { [READ]: { supported: ["0.1.21"] } },
readdirSync: { [READ]: { supported: ["0.1.21"] } },
Expand All @@ -129,12 +133,11 @@ const synchronous_api = {
[READ]: { supported: ["0.1.31"] },
native: { [READ]: { supported: ["9.2.0"] } },
},
native: { [READ]: { supported: ["9.2.0"] } },
renameSync: { [READ]: { supported: ["0.1.21"] } },
rmdirSync: { [READ]: { supported: ["0.1.21"] } },
rmSync: { [READ]: { supported: ["14.14.0"] } },
statSync: { [READ]: { supported: ["0.1.21"] } },
statfsSync: { [READ]: { supported: ["19.6.0", "18.15.0"] } },
statSync: { [READ]: { supported: ["0.1.21"] } },
symlinkSync: { [READ]: { supported: ["0.1.31"] } },
truncateSync: { [READ]: { supported: ["0.8.6"] } },
unlinkSync: { [READ]: { supported: ["0.1.21"] } },
Expand All @@ -161,7 +164,11 @@ const fs = {
FSWatcher: { [READ]: { supported: ["0.5.8"] } },
StatWatcher: { [READ]: { supported: ["14.3.0", "12.20.0"] } },
ReadStream: { [READ]: { supported: ["0.1.93"] } },
Stats: { [READ]: { supported: ["0.1.21"] } },
Stats: {
[READ]: { supported: ["0.1.21"] },
[CALL]: { deprecated: ["22.0.0", "20.13.0"] },
[CONSTRUCT]: { deprecated: ["22.0.0", "20.13.0"] },
},
StatFs: { [READ]: { supported: ["19.6.0", "18.15.0"] } },
WriteStream: { [READ]: { supported: ["0.1.93"] } },
common_objects: { [READ]: { supported: ["0.1.8"] } },
Expand Down
1 change: 1 addition & 0 deletions lib/unsupported-features/node-builtins-modules/process.js
Expand Up @@ -5,6 +5,7 @@ const { READ } = require("@eslint-community/eslint-utils")
/** @type {import('../types.js').SupportVersionTraceMap} */
const process = {
allowedNodeEnvironmentFlags: { [READ]: { supported: ["10.10.0"] } },
availableMemory: { [READ]: { experimental: ["22.0.0", "20.13.0"] } },
arch: { [READ]: { supported: ["0.5.0"] } },
argv: { [READ]: { supported: ["0.1.27"] } },
argv0: { [READ]: { supported: ["6.4.0"] } },
Expand Down
6 changes: 6 additions & 0 deletions lib/unsupported-features/node-builtins-modules/test.js
Expand Up @@ -20,6 +20,12 @@ const test = {
todo: { [READ]: { supported: ["20.2.0", "18.17.0"] } },
only: { [READ]: { supported: ["20.2.0", "18.17.0"] } },
},
suite: {
[READ]: { supported: ["22.0.0", "20.13.0"] },
skip: { [READ]: { supported: ["22.0.0", "20.13.0"] } },
todo: { [READ]: { supported: ["22.0.0", "20.13.0"] } },
only: { [READ]: { supported: ["22.0.0", "20.13.0"] } },
},
before: { [READ]: { supported: ["18.8.0", "16.18.0"] } },
after: { [READ]: { supported: ["18.8.0", "16.18.0"] } },
beforeEach: { [READ]: { supported: ["18.8.0", "16.18.0"] } },
Expand Down
1 change: 1 addition & 0 deletions lib/unsupported-features/node-builtins-modules/v8.js
Expand Up @@ -34,6 +34,7 @@ const v8 = {
getHeapSnapshot: { [READ]: { supported: ["11.13.0"] } },
getHeapSpaceStatistics: { [READ]: { supported: ["6.0.0"] } },
getHeapStatistics: { [READ]: { supported: ["1.0.0"] } },
queryObjects: { [READ]: { experimental: ["22.0.0", "20.13.0"] } },
setFlagsFromString: { [READ]: { supported: ["1.0.0"] } },
stopCoverage: { [READ]: { supported: ["15.1.0", "14.18.0", "12.22.0"] } },
takeCoverage: { [READ]: { supported: ["15.1.0", "14.18.0", "12.22.0"] } },
Expand Down

0 comments on commit 4a685c0

Please sign in to comment.