diff options
author | Kat Marchán <kzm@zkat.tech> | 2018-07-18 13:55:52 -0700 |
---|---|---|
committer | Michaël Zasso <targos@protonmail.com> | 2018-07-29 14:16:56 +0200 |
commit | 5842366ae83a36065d626e3937ad8fc327efab30 (patch) | |
tree | 663eb6d493b00788d83d7a71fc2489adabd24527 /deps/npm/html/doc/files/npm-package-locks.html | |
parent | 2aca0957f46af0be33368a1fcb398e63a35c46ef (diff) | |
download | android-node-v8-5842366ae83a36065d626e3937ad8fc327efab30.tar.gz android-node-v8-5842366ae83a36065d626e3937ad8fc327efab30.tar.bz2 android-node-v8-5842366ae83a36065d626e3937ad8fc327efab30.zip |
deps: upgrade npm to 6.2.0
PR-URL: https://github.com/nodejs/node/pull/21592
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'deps/npm/html/doc/files/npm-package-locks.html')
-rw-r--r-- | deps/npm/html/doc/files/npm-package-locks.html | 27 |
1 files changed, 10 insertions, 17 deletions
diff --git a/deps/npm/html/doc/files/npm-package-locks.html b/deps/npm/html/doc/files/npm-package-locks.html index fe9115c14a..50ac0d4db8 100644 --- a/deps/npm/html/doc/files/npm-package-locks.html +++ b/deps/npm/html/doc/files/npm-package-locks.html @@ -34,31 +34,26 @@ unable to do this. There are multiple reasons for this:</p> "dependencies": { "B": "<0.1.0" } -} -</code></pre><p>package B:</p> +}</code></pre><p>package B:</p> <pre><code>{ "name": "B", "version": "0.0.1", "dependencies": { "C": "<0.1.0" } -} -</code></pre><p>and package C:</p> +}</code></pre><p>and package C:</p> <pre><code>{ "name": "C", "version": "0.0.1" -} -</code></pre><p>If these are the only versions of A, B, and C available in the +}</code></pre><p>If these are the only versions of A, B, and C available in the registry, then a normal <code>npm install A</code> will install:</p> <pre><code>A@0.1.0 `-- B@0.0.1 - `-- C@0.0.1 -</code></pre><p>However, if <a href="mailto:B@0.0.2">B@0.0.2</a> is published, then a fresh <code>npm install A</code> will + `-- C@0.0.1</code></pre><p>However, if <a href="mailto:B@0.0.2">B@0.0.2</a> is published, then a fresh <code>npm install A</code> will install:</p> <pre><code>A@0.1.0 `-- B@0.0.2 - `-- C@0.0.1 -</code></pre><p>assuming the new version did not modify B's dependencies. Of course, + `-- C@0.0.1</code></pre><p>assuming the new version did not modify B's dependencies. Of course, the new version of B could include a new version of C and any number of new dependencies. If such changes are undesirable, the author of A could specify a dependency on <a href="mailto:B@0.0.1">B@0.0.1</a>. However, if A's author and B's @@ -85,8 +80,7 @@ which will look something like this:</p> } } } -} -</code></pre><p>This file describes an <em>exact</em>, and more importantly <em>reproducible</em> +}</code></pre><p>This file describes an <em>exact</em>, and more importantly <em>reproducible</em> <code>node_modules</code> tree. Once it's present, any future installation will base its work off this file, instead of recalculating dependency versions off p<a href="../files/ackage.json.html">ackage.json(5)</a>.</p> @@ -109,8 +103,7 @@ executed afterwards. These scripts run for both <code>package-lock.json</code> a file:</p> <pre><code>"scripts": { "postshrinkwrap": "json -I -e \"this.myMetadata = $MY_APP_METADATA\"" -} -</code></pre><h3 id="using-locked-packages">Using locked packages</h3> +}</code></pre><h3 id="using-locked-packages">Using locked packages</h3> <p>Using a locked package is no different than using any package without a package lock: any commands that update <code>node_modules</code> and/or <code>package.json</code>'s dependencies will automatically sync the existing lockfile. This includes <code>npm @@ -127,7 +120,7 @@ inform you of any changes npm has made to your <code>node_modules</code>, so you if any transitive dependencies were updated, hoisted, etc.</p> <h3 id="resolving-lockfile-conflicts">Resolving lockfile conflicts</h3> <p>Occasionally, two separate npm install will create package locks that cause -merge conflicts in source control systems. As of <a href="mailto:`npm@5.7.0">`npm@5.7.0</a><code>, these conflicts +merge conflicts in source control systems. As of <a href="mailto:%60npm@5.7.0">`npm@5.7.0</a><code>, these conflicts can be resolved by manually fixing any</code>package.json<code>conflicts, and then running</code>npm install [--package-lock-only]<code>again. npm will automatically resolve any conflicts for you and write a merged package lock that includes all @@ -137,7 +130,7 @@ local</code>node_modules/`.</p> <a href="https://npm.im/npm-merge-driver"><code>npm-merge-driver</code></a>, which will teach git how to do this itself without any user interaction. In short: <code>$ npx npm-merge-driver install -g</code> will let you do this, and even works with -<a href="mailto:pre-`npm@5.7.0">pre-`npm@5.7.0</a><code>versions of npm 5, albeit a bit more noisily. Note that if</code>package.json<code>itself conflicts, you will have to resolve that by hand and run</code>npm install` manually, even with the merge driver.</p> +<a href="mailto:pre-%60npm@5.7.0">pre-`npm@5.7.0</a><code>versions of npm 5, albeit a bit more noisily. Note that if</code>package.json<code>itself conflicts, you will have to resolve that by hand and run</code>npm install` manually, even with the merge driver.</p> <h2 id="see-also">SEE ALSO</h2> <ul> <li><a href="https://medium.com/@sdboyer/so-you-want-to-write-a-package-manager-4ae9c17d9527">https://medium.com/@sdboyer/so-you-want-to-write-a-package-manager-4ae9c17d9527</a></li> @@ -158,4 +151,4 @@ npm-merge-driver install -g</code> will let you do this, and even works with <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr> <tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr> </table> -<p id="footer">npm-package-locks — npm@6.1.0</p> +<p id="footer">npm-package-locks — npm@6.2.0</p> |