Skip to content

Commit aa742dd

Browse files
committed
npm: Upgrade to v1.2.0
1 parent 7a2ae4c commit aa742dd

File tree

222 files changed

+665
-300
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

222 files changed

+665
-300
lines changed

deps/npm/doc/cli/json.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -366,8 +366,8 @@ a version in the following fashion.
366366
For example, the following are equivalent:
367367

368368
* `"~1.2.3" = ">=1.2.3 <1.3.0"`
369-
* `"~1.2" = ">=1.2.0 <2.0.0"`
370-
* `"~1" = ">=1.0.0 <2.0.0"`
369+
* `"~1.2" = ">=1.2.0 <1.3.0"`
370+
* `"~1" = ">=1.0.0 <1.1.0"`
371371

372372
### X Version Ranges
373373

deps/npm/doc/cli/scripts.md

+49-4
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ npm-scripts(1) -- How npm handles the "scripts" field
66
npm supports the "scripts" member of the package.json script, for the
77
following scripts:
88

9+
* prepublish:
10+
Run BEFORE the package is published. (Also run on local `npm
11+
install` without any arguments.)
12+
* publish, postpublish:
13+
Run AFTER the package is published.
914
* preinstall:
1015
Run BEFORE the package is installed
1116
* install, postinstall:
@@ -18,10 +23,6 @@ following scripts:
1823
Run BEFORE the package is updated with the update command.
1924
* update, postupdate:
2025
Run AFTER the package is updated with the update command.
21-
* prepublish:
22-
Run BEFORE the package is published.
23-
* publish, postpublish:
24-
Run AFTER the package is published.
2526
* pretest, test, posttest:
2627
Run by the `npm test` command.
2728
* prestop, stop, poststop:
@@ -35,6 +36,50 @@ following scripts:
3536
Additionally, arbitrary scrips can be run by doing
3637
`npm run-script <stage> <pkg>`.
3738

39+
## NOTE: INSTALL SCRIPTS ARE AN ANTIPATTERN
40+
41+
**tl;dr** Don't use `install`. Use a `.gyp` file for compilation, and
42+
`prepublish` for anything else.
43+
44+
You should almost never have to explicitly set a `preinstall` or
45+
`install` script. If you are doing this, please consider if there is
46+
another option.
47+
48+
The only valid use of `install` or `preinstall` scripts is for
49+
compilation which must be done on the target architecture. In early
50+
versions of node, this was often done using the `node-waf` scripts, or
51+
a standalone `Makefile`, and early versions of npm required that it be
52+
explicitly set in package.json. This was not portable, and harder to
53+
do properly.
54+
55+
In the current version of node, the standard way to do this is using a
56+
`.gyp` file. If you have a file with a `.gyp` extension in the root
57+
of your package, then npm will run the appropriate `node-gyp` commands
58+
automatically at install time. This is the only officially supported
59+
method for compiling binary addons, and does not require that you add
60+
anything to your package.json file.
61+
62+
If you have to do other things before your package is used, in a way
63+
that is not dependent on the operating system or architecture of the
64+
target system, then use a `prepublish` script instead. This includes
65+
tasks such as:
66+
67+
* Compile CoffeeScript source code into JavaScript.
68+
* Create minified versions of JavaScript source code.
69+
* Fetching remote resources that your package will use.
70+
71+
The advantage of doing these things at `prepublish` time instead of
72+
`preinstall` or `install` time is that they can be done once, in a
73+
single place, and thus greatly reduce complexity and variability.
74+
Additionally, this means that:
75+
76+
* You can depend on `coffee-script` as a `devDependency`, and thus
77+
your users don't need to have it installed.
78+
* You don't need to include the minifiers in your package, reducing
79+
the size for your users.
80+
* You don't need to rely on your users having `curl` or `wget` or
81+
other system tools on the target machines.
82+
3883
## DEFAULT VALUES
3984

4085
npm will default some script values based on package contents.

deps/npm/doc/cli/semver.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ As a node module:
1111

1212
$ npm install semver
1313

