-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Warn on unknown configs #8071
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
Warn on unknown configs #8071
Conversation
It is not a valid cli flag, single-hyphen flags should all be single-character. Eventually `-ws` will need to go away so will at least stop suggesting it now.
19634b2
to
7cb1b6f
Compare
7cb1b6f
to
8e6db87
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Can there be a config to silence these warnings? |
No there will not. This is an important warning that npm is doing something unexpected. The only place this will likely remain a permanent warning and not an eventual exception is |
I agree that anything in npmrc or cli flags is npm's sole purview, and warnings make sense - but things in package.json aren't and they often won't. |
pr #8071 originally had this but that appears to have gotten lost along the way.
PR #8071 originally had this but that appears to have gotten lost along the way.
refs https://jsw.ibm.com/browse/INSTA-36236 - no longer supported: npm/cli#8071
refs https://jsw.ibm.com/browse/INSTA-36236 - no longer supported: npm/cli#8071
refs https://jsw.ibm.com/browse/INSTA-36236 - using custom npm configs is longer supported: npm/cli#8071 - removed $npm_config_watch
We 💜 breaking changes (no) As I understand, I will no longer be able to put something like
into my @wraithgar can we at least make this warning not just say "we'll drop it" but SUGGEST AN ALTERNATIVE for envs in .npmrc file? Setting envs via Thanks. |
@Tayvon @wraithgar guys with this update you'll break some existing packages. In prev
...which would set I used this to install process.env[`npm_config_ANY_ENV_VAR`]; How to do it now with this new update? I've tried reading Setting envs manually is not an option, as I want people to just |
This PR will:
npm config
command into@npmcli/config
for reuse.nopt
to8.1.0
which has the new features needed to implement these new warnings for cli flags.