Skip to content

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

Description

@SimenB

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.

Activity

  1. targos commented on Apr 20, 2022

    @targos
    Member

    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).

  2. targos commented on Apr 20, 2022

    @targos
    Member

    @nodejs/undici

  3. aduh95 commented on Apr 20, 2022

    @aduh95
    Contributor

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

  4. mcollina commented on Apr 20, 2022

    @mcollina
    SponsorMember

    Let's remove the experimental warning from FormData.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions