Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A mix of refactoring that fell out from the new display changes and some additional behavior.
This PR is separated into commits that are smaller logical chunks of work. I'll call out the most important changes here:
CLI
lib/cli/
dir for files that are CLI specific. This should have more files added to it in the future as we separate CLI behavior fromnew Npm()
behavior.update-notifier
,nonDashArgs
, andgraceful-fs
exit-handler
such as logging about the log file error and timing file. These required getting a bunch of state from npm that can now be kept internalnpm.load()
has the ability to exit early, this is only used fornpm --version
right now but this speeds up the command from having to create logfiles and caches it will never useFile structure
lib/utils/
completely flat and moved somelib/workspaces
intolib/utils/
base-command
tobase-cmd
to match other commandsDisplay
proc-log.META
for forcing logs and flushing outputsilent
. This uses a hack to hide spawn banner output to match previous behavior nowLog file
--timing
is set