Skip to content

Commit

Permalink
Merge remote-tracking branch 'joyent/v0.12' into v0.12
Browse files Browse the repository at this point in the history
Conflicts:
	Makefile
	deps/v8/src/base/platform/platform.h

PR-URL: node-forward/node#65
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
  • Loading branch information
bnoordhuis committed Nov 22, 2014
2 parents 21130c7 + 2d17193 commit fcbbc7a
Show file tree
Hide file tree
Showing 766 changed files with 20,243 additions and 7,253 deletions.
14 changes: 13 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,19 @@ test-debugger: all
$(PYTHON) tools/test.py debugger

test-npm: $(NODE_EXE)
./$(NODE_EXE) deps/npm/test/run.js
rm -rf npm-cache npm-tmp npm-prefix
mkdir npm-cache npm-tmp npm-prefix
cd deps/npm ; npm_config_cache="$(shell pwd)/npm-cache" \
npm_config_prefix="$(shell pwd)/npm-prefix" \
npm_config_tmp="$(shell pwd)/npm-tmp" \
../../$(NODE_EXE) cli.js install
cd deps/npm ; npm_config_cache="$(shell pwd)/npm-cache" \
npm_config_prefix="$(shell pwd)/npm-prefix" \
npm_config_tmp="$(shell pwd)/npm-tmp" \
../../$(NODE_EXE) cli.js run-script test-all && \
../../$(NODE_EXE) cli.js prune --prod && \
cd ../.. && \
rm -rf npm-cache npm-tmp npm-prefix

