Age | Commit message (Collapse) | Author |
|
Instead of files randomly requiring the npm singleton,
we pass it where it needs to go so that tests don't need
to do so much require mocking everywhere
PR-URL: https://github.com/npm/cli/pull/2772
Credit: @wraithgar
Close: #2772
Reviewed-by: @ruyadorno
|
|
We also removed the "none" script because we handle a missing
script just fine. There is no need to put an empty one in
PR-URL: https://github.com/npm/cli/pull/2759
Credit: @wraithgar
Close: #2759
Reviewed-by: @nlf
|
|
We have a lot of tests that were not handling errors in callbacks, not
defining variables, defining variables that weren't used, and just
generally not formatted like the rest of npm.
Hazard of moving fast. Thankfully, machines can help.
|
|
When a file named 'npmrc' is in the root of the npm module that is
currently running, it adds config values that override the defaults (but
not the global or user configs).
This is a way for a system package installer to tell the npm that it
installs to put its globals somewhere other than the default. In order
to keep these configs around when users self-update npm with `npm i -g
npm`, these config values must be "sticky", and ride along into the
newly globally installed npm.
This commit restores this behavior, fixing self-updating npm for Windows
users, and any other systems that may make use of this functionality.
Fixes: #2002
PR-URL: https://github.com/npm/cli/pull/2184
Credit: @isaacs
Close: #2184
Reviewed-by: @ruyadorno
|
|
If we're running the 'audit' command, then a failed endpoint means that
the command failed. Error out in that case.
Otherwise, if it's a quick audit as part of another command, just return
a value to indicate that we should not print audit info.
This avoids showing '0 vulnerabilities found', which, while amusingly
technically correct, is misleading and not very helpful.
Fix: #1951
Credit: @isaacs
Close: #1956
Reviewed-by: @darcyclarke
|
|
PR-URL: https://github.com/npm/cli/pull/1672
Credit: @claudiahdz
Close: #1672
Reviewed-by: @isaacs
|