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-08-08feat(arborist): add option to forcibly skip loading a virtual treenlf
2022-08-03fix(arborist): fix bare attribute queries (#5248)Darcy Clarke
2022-08-03feat: add --replace-registry-host=<npmjs|always|never> (#4860)Nathan Fritz
feat: add --replace-registry-host=<npmjs|always|never>|<hostname>
2022-08-01feat: add npm query cmd (#5000)Ruy Adorno
Co-authored-by: Gar <gar+gh@danger.computer>
2022-08-01fix(arborist): pass the edge to fromPath in order to determine correct path ↵nlf
(#5233) by passing in the edge we can determine if the edge is overridden, and if it is the path we want to return is the project root since that's what user's will have define their overrides relative to
2022-08-01fix(arborist): use the sourceReference root rather than the node root for ↵nlf
overrides (#5227) when we examine override references, if we look at only `this.from.root.package` the root could actually be a virtual one. in order to ensure we resolve references from the real root, we instead need to look at `this.from.sourceReference.root.package` to get the correct value. closes #4395
2022-07-13chore: fix arborist tests for new run-script behaviourGar
2022-07-11feat(arborist): add support for dependencies script (#5094)nlf
feat: add support for dependencies script this is a new feature that will run the `dependencies` (as well as the `pre` and `post` versions) script any time an npm action makes a change to the installed dependency tree, whether it's adding a new dependency, removing one, or just shuffling things around to dedupe/optimize
2022-06-22chore(tests): fix tests for @npmcli/run-script@4.1.0 updatenlf
2022-06-02fix(arborist): use rawSpec for bundled and shrinkwrapped deps (#4963)nlf
2022-05-10feat: add flag --omit-lockfile-registry-resolved (#4874)Nathan Fritz
* feat(arborist): added flag to omit lockfile resolved * feat: add flag --omit-lockfile-registry-resolved Co-authored-by: Caleb ツ Everett <calebev@amazon.com>
2022-05-10fix(arborist): link deps lifecycle scripts (#4875)Ruy Adorno
- Fixes running proper lifecycle scripts for linked deps and workspaces. - Added test to validate lifecycle scripts don't run twice for linked deps - Tweaked "reify workspaces bin files" test to also validate proper lifecycle scripts ran before check for linked bins. - Tweaked reify test running lifecycle scripts of unchanged link nodes to also validate that the install lifecycle scripts are also called. Fixes: https://github.com/npm/cli/issues/4277 Fixes: https://github.com/npm/cli/issues/4552 Fixes: https://github.com/npm/statusboard/issues/439 Relates to: https://github.com/npm/cli/issues/2905
2022-04-20chore(arborist): add installLinks with workspaces testnlf
2022-04-20feat(arborist): add support for installLinksnlf
when set, installLinks instructs arborist to pack and extract a file: dependency rather than creating a symlink to it. this has the effect of also installing the dependencies for the linked dependency, though if local changes are made it also requires the user to reinstall the package
2022-04-12fix(arborist): when reloading an edge, also refresh overridesnlf
this fixes some scenarios where overrides were not being properly applied, especially those where a node_modules or package-lock.json already exists
2022-04-12chore(arborist): update printable tree test to be a valid treenlf
2022-04-04fix: replace deprecated String.prototype.substr() (#4667)CommanderRoot
.substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
2022-03-31fix: only call npmlog progress methods if explicitly requested (#4644)Luke Karrys
Fixes #3314
2022-03-28fix(arborist): identify and repair invalid nodes in the virtual treenlf
2022-03-28fix(arborist): make sure resolveParent exists before checking propsnlf
2022-03-28fix(arborist): handle link nodes in old lockfiles correctlynlf
2022-03-17fix(arborist): save workspace version (#4578)Ruy Adorno
When declaring dependencies to workspaces the common practice is to refer to their version numbers, currently the cli adds a link reference instead of the proper semver range when trying to install/declare as a direct direct dependency one of its own workspaces. This change fixes it by adding a new condition for handling workspace edges when saving the current ideal tree. Relates to: https://github.com/npm/cli/issues/3403
2022-03-15 fix(arborist): _findMissingEdges missing dependency due to inconsistent ↵Nathan Fritz
path separators (#4261) Co-authored-by: Salvador Jacobi <salvadorj@unity3d.com>
2022-02-24chore(arborist): remove log optionLuke Karrys
BREAKING CHANGE: this drops support for the `log` property
2022-02-23fix(arborist): convert all sorting to string-locale-compare (#4465)Luke Karrys
2022-02-23fix(arborist): fix superfluous arguments (#4464)XhmikosR
2022-02-16fix(arborist): do not audit in offline mode (#4410)Mohamed Akram
2022-02-08fix(arborist): save bundleDependencies to package.json when reifyingGar
2022-02-07fix(arborist): check if a spec is a workspace before fetching a manifest, ↵nlf
closes #3637 (#4371)
2022-01-27fix(arborist): update save exactRuy Adorno
When updating dependencies we need an extra check when filtering nodes to be updated that ensures we do not override semver ranges that are pointing to an exact version. e.g: =1.0.0, 1.0.0 Fixes: https://github.com/npm/cli/issues/4329
2022-01-26fix(arborist): shrinkwrap throws when trying to read a folder without ↵linkgoron
permissions (#4258) * fix(arborist): shrinkwrap throws trying to read a folder without permissions Fix an issue where shrinkwrap throws an error when trying to read a folder that it doesn't have permissions to, instead of returning a correct object with an error
2022-01-26fix(arborist): correctly load overrides on workspace edges, closes #4205nlf
2022-01-26feat(arborist): add named updates validation (#4307)Ruy Adorno
* feat(arborist): add named updates validation Arborist update does not support anything other than dependency names, that is confusing to some users that are used to provide semver ranges when using `npm install` and other commands. This changeset adds validation to the values provided as arguments in `npm update` and will throw a `EUPDATEARGS` error in case the user tries to use semver ranges, e.g: `npm update abbrev@1.0.0` Relates to: https://github.com/npm/cli/issues/4240
2022-01-26fix(arborist): load actual tree on named updatesRuy Adorno
Arborist was not loading the actual tree when using named updates for global updates, that would result in removing all previously installed deps from a global install anytime the user would try to run `npm update <pkgname>`. This changeset fixes the problem by allowing the load of the actual tree if the `global` and `update.names` options are defined. Added a few more tests to illustrate but some of the snapshots already included were actually demonstrating the problem by having empty trees as result, these are now also updated with the expected tree result. Fixes: https://github.com/npm/cli/issues/3175
2022-01-20fix(arborist): prioritize valid workspace nodes (#4230)nlf
closes #3637
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
2022-01-18fix(arborist): ensure indentation is preserved (#4218)Jordan Harband
It turns out that `new Arborist().buildIdealTree().meta.toString()` does not take into account the indentation in the package.json (tabs, in my case) the way `npm install --package-lock-only` does. This fixes that. Also included a bonus commit that removes redundant Promise stuff inside an `async function`.
2022-01-06[arborist] [refactor] `Shrinkwrap`: add `toJSON`/`toString` methods to get ↵Jordan Harband
shrinkwrap contents without saving (#4181)
2021-12-16Bring in all libnpm modules + arborist as workspaces (#4166)Nathan Fritz
Added libnpm workspaces and arborist