Skip to content
This repository was archived by the owner on Apr 22, 2023. It is now read-only.

Commit 28ae70e

Browse files
committed
npm: Upgrade to v2.1.6
1 parent 272aa58 commit 28ae70e

File tree

715 files changed

+18443
-6525
lines changed

Some content is hidden

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

715 files changed

+18443
-6525
lines changed

deps/npm/.eslintrc

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"env" : {
3+
"node" : true
4+
},
5+
"rules" : {
6+
"semi": [2, "never"],
7+
"strict": 0,
8+
"quotes": [1, "double", "avoid-escape"],
9+
"no-use-before-define": 0,
10+
"curly": 0,
11+
"no-underscore-dangle": 0,
12+
"no-lonely-if": 1,
13+
"no-unused-vars": [2, {"vars" : "all", "args" : "after-used"}],
14+
"no-mixed-requires": 0,
15+
"space-infix-ops": 0
16+
}
17+
}

deps/npm/.npmignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,5 @@ html/*.png
2525
/npm-*.tgz
2626

2727
*.pyc
28+
29+
/test/tap/builtin-config

deps/npm/CHANGELOG.md

Lines changed: 315 additions & 0 deletions
Large diffs are not rendered by default.

deps/npm/Makefile

Lines changed: 70 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,28 @@ misc_mandocs = $(shell find doc/misc -name '*.md' \
3131
|sed 's|doc/misc/|man/man7/|g' ) \
3232
man/man7/npm-index.7
3333

34+
35+
cli_partdocs = $(shell find doc/cli -name '*.md' \
36+
|sed 's|.md|.html|g' \
37+
|sed 's|doc/cli/|html/partial/doc/cli/|g' ) \
38+
html/partial/doc/README.html
39+
40+
api_partdocs = $(shell find doc/api -name '*.md' \
41+
|sed 's|.md|.html|g' \
42+
|sed 's|doc/api/|html/partial/doc/api/|g' )
43+
44+
files_partdocs = $(shell find doc/files -name '*.md' \
45+
|sed 's|.md|.html|g' \
46+
|sed 's|doc/files/|html/partial/doc/files/|g' ) \
47+
html/partial/doc/files/npm-json.html \
48+
html/partial/doc/files/npm-global.html
49+
50+
misc_partdocs = $(shell find doc/misc -name '*.md' \
51+
|sed 's|.md|.html|g' \
52+
|sed 's|doc/misc/|html/partial/doc/misc/|g' ) \
53+
html/partial/doc/index.html
54+
55+
3456
cli_htmldocs = $(shell find doc/cli -name '*.md' \
3557
|sed 's|.md|.html|g' \
3658
|sed 's|doc/cli/|html/doc/cli/|g' ) \
@@ -53,6 +75,8 @@ misc_htmldocs = $(shell find doc/misc -name '*.md' \
5375

5476
mandocs = $(api_mandocs) $(cli_mandocs) $(files_mandocs) $(misc_mandocs)
5577

78+
partdocs = $(api_partdocs) $(cli_partdocs) $(files_partdocs) $(misc_partdocs)
79+
5680
htmldocs = $(api_htmldocs) $(cli_htmldocs) $(files_htmldocs) $(misc_htmldocs)
5781

5882
all: doc
@@ -63,7 +87,7 @@ latest:
6387
@echo "in this folder that you're looking at right now."
6488
node cli.js install -g -f npm
6589

66-
install: docclean all
90+
install: all
6791
node cli.js install -g -f
6892

6993
# backwards compat
@@ -79,7 +103,7 @@ clean: markedclean marked-manclean doc-clean uninstall
79103
uninstall:
80104
node cli.js rm npm -g -f
81105

82-
doc: $(mandocs) $(htmldocs)
106+
doc: $(mandocs) $(htmldocs) $(partdocs)
83107

84108
markedclean:
85109
rm -rf node_modules/marked node_modules/.bin/marked .building_marked
@@ -119,43 +143,73 @@ man/man5/%.5: doc/files/%.md scripts/doc-build.sh package.json
119143
@[ -d man/man5 ] || mkdir -p man/man5
120144
scripts/doc-build.sh $< $@
121145

146+
man/man7/%.7: doc/misc/%.md scripts/doc-build.sh package.json
147+
@[ -d man/man7 ] || mkdir -p man/man7
148+
scripts/doc-build.sh $< $@
149+
150+
122151
doc/misc/npm-index.md: scripts/index-build.js package.json
123152
node scripts/index-build.js > $@
124153

125-
html/doc/index.html: doc/misc/npm-index.md $(html_docdeps)
126-
@[ -d html/doc ] || mkdir -p html/doc
127-
scripts/doc-build.sh $< $@
128154

129-
man/man7/%.7: doc/misc/%.md scripts/doc-build.sh package.json
130-
@[ -d man/man7 ] || mkdir -p man/man7
155+
# html/doc depends on html/partial/doc
156+
html/doc/%.html: html/partial/doc/%.html
157+
@[ -d html/doc ] || mkdir -p html/doc
131158
scripts/doc-build.sh $< $@
132159

133-
html/doc/README.html: README.md $(html_docdeps)
160+
html/doc/README.html: html/partial/doc/README.html
134161
@[ -d html/doc ] || mkdir -p html/doc
135162
scripts/doc-build.sh $< $@
136163

137-
html/doc/cli/%.html: doc/cli/%.md $(html_docdeps)
164+
html/doc/cli/%.html: html/partial/doc/cli/%.html
138165
@[ -d html/doc/cli ] || mkdir -p html/doc/cli
139166
scripts/doc-build.sh $< $@
140167

141-
html/doc/api/%.html: doc/api/%.md $(html_docdeps)
168+
html/doc/misc/%.html: html/partial/doc/misc/%.html
169+
@[ -d html/doc/misc ] || mkdir -p html/doc/misc
170+
scripts/doc-build.sh $< $@
171+
172+
html/doc/files/%.html: html/partial/doc/files/%.html
173+
@[ -d html/doc/files ] || mkdir -p html/doc/files
174+
scripts/doc-build.sh $< $@
175+
176+
html/doc/api/%.html: html/partial/doc/api/%.html
142177
@[ -d html/doc/api ] || mkdir -p html/doc/api
143178
scripts/doc-build.sh $< $@
144179

145-
html/doc/files/npm-json.html: html/doc/files/package.json.html
180+
181+
html/partial/doc/index.html: doc/misc/npm-index.md $(html_docdeps)
182+
@[ -d html/partial/doc ] || mkdir -p html/partial/doc
183+
scripts/doc-build.sh $< $@
184+
185+
html/partial/doc/README.html: README.md $(html_docdeps)
186+
@[ -d html/partial/doc ] || mkdir -p html/partial/doc
187+
scripts/doc-build.sh $< $@
188+
189+
html/partial/doc/cli/%.html: doc/cli/%.md $(html_docdeps)
190+
@[ -d html/partial/doc/cli ] || mkdir -p html/partial/doc/cli
191+
scripts/doc-build.sh $< $@
192+
193+
html/partial/doc/api/%.html: doc/api/%.md $(html_docdeps)
194+
@[ -d html/partial/doc/api ] || mkdir -p html/partial/doc/api
195+
scripts/doc-build.sh $< $@
196+
197+
html/partial/doc/files/npm-json.html: html/partial/doc/files/package.json.html
146198
cp $< $@
147-
html/doc/files/npm-global.html: html/doc/files/npm-folders.html
199+
html/partial/doc/files/npm-global.html: html/partial/doc/files/npm-folders.html
148200
cp $< $@
149201

150-
html/doc/files/%.html: doc/files/%.md $(html_docdeps)
151-
@[ -d html/doc/files ] || mkdir -p html/doc/files
202+
html/partial/doc/files/%.html: doc/files/%.md $(html_docdeps)
203+
@[ -d html/partial/doc/files ] || mkdir -p html/partial/doc/files
152204
scripts/doc-build.sh $< $@
153205

154-
html/doc/misc/%.html: doc/misc/%.md $(html_docdeps)
155-
@[ -d html/doc/misc ] || mkdir -p html/doc/misc
206+
html/partial/doc/misc/%.html: doc/misc/%.md $(html_docdeps)
207+
@[ -d html/partial/doc/misc ] || mkdir -p html/partial/doc/misc
156208
scripts/doc-build.sh $< $@
157209

158210

211+
212+
159213
marked: node_modules/.bin/marked
160214

161215
node_modules/.bin/marked:

deps/npm/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ use npm itself to do.
154154
if (er) return commandFailed(er)
155155
// command succeeded, and data might have some info
156156
})
157-
npm.on("log", function (message) { .... })
157+
npm.registry.log.on("log", function (message) { .... })
158158
})
159159

160160
The `load` function takes an object hash of the command-line configs.

deps/npm/bin/npm-cli.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ log.info("it worked if it ends with", "ok")
2121

2222
var path = require("path")
2323
, npm = require("../lib/npm.js")
24-
, npmconf = require("npmconf")
24+
, npmconf = require("../lib/config/core.js")
2525
, errorHandler = require("../lib/utils/error-handler.js")
2626

2727
, configDefs = npmconf.defs

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ npm-bin(3) -- Display npm bin folder
1010
Print the folder where npm will install executables.
1111

1212
This function should not be used programmatically. Instead, just refer
13-
to the `npm.bin` member.
13+
to the `npm.bin` property.

deps/npm/doc/api/npm-help-search.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ array of results is returned. Each result is an object with these properties:
2727
* file:
2828
Name of the file that matched
2929

30-
The silent parameter is not neccessary not used, but it may in the future.
30+
The silent parameter is not necessary not used, but it may in the future.

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ npm-load(3) -- Load config settings
1010
npm.load() must be called before any other function call. Both parameters are
1111
optional, but the second is recommended.
1212

13-
The first parameter is an object hash of command-line config params, and the
14-
second parameter is a callback that will be called when npm is loaded and
15-
ready to serve.
13+
The first parameter is an object containing command-line config params, and the
14+
second parameter is a callback that will be called when npm is loaded and ready
15+
to serve.
1616

1717
The first parameter should follow a similar structure as the package.json
1818
config object.

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

Lines changed: 0 additions & 28 deletions
This file was deleted.

deps/npm/doc/api/npm.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,12 @@ This is the API documentation for npm.
2525
To find documentation of the command line
2626
client, see `npm(1)`.
2727

28-
Prior to using npm's commands, `npm.load()` must be called.
29-
If you provide `configObject` as an object hash of top-level
30-
configs, they override the values stored in the various config
31-
locations. In the npm command line client, this set of configs
32-
is parsed from the command line options. Additional configuration
33-
params are loaded from two configuration files. See `npm-config(1)`,
34-
`npm-config(7)`, and `npmrc(5)` for more information.
28+
Prior to using npm's commands, `npm.load()` must be called. If you provide
29+
`configObject` as an object map of top-level configs, they override the values
30+
stored in the various config locations. In the npm command line client, this
31+
set of configs is parsed from the command line options. Additional
32+
configuration params are loaded from two configuration files. See
33+
`npm-config(1)`, `npm-config(7)`, and `npmrc(5)` for more information.
3534

3635
After that, each of the functions are accessible in the
3736
commands object: `npm.commands.<cmd>`. See `npm-index(7)` for a list of
@@ -88,9 +87,9 @@ command.
8887

8988
## MAGIC
9089

91-
For each of the methods in the `npm.commands` hash, a method is added to
92-
the npm object, which takes a set of positional string arguments rather
93-
than an array and a callback.
90+
For each of the methods in the `npm.commands` object, a method is added to the
91+
npm object, which takes a set of positional string arguments rather than an
92+
array and a callback.
9493

9594
If the last argument is a callback, then it will use the supplied
9695
callback. However, if no callback is provided, then it will print out

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

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ npm-adduser(1) -- Add a registry user account
33

44
## SYNOPSIS
55

6-
npm adduser [--registry=url] [--scope=@orgname]
6+
npm adduser [--registry=url] [--scope=@orgname] [--always-auth]
77

88
## DESCRIPTION
99

@@ -45,6 +45,21 @@ e.g.
4545
This will set a registry for the given scope and login or create a user for
4646
that registry at the same time.
4747

48+
### always-auth
49+
50+
Default: false
51+
52+
If specified, save configuration indicating that all requests to the given
53+
registry should include authorization information. Useful for private
54+
registries. Can be used with `--registry` and / or `--scope`, e.g.
55+
56+
npm adduser --registry=http://private-registry.example.com --always-auth
57+
58+
This will ensure that all requests to that registry (including for tarballs)
59+
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+
precedence over any global configuration.
62+
4863
## SEE ALSO
4964

5065
* npm-registry(7)

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ The shell to run for the `npm explore` command.
3232

3333
## SEE ALSO
3434

35-
* npm-submodule(1)
3635
* npm-folders(5)
3736
* npm-edit(1)
3837
* npm-rebuild(1)

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ npm-init(1) -- Interactively create a package.json file
33

44
## SYNOPSIS
55

6-
npm init
6+
npm init [-f|--force|-y|--yes]
77

88
## DESCRIPTION
99

@@ -18,6 +18,9 @@ the options in there.
1818
It is strictly additive, so it does not delete options from your package.json
1919
without a really good reason to do so.
2020

21+
If you invoke it with `-f`, `--force`, `-y`, or `--yes`, it will use only
22+
defaults and not prompt you for any options.
23+
2124
## SEE ALSO
2225

2326
* <https://github.com/isaacs/init-package-json>

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ npm-publish(1) -- Publish a package
99

1010
## DESCRIPTION
1111

12-
Publishes a package to the registry so that it can be installed by name.
12+
Publishes a package to the registry so that it can be installed by name. See
13+
`npm-developers(7)` for details on what's included in the published package, as
14+
well as details on how the package is built.
1315

1416
By default npm will publish to the public registry. This can be overridden by
1517
specifying a different default registry or using a `npm-scope(7)` in the name

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

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,8 @@ npm-restart(1) -- Start a package
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.
13-
14-
If no version is specified, then it restarts the "active" version.
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.
1512

1613
## SEE ALSO
1714

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,16 @@ is provided, it will list the available top level scripts.
1616
It is used by the test, start, restart, and stop commands, but can be
1717
called directly, as well.
1818

19+
As of [`[email protected]`](http://blog.npmjs.org/post/98131109725/npm-2-0-0), you can
20+
use custom arguments when executing scripts. The special option `--` is used by
21+
[getopt](http://goo.gl/KxMmtG) to delimit the end of the options. npm will pass
22+
all the arguments after the `--` directly to your script:
23+
24+
npm run test -- --grep="pattern"
25+
26+
The arguments will only be passed to the script specified after ```npm run```
27+
and not to any pre or post script.
28+
1929
## SEE ALSO
2030

2131
* npm-scripts(7)

0 commit comments

Comments
 (0)