Age | Commit message (Collapse) | Author |
|
This is the first phase of refactoring the internal structure of the npm
commands to set us up for future changes. This iteration changes the
function signature of `exec` for all the commands to be a async (no more
callbacks), and also groups all the commands into their own
subdirectory.
It also removes the Proxy `npm.commands` object, in favor of an
`npm.cmd` and `npm.exec` function that breaks up the two things that
proxy was doing. Namely, getting to the attributes of a given command
(`npm.cmd` now does this), and actually running the command `npm.exec`
does this.
PR-URL: https://github.com/npm/cli/pull/3959
Credit: @wraithgar
Close: #3959
Reviewed-by: @lukekarrys
|
|
Add a script and Makefile rule to build the "Configuration" section for
all command documentation based on the command classes' `params` list.
Also correct several minor problems in the documentation, and add
`params` listings for commands that were lacking them, to match the
existing documentation and/or behavior within the code.
PR-URL: https://github.com/npm/cli/pull/3243
Credit: @isaacs
Close: #3243
Reviewed-by: @wraithgar
|
|
If a bugs url is not provided, but a `mailto` is, then that is used.
PR-URL: https://github.com/npm/cli/pull/3052
Credit: @Yash-Singh1
Close: #3052
Reviewed-by: @wraithgar
|
|
Lots of dead code removed thanks to streamlining of logic.
`npm help` `npm <command>` and `npm help-search` are all now separated
concerns, handling their own use cases. `help` calls `help-search` as a
last resort, but `npm <command>` no longer tries to wind its way through
to `help-search` just to get the basic npm usage displayed.
The `did you mean` output has been expanded. It now always suggests top
level commands, scripts, and bins, and suggests them in the way they
should be called.
PR-URL: https://github.com/npm/cli/pull/2859
Credit: @wraithgar
Close: #2859
Reviewed-by: @ruyadorno
|
|
Small refactor of commands to allow usage to be more programmatically
generated, leading us in the direction of more tighly coupling each
command to the params it accepts.
PR-URL: https://github.com/npm/cli/pull/2821
Credit: @wraithgar
Close: #2821
Reviewed-by: @isaacs
|
|
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
|
|
|
|
|
|
|
|
- remove the now-outdated 'fetch-package-metadata' module.
- refactor the `bugs`, `repo`, and `docs` commands for consistency.
- add unit tests for refactored commands and new util module.
- update `browser` config handling to honor `browser = false` in config
files, along with command line flag. (previously only cli config was
honored.)
- slight improvement to `open-url` output when browser not used.
|
|
PR-URL: https://github.com/npm/npm/pull/20582
Credit: @bcoe
Reviewed-By: @zkat
|
|
Credit: @iarna
Reviewed-By: @zkat
|
|
This also helps by DRYing up our lists of command aliases.
Credit: @watilde
Reviewed-By: @iarna
PR-URL: https://github.com/npm/npm/pull/12485
|
|
This is a huge set of mostly mechanical changes. Going forward, all
changes to the npm source base are expected to comply with `standard`,
and it's been integrated into the test suite to enforce that. There are
a few notes below about specific classes of changes that need to be
handled specially for npm's code base.
standard: "Expected error to be handled."
`standard` only expects errors spelled "err" to be handled.
`npm-registry-mock` never actually invokes its callback with an error,
so in some cases I just changed it to be spelled "er" and called it
good.
standard: "Expected a "break" statement before 'case'."
This behavior is actually on purpose, and I don't feel like rewriting
the affected code right now (or, you know, ever). So I added code
comments disabling the checks in the three applicable changes.
standard: "x is a function."
Rebinding functions created via declarations (as opposed to expressions)
is a no-no?
PR-URL: https://github.com/npm/npm/pull/8668
|
|
put @ inside <@scope>
simplify completion usage
add [@<version>] to edit
remove extraneous from install
|
|
|
|
|
|
|
|
|
|
|
|
Makes a *lot* clearer when the CLI is doing something with auth
implications, by explicitly pass auth to registry client. Moves lookup
of credentials into mapRegistryToURI, which makes the code more
consistent.
|
|
|
|
|
|
|
|
|
|
|
|
If you are in your local module, you might want to visit the repository without
knowing the repo name or typing the name in.
This adds `npm bugs .` and `npm bugs` so that the npm-bugs-command behaves like
`npm install`, `npm docs`, `npm home`, and `npm repo.`
Also fixed the parsing of `./` (instead of `.`).
Closes #4204.
|
|
Fixes #3312
|
|
cc @domenic
|
|
|
|
This feels so good. lib/utils/log.js is the worst kind of
glue code that keeps the npm project from being properly
abstracted into independent pieces.
In the process, also cleaned up a lot of unproductive logging,
and made the npm-debug.log generated on errors be a bit more
easy to read.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|