14-
semver.valid('1.2.3') // true
15-
semver.valid('a.b.c') // false
14+
semver.valid('1.2.3') // '1.2.3'
15+
semver.valid('a.b.c') // null
1616
semver.clean(' =v1.2.3 ') // '1.2.3'
1717
semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true
1818
semver.gt('1.2.3', '9.8.7') // false
@@ -83,7 +83,7 @@ The following range styles are supported:
8383
* `<1.2.3` Less than
8484
* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4`
8585
* `~1.2.3` := `>=1.2.3 <1.3.0`
86-
* `~1.2` := `>=1.2.0 <2.0.0`
86+
* `~1.2` := `>=1.2.0 <1.3.0`
8787
* `~1` := `>=1.0.0 <2.0.0`
8888
* `1.2.x` := `>=1.2.0 <1.3.0`
8989
* `1.x` := `>=1.0.0 <2.0.0`

deps/npm/html/api/bin.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ <h2 id="DESCRIPTION">DESCRIPTION</h2>
1919
<p>This function should not be used programmatically. Instead, just refer
2020
to the <code>npm.bin</code> member.</p>
2121
</div>
22-
<p id="footer">bin &mdash; npm@1.1.70</p>
22+
<p id="footer">bin &mdash; npm@1.2.0</p>
2323
<script>
2424
;(function () {
2525
var wrapper = document.getElementById("wrapper")

deps/npm/html/api/bugs.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ <h2 id="DESCRIPTION">DESCRIPTION</h2>
2525
<p>This command will launch a browser, so this command may not be the most
2626
friendly for programmatic use.</p>
2727
</div>
28-
<p id="footer">bugs &mdash; npm@1.1.70</p>
28+
<p id="footer">bugs &mdash; npm@1.2.0</p>
2929
<script>
3030
;(function () {
3131
var wrapper = document.getElementById("wrapper")

deps/npm/html/api/commands.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ <h2 id="SEE-ALSO">SEE ALSO</h2>
2828

2929
<ul><li><a href="../doc/index.html">index(1)</a></li></ul>
3030
</div>
31-
<p id="footer">commands &mdash; npm@1.1.70</p>
31+
<p id="footer">commands &mdash; npm@1.2.0</p>
3232
<script>
3333
;(function () {
3434
var wrapper = document.getElementById("wrapper")

deps/npm/html/api/config.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ <h2 id="SEE-ALSO">SEE ALSO</h2>
3333

3434
<ul><li><a href="../api/npm.html">npm(3)</a></li></ul>
3535
</div>
36-
<p id="footer">config &mdash; npm@1.1.70</p>
36+
<p id="footer">config &mdash; npm@1.2.0</p>
3737
<script>
3838
;(function () {
3939
var wrapper = document.getElementById("wrapper")

deps/npm/html/api/deprecate.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ <h2 id="SEE-ALSO">SEE ALSO</h2>
3232

3333
<ul><li><a href="../api/publish.html">publish(3)</a></li><li><a href="../api/unpublish.html">unpublish(3)</a></li><li><a href="../doc/registry.html">registry(1)</a></li></ul>
3434
</div>
35-
<p id="footer">deprecate &mdash; npm@1.1.70</p>
35+
<p id="footer">deprecate &mdash; npm@1.2.0</p>
3636
<script>
3737
;(function () {
3838
var wrapper = document.getElementById("wrapper")

deps/npm/html/api/docs.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ <h2 id="DESCRIPTION">DESCRIPTION</h2>
2525
<p>This command will launch a browser, so this command may not be the most
2626
friendly for programmatic use.</p>
2727
</div>
28-
<p id="footer">docs &mdash; npm@1.1.70</p>
28+
<p id="footer">docs &mdash; npm@1.2.0</p>
2929
<script>
3030
;(function () {
3131
var wrapper = document.getElementById("wrapper")

deps/npm/html/api/edit.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ <h2 id="DESCRIPTION">DESCRIPTION</h2>
3030
<p>Since this command opens an editor in a new process, be careful about where
3131
and how this is used.</p>
3232
</div>
33-
<p id="footer">edit &mdash; npm@1.1.70</p>
33+
<p id="footer">edit &mdash; npm@1.2.0</p>
3434
<script>
3535
;(function () {
3636
var wrapper = document.getElementById("wrapper")

deps/npm/html/api/explore.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ <h2 id="DESCRIPTION">DESCRIPTION</h2>
2424

2525
<p>The first element in the &#39;args&#39; parameter must be a package name. After that is the optional command, which can be any number of strings. All of the strings will be combined into one, space-delimited command.</p>
2626
</div>
27-
<p id="footer">explore &mdash; npm@1.1.70</p>
27+
<p id="footer">explore &mdash; npm@1.2.0</p>
2828
<script>
2929
;(function () {
3030
var wrapper = document.getElementById("wrapper")

deps/npm/html/api/help-search.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ <h2 id="DESCRIPTION">DESCRIPTION</h2>
3232

3333
<p>The silent parameter is not neccessary not used, but it may in the future.</p>
3434
</div>
35-
<p id="footer">help-search &mdash; npm@1.1.70</p>
35+
<p id="footer">help-search &mdash; npm@1.2.0</p>
3636
<script>
3737
;(function () {
3838
var wrapper = document.getElementById("wrapper")

deps/npm/html/api/init.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ <h2 id="SEE-ALSO">SEE ALSO</h2>
3535

3636
<p><a href="../doc/json.html">json(1)</a></p>
3737
</div>
38-
<p id="footer">init &mdash; npm@1.1.70</p>
38+
<p id="footer">init &mdash; npm@1.2.0</p>
3939
<script>
4040
;(function () {
4141
var wrapper = document.getElementById("wrapper")

deps/npm/html/api/install.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ <h2 id="DESCRIPTION">DESCRIPTION</h2>
2525
<p>Finally, &#39;callback&#39; is a function that will be called when all packages have been
2626
installed or when an error has been encountered.</p>
2727
</div>
28-
<p id="footer">install &mdash; npm@1.1.70</p>
28+
<p id="footer">install &mdash; npm@1.2.0</p>
2929
<script>
3030
;(function () {
3131
var wrapper = document.getElementById("wrapper")

deps/npm/html/api/link.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ <h2 id="DESCRIPTION">DESCRIPTION</h2>
3939
<p>Now, any changes to the redis package will be reflected in
4040
the package in the current working directory</p>
4141
</div>
42-
<p id="footer">link &mdash; npm@1.1.70</p>
42+
<p id="footer">link &mdash; npm@1.2.0</p>
4343
<script>
4444
;(function () {
4545
var wrapper = document.getElementById("wrapper")

deps/npm/html/api/load.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ <h2 id="DESCRIPTION">DESCRIPTION</h2>
3232

3333
<p>For a list of all the available command-line configs, see <code>npm help config</code></p>
3434
</div>
35-
<p id="footer">load &mdash; npm@1.1.70</p>
35+
<p id="footer">load &mdash; npm@1.2.0</p>
3636
<script>
3737
;(function () {
3838
var wrapper = document.getElementById("wrapper")

deps/npm/html/api/ls.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ <h3 id="global">global</h3>
5959
This means that if a submodule a same dependency as a parent module, then the
6060
dependency will only be output once.</p>
6161
</div>
62-
<p id="footer">ls &mdash; npm@1.1.70</p>
62+
<p id="footer">ls &mdash; npm@1.2.0</p>
6363
<script>
6464
;(function () {
6565
var wrapper = document.getElementById("wrapper")

deps/npm/html/api/npm.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ <h2 id="SYNOPSIS">SYNOPSIS</h2>
2424

2525
<h2 id="VERSION">VERSION</h2>
2626

27-
<p>1.1.70</p>
27+
<p>1.2.0</p>
2828

2929
<h2 id="DESCRIPTION">DESCRIPTION</h2>
3030

@@ -91,7 +91,7 @@ <h2 id="ABBREVS">ABBREVS</h2>
9191

9292
<pre><code>var cmd = npm.deref(&quot;unp&quot;) // cmd === &quot;unpublish&quot;</code></pre>
9393
</div>
94-
<p id="footer">npm &mdash; npm@1.1.70</p>
94+
<p id="footer">npm &mdash; npm@1.2.0</p>
9595
<script>
9696
;(function () {
9797
var wrapper = document.getElementById("wrapper")

deps/npm/html/api/outdated.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ <h2 id="DESCRIPTION">DESCRIPTION</h2>
1919

2020
<p>If the &#39;packages&#39; parameter is left out, npm will check all packages.</p>
2121
</div>
22-
<p id="footer">outdated &mdash; npm@1.1.70</p>
22+
<p id="footer">outdated &mdash; npm@1.2.0</p>
2323
<script>
2424
;(function () {
2525
var wrapper = document.getElementById("wrapper")

deps/npm/html/api/owner.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ <h2 id="SEE-ALSO">SEE ALSO</h2>
3434

3535
<ul><li><a href="../api/publish.html">publish(3)</a></li><li><a href="../doc/registry.html">registry(1)</a></li></ul>
3636
</div>
37-
<p id="footer">owner &mdash; npm@1.1.70</p>
37+
<p id="footer">owner &mdash; npm@1.2.0</p>
3838
<script>
3939
;(function () {
4040
var wrapper = document.getElementById("wrapper")

deps/npm/html/api/pack.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ <h2 id="DESCRIPTION">DESCRIPTION</h2>
2525

2626
<p>If no arguments are supplied, then npm packs the current package folder.</p>
2727
</div>
28-
<p id="footer">pack &mdash; npm@1.1.70</p>
28+
<p id="footer">pack &mdash; npm@1.2.0</p>
2929
<script>
3030
;(function () {
3131
var wrapper = document.getElementById("wrapper")

deps/npm/html/api/prefix.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ <h2 id="DESCRIPTION">DESCRIPTION</h2>
2121

2222
<p>This function is not useful programmatically</p>
2323
</div>
24-
<p id="footer">prefix &mdash; npm@1.1.70</p>
24+
<p id="footer">prefix &mdash; npm@1.2.0</p>
2525
<script>
2626
;(function () {
2727
var wrapper = document.getElementById("wrapper")

deps/npm/html/api/prune.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ <h2 id="DESCRIPTION">DESCRIPTION</h2>
2323
<p>Extraneous packages are packages that are not listed on the parent
2424
package&#39;s dependencies list.</p>
2525
</div>
26-
<p id="footer">prune &mdash; npm@1.1.70</p>
26+
<p id="footer">prune &mdash; npm@1.2.0</p>
2727
<script>
2828
;(function () {
2929
var wrapper = document.getElementById("wrapper")

deps/npm/html/api/publish.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ <h2 id="SEE-ALSO">SEE ALSO</h2>
3232

3333
<ul><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/adduser.html">adduser(1)</a></li><li><a href="../api/owner.html">owner(3)</a></li></ul>
3434
</div>
35-
<p id="footer">publish &mdash; npm@1.1.70</p>
35+
<p id="footer">publish &mdash; npm@1.2.0</p>
3636
<script>
3737
;(function () {
3838
var wrapper = document.getElementById("wrapper")

deps/npm/html/api/rebuild.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ <h2 id="CONFIGURATION">CONFIGURATION</h2>
2222

2323
<p>See <code>npm help build</code></p>
2424
</div>
25-
<p id="footer">rebuild &mdash; npm@1.1.70</p>
25+
<p id="footer">rebuild &mdash; npm@1.2.0</p>
2626
<script>
2727
;(function () {
2828
var wrapper = document.getElementById("wrapper")

deps/npm/html/api/restart.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ <h2 id="SEE-ALSO">SEE ALSO</h2>
2727

2828
<ul><li><a href="../api/start.html">start(3)</a></li><li><a href="../api/stop.html">stop(3)</a></li></ul>
2929
</div>
30-
<p id="footer">restart &mdash; npm@1.1.70</p>
30+
<p id="footer">restart &mdash; npm@1.2.0</p>
3131
<script>
3232
;(function () {
3333
var wrapper = document.getElementById("wrapper")

deps/npm/html/api/root.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ <h2 id="DESCRIPTION">DESCRIPTION</h2>
2121

2222
<p>This function is not useful programmatically.</p>
2323
</div>
24-
<p id="footer">root &mdash; npm@1.1.70</p>
24+
<p id="footer">root &mdash; npm@1.2.0</p>
2525
<script>
2626
;(function () {
2727
var wrapper = document.getElementById("wrapper")

deps/npm/html/api/run-script.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ <h2 id="SEE-ALSO">SEE ALSO</h2>
2929

3030
<ul><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../api/test.html">test(3)</a></li><li><a href="../api/start.html">start(3)</a></li><li><a href="../api/restart.html">restart(3)</a></li><li><a href="../api/stop.html">stop(3)</a></li></ul>
3131
</div>
32-
<p id="footer">run-script &mdash; npm@1.1.70</p>
32+
<p id="footer">run-script &mdash; npm@1.2.0</p>
3333
<script>
3434
;(function () {
3535
var wrapper = document.getElementById("wrapper")

deps/npm/html/api/search.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ <h2 id="DESCRIPTION">DESCRIPTION</h2>
3232
and doesn&#39;t try to read your mind (it doesn&#39;t do any verb tense matching or the
3333
like).</p>
3434
</div>
35-
<p id="footer">search &mdash; npm@1.1.70</p>
35+
<p id="footer">search &mdash; npm@1.2.0</p>
3636
<script>
3737
;(function () {
3838
var wrapper = document.getElementById("wrapper")

deps/npm/html/api/shrinkwrap.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ <h2 id="DESCRIPTION">DESCRIPTION</h2>
2626
<p>Finally, &#39;callback&#39; is a function that will be called when the shrinkwrap has
2727
been saved.</p>
2828
</div>
29-
<p id="footer">shrinkwrap &mdash; npm@1.1.70</p>
29+
<p id="footer">shrinkwrap &mdash; npm@1.2.0</p>
3030
<script>
3131
;(function () {
3232
var wrapper = document.getElementById("wrapper")

deps/npm/html/api/start.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ <h2 id="DESCRIPTION">DESCRIPTION</h2>
1919
<p>npm can run tests on multiple packages. Just specify multiple packages
2020
in the <code>packages</code> parameter.</p>
2121
</div>
22-
<p id="footer">start &mdash; npm@1.1.70</p>
22+
<p id="footer">start &mdash; npm@1.2.0</p>
2323
<script>
2424
;(function () {
2525
var wrapper = document.getElementById("wrapper")

deps/npm/html/api/stop.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ <h2 id="DESCRIPTION">DESCRIPTION</h2>
1919
<p>npm can run stop on multiple packages. Just specify multiple packages
2020
in the <code>packages</code> parameter.</p>
2121
</div>
22-
<p id="footer">stop &mdash; npm@1.1.70</p>
22+
<p id="footer">stop &mdash; npm@1.2.0</p>
2323
<script>
2424
;(function () {
2525
var wrapper = document.getElementById("wrapper")

deps/npm/html/api/submodule.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ <h2 id="SEE-ALSO">SEE ALSO</h2>
3333

3434
<ul><li>npm help json</li><li>git help submodule</li></ul>
3535
</div>
36-
<p id="footer">submodule &mdash; npm@1.1.70</p>
36+
<p id="footer">submodule &mdash; npm@1.2.0</p>
3737
<script>
3838
;(function () {
3939
var wrapper = document.getElementById("wrapper")

deps/npm/html/api/tag.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ <h2 id="DESCRIPTION">DESCRIPTION</h2>
2929
used. For more information about how to set this config, check
3030
<code>man 3 npm-config</code> for programmatic usage or <code>man npm-config</code> for cli usage.</p>
3131
</div>
32-
<p id="footer">tag &mdash; npm@1.1.70</p>
32+
<p id="footer">tag &mdash; npm@1.2.0</p>
3333
<script>
3434
;(function () {
3535
var wrapper = document.getElementById("wrapper")

0 commit comments

Comments
 (0)