From 9ad8f574b7e9a9e2a739dc813553dc1ef33c29eb Mon Sep 17 00:00:00 2001 From: Geoffrey Booth Date: Fri, 28 Jan 2022 15:08:05 -0800 Subject: [PATCH 1/5] module: unflag esm json modules --- doc/node.1 | 3 --- lib/internal/modules/esm/get_format.js | 11 +++----- lib/internal/modules/esm/translators.js | 1 - src/node_options.cc | 10 ++------ src/node_options.h | 2 -- .../test-esm-assertionless-json-import.js | 2 +- test/es-module/test-esm-data-urls.js | 1 - .../test-esm-dynamic-import-assertion.js | 1 - .../test-esm-dynamic-import-assertion.mjs | 1 - .../es-module/test-esm-import-assertion-1.mjs | 1 - .../es-module/test-esm-import-assertion-2.mjs | 1 - .../es-module/test-esm-import-assertion-3.mjs | 1 - .../es-module/test-esm-import-assertion-4.mjs | 1 - .../test-esm-import-assertion-errors.js | 1 - .../test-esm-import-assertion-errors.mjs | 1 - .../test-esm-import-json-named-export.mjs | 1 - test/es-module/test-esm-invalid-data-urls.js | 14 +++-------- test/es-module/test-esm-json-cache.mjs | 1 - test/es-module/test-esm-json.mjs | 25 +------------------ test/es-module/test-esm-non-js.js | 21 ---------------- test/es-module/test-esm-non-js.mjs | 23 +++++++++++++++++ 21 files changed, 35 insertions(+), 88 deletions(-) delete mode 100644 test/es-module/test-esm-non-js.js create mode 100644 test/es-module/test-esm-non-js.mjs diff --git a/doc/node.1 b/doc/node.1 index fa56276b3cab2c..c4f5118bcae7d4 100644 --- a/doc/node.1 +++ b/doc/node.1 @@ -142,9 +142,6 @@ Enable Source Map V3 support for stack traces. .It Fl -experimental-import-meta-resolve Enable experimental ES modules support for import.meta.resolve(). . -.It Fl -experimental-json-modules -Enable experimental JSON interop support for the ES Module loader. -. .It Fl -experimental-loader Ns = Ns Ar module Specify the .Ar module diff --git a/lib/internal/modules/esm/get_format.js b/lib/internal/modules/esm/get_format.js index 9712890139596d..ca90cd6a5d1e97 100644 --- a/lib/internal/modules/esm/get_format.js +++ b/lib/internal/modules/esm/get_format.js @@ -8,7 +8,6 @@ const { const { extname } = require('path'); const { getOptionValue } = require('internal/options'); -const experimentalJsonModules = getOptionValue('--experimental-json-modules'); const experimentalSpecifierResolution = getOptionValue('--experimental-specifier-resolution'); const experimentalWasmModules = getOptionValue('--experimental-wasm-modules'); @@ -20,7 +19,8 @@ const extensionFormatMap = { '__proto__': null, '.cjs': 'commonjs', '.js': 'module', - '.mjs': 'module' + '.json': 'json', + '.mjs': 'module', }; const legacyExtensionFormatMap = { @@ -29,7 +29,7 @@ const legacyExtensionFormatMap = { '.js': 'commonjs', '.json': 'commonjs', '.mjs': 'module', - '.node': 'commonjs' + '.node': 'commonjs', }; let experimentalSpecifierResolutionWarned = false; @@ -37,9 +37,6 @@ let experimentalSpecifierResolutionWarned = false; if (experimentalWasmModules) extensionFormatMap['.wasm'] = legacyExtensionFormatMap['.wasm'] = 'wasm'; -if (experimentalJsonModules) - extensionFormatMap['.json'] = legacyExtensionFormatMap['.json'] = 'json'; - const protocolHandlers = ObjectAssign(ObjectCreate(null), { 'data:'(parsed) { const { 1: mime } = RegExpPrototypeExec( @@ -49,7 +46,7 @@ const protocolHandlers = ObjectAssign(ObjectCreate(null), { const format = ({ '__proto__': null, 'text/javascript': 'module', - 'application/json': experimentalJsonModules ? 'json' : null, + 'application/json': 'json', 'application/wasm': experimentalWasmModules ? 'wasm' : null })[mime] || null; diff --git a/lib/internal/modules/esm/translators.js b/lib/internal/modules/esm/translators.js index 297ac95e662670..04c3b64a082579 100644 --- a/lib/internal/modules/esm/translators.js +++ b/lib/internal/modules/esm/translators.js @@ -259,7 +259,6 @@ translators.set('builtin', async function builtinStrategy(url) { // Strategy for loading a JSON file translators.set('json', async function jsonStrategy(url, source) { - emitExperimentalWarning('Importing JSON modules'); assertBufferSource(source, true, 'load'); debug(`Loading JSONModule ${url}`); const pathname = StringPrototypeStartsWith(url, 'file:') ? diff --git a/src/node_options.cc b/src/node_options.cc index 3dc704cab0947b..c9c031bc60c3e8 100644 --- a/src/node_options.cc +++ b/src/node_options.cc @@ -315,19 +315,13 @@ EnvironmentOptionsParser::EnvironmentOptionsParser() { kAllowedInEnvironment); AddOption("--experimental-abortcontroller", "", NoOp{}, kAllowedInEnvironment); - AddOption("--experimental-json-modules", - "experimental JSON interop support for the ES Module loader", - &EnvironmentOptions::experimental_json_modules, - kAllowedInEnvironment); + AddOption("--experimental-json-modules", "", NoOp{}, kAllowedInEnvironment); AddOption("--experimental-loader", "use the specified module as a custom loader", &EnvironmentOptions::userland_loader, kAllowedInEnvironment); AddAlias("--loader", "--experimental-loader"); - AddOption("--experimental-modules", - "", - &EnvironmentOptions::experimental_modules, - kAllowedInEnvironment); + AddOption("--experimental-modules", "", NoOp{}, kAllowedInEnvironment); AddOption("--experimental-wasm-modules", "experimental ES Module support for webassembly modules", &EnvironmentOptions::experimental_wasm_modules, diff --git a/src/node_options.h b/src/node_options.h index 1c0e018ab16f14..6d19795216d2a7 100644 --- a/src/node_options.h +++ b/src/node_options.h @@ -107,8 +107,6 @@ class EnvironmentOptions : public Options { std::vector conditions; std::string dns_result_order; bool enable_source_maps = false; - bool experimental_json_modules = false; - bool experimental_modules = false; std::string experimental_specifier_resolution; bool experimental_wasm_modules = false; bool experimental_import_meta_resolve = false; diff --git a/test/es-module/test-esm-assertionless-json-import.js b/test/es-module/test-esm-assertionless-json-import.js index 2f06508dd2e509..23c71a1ba105d2 100644 --- a/test/es-module/test-esm-assertionless-json-import.js +++ b/test/es-module/test-esm-assertionless-json-import.js @@ -1,4 +1,4 @@ -// Flags: --experimental-json-modules --experimental-loader ./test/fixtures/es-module-loaders/assertionless-json-import.mjs +// Flags: --experimental-loader ./test/fixtures/es-module-loaders/assertionless-json-import.mjs 'use strict'; const common = require('../common'); const { strictEqual } = require('assert'); diff --git a/test/es-module/test-esm-data-urls.js b/test/es-module/test-esm-data-urls.js index 85a693b54221a7..9d0deb70a1568c 100644 --- a/test/es-module/test-esm-data-urls.js +++ b/test/es-module/test-esm-data-urls.js @@ -1,4 +1,3 @@ -// Flags: --experimental-json-modules 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/es-module/test-esm-dynamic-import-assertion.js b/test/es-module/test-esm-dynamic-import-assertion.js index c6ff97d790a44c..71ef9cd1d1d30b 100644 --- a/test/es-module/test-esm-dynamic-import-assertion.js +++ b/test/es-module/test-esm-dynamic-import-assertion.js @@ -1,4 +1,3 @@ -// Flags: --experimental-json-modules 'use strict'; const common = require('../common'); const { strictEqual } = require('assert'); diff --git a/test/es-module/test-esm-dynamic-import-assertion.mjs b/test/es-module/test-esm-dynamic-import-assertion.mjs index a53ea145479eb5..4010259b743cbd 100644 --- a/test/es-module/test-esm-dynamic-import-assertion.mjs +++ b/test/es-module/test-esm-dynamic-import-assertion.mjs @@ -1,4 +1,3 @@ -// Flags: --experimental-json-modules import '../common/index.mjs'; import { strictEqual } from 'assert'; diff --git a/test/es-module/test-esm-import-assertion-1.mjs b/test/es-module/test-esm-import-assertion-1.mjs index f011c948d8edea..72b3426bdbb601 100644 --- a/test/es-module/test-esm-import-assertion-1.mjs +++ b/test/es-module/test-esm-import-assertion-1.mjs @@ -1,4 +1,3 @@ -// Flags: --experimental-json-modules import '../common/index.mjs'; import { strictEqual } from 'assert'; diff --git a/test/es-module/test-esm-import-assertion-2.mjs b/test/es-module/test-esm-import-assertion-2.mjs index 70947fcf212d61..8001c29772b1f0 100644 --- a/test/es-module/test-esm-import-assertion-2.mjs +++ b/test/es-module/test-esm-import-assertion-2.mjs @@ -1,4 +1,3 @@ -// Flags: --experimental-json-modules import '../common/index.mjs'; import { strictEqual } from 'assert'; diff --git a/test/es-module/test-esm-import-assertion-3.mjs b/test/es-module/test-esm-import-assertion-3.mjs index 0409095aec5d97..b9de9232cfff4d 100644 --- a/test/es-module/test-esm-import-assertion-3.mjs +++ b/test/es-module/test-esm-import-assertion-3.mjs @@ -1,4 +1,3 @@ -// Flags: --experimental-json-modules import '../common/index.mjs'; import { strictEqual } from 'assert'; diff --git a/test/es-module/test-esm-import-assertion-4.mjs b/test/es-module/test-esm-import-assertion-4.mjs index 4f3e33a6eefe2d..547983e51f449a 100644 --- a/test/es-module/test-esm-import-assertion-4.mjs +++ b/test/es-module/test-esm-import-assertion-4.mjs @@ -1,4 +1,3 @@ -// Flags: --experimental-json-modules import '../common/index.mjs'; import { strictEqual } from 'assert'; diff --git a/test/es-module/test-esm-import-assertion-errors.js b/test/es-module/test-esm-import-assertion-errors.js index c7d5abee693979..147781b45ccca3 100644 --- a/test/es-module/test-esm-import-assertion-errors.js +++ b/test/es-module/test-esm-import-assertion-errors.js @@ -1,4 +1,3 @@ -// Flags: --experimental-json-modules 'use strict'; const common = require('../common'); const { rejects } = require('assert'); diff --git a/test/es-module/test-esm-import-assertion-errors.mjs b/test/es-module/test-esm-import-assertion-errors.mjs index c96e8f3dd046b7..d3f958ced0eb93 100644 --- a/test/es-module/test-esm-import-assertion-errors.mjs +++ b/test/es-module/test-esm-import-assertion-errors.mjs @@ -1,4 +1,3 @@ -// Flags: --experimental-json-modules import '../common/index.mjs'; import { rejects } from 'assert'; diff --git a/test/es-module/test-esm-import-json-named-export.mjs b/test/es-module/test-esm-import-json-named-export.mjs index f70b927329b6a6..3c0f3af662c7cc 100644 --- a/test/es-module/test-esm-import-json-named-export.mjs +++ b/test/es-module/test-esm-import-json-named-export.mjs @@ -5,7 +5,6 @@ import { spawn } from 'child_process'; import { execPath } from 'process'; const child = spawn(execPath, [ - '--experimental-json-modules', path('es-modules', 'import-json-named-export.mjs'), ]); diff --git a/test/es-module/test-esm-invalid-data-urls.js b/test/es-module/test-esm-invalid-data-urls.js index 67f0bfe4e25588..c349aa309cee65 100644 --- a/test/es-module/test-esm-invalid-data-urls.js +++ b/test/es-module/test-esm-invalid-data-urls.js @@ -5,20 +5,14 @@ const assert = require('assert'); (async () => { await assert.rejects(import('data:text/plain,export default0'), { code: 'ERR_INVALID_MODULE_SPECIFIER', - message: - 'Invalid module "data:text/plain,export default0" has an unsupported ' + - 'MIME type "text/plain"', + message: 'Invalid module "data:text/plain,export default0" has an unsupported MIME type "text/plain"', }); await assert.rejects(import('data:text/plain;base64,'), { code: 'ERR_INVALID_MODULE_SPECIFIER', - message: - 'Invalid module "data:text/plain;base64," has an unsupported ' + - 'MIME type "text/plain"', + message: 'Invalid module "data:text/plain;base64," has an unsupported MIME type "text/plain"', }); - await assert.rejects(import('data:application/json,[]'), { + await assert.rejects(import('data:text/css,.error { color: red; }'), { code: 'ERR_INVALID_MODULE_SPECIFIER', - message: - 'Invalid module "data:application/json,[]" has an unsupported ' + - 'MIME type "application/json"', + message: 'Invalid module "data:text/css,.error { color: red; }" has an unsupported MIME type "text/css"', }); })().then(common.mustCall()); diff --git a/test/es-module/test-esm-json-cache.mjs b/test/es-module/test-esm-json-cache.mjs index 90694748c39e5f..b766519d663f9a 100644 --- a/test/es-module/test-esm-json-cache.mjs +++ b/test/es-module/test-esm-json-cache.mjs @@ -1,4 +1,3 @@ -// Flags: --experimental-json-modules import '../common/index.mjs'; import { strictEqual, deepStrictEqual } from 'assert'; diff --git a/test/es-module/test-esm-json.mjs b/test/es-module/test-esm-json.mjs index f33b4f9937ddb1..72b3426bdbb601 100644 --- a/test/es-module/test-esm-json.mjs +++ b/test/es-module/test-esm-json.mjs @@ -1,29 +1,6 @@ -// Flags: --experimental-json-modules import '../common/index.mjs'; -import { path } from '../common/fixtures.mjs'; -import { strictEqual, ok } from 'assert'; -import { spawn } from 'child_process'; +import { strictEqual } from 'assert'; import secret from '../fixtures/experimental.json' assert { type: 'json' }; strictEqual(secret.ofLife, 42); - -// Test warning message -const child = spawn(process.execPath, [ - '--experimental-json-modules', - path('/es-modules/json-modules.mjs'), -]); - -let stderr = ''; -child.stderr.setEncoding('utf8'); -child.stderr.on('data', (data) => { - stderr += data; -}); -child.on('close', (code, signal) => { - strictEqual(code, 0); - strictEqual(signal, null); - ok(stderr.toString().includes( - 'ExperimentalWarning: Importing JSON modules is an experimental feature. ' + - 'This feature could change at any time' - )); -}); diff --git a/test/es-module/test-esm-non-js.js b/test/es-module/test-esm-non-js.js deleted file mode 100644 index 3e572809bbdf35..00000000000000 --- a/test/es-module/test-esm-non-js.js +++ /dev/null @@ -1,21 +0,0 @@ -'use strict'; - -const common = require('../common'); -const { spawn } = require('child_process'); -const assert = require('assert'); - -const entry = require.resolve('./test-esm-json.mjs'); - -// Verify non-js extensions fail for ESM -const child = spawn(process.execPath, [entry]); - -let stderr = ''; -child.stderr.setEncoding('utf8'); -child.stderr.on('data', (data) => { - stderr += data; -}); -child.on('close', common.mustCall((code, signal) => { - assert.strictEqual(code, 1); - assert.strictEqual(signal, null); - assert.ok(stderr.indexOf('ERR_UNKNOWN_FILE_EXTENSION') !== -1); -})); diff --git a/test/es-module/test-esm-non-js.mjs b/test/es-module/test-esm-non-js.mjs new file mode 100644 index 00000000000000..749cd0b6132086 --- /dev/null +++ b/test/es-module/test-esm-non-js.mjs @@ -0,0 +1,23 @@ +import { mustCall } from '../common/index.mjs'; +import { fileURL } from '../common/fixtures.mjs'; +import { match, strictEqual } from 'assert'; +import { spawn } from 'child_process'; +import { execPath } from 'process'; + +// Verify non-js extensions fail for ESM +const child = spawn(execPath, [ + '--input-type=module', + '--eval', + `import ${JSON.stringify(fileURL('es-modules', 'file.unknown'))}`, +]); + +let stderr = ''; +child.stderr.setEncoding('utf8'); +child.stderr.on('data', (data) => { + stderr += data; +}); +child.on('close', mustCall((code, signal) => { + strictEqual(code, 1); + strictEqual(signal, null); + match(stderr, /ERR_UNKNOWN_FILE_EXTENSION/); +})); From 4cc8af20ccac7f7dd13e4908f8fe6844f1058ec7 Mon Sep 17 00:00:00 2001 From: Geoffrey Booth Date: Fri, 28 Jan 2022 16:35:58 -0800 Subject: [PATCH 2/5] fixup! module: unflag esm json modules --- lib/internal/modules/esm/translators.js | 1 + test/es-module/test-esm-json.mjs | 24 +++++++++++++++++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/lib/internal/modules/esm/translators.js b/lib/internal/modules/esm/translators.js index 04c3b64a082579..297ac95e662670 100644 --- a/lib/internal/modules/esm/translators.js +++ b/lib/internal/modules/esm/translators.js @@ -259,6 +259,7 @@ translators.set('builtin', async function builtinStrategy(url) { // Strategy for loading a JSON file translators.set('json', async function jsonStrategy(url, source) { + emitExperimentalWarning('Importing JSON modules'); assertBufferSource(source, true, 'load'); debug(`Loading JSONModule ${url}`); const pathname = StringPrototypeStartsWith(url, 'file:') ? diff --git a/test/es-module/test-esm-json.mjs b/test/es-module/test-esm-json.mjs index 72b3426bdbb601..e19762c6e61a71 100644 --- a/test/es-module/test-esm-json.mjs +++ b/test/es-module/test-esm-json.mjs @@ -1,6 +1,28 @@ import '../common/index.mjs'; -import { strictEqual } from 'assert'; +import { path } from '../common/fixtures.mjs'; +import { strictEqual, ok } from 'assert'; +import { spawn } from 'child_process'; import secret from '../fixtures/experimental.json' assert { type: 'json' }; strictEqual(secret.ofLife, 42); + +// Test warning message +const child = spawn(process.execPath, [ + '--experimental-json-modules', + path('/es-modules/json-modules.mjs'), +]); + +let stderr = ''; +child.stderr.setEncoding('utf8'); +child.stderr.on('data', (data) => { + stderr += data; +}); +child.on('close', (code, signal) => { + strictEqual(code, 0); + strictEqual(signal, null); + ok(stderr.toString().includes( + 'ExperimentalWarning: Importing JSON modules is an experimental feature. ' + + 'This feature could change at any time' + )); +}); From b09ba2c25a053184711844d3fbcd6f0a55040e00 Mon Sep 17 00:00:00 2001 From: Geoffrey Booth Date: Fri, 28 Jan 2022 16:36:47 -0800 Subject: [PATCH 3/5] fixup! module: unflag esm json modules --- doc/api/esm.md | 29 ++++++----------------------- doc/api/packages.md | 3 +-- 2 files changed, 7 insertions(+), 25 deletions(-) diff --git a/doc/api/esm.md b/doc/api/esm.md index a27e407b859dfd..ec1814ef3d567e 100644 --- a/doc/api/esm.md +++ b/doc/api/esm.md @@ -530,35 +530,19 @@ separate cache. > Stability: 1 - Experimental -Currently importing JSON modules are only supported in the `commonjs` mode -and are loaded using the CJS loader. [WHATWG JSON modules specification][] are -still being standardized, and are experimentally supported by including the -additional flag `--experimental-json-modules` when running Node.js. - -When the `--experimental-json-modules` flag is included, both the -`commonjs` and `module` mode use the new experimental JSON -loader. The imported JSON only exposes a `default`. There is no -support for named exports. A cache entry is created in the CommonJS -cache to avoid duplication. The same object is returned in -CommonJS if the JSON module has already been imported from the -same path. - -Assuming an `index.mjs` with +JSON files can be referenced by `import`: ```js import packageConfig from './package.json' assert { type: 'json' }; ``` -The `--experimental-json-modules` flag is needed for the module -to work. - -```bash -node index.mjs # fails -node --experimental-json-modules index.mjs # works -``` - The `assert { type: 'json' }` syntax is mandatory; see [Import Assertions][]. +The imported JSON only exposes a `default`. There is no support for named +exports. A cache entry is created in the CommonJS cache to avoid duplication. +The same object is returned in CommonJS if the JSON module has already been +imported from the same path. + ## Wasm modules @@ -1452,7 +1436,6 @@ success! [Node.js Module Resolution Algorithm]: #resolver-algorithm-specification [Terminology]: #terminology [URL]: https://url.spec.whatwg.org/ -[WHATWG JSON modules specification]: https://html.spec.whatwg.org/#creating-a-json-module-script [`"exports"`]: packages.md#exports [`"type"`]: packages.md#type [`--input-type`]: cli.md#--input-typetype diff --git a/doc/api/packages.md b/doc/api/packages.md index 4638c7cc28d9a2..7e89d37cbd11b8 100644 --- a/doc/api/packages.md +++ b/doc/api/packages.md @@ -117,8 +117,7 @@ There is the ECMAScript module loader: `'./startup/index.js'`) must be fully specified. * It does no extension searching. A file extension must be provided when the specifier is a relative or absolute file URL. -* It can load JSON modules, but an import assertion is required (behind - `--experimental-json-modules` flag). +* It can load JSON modules, but an import assertion is required. * It accepts only `.js`, `.mjs`, and `.cjs` extensions for JavaScript text files. * It can be used to load JavaScript CommonJS modules. Such modules From e79b06cea1652b33a41d96d12201744fa6321f07 Mon Sep 17 00:00:00 2001 From: Geoffrey Booth Date: Sat, 29 Jan 2022 18:25:39 -0800 Subject: [PATCH 4/5] fixup! module: unflag esm json modules --- doc/api/cli.md | 2 +- doc/api/esm.md | 18 +----------------- test/es-module/test-esm-json.mjs | 1 - 3 files changed, 2 insertions(+), 19 deletions(-) diff --git a/doc/api/cli.md b/doc/api/cli.md index 76c122fc16dd0b..be03f2bbaa37f4 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -296,7 +296,7 @@ Enable experimental `import.meta.resolve()` support. added: v12.9.0 --> -Enable experimental JSON support for the ES Module loader. +This option is a no-op. It is kept for compatibility. ### `--experimental-loader=module` diff --git a/doc/api/esm.md b/doc/api/esm.md index ec1814ef3d567e..5d0c99ab34007d 100644 --- a/doc/api/esm.md +++ b/doc/api/esm.md @@ -477,22 +477,6 @@ These CommonJS variables are not available in ES modules. `__filename` and `__dirname` use cases can be replicated via [`import.meta.url`][]. -#### No JSON Module Loading - -JSON imports are still experimental and only supported via the -`--experimental-json-modules` flag. - -Local JSON files can be loaded relative to `import.meta.url` with `fs` directly: - - - -```js -import { readFile } from 'fs/promises'; -const json = JSON.parse(await readFile(new URL('./dat.json', import.meta.url))); -``` - -Alternatively `module.createRequire()` can be used. - #### No Native Module Loading Native modules are not currently supported with ES module imports. @@ -538,7 +522,7 @@ import packageConfig from './package.json' assert { type: 'json' }; The `assert { type: 'json' }` syntax is mandatory; see [Import Assertions][]. -The imported JSON only exposes a `default`. There is no support for named +The imported JSON only exposes a `default` export. There is no support for named exports. A cache entry is created in the CommonJS cache to avoid duplication. The same object is returned in CommonJS if the JSON module has already been imported from the same path. diff --git a/test/es-module/test-esm-json.mjs b/test/es-module/test-esm-json.mjs index e19762c6e61a71..6d55419eedc857 100644 --- a/test/es-module/test-esm-json.mjs +++ b/test/es-module/test-esm-json.mjs @@ -9,7 +9,6 @@ strictEqual(secret.ofLife, 42); // Test warning message const child = spawn(process.execPath, [ - '--experimental-json-modules', path('/es-modules/json-modules.mjs'), ]); From 5a70ab16fddcd7817c5eb828178e1a5f94b17693 Mon Sep 17 00:00:00 2001 From: Geoffrey Booth Date: Mon, 31 Jan 2022 11:35:27 -0800 Subject: [PATCH 5/5] fixup! module: unflag esm json modules --- doc/api/cli.md | 8 -------- 1 file changed, 8 deletions(-) diff --git a/doc/api/cli.md b/doc/api/cli.md index be03f2bbaa37f4..694fa66181ca2a 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -290,14 +290,6 @@ added: Enable experimental `import.meta.resolve()` support. -### `--experimental-json-modules` - - - -This option is a no-op. It is kept for compatibility. - ### `--experimental-loader=module`