From 8616e9b58b9095f6d654df9ae19a708e90c05899 Mon Sep 17 00:00:00 2001 From: Matteo Collina Date: Sat, 5 Nov 2022 16:15:07 +0100 Subject: [PATCH] lib: drop fetch experimental warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Matteo Collina PR-URL: https://github.com/nodejs/node/pull/45287 Reviewed-By: Moshe Atlow Reviewed-By: Robert Nagy Reviewed-By: Rafael Gonzaga Reviewed-By: Mohammed Keyvanzadeh Reviewed-By: Antoine du Hamel Reviewed-By: Michaƫl Zasso Reviewed-By: Colin Ihrig --- lib/internal/process/pre_execution.js | 2 -- test/parallel/test-fetch.mjs | 12 ++---------- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/lib/internal/process/pre_execution.js b/lib/internal/process/pre_execution.js index 756041e5044083..73ccca1c6c9d4d 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'); @@ -235,7 +234,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 2ec4a63e70f032..e24a38eb27db37 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;