Skip to content

Commit 8949145

Browse files
committed
lib: drop fetch experimental warning
Signed-off-by: Matteo Collina <[email protected]>
1 parent 86088ab commit 8949145

File tree

5 files changed

+21
-38
lines changed

5 files changed

+21
-38
lines changed

doc/api/cli.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -385,14 +385,6 @@ added: v11.8.0
385385

386386
Use the specified file as a security policy.
387387

388-
### `--no-experimental-fetch`
389-
390-
<!-- YAML
391-
added: v18.0.0
392-
-->
393-
394-
Disable experimental support for the [Fetch API][].
395-
396388
### `--no-experimental-global-webcrypto`
397389

398390
<!-- YAML
@@ -2267,7 +2259,6 @@ done
22672259
[CustomEvent Web API]: https://dom.spec.whatwg.org/#customevent
22682260
[ECMAScript module]: esm.md#modules-ecmascript-modules
22692261
[ECMAScript module loader]: esm.md#loaders
2270-
[Fetch API]: https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API
22712262
[Modules loaders]: packages.md#modules-loaders
22722263
[Node.js issue tracker]: https://github.com/nodejs/node/issues
22732264
[OSSL_PROVIDER-legacy]: https://www.openssl.org/docs/man3.0/man7/OSSL_PROVIDER-legacy.html

doc/api/globals.md

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -464,12 +464,15 @@ added:
464464
- v17.5.0
465465
- v16.15.0
466466
changes:
467+
- version: REPLACEME
468+
pr-url: REPLACEME
469+
description: removed --experimental-global-fetch.
467470
- version: v18.0.0
468471
pr-url: https://github.com/nodejs/node/pull/41811
469472
description: No longer behind `--experimental-global-fetch` CLI flag.
470473
-->
471474

472-
> Stability: 1 - Experimental. Disable this API with the [`--no-experimental-fetch`][]
475+
> Stability: 1 - Experimental.
473476
> CLI flag.
474477
475478
A browser-compatible implementation of the [`fetch()`][] function.
@@ -481,12 +484,15 @@ added:
481484
- v17.6.0
482485
- v16.15.0
483486
changes:
487+
- version: REPLACEME
488+
pr-url: REPLACEME
489+
description: removed --experimental-global-fetch.
484490
- version: v18.0.0
485491
pr-url: https://github.com/nodejs/node/pull/41811
486492
description: No longer behind `--experimental-global-fetch` CLI flag.
487493
-->
488494

489-
> Stability: 1 - Experimental. Disable this API with the [`--no-experimental-fetch`][]
495+
> Stability: 1 - Experimental.
490496
> CLI flag.
491497
492498
A browser-compatible implementation of {FormData}.
@@ -513,12 +519,15 @@ added:
513519
- v17.5.0
514520
- v16.15.0
515521
changes:
522+
- version: REPLACEME
523+
pr-url: REPLACEME
524+
description: removed --experimental-global-fetch.
516525
- version: v18.0.0
517526
pr-url: https://github.com/nodejs/node/pull/41811
518527
description: No longer behind `--experimental-global-fetch` CLI flag.
519528
-->
520529

521-
> Stability: 1 - Experimental. Disable this API with the [`--no-experimental-fetch`][]
530+
> Stability: 1 - Experimental.
522531
> CLI flag.
523532
524533
A browser-compatible implementation of {Headers}.
@@ -750,13 +759,15 @@ added:
750759
- v17.5.0
751760
- v16.15.0
752761
changes:
762+
- version: REPLACEME
763+
pr-url: REPLACEME
764+
description: removed --experimental-global-fetch.
753765
- version: v18.0.0
754766
pr-url: https://github.com/nodejs/node/pull/41811
755767
description: No longer behind `--experimental-global-fetch` CLI flag.
756768
-->
757769

758-
> Stability: 1 - Experimental. Disable this API with the [`--no-experimental-fetch`][]
759-
> CLI flag.
770+
> Stability: 1 - Experimental.
760771
761772
A browser-compatible implementation of {Response}.
762773

@@ -767,13 +778,15 @@ added:
767778
- v17.5.0
768779
- v16.15.0
769780
changes:
781+
- version: REPLACEME
782+
pr-url: REPLACEME
783+
description: removed --experimental-global-fetch.
770784
- version: v18.0.0
771785
pr-url: https://github.com/nodejs/node/pull/41811
772786
description: No longer behind `--experimental-global-fetch` CLI flag.
773787
-->
774788

775-
> Stability: 1 - Experimental. Disable this API with the [`--no-experimental-fetch`][]
776-
> CLI flag.
789+
> Stability: 1 - Experimental.
777790
778791
A browser-compatible implementation of {Request}.
779792

@@ -971,7 +984,6 @@ added: v18.0.0
971984
A browser-compatible implementation of [`WritableStreamDefaultWriter`][].
972985

973986
[Web Crypto API]: webcrypto.md
974-
[`--no-experimental-fetch`]: cli.md#--no-experimental-fetch
975987
[`--no-experimental-global-customevent`]: cli.md#--no-experimental-global-customevent
976988
[`--no-experimental-global-webcrypto`]: cli.md#--no-experimental-global-webcrypto
977989
[`AbortController`]: https://developer.mozilla.org/en-US/docs/Web/API/AbortController

lib/internal/process/pre_execution.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,7 @@ function setupWarningHandler() {
220220

221221
// https://fetch.spec.whatwg.org/
222222
function setupFetch() {
223-
if (process.config.variables.node_no_browser_globals ||
224-
getOptionValue('--no-experimental-fetch')) {
223+
if (process.config.variables.node_no_browser_globals) {
225224
return;
226225
}
227226

@@ -236,7 +235,6 @@ function setupFetch() {
236235
}
237236

238237
async function fetch(input, init = undefined) {
239-
emitExperimentalWarning('The Fetch API');
240238
return lazyUndici().fetch(input, init);
241239
}
242240

src/node_options.cc

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -351,11 +351,6 @@ EnvironmentOptionsParser::EnvironmentOptionsParser() {
351351
&EnvironmentOptions::enable_source_maps,
352352
kAllowedInEnvvar);
353353
AddOption("--experimental-abortcontroller", "", NoOp{}, kAllowedInEnvvar);
354-
AddOption("--experimental-fetch",
355-
"experimental Fetch API",
356-
&EnvironmentOptions::experimental_fetch,
357-
kAllowedInEnvvar,
358-
true);
359354
AddOption("--experimental-global-customevent",
360355
"expose experimental CustomEvent on the global scope",
361356
&EnvironmentOptions::experimental_global_customevent,

test/parallel/test-fetch-disabled.mjs

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)