-
Notifications
You must be signed in to change notification settings - Fork 30.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This reverts commit 25a816d. PR-URL: #19837 Reviewed-By: Gus Caplan <[email protected]>
- Loading branch information
Showing
1,451 changed files
with
23,889 additions
and
43,764 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -536,28 +536,3 @@ Jacob Wejendorp <[email protected]> | |
Alejandro López <[email protected]> | ||
Victor Belozyorov <[email protected]> | ||
Bradley Farias <[email protected]> | ||
Kyle E. Mitchell <[email protected]> | ||
Tuan Anh Tran <[email protected]> | ||
Nathan Woltman <[email protected]> | ||
Kyra <[email protected]> | ||
Leаh Neukirchen <[email protected]> | ||
Kyle Spier-Swenson <[email protected]> | ||
Joe Bowbeer <[email protected]> | ||
Nalin Bhardwaj <[email protected]> | ||
Nicolas Garnier <[email protected]> | ||
Vladislav Rassokhin <[email protected]> | ||
Josh Goldberg <[email protected]> | ||
laggingreflex <[email protected]> | ||
Kristofer Selbekk <[email protected]> | ||
sreenivas alapati <[email protected]> | ||
Ben Creasy <[email protected]> | ||
Allan Kimmer Jensen <[email protected]> | ||
rinfan <[email protected]> | ||
Matt Hoyle <[email protected]> | ||
Mason Pawsey <[email protected]> | ||
Johannes Bader <[email protected]> | ||
Michael Zabka <[email protected]> | ||
Bruce MacNaughton <[email protected]> | ||
Christopher Patty <[email protected]> | ||
Max Stoiber <[email protected]> | ||
Enrico Weigelt <[email protected]> |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,10 +26,6 @@ As of `[email protected]`, the `npm update` will only inspect top-level packages. | |
Prior versions of `npm` would also recursively inspect all dependencies. | ||
To get the old behavior, use `npm --depth 9999 update`. | ||
|
||
As of `[email protected]`, the `npm update` will change `package.json` to save the | ||
new version as the minimum required dependency. To get the old behavior, | ||
use `npm update --no-save`. | ||
|
||
## EXAMPLES | ||
|
||
IMPORTANT VERSION NOTE: these examples assume `[email protected]` or later. For | ||
|
@@ -108,6 +104,30 @@ If the dependence were on `^0.4.0`: | |
Then `npm update` will install `[email protected]`, because that is the highest-sorting | ||
version that satisfies `^0.4.0` (`>= 0.4.0 <0.5.0`) | ||
|
||
### Recording Updates with `--save` | ||
|
||
When you want to update a package and save the new version as | ||
the minimum required dependency in `package.json`, you can use | ||
`npm update -S` or `npm update --save`. For example if | ||
`package.json` contains: | ||
|
||
``` | ||
"dependencies": { | ||
"dep1": "^1.1.1" | ||
} | ||
``` | ||
|
||
Then `npm update --save` will install `[email protected]` (i.e., `latest`), | ||
and `package.json` will be modified: | ||
|
||
``` | ||
"dependencies": { | ||
"dep1": "^1.2.2" | ||
} | ||
``` | ||
|
||
Note that `npm` will only write an updated version to `package.json` | ||
if it installs a new package. | ||
|
||
### Updating Globally-Installed Packages | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -136,25 +136,6 @@ on. Additionally, the diffs from these changes are human-readable and will | |
inform you of any changes npm has made to your `node_modules`, so you can notice | ||
if any transitive dependencies were updated, hoisted, etc. | ||
|
||
### Resolving lockfile conflicts | ||
|
||
Occasionally, two separate npm install will create package locks that cause | ||
merge conflicts in source control systems. As of `[email protected]`, these conflicts | ||
can be resolved by manually fixing any `package.json` conflicts, and then | ||
running `npm install [--package-lock-only]` again. npm will automatically | ||
resolve any conflicts for you and write a merged package lock that includes all | ||
the dependencies from both branches in a reasonable tree. If | ||
`--package-lock-only` is provided, it will do this without also modifying your | ||
local `node_modules/`. | ||
|
||
To make this process seamless on git, consider installing | ||
[`npm-merge-driver`](https://npm.im/npm-merge-driver), which will teach git how | ||
to do this itself without any user interaction. In short: `$ npx | ||
npm-merge-driver install -g` will let you do this, and even works with | ||
pre-`[email protected]` versions of npm 5, albeit a bit more noisily. Note that if | ||
`package.json` itself conflicts, you will have to resolve that by hand and run | ||
`npm install` manually, even with the merge driver. | ||
|
||
## SEE ALSO | ||
|
||
* https://medium.com/@sdboyer/so-you-want-to-write-a-package-manager-4ae9c17d9527 | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.