Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-05-19fix: remove dead code from get-identityGar
2022-05-19fix(ci): remove node_modules post-validation (#4913)Gar
The removal of node_modules was happening in a race with the loading of the virtualTree, and before the validation of the package-lock against the package.json. This defers the removal till after all that validation has happened. It also makes the errors thrown usage errors, and refactors the tests to be real.
2022-05-19feat: deprecated set-script, birthday, --global, and --localNathan Fritz
2022-05-09fix: consolidate bugs, docs, repo command logic (#4857)Gar
All three of these commands do the same thing: open a manifest and find a url inside to open it. The finding of that manifest was not very consistent across these three commands. Some work with workspaces while others don't. Some work correctly with `--prefix` while others don't. This PR consolidates these commands so that they all are consistent in how they find the manifest being referenced. The specifics of which url they open are still left to each command. The util that only these three commands were using was consolidated into their base class.
2022-05-09fix: cleanup star/unstar (#4868)Gar
It was querying whoami once for every package you starred/unstarred, and incorrectly trying to determine if you weren't logged in. In fact the function throws a descriptive message if you're not logged in already. The whoami check was also racing with the fetch of the packument for each package you were starring/unstarring meaning you could also get a random 401 for a private package instead of the 'you need to log in' message. unstar was setting an undocumented config item to get the shared code to unstar. The command already has a name attribute that tells us what action we are doing so we can just use that. Finally, the duplicated (and differing) params between the two commands were consolidated.
2022-05-03feat: make npm owner workspace aware (#4835)Gar
2022-04-20feat: add install-links config definitionnlf
2022-04-04fix: remove dedupe --saveGar
* 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.
2022-03-28fix: consolidate command alias codeGar
2022-03-24fix: 100% coverage in tests (#4607)Gar
* 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
2022-03-24feat(version): reify on workspace version change (#4588)Ruy Adorno
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
2022-03-17docs: add foreground-scripts and ignore-scripts to commandsGar
I think this gets them all
2022-03-17fix: add isntall alias to install (#4573)Gar
Without this, the isntall-clean alias is matched and ran
2022-02-17docs: update usage example for npm pkg (#4424)Wassim Chegham
Add example for setting array values Fixes #4320
2022-02-08docs: add --save-bundle to --save usage outputGar
2022-01-20fix: npm update --save (#4223)Ruy Adorno
Previously `npm update` was not respecting the `save` option, it would be impossible for users to use `npm update` and automatically update their `package.json` files. This fixes it by adding extra steps on `Arborist.reify._saveIdealTree` to read direct dependencies of any `package.json` and update them as needed when reifying using the `update` and `save` options. - Uses config.isDefault to set a different value for the `save` config for both the update and dedupe commands - Tweaks arborist to make sure saveIdealTree preserves the behavior of skipping writing to package-lock.json on save=false for install while still writing the lockfile for `npm update` with its new default value of save=false. - Updated and added some new tests on arborist to cover for these tweaks - Added `npm update --save` smoke test on cli Fixes: https://github.com/npm/cli/issues/708 Fixes: https://github.com/npm/cli/issues/2704 Relates to: https://github.com/npm/feedback/discussions/270
2021-10-15feat(workspaces): add --include-workspace-root and explicit --no-workspacesfritzy/workspace-rootGar
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
2021-09-30Revert "feat(workspaces): --include-workspace-root"Luke Karrys
This reverts commit f17dfa0ced7d8df9bb7baf378bb20d33175c8e8b.
2021-09-30feat(workspaces): --include-workspace-rootGar
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
2021-08-18feat(cache): initial implementation of ls and rmNathan Fritz
PR-URL: https://github.com/npm/cli/pull/3592 Credit: @fritzy Close: #3592 Reviewed-by: @nlf
2021-07-15feat(config): introduce 'location' parameternlf
PR-URL: https://github.com/npm/cli/pull/3471 Credit: @nlf Close: #3471 Reviewed-by: @wraithgar
2021-07-12fix(usage): better audit/boolean flag usage outputGar
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
2021-07-12feat: npm pkgRuy Adorno
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
2021-06-17feat(pack): add pack-destination configGar
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
2021-06-16feat(ls): support `--package-lock-only` flagGareth Jones
This enables using the virtual tree instead of node_modules. PR-URL: https://github.com/npm/cli/pull/3408 Credit: @G-Rath Close: #3408 Reviewed-by: @isaacs
2021-06-16fix(docs): ls command usage instructionsVlad GURDIGA
PR-URL: https://github.com/npm/cli/pull/3423 Credit: @gurdiga Close: #3423 Reviewed-by: @ruyadorno
2021-06-10feat(diff): add workspace supportGar
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
2021-05-27feat(link): add workspace supportisaacs
PR-URL: https://github.com/npm/cli/pull/3312 Credit: @isaacs Close: #3312 Reviewed-by: @wraithgar
2021-05-20feat: add ls workspacesRuy Adorno
- 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
2021-05-20fix: restore '--json' argument to 'npm pack' commandmrmlnc
PR-URL: https://github.com/npm/cli/pull/3217 Credit: @mrmlnc Close: #3217 Reviewed-by: @isaacs, @wraithgar, @ruyadorno
2021-05-20feat(outdated): add workspaces supportRuy Adorno
- 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
2021-05-20feat(unpublish): add workspace/dry-run supportGar
PR-URL: https://github.com/npm/cli/pull/3251 Credit: @wraithgar Close: #3251 Reviewed-by: @ruyadorno, @isaacs
2021-05-20fix: search description typoJuan Picado
PR-URL: https://github.com/npm/cli/pull/3253 Credit: @juanpicado Close: #3253 Reviewed-by: @wraithgar, @darcyclarke
2021-05-20Add workspaces support to reify/rebuild commandsisaacs
This adds `--workspace` support to: - audit (including audit fix) - ci - dedupe - find-dupes - install - install-ci-test - install-test - prune - rebuild - uninstall - update Also addresses missing error handling case, identified by @timoxley. https://github.com/npm/cli/pull/3227#discussion_r631024491 PR-URL: https://github.com/npm/cli/pull/3227 Credit: @isaacs Close: #3227 Reviewed-by: @ruyadorno
2021-05-20feat(explain): add workspaces supportRuy Adorno
- Add highlight style for workspaces items in human output - Add ability to filter results by workspace using `-w` config - Added tests and docs Fixes: https://github.com/npm/statusboard/issues/300 PR-URL: https://github.com/npm/cli/pull/3265 Credit: @ruyadorno Close: #3265 Reviewed-by: @isaacs
2021-05-14fix(docs): autogenerate config docs for commandsisaacs
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
2021-05-13feat: add fund workspacesRuy Adorno
Add workspaces support to `npm fund` - Add lib/workspaces/arborist-cmd.js base class - Add ability to filter fund results to a specific set of workspaces - Added tests and docs Fixes: https://github.com/npm/statusboard/issues/301 PR-URL: https://github.com/npm/cli/pull/3241 Credit: @ruyadorno Close: #3241 Reviewed-by: @isaacs
2021-05-13feat(publish): add workspace supportGar
Errors will make things stop altogether, dunno if we want to bikeshed that here or not PR-URL: https://github.com/npm/cli/pull/3231 Credit: @wraithgar Close: #3231 Reviewed-by: @ruyadorno
2021-04-24Remove --always-auth config definitionisaacs
As of the recent updates to npm-registry-fetch and @npmcli/config, this config field is no longer used anywhere. Prior to those changes, it was used, but not in the manner documented.
2021-04-22feat: add init workspacesRuy Adorno
Add workspaces support to `npm init` - Fixes `npm exec` respecting `script-shell` option value - Refactored `lib/exec.js` into `libnpmexec` - Updates init-package-json@2.0.3 - Added ability to create a new workspace using the -w config PR-URL: https://github.com/npm/cli/pull/3095 Credit: @ruyadorno Close: #3095 Reviewed-by: @wraithgar
2021-04-15feat(version): add workspace supportGar
PR-URL: https://github.com/npm/cli/pull/3055 Credit: @wraithgar Close: #3055 Reviewed-by: @darcyclarke
2021-04-14tap@15.0.2Gar
PR-URL: https://github.com/npm/cli/pull/3069 Credit: @isaacs Close: #3069 Reviewed-by: @ruyadorno, @nlf