Could we remove the ESM warning, please?
--no-warnings affects Node.js behavior, so that can't be used
For people who write shell executables there's a bloody extra line being output requiring trickery
ESM is so unexperimental since 190423
$ node --experimental-modules src/fsPromisesUtimes.js
(node:86710) ExperimentalWarning: The ESM module loader is experimental.
esm is still experimental though. the warning will be removed when it isnt.
Currently the PR to unflag at https://github.com/nodejs/node/pull/29866 which we are hoping to land soon would still output this warning whenever loading an ES module or using a custom loader.
Ideally we would have a nicer way to filter these warnings, but unfortunately it seems these will be around for a little while still.
Stability could be early next year, with the warning removal then. Getting the warning message removed sooner could be something worth considering though if enough people want it.
closing as answered
Currently the PR to unflag at #29866 which we are hoping to land soon would still output this warning whenever loading an ES module or using a custom loader.
@guybedford Just curious, what's the reason for that? I imagined that once --experimental-modules
was unflagged, the warning would disappear because ESM imports would be deemed a stable feature.
flag is not there but it's still experimental, which means you should not use it in production yet
(or publish any node module that uses es6 modules that is meant to be used with node)
Question: Is the esm module loader a new feature in nodejs?
UP
Most helpful comment
@guybedford Just curious, what's the reason for that? I imagined that once
--experimental-modules
was unflagged, the warning would disappear because ESM imports would be deemed a stable feature.