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 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.
|
|
This should probably be done in libnpmpack. Can be removed
from here when it is.
|
|
Also, pass the options to `libnpmpack`, or else we end up getting
invalid integrity values for remote tarballs for some reason.
This fixes CITGM with npm v7.
|
|
Still pending test coverage for most of these, but wanted to give them a
clean sweep to get the "load-all-commands" tests passing.
The following changes are in here:
- All commands now have a `completion()` method and a usage string that
uses the same `usage` util consistently.
- The `silent` argument to many commands has been removed.
- All commands use the `cmd = ${cmd}(args).then(() => cb()).catch(cb)`
pattern consistently.
Full test coverage for all commands is still lacking, and will have to
be done prior to the GA v7 release.
|
|
PR-URL: https://github.com/npm/cli/pull/1563
Credit: @claudiahdz
Close: #1563
Reviewed-by: @ruyadorno
|
|
|