Skip to content

Commit fe14802

Browse files
othiym23cjihrig
authored andcommitted
deps: upgrade npm to 2.7.0
PR-URL: #1080 Reviewed-By: Colin Ihrig <[email protected]>
1 parent c09c90c commit fe14802

File tree

294 files changed

+2127
-931
lines changed

Some content is hidden

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

294 files changed

+2127
-931
lines changed

deps/npm/CHANGELOG.md

+156
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,159 @@
1+
### v2.7.0 (2015-02-26):
2+
3+
#### SOMETIMES SEMVER MEANS "SUBJECTIVE-EMPATHETIC VERSIONING"
4+
5+
For a very long time (maybe forever?), the documentation for `npm run-script`
6+
has said that `npm restart` will only call `npm stop` and `npm start` when
7+
there is no command defined as `npm restart` in `package.json`. The problem
8+
with this documentation is that `npm run-script` was apparently never wired up
9+
to actually work this way.
10+
11+
Until now.
12+
13+
If the patch below were landed on its own, free of context, it would be a
14+
breaking change. But, since the "new" behavior is how the documentation claims
15+
this feature has always worked, I'm classifying it as a patch-level bug fix. I
16+
apologize in advance if this breaks anybody's deployment scripts, and if it
17+
turns out to be a significant regression in practics, we can revert this change
18+
and move it to `npm@3`, which is allowed to make breaking changes due to being
19+
a new major version of semver.
20+
21+
* [`2f6a1df`](https://github.com/npm/npm/commit/2f6a1df3e1e3e0a3bc4abb69e40f59a64204e7aa)
22+
[#1999](https://github.com/npm/npm/issues/1999) Only run `stop` and `start`
23+
scripts (plus their pre- and post- scripts) when there's no `restart` script
24+
defined. This makes it easier to support graceful restarts of services
25+
managed by npm. ([@watilde](https://github.com/watilde) /
26+
[@scien](https://github.com/scien))
27+
28+
#### A SMALL FEATURE WITH BIG IMPLICATIONS
29+
30+
* [`145af65`](https://github.com/npm/npm/commit/145af6587f45de135cc876be2027ed818ed4ca6a)
31+
[#4887](https://github.com/npm/npm/issues/4887) Replace calls to the
32+
`node-gyp` script bundled with npm by passing the
33+
`--node-gyp=/path/to/node-gyp` option to npm. Swap in `pangyp` or a version
34+
of `node-gyp` modified to work better with io.js without having to touch
35+
npm's code! ([@ackalker](https://github.com/ackalker))
36+
37+
#### [@WATILDE'S](https://github.com/watilde) NPM USABILITY CORNER
38+
39+
Following `[email protected]`'s unexpected fix of many of the issues with `npm update
40+
-g` simply by making `--depth=0` the default for `npm outdated`, friend of npm
41+
[@watilde](https://github.com/watilde) has made several modest changes to npm's
42+
behavior that together justify bumping npm's minor version, as well as making
43+
npm significantly more pleasant to use:
44+
45+
* [`448efd0`](https://github.com/npm/npm/commit/448efd0eaa6f97af0889bf47efc543a1ea2f8d7e)
46+
[#2853](https://github.com/npm/npm/issues/2853) Add support for `--dev` and
47+
`--prod` to `npm ls`, so that you can list only the trees of production or
48+
development dependencies, as desired.
49+
([@watilde](https://github.com/watilde))
50+
* [`a0a8777`](https://github.com/npm/npm/commit/a0a87777af8bee180e4e9321699f050c29ed5ac4)
51+
[#7463](https://github.com/npm/npm/issues/7463) Split the list printed by
52+
`npm run-script` into lifecycle scripts and scripts directly invoked via `npm
53+
run-script`. ([@watilde](https://github.com/watilde))
54+
* [`a5edc17`](https://github.com/npm/npm/commit/a5edc17d5ef1435b468a445156a4a109df80f92b)
55+
[#6749](https://github.com/npm/npm/issues/6749) `[email protected]`:
56+
Support for passing scopes to `npm init` so packages are initialized as part
57+
of that scope / organization / team. ([@watilde](https://github.com/watilde))
58+
59+
#### SMALLER FEATURES AND FIXES
60+
61+
It turns out that quite a few pull requests had piled up on npm's issue
62+
tracker, and they included some nice small features and fixes:
63+
64+
* [`f33e8b8`](https://github.com/npm/npm/commit/f33e8b8ff2de094071c5976be95e35110cf2ab1a)
65+
[#7354](https://github.com/npm/npm/issues/7354) Add `--if-present` flag to
66+
allow e.g. CI systems to call (semi-) standard build tasks defined in
67+
`package.json`, but don't raise an error if no such script is defined.
68+
([@jussi](https://github.com/jussi)-kalliokoski)
69+
* [`7bf85cc`](https://github.com/npm/npm/commit/7bf85cc372ab5698593b01e139c383fa62c92516)
70+
[#4005](https://github.com/npm/npm/issues/4005)
71+
[#6248](https://github.com/npm/npm/issues/6248) Globally unlink a package
72+
when `npm rm` / `npm unlink` is called with no arguments.
73+
([@isaacs](https://github.com/isaacs))
74+
* [`a2e04bd`](https://github.com/npm/npm/commit/a2e04bd921feab8f9e40a27e180ca9308eb709d7)
75+
[#7294](https://github.com/npm/npm/issues/7294) Ensure that when depending on
76+
`git+<proto>` URLs, npm doesn't keep tacking additional `git+` prefixes onto
77+
the front. ([@twhid](https://github.com/twhid))
78+
* [`0f87f5e`](https://github.com/npm/npm/commit/0f87f5ed28960d962f34977953561d22983da4f9)
79+
[#6422](https://github.com/npm/npm/issues/6422) When depending on GitHub
80+
private repositories, make sure we construct the Git URLS correctly.
81+
([@othiym23](https://github.com/othiym23))
82+
* [`50f461d`](https://github.com/npm/npm/commit/50f461d248c4d22e881a9535dccc1d57d994dbc7)
83+
[#4595](https://github.com/npm/npm/issues/4595) Support finding compressed
84+
manpages. It's still up to the system to figure out how to display them,
85+
though. ([@pshevtsov](https://github.com/pshevtsov))
86+
* [`44da664`](https://github.com/npm/npm/commit/44da66456b530c049ff50953f78368460df87461)
87+
[#7465](https://github.com/npm/npm/issues/7465) When calling git, log the
88+
**full** command, with all arguments, on error.
89+
([@thriqon](https://github.com/thriqon))
90+
* [`9748d5c`](https://github.com/npm/npm/commit/9748d5cd195d0269b32caf45129a93d29359a796)
91+
Add parent to error on `ETARGET` error.
92+
([@davglass](https://github.com/davglass))
93+
* [`37038d7`](https://github.com/npm/npm/commit/37038d7db47a986001f77ac17b3e164000fc8ff3)
94+
[#4663](https://github.com/npm/npm/issues/4663) Remove hackaround for Linux
95+
tests, as it's evidently no longer necessary.
96+
([@mmalecki](https://github.com/mmalecki))
97+
* [`d7b7853`](https://github.com/npm/npm/commit/d7b785393dffce93bb70317fbc039a6428ca37c5)
98+
[#2612](https://github.com/npm/npm/issues/2612) Add support for path
99+
completion on `npm install`, which narrows completion to only directories
100+
containing `package.json` files. ([@deestan](https://github.com/deestan))
101+
* [`628fcdb`](https://github.com/npm/npm/commit/628fcdb0be4e14c0312085a50dc2ae01dc713fa6)
102+
Remove all command completion calls to `-/short`, because it's been removed
103+
from the primary registry for quite some time, and is generally a poor idea
104+
on any registry with more than a few hundred packages.
105+
([@othiym23](https://github.com/othiym23))
106+
* [`3f6061d`](https://github.com/npm/npm/commit/3f6061d75650441ee690472d1fa9c8dd7a7b1b28)
107+
[#6659](https://github.com/npm/npm/issues/6659) Instead of removing zsh
108+
completion global, make it a local instead.
109+
([@othiym23](https://github.com/othiym23))
110+
111+
#### DOCUMENTATION TWEAKS
112+
113+
* [`5bc70e6`](https://github.com/npm/npm/commit/5bc70e6cfb3598da433806c6f447fc94c8e1d35d)
114+
[#7417](https://github.com/npm/npm/issues/7417) Provide concrete examples of
115+
how the new `npm update` defaults work in practice, tied to actual test
116+
cases. Everyone interested in using `npm update -g` now that it's been fixed
117+
should read these documents, as should anyone interested in writing
118+
documentation for npm. ([@smikes](https://github.com/smikes))
119+
* [`8ac6f21`](https://github.com/npm/npm/commit/8ac6f2123a6af13dc9447fad96ec9cb583c45a71)
120+
[#6543](https://github.com/npm/npm/issues/6543) Clarify `npm-scripts`
121+
warnings to de-emphasize dangers of using `install` scripts.
122+
([@zeke](https://github.com/zeke))
123+
* [`ebe3b37`](https://github.com/npm/npm/commit/ebe3b37098efdada41dcc4c52a291e29296ea242)
124+
[#6711](https://github.com/npm/npm/issues/6711) Note that git tagging of
125+
versions can be disabled via `--no-git-tag-verson`.
126+
([@smikes](https://github.com/smikes))
127+
* [`2ef5771`](https://github.com/npm/npm/commit/2ef5771632006e6cee8cf17f836c0f98ab494bd1)
128+
[#6711](https://github.com/npm/npm/issues/6711) Document `git-tag-version`
129+
configuration option. ([@KenanY](https://github.com/KenanY))
130+
* [`95e59b2`](https://github.com/npm/npm/commit/95e59b287c9517780318e145371a859e8ebb2d20)
131+
Document that `NODE_ENV=production` behaves analogously to `--production` on
132+
`npm install`. ([@stefaneg](https://github.com/stefaneg))
133+
* [`687117a`](https://github.com/npm/npm/commit/687117a5bcd6a838cd1532ea7020ec6fcf0c33c0)
134+
[#7463](https://github.com/npm/npm/issues/7463) Document the new script
135+
grouping behavior in the man page for `npm run-script`.
136+
([@othiym23](https://github.com/othiym23))
137+
* [`536b2b6`](https://github.com/npm/npm/commit/536b2b6f55c349247b3e79b5d11b4c033ef5a3df)
138+
Rescue one of the the disabled tests and make it work properly.
139+
([@smikes](https://github.com/smikes))
140+
141+
#### DEPENDENCY UPDATES
142+
143+
* [`89fc6a4`](https://github.com/npm/npm/commit/89fc6a4e7ff8c524675fcc14493ca0a1e3a76d38)
144+
`[email protected]`: Test for being run as root, as well as the current user.
145+
([@isaacs](https://github.com/isaacs))
146+
* [`5d0612f`](https://github.com/npm/npm/commit/5d0612f31e226cba32a05351c47b055c0ab6c557)
147+
`[email protected]`: Better error message to explain why calling sync glob with a
148+
callback results in an error. ([@isaacs](https://github.com/isaacs))
149+
* [`64b07f6`](https://github.com/npm/npm/commit/64b07f6caf6cb07e4102f1e4e5f2ff2b944e452e)
150+
`[email protected]`: More accurate counts of pending & skipped tests.
151+
([@rmg](https://github.com/rmg))
152+
* [`8fda451`](https://github.com/npm/npm/commit/8fda45195dae1d6f792be556abe87f7763fab09b)
153+
`[email protected]`: Make official the fact that `node-semver` has moved from
154+
[@isaacs](https://github.com/isaacs)'s organization to
155+
[@npm](https://github.com/npm)'s. ([@isaacs](https://github.com/isaacs))
156+
1157
### v2.6.1 (2015-02-19):
2158

3159
* [`8b98f0e`](https://github.com/npm/npm/commit/8b98f0e709d77a8616c944aebd48ab726f726f76)

deps/npm/bin/node-gyp-bin/node-gyp

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
11
#!/usr/bin/env sh
2-
node "`dirname "$0"`/../../node_modules/node-gyp/bin/node-gyp.js" "$@"
2+
if [ "x$npm_config_node_gyp" = "x" ]; then
3+
node "`dirname "$0"`/../../node_modules/node-gyp/bin/node-gyp.js" "$@"
4+
else
5+
"$npm_config_node_gyp" "$@"
6+
fi
+5-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1-
node "%~dp0\..\..\node_modules\node-gyp\bin\node-gyp.js" %*
1+
if not defined npm_config_node_gyp (
2+
node "%~dp0\..\..\node_modules\node-gyp\bin\node-gyp.js" %*
3+
) else (
4+
%npm_config_node_gyp% %*
5+
)

deps/npm/doc/api/npm-update.md

+9-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,17 @@ npm-update(3) -- Update a package
22
=================================
33

44
## SYNOPSIS
5+
56
npm.commands.update(packages, callback)
67

78
# DESCRIPTION
89

9-
Updates a package, upgrading it to the latest version. It also installs any missing packages.
10+
Updates a package, upgrading it to the latest version. It also installs any
11+
missing packages.
12+
13+
The `packages` argument is an array of packages to update. The `callback`
14+
parameter will be called when done or when an error occurs.
15+
16+
## SEE ALSO
1017

11-
The 'packages' argument is an array of packages to update. The 'callback' parameter will be called when done or when an error occurs.
18+
* npm-update(1)

deps/npm/doc/cli/npm-init.md

+10
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,18 @@ without a really good reason to do so.
2121
If you invoke it with `-f`, `--force`, `-y`, or `--yes`, it will use only
2222
defaults and not prompt you for any options.
2323

24+
## CONFIGURATION
25+
26+
### scope
27+
28+
* Default: none
29+
* Type: String
30+
31+
The scope under which the new module should be created.
32+
2433
## SEE ALSO
2534

2635
* <https://github.com/isaacs/init-package-json>
2736
* package.json(5)
2837
* npm-version(1)
38+
* npm-scope(7)

deps/npm/doc/cli/npm-install.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,10 @@ after packing it up into a tarball (b).
4343
it installs the current package context (ie, the current working
4444
directory) as a global package.
4545

46-
By default, `npm install` will install all modules listed as
47-
dependencies. With the `--production` flag,
48-
npm will not install modules listed in `devDependencies`.
46+
By default, `npm install` will install all modules listed as dependencies.
47+
With the `--production` flag (or when the `NODE_ENV` environment variable
48+
is set to `production`), npm will not install modules listed in
49+
`devDependencies`.
4950

5051
* `npm install <folder>`:
5152

deps/npm/doc/cli/npm-ls.md

+14
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,20 @@ project.
6767

6868
Max display depth of the dependency tree.
6969

70+
### prod / production
71+
72+
* Type: Boolean
73+
* Default: false
74+
75+
Display only the dependency tree for packages in `dependencies`.
76+
77+
### dev
78+
79+
* Type: Boolean
80+
* Default: false
81+
82+
Display only the dependency tree for packages in `devDependencies`.
83+
7084
## SEE ALSO
7185

7286
* npm-config(1)

deps/npm/doc/cli/npm-run-script.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,11 @@ npm-run-script(1) -- Run arbitrary package scripts
88

99
## DESCRIPTION
1010

11-
This runs an arbitrary command from a package's `"scripts"` object.
12-
If no package name is provided, it will search for a `package.json`
13-
in the current folder and use its `"scripts"` object. If no `"command"`
14-
is provided, it will list the available top level scripts. The `env` command
15-
can be used to list environment variables that will be available to the script
16-
at runtime. If an "env" command is defined in your package it will have
17-
precedence instead.
18-
19-
`run[-script]` is used by the test, start, restart, and stop commands, but can
20-
be called directly, as well.
11+
This runs an arbitrary command from a package's `"scripts"` object. If no
12+
`"command"` is provided, it will list the available scripts. `run[-script]` is
13+
used by the test, start, restart, and stop commands, but can be called
14+
directly, as well. When the scripts in the package are printed out, they're
15+
separated into lifecycle (test, start, restart) and directly-run scripts.
2116

2217
As of [`[email protected]`](http://blog.npmjs.org/post/98131109725/npm-2-0-0), you can
2318
use custom arguments when executing scripts. The special option `--` is used by
@@ -29,6 +24,11 @@ all the arguments after the `--` directly to your script:
2924
The arguments will only be passed to the script specified after ```npm run```
3025
and not to any pre or post script.
3126

27+
The `env` script is a special built-in command that can be used to list
28+
environment variables that will be available to the script at runtime. If an
29+
"env" command is defined in your package it will take precedence over the
30+
built-in.
31+
3232
## SEE ALSO
3333

3434
* npm-scripts(7)

0 commit comments

Comments
 (0)