Skip to content

How to prevent ExperimentalWarning on queueMicrotask feature detection in library code? #25592

@zloirock

Description

@zloirock

core-js@3 contains queueMicrotask polyfill.

queueMicrotask added to Node.js 11 as an experimental feature.

On getting queueMicrotask global property on Node.js 11, emitted an ExperimentalWarning. Without a special handler, this warning pollutes the global output.

Even this method not used, core-js detect it by getting this property. So even import of core-js@3 pollutes the global output by this warning.

core-js is a quite popular library, so after updating to stabe core-js@3, pollution of the global output will cause too many problems.

Any ideas what should I do for preventing this problem? process.on('warning', ..)? But it does not look like a solution for a library.

Metadata

Metadata

Assignees

No one assigned

    Labels

    experimentalIssues and PRs related to experimental features.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions