Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
lib: enable fetch by default
PR-URL: #41811 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Robert Nagy <ronagy@icloud.com>
- Loading branch information
Showing
with
67 additions
and 38 deletions.
- +9 −9 doc/api/cli.md
- +6 −6 doc/api/globals.md
- +3 −3 doc/node.1
- +37 −8 lib/internal/bootstrap/pre_execution.js
- +2 −1 src/node_options.cc
- +1 −1 src/node_options.h
- +1 −7 test/common/index.js
- +1 −0 test/parallel/test-fetch-disabled.mjs
- +6 −3 test/parallel/test-fetch.mjs
- +1 −0 test/parallel/test-global.js
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @@ -301,13 +301,7 @@ if (global.structuredClone) { | ||
| } | ||
|
|
||
| if (global.fetch) { | ||
| knownGlobals.push(fetch); | ||
| } | ||
| if (hasCrypto && global.crypto) { | ||
| knownGlobals.push(global.crypto); | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @@ -1,3 +1,4 @@ | ||
| // Flags: --no-experimental-fetch | ||
| import '../common/index.mjs'; | ||
|
|
||
| import assert from 'assert'; | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @@ -54,6 +54,7 @@ builtinModules.forEach((moduleName) => { | ||
| 'setInterval', | ||
| 'setTimeout', | ||
| 'structuredClone', | ||
| 'fetch', | ||
| ]; | ||
| assert.deepStrictEqual(new Set(Object.keys(global)), new Set(expected)); | ||
| } | ||

