Age | Commit message (Collapse) | Author |
|
PR-URL: https://github.com/npm/cli/pull/2456
Credit: @isaacs
Close: #2456
Reviewed-by: @ruyadorno
|
|
Since we now are using pacote/tar in a way that will rely on the default
process umask setting, and we set file/directory modes explicitly
anyway, there's no need to have a default umask setting that calls
process.umask()
As this method is not worker-thread safe, and is deprecated, it's best
for us to stop using it.
Fix: #1103
PR-URL: https://github.com/npm/cli/pull/2444
Credit: @isaacs
Close: #2444
Reviewed-by: @nlf
|
|
PR-URL: https://github.com/npm/cli/pull/2382
Credit: @nlf
Close: #2382
Reviewed-by: @isaacs
|
|
PR-URL: https://github.com/npm/cli/pull/2381
Credit: @XhmikosR
Close: #2381
Reviewed-by: @isaacs
|
|
- Fixes using `--otp` config option in `npm profile enable-2fa`
- Prevents trying to enable 2fa if no user is logged in
- Setting email should not require password
- Add `test/lib/profile.js` tests
- Async/await `lib/profile.js` refactor and more
- Fixes: https://github.com/npm/statusboard/issues/164
PR-URL: https://github.com/npm/cli/pull/2373
Credit: @ruyadorno
Close: #2373
Reviewed-by: @isaacs
|
|
- Removes unnecessary colon when listing 0 users/teams
- Removes unimplemented `npm team edit` placeholder
- Adds `test/lib/team.js` tests
- Fixes: https://github.com/npm/statusboard/issues/176
PR-URL: https://github.com/npm/cli/pull/2314
Credit: @ruyadorno
Close: #2314
Reviewed-by: @isaacs
|
|
- Fixes `npm search --searchexclude=<value>` option
- Tweaks `--searchopt` logic
- Refactor and cleanup `lib/search.js`
- Add `test/lib/search.js` tests
- Fixes: https://github.com/npm/statusboard/issues/171
PR-URL: https://github.com/npm/cli/pull/2325
Credit: @ruyadorno
Close: #2325
Reviewed-by: @isaacs
|
|
PR-URL: https://github.com/npm/cli/pull/2303
Credit: @nlf
Close: #2303
Reviewed-by: @isaacs
|
|
Introduces the set-script command. It accepts two arguments,
the script name and the command
ref: https://github.com/npm/rfcs/blob/latest/accepted/0016-set-script-command.md
PR-URL: https://github.com/npm/cli/pull/2237
Credit: @Yash-Singh1
Close: #2237
Reviewed-by: @ruyadorno
|
|
PR-URL: https://github.com/npm/cli/pull/2240
Credit: @ruyadorno
Close: #2240
Reviewed-by: @darcyclarke
|
|
- Refactored lib/star.js
- Fixes `npm unstar` by adding a lib/unstar.js alias/cmd
- Add tests for lib/star.js and lib/unstar.js
Fixes: https://github.com/npm/statusboard/issues/174
PR-URL: https://github.com/npm/cli/pull/2204
Credit: @ruyadorno
Close: #2204
Reviewed-by: @nlf
|
|
When a file named 'npmrc' is in the root of the npm module that is
currently running, it adds config values that override the defaults (but
not the global or user configs).
This is a way for a system package installer to tell the npm that it
installs to put its globals somewhere other than the default. In order
to keep these configs around when users self-update npm with `npm i -g
npm`, these config values must be "sticky", and ride along into the
newly globally installed npm.
This commit restores this behavior, fixing self-updating npm for Windows
users, and any other systems that may make use of this functionality.
Fixes: #2002
PR-URL: https://github.com/npm/cli/pull/2184
Credit: @isaacs
Close: #2184
Reviewed-by: @ruyadorno
|
|
fix: https://github.com/npm/statusboard/issues/155
PR-URL: https://github.com/npm/cli/pull/2185
Credit: @ruyadorno
Close: #2185
Reviewed-by: @nlf
|
|
Fixes: #2134
Credit: @isaacs
Close: #2156
Reviewed-by: @ruyadorno
|
|
Add legacy `_auth` token to flatOptions in order to support it when
reaching out to registries.
Fixes: #2008
Credit: @ruyadorno
Close: #2153
Reviewed-by: @isaacs
|
|
This adds a flatOptions.flatten() method, which takes an object full of
config keys, and turns it into an options object. This method expects
an object that already inherits from npm's defaults, and is thus
expected to be internal only.
This commit also removes some config keys which were used by npm
dependencies at the start of the v7 beta process, but are no longer:
- all lockfile configs (since we don't use lockfiles any more! for
anything! and good riddance, they're a rats' nest of race conditions)
- cacheMax/cacheMin (we only use preferOffline/offline/online now, so
these are strictly legacy support as input and never shared with deps)
Once this lands in cli, we can remove the publishConfig handling logic
in npm-registry-fetch, as it will be redundant.
|
|
|
|
We show a list of bundled dependencies, there's no need to ALSO show
the individual files in each one.
PR-URL: https://github.com/npm/cli/pull/2050
Credit: @isaacs
Close: #2050
Reviewed-by: @nlf
|
|
We now force the 'packageLock' config to be a boolean true unless either
the 'package-lock' or 'shrinkwrap' configs are boolean false.
|
|
- Fixed npm owner completion
- Refactored lib/owner.js
- Added error codes to lib/owner.js errors
- Added tests for lib/owner.js
PR-URL: https://github.com/npm/cli/pull/2026
Credit: @ruyadorno
Close: #2026
Reviewed-by: @isaacs
|
|
|
|
Updates to ERESOLVE explanation code
|
|
The `init-*` family of config properties should also support
dot-separated aliases defined in a npmrc ini file.
relates to: https://github.com/npm/init-package-json/commit/c0ace81ade25077eb60260dc87ec58875583f81b
|
|
|
|
PR-URL: https://github.com/npm/cli/pull/1892
Credit: @isaacs
Close: #1892
Reviewed-by: @nlf
|
|
PR-URL: https://github.com/npm/cli/pull/1859
Credit: @badeggg
Close: #1859
Reviewed-by: @isaacs
EDIT: changed flatOptions.noproxy to flatOptions.noProxy, since
make-fetch-happen reads it from the camel-cased property.
|
|
npm ls was failing to properly follow symlink targets in order to find
its dependencies to get printed output.
PR-URL: https://github.com/npm/cli/pull/1871
Credit: @ruyadorno
Close: #1871
Reviewed-by: @nlf
|
|
This gets passed down to dependencies as 'timeout', so that the HTTP
request libraries will all get the right value.
Fix: https://github.com/npm/cli/issues/1780
PR-URL: https://github.com/npm/cli/pull/1870
Credit: @isaacs
Close: #1870
Reviewed-by: @nlf
|
|
Using the cli option --depth is currently not resulting in the expected
behavior of filtering depth level when running npm ls <pkg> - that's due
the special behavior of printing all results when using a filter arg.
This commit fixes it by adding support to limiting depth if a config
value is set by the user.
Fixes #1861
PR-URL: https://github.com/npm/cli/pull/1862
Credit: @ruyadorno
Close: #1862
Reviewed-by: @nlf
|
|
The added count on lib/utils/reify-output.js only looks up resulting
keys from arb.diff and does not take into account the fact that some of
these pkgs signaled as diff=ADD might in fact not have been installed,
most common scenario are optional deps that could have failed their
install in a given system or opt-out from configs.
This fixes the counting number by looking up at arb.inventory and
confirming it has the node that has been marked as added on diff result.
Fix: #1813
PR-URL: https://github.com/npm/cli/pull/1858
Credit: @ruyadorno
Close: #1858
Reviewed-by: @nlf
|
|
* Fix EBADPLATFORM error message
Error format evolved out from under message generation's
expectations.
* Fix formatting
|
|
This is the CLI portion of https://github.com/npm/arborist/pull/136
PR-URL: https://github.com/npm/cli/pull/1819
Credit: @isaacs
Close: #1819
Reviewed-by: @ruyadorno
|
|
Being able to npm link a package that is not currently available in the
global space should still be a supported feature, this change puts that
functionality back in place but also improves it by avoiding reify any
package that may already be found in the global directory.
|
|
- Added ELINKGLOBAL error code for when using --global
- Added tests for lib/link.js
- Do not reify, only load globals when linking a pkg to a local prefix
- Fixes: #1777
|
|
PR-URL: https://github.com/npm/cli/pull/1750
Credit: @claudiahdz
Close: #1750
Reviewed-by: @ruyadorno
|
|
Pass a specifier or folder path, and it'll explain what that dependency
is doing there.
PR-URL: https://github.com/npm/cli/pull/1776
Credit: @isaacs
Close: #1776
Reviewed-by: @ruyadorno
|
|
Reduce visual noise, make the more important information more obvious.
|
|
When peerDependencies conflict, Arborist is now providing details of the
nodes and their reasons for inclusion on the Error object, including
whether or not this resolution error could be overridden using the
--force flag.
Print this data out in a minimal way as a warning if we override an
ERESOLVE forcefully. When the ERESOLVE causes the install to fail,
print a somewhat longer message, and save a MUCH longer full report to
the cache folder.
PR-URL: https://github.com/npm/cli/pull/1761
Credit: @isaacs
Close: #1761
Reviewed-by: @darcyclarke, @ruyadorno
|
|
The `flatOptions.scope` option should not default to `projectScope`
since that's causing projects that have a defined `projectScope`
corresponding to configured scoped registries to try and download ALL
packages (including the ones that should be downloaded from the public
registry) to be fetch from that scoped registry url.
fix #1654
PR-URL: https://github.com/npm/cli/pull/1758
Credit: @ruyadorno
Close: #1758
Reviewed-by: @isaacs
|
|
Add unit tests to `lib/utils/error-handler.js`, these are very special
since the module handles some internal state through variables which are
not exposed and binds itself to multiple global `process` events.
Also two minor tweaks/fixes to the original implementation:
- Refactored unused param in `reallyExit()`
- Fixed String.prototype.match group capture usage
PR-URL: https://github.com/npm/cli/pull/1742
Credit: @ruyadorno
Close: #1742
Reviewed-by: @isaacs
|
|
|
|
`npm fund` human output was appending any items that had multiple
funding sources to the current package title as comma-separated names.
This commit fixes the problem by properly selecting the first item of a
each funding element and only using that as its index for printing the
human output tree representation.
PR-URL: https://github.com/npm/cli/pull/1717
Credit: @ruyadorno
Close: #1717
Reviewed-by: @isaacs
|
|
* Also, test this with a mock, so that tests pass in CI.
* test: streamline snapshot on config test
* test: add workaround for node 10's broken promises
* test: make cache dir cross-platform consistent in config test
PR-URL: https://github.com/npm/cli/pull/1719
Credit: @isaacs
Close: #1719
Reviewed-by: @ruyadorno
|
|
Reported by @lumaxis
|
|
PR-URL: https://github.com/npm/cli/pull/1688
Credit: @isaacs
Close: #1688
Reviewed-by: @ruyadorno
|
|
|
|
|
|
PR-URL: https://github.com/npm/cli/pull/1657
Credit: @claudiahdz
Close: #1657
Reviewed-by: @isaacs
|
|
This drops our usage of the update-notifier module, in favor of checking
ourselves, using the modules and UX patterns that npm already has in
place.
- While on a prerelease version, updates are checked for every day,
instead of every week, and always checks for a new beta in the current
release family. Ie, ^7.0.0-beta.2 instead of latest.
- Latest version is suggested if newer than current.
- If current version is newer than latest, then we check again for an
update in the current version family. Ie, ^7.0.0 instead of latest,
if current is 7.0.0 and latest is 6.x.
- Output is printed using log.notice, at the end of all other log
output, so that it's both less visually disruptive, and less likely to
be missed among other warnings and notices.
This has the side effect of requiring that we set npm.flatOptions as
soon as config is loaded, rather than waiting for a command to be run.
Since the cli runs a command immediately after loading anyway, this is
not a relevant change for our purposes, but worth mentioning here.
|
|
The existence of 'install-test' and 'install-clean' make 'npm inst' no longer
de-reference to 'npm install'. Similarly, the existence of 'help-search'
prevents 'hel' from being a shorthand for 'help'.
This adds some artisanally hand-crafted abbreviations for these cases.
Fix: #1617
PR-URL: https://github.com/npm/cli/pull/1622
Credit: @isaacs
Close: #1622
Reviewed-by: @ruyadorno
|