module: only emit require(esm) warning under --trace-require-module#56194
module: only emit require(esm) warning under --trace-require-module#56194joyeecheung wants to merge 2 commits into
Conversation
|
Review requested:
|
require(esm) is relatively stable now and the experimental warning has run its course - it's now more troublesome than useful. This patch changes it to no longer emit a warning unless `--trace-require-module` is explicitly used. The flag supports two modes: - `--trace-require-module=all`: emit warnings for all usages - `--trace-require-module=no-node-modules`: emit warnings for usages that do not come from a `node_modules` folder.
f64b4b4 to
4dde51d
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #56194 +/- ##
==========================================
+ Coverage 87.99% 88.49% +0.50%
==========================================
Files 656 656
Lines 188959 189271 +312
Branches 35979 36346 +367
==========================================
+ Hits 166267 167496 +1229
+ Misses 15867 14973 -894
+ Partials 6825 6802 -23
|
|
I don't know if it's necessary since we aren't changing the stability index (I was thinking about changing it and then realized that it was already release candidate), but anyway cc @nodejs/tsc for awareness |
|
The
notable-change
Please suggest a text for the release notes if you'd like to include a more detailed summary, then proceed to update the PR description with the text or a link to the notable change suggested text comment. Otherwise, the commit will be placed in the Other Notable Changes section. |
mcollina
left a comment
There was a problem hiding this comment.
lgtm
The warning actually broke one of my tests in v22 :).
|
backport in #56927 |
require(esm) is relatively stable now and the experimental warning has run its course - it's now more troublesome than useful. This patch changes it to no longer emit a warning unless
--trace-require-moduleis explicitly used. The flag supports two modes:--trace-require-module=all: emit warnings for all usages--trace-require-module=no-node-modules: emit warnings for usages that do not come from anode_modulesfolder.Fixes: #55417
Refs: #55085 (comment)