Age | Commit message (Collapse) | Author |
|
This brings us in line with the rest of the linting rules we are wanting
to use on the npm cli repos.
There were several hundred over-length lines and instead of editing them
all by hand I piped the failing file through `prettier` and back through
`eslint` just to save some time and energy. This means there may be
some quirks in the linting those files have, but we can fix those if we
see them and they bother us.
Other than that there were about 50 lines that are legitimately
over-length, all are now explicitly overridden. Many are tests that
could be snapshots.
PR-URL: https://github.com/npm/cli/pull/3995
Credit: @wraithgar
Close: #3995
Reviewed-by: @lukekarrys
|
|
As all CLI input is considered to be string, eg. a
"npm install --lockfile-version 3" would fail with the error messages:
```
npm WARN invalid config lockfile-version="3" set in command line options
npm WARN invalid config Must be one of: null, 1, 2, 3
```
Until we have a config system that supports setting type and possible values
of configs, we have to specify all string and number values for the
`lockfile-version`, but we coerce all values to numbers in the flattener.
Co-authored-by: @voxpelli
Co-authored-by: @isaacs
PR-URL: https://github.com/npm/cli/pull/3949
Credit: @lukekarrys
Close: #3949
Reviewed-by: @isaacs
|
|
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
|
|
PR-URL: https://github.com/npm/cli/pull/3878
Credit: @XhmikosR
Close: #3878
Reviewed-by: @wraithgar
|
|
Depends on @npmcli/arborist@4.0.0
Re: https://github.com/npm/rfcs/pull/434
PR-URL: https://github.com/npm/cli/pull/3880
Credit: @isaacs
Close: #3880
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
|
|
PR-URL: https://github.com/npm/cli/pull/3699
Credit: @behnammodi
Close: #3699
Reviewed-by: @wraithgar
|
|
PR-URL: https://github.com/npm/cli/pull/3805
Credit: @ethomson
Close: #3805
Reviewed-by: @lukekarrys
|
|
This behavior has been present in npm for a while, but I haven't found
where it's documented. This is my attempt at documenting the behavior
based on my understanding of it. I think a SME should contribute to this
so the documentation is correct.
npm/feedback#544
npm/cli#3783
https://github.com/npm/arborist/blob/478871bf0a44a8ec516b9057585b8707e60b0349/lib/arborist/reify.js#L687-L693
PR-URL: https://github.com/npm/cli/pull/3784
Credit: @everett1992
Close: #3784
Reviewed-by: @wraithgar
|
|
See npm/documentation#36
PR-URL: https://github.com/npm/cli/pull/3759
Credit: @nategreen
Close: #3759
Reviewed-by: @wraithgar
|
|
PR-URL: https://github.com/npm/cli/pull/3715
Credit: @Matsuuu
Close: #3715
Reviewed-by: @wraithgar
|
|
PR-URL: https://github.com/npm/cli/pull/3690
Credit: @tripu
Close: #3690
Reviewed-by: @wraithgar
|
|
PR-URL: https://github.com/npm/cli/pull/3681
Credit: @fritzy
Close: #3681
Reviewed-by: @wraithgar
|
|
PR-URL: https://github.com/npm/cli/pull/3630
Credit: @austincho
Close: #3630
Reviewed-by: @wraithgar
EDIT(@isaacs): rebased and edited to put config documentation in the
correct location.
|
|
This should prevent the kind of thing we've seen where people edit the
generated docs, as in #3654 and #3630, and provide them with a helpful
pointer so they put the config documentation changes in the right place.
|
|
The content in this portion of the docs is auto-generated.
PR-URL: https://github.com/npm/cli/pull/3654
Credit: @wraithgar
Close: #3654
Reviewed-by: @nlf
|
|
PR-URL: https://github.com/npm/cli/pull/3630
Credit: @austincho
Close: #3630
Reviewed-by: @wraithgar
|
|
PR-URL: https://github.com/npm/cli/pull/3621
Credit: @AkiJoey
Close: #3621
Reviewed-by: @wraithgar
|
|
PR-URL: https://github.com/npm/cli/pull/3523
Credit: @DemiraDimitrova
Close: #3523
Reviewed-by: @wraithgar
|
|
PR-URL: https://github.com/npm/cli/pull/3562
Credit: @wraithgar
Close: #3562
Reviewed-by: @lukekarrys
|
|
|
|
PR-URL: https://github.com/npm/cli/pull/3546
Credit: @cinderblock
Close: #3546
Reviewed-by: @wraithgar
|
|
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
|
|
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
|
|
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
|
|
"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
|
|
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
|
|
The behavior for installing global versions if found has never been part
of npm@7.
PR-URL: https://github.com/npm/cli/pull/3418
Credit: @wraithgar
Close: #3418
Reviewed-by: @lukekarrys
|
|
Added examples of using `npm init` to bootstrap a new workspace and a
section on how to add/manage dependencies to workspaces.
PR-URL: https://github.com/npm/cli/pull/3392
Credit: @ruyadorno
Close: #3392
Reviewed-by: @wraithgar
|
|
Refactored a bit so that we can more easily change the `top` and
`prefix` params that were being used, and are different under the
workspace context.
PR-URL: https://github.com/npm/cli/pull/3368
Credit: @wraithgar
Close: #3368
Reviewed-by: @ruyadorno
|
|
There is code in all of these places we control so it should be linted
PR-URL: https://github.com/npm/cli/pull/3367
Credit: @wraithgar
Close: #3367
Reviewed-by: @isaacs
|
|
Since loglevel is the first place people usually look to find out why
their scripts have no output when they are in the background, this will
help point them to the config that addresses that situation.
PR-URL: https://github.com/npm/cli/pull/3360
Credit: @wraithgar
Close: #3360
Reviewed-by: @isaacs
|
|
Removes documentation for '--scripts-prepend-node-path' as this was removed in npm@7
PR-URL: https://github.com/npm/cli/pull/3353
Credit: @gimli01
Close: #3353
Reviewed-by: @wraithgar
|
|
- Add `./docs` as a workspace
- Reinstate `./docs/package.json` to manage docs deps
- Ignore `docs/content` markdown source folder from published tarball
- Tweaked `make docs` to use `npm run` to run docs build step
- Tweaked "bundle and gitignore" script to ignore symlinks in nm folder
- Removed outdated `package.json` comment
Relates to: https://github.com/npm/statusboard/issues/362
PR-URL: https://github.com/npm/cli/pull/3342
Credit: @ruyadorno
Close: #3342
Reviewed-by: @wraithgar
|
|
PR-URL: https://github.com/npm/cli/pull/3313
Credit: @spencerwilson
Close: #3313
Reviewed-by: @wraithgar
|
|
PR-URL: https://github.com/npm/cli/pull/3312
Credit: @isaacs
Close: #3312
Reviewed-by: @wraithgar
|
|
|
|
PR-URL: https://github.com/npm/cli/pull/3307
Credit: @rethab
Close: #3307
Reviewed-by: @wraithgar
|
|
I think this change was incorrect: https://github.com/npm/cli/pull/2024
The point of this example is that the same script is being used for two different stages (`install` and `post-install`) so it would be a good idea to look at the `npm_lifecycle_event` environment variable inside this script to determine which stage is being run.
PR-URL: https://github.com/npm/cli/pull/3282
Credit: @KevinFCormier
Close: #3282
Reviewed-by: @wraithgar
|
|
- Add listing workspaces deps by default in `npm ls`
- Add ability to filter the result tree by workspace using the -w config
- Added tests and docs
Fixes: https://github.com/npm/statusboard/issues/302
PR-URL: https://github.com/npm/cli/pull/3250
Credit: @ruyadorno
Close: #3250
Reviewed-by: @isaacs
|
|
PR-URL: https://github.com/npm/cli/pull/3217
Credit: @mrmlnc
Close: #3217
Reviewed-by: @isaacs, @wraithgar, @ruyadorno
|