Skip to content

feat: remove experimental warning from FormData #42807

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Apr 24, 2022
Merged

feat: remove experimental warning from FormData #42807

merged 1 commit into from
Apr 24, 2022

Conversation

meixg
Copy link
Member

@meixg meixg commented Apr 21, 2022

fixes: #42792

Only output experimental warning when calling fetch.
Accessing FormData, Headers, Request, Response will not output a warning.


Is this change need a test? Do we have a way to assert a warning is not output?

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/startup

@nodejs-github-bot nodejs-github-bot added the needs-ci PRs that need a full CI run. label Apr 21, 2022
@nodejs-github-bot
Copy link
Collaborator

@aduh95 aduh95 added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Apr 21, 2022
@nodejs-github-bot
Copy link
Collaborator

@panva panva added the fetch Issues and PRs related to the Fetch API label Apr 21, 2022
@nodejs-github-bot
Copy link
Collaborator

@meixg meixg added the commit-queue Add this label to land a pull request using GitHub Actions. label Apr 24, 2022
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Apr 24, 2022
@nodejs-github-bot nodejs-github-bot merged commit 5ad47a0 into nodejs:master Apr 24, 2022
@nodejs-github-bot
Copy link
Collaborator

Landed in 5ad47a0

@meixg meixg deleted the remove-formdata-warning-meixg branch April 24, 2022 05:35
Copy link
Contributor

@austinkelleher austinkelleher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just reviewed this one and looks good to me! Per @meixg's question in the PR description:

"Is this change need a test? Do we have a way to assert a warning is not output?"

I think we could add a test like this:

// test/parallel/test-fetch-global-non-experimental.mjs

import * as common from '../common/index.mjs';

globalThis.Response;
globalThis.Headers;
globalThis.Request;
globalThis.Response;
globalThis.fetch;

// Only calling the global `fetch` function should result in an 
// `ExperimentalWarning` being emitted.
process.on('warning', common.mustCall(0));

I'm happy to open a PR to contribute the test if we think having it is valuable! Thoughts?

xtx1130 pushed a commit to xtx1130/node that referenced this pull request Apr 25, 2022
fixes: nodejs#42792

PR-URL: nodejs#42807
Fixes: nodejs#42792
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Beth Griggs <bgriggs@redhat.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Akhil Marsonya <akhil.marsonya27@gmail.com>
targos pushed a commit that referenced this pull request Apr 28, 2022
fixes: #42792

PR-URL: #42807
Fixes: #42792
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Beth Griggs <bgriggs@redhat.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Akhil Marsonya <akhil.marsonya27@gmail.com>
@targos targos mentioned this pull request May 2, 2022
@juanarbol
Copy link
Member

This depends on #41811 which is not landed in v16.x

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. fetch Issues and PRs related to the Fetch API needs-ci PRs that need a full CI run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Accessing FormData (without using it) emits experimental warning