From d847c3201db550830f1b90fdc4e0e060e1ce88da Mon Sep 17 00:00:00 2001 From: Marco Ippolito Date: Tue, 24 Dec 2024 16:01:36 +0100 Subject: [PATCH] module: unflag --experimental-strip-types --- benchmark/ts/strip-typescript.js | 2 +- doc/api/cli.md | 42 ++++++++++--------- doc/api/process.md | 5 ++- doc/api/test.md | 6 +-- doc/api/typescript.md | 7 +++- doc/node.1 | 6 +-- src/node_options.cc | 3 +- src/node_options.h | 2 +- test/es-module/test-esm-loader-entry-url.mjs | 2 +- test/es-module/test-esm-resolve-type.mjs | 2 +- test/es-module/test-typescript-commonjs.mjs | 13 ------ test/es-module/test-typescript-eval.mjs | 19 --------- test/es-module/test-typescript-module.mjs | 9 ---- test/es-module/test-typescript.mjs | 35 +++------------- test/fixtures/eval/eval_messages.snapshot | 10 ++++- .../module-hooks/test-module-hooks-preload.js | 2 - ...load-import-inline-typescript-override.mjs | 2 +- ...load-require-inline-typescript-override.js | 2 +- test/parallel/test-inspector-strip-types.js | 2 +- test/parallel/test-runner-cli.js | 1 + ...test-runner-coverage-default-exclusion.mjs | 5 ++- .../test-runner-coverage-source-map.js | 1 + 22 files changed, 64 insertions(+), 114 deletions(-) diff --git a/benchmark/ts/strip-typescript.js b/benchmark/ts/strip-typescript.js index 7a7155c568b613..29c81f5a750bae 100644 --- a/benchmark/ts/strip-typescript.js +++ b/benchmark/ts/strip-typescript.js @@ -12,7 +12,7 @@ const bench = common.createBenchmark(main, { filepath: [ts, js], n: [1e4], }, { - flags: ['--experimental-strip-types', '--disable-warning=ExperimentalWarning'], + flags: ['--disable-warning=ExperimentalWarning'], }); async function main({ n, filepath }) { diff --git a/doc/api/cli.md b/doc/api/cli.md index 3e61b248b94fd9..87eda0deb66b46 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -780,7 +780,7 @@ Any query parameter or hash in the URL will be accessible via [`import.meta.url` ```bash node --entry-url 'file:///path/to/file.js?queryparams=work#and-hashes-too' -node --entry-url --experimental-strip-types 'file.ts?query#hash' +node --entry-url 'file.ts?query#hash' node --entry-url 'data:text/javascript,console.log("Hello")' ``` @@ -880,8 +880,8 @@ On Windows, using `cmd.exe` a single quote will not work correctly because it only recognizes double `"` for quoting. In Powershell or Git bash, both `'` and `"` are usable. -It is possible to run code containing inline types by passing -[`--experimental-strip-types`][]. +It is possible to run code containing inline types unless the +[`--no-experimental-strip-types`][] flag is provided. ### `--experimental-addon-modules` @@ -1008,17 +1008,6 @@ added: Use this flag to enable [ShadowRealm][] support. -### `--experimental-strip-types` - - - -> Stability: 1.1 - Active development - -Enable experimental type-stripping for TypeScript files. -For more information, see the [TypeScript type-stripping][] documentation. - ### `--experimental-test-coverage` + +> Stability: 1.1 - Active development + +Disable experimental type-stripping for TypeScript files. +For more information, see the [TypeScript type-stripping][] documentation. + ### `--no-experimental-websocket`