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
|
|
Adds a new config item that includes the workspace root. This also changes
--workspaces to a trinary, so that setting it to false will explicitly exclude
workspaces altogether.
PR-URL: https://github.com/npm/cli/pull/3890
Credit: @fritzy
Close: #3890
Reviewed-by: @wraithgar
|
|
This reverts commit f17dfa0ced7d8df9bb7baf378bb20d33175c8e8b.
|
|
Adds a new config item that includes the workspace root when running
non-arborist commands (i.e. repo, version, publish). Arborist will need
to be udpated to look for this flag to change its behavior to include
the workspace root for its functions.
This also changes --workspaces to a trinary, so that setting it to false
will explicitly exclude workspaces altogether. This is also going to
require an arborist change so that it ignores workspaces altogether.
Co-author: @fritzy
PR-URL: https://github.com/npm/cli/pull/3816
Credit: @isaacs
Close: #3816
Reviewed-by: @wraithgar
|
|
The npm/cli form of https://github.com/npm/arborist/pull/324
Required adding options support to package used for this.
PR-URL: https://github.com/npm/cli/pull/3809
Credit: @isaacs
Close: #3809
Reviewed-by: @wraithgar
|
|
closes: https://github.com/npm/cli/issues/2556
xref: https://github.com/npm/cli/pull/1750
The xref'ed PR apparently dropped this behavior
without any explanation.
PR-URL: https://github.com/npm/cli/pull/3799
Credit: @gfyoung
Close: #3799
Reviewed-by: @wraithgar
|
|
|
|
Also includes a preliminary refactor to consolidate workspace logic now
that every command that supports workspaces has it implemented.
PR-URL: https://github.com/npm/cli/pull/3417
Credit: @wraithgar
Close: #3417
Reviewed-by: @ruyadorno
|
|
- Add listing outdated direct deps of a workspace in `npm outdated`
- Add ability to filter the results of `npm outdated` using `-w` config
- Added tests and docs
Fixes: https://github.com/npm/statusboard/issues/303
PR-URL: https://github.com/npm/cli/pull/3260
Credit: @ruyadorno
Close: #3260
Reviewed-by: @isaacs
|
|
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
|
|
The mocked npm now uses all config defaults, ensuring we don't have bugs
from the disconnect between our currently heavily mocked tests and
reality. Eventually the npm mock will be closer to reality, this moves
the needle.
PR-URL: https://github.com/npm/cli/pull/3211
Credit: @wraithgar
Close: #3211
Reviewed-by: @ruyadorno
|
|
This adds the 'en' locale to all instances of String.localeCompare
within the CLI codebase.
Tests added for the cases where we're sorting arbitrary user-generated
data. The tests rely on the fact that 'ch' sorts after 'd' in the
`'sk'` locale, but ahead of `'d'` in the `'en'` locale. To ensure that
this is the default behavior if no locale is specified, `LC_ALL=sk` is
set in the test environment.
Other instances of `localeCompare` sort data that the cli controls, so
no tests were added.
Re: https://github.com/npm/cli/issues/2829
PR-URL: https://github.com/npm/cli/pull/3203
Credit: @isaacs
Close: #3203
Reviewed-by: @ruyadorno
|
|
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
|
|
Iterative change moving us towards a more unified config.
No longer pulling config from flatOptions where we don't have to.
PR-URL: https://github.com/npm/cli/pull/2892
Credit: @wraithgar
Close: #2892
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
|
|
All output that anything wants to make now goes through
`npm.output()`. This is an incremental change getting us
closer to where we want to be with testing.
PR-URL: https://github.com/npm/cli/pull/2795
Credit: @wraithgar
Close: #2795
Reviewed-by: @ruyadorno, @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
|
|
PR-URL: https://github.com/npm/cli/pull/2587
Credit: @nlf
Close: #2587
Reviewed-by: @ruyadorno
|
|
PR-URL: https://github.com/npm/cli/pull/2361
Credit: @Edu93Jer
Close: #2361
Reviewed-by: @isaacs
EDIT(@isaacs): amended to match some of the fixes to our current style
conventions
|
|
We have a linter.
yolo
|
|
|
|
PR-URL: https://github.com/npm/cli/pull/1892
Credit: @isaacs
Close: #1892
Reviewed-by: @nlf
|
|
This commit fixes a problem in which npm outdated was breaking when
trying to read an invalid semver range spec defined for a given
installed dep by performing the `npm-package-arg` parsing within a
try/catch block instead of expecting to read properties from the
returned instance.
Also, adds the missing test for that specific line of code.
Fixes #1703
PR-URL: https://github.com/npm/cli/pull/1857
Credit: @ruyadorno
Close: #1857
Reviewed-by: @nlf
|
|
|
|
PR-URL: https://github.com/npm/cli/pull/1750
Credit: @claudiahdz
Close: #1750
Reviewed-by: @ruyadorno
|
|
|
|
PR-URL: https://github.com/npm/cli/pull/1543
Credit: @isaacs
Close: #1543
Reviewed-by: @ruyadorno
|
|
|
|
PR-URL: https://github.com/npm/cli/pull/1495
Credit: @isaacs
Close: #1495
Reviewed-by: @ruyadorno
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Restores ability to update packages using `--depth` as suggested by `npm audit`.
i.e `npm update eslint-utils --depth 2`.
PR-URL: https://github.com/npm/cli/pull/239
Credit: @G-Rath
Close: #239
Reviewed-by: @claudiahdz
|
|
PR-URL: https://github.com/npm/cli/pull/234
Credit: @claudiahdz
Close: #234
Reviewed-by: @isaacs
|
|
Close: https://github.com/npm/cli/pull/176
EDIT: Added test, do not set exitStatus to 1 if we're just printing an
empty list as JSON. -- @isaacs
|
|
Add a special case for 'remote' deps (tarballs). Before
b7b54f2d18e2d8d65ec67c850b21ae9f01c60e7e the package names were possibly
just looked up in the registry instead.
See https://npm.community/t/6187
Close: https://github.com/npm/cli/pull/180
|
|
PR-URL: https://github.com/npm/cli/pull/173
Fixes: https://npm.community/t/npm-outdated-throw-an-error-cannot-read-property-length-of-undefined/5929
Credit: @zkat
Reviewed-By: @aeschright
|
|
PR-URL: https://github.com/npm/cli/pull/3
Credit: @zkat
Reviewed-By: @aeschright
|
|
PR #11584 removed the possibility of updating local
packages (linked with symlinks) with `npm update`.
Reason was that this functionality didn't work in
v3.6.0. However, the system behind local dependencies
has since changed, and I can't reproduce the original
error anymore.
Reverts 59e5056a2129cb2951f4ff3b657ada20657f01a7
Fixes: https://npm.community/t/1725?u=larsgw
PR-URL: https://github.com/npm/cli/pull/73
Credit: @larsgw
Reviewed-By: @iarna
Reviewed-By: @zkat
|
|
PR-URL: https://github.com/npm/cli/pull/124
Credit: @anchnk
Reviewed-By: @aeschright
|
|
|
|
* feat(cli, outdated): Adds 'Homepage' to outdated --long output.
- `package.json`'s `homepage` property is displayed when using the `--long` option for `npm outdated`
* test: npm outdated --long
- Adds `homepage` to `--parseable` output.
- Updates `npm outdated --long` test to include `homepage` in expected output.
- Adds `homepage` to `npm-outdated` documentation.
* fix: javascript standard style updates
PR-URL: https://github.com/npm/cli/pull/81
Credit: @jbottigliero
Reviewed-By: @zkat
|
|
|
|
|