-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
Ability to suppress warnings by type #47478
Comments
+1 to this. Since the |
Honestly if the command line explicitly turns on an experimental feature I don't see the point of these warning at all. |
I'm going to try to implement this feature soon. Probably will be a couple weeks because of other responsibilities, but unless someone beats me to it I'll try to get this implemented 🚀 |
Co-authored-by: Geoffrey Booth <[email protected]> Co-authored-by: Antoine du Hamel <[email protected]> PR-URL: #50661 Fixes: #30810 Fixes: #47478 Fixes: #46862 Fixes: #40940 Reviewed-By: Geoffrey Booth <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Vinícius Lourenço Claro Cardoso <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Richard Lau <[email protected]>
Co-authored-by: Geoffrey Booth <[email protected]> Co-authored-by: Antoine du Hamel <[email protected]> PR-URL: #50661 Fixes: #30810 Fixes: #47478 Fixes: #46862 Fixes: #40940 Reviewed-By: Geoffrey Booth <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Vinícius Lourenço Claro Cardoso <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Richard Lau <[email protected]>
Co-authored-by: Geoffrey Booth <[email protected]> Co-authored-by: Antoine du Hamel <[email protected]> PR-URL: nodejs#50661 Fixes: nodejs#30810 Fixes: nodejs#47478 Fixes: nodejs#46862 Fixes: nodejs#40940 Reviewed-By: Geoffrey Booth <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Vinícius Lourenço Claro Cardoso <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Richard Lau <[email protected]>
Co-authored-by: Geoffrey Booth <[email protected]> Co-authored-by: Antoine du Hamel <[email protected]> PR-URL: nodejs#50661 Fixes: nodejs#30810 Fixes: nodejs#47478 Fixes: nodejs#46862 Fixes: nodejs#40940 Reviewed-By: Geoffrey Booth <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Vinícius Lourenço Claro Cardoso <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Richard Lau <[email protected]>
Co-authored-by: Geoffrey Booth <[email protected]> Co-authored-by: Antoine du Hamel <[email protected]> PR-URL: #50661 Fixes: #30810 Fixes: #47478 Fixes: #46862 Fixes: #40940 Reviewed-By: Geoffrey Booth <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Vinícius Lourenço Claro Cardoso <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Richard Lau <[email protected]>
Co-authored-by: Geoffrey Booth <[email protected]> Co-authored-by: Antoine du Hamel <[email protected]> PR-URL: #50661 Fixes: #30810 Fixes: #47478 Fixes: #46862 Fixes: #40940 Reviewed-By: Geoffrey Booth <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Vinícius Lourenço Claro Cardoso <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Richard Lau <[email protected]>
Co-authored-by: Geoffrey Booth <[email protected]> Co-authored-by: Antoine du Hamel <[email protected]> PR-URL: #50661 Fixes: #30810 Fixes: #47478 Fixes: #46862 Fixes: #40940 Reviewed-By: Geoffrey Booth <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Vinícius Lourenço Claro Cardoso <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Richard Lau <[email protected]>
Co-authored-by: Geoffrey Booth <[email protected]> Co-authored-by: Antoine du Hamel <[email protected]> PR-URL: #50661 Fixes: #30810 Fixes: #47478 Fixes: #46862 Fixes: #40940 Reviewed-By: Geoffrey Booth <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Vinícius Lourenço Claro Cardoso <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Richard Lau <[email protected]>
Co-authored-by: Geoffrey Booth <[email protected]> Co-authored-by: Antoine du Hamel <[email protected]> PR-URL: #50661 Fixes: #30810 Fixes: #47478 Fixes: #46862 Fixes: #40940 Reviewed-By: Geoffrey Booth <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Vinícius Lourenço Claro Cardoso <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Richard Lau <[email protected]>
This issue is a followup on #30810 by @coreyfarrell, but specifically only for warnings of a specific type / topic
What is the problem this feature will solve?
After a team has thoughtfully considered using experimental features of their Node.js version (eg.
fetch
) and decided the tradeoffs are acceptable for their project, showing the warnings every time their script runs is often not necessary and can be noisy and confusing, making debugging more arduous.Such a warning, for
fetch
in Node.js v18.12.1 (I'm aware that newer versions do not have this warning anymore):Replit demo: https://replit.com/@karlhorky/Nodejs-18121-fetch-experimental-warning
What is the feature you are proposing to solve the problem?
It would be great to be able to disable warnings by:
1. Specific warning code(s)
2. Topic(s)
Prior art / similar APIs
--no-warnings=<cat1>,<cat2>
flag, which does not have the capabilities listed hereWhat alternatives have you considered?
Workaround
To suppress the experimental
fetch
warnings likeExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time
, this is what we used:package.json
suppress-experimental-fetch-warnings.js
An alternative would be to add official Node.js documentation (in a "recipes" or "examples" section) with idiomatic suppression example code + configuration that users could copy into their projects for every warning type.
The text was updated successfully, but these errors were encountered: