diff --git a/docs/rules/no-unsupported-features/node-builtins.md b/docs/rules/no-unsupported-features/node-builtins.md index 05cd1f65..5ac55625 100644 --- a/docs/rules/no-unsupported-features/node-builtins.md +++ b/docs/rules/no-unsupported-features/node-builtins.md @@ -8,7 +8,7 @@ Editor integrations of ESLint would be useful to know it in real-time. ## Rule Details -This rule reports APIs of Node.js built-in APIs on the basis of [Node.js v10.6.0 Documentation](https://nodejs.org/docs/v10.6.0/api/). +This rule reports APIs of Node.js built-in APIs on the basis of [Node.js v11.0.0 Documentation](https://nodejs.org/docs/v11.0.0/api/). ### Configured Node.js version range @@ -62,6 +62,8 @@ The `"ignores"` option accepts an array of the following strings. - `"Buffer.allocUnsafe"` - `"Buffer.allocUnsafeSlow"` - `"Buffer.from"` +- `"TextDecoder"` +- `"TextEncoder"` - `"URL"` - `"URLSearchParams"` - `"console.clear"` @@ -76,6 +78,7 @@ The `"ignores"` option accepts an array of the following strings. - `"console.markTimeline"` - `"console.profile"` - `"console.profileEnd"` +- `"console.timeLog"` - `"console.timeStamp"` - `"console.timeline"` - `"console.timelineEnd"` @@ -86,11 +89,13 @@ The `"ignores"` option accepts an array of the following strings. - `"process.getegid"` - `"process.geteuid"` - `"process.hasUncaughtExceptionCaptureCallback"` +- `"process.hrtime.bigint"` - `"process.ppid"` - `"process.release"` - `"process.setegid"` - `"process.seteuid"` - `"process.setUncaughtExceptionCaptureCallback"` +- `"queueMicrotask"` - `"require.resolve.paths"` **`assert` module:** @@ -136,6 +141,7 @@ The `"ignores"` option accepts an array of the following strings. - `"console.markTimeline"` - `"console.profile"` - `"console.profileEnd"` +- `"console.timeLog"` - `"console.timeStamp"` - `"console.timeline"` - `"console.timelineEnd"` @@ -147,6 +153,8 @@ The `"ignores"` option accepts an array of the following strings. - `"crypto.Certificate.verifySpkac"` - `"crypto.constants"` - `"crypto.fips"` +- `"crypto.generateKeyPair"` +- `"crypto.generateKeyPairSync"` - `"crypto.getCurves"` - `"crypto.getFips"` - `"crypto.privateEncrypt"` @@ -166,6 +174,7 @@ The `"ignores"` option accepts an array of the following strings. **`fs` module:** +- `"fs.Dirent"` - `"fs.copyFile"` - `"fs.copyFileSync"` - `"fs.mkdtemp"` @@ -189,7 +198,10 @@ The `"ignores"` option accepts an array of the following strings. **`os` module:** - `"os.constants"` +- `"os.constants.priority"` +- `"os.getPriority"` - `"os.homedir"` +- `"os.setPriority"` - `"os.userInfo"` **`path` module:** @@ -202,6 +214,7 @@ The `"ignores"` option accepts an array of the following strings. **`process` module:** +- `"process.allowedNodeEnvironmentFlags"` - `"process.argv0"` - `"process.channel"` - `"process.cpuUsage"` @@ -209,6 +222,7 @@ The `"ignores"` option accepts an array of the following strings. - `"process.getegid"` - `"process.geteuid"` - `"process.hasUncaughtExceptionCaptureCallback"` +- `"process.hrtime.bigint"` - `"process.ppid"` - `"process.release"` - `"process.setegid"` @@ -243,6 +257,7 @@ The `"ignores"` option accepts an array of the following strings. - `"util.TextDecoder"` - `"util.TextEncoder"` - `"util.types"` +- `"util.types.isBoxedPrimitive"` **`v8` module:** @@ -259,6 +274,7 @@ The `"ignores"` option accepts an array of the following strings. **`vm` module:** - `"vm.Module"` +- `"vm.compileFunction"` **`worker_threads` module:** diff --git a/lib/rules/no-unsupported-features/node-builtins.js b/lib/rules/no-unsupported-features/node-builtins.js index af50afe4..b8257435 100644 --- a/lib/rules/no-unsupported-features/node-builtins.js +++ b/lib/rules/no-unsupported-features/node-builtins.js @@ -11,6 +11,7 @@ const enumeratePropertyNames = require("../../util/enumerate-property-names") /*eslint-disable camelcase */ const trackMap = { globals: { + queueMicrotask: { [READ]: { supported: "11.0.0" } }, require: { resolve: { paths: { [READ]: { supported: "8.9.0" } }, @@ -60,6 +61,7 @@ const trackMap = { markTimeline: { [READ]: { supported: "8.0.0" } }, profile: { [READ]: { supported: "8.0.0" } }, profileEnd: { [READ]: { supported: "8.0.0" } }, + timeLog: { [READ]: { supported: "10.7.0" } }, timeStamp: { [READ]: { supported: "8.0.0" } }, timeline: { [READ]: { supported: "8.0.0" } }, timelineEnd: { [READ]: { supported: "8.0.0" } }, @@ -72,6 +74,8 @@ const trackMap = { }, constants: { [READ]: { supported: "6.3.0" } }, fips: { [READ]: { supported: "6.0.0" } }, + generateKeyPair: { [READ]: { supported: "10.12.0" } }, + generateKeyPairSync: { [READ]: { supported: "10.12.0" } }, getCurves: { [READ]: { supported: "2.3.0" } }, getFips: { [READ]: { supported: "10.0.0" } }, privateEncrypt: { [READ]: { supported: "1.1.0" } }, @@ -91,6 +95,7 @@ const trackMap = { }, }, fs: { + Dirent: { [READ]: { supported: "10.10.0" } }, copyFile: { [READ]: { supported: "8.5.0" } }, copyFileSync: { [READ]: { supported: "8.5.0" } }, mkdtemp: { [READ]: { supported: "5.10.0" } }, @@ -115,8 +120,13 @@ const trackMap = { builtinModules: { [READ]: { supported: "9.3.0" } }, }, os: { - constants: { [READ]: { supported: "6.3.0" } }, + constants: { + [READ]: { supported: "6.3.0" }, + priority: { [READ]: { supported: "10.10.0" } }, + }, + getPriority: { [READ]: { supported: "10.10.0" } }, homedir: { [READ]: { supported: "2.3.0" } }, + setPriority: { [READ]: { supported: "10.10.0" } }, userInfo: { [READ]: { supported: "6.0.0" } }, }, path: { @@ -126,6 +136,7 @@ const trackMap = { [READ]: { supported: "8.5.0" }, }, process: { + allowedNodeEnvironmentFlags: { [READ]: { supported: "10.10.0" } }, argv0: { [READ]: { supported: "6.4.0" } }, channel: { [READ]: { supported: "7.1.0" } }, cpuUsage: { [READ]: { supported: "6.1.0" } }, @@ -135,6 +146,9 @@ const trackMap = { hasUncaughtExceptionCaptureCallback: { [READ]: { supported: "9.3.0" }, }, + hrtime: { + bigint: { [READ]: { supported: "10.7.0" } }, + }, ppid: { [READ]: { supported: "9.2.0" } }, release: { [READ]: { supported: "3.0.0" } }, setegid: { [READ]: { supported: "2.0.0" } }, @@ -170,6 +184,7 @@ const trackMap = { TextEncoder: { [READ]: { supported: "8.3.0" } }, types: { [READ]: { supported: "10.0.0" }, + isBoxedPrimitive: { [READ]: { supported: "10.11.0" } }, }, }, v8: { @@ -185,6 +200,7 @@ const trackMap = { }, vm: { Module: { [READ]: { supported: "9.6.0" } }, + compileFunction: { [READ]: { supported: "10.10.0" } }, }, worker_threads: { [READ]: { supported: "10.5.0" }, @@ -193,6 +209,12 @@ const trackMap = { } Object.assign(trackMap.globals, { Buffer: trackMap.modules.buffer.Buffer, + TextDecoder: Object.assign({}, trackMap.modules.util.TextDecoder, { + [READ]: { supported: "11.0.0" }, + }), + TextEncoder: Object.assign({}, trackMap.modules.util.TextEncoder, { + [READ]: { supported: "11.0.0" }, + }), URL: Object.assign({}, trackMap.modules.url.URL, { [READ]: { supported: "10.0.0" }, }),