Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Accessing FormData (without using it) emits experimental warning #42792

Closed
SimenB opened this issue Apr 20, 2022 · 4 comments · Fixed by #42807
Closed

Accessing FormData (without using it) emits experimental warning #42792

SimenB opened this issue Apr 20, 2022 · 4 comments · Fixed by #42807

Comments

@SimenB
Copy link
Member

SimenB commented Apr 20, 2022

Version

v18.0.0

Platform

Darwin Simens-MacBook-Pro.local 21.4.0 Darwin Kernel Version 21.4.0: Fri Mar 18 00:45:05 PDT 2022; root:xnu-8020.101.4~15/RELEASE_X86_64 x86_64

Subsystem

No response

What steps will reproduce the bug?

node -e FormData

How often does it reproduce? Is there a required condition?

Always.

What is the expected behavior?

No experimental warning should be emitted by simple accessing the variable without using it, similar to accessing fetch itself.

What do you see instead?

(node:97789) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)

Additional information

Like typeof fetch not emitting any warning, typeof FormData shouldn't. Using it should emit, but not simply accessing the variable.

@targos
Copy link
Member

targos commented Apr 20, 2022

This is tricky to do, because the classes are defined in the undici dependency (where there is no experimental warning), so we would have to make wrapper classes that emit in the constructor, but I can't find a good way to do that without loading undici (and that has side-effects that breaks some of our tests).

@targos
Copy link
Member

targos commented Apr 20, 2022

@nodejs/undici

@aduh95
Copy link
Contributor

aduh95 commented Apr 20, 2022

We could consider removing the runtime warning for FormData altogether (but keep the experimental status in the docs).

@mcollina
Copy link
Member

Let's remove the experimental warning from FormData.

nodejs-github-bot pushed a commit that referenced this issue Apr 24, 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>
xtx1130 pushed a commit to xtx1130/node that referenced this issue 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 issue 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants