Skip to content

Commit e79ccee

Browse files
othiym23bnoordhuis
authored andcommitted
npm: upgrade to v2.1.18
PR-URL: #266 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
1 parent 156cd82 commit e79ccee

File tree

681 files changed

+29977
-8313
lines changed

Some content is hidden

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

681 files changed

+29977
-8313
lines changed

deps/npm/.eslintrc

+3-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
"no-lonely-if": 1,
1313
"no-unused-vars": [2, {"vars" : "all", "args" : "after-used"}],
1414
"no-mixed-requires": 0,
15-
"space-infix-ops": 0
15+
"space-infix-ops": 0,
16+
"key-spacing": 0,
17+
"no-multi-spaces": 0
1618
}
1719
}

deps/npm/.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ before_install:
88
- "npm config set spin false"
99
- "npm install -g npm@^2"
1010
- "sudo mkdir -p /var/run/couchdb"
11-
script: "npm run-script tap"
11+
script: "npm run-script test-all"

deps/npm/CHANGELOG.md

+333
Large diffs are not rendered by default.

deps/npm/CONTRIBUTING.md

+3
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,6 @@
77
issues](https://github.com/npm/npm/search?q=Similar%20issues&type=Issues).
88
* Ensure your new issue conforms to the [Contributing
99
Guidelines](https://github.com/npm/npm/wiki/Contributing-Guidelines).
10+
11+
Participation in this open source project is subject to the [npm Code
12+
of Conduct](http://www.npmjs.com/policies/conduct).

deps/npm/README.md

+14-36
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
npm(1) -- node package manager
1+
npm(1) -- a JavaScript package manager
22
==============================
33
[![Build Status](https://img.shields.io/travis/npm/npm/master.svg)](https://travis-ci.org/npm/npm)
44
## SYNOPSIS
@@ -36,11 +36,11 @@ paths, etc.) then read on.
3636
## Fancy Install (Unix)
3737

3838
There's a pretty robust install script at
39-
<https://www.npmjs.org/install.sh>. You can download that and run it.
39+
<https://www.npmjs.com/install.sh>. You can download that and run it.
4040

4141
Here's an example using curl:
4242

43-
curl -L https://npmjs.org/install.sh | sh
43+
curl -L https://npmjs.com/install.sh | sh
4444

4545
### Slightly Fancier
4646

@@ -62,43 +62,23 @@ arbitrary config keys using the `./configure --key=val ...`, and then
6262
run npm commands by doing `node cli.js <cmd> <args>`. (This is helpful
6363
for testing, or running stuff without actually installing npm itself.)
6464

65-
## Fancy Windows Install
65+
## Windows Install or Upgrade
6666

67-
You can download a zip file from <https://npmjs.org/dist/>, and unpack it
67+
You can download a zip file from <https://github.com/npm/npm/releases>, and unpack it
6868
in the same folder where node.exe lives.
6969

70+
The latest version in a zip file is 1.4.12. To upgrade to npm 2, follow the
71+
Windows upgrade instructions in the npm Troubleshooting Guide:
72+
73+
<https://github.com/npm/npm/wiki/Troubleshooting#upgrading-on-windows>
74+
7075
If that's not fancy enough for you, then you can fetch the code with
7176
git, and mess with it directly.
7277

7378
## Installing on Cygwin
7479

7580
No.
7681

77-
## Permissions when Using npm to Install Other Stuff
78-
79-
**tl;dr**
80-
81-
* Use `sudo` for greater safety. Or don't, if you prefer not to.
82-
* npm will downgrade permissions if it's root before running any build
83-
scripts that package authors specified.
84-
85-
### More details...
86-
87-
As of version 0.3, it is recommended to run npm as root.
88-
This allows npm to change the user identifier to the `nobody` user prior
89-
to running any package build or test commands.
90-
91-
If you are not the root user, or if you are on a platform that does not
92-
support uid switching, then npm will not attempt to change the userid.
93-
94-
If you would like to ensure that npm **always** runs scripts as the
95-
"nobody" user, and have it fail if it cannot downgrade permissions, then
96-
set the following configuration param:
97-
98-
npm config set unsafe-perm false
99-
100-
This will prevent running in unsafe mode, even as non-root users.
101-
10282
## Uninstalling
10383

10484
So sad to see you go.
@@ -173,13 +153,13 @@ help config` to learn about all the options you can set there.
173153

174154
## More Docs
175155

176-
Check out the [docs](https://www.npmjs.org/doc/),
177-
especially the [faq](https://www.npmjs.org/doc/faq.html).
156+
Check out the [docs](https://docs.npmjs.com/),
157+
especially the [faq](https://docs.npmjs.com/misc/faq).
178158

179159
You can use the `npm help` command to read any of them.
180160

181161
If you're a developer, and you want to use npm to publish your program,
182-
you should [read this](https://www.npmjs.org/doc/developers.html)
162+
you should [read this](https://docs.npmjs.com/misc/developers)
183163

184164
## Legal Stuff
185165

@@ -199,7 +179,7 @@ specific purpose, or lack of malice in any given npm package.
199179

200180
If you have a complaint about a package in the public npm registry,
201181
and cannot [resolve it with the package
202-
owner](https://www.npmjs.org/doc/misc/npm-disputes.html), please email
182+
owner](https://docs.npmjs.com/misc/disputes), please email
203183
<support@npmjs.com> and explain the situation.
204184

205185
Any data published to The npm Registry (including user account
@@ -228,8 +208,6 @@ When you find issues, please report them:
228208

229209
* web:
230210
<https://github.com/npm/npm/issues>
231-
* email:
232-
<npm-@googlegroups.com>
233211

234212
Be sure to include *all* of the output from the npm command that didn't work
235213
as expected. The `npm-debug.log` file is also helpful to provide.

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,5 +52,5 @@ List packages in the global install prefix instead of in the current
5252
project.
5353

5454
Note, if parseable is set or long isn't set, then duplicates will be trimmed.
55-
This means that if a submodule a same dependency as a parent module, then the
55+
This means that if a submodule has the same dependency as a parent module, then the
5656
dependency will only be output once.

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

+26-7
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,39 @@
1-
npm-restart(3) -- Start a package
2-
=================================
1+
npm-restart(3) -- Restart a package
2+
===================================
33

44
## SYNOPSIS
55

66
npm.commands.restart(packages, callback)
77

88
## DESCRIPTION
99

10-
This runs a package's "restart" script, if one was provided.
11-
Otherwise it runs package's "stop" script, if one was provided, and then
12-
the "start" script.
10+
This restarts a package (or multiple packages).
11+
12+
This runs a package's "stop", "restart", and "start" scripts, and associated
13+
pre- and post- scripts, in the order given below:
14+
15+
1. prerestart
16+
2. prestop
17+
3. stop
18+
4. poststop
19+
5. restart
20+
6. prestart
21+
7. start
22+
8. poststart
23+
9. postrestart
1324

1425
If no version is specified, then it restarts the "active" version.
1526

16-
npm can run tests on multiple packages. Just specify multiple packages
17-
in the `packages` parameter.
27+
npm can restart multiple packages. Just specify multiple packages in
28+
the `packages` parameter.
29+
30+
## NOTE
31+
32+
Note that the "restart" script is run **in addition to** the "stop"
33+
and "start" scripts, not instead of them.
34+
35+
This is the behavior as of `npm` major version 2. A change in this
36+
behavior will be accompanied by an increase in major version number
1837

1938
## SEE ALSO
2039

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ npm-start(3) -- Start a package
99

1010
This runs a package's "start" script, if one was provided.
1111

12-
npm can run tests on multiple packages. Just specify multiple packages
13-
in the `packages` parameter.
12+
npm can start multiple packages. Just specify multiple packages in the
13+
`packages` parameter.

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

+6-5
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,14 @@ the default registry will be used (see `npm-config(7)`).
1313

1414
The username, password, and email are read in from prompts.
1515

16-
You may use this command to change your email address, but not username
17-
or password.
16+
To reset your password, go to <https://www.npmjs.com/forgot>
1817

19-
To reset your password, go to <https://www.npmjs.org/forgot>
18+
To change your email address, go to <https://www.npmjs.com/email-edit>
2019

2120
You may use this command multiple times with the same user account to
22-
authorize on a new machine.
21+
authorize on a new machine. When authenticating on a new machine,
22+
the username, password and email address must all match with
23+
your existing record.
2324

2425
`npm login` is an alias to `adduser` and behaves exactly the same way.
2526

@@ -57,7 +58,7 @@ registries. Can be used with `--registry` and / or `--scope`, e.g.
5758

5859
This will ensure that all requests to that registry (including for tarballs)
5960
include an authorization header. See `always-auth` in `npm-config(7)` for more
60-
details on always-auth. Registry-specific configuaration of `always-auth` takes
61+
details on always-auth. Registry-specific configuration of `always-auth` takes
6162
precedence over any global configuration.
6263

6364
## SEE ALSO

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Note that `package-name` is taken from `package.json`,
2222
not from directory name.
2323

2424
The package name can be optionally prefixed with a scope. See `npm-scope(7)`.
25-
The scope must by preceded by an @-symbol and followed by a slash.
25+
The scope must be preceded by an @-symbol and followed by a slash.
2626

2727
When creating tarballs for `npm publish`, the linked packages are
2828
"snapshotted" to their current state by resolving the symbolic links.

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

+25-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,34 @@
1-
npm-restart(1) -- Start a package
2-
=================================
1+
npm-restart(1) -- Restart a package
2+
===================================
33

44
## SYNOPSIS
55

66
npm restart [-- <args>]
77

88
## DESCRIPTION
99

10-
This runs a package's "restart" script, if one was provided. Otherwise it runs
11-
package's "stop" script, if one was provided, and then the "start" script.
10+
This restarts a package.
11+
12+
This runs a package's "stop", "restart", and "start" scripts, and associated
13+
pre- and post- scripts, in the order given below:
14+
15+
1. prerestart
16+
2. prestop
17+
3. stop
18+
4. poststop
19+
5. restart
20+
6. prestart
21+
7. start
22+
8. poststart
23+
9. postrestart
24+
25+
## NOTE
26+
27+
Note that the "restart" script is run **in addition to** the "stop"
28+
and "start" scripts, not instead of them.
29+
30+
This is the behavior as of `npm` major version 2. A change in this
31+
behavior will be accompanied by an increase in major version number
1232

1333
## SEE ALSO
1434

@@ -17,3 +37,4 @@ package's "stop" script, if one was provided, and then the "start" script.
1737
* npm-test(1)
1838
* npm-start(1)
1939
* npm-stop(1)
40+
* npm-restart(3)

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

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ npm-version(1) -- Bump a package version
88
## DESCRIPTION
99

1010
Run this in a package directory to bump the version and write the new
11-
data back to the package.json file.
11+
data back to `package.json` and, if present, `npm-shrinkwrap.json`.
1212

1313
The `newversion` argument should be a valid semver string, *or* a
1414
valid second argument to semver.inc (one of "patch", "minor", "major",
@@ -38,6 +38,7 @@ in your git config for this to work properly. For example:
3838

3939
Enter passphrase:
4040

41+
4142
## SEE ALSO
4243

4344
* npm-init(1)

deps/npm/doc/files/npmrc.md

+6
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ Each of these files is loaded, and config options are resolved in
3030
priority order. For example, a setting in the userconfig file would
3131
override the setting in the globalconfig file.
3232

33+
Array values are specified by adding "[]" after the key name. For
34+
example:
35+
36+
key[] = "first value"
37+
key[] = "second value"
38+
3339
### Per-project config file
3440

3541
When working locally in a project, a `.npmrc` file in the root of the

deps/npm/doc/files/package.json.md

+7-4
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ Put example scripts in here. Someday, it might be exposed in some clever way.
253253
## repository
254254

255255
Specify the place where your code lives. This is helpful for people who
256-
want to contribute. If the git repo is on github, then the `npm docs`
256+
want to contribute. If the git repo is on GitHub, then the `npm docs`
257257
command will be able to find you.
258258

259259
Do it like this:
@@ -366,13 +366,16 @@ an argument to `git checkout`. The default is `master`.
366366

367367
## GitHub URLs
368368

369-
As of version 1.1.65, you can refer to GitHub urls as just "foo": "user/foo-project". For example:
369+
As of version 1.1.65, you can refer to GitHub urls as just "foo":
370+
"user/foo-project". Just as with git URLs, a `commit-ish` suffix can be
371+
included. For example:
370372

371373
{
372374
"name": "foo",
373375
"version": "0.0.0",
374376
"dependencies": {
375-
"express": "visionmedia/express"
377+
"express": "visionmedia/express",
378+
"mocha": "visionmedia/mocha#4727d357ea"
376379
}
377380
}
378381

@@ -442,7 +445,7 @@ run this script as well, so that you can test it easily.
442445

443446
In some cases, you want to express the compatibility of your package with an
444447
host tool or library, while not necessarily doing a `require` of this host.
445-
This is usually refered to as a *plugin*. Notably, your module may be exposing
448+
This is usually referred to as a *plugin*. Notably, your module may be exposing
446449
a specific interface, expected and specified by the host documentation.
447450

448451
For example:

deps/npm/doc/misc/npm-coding-style.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ designed to reduce visual clutter and make bugs more apparent.
1010
If you want to contribute to npm (which is very encouraged), you should
1111
make your code conform to npm's style.
1212

13-
Note: this concerns npm's code not the specific packages at npmjs.org
13+
Note: this concerns npm's code not the specific packages that you can download from the npm registry.
1414

1515
## Line Length
1616

@@ -21,7 +21,7 @@ statements onto multiple lines.
2121
## Indentation
2222

2323
Two-spaces. Tabs are better, but they look like hell in web browsers
24-
(and on github), and node uses 2 spaces, so that's that.
24+
(and on GitHub), and node uses 2 spaces, so that's that.
2525

2626
Configure your editor appropriately.
2727

0 commit comments

Comments
 (0)