test-npm-publish: $(NODE_EXE)
npm_package_config_publishtest=true ./$(NODE_EXE) deps/npm/test/run.js
Expand Down
17 changes: 17 additions & 0 deletions deps/npm/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"env" : {
"node" : true
},
"rules" : {
"semi": [2, "never"],
"strict": 0,
"quotes": [1, "double", "avoid-escape"],
"no-use-before-define": 0,
"curly": 0,
"no-underscore-dangle": 0,
"no-lonely-if": 1,
"no-unused-vars": [2, {"vars" : "all", "args" : "after-used"}],
"no-mixed-requires": 0,
"space-infix-ops": 0
}
}
2 changes: 2 additions & 0 deletions deps/npm/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,5 @@ html/*.png
/npm-*.tgz

*.pyc

/test/tap/builtin-config
315 changes: 315 additions & 0 deletions deps/npm/CHANGELOG.md

Large diffs are not rendered by default.

86 changes: 70 additions & 16 deletions deps/npm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,28 @@ misc_mandocs = $(shell find doc/misc -name '*.md' \
|sed 's|doc/misc/|man/man7/|g' ) \
man/man7/npm-index.7


cli_partdocs = $(shell find doc/cli -name '*.md' \
|sed 's|.md|.html|g' \
|sed 's|doc/cli/|html/partial/doc/cli/|g' ) \
html/partial/doc/README.html

api_partdocs = $(shell find doc/api -name '*.md' \
|sed 's|.md|.html|g' \
|sed 's|doc/api/|html/partial/doc/api/|g' )

files_partdocs = $(shell find doc/files -name '*.md' \
|sed 's|.md|.html|g' \
|sed 's|doc/files/|html/partial/doc/files/|g' ) \
html/partial/doc/files/npm-json.html \
html/partial/doc/files/npm-global.html

misc_partdocs = $(shell find doc/misc -name '*.md' \
|sed 's|.md|.html|g' \
|sed 's|doc/misc/|html/partial/doc/misc/|g' ) \
html/partial/doc/index.html


cli_htmldocs = $(shell find doc/cli -name '*.md' \
|sed 's|.md|.html|g' \
|sed 's|doc/cli/|html/doc/cli/|g' ) \
Expand All @@ -53,6 +75,8 @@ misc_htmldocs = $(shell find doc/misc -name '*.md' \

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

partdocs = $(api_partdocs) $(cli_partdocs) $(files_partdocs) $(misc_partdocs)

htmldocs = $(api_htmldocs) $(cli_htmldocs) $(files_htmldocs) $(misc_htmldocs)

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

install: docclean all
install: all
node cli.js install -g -f

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

doc: $(mandocs) $(htmldocs)
doc: $(mandocs) $(htmldocs) $(partdocs)

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

man/man7/%.7: doc/misc/%.md scripts/doc-build.sh package.json
@[ -d man/man7 ] || mkdir -p man/man7
scripts/doc-build.sh $< $@


doc/misc/npm-index.md: scripts/index-build.js package.json
node scripts/index-build.js > $@

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

man/man7/%.7: doc/misc/%.md scripts/doc-build.sh package.json
@[ -d man/man7 ] || mkdir -p man/man7
# html/doc depends on html/partial/doc
html/doc/%.html: html/partial/doc/%.html
@[ -d html/doc ] || mkdir -p html/doc
scripts/doc-build.sh $< $@

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

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

html/doc/api/%.html: doc/api/%.md $(html_docdeps)
html/doc/misc/%.html: html/partial/doc/misc/%.html
@[ -d html/doc/misc ] || mkdir -p html/doc/misc
scripts/doc-build.sh $< $@

html/doc/files/%.html: html/partial/doc/files/%.html
@[ -d html/doc/files ] || mkdir -p html/doc/files
scripts/doc-build.sh $< $@

html/doc/api/%.html: html/partial/doc/api/%.html
@[ -d html/doc/api ] || mkdir -p html/doc/api
scripts/doc-build.sh $< $@

html/doc/files/npm-json.html: html/doc/files/package.json.html

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

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

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

html/partial/doc/api/%.html: doc/api/%.md $(html_docdeps)
@[ -d html/partial/doc/api ] || mkdir -p html/partial/doc/api
scripts/doc-build.sh $< $@

html/partial/doc/files/npm-json.html: html/partial/doc/files/package.json.html
cp $< $@
html/doc/files/npm-global.html: html/doc/files/npm-folders.html
html/partial/doc/files/npm-global.html: html/partial/doc/files/npm-folders.html
cp $< $@

html/doc/files/%.html: doc/files/%.md $(html_docdeps)
@[ -d html/doc/files ] || mkdir -p html/doc/files
html/partial/doc/files/%.html: doc/files/%.md $(html_docdeps)
@[ -d html/partial/doc/files ] || mkdir -p html/partial/doc/files
scripts/doc-build.sh $< $@

html/doc/misc/%.html: doc/misc/%.md $(html_docdeps)
@[ -d html/doc/misc ] || mkdir -p html/doc/misc
html/partial/doc/misc/%.html: doc/misc/%.md $(html_docdeps)
@[ -d html/partial/doc/misc ] || mkdir -p html/partial/doc/misc
scripts/doc-build.sh $< $@




marked: node_modules/.bin/marked

node_modules/.bin/marked:
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ use npm itself to do.
if (er) return commandFailed(er)
// command succeeded, and data might have some info
})
npm.on("log", function (message) { .... })
npm.registry.log.on("log", function (message) { .... })
})

The `load` function takes an object hash of the command-line configs.
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/bin/npm-cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ log.info("it worked if it ends with", "ok")

var path = require("path")
, npm = require("../lib/npm.js")
, npmconf = require("npmconf")
, npmconf = require("../lib/config/core.js")
, errorHandler = require("../lib/utils/error-handler.js")

, configDefs = npmconf.defs
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/doc/api/npm-bin.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ npm-bin(3) -- Display npm bin folder
Print the folder where npm will install executables.

This function should not be used programmatically. Instead, just refer
to the `npm.bin` member.
to the `npm.bin` property.
2 changes: 1 addition & 1 deletion deps/npm/doc/api/npm-help-search.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ array of results is returned. Each result is an object with these properties:
* file:
Name of the file that matched

The silent parameter is not neccessary not used, but it may in the future.
The silent parameter is not necessary not used, but it may in the future.
6 changes: 3 additions & 3 deletions deps/npm/doc/api/npm-load.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ npm-load(3) -- Load config settings
npm.load() must be called before any other function call. Both parameters are
optional, but the second is recommended.

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

The first parameter should follow a similar structure as the package.json
config object.
Expand Down
28 changes: 0 additions & 28 deletions deps/npm/doc/api/npm-submodule.md

This file was deleted.

19 changes: 9 additions & 10 deletions deps/npm/doc/api/npm.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,12 @@ This is the API documentation for npm.
To find documentation of the command line
client, see `npm(1)`.

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

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

## MAGIC

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

If the last argument is a callback, then it will use the supplied
callback. However, if no callback is provided, then it will print out
Expand Down
17 changes: 16 additions & 1 deletion deps/npm/doc/cli/npm-adduser.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ npm-adduser(1) -- Add a registry user account

## SYNOPSIS

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

## DESCRIPTION

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

### always-auth

Default: false

If specified, save configuration indicating that all requests to the given
registry should include authorization information. Useful for private
registries. Can be used with `--registry` and / or `--scope`, e.g.

npm adduser --registry=http://private-registry.example.com --always-auth

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

## SEE ALSO

* npm-registry(7)
Expand Down
1 change: 0 additions & 1 deletion deps/npm/doc/cli/npm-explore.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ The shell to run for the `npm explore` command.

## SEE ALSO

* npm-submodule(1)
* npm-folders(5)
* npm-edit(1)
* npm-rebuild(1)
Expand Down
5 changes: 4 additions & 1 deletion deps/npm/doc/cli/npm-init.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ npm-init(1) -- Interactively create a package.json file

## SYNOPSIS

npm init
npm init [-f|--force|-y|--yes]

## DESCRIPTION

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

If you invoke it with `-f`, `--force`, `-y`, or `--yes`, it will use only
defaults and not prompt you for any options.

## SEE ALSO

* <https://github.com/isaacs/init-package-json>
Expand Down
4 changes: 3 additions & 1 deletion deps/npm/doc/cli/npm-publish.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ npm-publish(1) -- Publish a package

## DESCRIPTION

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

By default npm will publish to the public registry. This can be overridden by
specifying a different default registry or using a `npm-scope(7)` in the name
Expand Down
7 changes: 2 additions & 5 deletions deps/npm/doc/cli/npm-restart.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,8 @@ npm-restart(1) -- Start a package

## DESCRIPTION

This runs a package's "restart" script, if one was provided.
Otherwise it runs package's "stop" script, if one was provided, and then
the "start" script.

If no version is specified, then it restarts the "active" version.
This runs a package's "restart" script, if one was provided. Otherwise it runs
package's "stop" script, if one was provided, and then the "start" script.

## SEE ALSO

Expand Down
10 changes: 10 additions & 0 deletions deps/npm/doc/cli/npm-run-script.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,16 @@ is provided, it will list the available top level scripts.
It is used by the test, start, restart, and stop commands, but can be
called directly, as well.

As of [`npm@2.0.0`](http://blog.npmjs.org/post/98131109725/npm-2-0-0), you can
use custom arguments when executing scripts. The special option `--` is used by
[getopt](http://goo.gl/KxMmtG) to delimit the end of the options. npm will pass
all the arguments after the `--` directly to your script:

npm run test -- --grep="pattern"

The arguments will only be passed to the script specified after ```npm run```
and not to any pre or post script.

## SEE ALSO

* npm-scripts(7)
Expand Down
Loading

0 comments on commit fcbbc7a

Please sign in to comment.