FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

feat: remove experimental warning from FormData by meixg · Pull Request #42807 · nodejs/node · GitHub

/ node Public

feat: remove experimental warning from FormData - #42807

Merged
nodejs-github-bot merged 1 commit into
nodejs:masterfrom
meixg:remove-formdata-warning-meixg
Apr 24, 2022
Merged

feat: remove experimental warning from FormData#42807
nodejs-github-bot merged 1 commit into
nodejs:masterfrom
meixg:remove-formdata-warning-meixg

Conversation

meixg commented Apr 21, 2022

Copy link
Copy Markdown
Member

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?

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/startup

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

Copy link
Copy Markdown
Collaborator

aduh95 added the author ready PRs that have at least one approval, no outstanding review comments, and a CI started. label Apr 21, 2022

Copy link
Copy Markdown
Collaborator

panva added the fetch Issues and PRs related to the Fetch API label Apr 21, 2022

Copy link
Copy Markdown
Collaborator

meixg added the commit-queue Add this label to land a pull request using GitHub Actions. label Apr 24, 2022
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 merged commit 5ad47a0 into nodejs:master Apr 24, 2022

Copy link
Copy Markdown
Collaborator

Landed in 5ad47a0

meixg deleted the remove-formdata-warning-meixg branch April 24, 2022 05:35

austinkelleher left a comment
edited
Loading

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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 mentioned this pull request May 2, 2022

Copy link
Copy Markdown
Member

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

This file contains hidden or 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no outstanding review comments, 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

Back | FazBrowse Home | New Git URL