Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatteo Collina <hello@matteocollina.com>2022-11-05 18:15:07 +0300
committerGitHub <noreply@github.com>2022-11-05 18:15:07 +0300
commit3a81b47bd5ab962ff8ded8cdeb0c63bd71aa40c4 (patch)
treed0a816012fb8a258406904d2def6ab542cb7bbaf
parent2db03a63a87cf042616136c2bcf83494f2c08153 (diff)
lib: drop fetch experimental warning
Signed-off-by: Matteo Collina <hello@matteocollina.com> PR-URL: https://github.com/nodejs/node/pull/45287 Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Michaƫl Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
-rw-r--r--lib/internal/process/pre_execution.js2
-rw-r--r--test/parallel/test-fetch.mjs12
2 files changed, 2 insertions, 12 deletions
diff --git a/lib/internal/process/pre_execution.js b/lib/internal/process/pre_execution.js
index 0680e06f312..5ef59d9d9f3 100644
--- a/lib/internal/process/pre_execution.js
+++ b/lib/internal/process/pre_execution.js
@@ -19,7 +19,6 @@ const {
const { reconnectZeroFillToggle } = require('internal/buffer');
const {
defineOperation,
- emitExperimentalWarning,
exposeInterface,
} = require('internal/util');
@@ -236,7 +235,6 @@ function setupFetch() {
}
async function fetch(input, init = undefined) {
- emitExperimentalWarning('The Fetch API');
return lazyUndici().fetch(input, init);
}
diff --git a/test/parallel/test-fetch.mjs b/test/parallel/test-fetch.mjs
index 2ec4a63e70f..e24a38eb27d 100644
--- a/test/parallel/test-fetch.mjs
+++ b/test/parallel/test-fetch.mjs
@@ -10,17 +10,9 @@ assert.strictEqual(typeof globalThis.Headers, 'function');
assert.strictEqual(typeof globalThis.Request, 'function');
assert.strictEqual(typeof globalThis.Response, 'function');
-common.expectWarning(
- 'ExperimentalWarning',
- 'The Fetch API is an experimental feature. This feature could change at any time'
-);
-
-const server = http.createServer((req, res) => {
- // TODO: Remove this once keep-alive behavior can be disabled from the client
- // side.
- res.setHeader('Keep-Alive', 'timeout=0, max=0');
+const server = http.createServer(common.mustCall((req, res) => {
res.end('Hello world');
-});
+}));
server.listen(0);
await events.once(server, 'listening');
const port = server.address().port;