Age | Commit message (Collapse) | Author |
|
Fixes the proper path location to use when targetting specific
workspaces.
Fixes: https://github.com/npm/cli/issues/3520
Relates to: https://github.com/npm/statusboard/issues/403
|
|
This code wasn't doing anything special, just dereferencing `name` from
a packument. There is no need for this to exist.
Most of the tests were able to handle having this go away, except for
`npm owner` which had to have its tests rewritten to be real, which of
course surfaced bugs along the way of behavior that was incorrectly
being tested. `npm owner` needs some love to clean up its UX, it throws
or returns inconsistently. I did fix it so that if there is no
package.json in cwd it errored as expected instead of throwing `ENOENT`
which is what it did before.
|
|
Throws an usage error if finding an invalid argument in global install.
Fixes: https://github.com/npm/cli/issues/3029
|
|
|
|
It should happen whenever we read a manifest anyways.
Tests were also rewritten to be real.
|
|
Refactor / clean up of the logic around reading installed
packages. Fixes reading packages from mixed sources (one being
from the local installed tree and the other from the registry
using pacote.manifest).
Makes it so that libnpmexec is always reading from the
Arborist actual tree instead of reading `node_modules` from
the file system when retrieving local package data.
Fixes: https://github.com/npm/cli/issues/3668
Relates to: https://github.com/npm/cli/pull/4643
Relates to: https://github.com/npm/cli/issues/4619
Relates to: https://github.com/npm/statusboard/issues/403
|
|
|
|
Found a bug refactoring the tests.
libnpmaccess mutates the response from the server, and the completion
code was not looking for the right value.
|
|
This makes `npm ls` use the same logic as other commands (eg `outdated`)
when parsing config items that filter the output based on package type.
Previously `--development` and `--production` has special semantics when
used with `npm ls` that were inconsistent with the rest of the CLI. To
achieve the same behavior as these deprecated flags use:
- in place of `--development` use `--omit peer --omit prod --omit optional`
- in place of `--production` use `--omit dev --omit peer`
Fixes #4739
|
|
|
|
chalk is already in use elsewhere and does what we need
|
|
cacache appears to not write everything to the cache by the time doctor
is checking permissions. This limits the permissions error to a single
directory that we know exists by the time the checks run.
|
|
They mock real registry calls now
|
|
|
|
|
|
Fixes #4317
|
|
Tests the actual network calls now
|
|
|
|
|
|
|
|
|
|
* Removed dedupe --save documentation and attempted implementation.
* Remove some unneeded otplease mocks from test
`npm dedupe --save` didn't work in a easy to understand way. It would
only update a top level dependency that was duplicated in the tree.
Found this out rewriting the dedupe tests to be real. This is not very
intuitive and it's best if folks use update or install for saving to
package.json.
|
|
|
|
In certain edge cases, the glob could find files that manNumberRegex wouldn't match.
A possible solution would be to try to bring the two closer, but since globs and regexes are different syntaxes, the two will never be exactly the same.
It's always asking for bugs; better to just handle the issue directly.
In addition, when npm is installed globally in a system directory, the
glob can find other manpages with similar names.
For instance "install.1", "init.1", etc. Preferring low-numbered
sections isn't enough in these cases; it's also necessary to prefer
the pages prefixed with "npm-".
|
|
It was only ever used by `npm edit` so it's inline now.
Rewrote `npm edit` tests to be real
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Each command now signals whether or not it is a shellout
|
|
* fix: 100% coverage in tests
* Removed dead code in `lib/utils/usage.js`.
* Removed dead code in `lib/base-command.js`.
* Removed "load-all" test, we currently have 100% coverage and new PRs
without tests will be rejected if they don't add coverage for new
files.
* Removed `check-coverage` script as a separate command.
* Removed separate coverage test in ci.yml.
* Removed `coverage` flag from tap config, the default is already to
enforce 100% coverage.
Removed a tiny bit of dead code resulting from this
* fix: clean up usage output
Removed usage lib, rolled logic into base-command.js
Cleaned up usage output to be less redundant
|
|
This also allows logs-max to be set to 0 to disable log file writing.
Closes #4466
Closes #4206
|
|
The tests for unpublish were mocked so heavily they weren't actually
asserting anything. In rewriting them several bugs were found.
- `write=true` was not being consistenly used when fetching packument
data, it is now.
- The decision on when to load the local package.json file was not
working at all, that has been fixed. If the cwd contains a
package.json whose name matches the package you are uninstalling, the
local package.json will be read and its publishConfig applied to your
request.
- dead code inside the `npm unpublish` path was removed. There is no
need to check if you are unpublishing the last version here, you're
already unpublishing the entire project.
- publishConfig is now being applied through the config flatten method,
not a raw object assignment.
|
|
Adds a minimalistic reify step that updates the installed tree after a
version change within one of the configured workspaces when using any
of the workspaces config options.
It's also possible to use the `--save` config option in order to
auto update semver ranges of dependencies declarations accross dependent
`package.json` files.
Fixes: https://github.com/npm/cli/issues/3403
Relates to: https://github.com/npm/rfcs/issues/556
Relates to: https://github.com/npm/cli/issues/3757
Relates to: https://github.com/npm/cli/issues/4193
|
|
|
|
It is no longer returned from the npm registry
|
|
|
|
|
|
|
|
make tests pass in prefixDir instead of testdir
allow for cache and globalPrefix dirs
|
|
|
|
Closes #4404
Special thanks to @mshima for submitting a similar PR #4439
|
|
|
|
|
|
We missed two commands in the last PR. This should complete the task
|
|
Fixes `npm outdated` to properly parse and display info on aliased
packages.
Fixes: https://github.com/npm/cli/issues/2800
|
|
`npm ci` should never be affected by the `package-lock` config.
Fixes: https://github.com/npm/cli/issues/4185
|