Age | Commit message (Collapse) | Author |
|
PR-URL: https://github.com/npm/cli/pull/3546
Credit: @cinderblock
Close: #3546
Reviewed-by: @wraithgar
|
|
Currently, the name: `npm-robot` is being used in nodejs changelogs as
the atttribution author name for npm-update commits. This makes it so
that entries in the changelog referring to our updates reads like:
```
upgrade npm to 7.18.1 (npm-robot) #39065
```
This change makes it so that the name used in commits is `npm team`,
this way the changelogs entry should read instead as:
```
upgrade npm to 7.18.1 (npm team) #39065
```
Ref: https://nodejs.org/en/blog/release/v16.4.0/
PR-URL: https://github.com/npm/cli/pull/3541
Credit: @ruyadorno
Close: #3541
Reviewed-by: @wraithgar, @targos, @BethGriggs
|
|
Adds ability to using empty bracket syntax as a shortcut to appending
items to the end of an array when using `npm pkg set`, e.g:
npm pkg set keywords[]=foo
Relates to: https://github.com/npm/rfcs/pull/402
PR-URL: https://github.com/npm/cli/pull/3539
Credit: @ruyadorno
Close: #3539
Reviewed-by: @darcyclarke, @ljharb
|
|
PR-URL: https://github.com/npm/cli/pull/3471
Credit: @nlf
Close: #3471
Reviewed-by: @wraithgar
|
|
* nodejs -> Node.js
* javascript -> JavaScript
PR-URL: https://github.com/npm/cli/pull/3542
Credit: @relrelb
Close: #3542
Reviewed-by: @wraithgar
|
|
Two files got into node_modules in a way that changes if you are on a
system that is case sensitive. One was a readme that is now properly
being ignored, the other is a typescript file that is upper case in some
instances
PR-URL: https://github.com/npm/cli/pull/3540
Credit: @wraithgar
Close: #3540
Reviewed-by: @ruyadorno
|
|
* npm mock logger writes to npm.log.record too now
* No more extra process.exit from within the process `exit` event handle.
* No more `exit()` function. Logic is rolled up into the exit handler.
* Now there is only an exit handler and an exit event listener.
`lib/utils/perf.js` was rolled up into npm.js itself.
Unfortunately the tests were written in such a way that any further
refactoring of the exit handler was going to require also rewriting the
tests. Fortunately NOW the tests are interacting with the exit handler
in a way that shouldn't require them to be rewritten AGAIN if we change
the internals of the exit handler.
PR-URL: https://github.com/npm/cli/pull/3482
Credit: @wraithgar
Close: #3482
Reviewed-by: @nlf
|
|
It will be helpful to us when debugging the "exit handler never called"
bugs to know which timings were started but not ended.
Tests moved to use real npm.
PR-URL: https://github.com/npm/cli/pull/3479
Credit: @wraithgar
Close: #3479
Reviewed-by: @ruyadorno
|
|
PR-URL: https://github.com/npm/cli/pull/3495
Credit: @wraithgar
Close: #3495
Reviewed-by: @nlf
|
|
This adds the `audit` config item to the usage output of `npm ci`, and
also tweaks how usage flags are shown for boolean options that do not
default to false. Their usage is shown as the `--no-x` form of the flag
to better communicate that the flag is needed to turn that normally true
option OFF.
The description of `audit` was also updated to reflect that it runs on
many different npm commands, not just install. Because this flag is
included in the usage of those commands it's best to let the assocation
happen there instead of trying to be comprehensive in the description
itself.
A small fix to make `install-ci-test` not try to redefine its own
usage, but to inherit from `ci` was also included.
PR-URL: https://github.com/npm/cli/pull/3497
Credit: @wraithgar
Close: #3497
Reviewed-by: @nlf
|
|
This looks very wrong on white terminals.
npmlog still makes its `notice` logs do this but that will have to be
fixed in the npmlog repo.
PR-URL: https://github.com/npm/cli/pull/3499
Credit: @wraithgar
Close: #3499
Reviewed-by: @nlf
|
|
The flattener worked for everything except for when you are using
`npm config set` itself. Now it works for both.
PR-URL: https://github.com/npm/cli/pull/3508
Credit: @wraithgar
Close: #3508
Reviewed-by: @nlf
|
|
Implements `npm pkg get|set|delete` support. It enables retrieving and
modifying values in a `package.json` file of any given project.
Included are the implementation based on https://github.com/npm/rfcs/pull/402
along with extensive tests and user documentation.
Relates to: https://github.com/npm/rfcs/pull/402
Fixes: https://github.com/npm/statusboard/issues/368
PR-URL: https://github.com/npm/cli/pull/3487
Credit: @ruyadorno
Close: #3487
Reviewed-by: @wraithgar
|
|
Adds an example of when `npm update` would not install the latest
version of a package because other subdependencies in your tree have
tighter restrictions.
PR-URL: https://github.com/npm/cli/pull/3494
Credit: @wraithgar
Close: #3494
Reviewed-by: @lukekarrys
|
|
PR-URL: https://github.com/npm/cli/pull/3498
Credit: @nlf
Close: #3498
Reviewed-by: @wraithgar
|
|
"on install" was ambiguous because it wasn't clear if it meant "when npm
install is ran on this project" or "when this project is installed
somewhere else"
PR-URL: https://github.com/npm/cli/pull/3491
Credit: @wraithgar
Close: #3491
Reviewed-by: @ljharb
|
|
|
|
|
|
|
|
This is not implemented in npm@7
PR-URL: https://github.com/npm/cli/pull/3486
Credit: @wraithgar
Close: #3486
Reviewed-by: @nlf
|
|
This is no longer possible, as per [rfc
21](https://github.com/npm/rfcs/blob/latest/implemented/0021-reduce-lifecycle-script-environment.md)
PR-URL: https://github.com/npm/cli/pull/3485
Credit: @wraithgar
Close: #3485
Reviewed-by: @isaacs
|
|
Closes https://github.com/npm/cli/issues/1623
PR-URL: https://github.com/npm/cli/pull/3483
Credit: @wraithgar
Close: #3483
Reviewed-by: @isaacs
|
|
Setting a deprecation of an empty string is the way to un-deprecate a
package, this was accidentally broken in a past refactoring, and is now
re-added with a test to ensure it is allowed.
PR-URL: https://github.com/npm/cli/pull/3484
Credit: @wraithgar
Close: #3484
Reviewed-by: @isaacs
|
|
There is no need to make the time divided by 1000 because of the time unit 'ms'.
Currently a typical command and response:
PS C:\projects> npm ping
npm notice PING http://registry.npmjs.org/
npm notice PONG 0.752ms
PR-URL: https://github.com/npm/cli/pull/3474
Credit: @aluneed
Close: #3474
Reviewed-by: @wraithgar
|
|
This moves the logging of the exit code to before the logfile is
written, when the exit handler was not called. This will ensure that
the code shows up in the debug logs.
PR-URL: https://github.com/npm/cli/pull/3469
Credit: @wraithgar
Close: #3469
Reviewed-by: @isaacs
|
|
|
|
|
|
|
|
* bin: allow turning off timer display with --timers=false
* fix: do not try to inflate a fresh lockfile
* fix(diff): walk target children if root is a link
* chore: @npmcli/package-json refactor
|
|
this didn't get ran when we added the new package-json package
|
|
This is a papercut that has been driving me crazy when debugging
ERESOLVE issues. It's not particularly useful to just say something is
"invalid", without showing which module's dependency is not being met.
With this commit, it prints all the packages that depend on that
dependency and do not have their required version met.
This does print multiple times for deduped deps that are invalid, but
if we skip the printing of the `invalid` label for deduped deps, we end
up losing information that is only detected later in the tree walk.
PR-URL: https://github.com/npm/cli/pull/3460
Credit: @isaacs
Close: #3460
Reviewed-by: @nlf
|
|
Refactor set-script and init to use @npmcli/package-json as a uniformed
way to update and save package.json files.
Fixes: https://github.com/npm/cli/issues/3234
Relates to: https://github.com/npm/statusboard/issues/368
PR-URL: https://github.com/npm/cli/pull/3455
Credit: @ruyadorno
Close: #3455
Reviewed-by: @nlf
|
|
We had tied the usage of commands to snapshots, but not the full config
descriptions. This will prevent us from landing changes to the config
descriptions that don't also result in rebuilt `.md` help docs.
Closes https://github.com/npm/statusboard/issues/374
PR-URL: https://github.com/npm/cli/pull/3459
Credit: @wraithgar
Close: #3459
Reviewed-by: @nlf
|
|
|
|
Consolidates existing "real npm" mocks, labels it real. We can now
migrate tests to this one at a time instead of trying to make one giant
PR that does it all at once.
PR-URL: https://github.com/npm/cli/pull/3458
Credit: @wraithgar
Close: #3458
Reviewed-by: @nlf
|
|
Tests for cli now use the real npm
PR-URL: https://github.com/npm/cli/pull/3451
Credit: @wraithgar
Close: #3451
Reviewed-by: @nlf
|
|
Cleaned the code up too
PR-URL: https://github.com/npm/cli/pull/3416
Credit: @wraithgar
Close: #3416
Reviewed-by: @nlf
|
|
This adds linting checking to our bin directory, fixes the linting
errors that generated, and cleans up lib/ls.js
to remove unused variables.
PR-URL: https://github.com/npm/cli/pull/3454
Credit: @Ivan12273
Close: #3454
Reviewed-by: @darcyclarke
|
|
PR-URL: https://github.com/npm/cli/pull/3450
Credit: @lumaxis
Close: #3450
Reviewed-by: @wraithgar
|
|
|
|
|
|
|
|
updates copy for package-lock-only and ls
PR-URL: https://github.com/npm/cli/pull/3435
Credit: @wraithgar
Close: #3435
Reviewed-by: @lukekarrys
|
|
|
|
|
|
|
|
|
|
This will allow users to specify a folder in which to save their
tarballs.
PR-URL: https://github.com/npm/cli/pull/3420
Credit: @wraithgar
Close: #3420
Reviewed-by: @ruyadorno
|
|
* use new npxCache option
|
|
This adds a new `npxCache` flatOption for libnpmexec to look for to put
its `_npx` content. libnpmexec will have to be patched to use that
value, and continue to pass `flatOptions.cache` to pacote et al.
The `flatOptions.cache` is the one that is intended to be passed down
into other modules, as it has the `_cacache` suffix attached. What was
happening before was that `npx` was creating a new alternate cache one
directory up from where everything else was, and also putting the `_npx`
content there. It is possible this is the source of at least some of
our "npx doesn't find the right versions" bugs.
PR-URL: https://github.com/npm/cli/pull/3430
Credit: @wraithgar
Close: #3430
Reviewed-by: @ruyadorno
|