diff --git a/.gitignore b/.gitignore
index e00450690da..9dda73b2e4d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -45,6 +45,10 @@ ipch/
/test/addons/doc-*/
email.md
deps/v8-*
+deps/icu
+deps/icu*.zip
+deps/icu*.tgz
+deps/icu-tmp
./node_modules
.svn/
@@ -67,3 +71,4 @@ deps/zlib/zlib.target.mk
# test artifacts
tools/faketime
+icu_config.gypi
diff --git a/AUTHORS b/AUTHORS
index 5aa6137928e..ce538de7b5c 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -568,3 +568,4 @@ Kevin Simper
Any data published to The npm Registry (including user account information) may be removed or modified at the sole discretion of the npm server administrators.
@@ -161,7 +161,7 @@Be sure to include all of the output from the npm command that didn't work
as expected. The npm-debug.log
file is also helpful to provide.
Print the folder where npm will install executables.
This function should not be used programmatically. Instead, just refer
-to the npm.bin
member.
npm.bin
property.
@@ -28,5 +28,5 @@ This acts much the same ways as the npm-cache(1) command line +
This acts much the same ways as the npm-cache(1) command line functionality.
The callback is called with the package.json data of the thing that is eventually added to or read from the cache.
@@ -42,5 +42,5 @@man 3 npm-<command>
for programmatic usage.
To un-deprecate a package, specify an empty string (""
) for the message
argument.
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.
@@ -44,5 +44,5 @@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.
For example, to emulate the --dev flag, pass an object that looks like this:
@@ -37,5 +37,5 @@packages
parameter.
1.4.28
+2.1.6
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.
npm(1)
.
+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
+commands object: npm.commands.<cmd>
. See npm-index(7)
for a list of
all possible commands.
All commands on the command object take an array of positional argument strings. The last argument to any function is a callback. Some @@ -80,9 +79,9 @@
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 the error or results.
@@ -110,5 +109,5 @@Add a registry user account
npm adduser
+npm adduser [--registry=url] [--scope=@orgname] [--always-auth]
DESCRIPTION
-Create or verify a user named <username>
in the npm registry, and
-save the credentials to the .npmrc
file.
+Create or verify a user named <username>
in the specified registry, and
+save the credentials to the .npmrc
file. If no registry is specified,
+the default registry will be used (see npm-config(7)
).
The username, password, and email are read in from prompts.
You may use this command to change your email address, but not username
or password.
-To reset your password, go to https://npmjs.org/forgot
+To reset your password, go to https://www.npmjs.org/forgot
You may use this command multiple times with the same user account to
authorize on a new machine.
+npm login
is an alias to adduser
and behaves exactly the same way.
CONFIGURATION
registry
Default: http://registry.npmjs.org/
-The base URL of the npm package registry.
+The base URL of the npm package registry. If scope
is also specified,
+this registry will only be used for packages with that scope. See npm-scope(7)
.
+scope
+Default: none
+If specified, the user and login credentials given will be associated
+with the specified scope. See npm-scope(7)
. You can use both at the same time,
+e.g.
+npm adduser --registry=http://myregistry.example.com --scope=@myco
+
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)
-- npm-config(1)
-- npm-config(7)
-- npmrc(5)
-- npm-owner(1)
-- npm-whoami(1)
+- npm-registry(7)
+- npm-config(1)
+- npm-config(7)
+- npmrc(5)
+- npm-owner(1)
+- npm-whoami(1)
@@ -46,5 +67,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-bin.html b/deps/npm/html/doc/cli/npm-bin.html
index d6e055aaa3d..7f6e3a5c0dd 100644
--- a/deps/npm/html/doc/cli/npm-bin.html
+++ b/deps/npm/html/doc/cli/npm-bin.html
@@ -16,12 +16,12 @@ SYNOPSIS
Print the folder where npm will install executables.
SEE ALSO
-- npm-prefix(1)
-- npm-root(1)
-- npm-folders(5)
-- npm-config(1)
-- npm-config(7)
-- npmrc(5)
+- npm-prefix(1)
+- npm-root(1)
+- npm-folders(5)
+- npm-config(1)
+- npm-config(7)
+- npmrc(5)
@@ -35,5 +35,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-bugs.html b/deps/npm/html/doc/cli/npm-bugs.html
index 8693485aa3b..7758efa7264 100644
--- a/deps/npm/html/doc/cli/npm-bugs.html
+++ b/deps/npm/html/doc/cli/npm-bugs.html
@@ -33,14 +33,14 @@ registry
The base URL of the npm package registry.
SEE ALSO
-- npm-docs(1)
-- npm-view(1)
-- npm-publish(1)
-- npm-registry(7)
-- npm-config(1)
-- npm-config(7)
-- npmrc(5)
-- package.json(5)
+- npm-docs(1)
+- npm-view(1)
+- npm-publish(1)
+- npm-registry(7)
+- npm-config(1)
+- npm-config(7)
+- npmrc(5)
+- package.json(5)
@@ -54,5 +54,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-build.html b/deps/npm/html/doc/cli/npm-build.html
index 58dfd36fde0..ca62cb24651 100644
--- a/deps/npm/html/doc/cli/npm-build.html
+++ b/deps/npm/html/doc/cli/npm-build.html
@@ -21,10 +21,10 @@ DESCRIPTION
It should generally not be called directly.
SEE ALSO
-- npm-install(1)
-- npm-link(1)
-- npm-scripts(7)
-- package.json(5)
+- npm-install(1)
+- npm-link(1)
+- npm-scripts(7)
+- package.json(5)
@@ -38,5 +38,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-bundle.html b/deps/npm/html/doc/cli/npm-bundle.html
index 47355abbf21..9b833d0b6dd 100644
--- a/deps/npm/html/doc/cli/npm-bundle.html
+++ b/deps/npm/html/doc/cli/npm-bundle.html
@@ -17,7 +17,7 @@ DESCRIPTION
Just use npm install
now to do what npm bundle
used to do.
SEE ALSO
@@ -31,5 +31,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-cache.html b/deps/npm/html/doc/cli/npm-cache.html
index 3b84f979dcc..53835b35db3 100644
--- a/deps/npm/html/doc/cli/npm-cache.html
+++ b/deps/npm/html/doc/cli/npm-cache.html
@@ -61,13 +61,13 @@ cache
The root cache folder.
SEE ALSO
-- npm-folders(5)
-- npm-config(1)
-- npm-config(7)
-- npmrc(5)
-- npm-install(1)
-- npm-publish(1)
-- npm-pack(1)
+- npm-folders(5)
+- npm-config(1)
+- npm-config(7)
+- npmrc(5)
+- npm-install(1)
+- npm-publish(1)
+- npm-pack(1)
@@ -81,5 +81,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-completion.html b/deps/npm/html/doc/cli/npm-completion.html
index cc56d45623d..5a678ba352f 100644
--- a/deps/npm/html/doc/cli/npm-completion.html
+++ b/deps/npm/html/doc/cli/npm-completion.html
@@ -26,9 +26,9 @@ SYNOPSIS
completions based on the arguments.
SEE ALSO
@@ -42,5 +42,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-config.html b/deps/npm/html/doc/cli/npm-config.html
index 52efed825b9..d97845e708a 100644
--- a/deps/npm/html/doc/cli/npm-config.html
+++ b/deps/npm/html/doc/cli/npm-config.html
@@ -22,8 +22,8 @@ SYNOPSIS
npm gets its config settings from the command line, environment
variables, npmrc
files, and in some cases, the package.json
file.
See npmrc(5) for more information about the npmrc files.
-See npm-config(7)
for a more thorough discussion of the mechanisms
+
See npmrc(5) for more information about the npmrc files.
+See npm-config(7)
for a more thorough discussion of the mechanisms
involved.
The npm config
command can be used to update and edit the contents
of the user and global npmrc files.
In this case, npm-dedupe(1)
will transform the tree to:
In this case, npm-dedupe(1)
will transform the tree to:
a
+-- b
+-- d
@@ -47,9 +47,9 @@ SYNOPSIS
versions.
SEE ALSO
@@ -63,5 +63,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-deprecate.html b/deps/npm/html/doc/cli/npm-deprecate.html
index 01640248b57..8182c6ecf1b 100644
--- a/deps/npm/html/doc/cli/npm-deprecate.html
+++ b/deps/npm/html/doc/cli/npm-deprecate.html
@@ -23,8 +23,8 @@ SYNOPSIS
To un-deprecate a package, specify an empty string (""
) for the message
argument.
SEE ALSO
@@ -38,5 +38,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-docs.html b/deps/npm/html/doc/cli/npm-docs.html
index 05b445cdaed..e9f2c9e732e 100644
--- a/deps/npm/html/doc/cli/npm-docs.html
+++ b/deps/npm/html/doc/cli/npm-docs.html
@@ -36,13 +36,13 @@ registry
The base URL of the npm package registry.
SEE ALSO
-- npm-view(1)
-- npm-publish(1)
-- npm-registry(7)
-- npm-config(1)
-- npm-config(7)
-- npmrc(5)
-- package.json(5)
+- npm-view(1)
+- npm-publish(1)
+- npm-registry(7)
+- npm-config(1)
+- npm-config(7)
+- npmrc(5)
+- package.json(5)
@@ -56,5 +56,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-edit.html b/deps/npm/html/doc/cli/npm-edit.html
index 50d21486a0e..24a70fe7fc1 100644
--- a/deps/npm/html/doc/cli/npm-edit.html
+++ b/deps/npm/html/doc/cli/npm-edit.html
@@ -14,7 +14,7 @@ SYNOPSIS
npm edit <name>[@<version>]
DESCRIPTION
Opens the package folder in the default editor (or whatever you've
-configured as the npm editor
config -- see npm-config(7)
.)
+configured as the npm editor
config -- see npm-config(7)
.)
After it has been edited, the package is rebuilt so as to pick up any
changes in compiled packages.
For instance, you can do npm install connect
to install connect
@@ -30,12 +30,12 @@
editor
The command to run for npm edit
or npm config edit
.
SEE ALSO
-- npm-folders(5)
-- npm-explore(1)
-- npm-install(1)
-- npm-config(1)
-- npm-config(7)
-- npmrc(5)
+- npm-folders(5)
+- npm-explore(1)
+- npm-install(1)
+- npm-config(1)
+- npm-config(7)
+- npmrc(5)
@@ -49,5 +49,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-explore.html b/deps/npm/html/doc/cli/npm-explore.html
index c3c3127de6c..eeb49064486 100644
--- a/deps/npm/html/doc/cli/npm-explore.html
+++ b/deps/npm/html/doc/cli/npm-explore.html
@@ -31,12 +31,11 @@ shell
The shell to run for the npm explore
command.
SEE ALSO
-- npm-submodule(1)
-- npm-folders(5)
-- npm-edit(1)
-- npm-rebuild(1)
-- npm-build(1)
-- npm-install(1)
+- npm-folders(5)
+- npm-edit(1)
+- npm-rebuild(1)
+- npm-build(1)
+- npm-install(1)
@@ -50,5 +49,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-help-search.html b/deps/npm/html/doc/cli/npm-help-search.html
index d09aecf8c1b..2cf7506f03f 100644
--- a/deps/npm/html/doc/cli/npm-help-search.html
+++ b/deps/npm/html/doc/cli/npm-help-search.html
@@ -30,9 +30,9 @@ long
If false, then help-search will just list out the help topics found.
SEE ALSO
@@ -46,5 +46,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-help.html b/deps/npm/html/doc/cli/npm-help.html
index bb5a2e16677..12c6c0e8fd2 100644
--- a/deps/npm/html/doc/cli/npm-help.html
+++ b/deps/npm/html/doc/cli/npm-help.html
@@ -29,16 +29,16 @@ viewer
Set to "browser"
to view html help content in the default web browser.
SEE ALSO
-- npm(1)
-- README
-- npm-faq(7)
-- npm-folders(5)
-- npm-config(1)
-- npm-config(7)
-- npmrc(5)
-- package.json(5)
-- npm-help-search(1)
-- npm-index(7)
+- npm(1)
+- README
+- npm-faq(7)
+- npm-folders(5)
+- npm-config(1)
+- npm-config(7)
+- npmrc(5)
+- package.json(5)
+- npm-help-search(1)
+- npm-index(7)
@@ -52,5 +52,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-init.html b/deps/npm/html/doc/cli/npm-init.html
index ec53ca25679..e7640ea46c6 100644
--- a/deps/npm/html/doc/cli/npm-init.html
+++ b/deps/npm/html/doc/cli/npm-init.html
@@ -11,7 +11,7 @@
npm-init
Interactively create a package.json file
SYNOPSIS
-npm init
+npm init [-f|--force|-y|--yes]
DESCRIPTION
This will ask you a bunch of questions, and then write a package.json for you.
It attempts to make reasonable guesses about what you want things to be set to,
@@ -20,11 +20,13 @@
SYNOPSIS
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
-- package.json(5)
-- npm-version(1)
+- package.json(5)
+- npm-version(1)
@@ -38,5 +40,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-install.html b/deps/npm/html/doc/cli/npm-install.html
index 28b6afe39dd..3759f011559 100644
--- a/deps/npm/html/doc/cli/npm-install.html
+++ b/deps/npm/html/doc/cli/npm-install.html
@@ -15,21 +15,21 @@ SYNOPSIS
npm install <tarball file>
npm install <tarball url>
npm install <folder>
-npm install <name> [--save|--save-dev|--save-optional] [--save-exact]
-npm install <name>@<tag>
-npm install <name>@<version>
-npm install <name>@<version range>
+npm install [@<scope>/]<name> [--save|--save-dev|--save-optional] [--save-exact]
+npm install [@<scope>/]<name>@<tag>
+npm install [@<scope>/]<name>@<version>
+npm install [@<scope>/]<name>@<version range>
npm i (with any of the previous argument usage)
DESCRIPTION
This command installs a package, and any packages that it depends on. If the
package has a shrinkwrap file, the installation of dependencies will be driven
-by that. See npm-shrinkwrap(1).
+by that. See npm-shrinkwrap(1).
A package
is:
- a) a folder containing a program described by a package.json file
- b) a gzipped tarball containing (a)
- c) a url that resolves to (b)
-- d) a
<name>@<version>
that is published on the registry (see npm-registry(7)
) with (c)
+- d) a
<name>@<version>
that is published on the registry (see npm-registry(7)
) with (c)
- e) a
<name>@<tag>
that points to (d)
- f) a
<name>
that has a "latest" tag satisfying (e)
- g) a
<git remote url>
that resolves to (b)
@@ -64,9 +64,9 @@ SYNOPSIS
Example:
npm install https://github.com/indexzero/forever/tarball/v0.5.6
-npm install <name> [--save|--save-dev|--save-optional]
:
+npm install [@<scope>/]<name> [--save|--save-dev|--save-optional]
:
Do a <name>@<tag>
install, where <tag>
is the "tag" config. (See
- npm-config(7)
.)
+ npm-config(7)
.)
In most cases, this will install the latest version
of the module published on npm.
Example:
@@ -85,8 +85,16 @@ SYNOPSIS
--save-exact
: Saved dependencies will be configured with an
exact version rather than using npm's default semver range
operator.
+<scope>
is optional. The package will be downloaded from the registry
+associated with the specified scope. If no registry is associated with
+the given scope the default registry is assumed. See npm-scope(7)
.
+Note: if you do not include the @-symbol on your scope name, npm will
+interpret this as a GitHub repository instead, see below. Scopes names
+must also be followed by a slash.
Examples:
npm install sax --save
+npm install githubname/reponame
+npm install @myorg/privatepackage
npm install node-tap --save-dev
npm install dtrace-provider --save-optional
npm install readable-stream --save --save-exact
@@ -98,27 +106,38 @@ SYNOPSIS
working directory, then it will try to install that, and only try to
fetch the package by name if it is not valid.
-npm install <name>@<tag>
:
+npm install [@<scope>/]<name>@<tag>
:
Install the version of the package that is referenced by the specified tag.
If the tag does not exist in the registry data for that package, then this
will fail.
Example:
npm install sax@latest
+ npm install @myorg/mypackage@latest
-npm install <name>@<version>
:
- Install the specified version of the package. This will fail if the version
- has not been published to the registry.
+npm install [@<scope>/]<name>@<version>
:
+ Install the specified version of the package. This will fail if the
+ version has not been published to the registry.
Example:
npm install sax@0.1.1
+ npm install @myorg/privatepackage@1.5.0
-npm install <name>@<version range>
:
+npm install [@<scope>/]<name>@<version range>
:
Install a version of the package matching the specified version range. This
- will follow the same rules for resolving dependencies described in package.json(5)
.
+ will follow the same rules for resolving dependencies described in package.json(5)
.
Note that most version ranges must be put in quotes so that your shell will
treat it as a single argument.
Example:
npm install sax@">=0.1.0 <0.2.0"
+ npm install @myorg/privatepackage@">=0.1.0 <0.2.0"
+npm install <githubname>/<githubrepo>
:
+ Install the package at https://github.com/githubname/githubrepo" by
+ attempting to clone it using
git`.
+ Example:
+ npm install mygithubuser/myproject
+
To reference a package in a git repo that is not on GitHub, see git
+ remote urls below.
+
npm install <git remote url>
:
Install a package by cloning a git remote url. The format of the git
url is:
@@ -142,7 +161,7 @@ SYNOPSIS
local copy exists on disk.
npm install sax --force
The --global
argument will cause npm to install the package globally
-rather than locally. See npm-folders(5)
.
+rather than locally. See npm-folders(5)
.
The --link
argument will cause npm to link global installs into the
local space in some cases.
The --no-bin-links
argument will prevent npm from creating symlinks for
@@ -153,7 +172,7 @@
SYNOPSIS
shrinkwrap file and use the package.json instead.
The --nodedir=/path/to/node/source
argument will allow npm to find the
node source code so that npm can compile native modules.
-See npm-config(7)
. Many of the configuration params have some
+
See npm-config(7)
. Many of the configuration params have some
effect on installation, since that's most of what npm does.
ALGORITHM
To install a package, npm uses the following algorithm:
@@ -174,7 +193,7 @@ ALGORITHM
`-- D
That is, the dependency from B to C is satisfied by the fact that A already caused C to be installed at a higher level.
-See npm-folders(5) for a more detailed description of the specific +
See npm-folders(5) for a more detailed description of the specific folder structures that npm creates.
There are some very rare and pathological edge-cases where a cycle can @@ -194,19 +213,19 @@
Symlink a package folder
npm link (in package folder)
-npm link <pkgname>
+npm link [@<scope>/]<pkgname>
npm ln (with any of the previous argument usage)
Package linking is a two-step process.
First, npm link
in a package folder will create a globally-installed
-symbolic link from prefix/package-name
to the current folder.
prefix/package-name
to the current folder (see
+npm-config(7)
for the value of prefix
).
Next, in some other location, npm link package-name
will create a
symlink from the local node_modules
folder to the global symlink.
Note that package-name
is taken from package.json
,
not from directory name.
The package name can be optionally prefixed with a scope. See npm-scope(7)
.
+The scope must by preceded by an @-symbol and followed by a slash.
When creating tarballs for npm publish
, the linked packages are
"snapshotted" to their current state by resolving the symbolic links.
This is -handy for installing your own stuff, so that you can work on it and test it -iteratively without having to continually rebuild.
+This is handy for installing your own stuff, so that you can work on it and +test it iteratively without having to continually rebuild.
For example:
cd ~/projects/node-redis # go into the package directory
npm link # creates global link
@@ -43,16 +45,19 @@ SYNOPSIS
npm link redis
That is, it first creates a global link, and then links the global
installation target into your project's node_modules
folder.
If your linked package is scoped (see npm-scope(7)
) your link command must
+include that scope, e.g.
npm link @myorg/privatepackage
+
List installed packages
npm list [<pkg> ...]
-npm ls [<pkg> ...]
-npm la [<pkg> ...]
-npm ll [<pkg> ...]
+npm list [[@<scope>/]<pkg> ...]
+npm ls [[@<scope>/]<pkg> ...]
+npm la [[@<scope>/]<pkg> ...]
+npm ll [[@<scope>/]<pkg> ...]
DESCRIPTION
This command will print to stdout all the versions of packages that are
installed, as well as their dependencies, in a tree-structure.
@@ -22,7 +22,7 @@ SYNOPSIS
limit the results to only the paths to the packages named. Note that
nested packages will also show the paths to the specified packages.
For example, running npm ls promzard
in npm's source tree will show:
-npm@1.4.28 /path/to/npm
+npm@2.1.6 /path/to/npm
└─┬ init-package-json@0.0.4
└── promzard@0.1.5
It will print out extraneous, missing, and invalid packages.
@@ -63,15 +63,15 @@ depth
Max display depth of the dependency tree.
SEE ALSO
-- npm-config(1)
-- npm-config(7)
-- npmrc(5)
-- npm-folders(5)
-- npm-install(1)
-- npm-link(1)
-- npm-prune(1)
-- npm-outdated(1)
-- npm-update(1)
+- npm-config(1)
+- npm-config(7)
+- npmrc(5)
+- npm-folders(5)
+- npm-install(1)
+- npm-link(1)
+- npm-prune(1)
+- npm-outdated(1)
+- npm-update(1)
@@ -85,5 +85,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-outdated.html b/deps/npm/html/doc/cli/npm-outdated.html
index f4b3e1307e6..07a0a933d76 100644
--- a/deps/npm/html/doc/cli/npm-outdated.html
+++ b/deps/npm/html/doc/cli/npm-outdated.html
@@ -51,9 +51,9 @@ depth
Max depth for checking dependency tree.
SEE ALSO
@@ -67,5 +67,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-owner.html b/deps/npm/html/doc/cli/npm-owner.html
index 4dd7b386d63..3600e087f15 100644
--- a/deps/npm/html/doc/cli/npm-owner.html
+++ b/deps/npm/html/doc/cli/npm-owner.html
@@ -32,10 +32,10 @@ SYNOPSIS
that is not implemented at this time.
SEE ALSO
-- npm-publish(1)
-- npm-registry(7)
-- npm-adduser(1)
-- npm-disputes(7)
+- npm-publish(1)
+- npm-registry(7)
+- npm-adduser(1)
+- npm-disputes(7)
@@ -49,5 +49,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-pack.html b/deps/npm/html/doc/cli/npm-pack.html
index b5a68f27b7c..987ba3f792b 100644
--- a/deps/npm/html/doc/cli/npm-pack.html
+++ b/deps/npm/html/doc/cli/npm-pack.html
@@ -23,11 +23,11 @@ SYNOPSIS
If no arguments are supplied, then npm packs the current package folder.
SEE ALSO
-- npm-cache(1)
-- npm-publish(1)
-- npm-config(1)
-- npm-config(7)
-- npmrc(5)
+- npm-cache(1)
+- npm-publish(1)
+- npm-config(1)
+- npm-config(7)
+- npmrc(5)
@@ -41,5 +41,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-prefix.html b/deps/npm/html/doc/cli/npm-prefix.html
index 56ef84cbc93..7b6a3c58a51 100644
--- a/deps/npm/html/doc/cli/npm-prefix.html
+++ b/deps/npm/html/doc/cli/npm-prefix.html
@@ -11,17 +11,20 @@
npm-prefix
Display prefix
SYNOPSIS
-npm prefix
+npm prefix [-g]
DESCRIPTION
-Print the prefix to standard out.
+Print the local prefix to standard out. This is the closest parent directory
+to contain a package.json file unless -g
is also specified.
+If -g
is specified, this will be the value of the global prefix. See
+npm-config(7)
for more detail.
SEE ALSO
-- npm-root(1)
-- npm-bin(1)
-- npm-folders(5)
-- npm-config(1)
-- npm-config(7)
-- npmrc(5)
+- npm-root(1)
+- npm-bin(1)
+- npm-folders(5)
+- npm-config(1)
+- npm-config(7)
+- npmrc(5)
@@ -35,5 +38,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-prune.html b/deps/npm/html/doc/cli/npm-prune.html
index 9db5665b33b..dea291b4909 100644
--- a/deps/npm/html/doc/cli/npm-prune.html
+++ b/deps/npm/html/doc/cli/npm-prune.html
@@ -23,9 +23,9 @@ SYNOPSIS
packages specified in your devDependencies
.
SEE ALSO
@@ -39,5 +39,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-publish.html b/deps/npm/html/doc/cli/npm-publish.html
index 573f72314f0..e1b46d21d0b 100644
--- a/deps/npm/html/doc/cli/npm-publish.html
+++ b/deps/npm/html/doc/cli/npm-publish.html
@@ -14,7 +14,12 @@ SYNOPSIS
npm publish <tarball> [--tag <tag>]
npm publish <folder> [--tag <tag>]
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
+(see package.json(5)
).
<folder>
:
A folder containing a package.json file
@@ -30,17 +35,17 @@ SYNOPSIS
Fails if the package name and version combination already exists in
-the registry.
+the specified registry.
Once a package is published with a given name and version, that
specific name and version combination can never be used again, even if
-it is removed with npm-unpublish(1).
+it is removed with npm-unpublish(1).
SEE ALSO
-- npm-registry(7)
-- npm-adduser(1)
-- npm-owner(1)
-- npm-deprecate(1)
-- npm-tag(1)
+- npm-registry(7)
+- npm-adduser(1)
+- npm-owner(1)
+- npm-deprecate(1)
+- npm-tag(1)
@@ -54,5 +59,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-rebuild.html b/deps/npm/html/doc/cli/npm-rebuild.html
index 3334c695f8d..4da97a70518 100644
--- a/deps/npm/html/doc/cli/npm-rebuild.html
+++ b/deps/npm/html/doc/cli/npm-rebuild.html
@@ -23,8 +23,8 @@ DESCRIPTION
the new binary.
SEE ALSO
@@ -38,5 +38,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-repo.html b/deps/npm/html/doc/cli/npm-repo.html
index 3ad91979de1..02335b4f4a1 100644
--- a/deps/npm/html/doc/cli/npm-repo.html
+++ b/deps/npm/html/doc/cli/npm-repo.html
@@ -27,8 +27,8 @@ browser
The browser that is called by the npm repo
command to open websites.
SEE ALSO
@@ -42,5 +42,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-restart.html b/deps/npm/html/doc/cli/npm-restart.html
index 115765cb07c..d7536f81fdf 100644
--- a/deps/npm/html/doc/cli/npm-restart.html
+++ b/deps/npm/html/doc/cli/npm-restart.html
@@ -11,19 +11,17 @@
npm-restart
Start a package
SYNOPSIS
-npm restart <name>
+npm restart [-- <args>]
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
-- npm-run-script(1)
-- npm-scripts(7)
-- npm-test(1)
-- npm-start(1)
-- npm-stop(1)
+- npm-run-script(1)
+- npm-scripts(7)
+- npm-test(1)
+- npm-start(1)
+- npm-stop(1)
@@ -37,5 +35,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-rm.html b/deps/npm/html/doc/cli/npm-rm.html
index 8622174552d..3b28aaad4d3 100644
--- a/deps/npm/html/doc/cli/npm-rm.html
+++ b/deps/npm/html/doc/cli/npm-rm.html
@@ -20,12 +20,12 @@ SYNOPSIS
on its behalf.
SEE ALSO
-- npm-prune(1)
-- npm-install(1)
-- npm-folders(5)
-- npm-config(1)
-- npm-config(7)
-- npmrc(5)
+- npm-prune(1)
+- npm-install(1)
+- npm-folders(5)
+- npm-config(1)
+- npm-config(7)
+- npmrc(5)
@@ -39,5 +39,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-root.html b/deps/npm/html/doc/cli/npm-root.html
index b7be0eab402..f6b8b22dfcb 100644
--- a/deps/npm/html/doc/cli/npm-root.html
+++ b/deps/npm/html/doc/cli/npm-root.html
@@ -16,12 +16,12 @@ SYNOPSIS
Print the effective node_modules
folder to standard out.
SEE ALSO
-- npm-prefix(1)
-- npm-bin(1)
-- npm-folders(5)
-- npm-config(1)
-- npm-config(7)
-- npmrc(5)
+- npm-prefix(1)
+- npm-bin(1)
+- npm-folders(5)
+- npm-config(1)
+- npm-config(7)
+- npmrc(5)
@@ -35,5 +35,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-run-script.html b/deps/npm/html/doc/cli/npm-run-script.html
index efaed0d9455..8ca2ea2a5ed 100644
--- a/deps/npm/html/doc/cli/npm-run-script.html
+++ b/deps/npm/html/doc/cli/npm-run-script.html
@@ -11,8 +11,8 @@
npm-run-script
Run arbitrary package scripts
SYNOPSIS
-npm run-script [<pkg>] [command]
-npm run [<pkg>] [command]
+npm run-script [command] [-- <args>]
+npm run [command] [-- <args>]
DESCRIPTION
This runs an arbitrary command from a package's "scripts"
object.
If no package name is provided, it will search for a package.json
@@ -20,13 +20,20 @@
SYNOPSIS
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
, you can
+use custom arguments when executing scripts. The special option --
is used by
+getopt 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)
-- npm-test(1)
-- npm-start(1)
-- npm-restart(1)
-- npm-stop(1)
+- npm-scripts(7)
+- npm-test(1)
+- npm-start(1)
+- npm-restart(1)
+- npm-stop(1)
@@ -40,5 +47,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-search.html b/deps/npm/html/doc/cli/npm-search.html
index cbed4886460..f5fe720baa1 100644
--- a/deps/npm/html/doc/cli/npm-search.html
+++ b/deps/npm/html/doc/cli/npm-search.html
@@ -31,11 +31,11 @@ long
fall on multiple lines.
SEE ALSO
-- npm-registry(7)
-- npm-config(1)
-- npm-config(7)
-- npmrc(5)
-- npm-view(1)
+- npm-registry(7)
+- npm-config(1)
+- npm-config(7)
+- npmrc(5)
+- npm-view(1)
@@ -49,5 +49,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-shrinkwrap.html b/deps/npm/html/doc/cli/npm-shrinkwrap.html
index 37c8c9c05c8..fbfaa6c3dc0 100644
--- a/deps/npm/html/doc/cli/npm-shrinkwrap.html
+++ b/deps/npm/html/doc/cli/npm-shrinkwrap.html
@@ -120,7 +120,7 @@ Building shrinkwrapped packages
Run "npm shrinkwrap", commit the new npm-shrinkwrap.json, and
publish your package.
-You can use npm-outdated(1) to view dependencies with newer versions
+
You can use npm-outdated(1) to view dependencies with newer versions
available.
Other Notes
A shrinkwrap file must be consistent with the package's package.json
@@ -148,9 +148,9 @@
Caveats
contents rather than versions.
SEE ALSO
@@ -164,5 +164,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-star.html b/deps/npm/html/doc/cli/npm-star.html
index 5e98d0f272d..d3bbde5b9d6 100644
--- a/deps/npm/html/doc/cli/npm-star.html
+++ b/deps/npm/html/doc/cli/npm-star.html
@@ -20,9 +20,9 @@ SYNOPSIS
It's a boolean thing. Starring repeatedly has no additional effect.
SEE ALSO
@@ -36,5 +36,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-stars.html b/deps/npm/html/doc/cli/npm-stars.html
index c13ede22b8f..7873880f415 100644
--- a/deps/npm/html/doc/cli/npm-stars.html
+++ b/deps/npm/html/doc/cli/npm-stars.html
@@ -20,10 +20,10 @@ SYNOPSIS
you will most certainly enjoy this command.
SEE ALSO
-- npm-star(1)
-- npm-view(1)
-- npm-whoami(1)
-- npm-adduser(1)
+- npm-star(1)
+- npm-view(1)
+- npm-whoami(1)
+- npm-adduser(1)
@@ -37,5 +37,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-start.html b/deps/npm/html/doc/cli/npm-start.html
index 305050e41a6..0a3134bc82e 100644
--- a/deps/npm/html/doc/cli/npm-start.html
+++ b/deps/npm/html/doc/cli/npm-start.html
@@ -11,16 +11,16 @@
npm-start
Start a package
SYNOPSIS
-npm start <name>
+npm start [-- <args>]
DESCRIPTION
This runs a package's "start" script, if one was provided.
SEE ALSO
-- npm-run-script(1)
-- npm-scripts(7)
-- npm-test(1)
-- npm-restart(1)
-- npm-stop(1)
+- npm-run-script(1)
+- npm-scripts(7)
+- npm-test(1)
+- npm-restart(1)
+- npm-stop(1)
@@ -34,5 +34,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-stop.html b/deps/npm/html/doc/cli/npm-stop.html
index 519fa856ce3..01638ee4daf 100644
--- a/deps/npm/html/doc/cli/npm-stop.html
+++ b/deps/npm/html/doc/cli/npm-stop.html
@@ -11,16 +11,16 @@
npm-stop
Stop a package
SYNOPSIS
-npm stop <name>
+npm stop [-- <args>]
DESCRIPTION
This runs a package's "stop" script, if one was provided.
SEE ALSO
-- npm-run-script(1)
-- npm-scripts(7)
-- npm-test(1)
-- npm-start(1)
-- npm-restart(1)
+- npm-run-script(1)
+- npm-scripts(7)
+- npm-test(1)
+- npm-start(1)
+- npm-restart(1)
@@ -34,5 +34,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-submodule.html b/deps/npm/html/doc/cli/npm-submodule.html
index 6716c4a11cc..4ac55a88525 100644
--- a/deps/npm/html/doc/cli/npm-submodule.html
+++ b/deps/npm/html/doc/cli/npm-submodule.html
@@ -27,7 +27,7 @@ SYNOPSIS
dependencies into the submodule folder.
SEE ALSO
-- package.json(5)
+- package.json(5)
- git help submodule
@@ -42,5 +42,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-tag.html b/deps/npm/html/doc/cli/npm-tag.html
index 40a2ffe89fa..946d5fa767c 100644
--- a/deps/npm/html/doc/cli/npm-tag.html
+++ b/deps/npm/html/doc/cli/npm-tag.html
@@ -24,13 +24,13 @@ SYNOPSIS
Publishing a package always sets the "latest" tag to the published version.
SEE ALSO
-- npm-publish(1)
-- npm-install(1)
-- npm-dedupe(1)
-- npm-registry(7)
-- npm-config(1)
-- npm-config(7)
-- npmrc(5)
+- npm-publish(1)
+- npm-install(1)
+- npm-dedupe(1)
+- npm-registry(7)
+- npm-config(1)
+- npm-config(7)
+- npmrc(5)
@@ -44,5 +44,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-test.html b/deps/npm/html/doc/cli/npm-test.html
index cc3d56d010b..6c5467de51f 100644
--- a/deps/npm/html/doc/cli/npm-test.html
+++ b/deps/npm/html/doc/cli/npm-test.html
@@ -11,19 +11,19 @@
npm-test
Test a package
SYNOPSIS
- npm test <name>
- npm tst <name>
+ npm test [-- <args>]
+ npm tst [-- <args>]
DESCRIPTION
This runs a package's "test" script, if one was provided.
To run tests as a condition of installation, set the npat
config to
true.
SEE ALSO
-- npm-run-script(1)
-- npm-scripts(7)
-- npm-start(1)
-- npm-restart(1)
-- npm-stop(1)
+- npm-run-script(1)
+- npm-scripts(7)
+- npm-start(1)
+- npm-restart(1)
+- npm-stop(1)
@@ -37,5 +37,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-uninstall.html b/deps/npm/html/doc/cli/npm-uninstall.html
index 4f5a064606d..2a3c12c148d 100644
--- a/deps/npm/html/doc/cli/npm-uninstall.html
+++ b/deps/npm/html/doc/cli/npm-uninstall.html
@@ -11,7 +11,7 @@
npm-rm
Remove a package
SYNOPSIS
-npm uninstall <name> [--save|--save-dev|--save-optional]
+npm uninstall [@<scope>/]<package> [--save|--save-dev|--save-optional]
npm rm (with any of the previous argument usage)
DESCRIPTION
This uninstalls a package, completely removing everything npm installed
@@ -30,18 +30,20 @@
SYNOPSIS
--save-optional
: Package will be removed from your optionalDependencies
.
+Scope is optional and follows the usual rules for npm-scope(7)
.
Examples:
npm uninstall sax --save
+npm uninstall @myorg/privatepackage --save
npm uninstall node-tap --save-dev
npm uninstall dtrace-provider --save-optional
SEE ALSO
-- npm-prune(1)
-- npm-install(1)
-- npm-folders(5)
-- npm-config(1)
-- npm-config(7)
-- npmrc(5)
+- npm-prune(1)
+- npm-install(1)
+- npm-folders(5)
+- npm-config(1)
+- npm-config(7)
+- npmrc(5)
@@ -55,5 +57,5 @@ SYNOPSIS
-
+
diff --git a/deps/npm/html/doc/cli/npm-unpublish.html b/deps/npm/html/doc/cli/npm-unpublish.html
index be9430a15c5..59b278e23da 100644
--- a/deps/npm/html/doc/cli/npm-unpublish.html
+++ b/deps/npm/html/doc/cli/npm-unpublish.html
@@ -11,7 +11,7 @@
npm-unpublish
Remove a package from the registry
SYNOPSIS
-npm unpublish <name>[@<version>]
+npm unpublish [@<scope>/]<name>[@<version>]
WARNING
It is generally considered bad behavior to remove versions of a library
that others are depending on!
@@ -26,13 +26,14 @@ DESCRIPTION
Even if a package version is unpublished, that specific name and
version combination can never be reused. In order to publish the
package again, a new version number must be used.
+The scope is optional and follows the usual rules for npm-scope(7)
.
SEE ALSO
-- npm-deprecate(1)
-- npm-publish(1)
-- npm-registry(7)
-- npm-adduser(1)
-- npm-owner(1)
+- npm-deprecate(1)
+- npm-publish(1)
+- npm-registry(7)
+- npm-adduser(1)
+- npm-owner(1)
@@ -46,5 +47,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-update.html b/deps/npm/html/doc/cli/npm-update.html
index 650fd89f56d..5fa7846f534 100644
--- a/deps/npm/html/doc/cli/npm-update.html
+++ b/deps/npm/html/doc/cli/npm-update.html
@@ -16,15 +16,17 @@ SYNOPSIS
This command will update all the packages listed to the latest version
(specified by the tag
config).
It will also install missing packages.
-If the -g
flag is specified, this command will update globally installed packages.
-If no package name is specified, all packages in the specified location (global or local) will be updated.
+If the -g
flag is specified, this command will update globally installed
+packages.
+If no package name is specified, all packages in the specified location (global
+or local) will be updated.
SEE ALSO
-- npm-install(1)
-- npm-outdated(1)
-- npm-registry(7)
-- npm-folders(5)
-- npm-ls(1)
+- npm-install(1)
+- npm-outdated(1)
+- npm-registry(7)
+- npm-folders(5)
+- npm-ls(1)
@@ -38,5 +40,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-version.html b/deps/npm/html/doc/cli/npm-version.html
index 47ca7e58234..6477726f495 100644
--- a/deps/npm/html/doc/cli/npm-version.html
+++ b/deps/npm/html/doc/cli/npm-version.html
@@ -39,9 +39,9 @@ SYNOPSIS
Enter passphrase:
SEE ALSO
@@ -55,5 +55,5 @@ SYNOPSIS
-
+
diff --git a/deps/npm/html/doc/cli/npm-view.html b/deps/npm/html/doc/cli/npm-view.html
index c30cc69f126..3b87ba0be20 100644
--- a/deps/npm/html/doc/cli/npm-view.html
+++ b/deps/npm/html/doc/cli/npm-view.html
@@ -11,8 +11,8 @@
npm-view
View registry info
SYNOPSIS
-npm view <name>[@<version>] [<field>[.<subfield>]...]
-npm v <name>[@<version>] [<field>[.<subfield>]...]
+npm view [@<scope>/]<name>[@<version>] [<field>[.<subfield>]...]
+npm v [@<scope>/]<name>[@<version>] [<field>[.<subfield>]...]
DESCRIPTION
This command shows data about a package and prints it to the stream
referenced by the outfd
config, which defaults to stdout.
@@ -46,7 +46,7 @@ SYNOPSIS
npm view express contributors.name contributors.email
"Person" fields are shown as a string if they would be shown as an
object. So, for example, this will show the list of npm contributors in
-the shortened string format. (See package.json(5)
for more on this.)
+the shortened string format. (See package.json(5)
for more on this.)
npm view npm contributors
If a version range is provided, then data will be printed for every
matching version of the package. This will show which version of jsdom
@@ -63,12 +63,12 @@
SYNOPSIS
the field name.
SEE ALSO
-- npm-search(1)
-- npm-registry(7)
-- npm-config(1)
-- npm-config(7)
-- npmrc(5)
-- npm-docs(1)
+- npm-search(1)
+- npm-registry(7)
+- npm-config(1)
+- npm-config(7)
+- npmrc(5)
+- npm-docs(1)
@@ -82,5 +82,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-whoami.html b/deps/npm/html/doc/cli/npm-whoami.html
index 70dc893cd3e..a2705c40c3a 100644
--- a/deps/npm/html/doc/cli/npm-whoami.html
+++ b/deps/npm/html/doc/cli/npm-whoami.html
@@ -16,10 +16,10 @@ SYNOPSIS
Print the username
config to standard output.
SEE ALSO
-- npm-config(1)
-- npm-config(7)
-- npmrc(5)
-- npm-adduser(1)
+- npm-config(1)
+- npm-config(7)
+- npmrc(5)
+- npm-adduser(1)
@@ -33,5 +33,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm.html b/deps/npm/html/doc/cli/npm.html
index 36ae925064a..3bd3849d2ad 100644
--- a/deps/npm/html/doc/cli/npm.html
+++ b/deps/npm/html/doc/cli/npm.html
@@ -13,7 +13,7 @@ npm
node package manager
SYNOPSIS
npm <command> [args]
VERSION
-1.4.28
+2.1.6
DESCRIPTION
npm is the package manager for the Node JavaScript platform. It puts
modules in place so that node can find them, and manages dependency
@@ -25,7 +25,7 @@
DESCRIPTION
INTRODUCTION
You probably got npm because you want to install stuff.
Use npm install blerg
to install the latest version of "blerg". Check out
-npm-install(1)
for more info. It can do a lot of stuff.
+npm-install(1)
for more info. It can do a lot of stuff.
Use the npm search
command to show everything that's available.
Use npm ls
to show everything you've installed.
DEPENDENCIES
@@ -42,7 +42,7 @@ DEPENDENCIES
the node-gyp repository and
the node-gyp Wiki.
DIRECTORIES
-See npm-folders(5)
to learn about where npm puts stuff.
+See npm-folders(5)
to learn about where npm puts stuff.
In particular, npm has two modes of operation:
- global mode:
npm installs packages into the install prefix at
@@ -58,7 +58,7 @@ DEVELOPER USAGE
following help topics:
- json:
-Make a package.json file. See
package.json(5)
.
+Make a package.json file. See package.json(5)
.
- link:
For linking your current working code into Node's path, so that you
don't have to reinstall every time you make a change. Use
@@ -93,12 +93,12 @@
CONFIGURATION
- Defaults:
npm's default configuration options are defined in
lib/utils/config-defs.js. These must not be changed.
-See npm-config(7)
for much much more information.
+See npm-config(7)
for much much more information.
CONTRIBUTIONS
Patches welcome!
- code:
-Read through
npm-coding-style(7)
if you plan to submit code.
+Read through npm-coding-style(7)
if you plan to submit code.
You don't have to agree with it, but you do have to follow it.
- docs:
If you find an error in the documentation, edit the appropriate markdown
@@ -110,7 +110,7 @@
CONTRIBUTIONS
the issues list or ask on the mailing list.
BUGS
When you find issues, please report them:
@@ -118,7 +118,7 @@ BUGS
- web:
http://github.com/npm/npm/issues
- email:
-npm-@googlegroups.com
+npm-@googlegroups.com
Be sure to include all of the output from the npm command that didn't work
as expected. The npm-debug.log
file is also helpful to provide.
@@ -128,19 +128,19 @@ AUTHOR
Isaac Z. Schlueter ::
isaacs ::
@izs ::
-i@izs.me
+i@izs.me
SEE ALSO
-- npm-help(1)
-- npm-faq(7)
-- README
-- package.json(5)
-- npm-install(1)
-- npm-config(1)
-- npm-config(7)
-- npmrc(5)
-- npm-index(7)
-- npm(3)
+- npm-help(1)
+- npm-faq(7)
+- README
+- package.json(5)
+- npm-install(1)
+- npm-config(1)
+- npm-config(7)
+- npmrc(5)
+- npm-index(7)
+- npm(3)
@@ -154,5 +154,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/files/npm-folders.html b/deps/npm/html/doc/files/npm-folders.html
index 637b45c3821..ec320399971 100644
--- a/deps/npm/html/doc/files/npm-folders.html
+++ b/deps/npm/html/doc/files/npm-folders.html
@@ -41,6 +41,11 @@ Node Modules
Global installs on Unix systems go to {prefix}/lib/node_modules
.
Global installs on Windows go to {prefix}/node_modules
(that is, no
lib
folder.)
+Scoped packages are installed the same way, except they are grouped together
+in a sub-folder of the relevant node_modules
folder with the name of that
+scope prefix by the @ symbol, e.g. npm install @myorg/package
would place
+the package in {prefix}/node_modules/@myorg/package
. See scopes(7)
for
+more details.
If you wish to require()
a package, then install it locally.
Executables
When in global mode, executables are linked into {prefix}/bin
on Unix,
@@ -54,7 +59,7 @@
Man Pages
When in local mode, man pages are not installed.
Man pages are not installed on Windows systems.
Cache
-See npm-cache(1)
. Cache files are stored in ~/.npm
on Posix, or
+
See npm-cache(1)
. Cache files are stored in ~/.npm
on Posix, or
~/npm-cache
on Windows.
This is controlled by the cache
configuration param.
Temp Files
@@ -154,18 +159,18 @@ Publishing
not be included in the package tarball.
This allows a package maintainer to install all of their dependencies
(and dev dependencies) locally, but only re-publish those items that
-cannot be found elsewhere. See package.json(5)
for more information.
+cannot be found elsewhere. See package.json(5)
for more information.
SEE ALSO
-- npm-faq(7)
-- package.json(5)
-- npm-install(1)
-- npm-pack(1)
-- npm-cache(1)
-- npm-config(1)
-- npmrc(5)
-- npm-config(7)
-- npm-publish(1)
+- npm-faq(7)
+- package.json(5)
+- npm-install(1)
+- npm-pack(1)
+- npm-cache(1)
+- npm-config(1)
+- npmrc(5)
+- npm-config(7)
+- npm-publish(1)
@@ -179,5 +184,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/files/npm-global.html b/deps/npm/html/doc/files/npm-global.html
index 637b45c3821..90e5dcaf1dc 100644
--- a/deps/npm/html/doc/files/npm-global.html
+++ b/deps/npm/html/doc/files/npm-global.html
@@ -1,9 +1,9 @@
- npm-folders
+ npm-global
-
+
@@ -41,6 +41,11 @@ Node Modules
Global installs on Unix systems go to {prefix}/lib/node_modules
.
Global installs on Windows go to {prefix}/node_modules
(that is, no
lib
folder.)
+Scoped packages are installed the same way, except they are grouped together
+in a sub-folder of the relevant node_modules
folder with the name of that
+scope prefix by the @ symbol, e.g. npm install @myorg/package
would place
+the package in {prefix}/node_modules/@myorg/package
. See scopes(7)
for
+more details.
If you wish to require()
a package, then install it locally.
Executables
When in global mode, executables are linked into {prefix}/bin
on Unix,
@@ -54,7 +59,7 @@
Man Pages
When in local mode, man pages are not installed.
Man pages are not installed on Windows systems.
Cache
-See npm-cache(1)
. Cache files are stored in ~/.npm
on Posix, or
+
See npm-cache(1)
. Cache files are stored in ~/.npm
on Posix, or
~/npm-cache
on Windows.
This is controlled by the cache
configuration param.
Temp Files
@@ -154,18 +159,18 @@ Publishing
not be included in the package tarball.
This allows a package maintainer to install all of their dependencies
(and dev dependencies) locally, but only re-publish those items that
-cannot be found elsewhere. See package.json(5)
for more information.
+cannot be found elsewhere. See package.json(5)
for more information.
SEE ALSO
-- npm-faq(7)
-- package.json(5)
-- npm-install(1)
-- npm-pack(1)
-- npm-cache(1)
-- npm-config(1)
-- npmrc(5)
-- npm-config(7)
-- npm-publish(1)
+- npm-faq(7)
+- package.json(5)
+- npm-install(1)
+- npm-pack(1)
+- npm-cache(1)
+- npm-config(1)
+- npmrc(5)
+- npm-config(7)
+- npm-publish(1)
@@ -179,5 +184,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/files/npm-json.html b/deps/npm/html/doc/files/npm-json.html
index 129661d526f..ade4fd07ec4 100644
--- a/deps/npm/html/doc/files/npm-json.html
+++ b/deps/npm/html/doc/files/npm-json.html
@@ -1,9 +1,9 @@
- package.json
+ npm-json
-
+
@@ -14,7 +14,7 @@ DESCRIPTION
This document is all you need to know about what's required in your package.json
file. It must be actual JSON, not just a JavaScript object literal.
A lot of the behavior described in this document is affected by the config
-settings described in npm-config(7)
.
+settings described in npm-config(7)
.
name
The most important things in your package.json are the name and version fields.
Those are actually required, and your package won't install without
@@ -34,6 +34,8 @@
name
You may want to check the npm registry to see if there's something by that name
already, before you get too attached to it. http://registry.npmjs.org/
+A name can be optionally prefixed by a scope, e.g. @myorg/mypackage
. See
+npm-scope(7)
for more detail.
version
The most important things in your package.json are the name and version fields.
Those are actually required, and your package won't install without
@@ -43,7 +45,7 @@
version
Version must be parseable by
node-semver, which is bundled
with npm as a dependency. (npm install semver
to use it yourself.)
-More on version numbers and ranges at semver(7).
+More on version numbers and ranges at semver(7).
description
Put a description in it. It's a string. This helps people discover your
package, as it's listed in npm search
.
@@ -159,16 +161,16 @@ bin
directories
The CommonJS Packages spec details a
few ways that you can indicate the structure of your package using a directories
-hash. If you look at npm's package.json,
+object. If you look at npm's package.json,
you'll see that it has directories for doc, lib, and man.
In the future, this information may be used in other creative ways.
directories.lib
Tell people where the bulk of your library is. Nothing special is done
with the lib folder in any way, but it's useful meta info.
directories.bin
-If you specify a "bin" directory, then all the files in that folder will
-be used as the "bin" hash.
-If you have a "bin" hash already, then this has no effect.
+If you specify a bin
directory, then all the files in that folder will
+be added as children of the bin
path.
+If you have a bin
path already, then this has no effect.
directories.man
A folder that is full of man pages. Sugar to generate a "man" array by
walking the folder.
@@ -195,37 +197,37 @@ repository
directly to a VCS program without any modification. It should not be a url to an
html project page that you put in your browser. It's for computers.
scripts
-The "scripts" member is an object hash of script commands that are run
+
The "scripts" property is a dictionary containing script commands that are run
at various times in the lifecycle of your package. The key is the lifecycle
event, and the value is the command to run at that point.
-See npm-scripts(7)
to find out more about writing package scripts.
+See npm-scripts(7)
to find out more about writing package scripts.
config
-A "config" hash can be used to set configuration
-parameters used in package scripts that persist across upgrades. For
-instance, if a package had the following:
+A "config" object can be used to set configuration parameters used in package
+scripts that persist across upgrades. For instance, if a package had the
+following:
{ "name" : "foo"
, "config" : { "port" : "8080" } }
and then had a "start" command that then referenced the
npm_package_config_port
environment variable, then the user could
override that by doing npm config set foo:port 8001
.
-See npm-config(7)
and npm-scripts(7)
for more on package
+
See npm-config(7)
and npm-scripts(7)
for more on package
configs.
dependencies
-Dependencies are specified with a simple hash of package name to
+
Dependencies are specified in a simple object that maps a package name to a
version range. The version range is a string which has one or more
-space-separated descriptors. Dependencies can also be identified with
-a tarball or git URL.
+space-separated descriptors. Dependencies can also be identified with a
+tarball or git URL.
Please do not put test harnesses or transpilers in your
-dependencies
hash. See devDependencies
, below.
-See semver(7) for more details about specifying version ranges.
+dependencies
object. See devDependencies
, below.
+See semver(7) for more details about specifying version ranges.
version
Must match version
exactly
>version
Must be greater than version
>=version
etc
<version
<=version
-~version
"Approximately equivalent to version" See semver(7)
-^version
"Compatible with version" See semver(7)
+~version
"Approximately equivalent to version" See semver(7)
+^version
"Compatible with version" See semver(7)
1.2.x
1.2.0, 1.2.1, etc., but not 1.3.0
http://...
See 'URLs as Dependencies' below
*
Matches any version
@@ -234,6 +236,8 @@ dependencies
range1 || range2
Passes if either range1 or range2 are satisfied.
git...
See 'Git URLs as Dependencies' below
user/repo
See 'GitHub URLs' below
+tag
A specific version tagged and published as tag
See npm-tag(1)
+path/path/path
See Local Paths below
For example, these are all valid:
{ "dependencies" :
@@ -247,6 +251,8 @@ dependencies
, "elf" : "~1.2.3"
, "two" : "2.x"
, "thr" : "3.3.x"
+ , "lat" : "latest"
+ , "dyl" : "file:../dyl"
}
}
URLs as Dependencies
@@ -271,15 +277,35 @@ GitHub URLs
"express": "visionmedia/express"
}
}
-
devDependencies
+
Local Paths
+As of version 2.0.0 you can provide a path to a local directory that contains a
+package. Local paths can be saved using npm install --save
, using any of
+these forms:
+../foo/bar
+~/foo/bar
+./foo/bar
+/foo/bar
+
in which case they will be normalized to a relative path and added to your
+package.json
. For example:
+{
+ "name": "baz",
+ "dependencies": {
+ "bar": "file:../foo/bar"
+ }
+}
+
This feature is helpful for local offline development and creating
+tests that require npm installing where you don't want to hit an
+external server, but should not be used when publishing packages
+to the public registry.
+devDependencies
If someone is planning on downloading and using your module in their
program, then they probably don't want or need to download and build
the external test or documentation framework that you use.
-In this case, it's best to list these additional items in a
-devDependencies
hash.
+In this case, it's best to map these additional items in a devDependencies
+object.
These things will be installed when doing npm link
or npm install
from the root of a package, and can be managed like any other npm
-configuration param. See npm-config(7)
for more on the topic.
+configuration param. See npm-config(7)
for more on the topic.
For build steps that are not platform-specific, such as compiling
CoffeeScript or other languages to JavaScript, use the prepublish
script to do this, and make the required package a devDependency.
@@ -329,11 +355,11 @@ bundledDependencies
Array of package names that will be bundled when publishing the package.
If this is spelled "bundleDependencies"
, then that is also honorable.
optionalDependencies
-If a dependency can be used, but you would like npm to proceed if it
-cannot be found or fails to install, then you may put it in the
-optionalDependencies
hash. This is a map of package name to version
-or url, just like the dependencies
hash. The difference is that
-failure is tolerated.
+If a dependency can be used, but you would like npm to proceed if it cannot be
+found or fails to install, then you may put it in the optionalDependencies
+object. This is a map of package name to version or url, just like the
+dependencies
object. The difference is that build failures do not cause
+installation to fail.
It is still your program's responsibility to handle the lack of the
dependency. For example, something like this:
try {
@@ -368,11 +394,11 @@ engines
field is advisory only.
engineStrict
If you are sure that your module will definitely not run properly on
-versions of Node/npm other than those specified in the engines
hash,
+versions of Node/npm other than those specified in the engines
object,
then you can set "engineStrict": true
in your package.json file.
This will override the user's engine-strict
config setting.
Please do not do this unless you are really very very sure. If your
-engines hash is something overly restrictive, you can quite easily and
+engines object is something overly restrictive, you can quite easily and
inadvertently lock yourself into obscurity and prevent your users from
updating to new versions of Node. Consider this choice carefully. If
people abuse it, it will be removed in a future version of npm.
@@ -402,11 +428,11 @@ preferGlobal
private
If you set "private": true
in your package.json, then npm will refuse
to publish it.
-This is a way to prevent accidental publication of private repositories.
-If you would like to ensure that a given package is only ever published
-to a specific registry (for example, an internal registry),
-then use the publishConfig
hash described below
-to override the registry
config param at publish-time.
+This is a way to prevent accidental publication of private repositories. If
+you would like to ensure that a given package is only ever published to a
+specific registry (for example, an internal registry), then use the
+publishConfig
dictionary described below to override the registry
config
+param at publish-time.
publishConfig
This is a set of config values that will be used at publish-time. It's
especially handy if you want to set the tag or registry, so that you can
@@ -414,7 +440,7 @@
publishConfig
the global public registry by default.
Any config values can be overridden, but of course only "tag" and
"registry" probably matter for the purposes of publishing.
-See npm-config(7)
to see the list of config options that can be
+
See npm-config(7)
to see the list of config options that can be
overridden.
DEFAULT VALUES
npm will default some values based on package contents.
@@ -436,16 +462,16 @@ DEFAULT VALUES
SEE ALSO
-- semver(7)
-- npm-init(1)
-- npm-version(1)
-- npm-config(1)
-- npm-config(7)
-- npm-help(1)
-- npm-faq(7)
-- npm-install(1)
-- npm-publish(1)
-- npm-rm(1)
+- semver(7)
+- npm-init(1)
+- npm-version(1)
+- npm-config(1)
+- npm-config(7)
+- npm-help(1)
+- npm-faq(7)
+- npm-install(1)
+- npm-publish(1)
+- npm-rm(1)
@@ -459,5 +485,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/files/npmrc.html b/deps/npm/html/doc/files/npmrc.html
index ee029cfe8f9..9f379006f09 100644
--- a/deps/npm/html/doc/files/npmrc.html
+++ b/deps/npm/html/doc/files/npmrc.html
@@ -15,7 +15,7 @@ DESCRIPTION
variables, and npmrc
files.
The npm config
command can be used to update and edit the contents
of the user and global npmrc files.
-For a list of available configuration options, see npm-config(7).
+For a list of available configuration options, see npm-config(7).
FILES
The four relevant files are:
@@ -55,11 +55,11 @@ Built-in config file
manner.
SEE ALSO
-- npm-folders(5)
-- npm-config(1)
-- npm-config(7)
-- package.json(5)
-- npm(1)
+- npm-folders(5)
+- npm-config(1)
+- npm-config(7)
+- package.json(5)
+- npm(1)
@@ -73,5 +73,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/files/package.json.html b/deps/npm/html/doc/files/package.json.html
index 129661d526f..183ad8ea5d6 100644
--- a/deps/npm/html/doc/files/package.json.html
+++ b/deps/npm/html/doc/files/package.json.html
@@ -14,7 +14,7 @@ DESCRIPTION
This document is all you need to know about what's required in your package.json
file. It must be actual JSON, not just a JavaScript object literal.
A lot of the behavior described in this document is affected by the config
-settings described in npm-config(7)
.
+settings described in npm-config(7)
.
name
The most important things in your package.json are the name and version fields.
Those are actually required, and your package won't install without
@@ -34,6 +34,8 @@
name
- You may want to check the npm registry to see if there's something by that name
already, before you get too attached to it. http://registry.npmjs.org/
+A name can be optionally prefixed by a scope, e.g. @myorg/mypackage
. See
+npm-scope(7)
for more detail.
version
The most important things in your package.json are the name and version fields.
Those are actually required, and your package won't install without
@@ -43,7 +45,7 @@
version
Version must be parseable by
node-semver, which is bundled
with npm as a dependency. (npm install semver
to use it yourself.)
-More on version numbers and ranges at semver(7).
+More on version numbers and ranges at semver(7).
description
Put a description in it. It's a string. This helps people discover your
package, as it's listed in npm search
.
@@ -159,16 +161,16 @@ bin
directories
The CommonJS Packages spec details a
few ways that you can indicate the structure of your package using a directories
-hash. If you look at npm's package.json,
+object. If you look at npm's package.json,
you'll see that it has directories for doc, lib, and man.
In the future, this information may be used in other creative ways.
directories.lib
Tell people where the bulk of your library is. Nothing special is done
with the lib folder in any way, but it's useful meta info.
directories.bin
-If you specify a "bin" directory, then all the files in that folder will
-be used as the "bin" hash.
-If you have a "bin" hash already, then this has no effect.
+If you specify a bin
directory, then all the files in that folder will
+be added as children of the bin
path.
+If you have a bin
path already, then this has no effect.
directories.man
A folder that is full of man pages. Sugar to generate a "man" array by
walking the folder.
@@ -195,37 +197,37 @@ repository
directly to a VCS program without any modification. It should not be a url to an
html project page that you put in your browser. It's for computers.
scripts
-The "scripts" member is an object hash of script commands that are run
+
The "scripts" property is a dictionary containing script commands that are run
at various times in the lifecycle of your package. The key is the lifecycle
event, and the value is the command to run at that point.
-See npm-scripts(7)
to find out more about writing package scripts.
+See npm-scripts(7)
to find out more about writing package scripts.
config
-A "config" hash can be used to set configuration
-parameters used in package scripts that persist across upgrades. For
-instance, if a package had the following:
+A "config" object can be used to set configuration parameters used in package
+scripts that persist across upgrades. For instance, if a package had the
+following:
{ "name" : "foo"
, "config" : { "port" : "8080" } }
and then had a "start" command that then referenced the
npm_package_config_port
environment variable, then the user could
override that by doing npm config set foo:port 8001
.
-See npm-config(7)
and npm-scripts(7)
for more on package
+
See npm-config(7)
and npm-scripts(7)
for more on package
configs.
dependencies
-Dependencies are specified with a simple hash of package name to
+
Dependencies are specified in a simple object that maps a package name to a
version range. The version range is a string which has one or more
-space-separated descriptors. Dependencies can also be identified with
-a tarball or git URL.
+space-separated descriptors. Dependencies can also be identified with a
+tarball or git URL.
Please do not put test harnesses or transpilers in your
-dependencies
hash. See devDependencies
, below.
-See semver(7) for more details about specifying version ranges.
+dependencies
object. See devDependencies
, below.
+See semver(7) for more details about specifying version ranges.
version
Must match version
exactly
>version
Must be greater than version
>=version
etc
<version
<=version
-~version
"Approximately equivalent to version" See semver(7)
-^version
"Compatible with version" See semver(7)
+~version
"Approximately equivalent to version" See semver(7)
+^version
"Compatible with version" See semver(7)
1.2.x
1.2.0, 1.2.1, etc., but not 1.3.0
http://...
See 'URLs as Dependencies' below
*
Matches any version
@@ -234,6 +236,8 @@ dependencies
range1 || range2
Passes if either range1 or range2 are satisfied.
git...
See 'Git URLs as Dependencies' below
user/repo
See 'GitHub URLs' below
+tag
A specific version tagged and published as tag
See npm-tag(1)
+path/path/path
See Local Paths below
For example, these are all valid:
{ "dependencies" :
@@ -247,6 +251,8 @@ dependencies
, "elf" : "~1.2.3"
, "two" : "2.x"
, "thr" : "3.3.x"
+ , "lat" : "latest"
+ , "dyl" : "file:../dyl"
}
}
URLs as Dependencies
@@ -271,15 +277,35 @@ GitHub URLs
"express": "visionmedia/express"
}
}
-
devDependencies
+
Local Paths
+As of version 2.0.0 you can provide a path to a local directory that contains a
+package. Local paths can be saved using npm install --save
, using any of
+these forms:
+../foo/bar
+~/foo/bar
+./foo/bar
+/foo/bar
+
in which case they will be normalized to a relative path and added to your
+package.json
. For example:
+{
+ "name": "baz",
+ "dependencies": {
+ "bar": "file:../foo/bar"
+ }
+}
+
This feature is helpful for local offline development and creating
+tests that require npm installing where you don't want to hit an
+external server, but should not be used when publishing packages
+to the public registry.
+devDependencies
If someone is planning on downloading and using your module in their
program, then they probably don't want or need to download and build
the external test or documentation framework that you use.
-In this case, it's best to list these additional items in a
-devDependencies
hash.
+In this case, it's best to map these additional items in a devDependencies
+object.
These things will be installed when doing npm link
or npm install
from the root of a package, and can be managed like any other npm
-configuration param. See npm-config(7)
for more on the topic.
+configuration param. See npm-config(7)
for more on the topic.
For build steps that are not platform-specific, such as compiling
CoffeeScript or other languages to JavaScript, use the prepublish
script to do this, and make the required package a devDependency.
@@ -329,11 +355,11 @@ bundledDependencies
Array of package names that will be bundled when publishing the package.
If this is spelled "bundleDependencies"
, then that is also honorable.
optionalDependencies
-If a dependency can be used, but you would like npm to proceed if it
-cannot be found or fails to install, then you may put it in the
-optionalDependencies
hash. This is a map of package name to version
-or url, just like the dependencies
hash. The difference is that
-failure is tolerated.
+If a dependency can be used, but you would like npm to proceed if it cannot be
+found or fails to install, then you may put it in the optionalDependencies
+object. This is a map of package name to version or url, just like the
+dependencies
object. The difference is that build failures do not cause
+installation to fail.
It is still your program's responsibility to handle the lack of the
dependency. For example, something like this:
try {
@@ -368,11 +394,11 @@ engines
field is advisory only.
engineStrict
If you are sure that your module will definitely not run properly on
-versions of Node/npm other than those specified in the engines
hash,
+versions of Node/npm other than those specified in the engines
object,
then you can set "engineStrict": true
in your package.json file.
This will override the user's engine-strict
config setting.
Please do not do this unless you are really very very sure. If your
-engines hash is something overly restrictive, you can quite easily and
+engines object is something overly restrictive, you can quite easily and
inadvertently lock yourself into obscurity and prevent your users from
updating to new versions of Node. Consider this choice carefully. If
people abuse it, it will be removed in a future version of npm.
@@ -402,11 +428,11 @@ preferGlobal
private
If you set "private": true
in your package.json, then npm will refuse
to publish it.
-This is a way to prevent accidental publication of private repositories.
-If you would like to ensure that a given package is only ever published
-to a specific registry (for example, an internal registry),
-then use the publishConfig
hash described below
-to override the registry
config param at publish-time.
+This is a way to prevent accidental publication of private repositories. If
+you would like to ensure that a given package is only ever published to a
+specific registry (for example, an internal registry), then use the
+publishConfig
dictionary described below to override the registry
config
+param at publish-time.
publishConfig
This is a set of config values that will be used at publish-time. It's
especially handy if you want to set the tag or registry, so that you can
@@ -414,7 +440,7 @@
publishConfig
the global public registry by default.
Any config values can be overridden, but of course only "tag" and
"registry" probably matter for the purposes of publishing.
-See npm-config(7)
to see the list of config options that can be
+
See npm-config(7)
to see the list of config options that can be
overridden.
DEFAULT VALUES
npm will default some values based on package contents.
@@ -436,16 +462,16 @@ DEFAULT VALUES
SEE ALSO
-- semver(7)
-- npm-init(1)
-- npm-version(1)
-- npm-config(1)
-- npm-config(7)
-- npm-help(1)
-- npm-faq(7)
-- npm-install(1)
-- npm-publish(1)
-- npm-rm(1)
+- semver(7)
+- npm-init(1)
+- npm-version(1)
+- npm-config(1)
+- npm-config(7)
+- npm-help(1)
+- npm-faq(7)
+- npm-install(1)
+- npm-publish(1)
+- npm-rm(1)
@@ -459,5 +485,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/index.html b/deps/npm/html/doc/index.html
index 90c300c88f3..6c68895e073 100644
--- a/deps/npm/html/doc/index.html
+++ b/deps/npm/html/doc/index.html
@@ -1,6 +1,6 @@
- npm-index
+ index
@@ -10,215 +10,213 @@
npm-index
Index of all npm documentation
-README
+README
node package manager
Command Line Documentation
Using npm on the command line
-npm(1)
+npm(1)
node package manager
-npm-adduser(1)
+npm-adduser(1)
Add a registry user account
-npm-bin(1)
+npm-bin(1)
Display npm bin folder
-npm-bugs(1)
+npm-bugs(1)
Bugs for a package in a web browser maybe
-npm-build(1)
+npm-build(1)
Build a package
-npm-bundle(1)
+npm-bundle(1)
REMOVED
-npm-cache(1)
+npm-cache(1)
Manipulates packages cache
-npm-completion(1)
+npm-completion(1)
Tab Completion for npm
-npm-config(1)
+npm-config(1)
Manage the npm configuration files
-npm-dedupe(1)
+npm-dedupe(1)
Reduce duplication
-npm-deprecate(1)
+npm-deprecate(1)
Deprecate a version of a package
-npm-docs(1)
+npm-docs(1)
Docs for a package in a web browser maybe
-npm-edit(1)
+npm-edit(1)
Edit an installed package
-npm-explore(1)
+npm-explore(1)
Browse an installed package
-npm-help-search(1)
+npm-help-search(1)
Search npm help documentation
-npm-help(1)
+npm-help(1)
Get help on npm
-npm-init(1)
+npm-init(1)
Interactively create a package.json file
-npm-install(1)
+npm-install(1)
Install a package
-npm-link(1)
+npm-link(1)
Symlink a package folder
-npm-ls(1)
+npm-ls(1)
List installed packages
-npm-outdated(1)
+npm-outdated(1)
Check for outdated packages
-npm-owner(1)
+npm-owner(1)
Manage package owners
-npm-pack(1)
+npm-pack(1)
Create a tarball from a package
-npm-prefix(1)
+npm-prefix(1)
Display prefix
-npm-prune(1)
+npm-prune(1)
Remove extraneous packages
-npm-publish(1)
+npm-publish(1)
Publish a package
-npm-rebuild(1)
+npm-rebuild(1)
Rebuild a package
-npm-repo(1)
+npm-repo(1)
Open package repository page in the browser
-npm-restart(1)
+npm-restart(1)
Start a package
-npm-rm(1)
+npm-rm(1)
Remove a package
-npm-root(1)
+npm-root(1)
Display npm root
-npm-run-script(1)
+npm-run-script(1)
Run arbitrary package scripts
-npm-search(1)
+npm-search(1)
Search for packages
-npm-shrinkwrap(1)
+npm-shrinkwrap(1)
Lock down dependency versions
-npm-star(1)
+npm-star(1)
Mark your favorite packages
-npm-stars(1)
+npm-stars(1)
View packages marked as favorites
-npm-start(1)
+npm-start(1)
Start a package
-npm-stop(1)
+npm-stop(1)
Stop a package
-npm-submodule(1)
-Add a package as a git submodule
-npm-tag(1)
+npm-tag(1)
Tag a published version
-npm-test(1)
+npm-test(1)
Test a package
-npm-uninstall(1)
+npm-uninstall(1)
Remove a package
-npm-unpublish(1)
+npm-unpublish(1)
Remove a package from the registry
-npm-update(1)
+npm-update(1)
Update a package
-npm-version(1)
+npm-version(1)
Bump a package version
-npm-view(1)
+npm-view(1)
View registry info
-npm-whoami(1)
+npm-whoami(1)
Display npm username
API Documentation
Using npm in your Node programs
-npm(3)
+npm(3)
node package manager
-npm-bin(3)
+npm-bin(3)
Display npm bin folder
-npm-bugs(3)
+npm-bugs(3)
Bugs for a package in a web browser maybe
-npm-cache(3)
+npm-cache(3)
manage the npm cache programmatically
-npm-commands(3)
+npm-commands(3)
npm commands
-npm-config(3)
+npm-config(3)
Manage the npm configuration files
-npm-deprecate(3)
+npm-deprecate(3)
Deprecate a version of a package
-npm-docs(3)
+npm-docs(3)
Docs for a package in a web browser maybe
-npm-edit(3)
+npm-edit(3)
Edit an installed package
-npm-explore(3)
+npm-explore(3)
Browse an installed package
-npm-help-search(3)
+npm-help-search(3)
Search the help pages
-npm-init(3)
+npm-init(3)
Interactively create a package.json file
-npm-install(3)
+npm-install(3)
install a package programmatically
-npm-link(3)
+npm-link(3)
Symlink a package folder
-npm-load(3)
+npm-load(3)
Load config settings
-npm-ls(3)
+npm-ls(3)
List installed packages
-npm-outdated(3)
+npm-outdated(3)
Check for outdated packages
-npm-owner(3)
+npm-owner(3)
Manage package owners
-npm-pack(3)
+npm-pack(3)
Create a tarball from a package
-npm-prefix(3)
+npm-prefix(3)
Display prefix
-npm-prune(3)
+npm-prune(3)
Remove extraneous packages
-npm-publish(3)
+npm-publish(3)
Publish a package
-npm-rebuild(3)
+npm-rebuild(3)
Rebuild a package
-npm-repo(3)
+npm-repo(3)
Open package repository page in the browser
-npm-restart(3)
+npm-restart(3)
Start a package
-npm-root(3)
+npm-root(3)
Display npm root
-npm-run-script(3)
+npm-run-script(3)
Run arbitrary package scripts
-npm-search(3)
+npm-search(3)
Search for packages
-npm-shrinkwrap(3)
+npm-shrinkwrap(3)
programmatically generate package shrinkwrap file
-npm-start(3)
+npm-start(3)
Start a package
-npm-stop(3)
+npm-stop(3)
Stop a package
-npm-submodule(3)
-Add a package as a git submodule
-npm-tag(3)
+npm-tag(3)
Tag a published version
-npm-test(3)
+npm-test(3)
Test a package
-npm-uninstall(3)
+npm-uninstall(3)
uninstall a package programmatically
-npm-unpublish(3)
+npm-unpublish(3)
Remove a package from the registry
-npm-update(3)
+npm-update(3)
Update a package
-npm-version(3)
+npm-version(3)
Bump a package version
-npm-view(3)
+npm-view(3)
View registry info
-npm-whoami(3)
+npm-whoami(3)
Display npm username
Files
File system structures npm uses
-npm-folders(5)
+npm-folders(5)
Folder Structures Used by npm
-npmrc(5)
+npmrc(5)
The npm config files
-package.json(5)
+package.json(5)
Specifics of npm's package.json handling
Misc
Various other bits and bobs
-npm-coding-style(7)
+npm-coding-style(7)
npm's "funny" coding style
-npm-config(7)
+npm-config(7)
More than you probably want to know about npm configuration
-npm-developers(7)
+npm-developers(7)
Developer Guide
-npm-disputes(7)
+npm-disputes(7)
Handling Module Name Disputes
-npm-faq(7)
+npm-faq(7)
Frequently Asked Questions
-npm-index(7)
+npm-index(7)
Index of all npm documentation
-npm-registry(7)
+npm-registry(7)
The JavaScript Package Registry
-npm-scripts(7)
+npm-scope(7)
+Scoped packages
+npm-scripts(7)
How npm handles the "scripts" field
-removing-npm(7)
+removing-npm(7)
Cleaning the Slate
-semver(7)
+semver(7)
The semantic versioner for npm
@@ -232,5 +230,5 @@ semver(7)
-
+
diff --git a/deps/npm/html/doc/misc/index.html b/deps/npm/html/doc/misc/index.html
deleted file mode 100644
index 4db393c7c48..00000000000
--- a/deps/npm/html/doc/misc/index.html
+++ /dev/null
@@ -1,438 +0,0 @@
-
-
- index
-
-
-
-
-
-npm-index
Index of all npm documentation
-
-README
-
-node package manager
-
-Command Line Documentation
-
-npm(1)
-
-node package manager
-
-npm-adduser(1)
-
-Add a registry user account
-
-npm-bin(1)
-
-Display npm bin folder
-
-npm-bugs(1)
-
-Bugs for a package in a web browser maybe
-
-npm-build(1)
-
-Build a package
-
-npm-bundle(1)
-
-REMOVED
-
-npm-cache(1)
-
-Manipulates packages cache
-
-npm-completion(1)
-
-Tab Completion for npm
-
-npm-config(1)
-
-Manage the npm configuration files
-
-npm-dedupe(1)
-
-Reduce duplication
-
-npm-deprecate(1)
-
-Deprecate a version of a package
-
-npm-docs(1)
-
-Docs for a package in a web browser maybe
-
-npm-edit(1)
-
-Edit an installed package
-
-npm-explore(1)
-
-Browse an installed package
-
-npm-help-search(1)
-
-Search npm help documentation
-
-npm-help(1)
-
-Get help on npm
-
-npm-init(1)
-
-Interactively create a package.json file
-
-npm-install(1)
-
-Install a package
-
-npm-link(1)
-
-Symlink a package folder
-
-npm-ls(1)
-
-List installed packages
-
-npm-outdated(1)
-
-Check for outdated packages
-
-npm-owner(1)
-
-Manage package owners
-
-npm-pack(1)
-
-Create a tarball from a package
-
-npm-prefix(1)
-
-Display prefix
-
-npm-prune(1)
-
-Remove extraneous packages
-
-npm-publish(1)
-
-Publish a package
-
-npm-rebuild(1)
-
-Rebuild a package
-
-npm-restart(1)
-
-Start a package
-
-npm-rm(1)
-
-Remove a package
-
-npm-root(1)
-
-Display npm root
-
-npm-run-script(1)
-
-Run arbitrary package scripts
-
-npm-search(1)
-
-Search for packages
-
-npm-shrinkwrap(1)
-
-Lock down dependency versions
-
-npm-star(1)
-
-Mark your favorite packages
-
-npm-stars(1)
-
-View packages marked as favorites
-
-npm-start(1)
-
-Start a package
-
-npm-stop(1)
-
-Stop a package
-
-npm-submodule(1)
-
-Add a package as a git submodule
-
-npm-tag(1)
-
-Tag a published version
-
-npm-test(1)
-
-Test a package
-
-npm-uninstall(1)
-
-Remove a package
-
-npm-unpublish(1)
-
-Remove a package from the registry
-
-npm-update(1)
-
-Update a package
-
-npm-version(1)
-
-Bump a package version
-
-npm-view(1)
-
-View registry info
-
-npm-whoami(1)
-
-Display npm username
-
-API Documentation
-
-npm(3)
-
-node package manager
-
-npm-bin(3)
-
-Display npm bin folder
-
-npm-bugs(3)
-
-Bugs for a package in a web browser maybe
-
-npm-commands(3)
-
-npm commands
-
-npm-config(3)
-
-Manage the npm configuration files
-
-npm-deprecate(3)
-
-Deprecate a version of a package
-
-npm-docs(3)
-
-Docs for a package in a web browser maybe
-
-npm-edit(3)
-
-Edit an installed package
-
-npm-explore(3)
-
-Browse an installed package
-
-npm-help-search(3)
-
-Search the help pages
-
-npm-init(3)
-
-Interactively create a package.json file
-
-npm-install(3)
-
-install a package programmatically
-
-npm-link(3)
-
-Symlink a package folder
-
-npm-load(3)
-
-Load config settings
-
-npm-ls(3)
-
-List installed packages
-
-npm-outdated(3)
-
-Check for outdated packages
-
-npm-owner(3)
-
-Manage package owners
-
-npm-pack(3)
-
-Create a tarball from a package
-
-npm-prefix(3)
-
-Display prefix
-
-npm-prune(3)
-
-Remove extraneous packages
-
-npm-publish(3)
-
-Publish a package
-
-npm-rebuild(3)
-
-Rebuild a package
-
-npm-restart(3)
-
-Start a package
-
-npm-root(3)
-
-Display npm root
-
-npm-run-script(3)
-
-Run arbitrary package scripts
-
-npm-search(3)
-
-Search for packages
-
-npm-shrinkwrap(3)
-
-programmatically generate package shrinkwrap file
-
-npm-start(3)
-
-Start a package
-
-npm-stop(3)
-
-Stop a package
-
-npm-submodule(3)
-
-Add a package as a git submodule
-
-npm-tag(3)
-
-Tag a published version
-
-npm-test(3)
-
-Test a package
-
-npm-uninstall(3)
-
-uninstall a package programmatically
-
-npm-unpublish(3)
-
-Remove a package from the registry
-
-npm-update(3)
-
-Update a package
-
-npm-version(3)
-
-Bump a package version
-
-npm-view(3)
-
-View registry info
-
-npm-whoami(3)
-
-Display npm username
-
-Files
-
-npm-folders(5)
-
-Folder Structures Used by npm
-
-npmrc(5)
-
-The npm config files
-
-package.json(5)
-
-Specifics of npm's package.json handling
-
-Misc
-
-npm-coding-style(7)
-
-npm's "funny" coding style
-
-npm-config(7)
-
-More than you probably want to know about npm configuration
-
-npm-developers(7)
-
-Developer Guide
-
-npm-disputes(7)
-
-Handling Module Name Disputes
-
-npm-faq(7)
-
-Frequently Asked Questions
-
-npm-registry(7)
-
-The JavaScript Package Registry
-
-npm-scripts(7)
-
-How npm handles the "scripts" field
-
-removing-npm(7)
-
-Cleaning the Slate
-
-semver(7)
-
-The semantic versioner for npm
-
-
-
diff --git a/deps/npm/html/doc/misc/npm-coding-style.html b/deps/npm/html/doc/misc/npm-coding-style.html
index cd523ac9106..30d3e07cfab 100644
--- a/deps/npm/html/doc/misc/npm-coding-style.html
+++ b/deps/npm/html/doc/misc/npm-coding-style.html
@@ -109,11 +109,11 @@ Logging
logging the same object over and over again is not helpful. Logs should
report what's happening so that it's easier to track down where a fault
occurs.
-Use appropriate log levels. See npm-config(7)
and search for
+
Use appropriate log levels. See npm-config(7)
and search for
"loglevel".
Case, naming, etc.
Use lowerCamelCase
for multiword identifiers when they refer to objects,
-functions, methods, members, or anything not specified in this section.
+functions, methods, properties, or anything not specified in this section.
Use UpperCamelCase
for class names (things that you'd pass to "new").
Use all-lower-hyphen-css-case
for multiword filenames and config keys.
Use named functions. They make stack traces easier to follow.
@@ -131,9 +131,9 @@ null, undefined, false, 0
Boolean objects are verboten.
SEE ALSO
@@ -147,5 +147,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/misc/npm-config.html b/deps/npm/html/doc/misc/npm-config.html
index aa4c300bfa2..249d5934c9e 100644
--- a/deps/npm/html/doc/misc/npm-config.html
+++ b/deps/npm/html/doc/misc/npm-config.html
@@ -33,7 +33,7 @@ npmrc Files
global config file ($PREFIX/npmrc)
npm builtin config file (/path/to/npm/npmrc)
-See npmrc(5) for more details.
+See npmrc(5) for more details.
Default Configs
A set of configuration parameters that are internal to npm, and are
defaults if nothing else is specified.
@@ -48,6 +48,7 @@ Shorthands and Other CLI Niceties
-dd
, --verbose
: --loglevel verbose
-ddd
: --loglevel silly
-g
: --global
+-C
: --prefix
-l
: --long
-m
: --message
-p
, --porcelain
: --parseable
@@ -78,7 +79,7 @@ Shorthands and Other CLI Niceties
Per-Package Config Settings
-When running scripts (see npm-scripts(7)
) the package.json "config"
+
When running scripts (see npm-scripts(7)
) the package.json "config"
keys are overwritten in the environment if there is a config param of
<name>[@<version>]:<key>
. For example, if the package.json has
this:
@@ -89,7 +90,7 @@ Shorthands and Other CLI Niceties
http.createServer(...).listen(process.env.npm_package_config_port)
then the user could change the behavior by doing:
npm config set foo:port 80
-
See package.json(5) for more information.
+
See package.json(5) for more information.
Config Settings
always-auth
@@ -137,7 +138,7 @@ cache
- Default: Windows:
%AppData%\npm-cache
, Posix: ~/.npm
- Type: path
-The location of npm's cache directory. See npm-cache(1)
+The location of npm's cache directory. See npm-cache(1)
cache-lock-stale
- Default: 60000 (1 minute)
@@ -215,9 +216,6 @@ editor
- Type: path
The command to run for npm edit
or npm config edit
.
-email
-The email of the logged-in user.
-Set by the npm adduser
command. Should not be set explicitly.
engine-strict
- Default: false
@@ -287,7 +285,7 @@ global
Operates in "global" mode, so that packages are installed into the
prefix
folder instead of the current working directory. See
-npm-folders(5)
for more on the differences in behavior.
+npm-folders(5)
for more on the differences in behavior.
- packages are installed into the
{prefix}/lib/node_modules
folder, instead of the
current working directory.
@@ -334,31 +332,38 @@ init-module
A module that will be loaded by the npm init
command. See the
documentation for the
init-package-json module
-for more information, or npm-init(1).
-init.author.name
+for more information, or npm-init(1).
+init-author-name
- Default: ""
- Type: String
The value npm init
should use by default for the package author's name.
-init.author.email
+init-author-email
- Default: ""
- Type: String
The value npm init
should use by default for the package author's email.
-init.author.url
+init-author-url
- Default: ""
- Type: String
The value npm init
should use by default for the package author's homepage.
-init.license
+init-license
- Default: "ISC"
- Type: String
The value npm init
should use by default for the package license.
+init-version
+
+- Default: "0.0.0"
+- Type: semver
+
+The value that npm init
should use by default for the package
+version number, if not already set in package.json.
json
- Default: false
@@ -398,14 +403,14 @@ local-address
to the npm registry. Must be IPv4 in versions of Node prior to 0.12.
loglevel
-- Default: "http"
+- Default: "warn"
- Type: String
-- Values: "silent", "win", "error", "warn", "http", "info", "verbose", "silly"
+- Values: "silent", "error", "warn", "http", "info", "verbose", "silly"
What level of logs to report. On failure, all logs are written to
npm-debug.log
in the current working directory.
Any logs of a higher level than the setting are shown.
-The default is "http", which shows http, warn, and error output.
+The default is "warn", which shows warn and error output.
logstream
- Default: process.stderr
@@ -436,7 +441,7 @@ node-version
- Default: process.version
- Type: semver or false
-The node version to use when checking package's "engines" hash.
+The node version to use when checking a package's engines
map.
npat
- Default: false
@@ -455,7 +460,7 @@ optional
- Default: true
- Type: Boolean
-Attempt to install packages in the optionalDependencies
hash. Note
+
Attempt to install packages in the optionalDependencies
object. Note
that if these packages fail to install, the overall installation
process is not aborted.
parseable
@@ -467,7 +472,7 @@ parseable
standard output.
prefix
-- Default: see npm-folders(5)
+- Default: see npm-folders(5)
- Type: path
The location to install global items. If set on the command line, then
@@ -523,8 +528,8 @@
save
- Type: Boolean
Save installed packages to a package.json file as dependencies.
-When used with the npm rm
command, it removes it from the dependencies
-hash.
+When used with the npm rm
command, it removes it from the dependencies
+object.
Only works if there is already a package.json file present.
save-bundle
@@ -541,9 +546,9 @@ save-dev
- Default: false
- Type: Boolean
-Save installed packages to a package.json file as devDependencies.
+Save installed packages to a package.json file as devDependencies
.
When used with the npm rm
command, it removes it from the
-devDependencies hash.
+devDependencies
object.
Only works if there is already a package.json file present.
save-exact
@@ -561,18 +566,29 @@ save-optional
Save installed packages to a package.json file as
optionalDependencies.
When used with the npm rm
command, it removes it from the
-devDependencies hash.
+devDependencies
object.
Only works if there is already a package.json file present.
save-prefix
- Default: '^'
- Type: String
-Configure how versions of packages installed to a package.json file via
+
Configure how versions of packages installed to a package.json file via
--save
or --save-dev
get prefixed.
For example if a package has version 1.2.3
, by default it's version is
-set to ^1.2.3
which allows minor upgrades for that package, but after
npm config set save-prefix='~'
it would be set to ~1.2.3
which only allows
+set to ^1.2.3
which allows minor upgrades for that package, but after
+npm config set save-prefix='~'
it would be set to ~1.2.3
which only allows
patch upgrades.
+scope
+
+- Default: ""
+- Type: String
+
+Associate an operation with a scope for a scoped registry. Useful when logging
+in to a private registry for the first time:
+npm login --scope=@organization --registry=registry.organization.com
, which
+will cause @organization
to be mapped to the registry for future installation
+of packages specified according to the pattern @organization/package
.
searchopts
- Default: ""
@@ -671,19 +687,13 @@ usage
- Type: Boolean
Set to show short usage output (like the -H output)
-instead of complete help when doing npm-help(1)
.
+instead of complete help when doing npm-help(1)
.
user
- Default: "nobody"
- Type: String or Number
The UID to set to when running package scripts as root.
-username
-
-- Default: null
-- Type: String
-
-The username on the npm registry. Set with npm adduser
userconfig
- Default: ~/.npmrc
@@ -718,8 +728,8 @@ versions
- Default: false
- Type: boolean
-If true, output the npm version as well as node's process.versions
-hash, and exit successfully.
+If true, output the npm version as well as node's process.versions
map, and
+exit successfully.
Only relevant when specified explicitly on the command line.
viewer
@@ -730,12 +740,12 @@ viewer
Set to "browser"
to view html help content in the default web browser.
SEE ALSO
-- npm-config(1)
-- npm-config(7)
-- npmrc(5)
-- npm-scripts(7)
-- npm-folders(5)
-- npm(1)
+- npm-config(1)
+- npm-config(7)
+- npmrc(5)
+- npm-scripts(7)
+- npm-folders(5)
+- npm(1)
@@ -749,5 +759,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/misc/npm-developers.html b/deps/npm/html/doc/misc/npm-developers.html
index 3cc1b0466cf..b4190a1a2b1 100644
--- a/deps/npm/html/doc/misc/npm-developers.html
+++ b/deps/npm/html/doc/misc/npm-developers.html
@@ -45,7 +45,7 @@ What is a package
The package.json File
You need to have a package.json
file in the root of your project to do
much of anything with npm. That is basically the whole interface.
-See package.json(5)
for details about what goes in that file. At the very
+
See package.json(5)
for details about what goes in that file. At the very
least, you need:
name:
@@ -70,9 +70,9 @@
The package.json File
scripts:
If you have a special compilation or installation script, then you
-should put it in the scripts
hash. You should definitely have at
+should put it in the scripts
object. You should definitely have at
least a basic smoke-test command as the "scripts.test" field.
-See npm-scripts(7).
+See npm-scripts(7).
main:
If you have a single module that serves as the entry point to your
@@ -80,13 +80,13 @@
The package.json File
then you need to specify that in the "main" field.
directories:
-This is a hash of folders. The best ones to include are "lib" and
-"doc", but if you specify a folder full of man pages in "man", then
+This is an object mapping names to folders. The best ones to include are
+"lib" and "doc", but if you use "man" to specify a folder full of man pages,
they'll get installed just like these ones.
You can use npm init
in the root of your package in order to get you
-started with a pretty basic package.json file. See npm-init(1)
for
+started with a pretty basic package.json file. See npm-init(1)
for
more info.
Keeping files out of your package
Use a .npmignore
file to keep stuff out of your package. If there's
@@ -115,14 +115,14 @@
Keeping files out of your pa
.npmignore
is pointless:
Link Packages
npm link
is designed to install a development package and see the
changes in real time without having to keep re-installing it. (You do
need to either re-link or npm rebuild -g
to update compiled packages,
of course.)
-More info at npm-link(1)
.
+More info at npm-link(1)
.
Before Publishing: Make Sure Your Package Installs and Works
This is important.
If you can not install it locally, you'll have
@@ -145,7 +145,7 @@
Create a User Account
Create a user with the adduser command. It works like this:
npm adduser
and then follow the prompts.
-This is documented better in npm-adduser(1).
+This is documented better in npm-adduser(1).
Publish your package
This part's easy. IN the root of your folder, do this:
npm publish
@@ -160,14 +160,14 @@ Brag about it
Tell the world how easy it is to install your program!
SEE ALSO
-- npm-faq(7)
-- npm(1)
-- npm-init(1)
-- package.json(5)
-- npm-scripts(7)
-- npm-publish(1)
-- npm-adduser(1)
-- npm-registry(7)
+- npm-faq(7)
+- npm(1)
+- npm-init(1)
+- package.json(5)
+- npm-scripts(7)
+- npm-publish(1)
+- npm-adduser(1)
+- npm-registry(7)
@@ -181,5 +181,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/misc/npm-disputes.html b/deps/npm/html/doc/misc/npm-disputes.html
index 7a45340936b..f59921e2e95 100644
--- a/deps/npm/html/doc/misc/npm-disputes.html
+++ b/deps/npm/html/doc/misc/npm-disputes.html
@@ -13,7 +13,7 @@ npm-disputes
Handling Module
SYNOPSIS
- Get the author email with
npm owner ls <pkgname>
-- Email the author, CC support@npmjs.com
+- Email the author, CC support@npmjs.com
- After a few weeks, if there's no resolution, we'll sort it out.
Don't squat on package names. Publish code or move out of the way.
@@ -51,12 +51,12 @@ DESCRIPTION
owner (Bob).
Joe emails Bob, explaining the situation as respectfully as
possible, and what he would like to do with the module name. He
-adds the npm support staff support@npmjs.com to the CC list of
+adds the npm support staff support@npmjs.com to the CC list of
the email. Mention in the email that Bob can run npm owner add
joe foo
to add Joe as an owner of the foo
package.
After a reasonable amount of time, if Bob has not responded, or if
Bob and Joe can't come to any sort of resolution, email support
-support@npmjs.com and we'll sort it out. ("Reasonable" is
+support@npmjs.com and we'll sort it out. ("Reasonable" is
usually at least 4 weeks, but extra time is allowed around common
holidays.)
@@ -97,8 +97,8 @@ EXCEPTIONS
If you see bad behavior like this, please report it right away.
SEE ALSO
@@ -112,5 +112,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/misc/npm-faq.html b/deps/npm/html/doc/misc/npm-faq.html
index cdde512eee0..08c8eafce24 100644
--- a/deps/npm/html/doc/misc/npm-faq.html
+++ b/deps/npm/html/doc/misc/npm-faq.html
@@ -21,7 +21,7 @@ Why didn't it work?
Read the error output, and if you can't figure out what it means,
do what it says and post a bug with all the information it asks for.
Where does npm put stuff?
-See npm-folders(5)
+See npm-folders(5)
tl;dr:
- Use the
npm root
command to see where modules go, and the npm bin
@@ -48,7 +48,7 @@ npm-folders(5)
for
+proven to be an extremely successful approach. See npm-folders(5)
for
more details.
If you want a package to be installed in one place, and have all your
programs reference the same copy of it, then use the npm link
command.
@@ -59,17 +59,16 @@
Whatever,
in a shell script if you really wanted to.
npm will not help you do something that is known to be a bad idea.
Should I check my node_modules
folder into git?
-Mikeal Rogers answered this question very well:
-http://www.futurealoof.com/posts/nodemodules-in-git.html
-tl;dr
-
-- Check
node_modules
into git for things you deploy, such as
-websites and apps.
-- Do not check
node_modules
into git for libraries and modules
-intended to be reused.
-- Use npm to manage dependencies in your dev environment, but not in
-your deployment scripts.
-
+Usually, no. Allow npm to resolve dependencies for your packages.
+For packages you deploy, such as websites and apps,
+you should use npm shrinkwrap to lock down your full dependency tree:
+https://www.npmjs.org/doc/cli/npm-shrinkwrap.html
+If you are paranoid about depending on the npm ecosystem,
+you should run a private npm mirror or a private cache.
+If you want 100% confidence in being able to reproduce the specific bytes
+included in a deployment, you should use an additional mechanism that can
+verify contents rather than versions. For example,
+Amazon machine images, DigitalOcean snapshots, Heroku slugs, or simple tarballs.
Is it 'npm' or 'NPM' or 'Npm'?
npm should never be capitalized unless it is being displayed in a
location that is customarily all-caps (such as the title of man pages.)
@@ -101,7 +100,7 @@ How do I search for packages?
npm search
Arguments are greps. npm search jsdom
shows jsdom packages.
How do I update npm?
-npm update npm -g
+npm install npm -g
You can also update all outdated local packages by doing npm update
without
any arguments, or global packages by doing npm update -g
.
Occasionally, the version of npm will progress such that the current
@@ -218,18 +217,18 @@
How do I install node with npm?
https://github.com/nanjingboy/nvmw
How can I use npm for development?
-See npm-developers(7)
and package.json(5)
.
+See npm-developers(7)
and package.json(5)
.
You'll most likely want to npm link
your development folder. That's
awesomely handy.
-To set up your own private registry, check out npm-registry(7)
.
+To set up your own private registry, check out npm-registry(7)
.
Can I list a url as a dependency?
Yes. It should be a url to a gzipped tarball containing a single folder
that has a package.json in its root, or a git url.
(See "what is a package?" above.)
How do I symlink to a dev folder so I don't have to keep re-installing?
-See npm-link(1)
+See npm-link(1)
The package registry website. What is that exactly?
-See npm-registry(7)
.
+See npm-registry(7)
.
I forgot my password, and can't publish. How do I reset it?
Go to https://npmjs.org/forgot.
I get ECONNREFUSED a lot. What's up?
@@ -237,7 +236,7 @@ I get ECONNREFUSED a lot. What'
To check if the registry is down, open up
https://registry.npmjs.org/ in a web browser. This will also tell
you if you are just unable to access the internet for some reason.
-If the registry IS down, let us know by emailing support@npmjs.com
+
If the registry IS down, let us know by emailing support@npmjs.com
or posting an issue at https://github.com/npm/npm/issues. If it's
down for the world (and not just on your local network) then we're
probably already being pinged about it.
@@ -264,14 +263,14 @@ Why does npm hate me?
npm is not capable of hatred. It loves everyone, especially you.
SEE ALSO
-- npm(1)
-- npm-developers(7)
-- package.json(5)
-- npm-config(1)
-- npm-config(7)
-- npmrc(5)
-- npm-config(7)
-- npm-folders(5)
+- npm(1)
+- npm-developers(7)
+- package.json(5)
+- npm-config(1)
+- npm-config(7)
+- npmrc(5)
+- npm-config(7)
+- npm-folders(5)
@@ -285,5 +284,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/misc/npm-index.html b/deps/npm/html/doc/misc/npm-index.html
index 3346d1ce98a..1ca7d758628 100644
--- a/deps/npm/html/doc/misc/npm-index.html
+++ b/deps/npm/html/doc/misc/npm-index.html
@@ -10,215 +10,213 @@
npm-index
Index of all npm documentation
-README
+README
node package manager
Command Line Documentation
Using npm on the command line
-npm(1)
+npm(1)
node package manager
-npm-adduser(1)
+npm-adduser(1)
Add a registry user account
-npm-bin(1)
+npm-bin(1)
Display npm bin folder
-npm-bugs(1)
+npm-bugs(1)
Bugs for a package in a web browser maybe
-npm-build(1)
+npm-build(1)
Build a package
-npm-bundle(1)
+npm-bundle(1)
REMOVED
-npm-cache(1)
+npm-cache(1)
Manipulates packages cache
-npm-completion(1)
+npm-completion(1)
Tab Completion for npm
-npm-config(1)
+npm-config(1)
Manage the npm configuration files
-npm-dedupe(1)
+npm-dedupe(1)
Reduce duplication
-npm-deprecate(1)
+npm-deprecate(1)
Deprecate a version of a package
-npm-docs(1)
+npm-docs(1)
Docs for a package in a web browser maybe
-npm-edit(1)
+npm-edit(1)
Edit an installed package
-npm-explore(1)
+npm-explore(1)
Browse an installed package
-npm-help-search(1)
+npm-help-search(1)
Search npm help documentation
-npm-help(1)
+npm-help(1)
Get help on npm
-npm-init(1)
+npm-init(1)
Interactively create a package.json file
-npm-install(1)
+npm-install(1)
Install a package
-npm-link(1)
+npm-link(1)
Symlink a package folder
-npm-ls(1)
+npm-ls(1)
List installed packages
-npm-outdated(1)
+npm-outdated(1)
Check for outdated packages
-npm-owner(1)
+npm-owner(1)
Manage package owners
-npm-pack(1)
+npm-pack(1)
Create a tarball from a package
-npm-prefix(1)
+npm-prefix(1)
Display prefix
-npm-prune(1)
+npm-prune(1)
Remove extraneous packages
-npm-publish(1)
+npm-publish(1)
Publish a package
-npm-rebuild(1)
+npm-rebuild(1)
Rebuild a package
-npm-repo(1)
+npm-repo(1)
Open package repository page in the browser
-npm-restart(1)
+npm-restart(1)
Start a package
-npm-rm(1)
+npm-rm(1)
Remove a package
-npm-root(1)
+npm-root(1)
Display npm root
-npm-run-script(1)
+npm-run-script(1)
Run arbitrary package scripts
-npm-search(1)
+npm-search(1)
Search for packages
-npm-shrinkwrap(1)
+npm-shrinkwrap(1)
Lock down dependency versions
-npm-star(1)
+npm-star(1)
Mark your favorite packages
-npm-stars(1)
+npm-stars(1)
View packages marked as favorites
-npm-start(1)
+npm-start(1)
Start a package
-npm-stop(1)
+npm-stop(1)
Stop a package
-npm-submodule(1)
-Add a package as a git submodule
-npm-tag(1)
+npm-tag(1)
Tag a published version
-npm-test(1)
+npm-test(1)
Test a package
-npm-uninstall(1)
+npm-uninstall(1)
Remove a package
-npm-unpublish(1)
+npm-unpublish(1)
Remove a package from the registry
-npm-update(1)
+npm-update(1)
Update a package
-npm-version(1)
+npm-version(1)
Bump a package version
-npm-view(1)
+npm-view(1)
View registry info
-npm-whoami(1)
+npm-whoami(1)
Display npm username
API Documentation
Using npm in your Node programs
-npm(3)
+npm(3)
node package manager
-npm-bin(3)
+npm-bin(3)
Display npm bin folder
-npm-bugs(3)
+npm-bugs(3)
Bugs for a package in a web browser maybe
-npm-cache(3)
+npm-cache(3)
manage the npm cache programmatically
-npm-commands(3)
+npm-commands(3)
npm commands
-npm-config(3)
+npm-config(3)
Manage the npm configuration files
-npm-deprecate(3)
+npm-deprecate(3)
Deprecate a version of a package
-npm-docs(3)
+npm-docs(3)
Docs for a package in a web browser maybe
-npm-edit(3)
+npm-edit(3)
Edit an installed package
-npm-explore(3)
+npm-explore(3)
Browse an installed package
-npm-help-search(3)
+npm-help-search(3)
Search the help pages
-npm-init(3)
+npm-init(3)
Interactively create a package.json file
-npm-install(3)
+npm-install(3)
install a package programmatically
-npm-link(3)
+npm-link(3)
Symlink a package folder
-npm-load(3)
+npm-load(3)
Load config settings
-npm-ls(3)
+npm-ls(3)
List installed packages
-npm-outdated(3)
+npm-outdated(3)
Check for outdated packages
-npm-owner(3)
+npm-owner(3)
Manage package owners
-npm-pack(3)
+npm-pack(3)
Create a tarball from a package
-npm-prefix(3)
+npm-prefix(3)
Display prefix
-npm-prune(3)
+npm-prune(3)
Remove extraneous packages
-npm-publish(3)
+npm-publish(3)
Publish a package
-npm-rebuild(3)
+npm-rebuild(3)
Rebuild a package
-npm-repo(3)
+npm-repo(3)
Open package repository page in the browser
-npm-restart(3)
+npm-restart(3)
Start a package
-npm-root(3)
+npm-root(3)
Display npm root
-npm-run-script(3)
+npm-run-script(3)
Run arbitrary package scripts
-npm-search(3)
+npm-search(3)
Search for packages
-npm-shrinkwrap(3)
+npm-shrinkwrap(3)
programmatically generate package shrinkwrap file
-npm-start(3)
+npm-start(3)
Start a package
-npm-stop(3)
+npm-stop(3)
Stop a package
-npm-submodule(3)
-Add a package as a git submodule
-npm-tag(3)
+npm-tag(3)
Tag a published version
-npm-test(3)
+npm-test(3)
Test a package
-npm-uninstall(3)
+npm-uninstall(3)
uninstall a package programmatically
-npm-unpublish(3)
+npm-unpublish(3)
Remove a package from the registry
-npm-update(3)
+npm-update(3)
Update a package
-npm-version(3)
+npm-version(3)
Bump a package version
-npm-view(3)
+npm-view(3)
View registry info
-npm-whoami(3)
+npm-whoami(3)
Display npm username
Files
File system structures npm uses
-npm-folders(5)
+npm-folders(5)
Folder Structures Used by npm
-npmrc(5)
+npmrc(5)
The npm config files
-package.json(5)
+package.json(5)
Specifics of npm's package.json handling
Misc
Various other bits and bobs
-npm-coding-style(7)
+npm-coding-style(7)
npm's "funny" coding style
-npm-config(7)
+npm-config(7)
More than you probably want to know about npm configuration
-npm-developers(7)
+npm-developers(7)
Developer Guide
-npm-disputes(7)
+npm-disputes(7)
Handling Module Name Disputes
-npm-faq(7)
+npm-faq(7)
Frequently Asked Questions
-npm-index(7)
+npm-index(7)
Index of all npm documentation
-npm-registry(7)
+npm-registry(7)
The JavaScript Package Registry
-npm-scripts(7)
+npm-scope(7)
+Scoped packages
+npm-scripts(7)
How npm handles the "scripts" field
-removing-npm(7)
+removing-npm(7)
Cleaning the Slate
-semver(7)
+semver(7)
The semantic versioner for npm
@@ -232,5 +230,5 @@ semver(7)
-
+
diff --git a/deps/npm/html/doc/misc/npm-registry.html b/deps/npm/html/doc/misc/npm-registry.html
index d08e8f877df..d746316f581 100644
--- a/deps/npm/html/doc/misc/npm-registry.html
+++ b/deps/npm/html/doc/misc/npm-registry.html
@@ -18,14 +18,13 @@ DESCRIPTION
write APIs as well, to allow for publishing packages and managing user
account information.
The official public npm registry is at http://registry.npmjs.org/. It
-is powered by a CouchDB database at
-http://isaacs.iriscouch.com/registry. The code for the couchapp is
-available at http://github.com/npm/npmjs.org. npm user accounts
-are CouchDB users, stored in the http://isaacs.iriscouch.com/_users
-database.
-The registry URL is supplied by the registry
config parameter. See
-npm-config(1)
, npmrc(5)
, and npm-config(7)
for more on managing
-npm's configuration.
+is powered by a CouchDB database, of which there is a public mirror at
+http://skimdb.npmjs.com/registry. The code for the couchapp is
+available at http://github.com/npm/npm-registry-couchapp.
+The registry URL used is determined by the scope of the package (see
+npm-scope(7)
). If no scope is specified, the default registry is used, which is
+supplied by the registry
config parameter. See npm-config(1)
,
+npmrc(5)
, and npm-config(7)
for more on managing npm's configuration.
Can I run my own private registry?
Yes!
The easiest way is to replicate the couch database, and use the same (or
@@ -41,7 +40,7 @@
package.json(5)
for more info on what goes in the package.json file.
+See package.json(5)
for more info on what goes in the package.json file.
Will you replicate from my registry into the public one?
No. If you want things to be public, then publish them into the public
registry using npm. What little security there is would be for nought
@@ -53,11 +52,11 @@
Is there
Yes, head over to https://npmjs.org/
SEE ALSO
-- npm-config(1)
-- npm-config(7)
-- npmrc(5)
-- npm-developers(7)
-- npm-disputes(7)
+- npm-config(1)
+- npm-config(7)
+- npmrc(5)
+- npm-developers(7)
+- npm-disputes(7)
@@ -71,5 +70,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/misc/npm-scope.html b/deps/npm/html/doc/misc/npm-scope.html
index ae8dfa60376..9fed0bbf110 100644
--- a/deps/npm/html/doc/misc/npm-scope.html
+++ b/deps/npm/html/doc/misc/npm-scope.html
@@ -27,15 +27,15 @@ Installing scoped packages
scoped modules will be in node_modules/@myorg/packagename
. The scope folder
(@myorg
) is simply the name of the scope preceded by an @-symbol, and can
contain any number of scoped packages.
-A scoped package is install by referencing it by name, preceded by an @-symbol,
-in npm install
:
+A scoped package is installed by referencing it by name, preceded by an
+@-symbol, in npm install
:
npm install @myorg/mypackage
Or in package.json
:
"dependencies": {
"@myorg/mypackage": "^1.3.0"
}
Note that if the @-symbol is omitted in either case npm will instead attempt to
-install from GitHub; see npm-install(1)
.
+install from GitHub; see npm-install(1)
.
Requiring scoped packages
Because scoped packages are installed into a scope folder, you have to
include the name of the scope when requiring them in your code, e.g.
@@ -63,8 +63,8 @@ Associating a scope with a registry
that registry instead.
SEE ALSO
@@ -78,5 +78,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/misc/npm-scripts.html b/deps/npm/html/doc/misc/npm-scripts.html
index 0c2c697a50a..b2a3dbd383d 100644
--- a/deps/npm/html/doc/misc/npm-scripts.html
+++ b/deps/npm/html/doc/misc/npm-scripts.html
@@ -11,7 +11,7 @@
npm-scripts
How npm handles the "scripts" field
DESCRIPTION
-npm supports the "scripts" member of the package.json script, for the
+
npm supports the "scripts" property of the package.json script, for the
following scripts:
- prepublish:
@@ -41,8 +41,10 @@
DESCRIPTION
Run by the npm restart
command. Note: npm restart
will run the
stop and start scripts if no restart
script is provided.
-Additionally, arbitrary scripts can be run by doing
-npm run-script <pkg> <stage>
.
+Additionally, arbitrary scripts can be executed by running npm
+run-script <pkg> <stage>
. Pre and post commands with matching
+names will be run for those as well (e.g. premyscript
, myscript
,
+postmyscript
).
NOTE: INSTALL SCRIPTS ARE AN ANTIPATTERN
tl;dr Don't use install
. Use a .gyp
file for compilation, and
prepublish
for anything else.
@@ -122,7 +124,7 @@ configuration
Configuration parameters are put in the environment with the
npm_config_
prefix. For instance, you can view the effective root
config by checking the npm_config_root
environment variable.
-Special: package.json "config" hash
+Special: package.json "config" object
The package.json "config" keys are overwritten in the environment if
there is a config param of <name>[@<version>]:<key>
. For example,
if the package.json has this:
@@ -188,7 +190,7 @@ BEST PRACTICES
only will prevent some optional features, then it's better to just
print a warning and exit successfully.
Try not to use scripts to do what npm can do for you. Read through
-package.json(5)
to see all the things that you can specify and enable
+package.json(5)
to see all the things that you can specify and enable
by simply describing your package appropriately. In general, this
will lead to a more robust and consistent state.
Inspect the env to determine where to put things. For instance, if
@@ -201,10 +203,10 @@ BEST PRACTICES
SEE ALSO
-- npm-run-script(1)
-- package.json(5)
-- npm-developers(7)
-- npm-install(1)
+- npm-run-script(1)
+- package.json(5)
+- npm-developers(7)
+- npm-install(1)
@@ -218,5 +220,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/misc/removing-npm.html b/deps/npm/html/doc/misc/removing-npm.html
index afd747c9560..3028625d1bf 100644
--- a/deps/npm/html/doc/misc/removing-npm.html
+++ b/deps/npm/html/doc/misc/removing-npm.html
@@ -38,12 +38,12 @@ SYNOPSIS
Prior to version 0.3, npm used shim files for executables and node
modules. To track those down, you can do the following:
find /usr/local/{lib/node,bin} -exec grep -l npm \{\} \; ;
-
(This is also in the README file.)
+
(This is also in the README file.)
SEE ALSO
@@ -57,5 +57,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/misc/semver.html b/deps/npm/html/doc/misc/semver.html
index 5ab35fa819d..eeea8fbc40f 100644
--- a/deps/npm/html/doc/misc/semver.html
+++ b/deps/npm/html/doc/misc/semver.html
@@ -42,52 +42,150 @@ Usage
http://semver.org/.
A leading "="
or "v"
character is stripped off and ignored.
Ranges
-The following range styles are supported:
+A version range
is a set of comparators
which specify versions
+that satisfy the range.
+A comparator
is composed of an operator
and a version
. The set
+of primitive operators
is:
+
+<
Less than
+<=
Less than or equal to
+>
Greater than
+>=
Greater than or equal to
+=
Equal. If no operator is specified, then equality is assumed,
+so this operator is optional, but MAY be included.
+
+For example, the comparator >=1.2.7
would match the versions
+1.2.7
, 1.2.8
, 2.5.3
, and 1.3.9
, but not the versions 1.2.6
+or 1.1.0
.
+Comparators can be joined by whitespace to form a comparator set
,
+which is satisfied by the intersection of all of the comparators
+it includes.
+A range is composed of one or more comparator sets, joined by ||
. A
+version matches a range if and only if every comparator in at least
+one of the ||
-separated comparator sets is satisfied by the version.
+For example, the range >=1.2.7 <1.3.0
would match the versions
+1.2.7
, 1.2.8
, and 1.2.99
, but not the versions 1.2.6
, 1.3.0
,
+or 1.1.0
.
+The range 1.2.7 || >=1.2.9 <2.0.0
would match the versions 1.2.7
,
+1.2.9
, and 1.4.6
, but not the versions 1.2.8
or 2.0.0
.
+Prerelease Tags
+If a version has a prerelease tag (for example, 1.2.3-alpha.3
) then
+it will only be allowed to satisfy comparator sets if at least one
+comparator with the same [major, minor, patch]
tuple also has a
+prerelease tag.
+For example, the range >1.2.3-alpha.3
would be allowed to match the
+version 1.2.3-alpha.7
, but it would not be satisfied by
+3.4.5-alpha.9
, even though 3.4.5-alpha.9
is technically "greater
+than" 1.2.3-alpha.3
according to the SemVer sort rules. The version
+range only accepts prerelease tags on the 1.2.3
version. The
+version 3.4.5
would satisfy the range, because it does not have a
+prerelease flag, and 3.4.5
is greater than 1.2.3-alpha.7
.
+The purpose for this behavior is twofold. First, prerelease versions
+frequently are updated very quickly, and contain many breaking changes
+that are (by the author's design) not yet fit for public consumption.
+Therefore, by default, they are excluded from range matching
+semantics.
+Second, a user who has opted into using a prerelease version has
+clearly indicated the intent to use that specific set of
+alpha/beta/rc versions. By including a prerelease tag in the range,
+the user is indicating that they are aware of the risk. However, it
+is still not appropriate to assume that they have opted into taking a
+similar risk on the next set of prerelease versions.
+Advanced Range Syntax
+Advanced range syntax desugars to primitive comparators in
+deterministic ways.
+Advanced ranges may be combined in the same way as primitive
+comparators using white space or ||
.
+Hyphen Ranges X.Y.Z - A.B.C
+Specifies an inclusive set.
-1.2.3
A specific version. When nothing else will do. Must be a full
-version number, with major, minor, and patch versions specified.
-Note that build metadata is still ignored, so 1.2.3+build2012
will
-satisfy this range.
->1.2.3
Greater than a specific version.
-<1.2.3
Less than a specific version. If there is no prerelease
-tag on the version range, then no prerelease version will be allowed
-either, even though these are technically "less than".
->=1.2.3
Greater than or equal to. Note that prerelease versions
-are NOT equal to their "normal" equivalents, so 1.2.3-beta
will
-not satisfy this range, but 2.3.0-beta
will.
-<=1.2.3
Less than or equal to. In this case, prerelease versions
-ARE allowed, so 1.2.3-beta
would satisfy.
1.2.3 - 2.3.4
:= >=1.2.3 <=2.3.4
-~1.2.3
:= >=1.2.3-0 <1.3.0-0
"Reasonably close to 1.2.3
". When
-using tilde operators, prerelease versions are supported as well,
-but a prerelease of the next significant digit will NOT be
-satisfactory, so 1.3.0-beta
will not satisfy ~1.2.3
.
-^1.2.3
:= >=1.2.3-0 <2.0.0-0
"Compatible with 1.2.3
". When
-using caret operators, anything from the specified version (including
-prerelease) will be supported up to, but not including, the next
-major version (or its prereleases). 1.5.1
will satisfy ^1.2.3
,
-while 1.2.2
and 2.0.0-beta
will not.
-^0.1.3
:= >=0.1.3-0 <0.2.0-0
"Compatible with 0.1.3
". 0.x.x
versions are
-special: the first non-zero component indicates potentially breaking changes,
-meaning the caret operator matches any version with the same first non-zero
-component starting at the specified version.
-^0.0.2
:= =0.0.2
"Only the version 0.0.2
is considered compatible"
-~1.2
:= >=1.2.0-0 <1.3.0-0
"Any version starting with 1.2
"
-^1.2
:= >=1.2.0-0 <2.0.0-0
"Any version compatible with 1.2
"
-1.2.x
:= >=1.2.0-0 <1.3.0-0
"Any version starting with 1.2
"
-1.2.*
Same as 1.2.x
.
-1.2
Same as 1.2.x
.
-~1
:= >=1.0.0-0 <2.0.0-0
"Any version starting with 1
"
-^1
:= >=1.0.0-0 <2.0.0-0
"Any version compatible with 1
"
-1.x
:= >=1.0.0-0 <2.0.0-0
"Any version starting with 1
"
-1.*
Same as 1.x
.
-1
Same as 1.x
.
-*
Any version whatsoever.
-x
Same as *
.
-""
(just an empty string) Same as *
.
-Ranges can be joined with either a space (which implies "and") or a
-||
(which implies "or").
+If a partial version is provided as the first version in the inclusive
+range, then the missing pieces are replaced with zeroes.
+
+1.2 - 2.3.4
:= >=1.2.0 <=2.3.4
+
+If a partial version is provided as the second version in the
+inclusive range, then all versions that start with the supplied parts
+of the tuple are accepted, but nothing that would be greater than the
+provided tuple parts.
+
+1.2.3 - 2.3
:= >=1.2.3 <2.4.0
+1.2.3 - 2
:= >=1.2.3 <3.0.0
+
+X-Ranges 1.2.x
1.X
1.2.*
*
+Any of X
, x
, or *
may be used to "stand in" for one of the
+numeric values in the [major, minor, patch]
tuple.
+
+*
:= >=0.0.0
(Any version satisfies)
+1.x
:= >=1.0.0 <2.0.0
(Matching major version)
+1.2.x
:= >=1.2.0 <1.3.0
(Matching major and minor versions)
+
+A partial version range is treated as an X-Range, so the special
+character is in fact optional.
+
+""
(empty string) := *
:= >=0.0.0
+1
:= 1.x.x
:= >=1.0.0 <2.0.0
+1.2
:= 1.2.x
:= >=1.2.0 <1.3.0
+
+Tilde Ranges ~1.2.3
~1.2
~1
+Allows patch-level changes if a minor version is specified on the
+comparator. Allows minor-level changes if not.
+
+~1.2.3
:= >=1.2.3 <1.(2+1).0
:= >=1.2.3 <1.3.0
+~1.2
:= >=1.2.0 <1.(2+1).0
:= >=1.2.0 <1.3.0
(Same as 1.2.x
)
+~1
:= >=1.0.0 <(1+1).0.0
:= >=1.0.0 <2.0.0
(Same as 1.x
)
+~0.2.3
:= >=0.2.3 <0.(2+1).0
:= >=0.2.3 <0.3.0
+~0.2
:= >=0.2.0 <0.(2+1).0
:= >=0.2.0 <0.3.0
(Same as 0.2.x
)
+~0
:= >=0.0.0 <(0+1).0.0
:= >=0.0.0 <1.0.0
(Same as 0.x
)
+~1.2.3-beta.2
:= >=1.2.3-beta.2 <1.3.0
Note that prereleases in
+the 1.2.3
version will be allowed, if they are greater than or
+equal to beta.2
. So, 1.2.3-beta.4
would be allowed, but
+1.2.4-beta.2
would not, because it is a prerelease of a
+different [major, minor, patch]
tuple.
+
+Note: this is the same as the ~>
operator in rubygems.
+Caret Ranges ^1.2.3
^0.2.5
^0.0.4
+Allows changes that do not modify the left-most non-zero digit in the
+[major, minor, patch]
tuple. In other words, this allows patch and
+minor updates for versions 1.0.0
and above, patch updates for
+versions 0.X >=0.1.0
, and no updates for versions 0.0.X
.
+Many authors treat a 0.x
version as if the x
were the major
+"breaking-change" indicator.
+Caret ranges are ideal when an author may make breaking changes
+between 0.2.4
and 0.3.0
releases, which is a common practice.
+However, it presumes that there will not be breaking changes between
+0.2.4
and 0.2.5
. It allows for changes that are presumed to be
+additive (but non-breaking), according to commonly observed practices.
+
+^1.2.3
:= >=1.2.3 <2.0.0
+^0.2.3
:= >=0.2.3 <0.3.0
+^0.0.3
:= >=0.0.3 <0.0.4
+^1.2.3-beta.2
:= >=1.2.3-beta.2 <2.0.0
Note that prereleases in
+the 1.2.3
version will be allowed, if they are greater than or
+equal to beta.2
. So, 1.2.3-beta.4
would be allowed, but
+1.2.4-beta.2
would not, because it is a prerelease of a
+different [major, minor, patch]
tuple.
+^0.0.3-beta
:= >=0.0.3-beta <0.0.4
Note that prereleases in the
+0.0.3
version only will be allowed, if they are greater than or
+equal to beta
. So, 0.0.3-pr.2
would be allowed.
+
+When parsing caret ranges, a missing patch
value desugars to the
+number 0
, but will allow flexibility within that value, even if the
+major and minor versions are both 0
.
+
+^1.2.x
:= >=1.2.0 <2.0.0
+^0.0.x
:= >=0.0.0 <0.1.0
+^0.0
:= >=0.0.0 <0.1.0
+
+A missing minor
and patch
values will desugar to zero, but also
+allow flexibility within those values, even if the major version is
+zero.
+
+^1.x
:= >=1.0.0 <2.0.0
+^0.x
:= >=0.0.0 <1.0.0
+
Functions
All methods and classes take a final loose
boolean argument that, if
true, will be more forgiving about not-quite-valid semver strings.
@@ -165,5 +263,5 @@
Ranges
-
+
diff --git a/deps/npm/html/partial/doc/README.html b/deps/npm/html/partial/doc/README.html
new file mode 100644
index 00000000000..13ff98d2c37
--- /dev/null
+++ b/deps/npm/html/partial/doc/README.html
@@ -0,0 +1,166 @@
+npm
node package manager
+
+SYNOPSIS
+This is just enough info to get you up and running.
+Much more info available via npm help
once it's installed.
+IMPORTANT
+You need node v0.8 or higher to run this program.
+To install an old and unsupported version of npm that works on node 0.3
+and prior, clone the git repo and dig through the old tags and branches.
+Super Easy Install
+npm comes with node now.
+Windows Computers
+Get the MSI. npm is in it.
+Apple Macintosh Computers
+Get the pkg. npm is in it.
+Other Sorts of Unices
+Run make install
. npm will be installed with node.
+If you want a more fancy pants install (a different version, customized
+paths, etc.) then read on.
+Fancy Install (Unix)
+There's a pretty robust install script at
+https://www.npmjs.org/install.sh. You can download that and run it.
+Here's an example using curl:
+curl -L https://npmjs.org/install.sh | sh
+
Slightly Fancier
+You can set any npm configuration params with that script:
+npm_config_prefix=/some/path sh install.sh
+
Or, you can run it in uber-debuggery mode:
+npm_debug=1 sh install.sh
+
Even Fancier
+Get the code with git. Use make
to build the docs and do other stuff.
+If you plan on hacking on npm, make link
is your friend.
+If you've got the npm source code, you can also semi-permanently set
+arbitrary config keys using the ./configure --key=val ...
, and then
+run npm commands by doing node cli.js <cmd> <args>
. (This is helpful
+for testing, or running stuff without actually installing npm itself.)
+Fancy Windows Install
+You can download a zip file from https://npmjs.org/dist/, and unpack it
+in the same folder where node.exe lives.
+If that's not fancy enough for you, then you can fetch the code with
+git, and mess with it directly.
+Installing on Cygwin
+No.
+Permissions when Using npm to Install Other Stuff
+tl;dr
+
+- Use
sudo
for greater safety. Or don't, if you prefer not to.
+- npm will downgrade permissions if it's root before running any build
+scripts that package authors specified.
+
+More details...
+As of version 0.3, it is recommended to run npm as root.
+This allows npm to change the user identifier to the nobody
user prior
+to running any package build or test commands.
+If you are not the root user, or if you are on a platform that does not
+support uid switching, then npm will not attempt to change the userid.
+If you would like to ensure that npm always runs scripts as the
+"nobody" user, and have it fail if it cannot downgrade permissions, then
+set the following configuration param:
+npm config set unsafe-perm false
+
This will prevent running in unsafe mode, even as non-root users.
+Uninstalling
+So sad to see you go.
+sudo npm uninstall npm -g
+
Or, if that fails,
+sudo make uninstall
+
More Severe Uninstalling
+Usually, the above instructions are sufficient. That will remove
+npm, but leave behind anything you've installed.
+If you would like to remove all the packages that you have installed,
+then you can use the npm ls
command to find them, and then npm rm
to
+remove them.
+To remove cruft left behind by npm 0.x, you can use the included
+clean-old.sh
script file. You can run it conveniently like this:
+npm explore npm -g -- sh scripts/clean-old.sh
+
npm uses two configuration files, one for per-user configs, and another
+for global (every-user) configs. You can view them by doing:
+npm config get userconfig # defaults to ~/.npmrc
+npm config get globalconfig # defaults to /usr/local/etc/npmrc
+
Uninstalling npm does not remove configuration files by default. You
+must remove them yourself manually if you want them gone. Note that
+this means that future npm installs will not remember the settings that
+you have chosen.
+Using npm Programmatically
+If you would like to use npm programmatically, you can do that.
+It's not very well documented, but it is rather simple.
+Most of the time, unless you actually want to do all the things that
+npm does, you should try using one of npm's dependencies rather than
+using npm itself, if possible.
+Eventually, npm will be just a thin cli wrapper around the modules
+that it depends on, but for now, there are some things that you must
+use npm itself to do.
+var npm = require("npm")
+npm.load(myConfigObject, function (er) {
+ if (er) return handlError(er)
+ npm.commands.install(["some", "args"], function (er, data) {
+ if (er) return commandFailed(er)
+ // command succeeded, and data might have some info
+ })
+ npm.registry.log.on("log", function (message) { .... })
+})
+
The load
function takes an object hash of the command-line configs.
+The various npm.commands.<cmd>
functions take an array of
+positional argument strings. The last argument to any
+npm.commands.<cmd>
function is a callback. Some commands take other
+optional arguments. Read the source.
+You cannot set configs individually for any single npm function at this
+time. Since npm
is a singleton, any call to npm.config.set
will
+change the value for all npm commands in that process.
+See ./bin/npm-cli.js
for an example of pulling config values off of the
+command line arguments using nopt. You may also want to check out npm
+help config
to learn about all the options you can set there.
+More Docs
+Check out the docs,
+especially the faq.
+You can use the npm help
command to read any of them.
+If you're a developer, and you want to use npm to publish your program,
+you should read this
+Legal Stuff
+"npm" and "The npm Registry" are owned by npm, Inc.
+All rights reserved. See the included LICENSE file for more details.
+"Node.js" and "node" are trademarks owned by Joyent, Inc.
+Modules published on the npm registry are not officially endorsed by
+npm, Inc. or the Node.js project.
+Data published to the npm registry is not part of npm itself, and is
+the sole property of the publisher. While every effort is made to
+ensure accountability, there is absolutely no guarantee, warrantee, or
+assertion expressed or implied as to the quality, fitness for a
+specific purpose, or lack of malice in any given npm package.
+If you have a complaint about a package in the public npm registry,
+and cannot resolve it with the package
+owner, please email
+support@npmjs.com and explain the situation.
+Any data published to The npm Registry (including user account
+information) may be removed or modified at the sole discretion of the
+npm server administrators.
+In plainer english
+npm is the property of npm, Inc.
+If you publish something, it's yours, and you are solely accountable
+for it.
+If other people publish something, it's theirs.
+Users can publish Bad Stuff. It will be removed promptly if reported.
+But there is no vetting process for published modules, and you use
+them at your own risk. Please inspect the source.
+If you publish Bad Stuff, we may delete it from the registry, or even
+ban your account in extreme cases. So don't do that.
+BUGS
+When you find issues, please report them:
+
+- web:
+https://github.com/npm/npm/issues
+- email:
+npm-@googlegroups.com
+
+Be sure to include all of the output from the npm command that didn't work
+as expected. The npm-debug.log
file is also helpful to provide.
+You can also look for isaacs in #node.js on irc://irc.freenode.net. He
+will no doubt tell you to put the output in a gist or email.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/api/npm-bin.html b/deps/npm/html/partial/doc/api/npm-bin.html
new file mode 100644
index 00000000000..54f895518ab
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm-bin.html
@@ -0,0 +1,8 @@
+npm-bin
Display npm bin folder
+SYNOPSIS
+npm.commands.bin(args, cb)
+
DESCRIPTION
+Print the folder where npm will install executables.
+This function should not be used programmatically. Instead, just refer
+to the npm.bin
property.
+
diff --git a/deps/npm/html/partial/doc/api/npm-bugs.html b/deps/npm/html/partial/doc/api/npm-bugs.html
new file mode 100644
index 00000000000..e9ff2a58aa5
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm-bugs.html
@@ -0,0 +1,13 @@
+npm-bugs
Bugs for a package in a web browser maybe
+SYNOPSIS
+npm.commands.bugs(package, callback)
+
DESCRIPTION
+This command tries to guess at the likely location of a package's
+bug tracker URL, and then tries to open it using the --browser
+config param.
+Like other commands, the first parameter is an array. This command only
+uses the first element, which is expected to be a package name with an
+optional version number.
+This command will launch a browser, so this command may not be the most
+friendly for programmatic use.
+
diff --git a/deps/npm/html/partial/doc/api/npm-cache.html b/deps/npm/html/partial/doc/api/npm-cache.html
new file mode 100644
index 00000000000..b837a688695
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm-cache.html
@@ -0,0 +1,22 @@
+npm-cache
manage the npm cache programmatically
+SYNOPSIS
+npm.commands.cache([args], callback)
+
+// helpers
+npm.commands.cache.clean([args], callback)
+npm.commands.cache.add([args], callback)
+npm.commands.cache.read(name, version, forceBypass, callback)
+
DESCRIPTION
+This acts much the same ways as the npm-cache(1) command line
+functionality.
+The callback is called with the package.json data of the thing that is
+eventually added to or read from the cache.
+The top level npm.commands.cache(...)
functionality is a public
+interface, and like all commands on the npm.commands
object, it will
+match the command line behavior exactly.
+However, the cache folder structure and the cache helper functions are
+considered internal API surface, and as such, may change in future
+releases of npm, potentially without warning or significant version
+incrementation.
+Use at your own risk.
+
diff --git a/deps/npm/html/partial/doc/api/npm-commands.html b/deps/npm/html/partial/doc/api/npm-commands.html
new file mode 100644
index 00000000000..eaf57af4af0
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm-commands.html
@@ -0,0 +1,16 @@
+npm-commands
npm commands
+SYNOPSIS
+npm.commands[<command>](args, callback)
+
DESCRIPTION
+npm comes with a full set of commands, and each of the commands takes a
+similar set of arguments.
+In general, all commands on the command object take an array of positional
+argument strings. The last argument to any function is a callback. Some
+commands are special and take other optional arguments.
+All commands have their own man page. See man npm-<command>
for command-line
+usage, or man 3 npm-<command>
for programmatic usage.
+SEE ALSO
+
+- npm-index(7)
+
+
diff --git a/deps/npm/html/partial/doc/api/npm-config.html b/deps/npm/html/partial/doc/api/npm-config.html
new file mode 100644
index 00000000000..b34c02182d3
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm-config.html
@@ -0,0 +1,37 @@
+npm-config
Manage the npm configuration files
+SYNOPSIS
+npm.commands.config(args, callback)
+var val = npm.config.get(key)
+npm.config.set(key, val)
+
DESCRIPTION
+This function acts much the same way as the command-line version. The first
+element in the array tells config what to do. Possible values are:
+
+set
+ Sets a config parameter. The second element in args
is interpreted as the
+ key, and the third element is interpreted as the value.
+
+get
+ Gets the value of a config parameter. The second element in args
is the
+ key to get the value of.
+
+delete
(rm
or del
)
+ Deletes a parameter from the config. The second element in args
is the
+ key to delete.
+
+list
(ls
)
+ Show all configs that aren't secret. No parameters necessary.
+
+edit
:
+ Opens the config file in the default editor. This command isn't very useful
+ programmatically, but it is made available.
+
+
+To programmatically access npm configuration settings, or set them for
+the duration of a program, use the npm.config.set
and npm.config.get
+functions instead.
+SEE ALSO
+
+- npm(3)
+
+
diff --git a/deps/npm/html/partial/doc/api/npm-deprecate.html b/deps/npm/html/partial/doc/api/npm-deprecate.html
new file mode 100644
index 00000000000..f0ef298b2a2
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm-deprecate.html
@@ -0,0 +1,27 @@
+npm-deprecate
Deprecate a version of a package
+SYNOPSIS
+npm.commands.deprecate(args, callback)
+
DESCRIPTION
+This command will update the npm registry entry for a package, providing
+a deprecation warning to all who attempt to install it.
+The 'args' parameter must have exactly two elements:
+
+package[@version]
+ The version
portion is optional, and may be either a range, or a
+ specific version, or a tag.
+
+message
+ The warning message that will be printed whenever a user attempts to
+ install the package.
+
+
+Note that you must be the package owner to deprecate something. See the
+owner
and adduser
help topics.
+To un-deprecate a package, specify an empty string (""
) for the message
argument.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/api/npm-docs.html b/deps/npm/html/partial/doc/api/npm-docs.html
new file mode 100644
index 00000000000..dde38920fd1
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm-docs.html
@@ -0,0 +1,13 @@
+npm-docs
Docs for a package in a web browser maybe
+SYNOPSIS
+npm.commands.docs(package, callback)
+
DESCRIPTION
+This command tries to guess at the likely location of a package's
+documentation URL, and then tries to open it using the --browser
+config param.
+Like other commands, the first parameter is an array. This command only
+uses the first element, which is expected to be a package name with an
+optional version number.
+This command will launch a browser, so this command may not be the most
+friendly for programmatic use.
+
diff --git a/deps/npm/html/partial/doc/api/npm-edit.html b/deps/npm/html/partial/doc/api/npm-edit.html
new file mode 100644
index 00000000000..ef49f94e14e
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm-edit.html
@@ -0,0 +1,16 @@
+npm-edit
Edit an installed package
+SYNOPSIS
+npm.commands.edit(package, callback)
+
DESCRIPTION
+Opens the package folder in the default editor (or whatever you've
+configured as the npm editor
config -- see npm help config
.)
+After it has been edited, the package is rebuilt so as to pick up any
+changes in compiled packages.
+For instance, you can do npm install connect
to install connect
+into your package, and then npm.commands.edit(["connect"], callback)
+to make a few changes to your locally installed copy.
+The first parameter is a string array with a single element, the package
+to open. The package can optionally have a version number attached.
+Since this command opens an editor in a new process, be careful about where
+and how this is used.
+
diff --git a/deps/npm/html/partial/doc/api/npm-explore.html b/deps/npm/html/partial/doc/api/npm-explore.html
new file mode 100644
index 00000000000..60f3ac17802
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm-explore.html
@@ -0,0 +1,11 @@
+npm-explore
Browse an installed package
+SYNOPSIS
+npm.commands.explore(args, callback)
+
DESCRIPTION
+Spawn a subshell in the directory of the installed package specified.
+If a command is specified, then it is run in the subshell, which then
+immediately terminates.
+Note that the package is not automatically rebuilt afterwards, so be
+sure to use npm rebuild <pkg>
if you make any changes.
+The first element in the 'args' 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.
+
diff --git a/deps/npm/html/partial/doc/api/npm-help-search.html b/deps/npm/html/partial/doc/api/npm-help-search.html
new file mode 100644
index 00000000000..7818b6b1e74
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm-help-search.html
@@ -0,0 +1,24 @@
+npm-help-search
Search the help pages
+SYNOPSIS
+npm.commands.helpSearch(args, [silent,] callback)
+
DESCRIPTION
+This command is rarely useful, but it exists in the rare case that it is.
+This command takes an array of search terms and returns the help pages that
+match in order of best match.
+If there is only one match, then npm displays that help section. If there
+are multiple results, the results are printed to the screen formatted and the
+array of results is returned. Each result is an object with these properties:
+
+- hits:
+A map of args to number of hits on that arg. For example, {"npm": 3}
+- found:
+Total number of unique args that matched.
+- totalHits:
+Total number of hits.
+- lines:
+An array of all matching lines (and some adjacent lines).
+- file:
+Name of the file that matched
+
+The silent parameter is not necessary not used, but it may in the future.
+
diff --git a/deps/npm/html/partial/doc/api/npm-init.html b/deps/npm/html/partial/doc/api/npm-init.html
new file mode 100644
index 00000000000..723fbdebedb
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm-init.html
@@ -0,0 +1,19 @@
+npm init
Interactively create a package.json file
+SYNOPSIS
+npm.commands.init(args, callback)
+
DESCRIPTION
+This will ask you a bunch of questions, and then write a package.json for you.
+It attempts to make reasonable guesses about what you want things to be set to,
+and then writes a package.json file with the options you've selected.
+If you already have a package.json file, it'll read that first, and default to
+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.
+Since this function expects to be run on the command-line, it doesn't work very
+well as a programmatically. The best option is to roll your own, and since
+JavaScript makes it stupid simple to output formatted JSON, that is the
+preferred method. If you're sure you want to handle command-line prompting,
+then go ahead and use this programmatically.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/api/npm-install.html b/deps/npm/html/partial/doc/api/npm-install.html
new file mode 100644
index 00000000000..bfbd5668877
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm-install.html
@@ -0,0 +1,12 @@
+npm-install
install a package programmatically
+SYNOPSIS
+npm.commands.install([where,] packages, callback)
+
DESCRIPTION
+This acts much the same ways as installing on the command-line.
+The 'where' parameter is optional and only used internally, and it specifies
+where the packages should be installed to.
+The 'packages' parameter is an array of strings. Each element in the array is
+the name of a package to be installed.
+Finally, 'callback' is a function that will be called when all packages have been
+installed or when an error has been encountered.
+
diff --git a/deps/npm/html/partial/doc/api/npm-link.html b/deps/npm/html/partial/doc/api/npm-link.html
new file mode 100644
index 00000000000..e2efe3ebc1f
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm-link.html
@@ -0,0 +1,22 @@
+npm-link
Symlink a package folder
+SYNOPSIS
+npm.commands.link(callback)
+npm.commands.link(packages, callback)
+
DESCRIPTION
+Package linking is a two-step process.
+Without parameters, link will create a globally-installed
+symbolic link from prefix/package-name
to the current folder.
+With a parameters, link will create a symlink from the local node_modules
+folder to the global symlink.
+When creating tarballs for npm publish
, the linked packages are
+"snapshotted" to their current state by resolving the symbolic links.
+This is
+handy for installing your own stuff, so that you can work on it and test it
+iteratively without having to continually rebuild.
+For example:
+npm.commands.link(cb) # creates global link from the cwd
+ # (say redis package)
+npm.commands.link('redis', cb) # link-install the package
+
Now, any changes to the redis package will be reflected in
+the package in the current working directory
+
diff --git a/deps/npm/html/partial/doc/api/npm-load.html b/deps/npm/html/partial/doc/api/npm-load.html
new file mode 100644
index 00000000000..0796cacdab6
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm-load.html
@@ -0,0 +1,17 @@
+npm-load
Load config settings
+SYNOPSIS
+npm.load(conf, cb)
+
DESCRIPTION
+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 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.
+For example, to emulate the --dev flag, pass an object that looks like this:
+{
+ "dev": true
+}
+
For a list of all the available command-line configs, see npm help config
+
diff --git a/deps/npm/html/partial/doc/api/npm-ls.html b/deps/npm/html/partial/doc/api/npm-ls.html
new file mode 100644
index 00000000000..508003ca158
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm-ls.html
@@ -0,0 +1,43 @@
+npm-ls
List installed packages
+SYNOPSIS
+npm.commands.ls(args, [silent,] callback)
+
DESCRIPTION
+This command will print to stdout all the versions of packages that are
+installed, as well as their dependencies, in a tree-structure. It will also
+return that data using the callback.
+This command does not take any arguments, but args must be defined.
+Beyond that, if any arguments are passed in, npm will politely warn that it
+does not take positional arguments, though you may set config flags
+like with any other command, such as global
to list global packages.
+It will print out extraneous, missing, and invalid packages.
+If the silent parameter is set to true, nothing will be output to the screen,
+but the data will still be returned.
+Callback is provided an error if one occurred, the full data about which
+packages are installed and which dependencies they will receive, and a
+"lite" data object which just shows which versions are installed where.
+Note that the full data object is a circular structure, so care must be
+taken if it is serialized to JSON.
+CONFIGURATION
+long
+
+- Default: false
+- Type: Boolean
+
+Show extended information.
+parseable
+
+- Default: false
+- Type: Boolean
+
+Show parseable output instead of tree view.
+global
+
+- Default: false
+- Type: Boolean
+
+List packages in the global install prefix instead of in the current
+project.
+Note, if parseable is set or long isn't set, then duplicates will be trimmed.
+This means that if a submodule a same dependency as a parent module, then the
+dependency will only be output once.
+
diff --git a/deps/npm/html/partial/doc/api/npm-outdated.html b/deps/npm/html/partial/doc/api/npm-outdated.html
new file mode 100644
index 00000000000..16d3150d3f7
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm-outdated.html
@@ -0,0 +1,8 @@
+npm-outdated
Check for outdated packages
+SYNOPSIS
+npm.commands.outdated([packages,] callback)
+
DESCRIPTION
+This command will check the registry to see if the specified packages are
+currently outdated.
+If the 'packages' parameter is left out, npm will check all packages.
+
diff --git a/deps/npm/html/partial/doc/api/npm-owner.html b/deps/npm/html/partial/doc/api/npm-owner.html
new file mode 100644
index 00000000000..20e8b6840e4
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm-owner.html
@@ -0,0 +1,27 @@
+npm-owner
Manage package owners
+SYNOPSIS
+npm.commands.owner(args, callback)
+
DESCRIPTION
+The first element of the 'args' parameter defines what to do, and the subsequent
+elements depend on the action. Possible values for the action are (order of
+parameters are given in parenthesis):
+
+- ls (package):
+List all the users who have access to modify a package and push new versions.
+Handy when you need to know who to bug for help.
+- add (user, package):
+Add a new user as a maintainer of a package. This user is enabled to modify
+metadata, publish new versions, and add other owners.
+- rm (user, package):
+Remove a user from the package owner list. This immediately revokes their
+privileges.
+
+Note that there is only one level of access. Either you can modify a package,
+or you can't. Future versions may contain more fine-grained access levels, but
+that is not implemented at this time.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/api/npm-pack.html b/deps/npm/html/partial/doc/api/npm-pack.html
new file mode 100644
index 00000000000..6417688673c
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm-pack.html
@@ -0,0 +1,13 @@
+npm-pack
Create a tarball from a package
+SYNOPSIS
+npm.commands.pack([packages,] callback)
+
DESCRIPTION
+For anything that's installable (that is, a package folder, tarball,
+tarball url, name@tag, name@version, or name), this command will fetch
+it to the cache, and then copy the tarball to the current working
+directory as <name>-<version>.tgz
, and then write the filenames out to
+stdout.
+If the same package is specified multiple times, then the file will be
+overwritten the second time.
+If no arguments are supplied, then npm packs the current package folder.
+
diff --git a/deps/npm/html/partial/doc/api/npm-prefix.html b/deps/npm/html/partial/doc/api/npm-prefix.html
new file mode 100644
index 00000000000..e9904b18d9f
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm-prefix.html
@@ -0,0 +1,9 @@
+npm-prefix
Display prefix
+SYNOPSIS
+npm.commands.prefix(args, callback)
+
DESCRIPTION
+Print the prefix to standard out.
+'args' is never used and callback is never called with data.
+'args' must be present or things will break.
+This function is not useful programmatically
+
diff --git a/deps/npm/html/partial/doc/api/npm-prune.html b/deps/npm/html/partial/doc/api/npm-prune.html
new file mode 100644
index 00000000000..5835a9b6a79
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm-prune.html
@@ -0,0 +1,10 @@
+npm-prune
Remove extraneous packages
+SYNOPSIS
+npm.commands.prune([packages,] callback)
+
DESCRIPTION
+This command removes "extraneous" packages.
+The first parameter is optional, and it specifies packages to be removed.
+No packages are specified, then all packages will be checked.
+Extraneous packages are packages that are not listed on the parent
+package's dependencies list.
+
diff --git a/deps/npm/html/partial/doc/api/npm-publish.html b/deps/npm/html/partial/doc/api/npm-publish.html
new file mode 100644
index 00000000000..f0e5da91ba3
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm-publish.html
@@ -0,0 +1,26 @@
+npm-publish
Publish a package
+SYNOPSIS
+npm.commands.publish([packages,] callback)
+
DESCRIPTION
+Publishes a package to the registry so that it can be installed by name.
+Possible values in the 'packages' array are:
+
+<folder>
:
+A folder containing a package.json file
+
+<tarball>
:
+A url or file path to a gzipped tar archive containing a single folder
+with a package.json file inside.
+
+
+If the package array is empty, npm will try to publish something in the
+current working directory.
+This command could fails if one of the packages specified already exists in
+the registry. Overwrites when the "force" environment variable is set.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/api/npm-rebuild.html b/deps/npm/html/partial/doc/api/npm-rebuild.html
new file mode 100644
index 00000000000..e428728a617
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm-rebuild.html
@@ -0,0 +1,10 @@
+npm-rebuild
Rebuild a package
+SYNOPSIS
+npm.commands.rebuild([packages,] callback)
+
DESCRIPTION
+This command runs the npm build
command on each of the matched packages. This is useful
+when you install a new version of node, and must recompile all your C++ addons with
+the new binary. If no 'packages' parameter is specify, every package will be rebuilt.
+CONFIGURATION
+See npm help build
+
diff --git a/deps/npm/html/partial/doc/api/npm-repo.html b/deps/npm/html/partial/doc/api/npm-repo.html
new file mode 100644
index 00000000000..9a18976cd41
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm-repo.html
@@ -0,0 +1,13 @@
+npm-repo
Open package repository page in the browser
+SYNOPSIS
+npm.commands.repo(package, callback)
+
DESCRIPTION
+This command tries to guess at the likely location of a package's
+repository URL, and then tries to open it using the --browser
+config param.
+Like other commands, the first parameter is an array. This command only
+uses the first element, which is expected to be a package name with an
+optional version number.
+This command will launch a browser, so this command may not be the most
+friendly for programmatic use.
+
diff --git a/deps/npm/html/partial/doc/api/npm-restart.html b/deps/npm/html/partial/doc/api/npm-restart.html
new file mode 100644
index 00000000000..35db404d785
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm-restart.html
@@ -0,0 +1,16 @@
+npm-restart
Start a package
+SYNOPSIS
+npm.commands.restart(packages, callback)
+
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.
+npm can run tests on multiple packages. Just specify multiple packages
+in the packages
parameter.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/api/npm-root.html b/deps/npm/html/partial/doc/api/npm-root.html
new file mode 100644
index 00000000000..1549515122e
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm-root.html
@@ -0,0 +1,9 @@
+npm-root
Display npm root
+SYNOPSIS
+npm.commands.root(args, callback)
+
DESCRIPTION
+Print the effective node_modules
folder to standard out.
+'args' is never used and callback is never called with data.
+'args' must be present or things will break.
+This function is not useful programmatically.
+
diff --git a/deps/npm/html/partial/doc/api/npm-run-script.html b/deps/npm/html/partial/doc/api/npm-run-script.html
new file mode 100644
index 00000000000..7cc42b601ad
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm-run-script.html
@@ -0,0 +1,21 @@
+npm-run-script
Run arbitrary package scripts
+SYNOPSIS
+npm.commands.run-script(args, callback)
+
DESCRIPTION
+This runs an arbitrary command from a package's "scripts" object.
+It is used by the test, start, restart, and stop commands, but can be
+called directly, as well.
+The 'args' parameter is an array of strings. Behavior depends on the number
+of elements. If there is only one element, npm assumes that the element
+represents a command to be run on the local repository. If there is more than
+one element, then the first is assumed to be the package and the second is
+assumed to be the command to run. All other elements are ignored.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/api/npm-search.html b/deps/npm/html/partial/doc/api/npm-search.html
new file mode 100644
index 00000000000..13cceb3d321
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm-search.html
@@ -0,0 +1,33 @@
+npm-search
Search for packages
+SYNOPSIS
+npm.commands.search(searchTerms, [silent,] [staleness,] callback)
+
DESCRIPTION
+Search the registry for packages matching the search terms. The available parameters are:
+
+- searchTerms:
+Array of search terms. These terms are case-insensitive.
+- silent:
+If true, npm will not log anything to the console.
+- staleness:
+This is the threshold for stale packages. "Fresh" packages are not refreshed
+from the registry. This value is measured in seconds.
+callback:
+Returns an object where each key is the name of a package, and the value
+is information about that package along with a 'words' property, which is
+a space-delimited string of all of the interesting words in that package.
+The only properties included are those that are searched, which generally include:
+
+- name
+- description
+- maintainers
+- url
+- keywords
+
+
+
+A search on the registry excludes any result that does not match all of the
+search terms. It also removes any items from the results that contain an
+excluded term (the "searchexclude" config). The search is case insensitive
+and doesn't try to read your mind (it doesn't do any verb tense matching or the
+like).
+
diff --git a/deps/npm/html/partial/doc/api/npm-shrinkwrap.html b/deps/npm/html/partial/doc/api/npm-shrinkwrap.html
new file mode 100644
index 00000000000..b5f33599989
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm-shrinkwrap.html
@@ -0,0 +1,13 @@
+npm-shrinkwrap
programmatically generate package shrinkwrap file
+SYNOPSIS
+npm.commands.shrinkwrap(args, [silent,] callback)
+
DESCRIPTION
+This acts much the same ways as shrinkwrapping on the command-line.
+This command does not take any arguments, but 'args' must be defined.
+Beyond that, if any arguments are passed in, npm will politely warn that it
+does not take positional arguments.
+If the 'silent' parameter is set to true, nothing will be output to the screen,
+but the shrinkwrap file will still be written.
+Finally, 'callback' is a function that will be called when the shrinkwrap has
+been saved.
+
diff --git a/deps/npm/html/partial/doc/api/npm-start.html b/deps/npm/html/partial/doc/api/npm-start.html
new file mode 100644
index 00000000000..2eae8ba0f59
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm-start.html
@@ -0,0 +1,8 @@
+npm-start
Start a package
+SYNOPSIS
+npm.commands.start(packages, callback)
+
DESCRIPTION
+This runs a package's "start" script, if one was provided.
+npm can run tests on multiple packages. Just specify multiple packages
+in the packages
parameter.
+
diff --git a/deps/npm/html/partial/doc/api/npm-stop.html b/deps/npm/html/partial/doc/api/npm-stop.html
new file mode 100644
index 00000000000..5b58289ed84
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm-stop.html
@@ -0,0 +1,8 @@
+npm-stop
Stop a package
+SYNOPSIS
+npm.commands.stop(packages, callback)
+
DESCRIPTION
+This runs a package's "stop" script, if one was provided.
+npm can run stop on multiple packages. Just specify multiple packages
+in the packages
parameter.
+
diff --git a/deps/npm/html/partial/doc/api/npm-submodule.html b/deps/npm/html/partial/doc/api/npm-submodule.html
new file mode 100644
index 00000000000..669841402f6
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm-submodule.html
@@ -0,0 +1,22 @@
+npm-submodule
Add a package as a git submodule
+SYNOPSIS
+npm.commands.submodule(packages, callback)
+
DESCRIPTION
+For each package specified, npm will check if it has a git repository url
+in its package.json description then add it as a git submodule at
+node_modules/<pkg name>
.
+This is a convenience only. From then on, it's up to you to manage
+updates by using the appropriate git commands. npm will stubbornly
+refuse to update, modify, or remove anything with a .git
subfolder
+in it.
+This command also does not install missing dependencies, if the package
+does not include them in its git repository. If npm ls
reports that
+things are missing, you can either install, link, or submodule them yourself,
+or you can do npm explore <pkgname> -- npm install
to install the
+dependencies into the submodule folder.
+SEE ALSO
+
+- npm help json
+- git help submodule
+
+
diff --git a/deps/npm/html/partial/doc/api/npm-tag.html b/deps/npm/html/partial/doc/api/npm-tag.html
new file mode 100644
index 00000000000..f288fc15cfd
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm-tag.html
@@ -0,0 +1,16 @@
+npm-tag
Tag a published version
+SYNOPSIS
+npm.commands.tag(package@version, tag, callback)
+
DESCRIPTION
+Tags the specified version of the package with the specified tag, or the
+--tag
config if not specified.
+The 'package@version' is an array of strings, but only the first two elements are
+currently used.
+The first element must be in the form package@version, where package
+is the package name and version is the version number (much like installing a
+specific version).
+The second element is the name of the tag to tag this version with. If this
+parameter is missing or falsey (empty), the default froom the config will be
+used. For more information about how to set this config, check
+man 3 npm-config
for programmatic usage or man npm-config
for cli usage.
+
diff --git a/deps/npm/html/partial/doc/api/npm-test.html b/deps/npm/html/partial/doc/api/npm-test.html
new file mode 100644
index 00000000000..9c35bdcfdb8
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm-test.html
@@ -0,0 +1,10 @@
+npm-test
Test a package
+SYNOPSIS
+ npm.commands.test(packages, callback)
+
DESCRIPTION
+This runs a package's "test" script, if one was provided.
+To run tests as a condition of installation, set the npat
config to
+true.
+npm can run tests on multiple packages. Just specify multiple packages
+in the packages
parameter.
+
diff --git a/deps/npm/html/partial/doc/api/npm-uninstall.html b/deps/npm/html/partial/doc/api/npm-uninstall.html
new file mode 100644
index 00000000000..62369e4c7c6
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm-uninstall.html
@@ -0,0 +1,10 @@
+npm-uninstall
uninstall a package programmatically
+SYNOPSIS
+npm.commands.uninstall(packages, callback)
+
DESCRIPTION
+This acts much the same ways as uninstalling on the command-line.
+The 'packages' parameter is an array of strings. Each element in the array is
+the name of a package to be uninstalled.
+Finally, 'callback' is a function that will be called when all packages have been
+uninstalled or when an error has been encountered.
+
diff --git a/deps/npm/html/partial/doc/api/npm-unpublish.html b/deps/npm/html/partial/doc/api/npm-unpublish.html
new file mode 100644
index 00000000000..ed9948cd849
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm-unpublish.html
@@ -0,0 +1,13 @@
+npm-unpublish
Remove a package from the registry
+SYNOPSIS
+npm.commands.unpublish(package, callback)
+
DESCRIPTION
+This removes a package version from the registry, deleting its
+entry and removing the tarball.
+The package parameter must be defined.
+Only the first element in the package parameter is used. If there is no first
+element, then npm assumes that the package at the current working directory
+is what is meant.
+If no version is specified, or if all versions are removed then
+the root package entry is removed from the registry entirely.
+
diff --git a/deps/npm/html/partial/doc/api/npm-update.html b/deps/npm/html/partial/doc/api/npm-update.html
new file mode 100644
index 00000000000..d05771159b8
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm-update.html
@@ -0,0 +1,7 @@
+npm-update
Update a package
+SYNOPSIS
+npm.commands.update(packages, callback)
+
DESCRIPTION
+Updates a package, upgrading it to the latest version. It also installs any missing packages.
+The 'packages' argument is an array of packages to update. The 'callback' parameter will be called when done or when an error occurs.
+
diff --git a/deps/npm/html/partial/doc/api/npm-version.html b/deps/npm/html/partial/doc/api/npm-version.html
new file mode 100644
index 00000000000..c2b8d5eb8b9
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm-version.html
@@ -0,0 +1,12 @@
+npm-version
Bump a package version
+SYNOPSIS
+npm.commands.version(newversion, callback)
+
DESCRIPTION
+Run this in a package directory to bump the version and write the new
+data back to the package.json file.
+If run in a git repo, it will also create a version commit and tag, and
+fail if the repo is not clean.
+Like all other commands, this function takes a string array as its first
+parameter. The difference, however, is this function will fail if it does
+not have exactly one element. The only element should be a version number.
+
diff --git a/deps/npm/html/partial/doc/api/npm-view.html b/deps/npm/html/partial/doc/api/npm-view.html
new file mode 100644
index 00000000000..4f5acf62439
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm-view.html
@@ -0,0 +1,61 @@
+npm-view
View registry info
+SYNOPSIS
+npm.commands.view(args, [silent,] callback)
+
DESCRIPTION
+This command shows data about a package and prints it to the stream
+referenced by the outfd
config, which defaults to stdout.
+The "args" parameter is an ordered list that closely resembles the command-line
+usage. The elements should be ordered such that the first element is
+the package and version (package@version). The version is optional. After that,
+the rest of the parameters are fields with optional subfields ("field.subfield")
+which can be used to get only the information desired from the registry.
+The callback will be passed all of the data returned by the query.
+For example, to get the package registry entry for the connect
package,
+you can do this:
+npm.commands.view(["connect"], callback)
+
If no version is specified, "latest" is assumed.
+Field names can be specified after the package descriptor.
+For example, to show the dependencies of the ronn
package at version
+0.3.5, you could do the following:
+npm.commands.view(["ronn@0.3.5", "dependencies"], callback)
+
You can view child field by separating them with a period.
+To view the git repository URL for the latest version of npm, you could
+do this:
+npm.commands.view(["npm", "repository.url"], callback)
+
For fields that are arrays, requesting a non-numeric field will return
+all of the values from the objects in the list. For example, to get all
+the contributor names for the "express" project, you can do this:
+npm.commands.view(["express", "contributors.email"], callback)
+
You may also use numeric indices in square braces to specifically select
+an item in an array field. To just get the email address of the first
+contributor in the list, you can do this:
+npm.commands.view(["express", "contributors[0].email"], callback)
+
Multiple fields may be specified, and will be printed one after another.
+For exampls, to get all the contributor names and email addresses, you
+can do this:
+npm.commands.view(["express", "contributors.name", "contributors.email"], callback)
+
"Person" fields are shown as a string if they would be shown as an
+object. So, for example, this will show the list of npm contributors in
+the shortened string format. (See npm help json
for more on this.)
+npm.commands.view(["npm", "contributors"], callback)
+
If a version range is provided, then data will be printed for every
+matching version of the package. This will show which version of jsdom
+was required by each matching version of yui3:
+npm.commands.view(["yui3@'>0.5.4'", "dependencies.jsdom"], callback)
+
OUTPUT
+If only a single string field for a single version is output, then it
+will not be colorized or quoted, so as to enable piping the output to
+another command.
+If the version range matches multiple versions, than each printed value
+will be prefixed with the version it applies to.
+If multiple fields are requested, than each of them are prefixed with
+the field name.
+Console output can be disabled by setting the 'silent' parameter to true.
+RETURN VALUE
+The data returned will be an object in this formation:
+{ <version>:
+ { <field>: <value>
+ , ... }
+, ... }
+
corresponding to the list of fields selected.
+
diff --git a/deps/npm/html/partial/doc/api/npm-whoami.html b/deps/npm/html/partial/doc/api/npm-whoami.html
new file mode 100644
index 00000000000..3428a9e7677
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm-whoami.html
@@ -0,0 +1,9 @@
+npm-whoami
Display npm username
+SYNOPSIS
+npm.commands.whoami(args, callback)
+
DESCRIPTION
+Print the username
config to standard output.
+'args' is never used and callback is never called with data.
+'args' must be present or things will break.
+This function is not useful programmatically
+
diff --git a/deps/npm/html/partial/doc/api/npm.html b/deps/npm/html/partial/doc/api/npm.html
new file mode 100644
index 00000000000..dbd481b380a
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm.html
@@ -0,0 +1,89 @@
+npm
node package manager
+SYNOPSIS
+var npm = require("npm")
+npm.load([configObject, ]function (er, npm) {
+ // use the npm object, now that it's loaded.
+
+ npm.config.set(key, val)
+ val = npm.config.get(key)
+
+ console.log("prefix = %s", npm.prefix)
+
+ npm.commands.install(["package"], cb)
+})
+
VERSION
+2.1.6
+DESCRIPTION
+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 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
+all possible commands.
+All commands on the command object take an array of positional argument
+strings. The last argument to any function is a callback. Some
+commands take other optional arguments.
+Configs cannot currently be set on a per function basis, as each call to
+npm.config.set will change the value for all npm commands in that process.
+To find API documentation for a specific command, run the npm apihelp
+command.
+METHODS AND PROPERTIES
+
+npm.load(configs, cb)
+ Load the configuration params, and call the cb
function once the
+ globalconfig and userconfig files have been loaded as well, or on
+ nextTick if they've already been loaded.
+
+npm.config
+ An object for accessing npm configuration parameters.
+
+npm.config.get(key)
+npm.config.set(key, val)
+npm.config.del(key)
+
+
+npm.dir
or npm.root
+ The node_modules
directory where npm will operate.
+
+npm.prefix
+ The prefix where npm is operating. (Most often the current working
+ directory.)
+
+npm.cache
+ The place where npm keeps JSON and tarballs it fetches from the
+ registry (or uploads to the registry).
+
+npm.tmp
+ npm's temporary working directory.
+
+npm.deref
+ Get the "real" name for a command that has either an alias or
+ abbreviation.
+
+
+MAGIC
+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
+the error or results.
+For example, this would work in a node repl:
+> npm = require("npm")
+> npm.load() // wait a sec...
+> npm.install("dnode", "express")
+
Note that that won't work in a node program, since the install
+method will get called before the configuration load is completed.
+ABBREVS
+In order to support npm ins foo
instead of npm install foo
, the
+npm.commands
object has a set of abbreviations as well as the full
+method names. Use the npm.deref
method to find the real name.
+For example:
+var cmd = npm.deref("unp") // cmd === "unpublish"
+
diff --git a/deps/npm/html/partial/doc/cli/npm-adduser.html b/deps/npm/html/partial/doc/cli/npm-adduser.html
new file mode 100644
index 00000000000..ac9fa0086ca
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-adduser.html
@@ -0,0 +1,47 @@
+npm-adduser
Add a registry user account
+SYNOPSIS
+npm adduser [--registry=url] [--scope=@orgname] [--always-auth]
+
DESCRIPTION
+Create or verify a user named <username>
in the specified registry, and
+save the credentials to the .npmrc
file. If no registry is specified,
+the default registry will be used (see npm-config(7)
).
+The username, password, and email are read in from prompts.
+You may use this command to change your email address, but not username
+or password.
+To reset your password, go to https://www.npmjs.org/forgot
+You may use this command multiple times with the same user account to
+authorize on a new machine.
+npm login
is an alias to adduser
and behaves exactly the same way.
+CONFIGURATION
+registry
+Default: http://registry.npmjs.org/
+The base URL of the npm package registry. If scope
is also specified,
+this registry will only be used for packages with that scope. See npm-scope(7)
.
+scope
+Default: none
+If specified, the user and login credentials given will be associated
+with the specified scope. See npm-scope(7)
. You can use both at the same time,
+e.g.
+npm adduser --registry=http://myregistry.example.com --scope=@myco
+
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
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-bin.html b/deps/npm/html/partial/doc/cli/npm-bin.html
new file mode 100644
index 00000000000..1485681b5f6
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-bin.html
@@ -0,0 +1,15 @@
+npm-bin
Display npm bin folder
+SYNOPSIS
+npm bin
+
DESCRIPTION
+Print the folder where npm will install executables.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-bugs.html b/deps/npm/html/partial/doc/cli/npm-bugs.html
new file mode 100644
index 00000000000..d40152e3884
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-bugs.html
@@ -0,0 +1,34 @@
+npm-bugs
Bugs for a package in a web browser maybe
+SYNOPSIS
+npm bugs <pkgname>
+npm bugs (with no args in a package dir)
+
DESCRIPTION
+This command tries to guess at the likely location of a package's
+bug tracker URL, and then tries to open it using the --browser
+config param. If no package name is provided, it will search for
+a package.json
in the current folder and use the name
property.
+CONFIGURATION
+browser
+
+- Default: OS X:
"open"
, Windows: "start"
, Others: "xdg-open"
+- Type: String
+
+The browser that is called by the npm bugs
command to open websites.
+registry
+
+- Default: https://registry.npmjs.org/
+- Type: url
+
+The base URL of the npm package registry.
+SEE ALSO
+
+- npm-docs(1)
+- npm-view(1)
+- npm-publish(1)
+- npm-registry(7)
+- npm-config(1)
+- npm-config(7)
+- npmrc(5)
+- package.json(5)
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-build.html b/deps/npm/html/partial/doc/cli/npm-build.html
new file mode 100644
index 00000000000..51f2e32960e
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-build.html
@@ -0,0 +1,18 @@
+npm-build
Build a package
+SYNOPSIS
+npm build <package-folder>
+
+<package-folder>
:
+A folder containing a package.json
file in its root.
+
+DESCRIPTION
+This is the plumbing command called by npm link
and npm install
.
+It should generally not be called directly.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-bundle.html b/deps/npm/html/partial/doc/cli/npm-bundle.html
new file mode 100644
index 00000000000..38bbdd83e38
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-bundle.html
@@ -0,0 +1,11 @@
+npm-bundle
REMOVED
+DESCRIPTION
+The npm bundle
command has been removed in 1.0, for the simple reason
+that it is no longer necessary, as the default behavior is now to
+install packages into the local space.
+Just use npm install
now to do what npm bundle
used to do.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-cache.html b/deps/npm/html/partial/doc/cli/npm-cache.html
new file mode 100644
index 00000000000..f1a3b189643
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-cache.html
@@ -0,0 +1,61 @@
+npm-cache
Manipulates packages cache
+SYNOPSIS
+npm cache add <tarball file>
+npm cache add <folder>
+npm cache add <tarball url>
+npm cache add <name>@<version>
+
+npm cache ls [<path>]
+
+npm cache clean [<path>]
+
DESCRIPTION
+Used to add, list, or clear the npm cache folder.
+
+add:
+Add the specified package to the local cache. This command is primarily
+intended to be used internally by npm, but it can provide a way to
+add data to the local installation cache explicitly.
+
+ls:
+Show the data in the cache. Argument is a path to show in the cache
+folder. Works a bit like the find
program, but limited by the
+depth
config.
+
+clean:
+Delete data out of the cache folder. If an argument is provided, then
+it specifies a subpath to delete. If no argument is provided, then
+the entire cache is cleared.
+
+
+DETAILS
+npm stores cache data in the directory specified in npm config get cache
.
+For each package that is added to the cache, three pieces of information are
+stored in {cache}/{name}/{version}
:
+
+- .../package/package.json:
+The package.json file, as npm sees it.
+- .../package.tgz:
+The tarball for that version.
+
+Additionally, whenever a registry request is made, a .cache.json
file
+is placed at the corresponding URI, to store the ETag and the requested
+data. This is stored in {cache}/{hostname}/{path}/.cache.json
.
+Commands that make non-essential registry requests (such as search
and
+view
, or the completion scripts) generally specify a minimum timeout.
+If the .cache.json
file is younger than the specified timeout, then
+they do not make an HTTP request to the registry.
+CONFIGURATION
+cache
+Default: ~/.npm
on Posix, or %AppData%/npm-cache
on Windows.
+The root cache folder.
+SEE ALSO
+
+- npm-folders(5)
+- npm-config(1)
+- npm-config(7)
+- npmrc(5)
+- npm-install(1)
+- npm-publish(1)
+- npm-pack(1)
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-completion.html b/deps/npm/html/partial/doc/cli/npm-completion.html
new file mode 100644
index 00000000000..1c9879337a5
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-completion.html
@@ -0,0 +1,22 @@
+npm-completion
Tab Completion for npm
+SYNOPSIS
+. <(npm completion)
+
DESCRIPTION
+Enables tab-completion in all npm commands.
+The synopsis above
+loads the completions into your current shell. Adding it to
+your ~/.bashrc or ~/.zshrc will make the completions available
+everywhere.
+You may of course also pipe the output of npm completion to a file
+such as /usr/local/etc/bash_completion.d/npm
if you have a system
+that will read that file for you.
+When COMP_CWORD
, COMP_LINE
, and COMP_POINT
are defined in the
+environment, npm completion
acts in "plumbing mode", and outputs
+completions based on the arguments.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-config.html b/deps/npm/html/partial/doc/cli/npm-config.html
new file mode 100644
index 00000000000..3fee266c1c0
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-config.html
@@ -0,0 +1,46 @@
+npm-config
Manage the npm configuration files
+SYNOPSIS
+npm config set <key> <value> [--global]
+npm config get <key>
+npm config delete <key>
+npm config list
+npm config edit
+npm c [set|get|delete|list]
+npm get <key>
+npm set <key> <value> [--global]
+
DESCRIPTION
+npm gets its config settings from the command line, environment
+variables, npmrc
files, and in some cases, the package.json
file.
+See npmrc(5) for more information about the npmrc files.
+See npm-config(7)
for a more thorough discussion of the mechanisms
+involved.
+The npm config
command can be used to update and edit the contents
+of the user and global npmrc files.
+Sub-commands
+Config supports the following sub-commands:
+set
+npm config set key value
+
Sets the config key to the value.
+If value is omitted, then it sets it to "true".
+get
+npm config get key
+
Echo the config value to stdout.
+list
+npm config list
+
Show all the config settings.
+delete
+npm config delete key
+
Deletes the key from all configuration files.
+edit
+npm config edit
+
Opens the config file in an editor. Use the --global
flag to edit the
+global config.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-dedupe.html b/deps/npm/html/partial/doc/cli/npm-dedupe.html
new file mode 100644
index 00000000000..56a37c32db0
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-dedupe.html
@@ -0,0 +1,43 @@
+npm-dedupe
Reduce duplication
+SYNOPSIS
+npm dedupe [package names...]
+npm ddp [package names...]
+
DESCRIPTION
+Searches the local package tree and attempts to simplify the overall
+structure by moving dependencies further up the tree, where they can
+be more effectively shared by multiple dependent packages.
+For example, consider this dependency graph:
+a
++-- b <-- depends on c@1.0.x
+| `-- c@1.0.3
+`-- d <-- depends on c@~1.0.9
+ `-- c@1.0.10
+
In this case, npm-dedupe(1)
will transform the tree to:
+a
++-- b
++-- d
+`-- c@1.0.10
+
Because of the hierarchical nature of node's module lookup, b and d
+will both get their dependency met by the single c package at the root
+level of the tree.
+If a suitable version exists at the target location in the tree
+already, then it will be left untouched, but the other duplicates will
+be deleted.
+If no suitable version can be found, then a warning is printed, and
+nothing is done.
+If any arguments are supplied, then they are filters, and only the
+named packages will be touched.
+Note that this operation transforms the dependency tree, and may
+result in packages getting updated versions, perhaps from the npm
+registry.
+This feature is experimental, and may change in future versions.
+The --tag
argument will apply to all of the affected dependencies. If a
+tag with the given name exists, the tagged version is preferred over newer
+versions.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-deprecate.html b/deps/npm/html/partial/doc/cli/npm-deprecate.html
new file mode 100644
index 00000000000..0657facd8ef
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-deprecate.html
@@ -0,0 +1,18 @@
+npm-deprecate
Deprecate a version of a package
+SYNOPSIS
+npm deprecate <name>[@<version>] <message>
+
DESCRIPTION
+This command will update the npm registry entry for a package, providing
+a deprecation warning to all who attempt to install it.
+It works on version ranges as well as specific versions, so you can do
+something like this:
+npm deprecate my-thing@"< 0.2.3" "critical bug fixed in v0.2.3"
+
Note that you must be the package owner to deprecate something. See the
+owner
and adduser
help topics.
+To un-deprecate a package, specify an empty string (""
) for the message
argument.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-docs.html b/deps/npm/html/partial/doc/cli/npm-docs.html
new file mode 100644
index 00000000000..3866ff1a0a4
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-docs.html
@@ -0,0 +1,36 @@
+npm-docs
Docs for a package in a web browser maybe
+SYNOPSIS
+npm docs [<pkgname> [<pkgname> ...]]
+npm docs (with no args in a package dir)
+npm home [<pkgname> [<pkgname> ...]]
+npm home (with no args in a package dir)
+
DESCRIPTION
+This command tries to guess at the likely location of a package's
+documentation URL, and then tries to open it using the --browser
+config param. You can pass multiple package names at once. If no
+package name is provided, it will search for a package.json
in
+the current folder and use the name
property.
+CONFIGURATION
+browser
+
+- Default: OS X:
"open"
, Windows: "start"
, Others: "xdg-open"
+- Type: String
+
+The browser that is called by the npm docs
command to open websites.
+registry
+
+- Default: https://registry.npmjs.org/
+- Type: url
+
+The base URL of the npm package registry.
+SEE ALSO
+
+- npm-view(1)
+- npm-publish(1)
+- npm-registry(7)
+- npm-config(1)
+- npm-config(7)
+- npmrc(5)
+- package.json(5)
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-edit.html b/deps/npm/html/partial/doc/cli/npm-edit.html
new file mode 100644
index 00000000000..82b75ad7f3c
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-edit.html
@@ -0,0 +1,29 @@
+npm-edit
Edit an installed package
+SYNOPSIS
+npm edit <name>[@<version>]
+
DESCRIPTION
+Opens the package folder in the default editor (or whatever you've
+configured as the npm editor
config -- see npm-config(7)
.)
+After it has been edited, the package is rebuilt so as to pick up any
+changes in compiled packages.
+For instance, you can do npm install connect
to install connect
+into your package, and then npm edit connect
to make a few
+changes to your locally installed copy.
+CONFIGURATION
+editor
+
+- Default:
EDITOR
environment variable if set, or "vi"
on Posix,
+or "notepad"
on Windows.
+- Type: path
+
+The command to run for npm edit
or npm config edit
.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-explore.html b/deps/npm/html/partial/doc/cli/npm-explore.html
new file mode 100644
index 00000000000..fe2fbd494ca
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-explore.html
@@ -0,0 +1,29 @@
+npm-explore
Browse an installed package
+SYNOPSIS
+npm explore <name> [ -- <cmd>]
+
DESCRIPTION
+Spawn a subshell in the directory of the installed package specified.
+If a command is specified, then it is run in the subshell, which then
+immediately terminates.
+This is particularly handy in the case of git submodules in the
+node_modules
folder:
+npm explore some-dependency -- git pull origin master
+
Note that the package is not automatically rebuilt afterwards, so be
+sure to use npm rebuild <pkg>
if you make any changes.
+CONFIGURATION
+shell
+
+- Default: SHELL environment variable, or "bash" on Posix, or "cmd" on
+Windows
+- Type: path
+
+The shell to run for the npm explore
command.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-help-search.html b/deps/npm/html/partial/doc/cli/npm-help-search.html
new file mode 100644
index 00000000000..afd8fb47313
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-help-search.html
@@ -0,0 +1,26 @@
+npm-help-search
Search npm help documentation
+SYNOPSIS
+npm help-search some search terms
+
DESCRIPTION
+This command will search the npm markdown documentation files for the
+terms provided, and then list the results, sorted by relevance.
+If only one result is found, then it will show that help topic.
+If the argument to npm help
is not a known help topic, then it will
+call help-search
. It is rarely if ever necessary to call this
+command directly.
+CONFIGURATION
+long
+
+- Type: Boolean
+- Default false
+
+If true, the "long" flag will cause help-search to output context around
+where the terms were found in the documentation.
+If false, then help-search will just list out the help topics found.
+SEE ALSO
+
+- npm(1)
+- npm-faq(7)
+- npm-help(1)
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-help.html b/deps/npm/html/partial/doc/cli/npm-help.html
new file mode 100644
index 00000000000..4217b8447c5
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-help.html
@@ -0,0 +1,32 @@
+npm-help
Get help on npm
+SYNOPSIS
+npm help <topic>
+npm help some search terms
+
DESCRIPTION
+If supplied a topic, then show the appropriate documentation page.
+If the topic does not exist, or if multiple terms are provided, then run
+the help-search
command to find a match. Note that, if help-search
+finds a single subject, then it will run help
on that topic, so unique
+matches are equivalent to specifying a topic name.
+CONFIGURATION
+viewer
+
+- Default: "man" on Posix, "browser" on Windows
+- Type: path
+
+The program to use to view help content.
+Set to "browser"
to view html help content in the default web browser.
+SEE ALSO
+
+- npm(1)
+- README
+- npm-faq(7)
+- npm-folders(5)
+- npm-config(1)
+- npm-config(7)
+- npmrc(5)
+- package.json(5)
+- npm-help-search(1)
+- npm-index(7)
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-init.html b/deps/npm/html/partial/doc/cli/npm-init.html
new file mode 100644
index 00000000000..4f41ea88e1e
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-init.html
@@ -0,0 +1,20 @@
+npm-init
Interactively create a package.json file
+SYNOPSIS
+npm init [-f|--force|-y|--yes]
+
DESCRIPTION
+This will ask you a bunch of questions, and then write a package.json for you.
+It attempts to make reasonable guesses about what you want things to be set to,
+and then writes a package.json file with the options you've selected.
+If you already have a package.json file, it'll read that first, and default to
+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
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-install.html b/deps/npm/html/partial/doc/cli/npm-install.html
new file mode 100644
index 00000000000..bd1932ed58c
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-install.html
@@ -0,0 +1,219 @@
+npm-install
Install a package
+SYNOPSIS
+npm install (with no args in a package dir)
+npm install <tarball file>
+npm install <tarball url>
+npm install <folder>
+npm install [@<scope>/]<name> [--save|--save-dev|--save-optional] [--save-exact]
+npm install [@<scope>/]<name>@<tag>
+npm install [@<scope>/]<name>@<version>
+npm install [@<scope>/]<name>@<version range>
+npm i (with any of the previous argument usage)
+
DESCRIPTION
+This command installs a package, and any packages that it depends on. If the
+package has a shrinkwrap file, the installation of dependencies will be driven
+by that. See npm-shrinkwrap(1).
+A package
is:
+
+- a) a folder containing a program described by a package.json file
+- b) a gzipped tarball containing (a)
+- c) a url that resolves to (b)
+- d) a
<name>@<version>
that is published on the registry (see npm-registry(7)
) with (c)
+- e) a
<name>@<tag>
that points to (d)
+- f) a
<name>
that has a "latest" tag satisfying (e)
+- g) a
<git remote url>
that resolves to (b)
+
+Even if you never publish your package, you can still get a lot of
+benefits of using npm if you just want to write a node program (a), and
+perhaps if you also want to be able to easily install it elsewhere
+after packing it up into a tarball (b).
+
+npm install
(in package directory, no arguments):
+ Install the dependencies in the local node_modules folder.
+ In global mode (ie, with -g
or --global
appended to the command),
+ it installs the current package context (ie, the current working
+ directory) as a global package.
+ By default, npm install
will install all modules listed as
+ dependencies. With the --production
flag,
+ npm will not install modules listed in devDependencies
.
+
+npm install <folder>
:
+ Install a package that is sitting in a folder on the filesystem.
+
+npm install <tarball file>
:
+ Install a package that is sitting on the filesystem. Note: if you just want
+ to link a dev directory into your npm root, you can do this more easily by
+ using npm link
.
+ Example:
+ npm install ./package.tgz
+
+npm install <tarball url>
:
+ Fetch the tarball url, and then install it. In order to distinguish between
+ this and other options, the argument must start with "http://" or "https://"
+ Example:
+ npm install https://github.com/indexzero/forever/tarball/v0.5.6
+
+npm install [@<scope>/]<name> [--save|--save-dev|--save-optional]
:
+ Do a <name>@<tag>
install, where <tag>
is the "tag" config. (See
+ npm-config(7)
.)
+ In most cases, this will install the latest version
+ of the module published on npm.
+ Example:
+ npm install sax
+
npm install
takes 3 exclusive, optional flags which save or update
+ the package version in your main package.json:
+
+--save
: Package will appear in your dependencies
.
+
+--save-dev
: Package will appear in your devDependencies
.
+
+--save-optional
: Package will appear in your optionalDependencies
.
+When using any of the above options to save dependencies to your
+package.json, there is an additional, optional flag:
+
+--save-exact
: Saved dependencies will be configured with an
+exact version rather than using npm's default semver range
+operator.
+<scope>
is optional. The package will be downloaded from the registry
+associated with the specified scope. If no registry is associated with
+the given scope the default registry is assumed. See npm-scope(7)
.
+Note: if you do not include the @-symbol on your scope name, npm will
+interpret this as a GitHub repository instead, see below. Scopes names
+must also be followed by a slash.
+Examples:
+npm install sax --save
+npm install githubname/reponame
+npm install @myorg/privatepackage
+npm install node-tap --save-dev
+npm install dtrace-provider --save-optional
+npm install readable-stream --save --save-exact
+
+
+
+
+**Note**: If there is a file or folder named `<name>` in the current
+working directory, then it will try to install that, and only try to
+fetch the package by name if it is not valid.
+
+npm install [@<scope>/]<name>@<tag>
:
+ Install the version of the package that is referenced by the specified tag.
+ If the tag does not exist in the registry data for that package, then this
+ will fail.
+ Example:
+ npm install sax@latest
+ npm install @myorg/mypackage@latest
+
+npm install [@<scope>/]<name>@<version>
:
+ Install the specified version of the package. This will fail if the
+ version has not been published to the registry.
+ Example:
+ npm install sax@0.1.1
+ npm install @myorg/privatepackage@1.5.0
+
+npm install [@<scope>/]<name>@<version range>
:
+ Install a version of the package matching the specified version range. This
+ will follow the same rules for resolving dependencies described in package.json(5)
.
+ Note that most version ranges must be put in quotes so that your shell will
+ treat it as a single argument.
+ Example:
+ npm install sax@">=0.1.0 <0.2.0"
+ npm install @myorg/privatepackage@">=0.1.0 <0.2.0"
+
+npm install <githubname>/<githubrepo>
:
+ Install the package at https://github.com/githubname/githubrepo" by
+ attempting to clone it using
git`.
+ Example:
+ npm install mygithubuser/myproject
+
To reference a package in a git repo that is not on GitHub, see git
+ remote urls below.
+
+npm install <git remote url>
:
+ Install a package by cloning a git remote url. The format of the git
+ url is:
+ <protocol>://[<user>@]<hostname><separator><path>[#<commit-ish>]
+
<protocol>
is one of git
, git+ssh
, git+http
, or
+ git+https
. If no <commit-ish>
is specified, then master
is
+ used.
+ Examples:
+ git+ssh://git@github.com:npm/npm.git#v1.0.27
+ git+https://isaacs@github.com/npm/npm.git
+ git://github.com/npm/npm.git#v1.0.27
+
+
+You may combine multiple arguments, and even multiple types of arguments.
+For example:
+npm install sax@">=0.1.0 <0.2.0" bench supervisor
+
The --tag
argument will apply to all of the specified install targets. If a
+tag with the given name exists, the tagged version is preferred over newer
+versions.
+The --force
argument will force npm to fetch remote resources even if a
+local copy exists on disk.
+npm install sax --force
+
The --global
argument will cause npm to install the package globally
+rather than locally. See npm-folders(5)
.
+The --link
argument will cause npm to link global installs into the
+local space in some cases.
+The --no-bin-links
argument will prevent npm from creating symlinks for
+any binaries the package might contain.
+The --no-optional
argument will prevent optional dependencies from
+being installed.
+The --no-shrinkwrap
argument, which will ignore an available
+shrinkwrap file and use the package.json instead.
+The --nodedir=/path/to/node/source
argument will allow npm to find the
+node source code so that npm can compile native modules.
+See npm-config(7)
. Many of the configuration params have some
+effect on installation, since that's most of what npm does.
+ALGORITHM
+To install a package, npm uses the following algorithm:
+install(where, what, family, ancestors)
+fetch what, unpack to <where>/node_modules/<what>
+for each dep in what.dependencies
+ resolve dep to precise version
+for each dep@version in what.dependencies
+ not in <where>/node_modules/<what>/node_modules/*
+ and not in <family>
+ add precise version deps to <family>
+ install(<where>/node_modules/<what>, dep, family)
+
For this package{dep}
structure: A{B,C}, B{C}, C{D}
,
+this algorithm produces:
+A
++-- B
+`-- C
+ `-- D
+
That is, the dependency from B to C is satisfied by the fact that A
+already caused C to be installed at a higher level.
+See npm-folders(5) for a more detailed description of the specific
+folder structures that npm creates.
+Limitations of npm's Install Algorithm
+There are some very rare and pathological edge-cases where a cycle can
+cause npm to try to install a never-ending tree of packages. Here is
+the simplest case:
+A -> B -> A' -> B' -> A -> B -> A' -> B' -> A -> ...
+
where A
is some version of a package, and A'
is a different version
+of the same package. Because B
depends on a different version of A
+than the one that is already in the tree, it must install a separate
+copy. The same is true of A'
, which must install B'
. Because B'
+depends on the original version of A
, which has been overridden, the
+cycle falls into infinite regress.
+To avoid this situation, npm flat-out refuses to install any
+name@version
that is already present anywhere in the tree of package
+folder ancestors. A more correct, but more complex, solution would be
+to symlink the existing version into the new location. If this ever
+affects a real use-case, it will be investigated.
+SEE ALSO
+
+- npm-folders(5)
+- npm-update(1)
+- npm-link(1)
+- npm-rebuild(1)
+- npm-scripts(7)
+- npm-build(1)
+- npm-config(1)
+- npm-config(7)
+- npmrc(5)
+- npm-registry(7)
+- npm-tag(1)
+- npm-rm(1)
+- npm-shrinkwrap(1)
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-link.html b/deps/npm/html/partial/doc/cli/npm-link.html
new file mode 100644
index 00000000000..3c832399ddb
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-link.html
@@ -0,0 +1,51 @@
+npm-link
Symlink a package folder
+SYNOPSIS
+npm link (in package folder)
+npm link [@<scope>/]<pkgname>
+npm ln (with any of the previous argument usage)
+
DESCRIPTION
+Package linking is a two-step process.
+First, npm link
in a package folder will create a globally-installed
+symbolic link from prefix/package-name
to the current folder (see
+npm-config(7)
for the value of prefix
).
+Next, in some other location, npm link package-name
will create a
+symlink from the local node_modules
folder to the global symlink.
+Note that package-name
is taken from package.json
,
+not from directory name.
+The package name can be optionally prefixed with a scope. See npm-scope(7)
.
+The scope must by preceded by an @-symbol and followed by a slash.
+When creating tarballs for npm publish
, the linked packages are
+"snapshotted" to their current state by resolving the symbolic links.
+This is handy for installing your own stuff, so that you can work on it and
+test it iteratively without having to continually rebuild.
+For example:
+cd ~/projects/node-redis # go into the package directory
+npm link # creates global link
+cd ~/projects/node-bloggy # go into some other package directory.
+npm link redis # link-install the package
+
Now, any changes to ~/projects/node-redis will be reflected in
+~/projects/node-bloggy/node_modules/redis/
+You may also shortcut the two steps in one. For example, to do the
+above use-case in a shorter way:
+cd ~/projects/node-bloggy # go into the dir of your main project
+npm link ../node-redis # link the dir of your dependency
+
The second line is the equivalent of doing:
+(cd ../node-redis; npm link)
+npm link redis
+
That is, it first creates a global link, and then links the global
+installation target into your project's node_modules
folder.
+If your linked package is scoped (see npm-scope(7)
) your link command must
+include that scope, e.g.
+npm link @myorg/privatepackage
+
SEE ALSO
+
+- npm-developers(7)
+- npm-faq(7)
+- package.json(5)
+- npm-install(1)
+- npm-folders(5)
+- npm-config(1)
+- npm-config(7)
+- npmrc(5)
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-ls.html b/deps/npm/html/partial/doc/cli/npm-ls.html
new file mode 100644
index 00000000000..199b6002b89
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-ls.html
@@ -0,0 +1,65 @@
+npm-ls
List installed packages
+SYNOPSIS
+npm list [[@<scope>/]<pkg> ...]
+npm ls [[@<scope>/]<pkg> ...]
+npm la [[@<scope>/]<pkg> ...]
+npm ll [[@<scope>/]<pkg> ...]
+
DESCRIPTION
+This command will print to stdout all the versions of packages that are
+installed, as well as their dependencies, in a tree-structure.
+Positional arguments are name@version-range
identifiers, which will
+limit the results to only the paths to the packages named. Note that
+nested packages will also show the paths to the specified packages.
+For example, running npm ls promzard
in npm's source tree will show:
+npm@2.1.6 /path/to/npm
+└─┬ init-package-json@0.0.4
+ └── promzard@0.1.5
+
It will print out extraneous, missing, and invalid packages.
+If a project specifies git urls for dependencies these are shown
+in parentheses after the name@version to make it easier for users to
+recognize potential forks of a project.
+When run as ll
or la
, it shows extended information by default.
+CONFIGURATION
+json
+
+- Default: false
+- Type: Boolean
+
+Show information in JSON format.
+long
+
+- Default: false
+- Type: Boolean
+
+Show extended information.
+parseable
+
+- Default: false
+- Type: Boolean
+
+Show parseable output instead of tree view.
+global
+
+- Default: false
+- Type: Boolean
+
+List packages in the global install prefix instead of in the current
+project.
+depth
+
+- Type: Int
+
+Max display depth of the dependency tree.
+SEE ALSO
+
+- npm-config(1)
+- npm-config(7)
+- npmrc(5)
+- npm-folders(5)
+- npm-install(1)
+- npm-link(1)
+- npm-prune(1)
+- npm-outdated(1)
+- npm-update(1)
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-outdated.html b/deps/npm/html/partial/doc/cli/npm-outdated.html
new file mode 100644
index 00000000000..ea07e01c1ce
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-outdated.html
@@ -0,0 +1,47 @@
+npm-outdated
Check for outdated packages
+SYNOPSIS
+npm outdated [<name> [<name> ...]]
+
DESCRIPTION
+This command will check the registry to see if any (or, specific) installed
+packages are currently outdated.
+The resulting field 'wanted' shows the latest version according to the
+version specified in the package.json, the field 'latest' the very latest
+version of the package.
+CONFIGURATION
+json
+
+- Default: false
+- Type: Boolean
+
+Show information in JSON format.
+long
+
+- Default: false
+- Type: Boolean
+
+Show extended information.
+parseable
+
+- Default: false
+- Type: Boolean
+
+Show parseable output instead of tree view.
+global
+
+- Default: false
+- Type: Boolean
+
+Check packages in the global install prefix instead of in the current
+project.
+depth
+
+- Type: Int
+
+Max depth for checking dependency tree.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-owner.html b/deps/npm/html/partial/doc/cli/npm-owner.html
new file mode 100644
index 00000000000..0e0dc92e416
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-owner.html
@@ -0,0 +1,29 @@
+npm-owner
Manage package owners
+SYNOPSIS
+npm owner ls <package name>
+npm owner add <user> <package name>
+npm owner rm <user> <package name>
+
DESCRIPTION
+Manage ownership of published packages.
+
+- ls:
+List all the users who have access to modify a package and push new versions.
+Handy when you need to know who to bug for help.
+- add:
+Add a new user as a maintainer of a package. This user is enabled to modify
+metadata, publish new versions, and add other owners.
+- rm:
+Remove a user from the package owner list. This immediately revokes their
+privileges.
+
+Note that there is only one level of access. Either you can modify a package,
+or you can't. Future versions may contain more fine-grained access levels, but
+that is not implemented at this time.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-pack.html b/deps/npm/html/partial/doc/cli/npm-pack.html
new file mode 100644
index 00000000000..865f14afd46
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-pack.html
@@ -0,0 +1,21 @@
+npm-pack
Create a tarball from a package
+SYNOPSIS
+npm pack [<pkg> [<pkg> ...]]
+
DESCRIPTION
+For anything that's installable (that is, a package folder, tarball,
+tarball url, name@tag, name@version, or name), this command will fetch
+it to the cache, and then copy the tarball to the current working
+directory as <name>-<version>.tgz
, and then write the filenames out to
+stdout.
+If the same package is specified multiple times, then the file will be
+overwritten the second time.
+If no arguments are supplied, then npm packs the current package folder.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-prefix.html b/deps/npm/html/partial/doc/cli/npm-prefix.html
new file mode 100644
index 00000000000..bca3f6689c7
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-prefix.html
@@ -0,0 +1,18 @@
+npm-prefix
Display prefix
+SYNOPSIS
+npm prefix [-g]
+
DESCRIPTION
+Print the local prefix to standard out. This is the closest parent directory
+to contain a package.json file unless -g
is also specified.
+If -g
is specified, this will be the value of the global prefix. See
+npm-config(7)
for more detail.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-prune.html b/deps/npm/html/partial/doc/cli/npm-prune.html
new file mode 100644
index 00000000000..43dd8730d69
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-prune.html
@@ -0,0 +1,19 @@
+npm-prune
Remove extraneous packages
+SYNOPSIS
+npm prune [<name> [<name ...]]
+npm prune [<name> [<name ...]] [--production]
+
DESCRIPTION
+This command removes "extraneous" packages. If a package name is
+provided, then only packages matching one of the supplied names are
+removed.
+Extraneous packages are packages that are not listed on the parent
+package's dependencies list.
+If the --production
flag is specified, this command will remove the
+packages specified in your devDependencies
.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-publish.html b/deps/npm/html/partial/doc/cli/npm-publish.html
new file mode 100644
index 00000000000..8df73e3d211
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-publish.html
@@ -0,0 +1,39 @@
+npm-publish
Publish a package
+SYNOPSIS
+npm publish <tarball> [--tag <tag>]
+npm publish <folder> [--tag <tag>]
+
DESCRIPTION
+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
+(see package.json(5)
).
+
+<folder>
:
+A folder containing a package.json file
+
+<tarball>
:
+A url or file path to a gzipped tar archive containing a single folder
+with a package.json file inside.
+
+[--tag <tag>]
+Registers the published package with the given tag, such that npm install
+<name>@<tag>
will install this version. By default, npm publish
updates
+and npm install
installs the latest
tag.
+
+
+Fails if the package name and version combination already exists in
+the specified registry.
+Once a package is published with a given name and version, that
+specific name and version combination can never be used again, even if
+it is removed with npm-unpublish(1).
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-rebuild.html b/deps/npm/html/partial/doc/cli/npm-rebuild.html
new file mode 100644
index 00000000000..b06f0705e3e
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-rebuild.html
@@ -0,0 +1,18 @@
+npm-rebuild
Rebuild a package
+SYNOPSIS
+npm rebuild [<name> [<name> ...]]
+npm rb [<name> [<name> ...]]
+
+<name>
:
+The package to rebuild
+
+DESCRIPTION
+This command runs the npm build
command on the matched folders. This is useful
+when you install a new version of node, and must recompile all your C++ addons with
+the new binary.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-repo.html b/deps/npm/html/partial/doc/cli/npm-repo.html
new file mode 100644
index 00000000000..55fcb5f4c96
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-repo.html
@@ -0,0 +1,22 @@
+npm-repo
Open package repository page in the browser
+SYNOPSIS
+npm repo <pkgname>
+npm repo (with no args in a package dir)
+
DESCRIPTION
+This command tries to guess at the likely location of a package's
+repository URL, and then tries to open it using the --browser
+config param. If no package name is provided, it will search for
+a package.json
in the current folder and use the name
property.
+CONFIGURATION
+browser
+
+- Default: OS X:
"open"
, Windows: "start"
, Others: "xdg-open"
+- Type: String
+
+The browser that is called by the npm repo
command to open websites.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-restart.html b/deps/npm/html/partial/doc/cli/npm-restart.html
new file mode 100644
index 00000000000..267e570eca8
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-restart.html
@@ -0,0 +1,15 @@
+npm-restart
Start a package
+SYNOPSIS
+npm restart [-- <args>]
+
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.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-rm.html b/deps/npm/html/partial/doc/cli/npm-rm.html
new file mode 100644
index 00000000000..24cd07eeecd
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-rm.html
@@ -0,0 +1,19 @@
+npm-rm
Remove a package
+SYNOPSIS
+npm rm <name>
+npm r <name>
+npm uninstall <name>
+npm un <name>
+
DESCRIPTION
+This uninstalls a package, completely removing everything npm installed
+on its behalf.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-root.html b/deps/npm/html/partial/doc/cli/npm-root.html
new file mode 100644
index 00000000000..e9b5ad0df8c
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-root.html
@@ -0,0 +1,15 @@
+npm-root
Display npm root
+SYNOPSIS
+npm root
+
DESCRIPTION
+Print the effective node_modules
folder to standard out.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-run-script.html b/deps/npm/html/partial/doc/cli/npm-run-script.html
new file mode 100644
index 00000000000..b9a7cefce9f
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-run-script.html
@@ -0,0 +1,27 @@
+npm-run-script
Run arbitrary package scripts
+SYNOPSIS
+npm run-script [command] [-- <args>]
+npm run [command] [-- <args>]
+
DESCRIPTION
+This runs an arbitrary command from a package's "scripts"
object.
+If no package name is provided, it will search for a package.json
+in the current folder and use its "scripts"
object. If no "command"
+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
, you can
+use custom arguments when executing scripts. The special option --
is used by
+getopt 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
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-search.html b/deps/npm/html/partial/doc/cli/npm-search.html
new file mode 100644
index 00000000000..ae66e47ead1
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-search.html
@@ -0,0 +1,29 @@
+npm-search
Search for packages
+SYNOPSIS
+npm search [--long] [search terms ...]
+npm s [search terms ...]
+npm se [search terms ...]
+
DESCRIPTION
+Search the registry for packages matching the search terms.
+If a term starts with /
, then it's interpreted as a regular expression.
+A trailing /
will be ignored in this case. (Note that many regular
+expression characters must be escaped or quoted in most shells.)
+CONFIGURATION
+long
+
+- Default: false
+- Type: Boolean
+
+Display full package descriptions and other long text across multiple
+lines. When disabled (default) search results are truncated to fit
+neatly on a single line. Modules with extremely long names will
+fall on multiple lines.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-shrinkwrap.html b/deps/npm/html/partial/doc/cli/npm-shrinkwrap.html
new file mode 100644
index 00000000000..45b646c0300
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-shrinkwrap.html
@@ -0,0 +1,144 @@
+npm-shrinkwrap
Lock down dependency versions
+SYNOPSIS
+npm shrinkwrap
+
DESCRIPTION
+This command locks down the versions of a package's dependencies so
+that you can control exactly which versions of each dependency will be
+used when your package is installed. The "package.json" file is still
+required if you want to use "npm install".
+By default, "npm install" recursively installs the target's
+dependencies (as specified in package.json), choosing the latest
+available version that satisfies the dependency's semver pattern. In
+some situations, particularly when shipping software where each change
+is tightly managed, it's desirable to fully specify each version of
+each dependency recursively so that subsequent builds and deploys do
+not inadvertently pick up newer versions of a dependency that satisfy
+the semver pattern. Specifying specific semver patterns in each
+dependency's package.json would facilitate this, but that's not always
+possible or desirable, as when another author owns the npm package.
+It's also possible to check dependencies directly into source control,
+but that may be undesirable for other reasons.
+As an example, consider package A:
+{
+ "name": "A",
+ "version": "0.1.0",
+ "dependencies": {
+ "B": "<0.1.0"
+ }
+}
+
package B:
+{
+ "name": "B",
+ "version": "0.0.1",
+ "dependencies": {
+ "C": "<0.1.0"
+ }
+}
+
and package C:
+{
+ "name": "C,
+ "version": "0.0.1"
+}
+
If these are the only versions of A, B, and C available in the
+registry, then a normal "npm install A" will install:
+A@0.1.0
+`-- B@0.0.1
+ `-- C@0.0.1
+
However, if B@0.0.2 is published, then a fresh "npm install A" will
+install:
+A@0.1.0
+`-- B@0.0.2
+ `-- C@0.0.1
+
assuming the new version did not modify B's dependencies. Of course,
+the new version of B could include a new version of C and any number
+of new dependencies. If such changes are undesirable, the author of A
+could specify a dependency on B@0.0.1. However, if A's author and B's
+author are not the same person, there's no way for A's author to say
+that he or she does not want to pull in newly published versions of C
+when B hasn't changed at all.
+In this case, A's author can run
+npm shrinkwrap
+
This generates npm-shrinkwrap.json, which will look something like this:
+{
+ "name": "A",
+ "version": "0.1.0",
+ "dependencies": {
+ "B": {
+ "version": "0.0.1",
+ "dependencies": {
+ "C": {
+ "version": "0.1.0"
+ }
+ }
+ }
+ }
+}
+
The shrinkwrap command has locked down the dependencies based on
+what's currently installed in node_modules. When "npm install"
+installs a package with a npm-shrinkwrap.json file in the package
+root, the shrinkwrap file (rather than package.json files) completely
+drives the installation of that package and all of its dependencies
+(recursively). So now the author publishes A@0.1.0, and subsequent
+installs of this package will use B@0.0.1 and C@0.1.0, regardless the
+dependencies and versions listed in A's, B's, and C's package.json
+files.
+Using shrinkwrapped packages
+Using a shrinkwrapped package is no different than using any other
+package: you can "npm install" it by hand, or add a dependency to your
+package.json file and "npm install" it.
+Building shrinkwrapped packages
+To shrinkwrap an existing package:
+
+- Run "npm install" in the package root to install the current
+versions of all dependencies.
+- Validate that the package works as expected with these versions.
+- Run "npm shrinkwrap", add npm-shrinkwrap.json to git, and publish
+your package.
+
+To add or update a dependency in a shrinkwrapped package:
+
+- Run "npm install" in the package root to install the current
+versions of all dependencies.
+- Add or update dependencies. "npm install" each new or updated
+package individually and then update package.json. Note that they
+must be explicitly named in order to be installed: running
npm
+install
with no arguments will merely reproduce the existing
+shrinkwrap.
+- Validate that the package works as expected with the new
+dependencies.
+- Run "npm shrinkwrap", commit the new npm-shrinkwrap.json, and
+publish your package.
+
+You can use npm-outdated(1) to view dependencies with newer versions
+available.
+Other Notes
+A shrinkwrap file must be consistent with the package's package.json
+file. "npm shrinkwrap" will fail if required dependencies are not
+already installed, since that would result in a shrinkwrap that
+wouldn't actually work. Similarly, the command will fail if there are
+extraneous packages (not referenced by package.json), since that would
+indicate that package.json is not correct.
+Since "npm shrinkwrap" is intended to lock down your dependencies for
+production use, devDependencies
will not be included unless you
+explicitly set the --dev
flag when you run npm shrinkwrap
. If
+installed devDependencies
are excluded, then npm will print a
+warning. If you want them to be installed with your module by
+default, please consider adding them to dependencies
instead.
+If shrinkwrapped package A depends on shrinkwrapped package B, B's
+shrinkwrap will not be used as part of the installation of A. However,
+because A's shrinkwrap is constructed from a valid installation of B
+and recursively specifies all dependencies, the contents of B's
+shrinkwrap will implicitly be included in A's shrinkwrap.
+Caveats
+If you wish to lock down the specific bytes included in a package, for
+example to have 100% confidence in being able to reproduce a
+deployment or build, then you ought to check your dependencies into
+source control, or pursue some other mechanism that can verify
+contents rather than versions.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-star.html b/deps/npm/html/partial/doc/cli/npm-star.html
new file mode 100644
index 00000000000..7377d9bc5dd
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-star.html
@@ -0,0 +1,16 @@
+npm-star
Mark your favorite packages
+SYNOPSIS
+npm star <pkgname> [<pkg>, ...]
+npm unstar <pkgname> [<pkg>, ...]
+
DESCRIPTION
+"Starring" a package means that you have some interest in it. It's
+a vaguely positive way to show that you care.
+"Unstarring" is the same thing, but in reverse.
+It's a boolean thing. Starring repeatedly has no additional effect.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-stars.html b/deps/npm/html/partial/doc/cli/npm-stars.html
new file mode 100644
index 00000000000..6ffda95b838
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-stars.html
@@ -0,0 +1,17 @@
+npm-stars
View packages marked as favorites
+SYNOPSIS
+npm stars
+npm stars [username]
+
DESCRIPTION
+If you have starred a lot of neat things and want to find them again
+quickly this command lets you do just that.
+You may also want to see your friend's favorite packages, in this case
+you will most certainly enjoy this command.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-start.html b/deps/npm/html/partial/doc/cli/npm-start.html
new file mode 100644
index 00000000000..bfd673ca26b
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-start.html
@@ -0,0 +1,14 @@
+npm-start
Start a package
+SYNOPSIS
+npm start [-- <args>]
+
DESCRIPTION
+This runs a package's "start" script, if one was provided.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-stop.html b/deps/npm/html/partial/doc/cli/npm-stop.html
new file mode 100644
index 00000000000..3b974c46a1e
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-stop.html
@@ -0,0 +1,14 @@
+npm-stop
Stop a package
+SYNOPSIS
+npm stop [-- <args>]
+
DESCRIPTION
+This runs a package's "stop" script, if one was provided.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-submodule.html b/deps/npm/html/partial/doc/cli/npm-submodule.html
new file mode 100644
index 00000000000..1e259e1f2f6
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-submodule.html
@@ -0,0 +1,22 @@
+npm-submodule
Add a package as a git submodule
+SYNOPSIS
+npm submodule <pkg>
+
DESCRIPTION
+If the specified package has a git repository url in its package.json
+description, then this command will add it as a git submodule at
+node_modules/<pkg name>
.
+This is a convenience only. From then on, it's up to you to manage
+updates by using the appropriate git commands. npm will stubbornly
+refuse to update, modify, or remove anything with a .git
subfolder
+in it.
+This command also does not install missing dependencies, if the package
+does not include them in its git repository. If npm ls
reports that
+things are missing, you can either install, link, or submodule them yourself,
+or you can do npm explore <pkgname> -- npm install
to install the
+dependencies into the submodule folder.
+SEE ALSO
+
+- package.json(5)
+- git help submodule
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-tag.html b/deps/npm/html/partial/doc/cli/npm-tag.html
new file mode 100644
index 00000000000..61b1c76e65c
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-tag.html
@@ -0,0 +1,24 @@
+npm-tag
Tag a published version
+SYNOPSIS
+npm tag <name>@<version> [<tag>]
+
DESCRIPTION
+Tags the specified version of the package with the specified tag, or the
+--tag
config if not specified.
+A tag can be used when installing packages as a reference to a version instead
+of using a specific version number:
+npm install <name>@<tag>
+
When installing dependencies, a preferred tagged version may be specified:
+npm install --tag <tag>
+
This also applies to npm dedupe
.
+Publishing a package always sets the "latest" tag to the published version.
+SEE ALSO
+
+- npm-publish(1)
+- npm-install(1)
+- npm-dedupe(1)
+- npm-registry(7)
+- npm-config(1)
+- npm-config(7)
+- npmrc(5)
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-test.html b/deps/npm/html/partial/doc/cli/npm-test.html
new file mode 100644
index 00000000000..4a48e657d92
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-test.html
@@ -0,0 +1,17 @@
+npm-test
Test a package
+SYNOPSIS
+ npm test [-- <args>]
+ npm tst [-- <args>]
+
DESCRIPTION
+This runs a package's "test" script, if one was provided.
+To run tests as a condition of installation, set the npat
config to
+true.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-uninstall.html b/deps/npm/html/partial/doc/cli/npm-uninstall.html
new file mode 100644
index 00000000000..5b247402bdc
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-uninstall.html
@@ -0,0 +1,37 @@
+npm-rm
Remove a package
+SYNOPSIS
+npm uninstall [@<scope>/]<package> [--save|--save-dev|--save-optional]
+npm rm (with any of the previous argument usage)
+
DESCRIPTION
+This uninstalls a package, completely removing everything npm installed
+on its behalf.
+Example:
+npm uninstall sax
+
In global mode (ie, with -g
or --global
appended to the command),
+it uninstalls the current package context as a global package.
+npm uninstall
takes 3 exclusive, optional flags which save or update
+the package version in your main package.json:
+
+--save
: Package will be removed from your dependencies
.
+
+--save-dev
: Package will be removed from your devDependencies
.
+
+--save-optional
: Package will be removed from your optionalDependencies
.
+
+
+Scope is optional and follows the usual rules for npm-scope(7)
.
+Examples:
+npm uninstall sax --save
+npm uninstall @myorg/privatepackage --save
+npm uninstall node-tap --save-dev
+npm uninstall dtrace-provider --save-optional
+
SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-unpublish.html b/deps/npm/html/partial/doc/cli/npm-unpublish.html
new file mode 100644
index 00000000000..9790cd43274
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-unpublish.html
@@ -0,0 +1,27 @@
+npm-unpublish
Remove a package from the registry
+SYNOPSIS
+npm unpublish [@<scope>/]<name>[@<version>]
+
WARNING
+It is generally considered bad behavior to remove versions of a library
+that others are depending on!
+Consider using the deprecate
command
+instead, if your intent is to encourage users to upgrade.
+There is plenty of room on the registry.
+DESCRIPTION
+This removes a package version from the registry, deleting its
+entry and removing the tarball.
+If no version is specified, or if all versions are removed then
+the root package entry is removed from the registry entirely.
+Even if a package version is unpublished, that specific name and
+version combination can never be reused. In order to publish the
+package again, a new version number must be used.
+The scope is optional and follows the usual rules for npm-scope(7)
.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-update.html b/deps/npm/html/partial/doc/cli/npm-update.html
new file mode 100644
index 00000000000..3923be7faf9
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-update.html
@@ -0,0 +1,20 @@
+npm-update
Update a package
+SYNOPSIS
+npm update [-g] [<name> [<name> ...]]
+
DESCRIPTION
+This command will update all the packages listed to the latest version
+(specified by the tag
config).
+It will also install missing packages.
+If the -g
flag is specified, this command will update globally installed
+packages.
+If no package name is specified, all packages in the specified location (global
+or local) will be updated.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-version.html b/deps/npm/html/partial/doc/cli/npm-version.html
new file mode 100644
index 00000000000..5217f019635
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-version.html
@@ -0,0 +1,35 @@
+npm-version
Bump a package version
+SYNOPSIS
+npm version [<newversion> | major | minor | patch | premajor | preminor | prepatch | prerelease]
+
DESCRIPTION
+Run this in a package directory to bump the version and write the new
+data back to the package.json file.
+The newversion
argument should be a valid semver string, or a
+valid second argument to semver.inc (one of "patch", "minor", "major",
+"prepatch", "preminor", "premajor", "prerelease"). In the second case,
+the existing version will be incremented by 1 in the specified field.
+If run in a git repo, it will also create a version commit and tag, and
+fail if the repo is not clean.
+If supplied with --message
(shorthand: -m
) config option, npm will
+use it as a commit message when creating a version commit. If the
+message
config contains %s
then that will be replaced with the
+resulting version number. For example:
+npm version patch -m "Upgrade to %s for reasons"
+
If the sign-git-tag
config is set, then the tag will be signed using
+the -s
flag to git. Note that you must have a default GPG key set up
+in your git config for this to work properly. For example:
+$ npm config set sign-git-tag true
+$ npm version patch
+
+You need a passphrase to unlock the secret key for
+user: "isaacs (http://blog.izs.me/) <i@izs.me>"
+2048-bit RSA key, ID 6C481CF6, created 2010-08-31
+
+Enter passphrase:
+
SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-view.html b/deps/npm/html/partial/doc/cli/npm-view.html
new file mode 100644
index 00000000000..a5b38518fb1
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-view.html
@@ -0,0 +1,62 @@
+npm-view
View registry info
+SYNOPSIS
+npm view [@<scope>/]<name>[@<version>] [<field>[.<subfield>]...]
+npm v [@<scope>/]<name>[@<version>] [<field>[.<subfield>]...]
+
DESCRIPTION
+This command shows data about a package and prints it to the stream
+referenced by the outfd
config, which defaults to stdout.
+To show the package registry entry for the connect
package, you can do
+this:
+npm view connect
+
The default version is "latest" if unspecified.
+Field names can be specified after the package descriptor.
+For example, to show the dependencies of the ronn
package at version
+0.3.5, you could do the following:
+npm view ronn@0.3.5 dependencies
+
You can view child field by separating them with a period.
+To view the git repository URL for the latest version of npm, you could
+do this:
+npm view npm repository.url
+
This makes it easy to view information about a dependency with a bit of
+shell scripting. For example, to view all the data about the version of
+opts that ronn depends on, you can do this:
+npm view opts@$(npm view ronn dependencies.opts)
+
For fields that are arrays, requesting a non-numeric field will return
+all of the values from the objects in the list. For example, to get all
+the contributor names for the "express" project, you can do this:
+npm view express contributors.email
+
You may also use numeric indices in square braces to specifically select
+an item in an array field. To just get the email address of the first
+contributor in the list, you can do this:
+npm view express contributors[0].email
+
Multiple fields may be specified, and will be printed one after another.
+For exampls, to get all the contributor names and email addresses, you
+can do this:
+npm view express contributors.name contributors.email
+
"Person" fields are shown as a string if they would be shown as an
+object. So, for example, this will show the list of npm contributors in
+the shortened string format. (See package.json(5)
for more on this.)
+npm view npm contributors
+
If a version range is provided, then data will be printed for every
+matching version of the package. This will show which version of jsdom
+was required by each matching version of yui3:
+npm view yui3@'>0.5.4' dependencies.jsdom
+
OUTPUT
+If only a single string field for a single version is output, then it
+will not be colorized or quoted, so as to enable piping the output to
+another command. If the field is an object, it will be output as a JavaScript object literal.
+If the --json flag is given, the outputted fields will be JSON.
+If the version range matches multiple versions, than each printed value
+will be prefixed with the version it applies to.
+If multiple fields are requested, than each of them are prefixed with
+the field name.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-whoami.html b/deps/npm/html/partial/doc/cli/npm-whoami.html
new file mode 100644
index 00000000000..a0c0dd4cd82
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-whoami.html
@@ -0,0 +1,13 @@
+npm-whoami
Display npm username
+SYNOPSIS
+npm whoami
+
DESCRIPTION
+Print the username
config to standard output.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm.html b/deps/npm/html/partial/doc/cli/npm.html
new file mode 100644
index 00000000000..646fffcb378
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm.html
@@ -0,0 +1,134 @@
+npm
node package manager
+SYNOPSIS
+npm <command> [args]
+
VERSION
+2.1.6
+DESCRIPTION
+npm is the package manager for the Node JavaScript platform. It puts
+modules in place so that node can find them, and manages dependency
+conflicts intelligently.
+It is extremely configurable to support a wide variety of use cases.
+Most commonly, it is used to publish, discover, install, and develop node
+programs.
+Run npm help
to get a list of available commands.
+INTRODUCTION
+You probably got npm because you want to install stuff.
+Use npm install blerg
to install the latest version of "blerg". Check out
+npm-install(1)
for more info. It can do a lot of stuff.
+Use the npm search
command to show everything that's available.
+Use npm ls
to show everything you've installed.
+DEPENDENCIES
+If a package references to another package with a git URL, npm depends
+on a preinstalled git.
+If one of the packages npm tries to install is a native node module and
+requires compiling of C++ Code, npm will use
+node-gyp for that task.
+For a Unix system, node-gyp
+needs Python, make and a buildchain like GCC. On Windows,
+Python and Microsoft Visual Studio C++ is needed. Python 3 is
+not supported by node-gyp.
+For more information visit
+the node-gyp repository and
+the node-gyp Wiki.
+DIRECTORIES
+See npm-folders(5)
to learn about where npm puts stuff.
+In particular, npm has two modes of operation:
+
+- global mode:
npm installs packages into the install prefix at
+prefix/lib/node_modules
and bins are installed in prefix/bin
.
+- local mode:
npm installs packages into the current project directory, which
+defaults to the current working directory. Packages are installed to
+./node_modules
, and bins are installed to ./node_modules/.bin
.
+
+Local mode is the default. Use --global
or -g
on any command to
+operate in global mode instead.
+DEVELOPER USAGE
+If you're using npm to develop and publish your code, check out the
+following help topics:
+
+- json:
+Make a package.json file. See
package.json(5)
.
+- link:
+For linking your current working code into Node's path, so that you
+don't have to reinstall every time you make a change. Use
+
npm link
to do this.
+- install:
+It's a good idea to install things if you don't need the symbolic link.
+Especially, installing other peoples code from the registry is done via
+
npm install
+- adduser:
+Create an account or log in. Credentials are stored in the
+user config file.
+- publish:
+Use the
npm publish
command to upload your code to the registry.
+
+CONFIGURATION
+npm is extremely configurable. It reads its configuration options from
+5 places.
+
+- Command line switches:
Set a config with --key val
. All keys take a value, even if they
+are booleans (the config parser doesn't know what the options are at
+the time of parsing.) If no value is provided, then the option is set
+to boolean true
.
+- Environment Variables:
Set any config by prefixing the name in an environment variable with
+npm_config_
. For example, export npm_config_key=val
.
+- User Configs:
The file at $HOME/.npmrc is an ini-formatted list of configs. If
+present, it is parsed. If the userconfig
option is set in the cli
+or env, then that will be used instead.
+- Global Configs:
The file found at ../etc/npmrc (from the node executable, by default
+this resolves to /usr/local/etc/npmrc) will be parsed if it is found.
+If the globalconfig
option is set in the cli, env, or user config,
+then that file is parsed instead.
+- Defaults:
npm's default configuration options are defined in
+lib/utils/config-defs.js. These must not be changed.
+
+See npm-config(7)
for much much more information.
+CONTRIBUTIONS
+Patches welcome!
+
+- code:
+Read through
npm-coding-style(7)
if you plan to submit code.
+You don't have to agree with it, but you do have to follow it.
+- docs:
+If you find an error in the documentation, edit the appropriate markdown
+file in the "doc" folder. (Don't worry about generating the man page.)
+
+Contributors are listed in npm's package.json
file. You can view them
+easily by doing npm view npm contributors
.
+If you would like to contribute, but don't know what to work on, check
+the issues list or ask on the mailing list.
+
+BUGS
+When you find issues, please report them:
+
+- web:
+http://github.com/npm/npm/issues
+- email:
+npm-@googlegroups.com
+
+Be sure to include all of the output from the npm command that didn't work
+as expected. The npm-debug.log
file is also helpful to provide.
+You can also look for isaacs in #node.js on irc://irc.freenode.net. He
+will no doubt tell you to put the output in a gist or email.
+AUTHOR
+Isaac Z. Schlueter ::
+isaacs ::
+@izs ::
+i@izs.me
+SEE ALSO
+
+- npm-help(1)
+- npm-faq(7)
+- README
+- package.json(5)
+- npm-install(1)
+- npm-config(1)
+- npm-config(7)
+- npmrc(5)
+- npm-index(7)
+- npm(3)
+
+
diff --git a/deps/npm/html/partial/doc/files/npm-folders.html b/deps/npm/html/partial/doc/files/npm-folders.html
new file mode 100644
index 00000000000..08ea7ed13aa
--- /dev/null
+++ b/deps/npm/html/partial/doc/files/npm-folders.html
@@ -0,0 +1,164 @@
+npm-folders
Folder Structures Used by npm
+DESCRIPTION
+npm puts various things on your computer. That's its job.
+This document will tell you what it puts where.
+tl;dr
+
+- Local install (default): puts stuff in
./node_modules
of the current
+package root.
+- Global install (with
-g
): puts stuff in /usr/local or wherever node
+is installed.
+- Install it locally if you're going to
require()
it.
+- Install it globally if you're going to run it on the command line.
+- If you need both, then install it in both places, or use
npm link
.
+
+prefix Configuration
+The prefix
config defaults to the location where node is installed.
+On most systems, this is /usr/local
, and most of the time is the same
+as node's process.installPrefix
.
+On windows, this is the exact location of the node.exe binary. On Unix
+systems, it's one level up, since node is typically installed at
+{prefix}/bin/node
rather than {prefix}/node.exe
.
+When the global
flag is set, npm installs things into this prefix.
+When it is not set, it uses the root of the current package, or the
+current working directory if not in a package already.
+Node Modules
+Packages are dropped into the node_modules
folder under the prefix
.
+When installing locally, this means that you can
+require("packagename")
to load its main module, or
+require("packagename/lib/path/to/sub/module")
to load other modules.
+Global installs on Unix systems go to {prefix}/lib/node_modules
.
+Global installs on Windows go to {prefix}/node_modules
(that is, no
+lib
folder.)
+Scoped packages are installed the same way, except they are grouped together
+in a sub-folder of the relevant node_modules
folder with the name of that
+scope prefix by the @ symbol, e.g. npm install @myorg/package
would place
+the package in {prefix}/node_modules/@myorg/package
. See scopes(7)
for
+more details.
+If you wish to require()
a package, then install it locally.
+Executables
+When in global mode, executables are linked into {prefix}/bin
on Unix,
+or directly into {prefix}
on Windows.
+When in local mode, executables are linked into
+./node_modules/.bin
so that they can be made available to scripts run
+through npm. (For example, so that a test runner will be in the path
+when you run npm test
.)
+Man Pages
+When in global mode, man pages are linked into {prefix}/share/man
.
+When in local mode, man pages are not installed.
+Man pages are not installed on Windows systems.
+Cache
+See npm-cache(1)
. Cache files are stored in ~/.npm
on Posix, or
+~/npm-cache
on Windows.
+This is controlled by the cache
configuration param.
+Temp Files
+Temporary files are stored by default in the folder specified by the
+tmp
config, which defaults to the TMPDIR, TMP, or TEMP environment
+variables, or /tmp
on Unix and c:\windows\temp
on Windows.
+Temp files are given a unique folder under this root for each run of the
+program, and are deleted upon successful exit.
+More Information
+When installing locally, npm first tries to find an appropriate
+prefix
folder. This is so that npm install foo@1.2.3
will install
+to the sensible root of your package, even if you happen to have cd
ed
+into some other folder.
+Starting at the $PWD, npm will walk up the folder tree checking for a
+folder that contains either a package.json
file, or a node_modules
+folder. If such a thing is found, then that is treated as the effective
+"current directory" for the purpose of running npm commands. (This
+behavior is inspired by and similar to git's .git-folder seeking
+logic when running git commands in a working dir.)
+If no package root is found, then the current folder is used.
+When you run npm install foo@1.2.3
, then the package is loaded into
+the cache, and then unpacked into ./node_modules/foo
. Then, any of
+foo's dependencies are similarly unpacked into
+./node_modules/foo/node_modules/...
.
+Any bin files are symlinked to ./node_modules/.bin/
, so that they may
+be found by npm scripts when necessary.
+Global Installation
+If the global
configuration is set to true, then npm will
+install packages "globally".
+For global installation, packages are installed roughly the same way,
+but using the folders described above.
+Cycles, Conflicts, and Folder Parsimony
+Cycles are handled using the property of node's module system that it
+walks up the directories looking for node_modules
folders. So, at every
+stage, if a package is already installed in an ancestor node_modules
+folder, then it is not installed at the current location.
+Consider the case above, where foo -> bar -> baz
. Imagine if, in
+addition to that, baz depended on bar, so you'd have:
+foo -> bar -> baz -> bar -> baz ...
. However, since the folder
+structure is: foo/node_modules/bar/node_modules/baz
, there's no need to
+put another copy of bar into .../baz/node_modules
, since when it calls
+require("bar"), it will get the copy that is installed in
+foo/node_modules/bar
.
+This shortcut is only used if the exact same
+version would be installed in multiple nested node_modules
folders. It
+is still possible to have a/node_modules/b/node_modules/a
if the two
+"a" packages are different versions. However, without repeating the
+exact same package multiple times, an infinite regress will always be
+prevented.
+Another optimization can be made by installing dependencies at the
+highest level possible, below the localized "target" folder.
+Example
+Consider this dependency graph:
+foo
++-- blerg@1.2.5
++-- bar@1.2.3
+| +-- blerg@1.x (latest=1.3.7)
+| +-- baz@2.x
+| | `-- quux@3.x
+| | `-- bar@1.2.3 (cycle)
+| `-- asdf@*
+`-- baz@1.2.3
+ `-- quux@3.x
+ `-- bar
+
In this case, we might expect a folder structure like this:
+foo
++-- node_modules
+ +-- blerg (1.2.5) <---[A]
+ +-- bar (1.2.3) <---[B]
+ | `-- node_modules
+ | +-- baz (2.0.2) <---[C]
+ | | `-- node_modules
+ | | `-- quux (3.2.0)
+ | `-- asdf (2.3.4)
+ `-- baz (1.2.3) <---[D]
+ `-- node_modules
+ `-- quux (3.2.0) <---[E]
+
Since foo depends directly on bar@1.2.3
and baz@1.2.3
, those are
+installed in foo's node_modules
folder.
+Even though the latest copy of blerg is 1.3.7, foo has a specific
+dependency on version 1.2.5. So, that gets installed at [A]. Since the
+parent installation of blerg satisfies bar's dependency on blerg@1.x
,
+it does not install another copy under [B].
+Bar [B] also has dependencies on baz and asdf, so those are installed in
+bar's node_modules
folder. Because it depends on baz@2.x
, it cannot
+re-use the baz@1.2.3
installed in the parent node_modules
folder [D],
+and must install its own copy [C].
+Underneath bar, the baz -> quux -> bar
dependency creates a cycle.
+However, because bar is already in quux's ancestry [B], it does not
+unpack another copy of bar into that folder.
+Underneath foo -> baz
[D], quux's [E] folder tree is empty, because its
+dependency on bar is satisfied by the parent folder copy installed at [B].
+For a graphical breakdown of what is installed where, use npm ls
.
+Publishing
+Upon publishing, npm will look in the node_modules
folder. If any of
+the items there are not in the bundledDependencies
array, then they will
+not be included in the package tarball.
+This allows a package maintainer to install all of their dependencies
+(and dev dependencies) locally, but only re-publish those items that
+cannot be found elsewhere. See package.json(5)
for more information.
+SEE ALSO
+
+- npm-faq(7)
+- package.json(5)
+- npm-install(1)
+- npm-pack(1)
+- npm-cache(1)
+- npm-config(1)
+- npmrc(5)
+- npm-config(7)
+- npm-publish(1)
+
+
diff --git a/deps/npm/html/partial/doc/files/npm-global.html b/deps/npm/html/partial/doc/files/npm-global.html
new file mode 100644
index 00000000000..08ea7ed13aa
--- /dev/null
+++ b/deps/npm/html/partial/doc/files/npm-global.html
@@ -0,0 +1,164 @@
+npm-folders
Folder Structures Used by npm
+DESCRIPTION
+npm puts various things on your computer. That's its job.
+This document will tell you what it puts where.
+tl;dr
+
+- Local install (default): puts stuff in
./node_modules
of the current
+package root.
+- Global install (with
-g
): puts stuff in /usr/local or wherever node
+is installed.
+- Install it locally if you're going to
require()
it.
+- Install it globally if you're going to run it on the command line.
+- If you need both, then install it in both places, or use
npm link
.
+
+prefix Configuration
+The prefix
config defaults to the location where node is installed.
+On most systems, this is /usr/local
, and most of the time is the same
+as node's process.installPrefix
.
+On windows, this is the exact location of the node.exe binary. On Unix
+systems, it's one level up, since node is typically installed at
+{prefix}/bin/node
rather than {prefix}/node.exe
.
+When the global
flag is set, npm installs things into this prefix.
+When it is not set, it uses the root of the current package, or the
+current working directory if not in a package already.
+Node Modules
+Packages are dropped into the node_modules
folder under the prefix
.
+When installing locally, this means that you can
+require("packagename")
to load its main module, or
+require("packagename/lib/path/to/sub/module")
to load other modules.
+Global installs on Unix systems go to {prefix}/lib/node_modules
.
+Global installs on Windows go to {prefix}/node_modules
(that is, no
+lib
folder.)
+Scoped packages are installed the same way, except they are grouped together
+in a sub-folder of the relevant node_modules
folder with the name of that
+scope prefix by the @ symbol, e.g. npm install @myorg/package
would place
+the package in {prefix}/node_modules/@myorg/package
. See scopes(7)
for
+more details.
+If you wish to require()
a package, then install it locally.
+Executables
+When in global mode, executables are linked into {prefix}/bin
on Unix,
+or directly into {prefix}
on Windows.
+When in local mode, executables are linked into
+./node_modules/.bin
so that they can be made available to scripts run
+through npm. (For example, so that a test runner will be in the path
+when you run npm test
.)
+Man Pages
+When in global mode, man pages are linked into {prefix}/share/man
.
+When in local mode, man pages are not installed.
+Man pages are not installed on Windows systems.
+Cache
+See npm-cache(1)
. Cache files are stored in ~/.npm
on Posix, or
+~/npm-cache
on Windows.
+This is controlled by the cache
configuration param.
+Temp Files
+Temporary files are stored by default in the folder specified by the
+tmp
config, which defaults to the TMPDIR, TMP, or TEMP environment
+variables, or /tmp
on Unix and c:\windows\temp
on Windows.
+Temp files are given a unique folder under this root for each run of the
+program, and are deleted upon successful exit.
+More Information
+When installing locally, npm first tries to find an appropriate
+prefix
folder. This is so that npm install foo@1.2.3
will install
+to the sensible root of your package, even if you happen to have cd
ed
+into some other folder.
+Starting at the $PWD, npm will walk up the folder tree checking for a
+folder that contains either a package.json
file, or a node_modules
+folder. If such a thing is found, then that is treated as the effective
+"current directory" for the purpose of running npm commands. (This
+behavior is inspired by and similar to git's .git-folder seeking
+logic when running git commands in a working dir.)
+If no package root is found, then the current folder is used.
+When you run npm install foo@1.2.3
, then the package is loaded into
+the cache, and then unpacked into ./node_modules/foo
. Then, any of
+foo's dependencies are similarly unpacked into
+./node_modules/foo/node_modules/...
.
+Any bin files are symlinked to ./node_modules/.bin/
, so that they may
+be found by npm scripts when necessary.
+Global Installation
+If the global
configuration is set to true, then npm will
+install packages "globally".
+For global installation, packages are installed roughly the same way,
+but using the folders described above.
+Cycles, Conflicts, and Folder Parsimony
+Cycles are handled using the property of node's module system that it
+walks up the directories looking for node_modules
folders. So, at every
+stage, if a package is already installed in an ancestor node_modules
+folder, then it is not installed at the current location.
+Consider the case above, where foo -> bar -> baz
. Imagine if, in
+addition to that, baz depended on bar, so you'd have:
+foo -> bar -> baz -> bar -> baz ...
. However, since the folder
+structure is: foo/node_modules/bar/node_modules/baz
, there's no need to
+put another copy of bar into .../baz/node_modules
, since when it calls
+require("bar"), it will get the copy that is installed in
+foo/node_modules/bar
.
+This shortcut is only used if the exact same
+version would be installed in multiple nested node_modules
folders. It
+is still possible to have a/node_modules/b/node_modules/a
if the two
+"a" packages are different versions. However, without repeating the
+exact same package multiple times, an infinite regress will always be
+prevented.
+Another optimization can be made by installing dependencies at the
+highest level possible, below the localized "target" folder.
+Example
+Consider this dependency graph:
+foo
++-- blerg@1.2.5
++-- bar@1.2.3
+| +-- blerg@1.x (latest=1.3.7)
+| +-- baz@2.x
+| | `-- quux@3.x
+| | `-- bar@1.2.3 (cycle)
+| `-- asdf@*
+`-- baz@1.2.3
+ `-- quux@3.x
+ `-- bar
+
In this case, we might expect a folder structure like this:
+foo
++-- node_modules
+ +-- blerg (1.2.5) <---[A]
+ +-- bar (1.2.3) <---[B]
+ | `-- node_modules
+ | +-- baz (2.0.2) <---[C]
+ | | `-- node_modules
+ | | `-- quux (3.2.0)
+ | `-- asdf (2.3.4)
+ `-- baz (1.2.3) <---[D]
+ `-- node_modules
+ `-- quux (3.2.0) <---[E]
+
Since foo depends directly on bar@1.2.3
and baz@1.2.3
, those are
+installed in foo's node_modules
folder.
+Even though the latest copy of blerg is 1.3.7, foo has a specific
+dependency on version 1.2.5. So, that gets installed at [A]. Since the
+parent installation of blerg satisfies bar's dependency on blerg@1.x
,
+it does not install another copy under [B].
+Bar [B] also has dependencies on baz and asdf, so those are installed in
+bar's node_modules
folder. Because it depends on baz@2.x
, it cannot
+re-use the baz@1.2.3
installed in the parent node_modules
folder [D],
+and must install its own copy [C].
+Underneath bar, the baz -> quux -> bar
dependency creates a cycle.
+However, because bar is already in quux's ancestry [B], it does not
+unpack another copy of bar into that folder.
+Underneath foo -> baz
[D], quux's [E] folder tree is empty, because its
+dependency on bar is satisfied by the parent folder copy installed at [B].
+For a graphical breakdown of what is installed where, use npm ls
.
+Publishing
+Upon publishing, npm will look in the node_modules
folder. If any of
+the items there are not in the bundledDependencies
array, then they will
+not be included in the package tarball.
+This allows a package maintainer to install all of their dependencies
+(and dev dependencies) locally, but only re-publish those items that
+cannot be found elsewhere. See package.json(5)
for more information.
+SEE ALSO
+
+- npm-faq(7)
+- package.json(5)
+- npm-install(1)
+- npm-pack(1)
+- npm-cache(1)
+- npm-config(1)
+- npmrc(5)
+- npm-config(7)
+- npm-publish(1)
+
+
diff --git a/deps/npm/html/partial/doc/files/npm-json.html b/deps/npm/html/partial/doc/files/npm-json.html
new file mode 100644
index 00000000000..df3bea83742
--- /dev/null
+++ b/deps/npm/html/partial/doc/files/npm-json.html
@@ -0,0 +1,465 @@
+package.json
Specifics of npm's package.json handling
+DESCRIPTION
+This document is all you need to know about what's required in your package.json
+file. It must be actual JSON, not just a JavaScript object literal.
+A lot of the behavior described in this document is affected by the config
+settings described in npm-config(7)
.
+name
+The most important things in your package.json are the name and version fields.
+Those are actually required, and your package won't install without
+them. The name and version together form an identifier that is assumed
+to be completely unique. Changes to the package should come along with
+changes to the version.
+The name is what your thing is called. Some tips:
+
+- Don't put "js" or "node" in the name. It's assumed that it's js, since you're
+writing a package.json file, and you can specify the engine using the "engines"
+field. (See below.)
+- The name ends up being part of a URL, an argument on the command line, and a
+folder name. Any name with non-url-safe characters will be rejected.
+Also, it can't start with a dot or an underscore.
+- The name will probably be passed as an argument to require(), so it should
+be something short, but also reasonably descriptive.
+- You may want to check the npm registry to see if there's something by that name
+already, before you get too attached to it. http://registry.npmjs.org/
+
+A name can be optionally prefixed by a scope, e.g. @myorg/mypackage
. See
+npm-scope(7)
for more detail.
+version
+The most important things in your package.json are the name and version fields.
+Those are actually required, and your package won't install without
+them. The name and version together form an identifier that is assumed
+to be completely unique. Changes to the package should come along with
+changes to the version.
+Version must be parseable by
+node-semver, which is bundled
+with npm as a dependency. (npm install semver
to use it yourself.)
+More on version numbers and ranges at semver(7).
+description
+Put a description in it. It's a string. This helps people discover your
+package, as it's listed in npm search
.
+keywords
+Put keywords in it. It's an array of strings. This helps people
+discover your package as it's listed in npm search
.
+homepage
+The url to the project homepage.
+NOTE: This is not the same as "url". If you put a "url" field,
+then the registry will think it's a redirection to your package that has
+been published somewhere else, and spit at you.
+Literally. Spit. I'm so not kidding.
+bugs
+The url to your project's issue tracker and / or the email address to which
+issues should be reported. These are helpful for people who encounter issues
+with your package.
+It should look like this:
+{ "url" : "http://github.com/owner/project/issues"
+, "email" : "project@hostname.com"
+}
+
You can specify either one or both values. If you want to provide only a url,
+you can specify the value for "bugs" as a simple string instead of an object.
+If a url is provided, it will be used by the npm bugs
command.
+license
+You should specify a license for your package so that people know how they are
+permitted to use it, and any restrictions you're placing on it.
+The simplest way, assuming you're using a common license such as BSD-3-Clause
+or MIT, is to just specify the standard SPDX ID of the license you're using,
+like this:
+{ "license" : "BSD-3-Clause" }
+
You can check the full list of SPDX license IDs.
+Ideally you should pick one that is
+OSI approved.
+It's also a good idea to include a LICENSE file at the top level in
+your package.
+people fields: author, contributors
+The "author" is one person. "contributors" is an array of people. A "person"
+is an object with a "name" field and optionally "url" and "email", like this:
+{ "name" : "Barney Rubble"
+, "email" : "b@rubble.com"
+, "url" : "http://barnyrubble.tumblr.com/"
+}
+
Or you can shorten that all into a single string, and npm will parse it for you:
+"Barney Rubble <b@rubble.com> (http://barnyrubble.tumblr.com/)
+
Both email and url are optional either way.
+npm also sets a top-level "maintainers" field with your npm user info.
+files
+The "files" field is an array of files to include in your project. If
+you name a folder in the array, then it will also include the files
+inside that folder. (Unless they would be ignored by another rule.)
+You can also provide a ".npmignore" file in the root of your package,
+which will keep files from being included, even if they would be picked
+up by the files array. The ".npmignore" file works just like a
+".gitignore".
+main
+The main field is a module ID that is the primary entry point to your program.
+That is, if your package is named foo
, and a user installs it, and then does
+require("foo")
, then your main module's exports object will be returned.
+This should be a module ID relative to the root of your package folder.
+For most modules, it makes the most sense to have a main script and often not
+much else.
+bin
+A lot of packages have one or more executable files that they'd like to
+install into the PATH. npm makes this pretty easy (in fact, it uses this
+feature to install the "npm" executable.)
+To use this, supply a bin
field in your package.json which is a map of
+command name to local file name. On install, npm will symlink that file into
+prefix/bin
for global installs, or ./node_modules/.bin/
for local
+installs.
+For example, npm has this:
+{ "bin" : { "npm" : "./cli.js" } }
+
So, when you install npm, it'll create a symlink from the cli.js
script to
+/usr/local/bin/npm
.
+If you have a single executable, and its name should be the name
+of the package, then you can just supply it as a string. For example:
+{ "name": "my-program"
+, "version": "1.2.5"
+, "bin": "./path/to/program" }
+
would be the same as this:
+{ "name": "my-program"
+, "version": "1.2.5"
+, "bin" : { "my-program" : "./path/to/program" } }
+
man
+Specify either a single file or an array of filenames to put in place for the
+man
program to find.
+If only a single file is provided, then it's installed such that it is the
+result from man <pkgname>
, regardless of its actual filename. For example:
+{ "name" : "foo"
+, "version" : "1.2.3"
+, "description" : "A packaged foo fooer for fooing foos"
+, "main" : "foo.js"
+, "man" : "./man/doc.1"
+}
+
would link the ./man/doc.1
file in such that it is the target for man foo
+If the filename doesn't start with the package name, then it's prefixed.
+So, this:
+{ "name" : "foo"
+, "version" : "1.2.3"
+, "description" : "A packaged foo fooer for fooing foos"
+, "main" : "foo.js"
+, "man" : [ "./man/foo.1", "./man/bar.1" ]
+}
+
will create files to do man foo
and man foo-bar
.
+Man files must end with a number, and optionally a .gz
suffix if they are
+compressed. The number dictates which man section the file is installed into.
+{ "name" : "foo"
+, "version" : "1.2.3"
+, "description" : "A packaged foo fooer for fooing foos"
+, "main" : "foo.js"
+, "man" : [ "./man/foo.1", "./man/foo.2" ]
+}
+
will create entries for man foo
and man 2 foo
+directories
+The CommonJS Packages spec details a
+few ways that you can indicate the structure of your package using a directories
+object. If you look at npm's package.json,
+you'll see that it has directories for doc, lib, and man.
+In the future, this information may be used in other creative ways.
+directories.lib
+Tell people where the bulk of your library is. Nothing special is done
+with the lib folder in any way, but it's useful meta info.
+directories.bin
+If you specify a bin
directory, then all the files in that folder will
+be added as children of the bin
path.
+If you have a bin
path already, then this has no effect.
+directories.man
+A folder that is full of man pages. Sugar to generate a "man" array by
+walking the folder.
+directories.doc
+Put markdown files in here. Eventually, these will be displayed nicely,
+maybe, someday.
+directories.example
+Put example scripts in here. Someday, it might be exposed in some clever way.
+repository
+Specify the place where your code lives. This is helpful for people who
+want to contribute. If the git repo is on github, then the npm docs
+command will be able to find you.
+Do it like this:
+"repository" :
+ { "type" : "git"
+ , "url" : "http://github.com/npm/npm.git"
+ }
+
+"repository" :
+ { "type" : "svn"
+ , "url" : "http://v8.googlecode.com/svn/trunk/"
+ }
+
The URL should be a publicly available (perhaps read-only) url that can be handed
+directly to a VCS program without any modification. It should not be a url to an
+html project page that you put in your browser. It's for computers.
+scripts
+The "scripts" property is a dictionary containing script commands that are run
+at various times in the lifecycle of your package. The key is the lifecycle
+event, and the value is the command to run at that point.
+See npm-scripts(7)
to find out more about writing package scripts.
+config
+A "config" object can be used to set configuration parameters used in package
+scripts that persist across upgrades. For instance, if a package had the
+following:
+{ "name" : "foo"
+, "config" : { "port" : "8080" } }
+
and then had a "start" command that then referenced the
+npm_package_config_port
environment variable, then the user could
+override that by doing npm config set foo:port 8001
.
+See npm-config(7)
and npm-scripts(7)
for more on package
+configs.
+dependencies
+Dependencies are specified in a simple object that maps a package name to a
+version range. The version range is a string which has one or more
+space-separated descriptors. Dependencies can also be identified with a
+tarball or git URL.
+Please do not put test harnesses or transpilers in your
+dependencies
object. See devDependencies
, below.
+See semver(7) for more details about specifying version ranges.
+
+version
Must match version
exactly
+>version
Must be greater than version
+>=version
etc
+<version
+<=version
+~version
"Approximately equivalent to version" See semver(7)
+^version
"Compatible with version" See semver(7)
+1.2.x
1.2.0, 1.2.1, etc., but not 1.3.0
+http://...
See 'URLs as Dependencies' below
+*
Matches any version
+""
(just an empty string) Same as *
+version1 - version2
Same as >=version1 <=version2
.
+range1 || range2
Passes if either range1 or range2 are satisfied.
+git...
See 'Git URLs as Dependencies' below
+user/repo
See 'GitHub URLs' below
+tag
A specific version tagged and published as tag
See npm-tag(1)
+path/path/path
See Local Paths below
+
+For example, these are all valid:
+{ "dependencies" :
+ { "foo" : "1.0.0 - 2.9999.9999"
+ , "bar" : ">=1.0.2 <2.1.2"
+ , "baz" : ">1.0.2 <=2.3.4"
+ , "boo" : "2.0.1"
+ , "qux" : "<1.0.0 || >=2.3.1 <2.4.5 || >=2.5.2 <3.0.0"
+ , "asd" : "http://asdf.com/asdf.tar.gz"
+ , "til" : "~1.2"
+ , "elf" : "~1.2.3"
+ , "two" : "2.x"
+ , "thr" : "3.3.x"
+ , "lat" : "latest"
+ , "dyl" : "file:../dyl"
+ }
+}
+
URLs as Dependencies
+You may specify a tarball URL in place of a version range.
+This tarball will be downloaded and installed locally to your package at
+install time.
+Git URLs as Dependencies
+Git urls can be of the form:
+git://github.com/user/project.git#commit-ish
+git+ssh://user@hostname:project.git#commit-ish
+git+ssh://user@hostname/project.git#commit-ish
+git+http://user@hostname/project/blah.git#commit-ish
+git+https://user@hostname/project/blah.git#commit-ish
+
The commit-ish
can be any tag, sha, or branch which can be supplied as
+an argument to git checkout
. The default is master
.
+GitHub URLs
+As of version 1.1.65, you can refer to GitHub urls as just "foo": "user/foo-project". For example:
+{
+ "name": "foo",
+ "version": "0.0.0",
+ "dependencies": {
+ "express": "visionmedia/express"
+ }
+}
+
Local Paths
+As of version 2.0.0 you can provide a path to a local directory that contains a
+package. Local paths can be saved using npm install --save
, using any of
+these forms:
+../foo/bar
+~/foo/bar
+./foo/bar
+/foo/bar
+
in which case they will be normalized to a relative path and added to your
+package.json
. For example:
+{
+ "name": "baz",
+ "dependencies": {
+ "bar": "file:../foo/bar"
+ }
+}
+
This feature is helpful for local offline development and creating
+tests that require npm installing where you don't want to hit an
+external server, but should not be used when publishing packages
+to the public registry.
+devDependencies
+If someone is planning on downloading and using your module in their
+program, then they probably don't want or need to download and build
+the external test or documentation framework that you use.
+In this case, it's best to map these additional items in a devDependencies
+object.
+These things will be installed when doing npm link
or npm install
+from the root of a package, and can be managed like any other npm
+configuration param. See npm-config(7)
for more on the topic.
+For build steps that are not platform-specific, such as compiling
+CoffeeScript or other languages to JavaScript, use the prepublish
+script to do this, and make the required package a devDependency.
+For example:
+{ "name": "ethopia-waza",
+ "description": "a delightfully fruity coffee varietal",
+ "version": "1.2.3",
+ "devDependencies": {
+ "coffee-script": "~1.6.3"
+ },
+ "scripts": {
+ "prepublish": "coffee -o lib/ -c src/waza.coffee"
+ },
+ "main": "lib/waza.js"
+}
+
The prepublish
script will be run before publishing, so that users
+can consume the functionality without requiring them to compile it
+themselves. In dev mode (ie, locally running npm install
), it'll
+run this script as well, so that you can test it easily.
+peerDependencies
+In some cases, you want to express the compatibility of your package with an
+host tool or library, while not necessarily doing a require
of this host.
+This is usually refered to as a plugin. Notably, your module may be exposing
+a specific interface, expected and specified by the host documentation.
+For example:
+{
+ "name": "tea-latte",
+ "version": "1.3.5"
+ "peerDependencies": {
+ "tea": "2.x"
+ }
+}
+
This ensures your package tea-latte
can be installed along with the second
+major version of the host package tea
only. The host package is automatically
+installed if needed. npm install tea-latte
could possibly yield the following
+dependency graph:
+├── tea-latte@1.3.5
+└── tea@2.2.0
+
Trying to install another plugin with a conflicting requirement will cause an
+error. For this reason, make sure your plugin requirement is as broad as
+possible, and not to lock it down to specific patch versions.
+Assuming the host complies with semver, only changes in
+the host package's major version will break your plugin. Thus, if you've worked
+with every 1.x version of the host package, use "^1.0"
or "1.x"
to express
+this. If you depend on features introduced in 1.5.2, use ">= 1.5.2 < 2"
.
+bundledDependencies
+Array of package names that will be bundled when publishing the package.
+If this is spelled "bundleDependencies"
, then that is also honorable.
+optionalDependencies
+If a dependency can be used, but you would like npm to proceed if it cannot be
+found or fails to install, then you may put it in the optionalDependencies
+object. This is a map of package name to version or url, just like the
+dependencies
object. The difference is that build failures do not cause
+installation to fail.
+It is still your program's responsibility to handle the lack of the
+dependency. For example, something like this:
+try {
+ var foo = require('foo')
+ var fooVersion = require('foo/package.json').version
+} catch (er) {
+ foo = null
+}
+if ( notGoodFooVersion(fooVersion) ) {
+ foo = null
+}
+
+// .. then later in your program ..
+
+if (foo) {
+ foo.doFooThings()
+}
+
Entries in optionalDependencies
will override entries of the same name in
+dependencies
, so it's usually best to only put in one place.
+engines
+You can specify the version of node that your stuff works on:
+{ "engines" : { "node" : ">=0.10.3 <0.12" } }
+
And, like with dependencies, if you don't specify the version (or if you
+specify "*" as the version), then any version of node will do.
+If you specify an "engines" field, then npm will require that "node" be
+somewhere on that list. If "engines" is omitted, then npm will just assume
+that it works on node.
+You can also use the "engines" field to specify which versions of npm
+are capable of properly installing your program. For example:
+{ "engines" : { "npm" : "~1.0.20" } }
+
Note that, unless the user has set the engine-strict
config flag, this
+field is advisory only.
+engineStrict
+If you are sure that your module will definitely not run properly on
+versions of Node/npm other than those specified in the engines
object,
+then you can set "engineStrict": true
in your package.json file.
+This will override the user's engine-strict
config setting.
+Please do not do this unless you are really very very sure. If your
+engines object is something overly restrictive, you can quite easily and
+inadvertently lock yourself into obscurity and prevent your users from
+updating to new versions of Node. Consider this choice carefully. If
+people abuse it, it will be removed in a future version of npm.
+os
+You can specify which operating systems your
+module will run on:
+"os" : [ "darwin", "linux" ]
+
You can also blacklist instead of whitelist operating systems,
+just prepend the blacklisted os with a '!':
+"os" : [ "!win32" ]
+
The host operating system is determined by process.platform
+It is allowed to both blacklist, and whitelist, although there isn't any
+good reason to do this.
+cpu
+If your code only runs on certain cpu architectures,
+you can specify which ones.
+"cpu" : [ "x64", "ia32" ]
+
Like the os
option, you can also blacklist architectures:
+"cpu" : [ "!arm", "!mips" ]
+
The host architecture is determined by process.arch
+preferGlobal
+If your package is primarily a command-line application that should be
+installed globally, then set this value to true
to provide a warning
+if it is installed locally.
+It doesn't actually prevent users from installing it locally, but it
+does help prevent some confusion if it doesn't work as expected.
+private
+If you set "private": true
in your package.json, then npm will refuse
+to publish it.
+This is a way to prevent accidental publication of private repositories. If
+you would like to ensure that a given package is only ever published to a
+specific registry (for example, an internal registry), then use the
+publishConfig
dictionary described below to override the registry
config
+param at publish-time.
+publishConfig
+This is a set of config values that will be used at publish-time. It's
+especially handy if you want to set the tag or registry, so that you can
+ensure that a given package is not tagged with "latest" or published to
+the global public registry by default.
+Any config values can be overridden, but of course only "tag" and
+"registry" probably matter for the purposes of publishing.
+See npm-config(7)
to see the list of config options that can be
+overridden.
+DEFAULT VALUES
+npm will default some values based on package contents.
+
+"scripts": {"start": "node server.js"}
+If there is a server.js
file in the root of your package, then npm
+will default the start
command to node server.js
.
+
+"scripts":{"preinstall": "node-gyp rebuild"}
+If there is a binding.gyp
file in the root of your package, npm will
+default the preinstall
command to compile using node-gyp.
+
+"contributors": [...]
+If there is an AUTHORS
file in the root of your package, npm will
+treat each line as a Name <email> (url)
format, where email and url
+are optional. Lines which start with a #
or are blank, will be
+ignored.
+
+
+SEE ALSO
+
+- semver(7)
+- npm-init(1)
+- npm-version(1)
+- npm-config(1)
+- npm-config(7)
+- npm-help(1)
+- npm-faq(7)
+- npm-install(1)
+- npm-publish(1)
+- npm-rm(1)
+
+
diff --git a/deps/npm/html/partial/doc/files/npmrc.html b/deps/npm/html/partial/doc/files/npmrc.html
new file mode 100644
index 00000000000..ac386ca85e2
--- /dev/null
+++ b/deps/npm/html/partial/doc/files/npmrc.html
@@ -0,0 +1,53 @@
+npmrc
The npm config files
+DESCRIPTION
+npm gets its config settings from the command line, environment
+variables, and npmrc
files.
+The npm config
command can be used to update and edit the contents
+of the user and global npmrc files.
+For a list of available configuration options, see npm-config(7).
+FILES
+The four relevant files are:
+
+- per-project config file (/path/to/my/project/.npmrc)
+- per-user config file (~/.npmrc)
+- global config file ($PREFIX/npmrc)
+- npm builtin config file (/path/to/npm/npmrc)
+
+All npm config files are an ini-formatted list of key = value
+parameters. Environment variables can be replaced using
+${VARIABLE_NAME}
. For example:
+prefix = ${HOME}/.npm-packages
+
Each of these files is loaded, and config options are resolved in
+priority order. For example, a setting in the userconfig file would
+override the setting in the globalconfig file.
+Per-project config file
+When working locally in a project, a .npmrc
file in the root of the
+project (ie, a sibling of node_modules
and package.json
) will set
+config values specific to this project.
+Note that this only applies to the root of the project that you're
+running npm in. It has no effect when your module is published. For
+example, you can't publish a module that forces itself to install
+globally, or in a different location.
+Per-user config file
+$HOME/.npmrc
(or the userconfig
param, if set in the environment
+or on the command line)
+Global config file
+$PREFIX/etc/npmrc
(or the globalconfig
param, if set above):
+This file is an ini-file formatted list of key = value
parameters.
+Environment variables can be replaced as above.
+Built-in config file
+path/to/npm/itself/npmrc
+This is an unchangeable "builtin" configuration file that npm keeps
+consistent across updates. Set fields in here using the ./configure
+script that comes with npm. This is primarily for distribution
+maintainers to override default configs in a standard and consistent
+manner.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/files/package.json.html b/deps/npm/html/partial/doc/files/package.json.html
new file mode 100644
index 00000000000..df3bea83742
--- /dev/null
+++ b/deps/npm/html/partial/doc/files/package.json.html
@@ -0,0 +1,465 @@
+package.json
Specifics of npm's package.json handling
+DESCRIPTION
+This document is all you need to know about what's required in your package.json
+file. It must be actual JSON, not just a JavaScript object literal.
+A lot of the behavior described in this document is affected by the config
+settings described in npm-config(7)
.
+name
+The most important things in your package.json are the name and version fields.
+Those are actually required, and your package won't install without
+them. The name and version together form an identifier that is assumed
+to be completely unique. Changes to the package should come along with
+changes to the version.
+The name is what your thing is called. Some tips:
+
+- Don't put "js" or "node" in the name. It's assumed that it's js, since you're
+writing a package.json file, and you can specify the engine using the "engines"
+field. (See below.)
+- The name ends up being part of a URL, an argument on the command line, and a
+folder name. Any name with non-url-safe characters will be rejected.
+Also, it can't start with a dot or an underscore.
+- The name will probably be passed as an argument to require(), so it should
+be something short, but also reasonably descriptive.
+- You may want to check the npm registry to see if there's something by that name
+already, before you get too attached to it. http://registry.npmjs.org/
+
+A name can be optionally prefixed by a scope, e.g. @myorg/mypackage
. See
+npm-scope(7)
for more detail.
+version
+The most important things in your package.json are the name and version fields.
+Those are actually required, and your package won't install without
+them. The name and version together form an identifier that is assumed
+to be completely unique. Changes to the package should come along with
+changes to the version.
+Version must be parseable by
+node-semver, which is bundled
+with npm as a dependency. (npm install semver
to use it yourself.)
+More on version numbers and ranges at semver(7).
+description
+Put a description in it. It's a string. This helps people discover your
+package, as it's listed in npm search
.
+keywords
+Put keywords in it. It's an array of strings. This helps people
+discover your package as it's listed in npm search
.
+homepage
+The url to the project homepage.
+NOTE: This is not the same as "url". If you put a "url" field,
+then the registry will think it's a redirection to your package that has
+been published somewhere else, and spit at you.
+Literally. Spit. I'm so not kidding.
+bugs
+The url to your project's issue tracker and / or the email address to which
+issues should be reported. These are helpful for people who encounter issues
+with your package.
+It should look like this:
+{ "url" : "http://github.com/owner/project/issues"
+, "email" : "project@hostname.com"
+}
+
You can specify either one or both values. If you want to provide only a url,
+you can specify the value for "bugs" as a simple string instead of an object.
+If a url is provided, it will be used by the npm bugs
command.
+license
+You should specify a license for your package so that people know how they are
+permitted to use it, and any restrictions you're placing on it.
+The simplest way, assuming you're using a common license such as BSD-3-Clause
+or MIT, is to just specify the standard SPDX ID of the license you're using,
+like this:
+{ "license" : "BSD-3-Clause" }
+
You can check the full list of SPDX license IDs.
+Ideally you should pick one that is
+OSI approved.
+It's also a good idea to include a LICENSE file at the top level in
+your package.
+people fields: author, contributors
+The "author" is one person. "contributors" is an array of people. A "person"
+is an object with a "name" field and optionally "url" and "email", like this:
+{ "name" : "Barney Rubble"
+, "email" : "b@rubble.com"
+, "url" : "http://barnyrubble.tumblr.com/"
+}
+
Or you can shorten that all into a single string, and npm will parse it for you:
+"Barney Rubble <b@rubble.com> (http://barnyrubble.tumblr.com/)
+
Both email and url are optional either way.
+npm also sets a top-level "maintainers" field with your npm user info.
+files
+The "files" field is an array of files to include in your project. If
+you name a folder in the array, then it will also include the files
+inside that folder. (Unless they would be ignored by another rule.)
+You can also provide a ".npmignore" file in the root of your package,
+which will keep files from being included, even if they would be picked
+up by the files array. The ".npmignore" file works just like a
+".gitignore".
+main
+The main field is a module ID that is the primary entry point to your program.
+That is, if your package is named foo
, and a user installs it, and then does
+require("foo")
, then your main module's exports object will be returned.
+This should be a module ID relative to the root of your package folder.
+For most modules, it makes the most sense to have a main script and often not
+much else.
+bin
+A lot of packages have one or more executable files that they'd like to
+install into the PATH. npm makes this pretty easy (in fact, it uses this
+feature to install the "npm" executable.)
+To use this, supply a bin
field in your package.json which is a map of
+command name to local file name. On install, npm will symlink that file into
+prefix/bin
for global installs, or ./node_modules/.bin/
for local
+installs.
+For example, npm has this:
+{ "bin" : { "npm" : "./cli.js" } }
+
So, when you install npm, it'll create a symlink from the cli.js
script to
+/usr/local/bin/npm
.
+If you have a single executable, and its name should be the name
+of the package, then you can just supply it as a string. For example:
+{ "name": "my-program"
+, "version": "1.2.5"
+, "bin": "./path/to/program" }
+
would be the same as this:
+{ "name": "my-program"
+, "version": "1.2.5"
+, "bin" : { "my-program" : "./path/to/program" } }
+
man
+Specify either a single file or an array of filenames to put in place for the
+man
program to find.
+If only a single file is provided, then it's installed such that it is the
+result from man <pkgname>
, regardless of its actual filename. For example:
+{ "name" : "foo"
+, "version" : "1.2.3"
+, "description" : "A packaged foo fooer for fooing foos"
+, "main" : "foo.js"
+, "man" : "./man/doc.1"
+}
+
would link the ./man/doc.1
file in such that it is the target for man foo
+If the filename doesn't start with the package name, then it's prefixed.
+So, this:
+{ "name" : "foo"
+, "version" : "1.2.3"
+, "description" : "A packaged foo fooer for fooing foos"
+, "main" : "foo.js"
+, "man" : [ "./man/foo.1", "./man/bar.1" ]
+}
+
will create files to do man foo
and man foo-bar
.
+Man files must end with a number, and optionally a .gz
suffix if they are
+compressed. The number dictates which man section the file is installed into.
+{ "name" : "foo"
+, "version" : "1.2.3"
+, "description" : "A packaged foo fooer for fooing foos"
+, "main" : "foo.js"
+, "man" : [ "./man/foo.1", "./man/foo.2" ]
+}
+
will create entries for man foo
and man 2 foo
+directories
+The CommonJS Packages spec details a
+few ways that you can indicate the structure of your package using a directories
+object. If you look at npm's package.json,
+you'll see that it has directories for doc, lib, and man.
+In the future, this information may be used in other creative ways.
+directories.lib
+Tell people where the bulk of your library is. Nothing special is done
+with the lib folder in any way, but it's useful meta info.
+directories.bin
+If you specify a bin
directory, then all the files in that folder will
+be added as children of the bin
path.
+If you have a bin
path already, then this has no effect.
+directories.man
+A folder that is full of man pages. Sugar to generate a "man" array by
+walking the folder.
+directories.doc
+Put markdown files in here. Eventually, these will be displayed nicely,
+maybe, someday.
+directories.example
+Put example scripts in here. Someday, it might be exposed in some clever way.
+repository
+Specify the place where your code lives. This is helpful for people who
+want to contribute. If the git repo is on github, then the npm docs
+command will be able to find you.
+Do it like this:
+"repository" :
+ { "type" : "git"
+ , "url" : "http://github.com/npm/npm.git"
+ }
+
+"repository" :
+ { "type" : "svn"
+ , "url" : "http://v8.googlecode.com/svn/trunk/"
+ }
+
The URL should be a publicly available (perhaps read-only) url that can be handed
+directly to a VCS program without any modification. It should not be a url to an
+html project page that you put in your browser. It's for computers.
+scripts
+The "scripts" property is a dictionary containing script commands that are run
+at various times in the lifecycle of your package. The key is the lifecycle
+event, and the value is the command to run at that point.
+See npm-scripts(7)
to find out more about writing package scripts.
+config
+A "config" object can be used to set configuration parameters used in package
+scripts that persist across upgrades. For instance, if a package had the
+following:
+{ "name" : "foo"
+, "config" : { "port" : "8080" } }
+
and then had a "start" command that then referenced the
+npm_package_config_port
environment variable, then the user could
+override that by doing npm config set foo:port 8001
.
+See npm-config(7)
and npm-scripts(7)
for more on package
+configs.
+dependencies
+Dependencies are specified in a simple object that maps a package name to a
+version range. The version range is a string which has one or more
+space-separated descriptors. Dependencies can also be identified with a
+tarball or git URL.
+Please do not put test harnesses or transpilers in your
+dependencies
object. See devDependencies
, below.
+See semver(7) for more details about specifying version ranges.
+
+version
Must match version
exactly
+>version
Must be greater than version
+>=version
etc
+<version
+<=version
+~version
"Approximately equivalent to version" See semver(7)
+^version
"Compatible with version" See semver(7)
+1.2.x
1.2.0, 1.2.1, etc., but not 1.3.0
+http://...
See 'URLs as Dependencies' below
+*
Matches any version
+""
(just an empty string) Same as *
+version1 - version2
Same as >=version1 <=version2
.
+range1 || range2
Passes if either range1 or range2 are satisfied.
+git...
See 'Git URLs as Dependencies' below
+user/repo
See 'GitHub URLs' below
+tag
A specific version tagged and published as tag
See npm-tag(1)
+path/path/path
See Local Paths below
+
+For example, these are all valid:
+{ "dependencies" :
+ { "foo" : "1.0.0 - 2.9999.9999"
+ , "bar" : ">=1.0.2 <2.1.2"
+ , "baz" : ">1.0.2 <=2.3.4"
+ , "boo" : "2.0.1"
+ , "qux" : "<1.0.0 || >=2.3.1 <2.4.5 || >=2.5.2 <3.0.0"
+ , "asd" : "http://asdf.com/asdf.tar.gz"
+ , "til" : "~1.2"
+ , "elf" : "~1.2.3"
+ , "two" : "2.x"
+ , "thr" : "3.3.x"
+ , "lat" : "latest"
+ , "dyl" : "file:../dyl"
+ }
+}
+
URLs as Dependencies
+You may specify a tarball URL in place of a version range.
+This tarball will be downloaded and installed locally to your package at
+install time.
+Git URLs as Dependencies
+Git urls can be of the form:
+git://github.com/user/project.git#commit-ish
+git+ssh://user@hostname:project.git#commit-ish
+git+ssh://user@hostname/project.git#commit-ish
+git+http://user@hostname/project/blah.git#commit-ish
+git+https://user@hostname/project/blah.git#commit-ish
+
The commit-ish
can be any tag, sha, or branch which can be supplied as
+an argument to git checkout
. The default is master
.
+GitHub URLs
+As of version 1.1.65, you can refer to GitHub urls as just "foo": "user/foo-project". For example:
+{
+ "name": "foo",
+ "version": "0.0.0",
+ "dependencies": {
+ "express": "visionmedia/express"
+ }
+}
+
Local Paths
+As of version 2.0.0 you can provide a path to a local directory that contains a
+package. Local paths can be saved using npm install --save
, using any of
+these forms:
+../foo/bar
+~/foo/bar
+./foo/bar
+/foo/bar
+
in which case they will be normalized to a relative path and added to your
+package.json
. For example:
+{
+ "name": "baz",
+ "dependencies": {
+ "bar": "file:../foo/bar"
+ }
+}
+
This feature is helpful for local offline development and creating
+tests that require npm installing where you don't want to hit an
+external server, but should not be used when publishing packages
+to the public registry.
+devDependencies
+If someone is planning on downloading and using your module in their
+program, then they probably don't want or need to download and build
+the external test or documentation framework that you use.
+In this case, it's best to map these additional items in a devDependencies
+object.
+These things will be installed when doing npm link
or npm install
+from the root of a package, and can be managed like any other npm
+configuration param. See npm-config(7)
for more on the topic.
+For build steps that are not platform-specific, such as compiling
+CoffeeScript or other languages to JavaScript, use the prepublish
+script to do this, and make the required package a devDependency.
+For example:
+{ "name": "ethopia-waza",
+ "description": "a delightfully fruity coffee varietal",
+ "version": "1.2.3",
+ "devDependencies": {
+ "coffee-script": "~1.6.3"
+ },
+ "scripts": {
+ "prepublish": "coffee -o lib/ -c src/waza.coffee"
+ },
+ "main": "lib/waza.js"
+}
+
The prepublish
script will be run before publishing, so that users
+can consume the functionality without requiring them to compile it
+themselves. In dev mode (ie, locally running npm install
), it'll
+run this script as well, so that you can test it easily.
+peerDependencies
+In some cases, you want to express the compatibility of your package with an
+host tool or library, while not necessarily doing a require
of this host.
+This is usually refered to as a plugin. Notably, your module may be exposing
+a specific interface, expected and specified by the host documentation.
+For example:
+{
+ "name": "tea-latte",
+ "version": "1.3.5"
+ "peerDependencies": {
+ "tea": "2.x"
+ }
+}
+
This ensures your package tea-latte
can be installed along with the second
+major version of the host package tea
only. The host package is automatically
+installed if needed. npm install tea-latte
could possibly yield the following
+dependency graph:
+├── tea-latte@1.3.5
+└── tea@2.2.0
+
Trying to install another plugin with a conflicting requirement will cause an
+error. For this reason, make sure your plugin requirement is as broad as
+possible, and not to lock it down to specific patch versions.
+Assuming the host complies with semver, only changes in
+the host package's major version will break your plugin. Thus, if you've worked
+with every 1.x version of the host package, use "^1.0"
or "1.x"
to express
+this. If you depend on features introduced in 1.5.2, use ">= 1.5.2 < 2"
.
+bundledDependencies
+Array of package names that will be bundled when publishing the package.
+If this is spelled "bundleDependencies"
, then that is also honorable.
+optionalDependencies
+If a dependency can be used, but you would like npm to proceed if it cannot be
+found or fails to install, then you may put it in the optionalDependencies
+object. This is a map of package name to version or url, just like the
+dependencies
object. The difference is that build failures do not cause
+installation to fail.
+It is still your program's responsibility to handle the lack of the
+dependency. For example, something like this:
+try {
+ var foo = require('foo')
+ var fooVersion = require('foo/package.json').version
+} catch (er) {
+ foo = null
+}
+if ( notGoodFooVersion(fooVersion) ) {
+ foo = null
+}
+
+// .. then later in your program ..
+
+if (foo) {
+ foo.doFooThings()
+}
+
Entries in optionalDependencies
will override entries of the same name in
+dependencies
, so it's usually best to only put in one place.
+engines
+You can specify the version of node that your stuff works on:
+{ "engines" : { "node" : ">=0.10.3 <0.12" } }
+
And, like with dependencies, if you don't specify the version (or if you
+specify "*" as the version), then any version of node will do.
+If you specify an "engines" field, then npm will require that "node" be
+somewhere on that list. If "engines" is omitted, then npm will just assume
+that it works on node.
+You can also use the "engines" field to specify which versions of npm
+are capable of properly installing your program. For example:
+{ "engines" : { "npm" : "~1.0.20" } }
+
Note that, unless the user has set the engine-strict
config flag, this
+field is advisory only.
+engineStrict
+If you are sure that your module will definitely not run properly on
+versions of Node/npm other than those specified in the engines
object,
+then you can set "engineStrict": true
in your package.json file.
+This will override the user's engine-strict
config setting.
+Please do not do this unless you are really very very sure. If your
+engines object is something overly restrictive, you can quite easily and
+inadvertently lock yourself into obscurity and prevent your users from
+updating to new versions of Node. Consider this choice carefully. If
+people abuse it, it will be removed in a future version of npm.
+os
+You can specify which operating systems your
+module will run on:
+"os" : [ "darwin", "linux" ]
+
You can also blacklist instead of whitelist operating systems,
+just prepend the blacklisted os with a '!':
+"os" : [ "!win32" ]
+
The host operating system is determined by process.platform
+It is allowed to both blacklist, and whitelist, although there isn't any
+good reason to do this.
+cpu
+If your code only runs on certain cpu architectures,
+you can specify which ones.
+"cpu" : [ "x64", "ia32" ]
+
Like the os
option, you can also blacklist architectures:
+"cpu" : [ "!arm", "!mips" ]
+
The host architecture is determined by process.arch
+preferGlobal
+If your package is primarily a command-line application that should be
+installed globally, then set this value to true
to provide a warning
+if it is installed locally.
+It doesn't actually prevent users from installing it locally, but it
+does help prevent some confusion if it doesn't work as expected.
+private
+If you set "private": true
in your package.json, then npm will refuse
+to publish it.
+This is a way to prevent accidental publication of private repositories. If
+you would like to ensure that a given package is only ever published to a
+specific registry (for example, an internal registry), then use the
+publishConfig
dictionary described below to override the registry
config
+param at publish-time.
+publishConfig
+This is a set of config values that will be used at publish-time. It's
+especially handy if you want to set the tag or registry, so that you can
+ensure that a given package is not tagged with "latest" or published to
+the global public registry by default.
+Any config values can be overridden, but of course only "tag" and
+"registry" probably matter for the purposes of publishing.
+See npm-config(7)
to see the list of config options that can be
+overridden.
+DEFAULT VALUES
+npm will default some values based on package contents.
+
+"scripts": {"start": "node server.js"}
+If there is a server.js
file in the root of your package, then npm
+will default the start
command to node server.js
.
+
+"scripts":{"preinstall": "node-gyp rebuild"}
+If there is a binding.gyp
file in the root of your package, npm will
+default the preinstall
command to compile using node-gyp.
+
+"contributors": [...]
+If there is an AUTHORS
file in the root of your package, npm will
+treat each line as a Name <email> (url)
format, where email and url
+are optional. Lines which start with a #
or are blank, will be
+ignored.
+
+
+SEE ALSO
+
+- semver(7)
+- npm-init(1)
+- npm-version(1)
+- npm-config(1)
+- npm-config(7)
+- npm-help(1)
+- npm-faq(7)
+- npm-install(1)
+- npm-publish(1)
+- npm-rm(1)
+
+
diff --git a/deps/npm/html/partial/doc/index.html b/deps/npm/html/partial/doc/index.html
new file mode 100644
index 00000000000..f6678d93715
--- /dev/null
+++ b/deps/npm/html/partial/doc/index.html
@@ -0,0 +1,210 @@
+npm-index
Index of all npm documentation
+README
+node package manager
+Command Line Documentation
+Using npm on the command line
+npm(1)
+node package manager
+npm-adduser(1)
+Add a registry user account
+npm-bin(1)
+Display npm bin folder
+npm-bugs(1)
+Bugs for a package in a web browser maybe
+npm-build(1)
+Build a package
+npm-bundle(1)
+REMOVED
+npm-cache(1)
+Manipulates packages cache
+npm-completion(1)
+Tab Completion for npm
+npm-config(1)
+Manage the npm configuration files
+npm-dedupe(1)
+Reduce duplication
+npm-deprecate(1)
+Deprecate a version of a package
+npm-docs(1)
+Docs for a package in a web browser maybe
+npm-edit(1)
+Edit an installed package
+npm-explore(1)
+Browse an installed package
+npm-help-search(1)
+Search npm help documentation
+npm-help(1)
+Get help on npm
+npm-init(1)
+Interactively create a package.json file
+npm-install(1)
+Install a package
+npm-link(1)
+Symlink a package folder
+npm-ls(1)
+List installed packages
+npm-outdated(1)
+Check for outdated packages
+npm-owner(1)
+Manage package owners
+npm-pack(1)
+Create a tarball from a package
+npm-prefix(1)
+Display prefix
+npm-prune(1)
+Remove extraneous packages
+npm-publish(1)
+Publish a package
+npm-rebuild(1)
+Rebuild a package
+npm-repo(1)
+Open package repository page in the browser
+npm-restart(1)
+Start a package
+npm-rm(1)
+Remove a package
+npm-root(1)
+Display npm root
+npm-run-script(1)
+Run arbitrary package scripts
+npm-search(1)
+Search for packages
+npm-shrinkwrap(1)
+Lock down dependency versions
+npm-star(1)
+Mark your favorite packages
+npm-stars(1)
+View packages marked as favorites
+npm-start(1)
+Start a package
+npm-stop(1)
+Stop a package
+npm-tag(1)
+Tag a published version
+npm-test(1)
+Test a package
+npm-uninstall(1)
+Remove a package
+npm-unpublish(1)
+Remove a package from the registry
+npm-update(1)
+Update a package
+npm-version(1)
+Bump a package version
+npm-view(1)
+View registry info
+npm-whoami(1)
+Display npm username
+API Documentation
+Using npm in your Node programs
+npm(3)
+node package manager
+npm-bin(3)
+Display npm bin folder
+npm-bugs(3)
+Bugs for a package in a web browser maybe
+npm-cache(3)
+manage the npm cache programmatically
+npm-commands(3)
+npm commands
+npm-config(3)
+Manage the npm configuration files
+npm-deprecate(3)
+Deprecate a version of a package
+npm-docs(3)
+Docs for a package in a web browser maybe
+npm-edit(3)
+Edit an installed package
+npm-explore(3)
+Browse an installed package
+npm-help-search(3)
+Search the help pages
+npm-init(3)
+Interactively create a package.json file
+npm-install(3)
+install a package programmatically
+npm-link(3)
+Symlink a package folder
+npm-load(3)
+Load config settings
+npm-ls(3)
+List installed packages
+npm-outdated(3)
+Check for outdated packages
+npm-owner(3)
+Manage package owners
+npm-pack(3)
+Create a tarball from a package
+npm-prefix(3)
+Display prefix
+npm-prune(3)
+Remove extraneous packages
+npm-publish(3)
+Publish a package
+npm-rebuild(3)
+Rebuild a package
+npm-repo(3)
+Open package repository page in the browser
+npm-restart(3)
+Start a package
+npm-root(3)
+Display npm root
+npm-run-script(3)
+Run arbitrary package scripts
+npm-search(3)
+Search for packages
+npm-shrinkwrap(3)
+programmatically generate package shrinkwrap file
+npm-start(3)
+Start a package
+npm-stop(3)
+Stop a package
+npm-tag(3)
+Tag a published version
+npm-test(3)
+Test a package
+npm-uninstall(3)
+uninstall a package programmatically
+npm-unpublish(3)
+Remove a package from the registry
+npm-update(3)
+Update a package
+npm-version(3)
+Bump a package version
+npm-view(3)
+View registry info
+npm-whoami(3)
+Display npm username
+Files
+File system structures npm uses
+npm-folders(5)
+Folder Structures Used by npm
+npmrc(5)
+The npm config files
+package.json(5)
+Specifics of npm's package.json handling
+Misc
+Various other bits and bobs
+npm-coding-style(7)
+npm's "funny" coding style
+npm-config(7)
+More than you probably want to know about npm configuration
+npm-developers(7)
+Developer Guide
+npm-disputes(7)
+Handling Module Name Disputes
+npm-faq(7)
+Frequently Asked Questions
+npm-index(7)
+Index of all npm documentation
+npm-registry(7)
+The JavaScript Package Registry
+npm-scope(7)
+Scoped packages
+npm-scripts(7)
+How npm handles the "scripts" field
+removing-npm(7)
+Cleaning the Slate
+semver(7)
+The semantic versioner for npm
+
diff --git a/deps/npm/html/partial/doc/misc/npm-coding-style.html b/deps/npm/html/partial/doc/misc/npm-coding-style.html
new file mode 100644
index 00000000000..732b326c997
--- /dev/null
+++ b/deps/npm/html/partial/doc/misc/npm-coding-style.html
@@ -0,0 +1,127 @@
+npm-coding-style
npm's "funny" coding style
+DESCRIPTION
+npm's coding style is a bit unconventional. It is not different for
+difference's sake, but rather a carefully crafted style that is
+designed to reduce visual clutter and make bugs more apparent.
+If you want to contribute to npm (which is very encouraged), you should
+make your code conform to npm's style.
+Note: this concerns npm's code not the specific packages at npmjs.org
+Line Length
+Keep lines shorter than 80 characters. It's better for lines to be
+too short than to be too long. Break up long lists, objects, and other
+statements onto multiple lines.
+Indentation
+Two-spaces. Tabs are better, but they look like hell in web browsers
+(and on github), and node uses 2 spaces, so that's that.
+Configure your editor appropriately.
+Curly braces
+Curly braces belong on the same line as the thing that necessitates them.
+Bad:
+function ()
+{
+
Good:
+function () {
+
If a block needs to wrap to the next line, use a curly brace. Don't
+use it if it doesn't.
+Bad:
+if (foo) { bar() }
+while (foo)
+ bar()
+
Good:
+if (foo) bar()
+while (foo) {
+ bar()
+}
+
Semicolons
+Don't use them except in four situations:
+
+for (;;)
loops. They're actually required.
+- null loops like:
while (something) ;
(But you'd better have a good
+reason for doing that.)
+case "foo": doSomething(); break
+- In front of a leading
(
or [
at the start of the line.
+This prevents the expression from being interpreted
+as a function call or property access, respectively.
+
+Some examples of good semicolon usage:
+;(x || y).doSomething()
+;[a, b, c].forEach(doSomething)
+for (var i = 0; i < 10; i ++) {
+ switch (state) {
+ case "begin": start(); continue
+ case "end": finish(); break
+ default: throw new Error("unknown state")
+ }
+ end()
+}
+
Note that starting lines with -
and +
also should be prefixed
+with a semicolon, but this is much less common.
+Comma First
+If there is a list of things separated by commas, and it wraps
+across multiple lines, put the comma at the start of the next
+line, directly below the token that starts the list. Put the
+final token in the list on a line by itself. For example:
+var magicWords = [ "abracadabra"
+ , "gesundheit"
+ , "ventrilo"
+ ]
+ , spells = { "fireball" : function () { setOnFire() }
+ , "water" : function () { putOut() }
+ }
+ , a = 1
+ , b = "abc"
+ , etc
+ , somethingElse
+
Whitespace
+Put a single space in front of ( for anything other than a function call.
+Also use a single space wherever it makes things more readable.
+Don't leave trailing whitespace at the end of lines. Don't indent empty
+lines. Don't use more spaces than are helpful.
+Functions
+Use named functions. They make stack traces a lot easier to read.
+Callbacks, Sync/async Style
+Use the asynchronous/non-blocking versions of things as much as possible.
+It might make more sense for npm to use the synchronous fs APIs, but this
+way, the fs and http and child process stuff all uses the same callback-passing
+methodology.
+The callback should always be the last argument in the list. Its first
+argument is the Error or null.
+Be very careful never to ever ever throw anything. It's worse than useless.
+Just send the error message back as the first argument to the callback.
+Errors
+Always create a new Error object with your message. Don't just return a
+string message to the callback. Stack traces are handy.
+Logging
+Logging is done using the npmlog
+utility.
+Please clean up logs when they are no longer helpful. In particular,
+logging the same object over and over again is not helpful. Logs should
+report what's happening so that it's easier to track down where a fault
+occurs.
+Use appropriate log levels. See npm-config(7)
and search for
+"loglevel".
+Case, naming, etc.
+Use lowerCamelCase
for multiword identifiers when they refer to objects,
+functions, methods, properties, or anything not specified in this section.
+Use UpperCamelCase
for class names (things that you'd pass to "new").
+Use all-lower-hyphen-css-case
for multiword filenames and config keys.
+Use named functions. They make stack traces easier to follow.
+Use CAPS_SNAKE_CASE
for constants, things that should never change
+and are rarely used.
+Use a single uppercase letter for function names where the function
+would normally be anonymous, but needs to call itself recursively. It
+makes it clear that it's a "throwaway" function.
+null, undefined, false, 0
+Boolean variables and functions should always be either true
or
+false
. Don't set it to 0 unless it's supposed to be a number.
+When something is intentionally missing or removed, set it to null
.
+Don't set things to undefined
. Reserve that value to mean "not yet
+set to anything."
+Boolean objects are verboten.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/misc/npm-config.html b/deps/npm/html/partial/doc/misc/npm-config.html
new file mode 100644
index 00000000000..87409720b9f
--- /dev/null
+++ b/deps/npm/html/partial/doc/misc/npm-config.html
@@ -0,0 +1,739 @@
+npm-config
More than you probably want to know about npm configuration
+DESCRIPTION
+npm gets its configuration values from 6 sources, in this priority:
+Command Line Flags
+Putting --foo bar
on the command line sets the foo
configuration
+parameter to "bar"
. A --
argument tells the cli parser to stop
+reading flags. A --flag
parameter that is at the end of the
+command will be given the value of true
.
+Environment Variables
+Any environment variables that start with npm_config_
will be
+interpreted as a configuration parameter. For example, putting
+npm_config_foo=bar
in your environment will set the foo
+configuration parameter to bar
. Any environment configurations that
+are not given a value will be given the value of true
. Config
+values are case-insensitive, so NPM_CONFIG_FOO=bar
will work the
+same.
+npmrc Files
+The four relevant files are:
+
+- per-project config file (/path/to/my/project/.npmrc)
+- per-user config file (~/.npmrc)
+- global config file ($PREFIX/npmrc)
+- npm builtin config file (/path/to/npm/npmrc)
+
+See npmrc(5) for more details.
+Default Configs
+A set of configuration parameters that are internal to npm, and are
+defaults if nothing else is specified.
+Shorthands and Other CLI Niceties
+The following shorthands are parsed on the command-line:
+
+-v
: --version
+-h
, -?
, --help
, -H
: --usage
+-s
, --silent
: --loglevel silent
+-q
, --quiet
: --loglevel warn
+-d
: --loglevel info
+-dd
, --verbose
: --loglevel verbose
+-ddd
: --loglevel silly
+-g
: --global
+-C
: --prefix
+-l
: --long
+-m
: --message
+-p
, --porcelain
: --parseable
+-reg
: --registry
+-v
: --version
+-f
: --force
+-desc
: --description
+-S
: --save
+-D
: --save-dev
+-O
: --save-optional
+-B
: --save-bundle
+-E
: --save-exact
+-y
: --yes
+-n
: --yes false
+ll
and la
commands: ls --long
+
+If the specified configuration param resolves unambiguously to a known
+configuration parameter, then it is expanded to that configuration
+parameter. For example:
+npm ls --par
+# same as:
+npm ls --parseable
+
If multiple single-character shorthands are strung together, and the
+resulting combination is unambiguously not some other configuration
+param, then it is expanded to its various component pieces. For
+example:
+npm ls -gpld
+# same as:
+npm ls --global --parseable --long --loglevel info
+
Per-Package Config Settings
+When running scripts (see npm-scripts(7)
) the package.json "config"
+keys are overwritten in the environment if there is a config param of
+<name>[@<version>]:<key>
. For example, if the package.json has
+this:
+{ "name" : "foo"
+, "config" : { "port" : "8080" }
+, "scripts" : { "start" : "node server.js" } }
+
and the server.js is this:
+http.createServer(...).listen(process.env.npm_package_config_port)
+
then the user could change the behavior by doing:
+npm config set foo:port 80
+
See package.json(5) for more information.
+Config Settings
+always-auth
+
+- Default: false
+- Type: Boolean
+
+Force npm to always require authentication when accessing the registry,
+even for GET
requests.
+bin-links
+
+- Default:
true
+- Type: Boolean
+
+Tells npm to create symlinks (or .cmd
shims on Windows) for package
+executables.
+Set to false to have it not do this. This can be used to work around
+the fact that some file systems don't support symlinks, even on
+ostensibly Unix systems.
+browser
+
+- Default: OS X:
"open"
, Windows: "start"
, Others: "xdg-open"
+- Type: String
+
+The browser that is called by the npm docs
command to open websites.
+ca
+
+- Default: The npm CA certificate
+- Type: String or null
+
+The Certificate Authority signing certificate that is trusted for SSL
+connections to the registry.
+Set to null
to only allow "known" registrars, or to a specific CA cert
+to trust only that specific signing authority.
+See also the strict-ssl
config.
+cafile
+
+- Default:
null
+- Type: path
+
+A path to a file containing one or multiple Certificate Authority signing
+certificates. Similar to the ca
setting, but allows for multiple CA's, as
+well as for the CA information to be stored in a file on disk.
+cache
+
+- Default: Windows:
%AppData%\npm-cache
, Posix: ~/.npm
+- Type: path
+
+The location of npm's cache directory. See npm-cache(1)
+cache-lock-stale
+
+- Default: 60000 (1 minute)
+- Type: Number
+
+The number of ms before cache folder lockfiles are considered stale.
+cache-lock-retries
+
+- Default: 10
+- Type: Number
+
+Number of times to retry to acquire a lock on cache folder lockfiles.
+cache-lock-wait
+
+- Default: 10000 (10 seconds)
+- Type: Number
+
+Number of ms to wait for cache lock files to expire.
+cache-max
+
+- Default: Infinity
+- Type: Number
+
+The maximum time (in seconds) to keep items in the registry cache before
+re-checking against the registry.
+Note that no purging is done unless the npm cache clean
command is
+explicitly used, and that only GET requests use the cache.
+cache-min
+
+- Default: 10
+- Type: Number
+
+The minimum time (in seconds) to keep items in the registry cache before
+re-checking against the registry.
+Note that no purging is done unless the npm cache clean
command is
+explicitly used, and that only GET requests use the cache.
+cert
+
+- Default:
null
+- Type: String
+
+A client certificate to pass when accessing the registry.
+color
+
+- Default: true on Posix, false on Windows
+- Type: Boolean or
"always"
+
+If false, never shows colors. If "always"
then always shows colors.
+If true, then only prints color codes for tty file descriptors.
+depth
+
+- Default: Infinity
+- Type: Number
+
+The depth to go when recursing directories for npm ls
and
+npm cache ls
.
+description
+
+- Default: true
+- Type: Boolean
+
+Show the description in npm search
+dev
+
+- Default: false
+- Type: Boolean
+
+Install dev-dependencies
along with packages.
+Note that dev-dependencies
are also installed if the npat
flag is
+set.
+editor
+
+- Default:
EDITOR
environment variable if set, or "vi"
on Posix,
+or "notepad"
on Windows.
+- Type: path
+
+The command to run for npm edit
or npm config edit
.
+engine-strict
+
+- Default: false
+- Type: Boolean
+
+If set to true, then npm will stubbornly refuse to install (or even
+consider installing) any package that claims to not be compatible with
+the current Node.js version.
+force
+
+- Default: false
+- Type: Boolean
+
+Makes various commands more forceful.
+
+- lifecycle script failure does not block progress.
+- publishing clobbers previously published versions.
+- skips cache when requesting from the registry.
+- prevents checks against clobbering non-npm files.
+
+fetch-retries
+
+- Default: 2
+- Type: Number
+
+The "retries" config for the retry
module to use when fetching
+packages from the registry.
+fetch-retry-factor
+
+- Default: 10
+- Type: Number
+
+The "factor" config for the retry
module to use when fetching
+packages.
+fetch-retry-mintimeout
+
+- Default: 10000 (10 seconds)
+- Type: Number
+
+The "minTimeout" config for the retry
module to use when fetching
+packages.
+fetch-retry-maxtimeout
+
+- Default: 60000 (1 minute)
+- Type: Number
+
+The "maxTimeout" config for the retry
module to use when fetching
+packages.
+git
+
+- Default:
"git"
+- Type: String
+
+The command to use for git commands. If git is installed on the
+computer, but is not in the PATH
, then set this to the full path to
+the git binary.
+git-tag-version
+
+- Default:
true
+- Type: Boolean
+
+Tag the commit when using the npm version
command.
+global
+
+- Default: false
+- Type: Boolean
+
+Operates in "global" mode, so that packages are installed into the
+prefix
folder instead of the current working directory. See
+npm-folders(5)
for more on the differences in behavior.
+
+- packages are installed into the
{prefix}/lib/node_modules
folder, instead of the
+current working directory.
+- bin files are linked to
{prefix}/bin
+- man pages are linked to
{prefix}/share/man
+
+globalconfig
+
+- Default: {prefix}/etc/npmrc
+- Type: path
+
+The config file to read for global config options.
+group
+
+- Default: GID of the current process
+- Type: String or Number
+
+The group to use when running package scripts in global mode as the root
+user.
+heading
+
+- Default:
"npm"
+- Type: String
+
+The string that starts all the debugging log output.
+https-proxy
+
+- Default: the
HTTPS_PROXY
or https_proxy
or HTTP_PROXY
or
+http_proxy
environment variables.
+- Type: url
+
+A proxy to use for outgoing https requests.
+ignore-scripts
+
+- Default: false
+- Type: Boolean
+
+If true, npm does not run scripts specified in package.json files.
+init-module
+
+- Default: ~/.npm-init.js
+- Type: path
+
+A module that will be loaded by the npm init
command. See the
+documentation for the
+init-package-json module
+for more information, or npm-init(1).
+init-author-name
+
+- Default: ""
+- Type: String
+
+The value npm init
should use by default for the package author's name.
+init-author-email
+
+- Default: ""
+- Type: String
+
+The value npm init
should use by default for the package author's email.
+init-author-url
+
+- Default: ""
+- Type: String
+
+The value npm init
should use by default for the package author's homepage.
+init-license
+
+- Default: "ISC"
+- Type: String
+
+The value npm init
should use by default for the package license.
+init-version
+
+- Default: "0.0.0"
+- Type: semver
+
+The value that npm init
should use by default for the package
+version number, if not already set in package.json.
+json
+
+- Default: false
+- Type: Boolean
+
+Whether or not to output JSON data, rather than the normal output.
+This feature is currently experimental, and the output data structures
+for many commands is either not implemented in JSON yet, or subject to
+change. Only the output from npm ls --json
is currently valid.
+key
+
+- Default:
null
+- Type: String
+
+A client key to pass when accessing the registry.
+link
+
+- Default: false
+- Type: Boolean
+
+If true, then local installs will link if there is a suitable globally
+installed package.
+Note that this means that local installs can cause things to be
+installed into the global space at the same time. The link is only done
+if one of the two conditions are met:
+
+- The package is not already installed globally, or
+- the globally installed version is identical to the version that is
+being installed locally.
+
+local-address
+
+- Default: undefined
+- Type: IP Address
+
+The IP address of the local interface to use when making connections
+to the npm registry. Must be IPv4 in versions of Node prior to 0.12.
+loglevel
+
+- Default: "warn"
+- Type: String
+- Values: "silent", "error", "warn", "http", "info", "verbose", "silly"
+
+What level of logs to report. On failure, all logs are written to
+npm-debug.log
in the current working directory.
+Any logs of a higher level than the setting are shown.
+The default is "warn", which shows warn and error output.
+logstream
+
+- Default: process.stderr
+- Type: Stream
+
+This is the stream that is passed to the
+npmlog module at run time.
+It cannot be set from the command line, but if you are using npm
+programmatically, you may wish to send logs to somewhere other than
+stderr.
+If the color
config is set to true, then this stream will receive
+colored output if it is a TTY.
+long
+
+- Default: false
+- Type: Boolean
+
+Show extended information in npm ls
and npm search
.
+message
+
+- Default: "%s"
+- Type: String
+
+Commit message which is used by npm version
when creating version commit.
+Any "%s" in the message will be replaced with the version number.
+node-version
+
+- Default: process.version
+- Type: semver or false
+
+The node version to use when checking a package's engines
map.
+npat
+
+- Default: false
+- Type: Boolean
+
+Run tests on installation.
+onload-script
+
+- Default: false
+- Type: path
+
+A node module to require()
when npm loads. Useful for programmatic
+usage.
+optional
+
+- Default: true
+- Type: Boolean
+
+Attempt to install packages in the optionalDependencies
object. Note
+that if these packages fail to install, the overall installation
+process is not aborted.
+parseable
+
+- Default: false
+- Type: Boolean
+
+Output parseable results from commands that write to
+standard output.
+prefix
+
+- Default: see npm-folders(5)
+- Type: path
+
+The location to install global items. If set on the command line, then
+it forces non-global commands to run in the specified folder.
+production
+
+- Default: false
+- Type: Boolean
+
+Set to true to run in "production" mode.
+
+- devDependencies are not installed at the topmost level when running
+local
npm install
without any arguments.
+- Set the NODE_ENV="production" for lifecycle scripts.
+
+proprietary-attribs
+
+- Default: true
+- Type: Boolean
+
+Whether or not to include proprietary extended attributes in the
+tarballs created by npm.
+Unless you are expecting to unpack package tarballs with something other
+than npm -- particularly a very outdated tar implementation -- leave
+this as true.
+proxy
+
+- Default:
HTTP_PROXY
or http_proxy
environment variable, or null
+- Type: url
+
+A proxy to use for outgoing http requests.
+rebuild-bundle
+
+- Default: true
+- Type: Boolean
+
+Rebuild bundled dependencies after installation.
+registry
+
+- Default: https://registry.npmjs.org/
+- Type: url
+
+The base URL of the npm package registry.
+rollback
+
+- Default: true
+- Type: Boolean
+
+Remove failed installs.
+save
+
+- Default: false
+- Type: Boolean
+
+Save installed packages to a package.json file as dependencies.
+When used with the npm rm
command, it removes it from the dependencies
+object.
+Only works if there is already a package.json file present.
+save-bundle
+
+- Default: false
+- Type: Boolean
+
+If a package would be saved at install time by the use of --save
,
+--save-dev
, or --save-optional
, then also put it in the
+bundleDependencies
list.
+When used with the npm rm
command, it removes it from the
+bundledDependencies list.
+save-dev
+
+- Default: false
+- Type: Boolean
+
+Save installed packages to a package.json file as devDependencies
.
+When used with the npm rm
command, it removes it from the
+devDependencies
object.
+Only works if there is already a package.json file present.
+save-exact
+
+- Default: false
+- Type: Boolean
+
+Dependencies saved to package.json using --save
, --save-dev
or
+--save-optional
will be configured with an exact version rather than
+using npm's default semver range operator.
+save-optional
+
+- Default: false
+- Type: Boolean
+
+Save installed packages to a package.json file as
+optionalDependencies.
+When used with the npm rm
command, it removes it from the
+devDependencies
object.
+Only works if there is already a package.json file present.
+save-prefix
+
+- Default: '^'
+- Type: String
+
+Configure how versions of packages installed to a package.json file via
+--save
or --save-dev
get prefixed.
+For example if a package has version 1.2.3
, by default it's version is
+set to ^1.2.3
which allows minor upgrades for that package, but after
+npm config set save-prefix='~'
it would be set to ~1.2.3
which only allows
+patch upgrades.
+scope
+
+- Default: ""
+- Type: String
+
+Associate an operation with a scope for a scoped registry. Useful when logging
+in to a private registry for the first time:
+npm login --scope=@organization --registry=registry.organization.com
, which
+will cause @organization
to be mapped to the registry for future installation
+of packages specified according to the pattern @organization/package
.
+searchopts
+
+- Default: ""
+- Type: String
+
+Space-separated options that are always passed to search.
+searchexclude
+
+- Default: ""
+- Type: String
+
+Space-separated options that limit the results from search.
+searchsort
+
+- Default: "name"
+- Type: String
+- Values: "name", "-name", "date", "-date", "description",
+"-description", "keywords", "-keywords"
+
+Indication of which field to sort search results by. Prefix with a -
+character to indicate reverse sort.
+shell
+
+- Default: SHELL environment variable, or "bash" on Posix, or "cmd" on
+Windows
+- Type: path
+
+The shell to run for the npm explore
command.
+shrinkwrap
+
+- Default: true
+- Type: Boolean
+
+If set to false, then ignore npm-shrinkwrap.json
files when
+installing.
+sign-git-tag
+
+- Default: false
+- Type: Boolean
+
+If set to true, then the npm version
command will tag the version
+using -s
to add a signature.
+Note that git requires you to have set up GPG keys in your git configs
+for this to work properly.
+spin
+
+- Default: true
+- Type: Boolean or
"always"
+
+When set to true
, npm will display an ascii spinner while it is doing
+things, if process.stderr
is a TTY.
+Set to false
to suppress the spinner, or set to always
to output
+the spinner even for non-TTY outputs.
+strict-ssl
+
+- Default: true
+- Type: Boolean
+
+Whether or not to do SSL key validation when making requests to the
+registry via https.
+See also the ca
config.
+tag
+
+- Default: latest
+- Type: String
+
+If you ask npm to install a package and don't tell it a specific version, then
+it will install the specified tag.
+Also the tag that is added to the package@version specified by the npm
+tag
command, if no explicit tag is given.
+tmp
+
+- Default: TMPDIR environment variable, or "/tmp"
+- Type: path
+
+Where to store temporary files and folders. All temp files are deleted
+on success, but left behind on failure for forensic purposes.
+unicode
+
+- Default: true
+- Type: Boolean
+
+When set to true, npm uses unicode characters in the tree output. When
+false, it uses ascii characters to draw trees.
+unsafe-perm
+
+- Default: false if running as root, true otherwise
+- Type: Boolean
+
+Set to true to suppress the UID/GID switching when running package
+scripts. If set explicitly to false, then installing as a non-root user
+will fail.
+usage
+
+- Default: false
+- Type: Boolean
+
+Set to show short usage output (like the -H output)
+instead of complete help when doing npm-help(1)
.
+user
+
+- Default: "nobody"
+- Type: String or Number
+
+The UID to set to when running package scripts as root.
+userconfig
+
+- Default: ~/.npmrc
+- Type: path
+
+The location of user-level configuration settings.
+umask
+
+- Default: 022
+- Type: Octal numeric string
+
+The "umask" value to use when setting the file creation mode on files
+and folders.
+Folders and executables are given a mode which is 0777
masked against
+this value. Other files are given a mode which is 0666
masked against
+this value. Thus, the defaults are 0755
and 0644
respectively.
+user-agent
+
+- Default: node/{process.version} {process.platform} {process.arch}
+- Type: String
+
+Sets a User-Agent to the request header
+version
+
+- Default: false
+- Type: boolean
+
+If true, output the npm version and exit successfully.
+Only relevant when specified explicitly on the command line.
+versions
+
+- Default: false
+- Type: boolean
+
+If true, output the npm version as well as node's process.versions
map, and
+exit successfully.
+Only relevant when specified explicitly on the command line.
+viewer
+
+- Default: "man" on Posix, "browser" on Windows
+- Type: path
+
+The program to use to view help content.
+Set to "browser"
to view html help content in the default web browser.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/misc/npm-developers.html b/deps/npm/html/partial/doc/misc/npm-developers.html
new file mode 100644
index 00000000000..7ba880a44bc
--- /dev/null
+++ b/deps/npm/html/partial/doc/misc/npm-developers.html
@@ -0,0 +1,161 @@
+npm-developers
Developer Guide
+DESCRIPTION
+So, you've decided to use npm to develop (and maybe publish/deploy)
+your project.
+Fantastic!
+There are a few things that you need to do above the simple steps
+that your users will do to install your program.
+About These Documents
+These are man pages. If you install npm, you should be able to
+then do man npm-thing
to get the documentation on a particular
+topic, or npm help thing
to see the same information.
+What is a package
+A package is:
+
+- a) a folder containing a program described by a package.json file
+- b) a gzipped tarball containing (a)
+- c) a url that resolves to (b)
+- d) a
<name>@<version>
that is published on the registry with (c)
+- e) a
<name>@<tag>
that points to (d)
+- f) a
<name>
that has a "latest" tag satisfying (e)
+- g) a
git
url that, when cloned, results in (a).
+
+Even if you never publish your package, you can still get a lot of
+benefits of using npm if you just want to write a node program (a), and
+perhaps if you also want to be able to easily install it elsewhere
+after packing it up into a tarball (b).
+Git urls can be of the form:
+git://github.com/user/project.git#commit-ish
+git+ssh://user@hostname:project.git#commit-ish
+git+http://user@hostname/project/blah.git#commit-ish
+git+https://user@hostname/project/blah.git#commit-ish
+
The commit-ish
can be any tag, sha, or branch which can be supplied as
+an argument to git checkout
. The default is master
.
+The package.json File
+You need to have a package.json
file in the root of your project to do
+much of anything with npm. That is basically the whole interface.
+See package.json(5)
for details about what goes in that file. At the very
+least, you need:
+
+name:
+This should be a string that identifies your project. Please do not
+use the name to specify that it runs on node, or is in JavaScript.
+You can use the "engines" field to explicitly state the versions of
+node (or whatever else) that your program requires, and it's pretty
+well assumed that it's javascript.
+It does not necessarily need to match your github repository name.
+So, node-foo
and bar-js
are bad names. foo
or bar
are better.
+
+version:
+A semver-compatible version.
+
+engines:
+Specify the versions of node (or whatever else) that your program
+runs on. The node API changes a lot, and there may be bugs or new
+functionality that you depend on. Be explicit.
+
+author:
+Take some credit.
+
+scripts:
+If you have a special compilation or installation script, then you
+should put it in the scripts
object. You should definitely have at
+least a basic smoke-test command as the "scripts.test" field.
+See npm-scripts(7).
+
+main:
+If you have a single module that serves as the entry point to your
+program (like what the "foo" package gives you at require("foo")),
+then you need to specify that in the "main" field.
+
+directories:
+This is an object mapping names to folders. The best ones to include are
+"lib" and "doc", but if you use "man" to specify a folder full of man pages,
+they'll get installed just like these ones.
+
+
+You can use npm init
in the root of your package in order to get you
+started with a pretty basic package.json file. See npm-init(1)
for
+more info.
+Keeping files out of your package
+Use a .npmignore
file to keep stuff out of your package. If there's
+no .npmignore
file, but there is a .gitignore
file, then npm will
+ignore the stuff matched by the .gitignore
file. If you want to
+include something that is excluded by your .gitignore
file, you can
+create an empty .npmignore
file to override it.
+By default, the following paths and files are ignored, so there's no
+need to add them to .npmignore
explicitly:
+
+.*.swp
+._*
+.DS_Store
+.git
+.hg
+.lock-wscript
+.svn
+.wafpickle-*
+CVS
+npm-debug.log
+
+Additionally, everything in node_modules
is ignored, except for
+bundled dependencies. npm automatically handles this for you, so don't
+bother adding node_modules
to .npmignore
.
+The following paths and files are never ignored, so adding them to
+.npmignore
is pointless:
+
+package.json
+README.*
+
+Link Packages
+npm link
is designed to install a development package and see the
+changes in real time without having to keep re-installing it. (You do
+need to either re-link or npm rebuild -g
to update compiled packages,
+of course.)
+More info at npm-link(1)
.
+Before Publishing: Make Sure Your Package Installs and Works
+This is important.
+If you can not install it locally, you'll have
+problems trying to publish it. Or, worse yet, you'll be able to
+publish it, but you'll be publishing a broken or pointless package.
+So don't do that.
+In the root of your package, do this:
+npm install . -g
+
That'll show you that it's working. If you'd rather just create a symlink
+package that points to your working directory, then do this:
+npm link
+
Use npm ls -g
to see if it's there.
+To test a local install, go into some other folder, and then do:
+cd ../some-other-folder
+npm install ../my-package
+
to install it locally into the node_modules folder in that other place.
+Then go into the node-repl, and try using require("my-thing") to
+bring in your module's main module.
+Create a User Account
+Create a user with the adduser command. It works like this:
+npm adduser
+
and then follow the prompts.
+This is documented better in npm-adduser(1).
+Publish your package
+This part's easy. IN the root of your folder, do this:
+npm publish
+
You can give publish a url to a tarball, or a filename of a tarball,
+or a path to a folder.
+Note that pretty much everything in that folder will be exposed
+by default. So, if you have secret stuff in there, use a
+.npmignore
file to list out the globs to ignore, or publish
+from a fresh checkout.
+Brag about it
+Send emails, write blogs, blab in IRC.
+Tell the world how easy it is to install your program!
+SEE ALSO
+
+- npm-faq(7)
+- npm(1)
+- npm-init(1)
+- package.json(5)
+- npm-scripts(7)
+- npm-publish(1)
+- npm-adduser(1)
+- npm-registry(7)
+
+
diff --git a/deps/npm/html/partial/doc/misc/npm-disputes.html b/deps/npm/html/partial/doc/misc/npm-disputes.html
new file mode 100644
index 00000000000..6a7abca7122
--- /dev/null
+++ b/deps/npm/html/partial/doc/misc/npm-disputes.html
@@ -0,0 +1,92 @@
+npm-disputes
Handling Module Name Disputes
+SYNOPSIS
+
+- Get the author email with
npm owner ls <pkgname>
+- Email the author, CC support@npmjs.com
+- After a few weeks, if there's no resolution, we'll sort it out.
+
+Don't squat on package names. Publish code or move out of the way.
+DESCRIPTION
+There sometimes arise cases where a user publishes a module, and then
+later, some other user wants to use that name. Here are some common
+ways that happens (each of these is based on actual events.)
+
+- Joe writes a JavaScript module
foo
, which is not node-specific.
+Joe doesn't use node at all. Bob wants to use foo
in node, so he
+wraps it in an npm module. Some time later, Joe starts using node,
+and wants to take over management of his program.
+- Bob writes an npm module
foo
, and publishes it. Perhaps much
+later, Joe finds a bug in foo
, and fixes it. He sends a pull
+request to Bob, but Bob doesn't have the time to deal with it,
+because he has a new job and a new baby and is focused on his new
+erlang project, and kind of not involved with node any more. Joe
+would like to publish a new foo
, but can't, because the name is
+taken.
+- Bob writes a 10-line flow-control library, and calls it
foo
, and
+publishes it to the npm registry. Being a simple little thing, it
+never really has to be updated. Joe works for Foo Inc, the makers
+of the critically acclaimed and widely-marketed foo
JavaScript
+toolkit framework. They publish it to npm as foojs
, but people are
+routinely confused when npm install foo
is some different thing.
+- Bob writes a parser for the widely-known
foo
file format, because
+he needs it for work. Then, he gets a new job, and never updates the
+prototype. Later on, Joe writes a much more complete foo
parser,
+but can't publish, because Bob's foo
is in the way.
+
+The validity of Joe's claim in each situation can be debated. However,
+Joe's appropriate course of action in each case is the same.
+
+npm owner ls foo
. This will tell Joe the email address of the
+owner (Bob).
+- Joe emails Bob, explaining the situation as respectfully as
+possible, and what he would like to do with the module name. He
+adds the npm support staff support@npmjs.com to the CC list of
+the email. Mention in the email that Bob can run
npm owner add
+joe foo
to add Joe as an owner of the foo
package.
+- After a reasonable amount of time, if Bob has not responded, or if
+Bob and Joe can't come to any sort of resolution, email support
+support@npmjs.com and we'll sort it out. ("Reasonable" is
+usually at least 4 weeks, but extra time is allowed around common
+holidays.)
+
+REASONING
+In almost every case so far, the parties involved have been able to reach
+an amicable resolution without any major intervention. Most people
+really do want to be reasonable, and are probably not even aware that
+they're in your way.
+Module ecosystems are most vibrant and powerful when they are as
+self-directed as possible. If an admin one day deletes something you
+had worked on, then that is going to make most people quite upset,
+regardless of the justification. When humans solve their problems by
+talking to other humans with respect, everyone has the chance to end up
+feeling good about the interaction.
+EXCEPTIONS
+Some things are not allowed, and will be removed without discussion if
+they are brought to the attention of the npm registry admins, including
+but not limited to:
+
+- Malware (that is, a package designed to exploit or harm the machine on
+which it is installed).
+- Violations of copyright or licenses (for example, cloning an
+MIT-licensed program, and then removing or changing the copyright and
+license statement).
+- Illegal content.
+- "Squatting" on a package name that you plan to use, but aren't
+actually using. Sorry, I don't care how great the name is, or how
+perfect a fit it is for the thing that someday might happen. If
+someone wants to use it today, and you're just taking up space with
+an empty tarball, you're going to be evicted.
+- Putting empty packages in the registry. Packages must have SOME
+functionality. It can be silly, but it can't be nothing. (See
+also: squatting.)
+- Doing weird things with the registry, like using it as your own
+personal application database or otherwise putting non-packagey
+things into it.
+
+If you see bad behavior like this, please report it right away.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/misc/npm-faq.html b/deps/npm/html/partial/doc/misc/npm-faq.html
new file mode 100644
index 00000000000..7fc16344f79
--- /dev/null
+++ b/deps/npm/html/partial/doc/misc/npm-faq.html
@@ -0,0 +1,264 @@
+npm-faq
Frequently Asked Questions
+Where can I find these docs in HTML?
+https://www.npmjs.org/doc/, or run:
+npm config set viewer browser
+
to open these documents in your default web browser rather than man
.
+It didn't work.
+That's not really a question.
+Why didn't it work?
+I don't know yet.
+Read the error output, and if you can't figure out what it means,
+do what it says and post a bug with all the information it asks for.
+Where does npm put stuff?
+See npm-folders(5)
+tl;dr:
+
+- Use the
npm root
command to see where modules go, and the npm bin
+command to see where executables go
+- Global installs are different from local installs. If you install
+something with the
-g
flag, then its executables go in npm bin -g
+and its modules go in npm root -g
.
+
+How do I install something on my computer in a central location?
+Install it globally by tacking -g
or --global
to the command. (This
+is especially important for command line utilities that need to add
+their bins to the global system PATH
.)
+I installed something globally, but I can't require()
it
+Install it locally.
+The global install location is a place for command-line utilities
+to put their bins in the system PATH
. It's not for use with require()
.
+If you require()
a module in your code, then that means it's a
+dependency, and a part of your program. You need to install it locally
+in your program.
+Why can't npm just put everything in one place, like other package managers?
+Not every change is an improvement, but every improvement is a change.
+This would be like asking git to do network IO for every commit. It's
+not going to happen, because it's a terrible idea that causes more
+problems than it solves.
+It is much harder to avoid dependency conflicts without nesting
+dependencies. This is fundamental to the way that npm works, and has
+proven to be an extremely successful approach. See npm-folders(5)
for
+more details.
+If you want a package to be installed in one place, and have all your
+programs reference the same copy of it, then use the npm link
command.
+That's what it's for. Install it globally, then link it into each
+program that uses it.
+Whatever, I really want the old style 'everything global' style.
+Write your own package manager. You could probably even wrap up npm
+in a shell script if you really wanted to.
+npm will not help you do something that is known to be a bad idea.
+Should I check my node_modules
folder into git?
+Usually, no. Allow npm to resolve dependencies for your packages.
+For packages you deploy, such as websites and apps,
+you should use npm shrinkwrap to lock down your full dependency tree:
+https://www.npmjs.org/doc/cli/npm-shrinkwrap.html
+If you are paranoid about depending on the npm ecosystem,
+you should run a private npm mirror or a private cache.
+If you want 100% confidence in being able to reproduce the specific bytes
+included in a deployment, you should use an additional mechanism that can
+verify contents rather than versions. For example,
+Amazon machine images, DigitalOcean snapshots, Heroku slugs, or simple tarballs.
+Is it 'npm' or 'NPM' or 'Npm'?
+npm should never be capitalized unless it is being displayed in a
+location that is customarily all-caps (such as the title of man pages.)
+If 'npm' is an acronym, why is it never capitalized?
+Contrary to the belief of many, "npm" is not in fact an abbreviation for
+"Node Package Manager". It is a recursive bacronymic abbreviation for
+"npm is not an acronym". (If it was "ninaa", then it would be an
+acronym, and thus incorrectly named.)
+"NPM", however, is an acronym (more precisely, a capitonym) for the
+National Association of Pastoral Musicians. You can learn more
+about them at http://npm.org/.
+In software, "NPM" is a Non-Parametric Mapping utility written by
+Chris Rorden. You can analyze pictures of brains with it. Learn more
+about the (capitalized) NPM program at http://www.cabiatl.com/mricro/npm/.
+The first seed that eventually grew into this flower was a bash utility
+named "pm", which was a shortened descendent of "pkgmakeinst", a
+bash function that was used to install various different things on different
+platforms, most often using Yahoo's yinst
. If npm
was ever an
+acronym for anything, it was node pm
or maybe new pm
.
+So, in all seriousness, the "npm" project is named after its command-line
+utility, which was organically selected to be easily typed by a right-handed
+programmer using a US QWERTY keyboard layout, ending with the
+right-ring-finger in a postition to type the -
key for flags and
+other command-line arguments. That command-line utility is always
+lower-case, though it starts most sentences it is a part of.
+How do I list installed packages?
+npm ls
+How do I search for packages?
+npm search
+Arguments are greps. npm search jsdom
shows jsdom packages.
+How do I update npm?
+npm install npm -g
+
You can also update all outdated local packages by doing npm update
without
+any arguments, or global packages by doing npm update -g
.
+Occasionally, the version of npm will progress such that the current
+version cannot be properly installed with the version that you have
+installed already. (Consider, if there is ever a bug in the update
+command.)
+In those cases, you can do this:
+curl https://www.npmjs.org/install.sh | sh
+
What is a package
?
+A package is:
+
+- a) a folder containing a program described by a package.json file
+- b) a gzipped tarball containing (a)
+- c) a url that resolves to (b)
+- d) a
<name>@<version>
that is published on the registry with (c)
+- e) a
<name>@<tag>
that points to (d)
+- f) a
<name>
that has a "latest" tag satisfying (e)
+- g) a
git
url that, when cloned, results in (a).
+
+Even if you never publish your package, you can still get a lot of
+benefits of using npm if you just want to write a node program (a), and
+perhaps if you also want to be able to easily install it elsewhere
+after packing it up into a tarball (b).
+Git urls can be of the form:
+git://github.com/user/project.git#commit-ish
+git+ssh://user@hostname:project.git#commit-ish
+git+http://user@hostname/project/blah.git#commit-ish
+git+https://user@hostname/project/blah.git#commit-ish
+
The commit-ish
can be any tag, sha, or branch which can be supplied as
+an argument to git checkout
. The default is master
.
+What is a module
?
+A module is anything that can be loaded with require()
in a Node.js
+program. The following things are all examples of things that can be
+loaded as modules:
+
+- A folder with a
package.json
file containing a main
field.
+- A folder with an
index.js
file in it.
+- A JavaScript file.
+
+Most npm packages are modules, because they are libraries that you
+load with require
. However, there's no requirement that an npm
+package be a module! Some only contain an executable command-line
+interface, and don't provide a main
field for use in Node programs.
+Almost all npm packages (at least, those that are Node programs)
+contain many modules within them (because every file they load with
+require()
is a module).
+In the context of a Node program, the module
is also the thing that
+was loaded from a file. For example, in the following program:
+var req = require('request')
+
we might say that "The variable req
refers to the request
module".
+So, why is it the "node_modules
" folder, but "package.json
" file? Why not node_packages
or module.json
?
+The package.json
file defines the package. (See "What is a
+package?" above.)
+The node_modules
folder is the place Node.js looks for modules.
+(See "What is a module?" above.)
+For example, if you create a file at node_modules/foo.js
and then
+had a program that did var f = require('foo.js')
then it would load
+the module. However, foo.js
is not a "package" in this case,
+because it does not have a package.json.
+Alternatively, if you create a package which does not have an
+index.js
or a "main"
field in the package.json
file, then it is
+not a module. Even if it's installed in node_modules
, it can't be
+an argument to require()
.
+"node_modules"
is the name of my deity's arch-rival, and a Forbidden Word in my religion. Can I configure npm to use a different folder?
+No. This will never happen. This question comes up sometimes,
+because it seems silly from the outside that npm couldn't just be
+configured to put stuff somewhere else, and then npm could load them
+from there. It's an arbitrary spelling choice, right? What's the big
+deal?
+At the time of this writing, the string 'node_modules'
appears 151
+times in 53 separate files in npm and node core (excluding tests and
+documentation).
+Some of these references are in node's built-in module loader. Since
+npm is not involved at all at run-time, node itself would have to
+be configured to know where you've decided to stick stuff. Complexity
+hurdle #1. Since the Node module system is locked, this cannot be
+changed, and is enough to kill this request. But I'll continue, in
+deference to your deity's delicate feelings regarding spelling.
+Many of the others are in dependencies that npm uses, which are not
+necessarily tightly coupled to npm (in the sense that they do not read
+npm's configuration files, etc.) Each of these would have to be
+configured to take the name of the node_modules
folder as a
+parameter. Complexity hurdle #2.
+Furthermore, npm has the ability to "bundle" dependencies by adding
+the dep names to the "bundledDependencies"
list in package.json,
+which causes the folder to be included in the package tarball. What
+if the author of a module bundles its dependencies, and they use a
+different spelling for node_modules
? npm would have to rename the
+folder at publish time, and then be smart enough to unpack it using
+your locally configured name. Complexity hurdle #3.
+Furthermore, what happens when you change this name? Fine, it's
+easy enough the first time, just rename the node_modules
folders to
+./blergyblerp/
or whatever name you choose. But what about when you
+change it again? npm doesn't currently track any state about past
+configuration settings, so this would be rather difficult to do
+properly. It would have to track every previous value for this
+config, and always accept any of them, or else yesterday's install may
+be broken tomorrow. Complexity hurdle #4.
+Never going to happen. The folder is named node_modules
. It is
+written indelibly in the Node Way, handed down from the ancient times
+of Node 0.3.
+How do I install node with npm?
+You don't. Try one of these node version managers:
+Unix:
+
+Windows:
+
+- http://github.com/marcelklehr/nodist
+- https://github.com/hakobera/nvmw
+- https://github.com/nanjingboy/nvmw
+
+How can I use npm for development?
+See npm-developers(7)
and package.json(5)
.
+You'll most likely want to npm link
your development folder. That's
+awesomely handy.
+To set up your own private registry, check out npm-registry(7)
.
+Can I list a url as a dependency?
+Yes. It should be a url to a gzipped tarball containing a single folder
+that has a package.json in its root, or a git url.
+(See "what is a package?" above.)
+How do I symlink to a dev folder so I don't have to keep re-installing?
+See npm-link(1)
+The package registry website. What is that exactly?
+See npm-registry(7)
.
+I forgot my password, and can't publish. How do I reset it?
+Go to https://npmjs.org/forgot.
+I get ECONNREFUSED a lot. What's up?
+Either the registry is down, or node's DNS isn't able to reach out.
+To check if the registry is down, open up
+https://registry.npmjs.org/ in a web browser. This will also tell
+you if you are just unable to access the internet for some reason.
+If the registry IS down, let us know by emailing support@npmjs.com
+or posting an issue at https://github.com/npm/npm/issues. If it's
+down for the world (and not just on your local network) then we're
+probably already being pinged about it.
+You can also often get a faster response by visiting the #npm channel
+on Freenode IRC.
+Why no namespaces?
+Please see this discussion: https://github.com/npm/npm/issues/798
+tl;dr - It doesn't actually make things better, and can make them worse.
+If you want to namespace your own packages, you may: simply use the
+-
character to separate the names. npm is a mostly anarchic system.
+There is not sufficient need to impose namespace rules on everyone.
+Who does npm?
+npm was originally written by Isaac Z. Schlueter, and many others have
+contributed to it, some of them quite substantially.
+The npm open source project, The npm Registry, and the community
+website are maintained and operated by the
+good folks at npm, Inc.
+I have a question or request not addressed here. Where should I put it?
+Post an issue on the github project:
+
+Why does npm hate me?
+npm is not capable of hatred. It loves everyone, especially you.
+SEE ALSO
+
+- npm(1)
+- npm-developers(7)
+- package.json(5)
+- npm-config(1)
+- npm-config(7)
+- npmrc(5)
+- npm-config(7)
+- npm-folders(5)
+
+
diff --git a/deps/npm/html/partial/doc/misc/npm-index.html b/deps/npm/html/partial/doc/misc/npm-index.html
new file mode 100644
index 00000000000..6e4c0ca8004
--- /dev/null
+++ b/deps/npm/html/partial/doc/misc/npm-index.html
@@ -0,0 +1,210 @@
+npm-index
Index of all npm documentation
+README
+node package manager
+Command Line Documentation
+Using npm on the command line
+npm(1)
+node package manager
+npm-adduser(1)
+Add a registry user account
+npm-bin(1)
+Display npm bin folder
+npm-bugs(1)
+Bugs for a package in a web browser maybe
+npm-build(1)
+Build a package
+npm-bundle(1)
+REMOVED
+npm-cache(1)
+Manipulates packages cache
+npm-completion(1)
+Tab Completion for npm
+npm-config(1)
+Manage the npm configuration files
+npm-dedupe(1)
+Reduce duplication
+npm-deprecate(1)
+Deprecate a version of a package
+npm-docs(1)
+Docs for a package in a web browser maybe
+npm-edit(1)
+Edit an installed package
+npm-explore(1)
+Browse an installed package
+npm-help-search(1)
+Search npm help documentation
+npm-help(1)
+Get help on npm
+npm-init(1)
+Interactively create a package.json file
+npm-install(1)
+Install a package
+npm-link(1)
+Symlink a package folder
+npm-ls(1)
+List installed packages
+npm-outdated(1)
+Check for outdated packages
+npm-owner(1)
+Manage package owners
+npm-pack(1)
+Create a tarball from a package
+npm-prefix(1)
+Display prefix
+npm-prune(1)
+Remove extraneous packages
+npm-publish(1)
+Publish a package
+npm-rebuild(1)
+Rebuild a package
+npm-repo(1)
+Open package repository page in the browser
+npm-restart(1)
+Start a package
+npm-rm(1)
+Remove a package
+npm-root(1)
+Display npm root
+npm-run-script(1)
+Run arbitrary package scripts
+npm-search(1)
+Search for packages
+npm-shrinkwrap(1)
+Lock down dependency versions
+npm-star(1)
+Mark your favorite packages
+npm-stars(1)
+View packages marked as favorites
+npm-start(1)
+Start a package
+npm-stop(1)
+Stop a package
+npm-tag(1)
+Tag a published version
+npm-test(1)
+Test a package
+npm-uninstall(1)
+Remove a package
+npm-unpublish(1)
+Remove a package from the registry
+npm-update(1)
+Update a package
+npm-version(1)
+Bump a package version
+npm-view(1)
+View registry info
+npm-whoami(1)
+Display npm username
+API Documentation
+Using npm in your Node programs
+npm(3)
+node package manager
+npm-bin(3)
+Display npm bin folder
+npm-bugs(3)
+Bugs for a package in a web browser maybe
+npm-cache(3)
+manage the npm cache programmatically
+npm-commands(3)
+npm commands
+npm-config(3)
+Manage the npm configuration files
+npm-deprecate(3)
+Deprecate a version of a package
+npm-docs(3)
+Docs for a package in a web browser maybe
+npm-edit(3)
+Edit an installed package
+npm-explore(3)
+Browse an installed package
+npm-help-search(3)
+Search the help pages
+npm-init(3)
+Interactively create a package.json file
+npm-install(3)
+install a package programmatically
+npm-link(3)
+Symlink a package folder
+npm-load(3)
+Load config settings
+npm-ls(3)
+List installed packages
+npm-outdated(3)
+Check for outdated packages
+npm-owner(3)
+Manage package owners
+npm-pack(3)
+Create a tarball from a package
+npm-prefix(3)
+Display prefix
+npm-prune(3)
+Remove extraneous packages
+npm-publish(3)
+Publish a package
+npm-rebuild(3)
+Rebuild a package
+npm-repo(3)
+Open package repository page in the browser
+npm-restart(3)
+Start a package
+npm-root(3)
+Display npm root
+npm-run-script(3)
+Run arbitrary package scripts
+npm-search(3)
+Search for packages
+npm-shrinkwrap(3)
+programmatically generate package shrinkwrap file
+npm-start(3)
+Start a package
+npm-stop(3)
+Stop a package
+npm-tag(3)
+Tag a published version
+npm-test(3)
+Test a package
+npm-uninstall(3)
+uninstall a package programmatically
+npm-unpublish(3)
+Remove a package from the registry
+npm-update(3)
+Update a package
+npm-version(3)
+Bump a package version
+npm-view(3)
+View registry info
+npm-whoami(3)
+Display npm username
+Files
+File system structures npm uses
+npm-folders(5)
+Folder Structures Used by npm
+npmrc(5)
+The npm config files
+package.json(5)
+Specifics of npm's package.json handling
+Misc
+Various other bits and bobs
+npm-coding-style(7)
+npm's "funny" coding style
+npm-config(7)
+More than you probably want to know about npm configuration
+npm-developers(7)
+Developer Guide
+npm-disputes(7)
+Handling Module Name Disputes
+npm-faq(7)
+Frequently Asked Questions
+npm-index(7)
+Index of all npm documentation
+npm-registry(7)
+The JavaScript Package Registry
+npm-scope(7)
+Scoped packages
+npm-scripts(7)
+How npm handles the "scripts" field
+removing-npm(7)
+Cleaning the Slate
+semver(7)
+The semantic versioner for npm
+
diff --git a/deps/npm/html/partial/doc/misc/npm-registry.html b/deps/npm/html/partial/doc/misc/npm-registry.html
new file mode 100644
index 00000000000..0031f61b10c
--- /dev/null
+++ b/deps/npm/html/partial/doc/misc/npm-registry.html
@@ -0,0 +1,50 @@
+npm-registry
The JavaScript Package Registry
+DESCRIPTION
+To resolve packages by name and version, npm talks to a registry website
+that implements the CommonJS Package Registry specification for reading
+package info.
+Additionally, npm's package registry implementation supports several
+write APIs as well, to allow for publishing packages and managing user
+account information.
+The official public npm registry is at http://registry.npmjs.org/. It
+is powered by a CouchDB database, of which there is a public mirror at
+http://skimdb.npmjs.com/registry. The code for the couchapp is
+available at http://github.com/npm/npm-registry-couchapp.
+The registry URL used is determined by the scope of the package (see
+npm-scope(7)
). If no scope is specified, the default registry is used, which is
+supplied by the registry
config parameter. See npm-config(1)
,
+npmrc(5)
, and npm-config(7)
for more on managing npm's configuration.
+Can I run my own private registry?
+Yes!
+The easiest way is to replicate the couch database, and use the same (or
+similar) design doc to implement the APIs.
+If you set up continuous replication from the official CouchDB, and then
+set your internal CouchDB as the registry config, then you'll be able
+to read any published packages, in addition to your private ones, and by
+default will only publish internally. If you then want to publish a
+package for the whole world to see, you can simply override the
+--registry
config for that command.
+I don't want my package published in the official registry. It's private.
+Set "private": true
in your package.json to prevent it from being
+published at all, or
+"publishConfig":{"registry":"http://my-internal-registry.local"}
+to force it to be published only to your internal registry.
+See package.json(5)
for more info on what goes in the package.json file.
+Will you replicate from my registry into the public one?
+No. If you want things to be public, then publish them into the public
+registry using npm. What little security there is would be for nought
+otherwise.
+Do I have to use couchdb to build a registry that npm can talk to?
+No, but it's way easier. Basically, yes, you do, or you have to
+effectively implement the entire CouchDB API anyway.
+Is there a website or something to see package docs and such?
+Yes, head over to https://npmjs.org/
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/misc/npm-scope.html b/deps/npm/html/partial/doc/misc/npm-scope.html
new file mode 100644
index 00000000000..5616efdcb8c
--- /dev/null
+++ b/deps/npm/html/partial/doc/misc/npm-scope.html
@@ -0,0 +1,58 @@
+npm-scope
Scoped packages
+DESCRIPTION
+All npm packages have a name. Some package names also have a scope. A scope
+follows the usual rules for package names (url-safe characters, no leading dots
+or underscores). When used in package names, preceded by an @-symbol and
+followed by a slash, e.g.
+@somescope/somepackagename
+
Scopes are a way of grouping related packages together, and also affect a few
+things about the way npm treats the package.
+As of 2014-09-03, scoped packages are not supported by the public npm registry.
+However, the npm client is backwards-compatible with un-scoped registries, so
+it can be used to work with scoped and un-scoped registries at the same time.
+Installing scoped packages
+Scoped packages are installed to a sub-folder of the regular installation
+folder, e.g. if your other packages are installed in node_modules/packagename
,
+scoped modules will be in node_modules/@myorg/packagename
. The scope folder
+(@myorg
) is simply the name of the scope preceded by an @-symbol, and can
+contain any number of scoped packages.
+A scoped package is installed by referencing it by name, preceded by an
+@-symbol, in npm install
:
+npm install @myorg/mypackage
+
Or in package.json
:
+"dependencies": {
+ "@myorg/mypackage": "^1.3.0"
+}
+
Note that if the @-symbol is omitted in either case npm will instead attempt to
+install from GitHub; see npm-install(1)
.
+Requiring scoped packages
+Because scoped packages are installed into a scope folder, you have to
+include the name of the scope when requiring them in your code, e.g.
+require('@myorg/mypackage')
+
There is nothing special about the way Node treats scope folders, this is
+just specifying to require the module mypackage
in the folder called @myorg
.
+Publishing scoped packages
+Scoped packages can be published to any registry that supports them.
+As of 2014-09-03, the public npm registry does not support scoped packages,
+so attempting to publish a scoped package to the registry will fail unless
+you have associated that scope with a different registry, see below.
+Associating a scope with a registry
+Scopes can be associated with a separate registry. This allows you to
+seamlessly use a mix of packages from the public npm registry and one or more
+private registries, such as npm Enterprise.
+You can associate a scope with a registry at login, e.g.
+npm login --registry=http://reg.example.com --scope=@myco
+
Scopes have a many-to-one relationship with registries: one registry can
+host multiple scopes, but a scope only ever points to one registry.
+You can also associate a scope with a registry using npm config
:
+npm config set @myco:registry http://reg.example.com
+
Once a scope is associated with a registry, any npm install
for a package
+with that scope will request packages from that registry instead. Any
+npm publish
for a package name that contains the scope will be published to
+that registry instead.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/misc/npm-scripts.html b/deps/npm/html/partial/doc/misc/npm-scripts.html
new file mode 100644
index 00000000000..08bcbd54a5b
--- /dev/null
+++ b/deps/npm/html/partial/doc/misc/npm-scripts.html
@@ -0,0 +1,200 @@
+npm-scripts
How npm handles the "scripts" field
+DESCRIPTION
+npm supports the "scripts" property of the package.json script, for the
+following scripts:
+
+- prepublish:
+Run BEFORE the package is published. (Also run on local
npm
+install
without any arguments.)
+- publish, postpublish:
+Run AFTER the package is published.
+- preinstall:
+Run BEFORE the package is installed
+- install, postinstall:
+Run AFTER the package is installed.
+- preuninstall, uninstall:
+Run BEFORE the package is uninstalled.
+- postuninstall:
+Run AFTER the package is uninstalled.
+- preupdate:
+Run BEFORE the package is updated with the update command.
+- update, postupdate:
+Run AFTER the package is updated with the update command.
+- pretest, test, posttest:
+Run by the
npm test
command.
+- prestop, stop, poststop:
+Run by the
npm stop
command.
+- prestart, start, poststart:
+Run by the
npm start
command.
+- prerestart, restart, postrestart:
+Run by the
npm restart
command. Note: npm restart
will run the
+stop and start scripts if no restart
script is provided.
+
+Additionally, arbitrary scripts can be executed by running npm
+run-script <pkg> <stage>
. Pre and post commands with matching
+names will be run for those as well (e.g. premyscript
, myscript
,
+postmyscript
).
+NOTE: INSTALL SCRIPTS ARE AN ANTIPATTERN
+tl;dr Don't use install
. Use a .gyp
file for compilation, and
+prepublish
for anything else.
+You should almost never have to explicitly set a preinstall
or
+install
script. If you are doing this, please consider if there is
+another option.
+The only valid use of install
or preinstall
scripts is for
+compilation which must be done on the target architecture. In early
+versions of node, this was often done using the node-waf
scripts, or
+a standalone Makefile
, and early versions of npm required that it be
+explicitly set in package.json. This was not portable, and harder to
+do properly.
+In the current version of node, the standard way to do this is using a
+.gyp
file. If you have a file with a .gyp
extension in the root
+of your package, then npm will run the appropriate node-gyp
commands
+automatically at install time. This is the only officially supported
+method for compiling binary addons, and does not require that you add
+anything to your package.json file.
+If you have to do other things before your package is used, in a way
+that is not dependent on the operating system or architecture of the
+target system, then use a prepublish
script instead. This includes
+tasks such as:
+
+- Compile CoffeeScript source code into JavaScript.
+- Create minified versions of JavaScript source code.
+- Fetching remote resources that your package will use.
+
+The advantage of doing these things at prepublish
time instead of
+preinstall
or install
time is that they can be done once, in a
+single place, and thus greatly reduce complexity and variability.
+Additionally, this means that:
+
+- You can depend on
coffee-script
as a devDependency
, and thus
+your users don't need to have it installed.
+- You don't need to include the minifiers in your package, reducing
+the size for your users.
+- You don't need to rely on your users having
curl
or wget
or
+other system tools on the target machines.
+
+DEFAULT VALUES
+npm will default some script values based on package contents.
+
+"start": "node server.js"
:
+If there is a server.js
file in the root of your package, then npm
+will default the start
command to node server.js
.
+
+"preinstall": "node-waf clean || true; node-waf configure build"
:
+If there is a wscript
file in the root of your package, npm will
+default the preinstall
command to compile using node-waf.
+
+
+USER
+If npm was invoked with root privileges, then it will change the uid
+to the user account or uid specified by the user
config, which
+defaults to nobody
. Set the unsafe-perm
flag to run scripts with
+root privileges.
+ENVIRONMENT
+Package scripts run in an environment where many pieces of information
+are made available regarding the setup of npm and the current state of
+the process.
+path
+If you depend on modules that define executable scripts, like test
+suites, then those executables will be added to the PATH
for
+executing the scripts. So, if your package.json has this:
+{ "name" : "foo"
+, "dependencies" : { "bar" : "0.1.x" }
+, "scripts": { "start" : "bar ./test" } }
+
then you could run npm start
to execute the bar
script, which is
+exported into the node_modules/.bin
directory on npm install
.
+package.json vars
+The package.json fields are tacked onto the npm_package_
prefix. So,
+for instance, if you had {"name":"foo", "version":"1.2.5"}
in your
+package.json file, then your package scripts would have the
+npm_package_name
environment variable set to "foo", and the
+npm_package_version
set to "1.2.5"
+configuration
+Configuration parameters are put in the environment with the
+npm_config_
prefix. For instance, you can view the effective root
+config by checking the npm_config_root
environment variable.
+Special: package.json "config" object
+The package.json "config" keys are overwritten in the environment if
+there is a config param of <name>[@<version>]:<key>
. For example,
+if the package.json has this:
+{ "name" : "foo"
+, "config" : { "port" : "8080" }
+, "scripts" : { "start" : "node server.js" } }
+
and the server.js is this:
+http.createServer(...).listen(process.env.npm_package_config_port)
+
then the user could change the behavior by doing:
+npm config set foo:port 80
+
current lifecycle event
+Lastly, the npm_lifecycle_event
environment variable is set to
+whichever stage of the cycle is being executed. So, you could have a
+single script used for different parts of the process which switches
+based on what's currently happening.
+Objects are flattened following this format, so if you had
+{"scripts":{"install":"foo.js"}}
in your package.json, then you'd
+see this in the script:
+process.env.npm_package_scripts_install === "foo.js"
+
EXAMPLES
+For example, if your package.json contains this:
+{ "scripts" :
+ { "install" : "scripts/install.js"
+ , "postinstall" : "scripts/install.js"
+ , "uninstall" : "scripts/uninstall.js"
+ }
+}
+
then the scripts/install.js
will be called for the install,
+post-install, stages of the lifecycle, and the scripts/uninstall.js
+would be called when the package is uninstalled. Since
+scripts/install.js
is running for three different phases, it would
+be wise in this case to look at the npm_lifecycle_event
environment
+variable.
+If you want to run a make command, you can do so. This works just
+fine:
+{ "scripts" :
+ { "preinstall" : "./configure"
+ , "install" : "make && make install"
+ , "test" : "make test"
+ }
+}
+
EXITING
+Scripts are run by passing the line as a script argument to sh
.
+If the script exits with a code other than 0, then this will abort the
+process.
+Note that these script files don't have to be nodejs or even
+javascript programs. They just have to be some kind of executable
+file.
+HOOK SCRIPTS
+If you want to run a specific script at a specific lifecycle event for
+ALL packages, then you can use a hook script.
+Place an executable file at node_modules/.hooks/{eventname}
, and
+it'll get run for all packages when they are going through that point
+in the package lifecycle for any packages installed in that root.
+Hook scripts are run exactly the same way as package.json scripts.
+That is, they are in a separate child process, with the env described
+above.
+BEST PRACTICES
+
+- Don't exit with a non-zero error code unless you really mean it.
+Except for uninstall scripts, this will cause the npm action to
+fail, and potentially be rolled back. If the failure is minor or
+only will prevent some optional features, then it's better to just
+print a warning and exit successfully.
+- Try not to use scripts to do what npm can do for you. Read through
+
package.json(5)
to see all the things that you can specify and enable
+by simply describing your package appropriately. In general, this
+will lead to a more robust and consistent state.
+- Inspect the env to determine where to put things. For instance, if
+the
npm_config_binroot
environ is set to /home/user/bin
, then
+don't try to install executables into /usr/local/bin
. The user
+probably set it up that way for a reason.
+- Don't prefix your script commands with "sudo". If root permissions
+are required for some reason, then it'll fail with that error, and
+the user will sudo the npm command in question.
+
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/misc/removing-npm.html b/deps/npm/html/partial/doc/misc/removing-npm.html
new file mode 100644
index 00000000000..3b3968bfc01
--- /dev/null
+++ b/deps/npm/html/partial/doc/misc/removing-npm.html
@@ -0,0 +1,37 @@
+npm-removal
Cleaning the Slate
+SYNOPSIS
+So sad to see you go.
+sudo npm uninstall npm -g
+
Or, if that fails, get the npm source code, and do:
+sudo make uninstall
+
More Severe Uninstalling
+Usually, the above instructions are sufficient. That will remove
+npm, but leave behind anything you've installed.
+If that doesn't work, or if you require more drastic measures,
+continue reading.
+Note that this is only necessary for globally-installed packages. Local
+installs are completely contained within a project's node_modules
+folder. Delete that folder, and everything is gone (unless a package's
+install script is particularly ill-behaved).
+This assumes that you installed node and npm in the default place. If
+you configured node with a different --prefix
, or installed npm with a
+different prefix setting, then adjust the paths accordingly, replacing
+/usr/local
with your install prefix.
+To remove everything npm-related manually:
+rm -rf /usr/local/{lib/node{,/.npm,_modules},bin,share/man}/npm*
+
If you installed things with npm, then your best bet is to uninstall
+them with npm first, and then install them again once you have a
+proper install. This can help find any symlinks that are lying
+around:
+ls -laF /usr/local/{lib/node{,/.npm},bin,share/man} | grep npm
+
Prior to version 0.3, npm used shim files for executables and node
+modules. To track those down, you can do the following:
+find /usr/local/{lib/node,bin} -exec grep -l npm \{\} \; ;
+
(This is also in the README file.)
+SEE ALSO
+
+- README
+- npm-rm(1)
+- npm-prune(1)
+
+
diff --git a/deps/npm/html/partial/doc/misc/semver.html b/deps/npm/html/partial/doc/misc/semver.html
new file mode 100644
index 00000000000..691a277dc78
--- /dev/null
+++ b/deps/npm/html/partial/doc/misc/semver.html
@@ -0,0 +1,243 @@
+semver
The semantic versioner for npm
+Usage
+$ npm install semver
+
+semver.valid('1.2.3') // '1.2.3'
+semver.valid('a.b.c') // null
+semver.clean(' =v1.2.3 ') // '1.2.3'
+semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true
+semver.gt('1.2.3', '9.8.7') // false
+semver.lt('1.2.3', '9.8.7') // true
+
As a command-line utility:
+$ semver -h
+
+Usage: semver <version> [<version> [...]] [-r <range> | -i <inc> | -d <dec>]
+Test if version(s) satisfy the supplied range(s), and sort them.
+
+Multiple versions or ranges may be supplied, unless increment
+or decrement options are specified. In that case, only a single
+version may be used, and it is incremented by the specified level
+
+Program exits successfully if any valid version satisfies
+all supplied ranges, and prints all satisfying versions.
+
+If no versions are valid, or ranges are not satisfied,
+then exits failure.
+
+Versions are printed in ascending order, so supplying
+multiple versions to the utility will just sort them.
+
Versions
+A "version" is described by the v2.0.0
specification found at
+http://semver.org/.
+A leading "="
or "v"
character is stripped off and ignored.
+Ranges
+A version range
is a set of comparators
which specify versions
+that satisfy the range.
+A comparator
is composed of an operator
and a version
. The set
+of primitive operators
is:
+
+<
Less than
+<=
Less than or equal to
+>
Greater than
+>=
Greater than or equal to
+=
Equal. If no operator is specified, then equality is assumed,
+so this operator is optional, but MAY be included.
+
+For example, the comparator >=1.2.7
would match the versions
+1.2.7
, 1.2.8
, 2.5.3
, and 1.3.9
, but not the versions 1.2.6
+or 1.1.0
.
+Comparators can be joined by whitespace to form a comparator set
,
+which is satisfied by the intersection of all of the comparators
+it includes.
+A range is composed of one or more comparator sets, joined by ||
. A
+version matches a range if and only if every comparator in at least
+one of the ||
-separated comparator sets is satisfied by the version.
+For example, the range >=1.2.7 <1.3.0
would match the versions
+1.2.7
, 1.2.8
, and 1.2.99
, but not the versions 1.2.6
, 1.3.0
,
+or 1.1.0
.
+The range 1.2.7 || >=1.2.9 <2.0.0
would match the versions 1.2.7
,
+1.2.9
, and 1.4.6
, but not the versions 1.2.8
or 2.0.0
.
+Prerelease Tags
+If a version has a prerelease tag (for example, 1.2.3-alpha.3
) then
+it will only be allowed to satisfy comparator sets if at least one
+comparator with the same [major, minor, patch]
tuple also has a
+prerelease tag.
+For example, the range >1.2.3-alpha.3
would be allowed to match the
+version 1.2.3-alpha.7
, but it would not be satisfied by
+3.4.5-alpha.9
, even though 3.4.5-alpha.9
is technically "greater
+than" 1.2.3-alpha.3
according to the SemVer sort rules. The version
+range only accepts prerelease tags on the 1.2.3
version. The
+version 3.4.5
would satisfy the range, because it does not have a
+prerelease flag, and 3.4.5
is greater than 1.2.3-alpha.7
.
+The purpose for this behavior is twofold. First, prerelease versions
+frequently are updated very quickly, and contain many breaking changes
+that are (by the author's design) not yet fit for public consumption.
+Therefore, by default, they are excluded from range matching
+semantics.
+Second, a user who has opted into using a prerelease version has
+clearly indicated the intent to use that specific set of
+alpha/beta/rc versions. By including a prerelease tag in the range,
+the user is indicating that they are aware of the risk. However, it
+is still not appropriate to assume that they have opted into taking a
+similar risk on the next set of prerelease versions.
+Advanced Range Syntax
+Advanced range syntax desugars to primitive comparators in
+deterministic ways.
+Advanced ranges may be combined in the same way as primitive
+comparators using white space or ||
.
+Hyphen Ranges X.Y.Z - A.B.C
+Specifies an inclusive set.
+
+1.2.3 - 2.3.4
:= >=1.2.3 <=2.3.4
+
+If a partial version is provided as the first version in the inclusive
+range, then the missing pieces are replaced with zeroes.
+
+1.2 - 2.3.4
:= >=1.2.0 <=2.3.4
+
+If a partial version is provided as the second version in the
+inclusive range, then all versions that start with the supplied parts
+of the tuple are accepted, but nothing that would be greater than the
+provided tuple parts.
+
+1.2.3 - 2.3
:= >=1.2.3 <2.4.0
+1.2.3 - 2
:= >=1.2.3 <3.0.0
+
+X-Ranges 1.2.x
1.X
1.2.*
*
+Any of X
, x
, or *
may be used to "stand in" for one of the
+numeric values in the [major, minor, patch]
tuple.
+
+*
:= >=0.0.0
(Any version satisfies)
+1.x
:= >=1.0.0 <2.0.0
(Matching major version)
+1.2.x
:= >=1.2.0 <1.3.0
(Matching major and minor versions)
+
+A partial version range is treated as an X-Range, so the special
+character is in fact optional.
+
+""
(empty string) := *
:= >=0.0.0
+1
:= 1.x.x
:= >=1.0.0 <2.0.0
+1.2
:= 1.2.x
:= >=1.2.0 <1.3.0
+
+Tilde Ranges ~1.2.3
~1.2
~1
+Allows patch-level changes if a minor version is specified on the
+comparator. Allows minor-level changes if not.
+
+~1.2.3
:= >=1.2.3 <1.(2+1).0
:= >=1.2.3 <1.3.0
+~1.2
:= >=1.2.0 <1.(2+1).0
:= >=1.2.0 <1.3.0
(Same as 1.2.x
)
+~1
:= >=1.0.0 <(1+1).0.0
:= >=1.0.0 <2.0.0
(Same as 1.x
)
+~0.2.3
:= >=0.2.3 <0.(2+1).0
:= >=0.2.3 <0.3.0
+~0.2
:= >=0.2.0 <0.(2+1).0
:= >=0.2.0 <0.3.0
(Same as 0.2.x
)
+~0
:= >=0.0.0 <(0+1).0.0
:= >=0.0.0 <1.0.0
(Same as 0.x
)
+~1.2.3-beta.2
:= >=1.2.3-beta.2 <1.3.0
Note that prereleases in
+the 1.2.3
version will be allowed, if they are greater than or
+equal to beta.2
. So, 1.2.3-beta.4
would be allowed, but
+1.2.4-beta.2
would not, because it is a prerelease of a
+different [major, minor, patch]
tuple.
+
+Note: this is the same as the ~>
operator in rubygems.
+Caret Ranges ^1.2.3
^0.2.5
^0.0.4
+Allows changes that do not modify the left-most non-zero digit in the
+[major, minor, patch]
tuple. In other words, this allows patch and
+minor updates for versions 1.0.0
and above, patch updates for
+versions 0.X >=0.1.0
, and no updates for versions 0.0.X
.
+Many authors treat a 0.x
version as if the x
were the major
+"breaking-change" indicator.
+Caret ranges are ideal when an author may make breaking changes
+between 0.2.4
and 0.3.0
releases, which is a common practice.
+However, it presumes that there will not be breaking changes between
+0.2.4
and 0.2.5
. It allows for changes that are presumed to be
+additive (but non-breaking), according to commonly observed practices.
+
+^1.2.3
:= >=1.2.3 <2.0.0
+^0.2.3
:= >=0.2.3 <0.3.0
+^0.0.3
:= >=0.0.3 <0.0.4
+^1.2.3-beta.2
:= >=1.2.3-beta.2 <2.0.0
Note that prereleases in
+the 1.2.3
version will be allowed, if they are greater than or
+equal to beta.2
. So, 1.2.3-beta.4
would be allowed, but
+1.2.4-beta.2
would not, because it is a prerelease of a
+different [major, minor, patch]
tuple.
+^0.0.3-beta
:= >=0.0.3-beta <0.0.4
Note that prereleases in the
+0.0.3
version only will be allowed, if they are greater than or
+equal to beta
. So, 0.0.3-pr.2
would be allowed.
+
+When parsing caret ranges, a missing patch
value desugars to the
+number 0
, but will allow flexibility within that value, even if the
+major and minor versions are both 0
.
+
+^1.2.x
:= >=1.2.0 <2.0.0
+^0.0.x
:= >=0.0.0 <0.1.0
+^0.0
:= >=0.0.0 <0.1.0
+
+A missing minor
and patch
values will desugar to zero, but also
+allow flexibility within those values, even if the major version is
+zero.
+
+^1.x
:= >=1.0.0 <2.0.0
+^0.x
:= >=0.0.0 <1.0.0
+
+Functions
+All methods and classes take a final loose
boolean argument that, if
+true, will be more forgiving about not-quite-valid semver strings.
+The resulting output will always be 100% strict, of course.
+Strict-mode Comparators and Ranges will be strict about the SemVer
+strings that they parse.
+
+valid(v)
: Return the parsed version, or null if it's not valid.
+inc(v, release)
: Return the version incremented by the release
+type (major
, premajor
, minor
, preminor
, patch
,
+prepatch
, or prerelease
), or null if it's not valid
+premajor
in one call will bump the version up to the next major
+version and down to a prerelease of that major version.
+preminor
, and prepatch
work the same way.
+- If called from a non-prerelease version, the
prerelease
will work the
+same as prepatch
. It increments the patch version, then makes a
+prerelease. If the input version is already a prerelease it simply
+increments it.
+
+
+
+Comparison
+
+gt(v1, v2)
: v1 > v2
+gte(v1, v2)
: v1 >= v2
+lt(v1, v2)
: v1 < v2
+lte(v1, v2)
: v1 <= v2
+eq(v1, v2)
: v1 == v2
This is true if they're logically equivalent,
+even if they're not the exact same string. You already know how to
+compare strings.
+neq(v1, v2)
: v1 != v2
The opposite of eq
.
+cmp(v1, comparator, v2)
: Pass in a comparison string, and it'll call
+the corresponding function above. "==="
and "!=="
do simple
+string comparison, but are included for completeness. Throws if an
+invalid comparison string is provided.
+compare(v1, v2)
: Return 0
if v1 == v2
, or 1
if v1
is greater, or -1
if
+v2
is greater. Sorts in ascending order if passed to Array.sort()
.
+rcompare(v1, v2)
: The reverse of compare. Sorts an array of versions
+in descending order when passed to Array.sort()
.
+
+Ranges
+
+validRange(range)
: Return the valid range or null if it's not valid
+satisfies(version, range)
: Return true if the version satisfies the
+range.
+maxSatisfying(versions, range)
: Return the highest version in the list
+that satisfies the range, or null
if none of them do.
+gtr(version, range)
: Return true
if version is greater than all the
+versions possible in the range.
+ltr(version, range)
: Return true
if version is less than all the
+versions possible in the range.
+outside(version, range, hilo)
: Return true if the version is outside
+the bounds of the range in either the high or low direction. The
+hilo
argument must be either the string '>'
or '<'
. (This is
+the function called by gtr
and ltr
.)
+
+Note that, since ranges may be non-contiguous, a version might not be
+greater than a range, less than a range, or satisfy a range! For
+example, the range 1.2 <1.2.9 || >2.0.0
would have a hole from 1.2.9
+until 2.0.0
, so the version 1.2.10
would not be greater than the
+range (because 2.0.1
satisfies, which is higher), nor less than the
+range (since 1.2.8
satisfies, which is lower), and it also does not
+satisfy the range.
+If you want to know if a version satisfies or does not satisfy a
+range, use the satisfies(version, range)
function.
+
diff --git a/deps/npm/lib/adduser.js b/deps/npm/lib/adduser.js
index 579ecb0a9f8..9693aebd389 100644
--- a/deps/npm/lib/adduser.js
+++ b/deps/npm/lib/adduser.js
@@ -19,9 +19,10 @@ function adduser (args, cb) {
if (!crypto) return cb(new Error(
"You must compile node with ssl support to use the adduser feature"))
- var c = { u : npm.config.get("username") || ""
- , p : npm.config.get("_password") || ""
- , e : npm.config.get("email") || ""
+ var creds = npm.config.getCredentialsByURI(npm.config.get("registry"))
+ var c = { u : creds.username || ""
+ , p : creds.password || ""
+ , e : creds.email || ""
}
, u = {}
, fns = [readUsername, readPassword, readEmail, save]
@@ -94,7 +95,7 @@ function readPassword (c, u, cb) {
return readPassword(c, u, cb)
}
- c.changed = c.changed || c.p != pw
+ c.changed = c.changed || c.p !== pw
u.p = pw
cb(er)
})
@@ -132,17 +133,46 @@ function save (c, u, cb) {
registry.password = u.p
}
npm.spinner.start()
+
// save existing configs, but yank off for this PUT
- registry.adduser(npm.config.get("registry"), u.u, u.p, u.e, function (er) {
+ var uri = npm.config.get("registry")
+ var scope = npm.config.get("scope")
+
+ // there may be a saved scope and no --registry (for login)
+ if (scope) {
+ if (scope.charAt(0) !== "@") scope = "@" + scope
+
+ var scopedRegistry = npm.config.get(scope + ":registry")
+ if (scopedRegistry) uri = scopedRegistry
+ }
+
+ registry.adduser(uri, u.u, u.p, u.e, function (er, doc) {
npm.spinner.stop()
if (er) return cb(er)
+
registry.username = u.u
registry.password = u.p
registry.email = u.e
- npm.config.set("username", u.u, "user")
- npm.config.set("_password", u.p, "user")
- npm.config.set("email", u.e, "user")
+
+ // don't want this polluting the configuration
npm.config.del("_token", "user")
+
+ if (scope) npm.config.set(scope + ":registry", uri, "user")
+
+ if (doc && doc.token) {
+ npm.config.setCredentialsByURI(uri, {
+ token : doc.token
+ })
+ }
+ else {
+ npm.config.setCredentialsByURI(uri, {
+ username : u.u,
+ password : u.p,
+ email : u.e,
+ alwaysAuth : npm.config.get("always-auth")
+ })
+ }
+
log.info("adduser", "Authorized user %s", u.u)
npm.config.save("user", cb)
})
diff --git a/deps/npm/lib/bugs.js b/deps/npm/lib/bugs.js
index b3022bf2a20..16744cd5c84 100644
--- a/deps/npm/lib/bugs.js
+++ b/deps/npm/lib/bugs.js
@@ -9,19 +9,23 @@ var npm = require("./npm.js")
, opener = require("opener")
, path = require("path")
, readJson = require("read-package-json")
+ , npa = require("npm-package-arg")
, fs = require("fs")
- , url = require("url")
+ , mapToRegistry = require("./utils/map-to-registry.js")
bugs.completion = function (opts, cb) {
if (opts.conf.argv.remain.length > 2) return cb()
- var uri = url.resolve(npm.config.get("registry"), "-/short")
- registry.get(uri, { timeout : 60000 }, function (er, list) {
- return cb(null, list || [])
+ mapToRegistry("-/short", npm.config, function (er, uri) {
+ if (er) return cb(er)
+
+ registry.get(uri, { timeout : 60000 }, function (er, list) {
+ return cb(null, list || [])
+ })
})
}
function bugs (args, cb) {
- var n = args.length && args[0].split("@").shift() || '.'
+ var n = args.length && npa(args[0]).name || '.'
fs.stat(n, function (er, s) {
if (er && er.code === "ENOENT") return callRegistry(n, cb)
else if (er) return cb (er)
@@ -56,9 +60,13 @@ function getUrlAndOpen (d, cb) {
}
function callRegistry (n, cb) {
- var uri = url.resolve(npm.config.get("registry"), n + "/latest")
- registry.get(uri, { timeout : 3600 }, function (er, d) {
+ mapToRegistry(n, npm.config, function (er, uri) {
if (er) return cb(er)
- getUrlAndOpen (d, cb)
+
+ registry.get(uri + "/latest", { timeout : 3600 }, function (er, d) {
+ if (er) return cb(er)
+
+ getUrlAndOpen (d, cb)
+ })
})
}
diff --git a/deps/npm/lib/build.js b/deps/npm/lib/build.js
index 350774a453f..2e01ef6eeaa 100644
--- a/deps/npm/lib/build.js
+++ b/deps/npm/lib/build.js
@@ -19,6 +19,8 @@ var npm = require("./npm.js")
, cmdShim = require("cmd-shim")
, cmdShimIfExists = cmdShim.ifExists
, asyncMap = require("slide").asyncMap
+ , ini = require("ini")
+ , writeFile = require("write-file-atomic")
module.exports = build
build.usage = "npm build \n(this is plumbing)"
@@ -41,6 +43,7 @@ function build (args, global, didPre, didRB, cb) {
function build_ (global, didPre, didRB) { return function (folder, cb) {
folder = path.resolve(folder)
+ if (build._didBuild[folder]) log.error("build", "already built", folder)
build._didBuild[folder] = true
log.info("build", folder)
readJson(path.resolve(folder, "package.json"), function (er, pkg) {
@@ -48,7 +51,7 @@ function build_ (global, didPre, didRB) { return function (folder, cb) {
chain
( [ !didPre && [lifecycle, pkg, "preinstall", folder]
, [linkStuff, pkg, folder, global, didRB]
- , pkg.name === "npm" && [writeBuiltinConf, folder]
+ , [writeBuiltinConf, pkg, folder]
, didPre !== build._noLC && [lifecycle, pkg, "install", folder]
, didPre !== build._noLC && [lifecycle, pkg, "postinstall", folder]
, didPre !== build._noLC
@@ -58,14 +61,21 @@ function build_ (global, didPre, didRB) { return function (folder, cb) {
})
}}
-function writeBuiltinConf (folder, cb) {
- // the builtin config is "sticky". Any time npm installs itself,
- // it puts its builtin config file there, as well.
- if (!npm.config.usingBuiltin
- || folder !== path.dirname(__dirname)) {
+function writeBuiltinConf (pkg, folder, cb) {
+ // the builtin config is "sticky". Any time npm installs
+ // itself globally, it puts its builtin config file there
+ var parent = path.dirname(folder)
+ var dir = npm.globalDir
+
+ if (pkg.name !== "npm" ||
+ !npm.config.get("global") ||
+ !npm.config.usingBuiltin ||
+ dir !== parent) {
return cb()
}
- npm.config.save("builtin", cb)
+
+ var data = ini.stringify(npm.config.sources.builtin.data)
+ writeFile(path.resolve(folder, "npmrc"), data, cb)
}
function linkStuff (pkg, folder, global, didRB, cb) {
@@ -75,7 +85,7 @@ function linkStuff (pkg, folder, global, didRB, cb) {
// if it's global, and folder is in {prefix}/node_modules,
// then bins are in {prefix}/bin
// otherwise, then bins are in folder/../.bin
- var parent = path.dirname(folder)
+ var parent = pkg.name[0] === "@" ? path.dirname(path.dirname(folder)) : path.dirname(folder)
, gnm = global && npm.globalDir
, gtop = parent === gnm
@@ -95,7 +105,7 @@ function linkStuff (pkg, folder, global, didRB, cb) {
function shouldWarn(pkg, folder, global, cb) {
var parent = path.dirname(folder)
, top = parent === npm.dir
- , cwd = process.cwd()
+ , cwd = npm.localPrefix
readJson(path.resolve(cwd, "package.json"), function(er, topPkg) {
if (er) return cb(er)
diff --git a/deps/npm/lib/cache.js b/deps/npm/lib/cache.js
index 37bba5a0653..e1afb0d1578 100644
--- a/deps/npm/lib/cache.js
+++ b/deps/npm/lib/cache.js
@@ -47,31 +47,41 @@ adding a name@range:
adding a local tarball:
1. untar to tmp/random/{blah}
2. goto folder(2)
+
+adding a namespaced package:
+1. lookup registry for @namespace
+2. namespace_registry.get('name')
+3. add url(namespace/latest.tarball)
*/
exports = module.exports = cache
+
cache.unpack = unpack
cache.clean = clean
cache.read = read
var npm = require("./npm.js")
, fs = require("graceful-fs")
+ , writeFileAtomic = require("write-file-atomic")
, assert = require("assert")
, rm = require("./utils/gently-rm.js")
, readJson = require("read-package-json")
, log = require("npmlog")
, path = require("path")
- , url = require("url")
, asyncMap = require("slide").asyncMap
, tar = require("./utils/tar.js")
, fileCompletion = require("./utils/completion/file-completion.js")
- , isGitUrl = require("./utils/is-git-url.js")
, deprCheck = require("./utils/depr-check.js")
, addNamed = require("./cache/add-named.js")
, addLocal = require("./cache/add-local.js")
, addRemoteTarball = require("./cache/add-remote-tarball.js")
, addRemoteGit = require("./cache/add-remote-git.js")
+ , maybeGithub = require("./cache/maybe-github.js")
, inflight = require("inflight")
+ , realizePackageSpecifier = require("realize-package-specifier")
+ , npa = require("npm-package-arg")
+ , getStat = require("./cache/get-stat.js")
+ , cachedPackageRoot = require("./cache/cached-package-root.js")
cache.usage = "npm cache add "
+ "\nnpm cache add "
@@ -108,9 +118,8 @@ function cache (args, cb) {
switch (cmd) {
case "rm": case "clear": case "clean": return clean(args, cb)
case "list": case "sl": case "ls": return ls(args, cb)
- case "add": return add(args, cb)
- default: return cb(new Error(
- "Invalid cache action: "+cmd))
+ case "add": return add(args, npm.prefix, cb)
+ default: return cb("Usage: "+cache.usage)
}
}
@@ -123,8 +132,11 @@ function read (name, ver, forceBypass, cb) {
if (forceBypass === undefined || forceBypass === null) forceBypass = true
- var jsonFile = path.join(npm.cache, name, ver, "package", "package.json")
+ var root = cachedPackageRoot({name : name, version : ver})
function c (er, data) {
+ log.silly("cache", "addNamed cb", name+"@"+ver)
+ if (er) log.verbose("cache", "addNamed error for", name+"@"+ver, er)
+
if (data) deprCheck(data)
return cb(er, data)
@@ -135,27 +147,43 @@ function read (name, ver, forceBypass, cb) {
return addNamed(name, ver, null, c)
}
- readJson(jsonFile, function (er, data) {
- er = needName(er, data)
- er = needVersion(er, data)
+ readJson(path.join(root, "package", "package.json"), function (er, data) {
if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er)
- if (er) return addNamed(name, ver, null, c)
- deprCheck(data)
+ if (data) {
+ if (!data.name) return cb(new Error("No name provided"))
+ if (!data.version) return cb(new Error("No version provided"))
+ }
- c(er, data)
+ if (er) return addNamed(name, ver, null, c)
+ else c(er, data)
})
}
+function normalize (args) {
+ var normalized = ""
+ if (args.length > 0) {
+ var a = npa(args[0])
+ if (a.name) normalized = a.name
+ if (a.rawSpec) normalized = [normalized, a.rawSpec].join("/")
+ if (args.length > 1) normalized = [normalized].concat(args.slice(1)).join("/")
+ }
+
+ if (normalized.substr(-1) === "/") {
+ normalized = normalized.substr(0, normalized.length - 1)
+ }
+ log.silly("ls", "normalized", normalized)
+
+ return normalized
+}
+
// npm cache ls []
function ls (args, cb) {
- args = args.join("/").split("@").join("/")
- if (args.substr(-1) === "/") args = args.substr(0, args.length - 1)
var prefix = npm.config.get("cache")
- if (0 === prefix.indexOf(process.env.HOME)) {
+ if (prefix.indexOf(process.env.HOME) === 0) {
prefix = "~" + prefix.substr(process.env.HOME.length)
}
- ls_(args, npm.config.get("depth"), function (er, files) {
+ ls_(normalize(args), npm.config.get("depth"), function (er, files) {
console.log(files.map(function (f) {
return path.join(prefix, f)
}).join("\n").trim())
@@ -174,9 +202,7 @@ function clean (args, cb) {
if (!args) args = []
- args = args.join("/").split("@").join("/")
- if (args.substr(-1) === "/") args = args.substr(0, args.length - 1)
- var f = path.join(npm.cache, path.normalize(args))
+ var f = path.join(npm.cache, path.normalize(normalize(args)))
if (f === npm.cache) {
fs.readdir(npm.cache, function (er, files) {
if (er) return cb()
@@ -187,30 +213,29 @@ function clean (args, cb) {
})
, rm, cb )
})
- } else rm(path.join(npm.cache, path.normalize(args)), cb)
+ } else rm(path.join(npm.cache, path.normalize(normalize(args))), cb)
}
// npm cache add
// npm cache add
// npm cache add
// npm cache add
-cache.add = function (pkg, ver, scrub, cb) {
+cache.add = function (pkg, ver, where, scrub, cb) {
assert(typeof pkg === "string", "must include name of package to install")
assert(typeof cb === "function", "must include callback")
if (scrub) {
return clean([], function (er) {
if (er) return cb(er)
- add([pkg, ver], cb)
+ add([pkg, ver], where, cb)
})
}
- log.verbose("cache add", [pkg, ver])
- return add([pkg, ver], cb)
+ return add([pkg, ver], where, cb)
}
var adding = 0
-function add (args, cb) {
+function add (args, where, cb) {
// this is hot code. almost everything passes through here.
// the args can be any of:
// ["url"]
@@ -226,60 +251,54 @@ function add (args, cb) {
+ " npm cache add @\n"
+ " npm cache add \n"
+ " npm cache add \n"
- , name
, spec
+ log.silly("cache add", "args", args)
+
if (args[1] === undefined) args[1] = null
// at this point the args length must ==2
if (args[1] !== null) {
- name = args[0]
- spec = args[1]
+ spec = args[0]+"@"+args[1]
} else if (args.length === 2) {
spec = args[0]
}
- log.verbose("cache add", "name=%j spec=%j args=%j", name, spec, args)
+ log.verbose("cache add", "spec", spec)
- if (!name && !spec) return cb(usage)
+ if (!spec) return cb(usage)
if (adding <= 0) {
npm.spinner.start()
}
- adding ++
- cb = afterAdd([name, spec], cb)
-
- // see if the spec is a url
- // otherwise, treat as name@version
- var p = url.parse(spec) || {}
- log.verbose("parsed url", p)
-
- // If there's a /, and it's a path, then install the path.
- // If not, and there's a @, it could be that we got name@http://blah
- // in that case, we will not have a protocol now, but if we
- // split and check, we will.
- if (!name && !p.protocol) {
- return maybeFile(spec, cb)
- }
- else {
- switch (p.protocol) {
- case "http:":
- case "https:":
- return addRemoteTarball(spec, { name: name }, null, cb)
-
+ adding++
+ cb = afterAdd(cb)
+
+ realizePackageSpecifier(spec, where, function (err, p) {
+ if (err) return cb(err)
+
+ log.silly("cache add", "parsed spec", p)
+
+ switch (p.type) {
+ case "local":
+ case "directory":
+ addLocal(p, null, cb)
+ break
+ case "remote":
+ addRemoteTarball(p.spec, {name : p.name}, null, cb)
+ break
+ case "git":
+ addRemoteGit(p.spec, false, cb)
+ break
+ case "github":
+ maybeGithub(p.spec, cb)
+ break
default:
- if (isGitUrl(p)) return addRemoteGit(spec, p, false, cb)
-
- // if we have a name and a spec, then try name@spec
- if (name) {
- addNamed(name, spec, null, cb)
- }
- // if not, then try just spec (which may try name@"" if not found)
- else {
- addLocal(spec, {}, cb)
- }
+ if (p.name) return addNamed(p.name, p.spec, null, cb)
+
+ cb(new Error("couldn't figure out how to install " + spec))
}
- }
+ })
}
function unpack (pkg, ver, unpackTarget, dMode, fMode, uid, gid, cb) {
@@ -295,7 +314,7 @@ function unpack (pkg, ver, unpackTarget, dMode, fMode, uid, gid, cb) {
}
npm.commands.unbuild([unpackTarget], true, function (er) {
if (er) return cb(er)
- tar.unpack( path.join(npm.cache, pkg, ver, "package.tgz")
+ tar.unpack( path.join(cachedPackageRoot({name : pkg, version : ver}), "package.tgz")
, unpackTarget
, dMode, fMode
, uid, gid
@@ -304,68 +323,26 @@ function unpack (pkg, ver, unpackTarget, dMode, fMode, uid, gid, cb) {
})
}
-function afterAdd (arg, cb) { return function (er, data) {
- adding --
- if (adding <= 0) {
- npm.spinner.stop()
- }
- if (er || !data || !data.name || !data.version) {
- return cb(er, data)
- }
+function afterAdd (cb) { return function (er, data) {
+ adding--
+ if (adding <= 0) npm.spinner.stop()
+
+ if (er || !data || !data.name || !data.version) return cb(er, data)
+ log.silly("cache", "afterAdd", data.name+"@"+data.version)
// Save the resolved, shasum, etc. into the data so that the next
// time we load from this cached data, we have all the same info.
- var name = data.name
- var ver = data.version
- var pj = path.join(npm.cache, name, ver, "package", "package.json")
- var tmp = pj + "." + process.pid
+ var pj = path.join(cachedPackageRoot(data), "package", "package.json")
var done = inflight(pj, cb)
+ if (!done) return log.verbose("afterAdd", pj, "already in flight; not writing")
+ log.verbose("afterAdd", pj, "not in flight; writing")
- if (!done) return
-
- fs.writeFile(tmp, JSON.stringify(data), "utf8", function (er) {
+ getStat(function (er, cs) {
if (er) return done(er)
- fs.rename(tmp, pj, function (er) {
- done(er, data)
+ writeFileAtomic(pj, JSON.stringify(data), {chown : cs}, function (er) {
+ if (!er) log.verbose("afterAdd", pj, "written")
+ return done(er, data)
})
})
}}
-
-function maybeFile (spec, cb) {
- // split name@2.3.4 only if name is a valid package name,
- // don't split in case of "./test@example.com/" (local path)
- fs.stat(spec, function (er) {
- if (!er) {
- // definitely a local thing
- return addLocal(spec, {}, cb)
- }
-
- maybeAt(spec, cb)
- })
-}
-
-function maybeAt (spec, cb) {
- if (spec.indexOf("@") !== -1) {
- var tmp = spec.split("@")
-
- var name = tmp.shift()
- spec = tmp.join("@")
- add([name, spec], cb)
- } else {
- // already know it's not a url, so must be local
- addLocal(spec, {}, cb)
- }
-}
-
-function needName(er, data) {
- return er ? er
- : (data && !data.name) ? new Error("No name provided")
- : null
-}
-
-function needVersion(er, data) {
- return er ? er
- : (data && !data.version) ? new Error("No version provided")
- : null
-}
diff --git a/deps/npm/lib/cache/add-local-tarball.js b/deps/npm/lib/cache/add-local-tarball.js
index bcb938fa972..e84b66dd8dd 100644
--- a/deps/npm/lib/cache/add-local-tarball.js
+++ b/deps/npm/lib/cache/add-local-tarball.js
@@ -1,80 +1,52 @@
var mkdir = require("mkdirp")
, assert = require("assert")
, fs = require("graceful-fs")
- , readJson = require("read-package-json")
- , log = require("npmlog")
+ , writeFileAtomic = require("write-file-atomic")
, path = require("path")
, sha = require("sha")
, npm = require("../npm.js")
+ , log = require("npmlog")
, tar = require("../utils/tar.js")
, pathIsInside = require("path-is-inside")
- , locker = require("../utils/locker.js")
- , lock = locker.lock
- , unlock = locker.unlock
, getCacheStat = require("./get-stat.js")
+ , cachedPackageRoot = require("./cached-package-root.js")
, chownr = require("chownr")
, inflight = require("inflight")
, once = require("once")
+ , writeStream = require("fs-write-stream-atomic")
+ , randomBytes = require("crypto").pseudoRandomBytes // only need uniqueness
module.exports = addLocalTarball
-function addLocalTarball (p, pkgData, shasum, cb_) {
+function addLocalTarball (p, pkgData, shasum, cb) {
assert(typeof p === "string", "must have path")
- assert(typeof cb_ === "function", "must have callback")
+ assert(typeof cb === "function", "must have callback")
if (!pkgData) pkgData = {}
- var name = pkgData.name || ""
- // If we don't have a shasum yet, then get the shasum now.
+ // If we don't have a shasum yet, compute it.
if (!shasum) {
return sha.get(p, function (er, shasum) {
- if (er) return cb_(er)
- addLocalTarball(p, pkgData, shasum, cb_)
+ if (er) return cb(er)
+ log.silly("addLocalTarball", "shasum (computed)", shasum)
+ addLocalTarball(p, pkgData, shasum, cb)
})
}
- // if it's a tar, and not in place,
- // then unzip to .tmp, add the tmp folder, and clean up tmp
- if (pathIsInside(p, npm.tmp))
- return addTmpTarball(p, pkgData, shasum, cb_)
-
if (pathIsInside(p, npm.cache)) {
- if (path.basename(p) !== "package.tgz") return cb_(new Error(
- "Not a valid cache tarball name: "+p))
- return addPlacedTarball(p, pkgData, shasum, cb_)
+ if (path.basename(p) !== "package.tgz") {
+ return cb(new Error("Not a valid cache tarball name: "+p))
+ }
+ log.verbose("addLocalTarball", "adding from inside cache", p)
+ return addPlacedTarball(p, pkgData, shasum, cb)
}
- function cb (er, data) {
+ addTmpTarball(p, pkgData, shasum, function (er, data) {
if (data) {
data._resolved = p
data._shasum = data._shasum || shasum
}
- return cb_(er, data)
- }
-
- // just copy it over and then add the temp tarball file.
- var tmp = path.join(npm.tmp, name + Date.now()
- + "-" + Math.random(), "tmp.tgz")
- mkdir(path.dirname(tmp), function (er) {
- if (er) return cb(er)
- var from = fs.createReadStream(p)
- , to = fs.createWriteStream(tmp)
- , errState = null
- function errHandler (er) {
- if (errState) return
- return cb(errState = er)
- }
- from.on("error", errHandler)
- to.on("error", errHandler)
- to.on("close", function () {
- if (errState) return
- log.verbose("chmod", tmp, npm.modes.file.toString(8))
- fs.chmod(tmp, npm.modes.file, function (er) {
- if (er) return cb(er)
- addTmpTarball(tmp, pkgData, shasum, cb)
- })
- })
- from.pipe(to)
+ return cb(er, data)
})
}
@@ -89,10 +61,7 @@ function addPlacedTarball (p, pkgData, shasum, cb) {
}
function addPlacedTarball_ (p, pkgData, uid, gid, resolvedSum, cb) {
- // now we know it's in place already as .cache/name/ver/package.tgz
- var name = pkgData.name
- , version = pkgData.version
- , folder = path.join(npm.cache, name, version, "package")
+ var folder = path.join(cachedPackageRoot(pkgData), "package")
// First, make sure we have the shasum, if we don't already.
if (!resolvedSum) {
@@ -103,105 +72,105 @@ function addPlacedTarball_ (p, pkgData, uid, gid, resolvedSum, cb) {
return
}
- lock(folder, function (er) {
+ mkdir(folder, function (er) {
if (er) return cb(er)
-
- // async try/finally
- var originalCb = cb
- cb = function (er, data) {
- unlock(folder, function (er2) {
- return originalCb(er || er2, data)
- })
- }
-
- mkdir(folder, function (er) {
- if (er) return cb(er)
- var pj = path.join(folder, "package.json")
- var json = JSON.stringify(pkgData, null, 2)
- fs.writeFile(pj, json, "utf8", function (er) {
- cb(er, pkgData)
- })
+ var pj = path.join(folder, "package.json")
+ var json = JSON.stringify(pkgData, null, 2)
+ writeFileAtomic(pj, json, function (er) {
+ cb(er, pkgData)
})
})
}
function addTmpTarball (tgz, pkgData, shasum, cb) {
assert(typeof cb === "function", "must have callback function")
- assert(shasum, "should have shasum by now")
+ assert(shasum, "must have shasum by now")
cb = inflight("addTmpTarball:" + tgz, cb)
- if (!cb) return
+ if (!cb) return log.verbose("addTmpTarball", tgz, "already in flight; not adding")
+ log.verbose("addTmpTarball", tgz, "not in flight; adding")
// we already have the package info, so just move into place
if (pkgData && pkgData.name && pkgData.version) {
+ log.verbose(
+ "addTmpTarball",
+ "already have metadata; skipping unpack for",
+ pkgData.name + "@" + pkgData.version
+ )
return addTmpTarball_(tgz, pkgData, shasum, cb)
}
- // This is a tarball we probably downloaded from the internet.
- // The shasum's already been checked, but we haven't ever had
- // a peek inside, so we unpack it here just to make sure it is
- // what it says it is.
- // Note: we might not have any clue what we think it is, for
- // example if the user just did `npm install ./foo.tgz`
+ // This is a tarball we probably downloaded from the internet. The shasum's
+ // already been checked, but we haven't ever had a peek inside, so we unpack
+ // it here just to make sure it is what it says it is.
+ //
+ // NOTE: we might not have any clue what we think it is, for example if the
+ // user just did `npm install ./foo.tgz`
- var target = tgz + "-unpack"
- getCacheStat(function (er, cs) {
- tar.unpack(tgz, target, null, null, cs.uid, cs.gid, next)
- })
-
- function next (er) {
+ // generate a unique filename
+ randomBytes(6, function (er, random) {
if (er) return cb(er)
- var pj = path.join(target, "package.json")
- readJson(pj, function (er, data) {
- // XXX dry with similar stanza in add-local.js
- er = needName(er, data)
- er = needVersion(er, data)
- // check that this is what we expected.
- if (!er && pkgData.name && pkgData.name !== data.name) {
- er = new Error( "Invalid Package: expected "
- + pkgData.name + " but found "
- + data.name )
- }
-
- if (!er && pkgData.version && pkgData.version !== data.version) {
- er = new Error( "Invalid Package: expected "
- + pkgData.name + "@" + pkgData.version
- + " but found "
- + data.name + "@" + data.version )
- }
+ var target = path.join(npm.tmp, "unpack-" + random.toString("hex"))
+ getCacheStat(function (er, cs) {
if (er) return cb(er)
- addTmpTarball_(tgz, data, shasum, cb)
+ log.verbose("addTmpTarball", "validating metadata from", tgz)
+ tar.unpack(tgz, target, null, null, cs.uid, cs.gid, function (er, data) {
+ if (er) return cb(er)
+
+ // check that this is what we expected.
+ if (!data.name) {
+ return cb(new Error("No name provided"))
+ }
+ else if (pkgData.name && data.name !== pkgData.name) {
+ return cb(new Error("Invalid Package: expected " + pkgData.name +
+ " but found " + data.name))
+ }
+
+ if (!data.version) {
+ return cb(new Error("No version provided"))
+ }
+ else if (pkgData.version && data.version !== pkgData.version) {
+ return cb(new Error("Invalid Package: expected " +
+ pkgData.name + "@" + pkgData.version +
+ " but found " + data.name + "@" + data.version))
+ }
+
+ addTmpTarball_(tgz, data, shasum, cb)
+ })
})
- }
+ })
}
function addTmpTarball_ (tgz, data, shasum, cb) {
assert(typeof cb === "function", "must have callback function")
cb = once(cb)
- var name = data.name
- var version = data.version
- assert(name, "should have package name by now")
- assert(version, "should have package version by now")
+ assert(data.name, "should have package name by now")
+ assert(data.version, "should have package version by now")
- var root = path.resolve(npm.cache, name, version)
+ var root = cachedPackageRoot(data)
var pkg = path.resolve(root, "package")
var target = path.resolve(root, "package.tgz")
getCacheStat(function (er, cs) {
if (er) return cb(er)
- mkdir(pkg, function (er) {
+ mkdir(pkg, function (er, created) {
+
+ // chown starting from the first dir created by mkdirp,
+ // or the root dir, if none had to be created, so that
+ // we know that we get all the children.
+ function chown () {
+ chownr(created || root, cs.uid, cs.gid, done)
+ }
+
if (er) return cb(er)
var read = fs.createReadStream(tgz)
- var write = fs.createWriteStream(target)
+ var write = writeStream(target, { mode: npm.modes.file })
var fin = cs.uid && cs.gid ? chown : done
read.on("error", cb).pipe(write).on("error", cb).on("close", fin)
})
- function chown () {
- chownr(root, cs.uid, cs.gid, done)
- }
})
function done() {
@@ -209,15 +178,3 @@ function addTmpTarball_ (tgz, data, shasum, cb) {
cb(null, data)
}
}
-
-function needName(er, data) {
- return er ? er
- : (data && !data.name) ? new Error("No name provided")
- : null
-}
-
-function needVersion(er, data) {
- return er ? er
- : (data && !data.version) ? new Error("No version provided")
- : null
-}
diff --git a/deps/npm/lib/cache/add-local.js b/deps/npm/lib/cache/add-local.js
index 2a6d8cf884f..b425d7f9118 100644
--- a/deps/npm/lib/cache/add-local.js
+++ b/deps/npm/lib/cache/add-local.js
@@ -1,5 +1,4 @@
-var fs = require("graceful-fs")
- , assert = require("assert")
+var assert = require("assert")
, path = require("path")
, mkdir = require("mkdirp")
, chownr = require("chownr")
@@ -9,56 +8,36 @@ var fs = require("graceful-fs")
, npm = require("../npm.js")
, tar = require("../utils/tar.js")
, deprCheck = require("../utils/depr-check.js")
- , locker = require("../utils/locker.js")
- , lock = locker.lock
- , unlock = locker.unlock
, getCacheStat = require("./get-stat.js")
- , addNamed = require("./add-named.js")
+ , cachedPackageRoot = require("./cached-package-root.js")
, addLocalTarball = require("./add-local-tarball.js")
- , maybeGithub = require("./maybe-github.js")
, sha = require("sha")
module.exports = addLocal
function addLocal (p, pkgData, cb_) {
- assert(typeof p === "string", "must have path")
+ assert(typeof p === "object", "must have spec info")
assert(typeof cb === "function", "must have callback")
pkgData = pkgData || {}
function cb (er, data) {
- unlock(p, function () {
- if (er) {
- // if it doesn't have a / in it, it might be a
- // remote thing.
- if (p.indexOf("/") === -1 && p.charAt(0) !== "."
- && (process.platform !== "win32" || p.indexOf("\\") === -1)) {
- return addNamed(p, "", null, cb_)
- }
- log.error("addLocal", "Could not install %s", p)
- return cb_(er)
- }
- if (data && !data._fromGithub) data._from = p
- return cb_(er, data)
- })
+ if (er) {
+ log.error("addLocal", "Could not install %s", p.spec)
+ return cb_(er)
+ }
+ if (data && !data._fromGithub) {
+ data._from = path.relative(npm.prefix, p.spec) || "."
+ }
+ return cb_(er, data)
}
- lock(p, function (er) {
- if (er) return cb(er)
- // figure out if this is a folder or file.
- fs.stat(p, function (er, s) {
- if (er) {
- // might be username/project
- // in that case, try it as a github url.
- if (p.split("/").length === 2) {
- return maybeGithub(p, er, cb)
- }
- return cb(er)
- }
- if (s.isDirectory()) addLocalDirectory(p, pkgData, null, cb)
- else addLocalTarball(p, pkgData, null, cb)
- })
- })
+ if (p.type === "directory") {
+ addLocalDirectory(p.spec, pkgData, null, cb)
+ }
+ else {
+ addLocalTarball(p.spec, pkgData, null, cb)
+ }
}
// At this point, if shasum is set, it's something that we've already
@@ -73,30 +52,33 @@ function addLocalDirectory (p, pkgData, shasum, cb) {
"Adding a cache directory to the cache will make the world implode."))
readJson(path.join(p, "package.json"), false, function (er, data) {
- er = needName(er, data)
- er = needVersion(er, data)
+ if (er) return cb(er)
- // check that this is what we expected.
- if (!er && pkgData.name && pkgData.name !== data.name) {
- er = new Error( "Invalid Package: expected "
- + pkgData.name + " but found "
- + data.name )
+ if (!data.name) {
+ return cb(new Error("No name provided in package.json"))
+ }
+ else if (pkgData.name && pkgData.name !== data.name) {
+ return cb(new Error(
+ "Invalid package: expected " + pkgData.name + " but found " + data.name
+ ))
}
- if (!er && pkgData.version && pkgData.version !== data.version) {
- er = new Error( "Invalid Package: expected "
- + pkgData.name + "@" + pkgData.version
- + " but found "
- + data.name + "@" + data.version )
+ if (!data.version) {
+ return cb(new Error("No version provided in package.json"))
+ }
+ else if (pkgData.version && pkgData.version !== data.version) {
+ return cb(new Error(
+ "Invalid package: expected " + pkgData.name + "@" + pkgData.version +
+ " but found " + data.name + "@" + data.version
+ ))
}
- if (er) return cb(er)
deprCheck(data)
// pack to {cache}/name/ver/package.tgz
- var croot = path.resolve(npm.cache, data.name, data.version)
- var tgz = path.resolve(croot, "package.tgz")
- var pj = path.resolve(croot, "package/package.json")
+ var root = cachedPackageRoot(data)
+ var tgz = path.resolve(root, "package.tgz")
+ var pj = path.resolve(root, "package/package.json")
getCacheStat(function (er, cs) {
mkdir(path.dirname(pj), function (er, made) {
if (er) return cb(er)
@@ -132,15 +114,3 @@ function addLocalDirectory (p, pkgData, shasum, cb) {
}
})
}
-
-function needName(er, data) {
- return er ? er
- : (data && !data.name) ? new Error("No name provided")
- : null
-}
-
-function needVersion(er, data) {
- return er ? er
- : (data && !data.version) ? new Error("No version provided")
- : null
-}
diff --git a/deps/npm/lib/cache/add-named.js b/deps/npm/lib/cache/add-named.js
index 7137cc9b569..1bd7af14486 100644
--- a/deps/npm/lib/cache/add-named.js
+++ b/deps/npm/lib/cache/add-named.js
@@ -10,45 +10,48 @@ var path = require("path")
, registry = npm.registry
, deprCheck = require("../utils/depr-check.js")
, inflight = require("inflight")
- , locker = require("../utils/locker.js")
- , lock = locker.lock
- , unlock = locker.unlock
- , maybeGithub = require("./maybe-github.js")
, addRemoteTarball = require("./add-remote-tarball.js")
+ , cachedPackageRoot = require("./cached-package-root.js")
+ , mapToRegistry = require("../utils/map-to-registry.js")
module.exports = addNamed
-var NAME_PREFIX = "addName:"
+function getOnceFromRegistry (name, from, next, done) {
+ mapToRegistry(name, npm.config, function (er, uri) {
+ if (er) return done(er)
+
+ var key = "registry:" + uri
+ next = inflight(key, next)
+ if (!next) return log.verbose(from, key, "already in flight; waiting")
+ else log.verbose(from, key, "not in flight; fetching")
+
+ registry.get(uri, null, next)
+ })
+}
+
function addNamed (name, version, data, cb_) {
assert(typeof name === "string", "must have module name")
assert(typeof cb_ === "function", "must have callback")
- log.verbose("addNamed", [name, version])
-
var key = name + "@" + version
+ log.verbose("addNamed", key)
+
function cb (er, data) {
if (data && !data._fromGithub) data._from = key
- unlock(key, function () { cb_(er, data) })
+ cb_(er, data)
}
- cb_ = inflight(NAME_PREFIX + key, cb_)
-
- if (!cb_) return
-
- log.verbose("addNamed", [semver.valid(version), semver.validRange(version)])
- lock(key, function (er) {
- if (er) return cb(er)
-
- var fn = ( semver.valid(version, true) ? addNameVersion
- : semver.validRange(version, true) ? addNameRange
- : addNameTag
- )
- fn(name, version, data, cb)
- })
+ log.silly("addNamed", "semver.valid", semver.valid(version))
+ log.silly("addNamed", "semver.validRange", semver.validRange(version))
+ var fn = ( semver.valid(version, true) ? addNameVersion
+ : semver.validRange(version, true) ? addNameRange
+ : addNameTag
+ )
+ fn(name, version, data, cb)
}
-function addNameTag (name, tag, data, cb_) {
+function addNameTag (name, tag, data, cb) {
log.info("addNameTag", [name, tag])
var explicit = true
if (!tag) {
@@ -56,21 +59,14 @@ function addNameTag (name, tag, data, cb_) {
tag = npm.config.get("tag")
}
- function cb(er, data) {
- // might be username/project
- // in that case, try it as a github url.
- if (er && tag.split("/").length === 2) {
- return maybeGithub(tag, er, cb_)
- }
- return cb_(er, data)
- }
+ getOnceFromRegistry(name, "addNameTag", next, cb)
- var uri = url.resolve(npm.config.get("registry"), name)
- registry.get(uri, null, function (er, data, json, resp) {
- if (!er) {
- er = errorResponse(name, resp)
- }
+ function next (er, data, json, resp) {
+ if (!er) er = errorResponse(name, resp)
if (er) return cb(er)
+
+ log.silly("addNameTag", "next cb for", name, "with tag", tag)
+
engineFilter(data)
if (data["dist-tags"] && data["dist-tags"][tag]
&& data.versions[data["dist-tags"][tag]]) {
@@ -83,7 +79,7 @@ function addNameTag (name, tag, data, cb_) {
er = installTargetsError(tag, data)
return cb(er)
- })
+ }
}
function engineFilter (data) {
@@ -114,22 +110,24 @@ function addNameVersion (name, v, data, cb) {
response = null
return next()
}
- var uri = url.resolve(npm.config.get("registry"), name)
- registry.get(uri, null, function (er, d, json, resp) {
+
+ getOnceFromRegistry(name, "addNameVersion", setData, cb)
+
+ function setData (er, d, json, resp) {
if (!er) {
er = errorResponse(name, resp)
}
if (er) return cb(er)
data = d && d.versions[ver]
if (!data) {
- er = new Error('version not found: ' + name + '@' + ver)
+ er = new Error("version not found: "+name+"@"+ver)
er.package = name
er.statusCode = 404
return cb(er)
}
response = resp
next()
- })
+ }
function next () {
deprCheck(data)
@@ -145,18 +143,27 @@ function addNameVersion (name, v, data, cb) {
}
// we got cached data, so let's see if we have a tarball.
- var pkgroot = path.join(npm.cache, name, ver)
+ var pkgroot = cachedPackageRoot({name : name, version : ver})
var pkgtgz = path.join(pkgroot, "package.tgz")
var pkgjson = path.join(pkgroot, "package", "package.json")
fs.stat(pkgtgz, function (er) {
if (!er) {
readJson(pkgjson, function (er, data) {
- er = needName(er, data)
- er = needVersion(er, data)
- if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR")
- return cb(er)
+ if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er)
+
+ if (data) {
+ if (!data.name) return cb(new Error("No name provided"))
+ if (!data.version) return cb(new Error("No version provided"))
+
+ // check the SHA of the package we have, to ensure it wasn't installed
+ // from somewhere other than the registry (eg, a fork)
+ if (data._shasum && dist.shasum && data._shasum !== dist.shasum) {
+ return fetchit()
+ }
+ }
+
if (er) return fetchit()
- return cb(null, data)
+ else return cb(null, data)
})
} else return fetchit()
})
@@ -166,10 +173,9 @@ function addNameVersion (name, v, data, cb) {
return cb(new Error("Cannot fetch: "+dist.tarball))
}
- // use the same protocol as the registry.
- // https registry --> https tarballs, but
- // only if they're the same hostname, or else
- // detached tarballs may not work.
+ // Use the same protocol as the registry. https registry --> https
+ // tarballs, but only if they're the same hostname, or else detached
+ // tarballs may not work.
var tb = url.parse(dist.tarball)
var rp = url.parse(npm.config.get("registry"))
if (tb.hostname === rp.hostname
@@ -179,8 +185,8 @@ function addNameVersion (name, v, data, cb) {
}
tb = url.format(tb)
- // only add non-shasum'ed packages if --forced.
- // only ancient things would lack this for good reasons nowadays.
+ // Only add non-shasum'ed packages if --forced. Only ancient things
+ // would lack this for good reasons nowadays.
if (!dist.shasum && !npm.config.get("force")) {
return cb(new Error("package lacks shasum: " + data._id))
}
@@ -192,20 +198,23 @@ function addNameVersion (name, v, data, cb) {
function addNameRange (name, range, data, cb) {
range = semver.validRange(range, true)
if (range === null) return cb(new Error(
- "Invalid version range: "+range))
+ "Invalid version range: " + range
+ ))
log.silly("addNameRange", {name:name, range:range, hasData:!!data})
if (data) return next()
- var uri = url.resolve(npm.config.get("registry"), name)
- registry.get(uri, null, function (er, d, json, resp) {
+
+ getOnceFromRegistry(name, "addNameRange", setData, cb)
+
+ function setData (er, d, json, resp) {
if (!er) {
er = errorResponse(name, resp)
}
if (er) return cb(er)
data = d
next()
- })
+ }
function next () {
log.silly( "addNameRange", "number 2"
@@ -264,15 +273,3 @@ function errorResponse (name, response) {
}
return er
}
-
-function needName(er, data) {
- return er ? er
- : (data && !data.name) ? new Error("No name provided")
- : null
-}
-
-function needVersion(er, data) {
- return er ? er
- : (data && !data.version) ? new Error("No version provided")
- : null
-}
diff --git a/deps/npm/lib/cache/add-remote-git.js b/deps/npm/lib/cache/add-remote-git.js
index 7743aa4a450..d8f3f1cd88f 100644
--- a/deps/npm/lib/cache/add-remote-git.js
+++ b/deps/npm/lib/cache/add-remote-git.js
@@ -8,17 +8,13 @@ var mkdir = require("mkdirp")
, url = require("url")
, chownr = require("chownr")
, zlib = require("zlib")
- , which = require("which")
, crypto = require("crypto")
- , chmodr = require("chmodr")
, npm = require("../npm.js")
, rm = require("../utils/gently-rm.js")
, inflight = require("inflight")
- , locker = require("../utils/locker.js")
- , lock = locker.lock
- , unlock = locker.unlock
, getCacheStat = require("./get-stat.js")
, addLocalTarball = require("./add-local-tarball.js")
+ , writeStream = require("fs-write-stream-atomic")
// 1. cacheDir = path.join(cache,'_git-remotes',sha1(u))
@@ -28,18 +24,13 @@ var mkdir = require("mkdirp")
// 5. git archive /tmp/random.tgz
// 6. addLocalTarball(/tmp/random.tgz) --format=tar --prefix=package/
// silent flag is used if this should error quietly
-module.exports = function addRemoteGit (u, parsed, silent, cb_) {
+module.exports = function addRemoteGit (u, silent, cb) {
assert(typeof u === "string", "must have git URL")
- assert(typeof parsed === "object", "must have parsed query")
- assert(typeof cb_ === "function", "must have callback")
+ assert(typeof cb === "function", "must have callback")
- function cb (er, data) {
- unlock(u, function () { cb_(er, data) })
- }
-
- cb_ = inflight(u, cb_)
-
- if (!cb_) return
+ log.verbose("addRemoteGit", "u=%j silent=%j", u, silent)
+ var parsed = url.parse(u, true)
+ log.silly("addRemoteGit", "parsed", parsed)
// git is so tricky!
// if the path is like ssh://foo:22/some/path then it works, but
@@ -55,23 +46,28 @@ module.exports = function addRemoteGit (u, parsed, silent, cb_) {
u = u.replace(/^ssh:\/\//, "")
}
- lock(u, function (er) {
- if (er) return cb(er)
+ cb = inflight(u, cb)
+ if (!cb) return log.verbose("addRemoteGit", u, "already in flight; waiting")
+ log.verbose("addRemoteGit", u, "not in flight; cloning")
+
+ // figure out what we should check out.
+ var co = parsed.hash && parsed.hash.substr(1) || "master"
- // figure out what we should check out.
- var co = parsed.hash && parsed.hash.substr(1) || "master"
+ var v = crypto.createHash("sha1").update(u).digest("hex").slice(0, 8)
+ v = u.replace(/[^a-zA-Z0-9]+/g, "-")+"-"+v
- var v = crypto.createHash("sha1").update(u).digest("hex").slice(0, 8)
- v = u.replace(/[^a-zA-Z0-9]+/g, '-') + '-' + v
+ log.verbose("addRemoteGit", [u, co])
- log.verbose("addRemoteGit", [u, co])
+ var p = path.join(npm.config.get("cache"), "_git-remotes", v)
- var p = path.join(npm.config.get("cache"), "_git-remotes", v)
+ // we don't need global templates when cloning. use this empty dir to specify as template dir
+ mkdir(path.join(npm.config.get("cache"), "_git-remotes", "_templates"), function (er) {
+ if (er) return cb(er)
+ checkGitDir(p, u, co, origUrl, silent, function (er, data) {
+ if (er) return cb(er, data)
- checkGitDir(p, u, co, origUrl, silent, function(er, data) {
- chmodr(p, npm.modes.file, function(erChmod) {
- if (er) return cb(er, data)
- return cb(erChmod, data)
+ addModeRecursive(p, npm.modes.file, function (er) {
+ return cb(er, data)
})
})
})
@@ -109,7 +105,8 @@ function cloneGitRemote (p, u, co, origUrl, silent, cb) {
mkdir(p, function (er) {
if (er) return cb(er)
- var args = [ "clone", "--mirror", u, p ]
+ var args = [ "clone", "--template=" + path.join(npm.config.get("cache"),
+ "_git_remotes", "_templates"), "--mirror", u, p ]
var env = gitEnv()
// check for git
@@ -145,10 +142,7 @@ function archiveGitRemote (p, u, co, origUrl, cb) {
}
log.verbose("git fetch -a origin ("+u+")", stdout)
tmp = path.join(npm.tmp, Date.now()+"-"+Math.random(), "tmp.tgz")
- verifyOwnership()
- })
- function verifyOwnership() {
if (process.platform === "win32") {
log.silly("verifyOwnership", "skipping for windows")
resolveHead()
@@ -167,7 +161,7 @@ function archiveGitRemote (p, u, co, origUrl, cb) {
})
})
}
- }
+ })
function resolveHead () {
git.whichAndExec(resolve, {cwd: p, env: env}, function (er, stdout, stderr) {
@@ -181,16 +175,20 @@ function archiveGitRemote (p, u, co, origUrl, cb) {
parsed.hash = stdout
resolved = url.format(parsed)
+ if (parsed.protocol !== "git:") {
+ resolved = "git+" + resolved
+ }
+
// https://github.com/npm/npm/issues/3224
// node incorrectly sticks a / at the start of the path
// We know that the host won't change, so split and detect this
var spo = origUrl.split(parsed.host)
var spr = resolved.split(parsed.host)
- if (spo[1].charAt(0) === ':' && spr[1].charAt(0) === '/')
+ if (spo[1].charAt(0) === ":" && spr[1].charAt(0) === "/")
spr[1] = spr[1].slice(1)
resolved = spr.join(parsed.host)
- log.verbose('resolved git url', resolved)
+ log.verbose("resolved git url", resolved)
next()
})
}
@@ -200,7 +198,7 @@ function archiveGitRemote (p, u, co, origUrl, cb) {
if (er) return cb(er)
var gzip = zlib.createGzip({ level: 9 })
var args = ["archive", co, "--format=tar", "--prefix=package/"]
- var out = fs.createWriteStream(tmp)
+ var out = writeStream(tmp)
var env = gitEnv()
cb = once(cb)
var cp = git.spawn(args, { env: env, cwd: p })
@@ -226,8 +224,47 @@ function gitEnv () {
if (gitEnv_) return gitEnv_
gitEnv_ = {}
for (var k in process.env) {
- if (!~['GIT_PROXY_COMMAND','GIT_SSH','GIT_SSL_NO_VERIFY'].indexOf(k) && k.match(/^GIT/)) continue
+ if (!~["GIT_PROXY_COMMAND","GIT_SSH","GIT_SSL_NO_VERIFY","GIT_SSL_CAINFO"].indexOf(k) && k.match(/^GIT/)) continue
gitEnv_[k] = process.env[k]
}
return gitEnv_
}
+
+// similar to chmodr except it add permissions rather than overwriting them
+// adapted from https://github.com/isaacs/chmodr/blob/master/chmodr.js
+function addModeRecursive(p, mode, cb) {
+ fs.readdir(p, function (er, children) {
+ // Any error other than ENOTDIR means it's not readable, or doesn't exist.
+ // Give up.
+ if (er && er.code !== "ENOTDIR") return cb(er)
+ if (er || !children.length) return addMode(p, mode, cb)
+
+ var len = children.length
+ var errState = null
+ children.forEach(function (child) {
+ addModeRecursive(path.resolve(p, child), mode, then)
+ })
+
+ function then (er) {
+ if (errState) return undefined
+ if (er) return cb(errState = er)
+ if (--len === 0) return addMode(p, dirMode(mode), cb)
+ }
+ })
+}
+
+function addMode(p, mode, cb) {
+ fs.stat(p, function (er, stats) {
+ if (er) return cb(er)
+ mode = stats.mode | mode
+ fs.chmod(p, mode, cb)
+ })
+}
+
+// taken from https://github.com/isaacs/chmodr/blob/master/chmodr.js
+function dirMode(mode) {
+ if (mode & parseInt("0400", 8)) mode |= parseInt("0100", 8)
+ if (mode & parseInt( "040", 8)) mode |= parseInt( "010", 8)
+ if (mode & parseInt( "04", 8)) mode |= parseInt( "01", 8)
+ return mode
+}
diff --git a/deps/npm/lib/cache/add-remote-tarball.js b/deps/npm/lib/cache/add-remote-tarball.js
index db9a05d8254..9591ba89d23 100644
--- a/deps/npm/lib/cache/add-remote-tarball.js
+++ b/deps/npm/lib/cache/add-remote-tarball.js
@@ -4,12 +4,10 @@ var mkdir = require("mkdirp")
, path = require("path")
, sha = require("sha")
, retry = require("retry")
+ , createWriteStream = require("fs-write-stream-atomic")
, npm = require("../npm.js")
- , fetch = require("../utils/fetch.js")
+ , registry = npm.registry
, inflight = require("inflight")
- , locker = require("../utils/locker.js")
- , lock = locker.lock
- , unlock = locker.unlock
, addLocalTarball = require("./add-local-tarball.js")
, cacheFile = require("npm-cache-filename")
@@ -25,14 +23,12 @@ function addRemoteTarball (u, pkgData, shasum, cb_) {
data._shasum = data._shasum || shasum
data._resolved = u
}
- unlock(u, function () {
- cb_(er, data)
- })
+ cb_(er, data)
}
cb_ = inflight(u, cb_)
-
- if (!cb_) return
+ if (!cb_) return log.verbose("addRemoteTarball", u, "already in flight; waiting")
+ log.verbose("addRemoteTarball", u, "not in flight; adding")
// XXX Fetch direct to cache location, store tarballs under
// ${cache}/registry.npmjs.org/pkg/-/pkg-1.2.3.tgz
@@ -43,25 +39,22 @@ function addRemoteTarball (u, pkgData, shasum, cb_) {
addLocalTarball(tmp, pkgData, shasum, cb)
}
- lock(u, function (er) {
+ log.verbose("addRemoteTarball", [u, shasum])
+ mkdir(path.dirname(tmp), function (er) {
if (er) return cb(er)
-
- log.verbose("addRemoteTarball", [u, shasum])
- mkdir(path.dirname(tmp), function (er) {
- if (er) return cb(er)
- addRemoteTarball_(u, tmp, shasum, next)
- })
+ addRemoteTarball_(u, tmp, shasum, next)
})
}
function addRemoteTarball_(u, tmp, shasum, cb) {
// Tuned to spread 3 attempts over about a minute.
// See formula at .
- var operation = retry.operation
- ( { retries: npm.config.get("fetch-retries")
- , factor: npm.config.get("fetch-retry-factor")
- , minTimeout: npm.config.get("fetch-retry-mintimeout")
- , maxTimeout: npm.config.get("fetch-retry-maxtimeout") })
+ var operation = retry.operation({
+ retries: npm.config.get("fetch-retries")
+ , factor: npm.config.get("fetch-retry-factor")
+ , minTimeout: npm.config.get("fetch-retry-mintimeout")
+ , maxTimeout: npm.config.get("fetch-retry-maxtimeout")
+ })
operation.attempt(function (currentAttempt) {
log.info("retry", "fetch attempt " + currentAttempt
@@ -80,27 +73,39 @@ function addRemoteTarball_(u, tmp, shasum, cb) {
}
function fetchAndShaCheck (u, tmp, shasum, cb) {
- fetch(u, tmp, function (er, response) {
+ registry.fetch(u, null, function (er, response) {
if (er) {
log.error("fetch failed", u)
return cb(er, response)
}
- if (!shasum) {
- // Well, we weren't given a shasum, so at least sha what we have
- // in case we want to compare it to something else later
- return sha.get(tmp, function (er, shasum) {
- cb(er, response, shasum)
- })
- }
+ var tarball = createWriteStream(tmp, { mode : npm.modes.file })
+ tarball.on("error", function (er) {
+ cb(er)
+ tarball.destroy()
+ })
- // validate that the url we just downloaded matches the expected shasum.
- sha.check(tmp, shasum, function (er) {
- if (er && er.message) {
- // add original filename for better debuggability
- er.message = er.message + '\n' + 'From: ' + u
+ tarball.on("finish", function () {
+ if (!shasum) {
+ // Well, we weren't given a shasum, so at least sha what we have
+ // in case we want to compare it to something else later
+ return sha.get(tmp, function (er, shasum) {
+ log.silly("fetchAndShaCheck", "shasum", shasum)
+ cb(er, response, shasum)
+ })
}
- return cb(er, response, shasum)
+
+ // validate that the url we just downloaded matches the expected shasum.
+ log.silly("fetchAndShaCheck", "shasum", shasum)
+ sha.check(tmp, shasum, function (er) {
+ if (er && er.message) {
+ // add original filename for better debuggability
+ er.message = er.message + "\n" + "From: " + u
+ }
+ return cb(er, response, shasum)
+ })
})
+
+ response.pipe(tarball)
})
}
diff --git a/deps/npm/lib/cache/cached-package-root.js b/deps/npm/lib/cache/cached-package-root.js
new file mode 100644
index 00000000000..7163314a8ed
--- /dev/null
+++ b/deps/npm/lib/cache/cached-package-root.js
@@ -0,0 +1,14 @@
+var assert = require("assert")
+var resolve = require("path").resolve
+
+var npm = require("../npm.js")
+
+module.exports = getCacheRoot
+
+function getCacheRoot (data) {
+ assert(data, "must pass package metadata")
+ assert(data.name, "package metadata must include name")
+ assert(data.version, "package metadata must include version")
+
+ return resolve(npm.cache, data.name, data.version)
+}
diff --git a/deps/npm/lib/cache/get-stat.js b/deps/npm/lib/cache/get-stat.js
index 913f5af851f..45b60ce7936 100644
--- a/deps/npm/lib/cache/get-stat.js
+++ b/deps/npm/lib/cache/get-stat.js
@@ -10,9 +10,6 @@ var cacheStat = null
module.exports = function getCacheStat (cb) {
if (cacheStat) return cb(null, cacheStat)
- cb = inflight("getCacheStat", cb)
- if (!cb) return
-
fs.stat(npm.cache, function (er, st) {
if (er) return makeCacheDir(cb)
if (!st.isDirectory()) {
@@ -24,7 +21,13 @@ module.exports = function getCacheStat (cb) {
}
function makeCacheDir (cb) {
- if (!process.getuid) return mkdir(npm.cache, cb)
+ cb = inflight("makeCacheDir", cb)
+ if (!cb) return log.verbose("getCacheStat", "cache creation already in flight; waiting")
+ log.verbose("getCacheStat", "cache creation not in flight; initializing")
+
+ if (!process.getuid) return mkdir(npm.cache, function (er) {
+ return cb(er, {})
+ })
var uid = +process.getuid()
, gid = +process.getgid()
diff --git a/deps/npm/lib/cache/maybe-github.js b/deps/npm/lib/cache/maybe-github.js
index fee64c5dfdf..5ecdb691552 100644
--- a/deps/npm/lib/cache/maybe-github.js
+++ b/deps/npm/lib/cache/maybe-github.js
@@ -1,29 +1,26 @@
-var url = require("url")
- , assert = require("assert")
+var assert = require("assert")
, log = require("npmlog")
, addRemoteGit = require("./add-remote-git.js")
-module.exports = function maybeGithub (p, er, cb) {
+module.exports = function maybeGithub (p, cb) {
assert(typeof p === "string", "must pass package name")
- assert(er instanceof Error, "must include error")
assert(typeof cb === "function", "must pass callback")
var u = "git://github.com/" + p
- , up = url.parse(u)
log.info("maybeGithub", "Attempting %s from %s", p, u)
- return addRemoteGit(u, up, true, function (er2, data) {
- if (er2) {
+ return addRemoteGit(u, true, function (er, data) {
+ if (er) {
var upriv = "git+ssh://git@github.com:" + p
- , uppriv = url.parse(upriv)
-
log.info("maybeGithub", "Attempting %s from %s", p, upriv)
- return addRemoteGit(upriv, uppriv, false, function (er3, data) {
- if (er3) return cb(er)
+ return addRemoteGit(upriv, false, function (er, data) {
+ if (er) return cb(er)
+
success(upriv, data)
})
}
+
success(u, data)
})
diff --git a/deps/npm/lib/completion.js b/deps/npm/lib/completion.js
index 5c1098a599d..1d26ffcf8ac 100644
--- a/deps/npm/lib/completion.js
+++ b/deps/npm/lib/completion.js
@@ -6,7 +6,7 @@ completion.usage = "npm completion >> ~/.bashrc\n"
+ "source <(npm completion)"
var npm = require("./npm.js")
- , npmconf = require("npmconf")
+ , npmconf = require("./config/core.js")
, configDefs = npmconf.defs
, configTypes = configDefs.types
, shorthands = configDefs.shorthands
@@ -229,7 +229,7 @@ function configCompl (opts, cb) {
// expand with the valid values of various config values.
// not yet implemented.
function configValueCompl (opts, cb) {
- console.error('configValue', opts)
+ console.error("configValue", opts)
return cb(null, [])
}
diff --git a/deps/npm/lib/config.js b/deps/npm/lib/config.js
index 8dc814acd0a..f51156aad4e 100644
--- a/deps/npm/lib/config.js
+++ b/deps/npm/lib/config.js
@@ -11,8 +11,9 @@ config.usage = "npm config set "
var log = require("npmlog")
, npm = require("./npm.js")
+ , npmconf = require("./config/core.js")
, fs = require("graceful-fs")
- , npmconf = require("npmconf")
+ , writeFileAtomic = require("write-file-atomic")
, types = npmconf.defs.types
, ini = require("ini")
, editor = require("editor")
@@ -88,17 +89,16 @@ function edit (cb) {
if (key === "logstream") return arr
return arr.concat(
ini.stringify(obj)
- .replace(/\n$/m, '')
- .replace(/^/g, '; ')
- .replace(/\n/g, '\n; ')
- .split('\n'))
+ .replace(/\n$/m, "")
+ .replace(/^/g, "; ")
+ .replace(/\n/g, "\n; ")
+ .split("\n"))
}, []))
.concat([""])
.join(os.EOL)
- fs.writeFile
+ writeFileAtomic
( f
, data
- , "utf8"
, function (er) {
if (er) return cb(er)
editor(f, { editor: e }, cb)
diff --git a/deps/npm/node_modules/npmconf/npmconf.js b/deps/npm/lib/config/core.js
similarity index 64%
rename from deps/npm/node_modules/npmconf/npmconf.js
rename to deps/npm/lib/config/core.js
index a17705447a6..6c6112532fa 100644
--- a/deps/npm/node_modules/npmconf/npmconf.js
+++ b/deps/npm/lib/config/core.js
@@ -1,16 +1,15 @@
-var CC = require('config-chain').ConfigChain
-var inherits = require('inherits')
-var configDefs = require('./config-defs.js')
+var CC = require("config-chain").ConfigChain
+var inherits = require("inherits")
+var configDefs = require("./defaults.js")
var types = configDefs.types
-var once = require('once')
-var fs = require('fs')
-var path = require('path')
-var nopt = require('nopt')
-var ini = require('ini')
+var once = require("once")
+var fs = require("fs")
+var path = require("path")
+var nopt = require("nopt")
+var ini = require("ini")
var Octal = configDefs.Octal
-var mkdirp = require('mkdirp')
-var path = require('path')
+var mkdirp = require("mkdirp")
exports.load = load
exports.Conf = Conf
@@ -19,11 +18,11 @@ exports.rootConf = null
exports.usingBuiltin = false
exports.defs = configDefs
-Object.defineProperty(exports, 'defaults', { get: function () {
+Object.defineProperty(exports, "defaults", { get: function () {
return configDefs.defaults
}, enumerable: true })
-Object.defineProperty(exports, 'types', { get: function () {
+Object.defineProperty(exports, "types", { get: function () {
return configDefs.types
}, enumerable: true })
@@ -37,13 +36,13 @@ var myGid = process.env.SUDO_GID !== undefined
var loading = false
var loadCbs = []
-function load (cli_, builtin_, cb_) {
+function load () {
var cli, builtin, cb
for (var i = 0; i < arguments.length; i++)
switch (typeof arguments[i]) {
- case 'string': builtin = arguments[i]; break
- case 'object': cli = arguments[i]; break
- case 'function': cb = arguments[i]; break
+ case "string": builtin = arguments[i]; break
+ case "object": cli = arguments[i]; break
+ case "function": cb = arguments[i]; break
}
if (!cb)
@@ -86,13 +85,14 @@ function load (cli_, builtin_, cb_) {
exports.usingBuiltin = !!builtin
var rc = exports.rootConf = new Conf()
if (builtin)
- rc.addFile(builtin, 'builtin')
+ rc.addFile(builtin, "builtin")
else
- rc.add({}, 'builtin')
+ rc.add({}, "builtin")
- rc.on('load', function () {
+ rc.on("load", function () {
load_(builtin, rc, cli, cb)
})
+ rc.on("error", cb)
}
function load_(builtin, rc, cli, cb) {
@@ -100,7 +100,7 @@ function load_(builtin, rc, cli, cb) {
var conf = new Conf(rc)
conf.usingBuiltin = !!builtin
- conf.add(cli, 'cli')
+ conf.add(cli, "cli")
conf.addEnv()
conf.loadPrefix(function(er) {
@@ -123,24 +123,24 @@ function load_(builtin, rc, cli, cb) {
// the default or resolved userconfig value. npm will log a "verbose"
// message about this when it happens, but it is a rare enough edge case
// that we don't have to be super concerned about it.
- var projectConf = path.resolve(conf.localPrefix, '.npmrc')
- var defaultUserConfig = rc.get('userconfig')
- var resolvedUserConfig = conf.get('userconfig')
- if (!conf.get('global') &&
+ var projectConf = path.resolve(conf.localPrefix, ".npmrc")
+ var defaultUserConfig = rc.get("userconfig")
+ var resolvedUserConfig = conf.get("userconfig")
+ if (!conf.get("global") &&
projectConf !== defaultUserConfig &&
projectConf !== resolvedUserConfig) {
- conf.addFile(projectConf, 'project')
- conf.once('load', afterPrefix)
+ conf.addFile(projectConf, "project")
+ conf.once("load", afterPrefix)
} else {
- conf.add({}, 'project')
+ conf.add({}, "project")
afterPrefix()
}
})
function afterPrefix() {
- conf.addFile(conf.get('userconfig'), 'user')
- conf.once('error', cb)
- conf.once('load', afterUser)
+ conf.addFile(conf.get("userconfig"), "user")
+ conf.once("error", cb)
+ conf.once("load", afterUser)
}
function afterUser () {
@@ -149,18 +149,18 @@ function load_(builtin, rc, cli, cb) {
// Eg, `npm config get globalconfig --prefix ~/local` should
// return `~/local/etc/npmrc`
// annoying humans and their expectations!
- if (conf.get('prefix')) {
- var etc = path.resolve(conf.get('prefix'), 'etc')
- defaults.globalconfig = path.resolve(etc, 'npmrc')
- defaults.globalignorefile = path.resolve(etc, 'npmignore')
+ if (conf.get("prefix")) {
+ var etc = path.resolve(conf.get("prefix"), "etc")
+ defaults.globalconfig = path.resolve(etc, "npmrc")
+ defaults.globalignorefile = path.resolve(etc, "npmignore")
}
- conf.addFile(conf.get('globalconfig'), 'global')
+ conf.addFile(conf.get("globalconfig"), "global")
// move the builtin into the conf stack now.
conf.root = defaults
- conf.add(rc.shift(), 'builtin')
- conf.once('load', function () {
+ conf.add(rc.shift(), "builtin")
+ conf.once("load", function () {
conf.loadExtras(afterExtras)
})
}
@@ -172,7 +172,7 @@ function load_(builtin, rc, cli, cb) {
// warn about invalid bits.
validate(conf)
- var cafile = conf.get('cafile')
+ var cafile = conf.get("cafile")
if (cafile) {
return conf.loadCAFile(cafile, finalize)
@@ -181,7 +181,7 @@ function load_(builtin, rc, cli, cb) {
finalize()
}
- function finalize(er, cadata) {
+ function finalize(er) {
if (er) {
return cb(er)
}
@@ -212,11 +212,13 @@ function Conf (base) {
this.root = configDefs.defaults
}
-Conf.prototype.loadPrefix = require('./lib/load-prefix.js')
-Conf.prototype.loadCAFile = require('./lib/load-cafile.js')
-Conf.prototype.loadUid = require('./lib/load-uid.js')
-Conf.prototype.setUser = require('./lib/set-user.js')
-Conf.prototype.findPrefix = require('./lib/find-prefix.js')
+Conf.prototype.loadPrefix = require("./load-prefix.js")
+Conf.prototype.loadCAFile = require("./load-cafile.js")
+Conf.prototype.loadUid = require("./load-uid.js")
+Conf.prototype.setUser = require("./set-user.js")
+Conf.prototype.findPrefix = require("./find-prefix.js")
+Conf.prototype.getCredentialsByURI = require("./get-credentials-by-uri.js")
+Conf.prototype.setCredentialsByURI = require("./set-credentials-by-uri.js")
Conf.prototype.loadExtras = function(cb) {
this.setUser(function(er) {
@@ -234,17 +236,17 @@ Conf.prototype.loadExtras = function(cb) {
Conf.prototype.save = function (where, cb) {
var target = this.sources[where]
if (!target || !(target.path || target.source) || !target.data) {
- if (where !== 'builtin')
- var er = new Error('bad save target: '+where)
+ if (where !== "builtin")
+ var er = new Error("bad save target: " + where)
if (cb) {
process.nextTick(cb.bind(null, er))
return this
}
- return this.emit('error', er)
+ return this.emit("error", er)
}
if (target.source) {
- var pref = target.prefix || ''
+ var pref = target.prefix || ""
Object.keys(target.data).forEach(function (k) {
target.source[pref + k] = target.data[k]
})
@@ -252,30 +254,15 @@ Conf.prototype.save = function (where, cb) {
return this
}
- var data = target.data
-
- if (typeof data._password === 'string' &&
- typeof data.username === 'string') {
- var auth = data.username + ':' + data._password
- data = Object.keys(data).reduce(function (c, k) {
- if (k === 'username' || k === '_password')
- return c
- c[k] = data[k]
- return c
- }, { _auth: new Buffer(auth, 'utf8').toString('base64') })
- delete data.username
- delete data._password
- }
-
- data = ini.stringify(data)
+ var data = ini.stringify(target.data)
then = then.bind(this)
done = done.bind(this)
this._saving ++
- var mode = where === 'user' ? 0600 : 0666
+ var mode = where === "user" ? "0600" : "0666"
if (!data.trim()) {
- fs.unlink(target.path, function (er) {
+ fs.unlink(target.path, function () {
// ignore the possible error (e.g. the file doesn't exist)
done(null)
})
@@ -283,10 +270,10 @@ Conf.prototype.save = function (where, cb) {
mkdirp(path.dirname(target.path), function (er) {
if (er)
return then(er)
- fs.writeFile(target.path, data, 'utf8', function (er) {
+ fs.writeFile(target.path, data, "utf8", function (er) {
if (er)
return then(er)
- if (where === 'user' && myUid && myGid)
+ if (where === "user" && myUid && myGid)
fs.chown(target.path, +myUid, +myGid, then)
else
then()
@@ -303,12 +290,12 @@ Conf.prototype.save = function (where, cb) {
function done (er) {
if (er) {
if (cb) return cb(er)
- else return this.emit('error', er)
+ else return this.emit("error", er)
}
this._saving --
if (this._saving === 0) {
if (cb) cb()
- this.emit('save')
+ this.emit("save")
}
}
@@ -318,32 +305,31 @@ Conf.prototype.save = function (where, cb) {
Conf.prototype.addFile = function (file, name) {
name = name || file
var marker = {__source__:name}
- this.sources[name] = { path: file, type: 'ini' }
+ this.sources[name] = { path: file, type: "ini" }
this.push(marker)
this._await()
- fs.readFile(file, 'utf8', function (er, data) {
+ fs.readFile(file, "utf8", function (er, data) {
if (er) // just ignore missing files.
return this.add({}, marker)
- this.addString(data, file, 'ini', marker)
+ this.addString(data, file, "ini", marker)
}.bind(this))
return this
}
// always ini files.
Conf.prototype.parse = function (content, file) {
- return CC.prototype.parse.call(this, content, file, 'ini')
+ return CC.prototype.parse.call(this, content, file, "ini")
}
Conf.prototype.add = function (data, marker) {
- Object.keys(data).forEach(function (k) {
- data[k] = parseField(data[k], k)
- })
- if (Object.prototype.hasOwnProperty.call(data, '_auth')) {
- var auth = new Buffer(data._auth, 'base64').toString('utf8').split(':')
- var username = auth.shift()
- var password = auth.join(':')
- data.username = username
- data._password = password
+ try {
+ Object.keys(data).forEach(function (k) {
+ data[k] = parseField(data[k], k)
+ })
+ }
+ catch (e) {
+ this.emit("error", e)
+ return this
}
return CC.prototype.add.call(this, data, marker)
}
@@ -360,15 +346,15 @@ Conf.prototype.addEnv = function (env) {
// leave first char untouched, even if
// it is a "_" - convert all other to "-"
var p = k.toLowerCase()
- .replace(/^npm_config_/, '')
- .replace(/(?!^)_/g, '-')
+ .replace(/^npm_config_/, "")
+ .replace(/(?!^)_/g, "-")
conf[p] = env[k]
})
- return CC.prototype.addEnv.call(this, '', conf, 'env')
+ return CC.prototype.addEnv.call(this, "", conf, "env")
}
-function parseField (f, k, emptyIsFalse) {
- if (typeof f !== 'string' && !(f instanceof String))
+function parseField (f, k) {
+ if (typeof f !== "string" && !(f instanceof String))
return f
// type can be an array or single thing.
@@ -379,25 +365,31 @@ function parseField (f, k, emptyIsFalse) {
var isOctal = -1 !== typeList.indexOf(Octal)
var isNumber = isOctal || (-1 !== typeList.indexOf(Number))
- f = (''+f).trim()
+ f = (""+f).trim()
- if (f.match(/^".*"$/))
- f = JSON.parse(f)
+ if (f.match(/^".*"$/)) {
+ try {
+ f = JSON.parse(f)
+ }
+ catch (e) {
+ throw new Error("Failed parsing JSON config key " + k + ": " + f)
+ }
+ }
- if (isBool && !isString && f === '')
+ if (isBool && !isString && f === "")
return true
switch (f) {
- case 'true': return true
- case 'false': return false
- case 'null': return null
- case 'undefined': return undefined
+ case "true": return true
+ case "false": return false
+ case "null": return null
+ case "undefined": return undefined
}
f = envReplace(f)
if (isPath) {
- var homePattern = process.platform === 'win32' ? /^~(\/|\\)/ : /^~\//
+ var homePattern = process.platform === "win32" ? /^~(\/|\\)/ : /^~\//
if (f.match(homePattern) && process.env.HOME) {
f = path.resolve(process.env.HOME, f.substr(2))
}
@@ -411,23 +403,23 @@ function parseField (f, k, emptyIsFalse) {
}
function envReplace (f) {
- if (typeof f !== 'string' || !f) return f
+ if (typeof f !== "string" || !f) return f
// replace any ${ENV} values with the appropriate environ.
var envExpr = /(\\*)\$\{([^}]+)\}/g
- return f.replace(envExpr, function (orig, esc, name, i, s) {
+ return f.replace(envExpr, function (orig, esc, name) {
esc = esc.length && esc.length % 2
if (esc)
return orig
if (undefined === process.env[name])
- throw new Error('Failed to replace env in config: '+orig)
+ throw new Error("Failed to replace env in config: "+orig)
return process.env[name]
})
}
function validate (cl) {
// warn about invalid configs at every level.
- cl.list.forEach(function (conf, level) {
+ cl.list.forEach(function (conf) {
nopt.clean(conf, configDefs.types)
})
diff --git a/deps/npm/node_modules/npmconf/config-defs.js b/deps/npm/lib/config/defaults.js
similarity index 91%
rename from deps/npm/node_modules/npmconf/config-defs.js
rename to deps/npm/lib/config/defaults.js
index 31522fb6434..7bd672114de 100644
--- a/deps/npm/node_modules/npmconf/config-defs.js
+++ b/deps/npm/lib/config/defaults.js
@@ -16,7 +16,7 @@ try {
} catch (er) {
var util = require("util")
log = { warn: function (m) {
- console.warn(m + util.format.apply(util, [].slice.call(arguments, 1)))
+ console.warn(m + " " + util.format.apply(util, [].slice.call(arguments, 1)))
} }
}
@@ -40,6 +40,12 @@ function validateSemver (data, k, val) {
data[k] = semver.valid(val)
}
+function validateTag (data, k, val) {
+ val = ("" + val).trim()
+ if (!val || semver.validRange(val)) return false
+ data[k] = val
+}
+
function validateStream (data, k, val) {
if (!(val instanceof Stream)) return false
data[k] = val
@@ -49,6 +55,10 @@ nopt.typeDefs.semver = { type: semver, validate: validateSemver }
nopt.typeDefs.Octal = { type: Octal, validate: validateOctal }
nopt.typeDefs.Stream = { type: Stream, validate: validateStream }
+// Don't let --tag=1.2.3 ever be a thing
+var tag = {}
+nopt.typeDefs.tag = { type: tag, validate: validateTag }
+
nopt.invalidHandler = function (k, val, type) {
log.warn("invalid config", k + "=" + JSON.stringify(val))
@@ -58,6 +68,9 @@ nopt.invalidHandler = function (k, val, type) {
}
switch (type) {
+ case tag:
+ log.warn("invalid config", "Tag must not be a SemVer range")
+ break
case Octal:
log.warn("invalid config", "Must be octal number, starting with 0")
break
@@ -113,8 +126,8 @@ Object.defineProperty(exports, "defaults", {get: function () {
}
}
- return defaults =
- { "always-auth" : false
+ defaults = {
+ "always-auth" : false
, "bin-links" : true
, browser : null
@@ -137,7 +150,6 @@ Object.defineProperty(exports, "defaults", {get: function () {
, description : true
, dev : false
, editor : osenv.editor()
- , email: ""
, "engine-strict": false
, force : false
@@ -156,10 +168,11 @@ Object.defineProperty(exports, "defaults", {get: function () {
, heading: "npm"
, "ignore-scripts": false
, "init-module": path.resolve(home, ".npm-init.js")
- , "init.author.name" : ""
- , "init.author.email" : ""
- , "init.author.url" : ""
- , "init.license": "ISC"
+ , "init-author-name" : ""
+ , "init-author-email" : ""
+ , "init-author-url" : ""
+ , "init-version": "1.0.0"
+ , "init-license": "ISC"
, json: false
, key: null
, link: false
@@ -192,6 +205,7 @@ Object.defineProperty(exports, "defaults", {get: function () {
, "save-exact" : false
, "save-optional" : false
, "save-prefix": "^"
+ , scope : ""
, searchopts: ""
, searchexclude: null
, searchsort: "name"
@@ -210,7 +224,6 @@ Object.defineProperty(exports, "defaults", {get: function () {
|| process.getuid() !== 0
, usage : false
, user : process.platform === "win32" ? 0 : "nobody"
- , username : ""
, userconfig : path.resolve(home, ".npmrc")
, umask: process.umask ? process.umask() : parseInt("022", 8)
, version : false
@@ -218,7 +231,9 @@ Object.defineProperty(exports, "defaults", {get: function () {
, viewer: process.platform === "win32" ? "browser" : "man"
, _exit : true
- }
+ }
+
+ return defaults
}})
exports.types =
@@ -239,7 +254,6 @@ exports.types =
, description : Boolean
, dev : Boolean
, editor : String
- , email: [null, String]
, "engine-strict": Boolean
, force : Boolean
, "fetch-retries": Number
@@ -256,17 +270,18 @@ exports.types =
, "heading": String
, "ignore-scripts": Boolean
, "init-module": path
- , "init.author.name" : String
- , "init.author.email" : String
- , "init.author.url" : ["", url]
- , "init.license": String
+ , "init-author-name" : String
+ , "init-author-email" : String
+ , "init-author-url" : ["", url]
+ , "init-license": String
+ , "init-version": semver
, json: Boolean
, key: [null, String]
, link: Boolean
// local-address must be listed as an IP for a local network interface
// must be IPv4 due to node bug
, "local-address" : getLocalAddresses()
- , loglevel : ["silent","win","error","warn","http","info","verbose","silly"]
+ , loglevel : ["silent","error","warn","http","info","verbose","silly"]
, logstream : Stream
, long : Boolean
, message: String
@@ -288,6 +303,7 @@ exports.types =
, "save-exact" : Boolean
, "save-optional" : Boolean
, "save-prefix": String
+ , scope : String
, searchopts : String
, searchexclude: [null, String]
, searchsort: [ "name", "-name"
@@ -300,20 +316,18 @@ exports.types =
, "sign-git-tag": Boolean
, spin: ["always", Boolean]
, "strict-ssl": Boolean
- , tag : String
+ , tag : tag
, tmp : path
, unicode : Boolean
, "unsafe-perm" : Boolean
, usage : Boolean
, user : [Number, String]
- , username : String
, userconfig : path
, umask: Octal
, version : Boolean
, versions : Boolean
, viewer: String
, _exit : Boolean
- , _password: String
}
function getLocalAddresses() {
@@ -365,4 +379,5 @@ exports.shorthands =
, y : ["--yes"]
, n : ["--no-yes"]
, B : ["--save-bundle"]
+ , C : ["--prefix"]
}
diff --git a/deps/npm/node_modules/npmconf/lib/find-prefix.js b/deps/npm/lib/config/find-prefix.js
similarity index 100%
rename from deps/npm/node_modules/npmconf/lib/find-prefix.js
rename to deps/npm/lib/config/find-prefix.js
diff --git a/deps/npm/lib/config/get-credentials-by-uri.js b/deps/npm/lib/config/get-credentials-by-uri.js
new file mode 100644
index 00000000000..26a7f4317c6
--- /dev/null
+++ b/deps/npm/lib/config/get-credentials-by-uri.js
@@ -0,0 +1,73 @@
+var assert = require("assert")
+
+var toNerfDart = require("./nerf-dart.js")
+
+module.exports = getCredentialsByURI
+
+function getCredentialsByURI (uri) {
+ assert(uri && typeof uri === "string", "registry URL is required")
+ var nerfed = toNerfDart(uri)
+ var defnerf = toNerfDart(this.get("registry"))
+
+ // hidden class micro-optimization
+ var c = {
+ scope : nerfed,
+ token : undefined,
+ password : undefined,
+ username : undefined,
+ email : undefined,
+ auth : undefined,
+ alwaysAuth : undefined
+ }
+
+ if (this.get(nerfed + ":_authToken")) {
+ c.token = this.get(nerfed + ":_authToken")
+ // the bearer token is enough, don't confuse things
+ return c
+ }
+
+ // Handle the old-style _auth= style for the default
+ // registry, if set.
+ //
+ // XXX(isaacs): Remove when npm 1.4 is no longer relevant
+ var authDef = this.get("_auth")
+ var userDef = this.get("username")
+ var passDef = this.get("_password")
+ if (authDef && !(userDef && passDef)) {
+ authDef = new Buffer(authDef, "base64").toString()
+ authDef = authDef.split(":")
+ userDef = authDef.shift()
+ passDef = authDef.join(":")
+ }
+
+ if (this.get(nerfed + ":_password")) {
+ c.password = new Buffer(this.get(nerfed + ":_password"), "base64").toString("utf8")
+ } else if (nerfed === defnerf && passDef) {
+ c.password = passDef
+ }
+
+ if (this.get(nerfed + ":username")) {
+ c.username = this.get(nerfed + ":username")
+ } else if (nerfed === defnerf && userDef) {
+ c.username = userDef
+ }
+
+ if (this.get(nerfed + ":email")) {
+ c.email = this.get(nerfed + ":email")
+ } else if (this.get("email")) {
+ c.email = this.get("email")
+ }
+
+ if (this.get(nerfed + ":always-auth") !== undefined) {
+ var val = this.get(nerfed + ":always-auth")
+ c.alwaysAuth = val === "false" ? false : !!val
+ } else if (this.get("always-auth") !== undefined) {
+ c.alwaysAuth = this.get("always-auth")
+ }
+
+ if (c.username && c.password) {
+ c.auth = new Buffer(c.username + ":" + c.password).toString("base64")
+ }
+
+ return c
+}
diff --git a/deps/npm/node_modules/npmconf/lib/load-cafile.js b/deps/npm/lib/config/load-cafile.js
similarity index 72%
rename from deps/npm/node_modules/npmconf/lib/load-cafile.js
rename to deps/npm/lib/config/load-cafile.js
index b8c9fff2330..dc1ff9f03a9 100644
--- a/deps/npm/node_modules/npmconf/lib/load-cafile.js
+++ b/deps/npm/lib/config/load-cafile.js
@@ -1,18 +1,18 @@
module.exports = loadCAFile
-var fs = require('fs')
+var fs = require("fs")
function loadCAFile(cafilePath, cb) {
if (!cafilePath)
return process.nextTick(cb)
- fs.readFile(cafilePath, 'utf8', afterCARead.bind(this))
+ fs.readFile(cafilePath, "utf8", afterCARead.bind(this))
function afterCARead(er, cadata) {
if (er)
return cb(er)
- var delim = '-----END CERTIFICATE-----'
+ var delim = "-----END CERTIFICATE-----"
var output
output = cadata
@@ -24,8 +24,7 @@ function loadCAFile(cafilePath, cb) {
return xs.trimLeft() + delim
})
- this.set('ca', output)
+ this.set("ca", output)
cb(null)
}
-
}
diff --git a/deps/npm/node_modules/npmconf/lib/load-prefix.js b/deps/npm/lib/config/load-prefix.js
similarity index 89%
rename from deps/npm/node_modules/npmconf/lib/load-prefix.js
rename to deps/npm/lib/config/load-prefix.js
index bb39d9c98de..39d076fb7d4 100644
--- a/deps/npm/node_modules/npmconf/lib/load-prefix.js
+++ b/deps/npm/lib/config/load-prefix.js
@@ -1,7 +1,7 @@
module.exports = loadPrefix
var findPrefix = require("./find-prefix.js")
-var path = require('path')
+var path = require("path")
function loadPrefix (cb) {
var cli = this.list[0]
@@ -9,7 +9,7 @@ function loadPrefix (cb) {
Object.defineProperty(this, "prefix",
{ set : function (prefix) {
var g = this.get("global")
- this[g ? 'globalPrefix' : 'localPrefix'] = prefix
+ this[g ? "globalPrefix" : "localPrefix"] = prefix
}.bind(this)
, get : function () {
var g = this.get("global")
@@ -20,7 +20,7 @@ function loadPrefix (cb) {
Object.defineProperty(this, "globalPrefix",
{ set : function (prefix) {
- this.set('prefix', prefix)
+ this.set("prefix", prefix)
}.bind(this)
, get : function () {
return path.resolve(this.get("prefix"))
@@ -44,6 +44,6 @@ function loadPrefix (cb) {
findPrefix(process.cwd(), function (er, found) {
p = found
cb(er)
- }.bind(this))
+ })
}
}
diff --git a/deps/npm/node_modules/npmconf/lib/load-uid.js b/deps/npm/lib/config/load-uid.js
similarity index 100%
rename from deps/npm/node_modules/npmconf/lib/load-uid.js
rename to deps/npm/lib/config/load-uid.js
diff --git a/deps/npm/lib/config/nerf-dart.js b/deps/npm/lib/config/nerf-dart.js
new file mode 100644
index 00000000000..3b26a56c65f
--- /dev/null
+++ b/deps/npm/lib/config/nerf-dart.js
@@ -0,0 +1,21 @@
+var url = require("url")
+
+module.exports = toNerfDart
+
+/**
+ * Maps a URL to an identifier.
+ *
+ * Name courtesy schiffertronix media LLC, a New Jersey corporation
+ *
+ * @param {String} uri The URL to be nerfed.
+ *
+ * @returns {String} A nerfed URL.
+ */
+function toNerfDart(uri) {
+ var parsed = url.parse(uri)
+ parsed.pathname = "/"
+ delete parsed.protocol
+ delete parsed.auth
+
+ return url.format(parsed)
+}
diff --git a/deps/npm/lib/config/set-credentials-by-uri.js b/deps/npm/lib/config/set-credentials-by-uri.js
new file mode 100644
index 00000000000..31eab4479ed
--- /dev/null
+++ b/deps/npm/lib/config/set-credentials-by-uri.js
@@ -0,0 +1,42 @@
+var assert = require("assert")
+
+var toNerfDart = require("./nerf-dart.js")
+
+module.exports = setCredentialsByURI
+
+function setCredentialsByURI (uri, c) {
+ assert(uri && typeof uri === "string", "registry URL is required")
+ assert(c && typeof c === "object", "credentials are required")
+
+ var nerfed = toNerfDart(uri)
+
+ if (c.token) {
+ this.set(nerfed + ":_authToken", c.token, "user")
+ this.del(nerfed + ":_password", "user")
+ this.del(nerfed + ":username", "user")
+ this.del(nerfed + ":email", "user")
+ this.del(nerfed + ":always-auth", "user")
+ }
+ else if (c.username || c.password || c.email) {
+ assert(c.username, "must include username")
+ assert(c.password, "must include password")
+ assert(c.email, "must include email address")
+
+ this.del(nerfed + ":_authToken", "user")
+
+ var encoded = new Buffer(c.password, "utf8").toString("base64")
+ this.set(nerfed + ":_password", encoded, "user")
+ this.set(nerfed + ":username", c.username, "user")
+ this.set(nerfed + ":email", c.email, "user")
+
+ if (c.alwaysAuth !== undefined) {
+ this.set(nerfed + ":always-auth", c.alwaysAuth, "user")
+ }
+ else {
+ this.del(nerfed + ":always-auth", "user")
+ }
+ }
+ else {
+ throw new Error("No credentials to set.")
+ }
+}
diff --git a/deps/npm/node_modules/npmconf/lib/set-user.js b/deps/npm/lib/config/set-user.js
similarity index 63%
rename from deps/npm/node_modules/npmconf/lib/set-user.js
rename to deps/npm/lib/config/set-user.js
index cf29b1ace21..4c207a6792a 100644
--- a/deps/npm/node_modules/npmconf/lib/set-user.js
+++ b/deps/npm/lib/config/set-user.js
@@ -1,9 +1,9 @@
module.exports = setUser
-var Conf = require('../npmconf.js').Conf
-var assert = require('assert')
-var path = require('path')
-var fs = require('fs')
+var assert = require("assert")
+var path = require("path")
+var fs = require("fs")
+var mkdirp = require("mkdirp")
function setUser (cb) {
var defaultConf = this.root
@@ -19,8 +19,11 @@ function setUser (cb) {
}
var prefix = path.resolve(this.get("prefix"))
- fs.stat(prefix, function (er, st) {
- defaultConf.user = st && st.uid
- return cb(er)
+ mkdirp(prefix, function (er) {
+ if (er) return cb(er)
+ fs.stat(prefix, function (er, st) {
+ defaultConf.user = st && st.uid
+ return cb(er)
+ })
})
}
diff --git a/deps/npm/lib/dedupe.js b/deps/npm/lib/dedupe.js
index e6762e15bc5..74397d0cb95 100644
--- a/deps/npm/lib/dedupe.js
+++ b/deps/npm/lib/dedupe.js
@@ -7,7 +7,6 @@
// much better "put pkg X at folder Y" abstraction. Oh well,
// whatever. Perfect enemy of the good, and all that.
-var url = require("url")
var fs = require("fs")
var asyncMap = require("slide").asyncMap
var path = require("path")
@@ -16,6 +15,7 @@ var semver = require("semver")
var rm = require("./utils/gently-rm.js")
var log = require("npmlog")
var npm = require("./npm.js")
+var mapToRegistry = require("./utils/map-to-registry.js")
module.exports = dedupe
@@ -61,7 +61,7 @@ function dedupe_ (dir, filter, unavoidable, dryrun, silent, cb) {
Object.keys(obj.children).forEach(function (k) {
U(obj.children[k])
})
- })
+ })(data)
// then collect them up and figure out who needs them
;(function C (obj) {
@@ -240,13 +240,19 @@ function findVersions (npm, summary, cb) {
var versions = data.versions
var ranges = data.ranges
- var uri = url.resolve(npm.config.get("registry"), name)
- npm.registry.get(uri, null, function (er, data) {
+ mapToRegistry(name, npm.config, function (er, uri) {
+ if (er) return cb(er)
+
+ npm.registry.get(uri, null, next)
+ })
+
+ function next (er, data) {
var regVersions = er ? [] : Object.keys(data.versions)
var locMatch = bestMatch(versions, ranges)
- var regMatch;
var tag = npm.config.get("tag")
var distTag = data["dist-tags"] && data["dist-tags"][tag]
+
+ var regMatch
if (distTag && data.versions[distTag] && matches(distTag, ranges)) {
regMatch = distTag
} else {
@@ -254,7 +260,7 @@ function findVersions (npm, summary, cb) {
}
cb(null, [[name, has, loc, locMatch, regMatch, locs]])
- })
+ }
}, cb)
}
diff --git a/deps/npm/lib/deprecate.js b/deps/npm/lib/deprecate.js
index 175b69ceb13..17dd4eab0c1 100644
--- a/deps/npm/lib/deprecate.js
+++ b/deps/npm/lib/deprecate.js
@@ -1,5 +1,6 @@
-var url = require("url")
- , npm = require("./npm.js")
+var npm = require("./npm.js")
+ , mapToRegistry = require("./utils/map-to-registry.js")
+ , npa = require("npm-package-arg")
module.exports = deprecate
@@ -8,16 +9,20 @@ deprecate.usage = "npm deprecate [@] "
deprecate.completion = function (opts, cb) {
// first, get a list of remote packages this user owns.
// once we have a user account, then don't complete anything.
- var un = npm.config.get("username")
- if (!npm.config.get("username")) return cb()
if (opts.conf.argv.remain.length > 2) return cb()
// get the list of packages by user
- var path = "/-/by-user/"+encodeURIComponent(un)
- , uri = url.resolve(npm.config.get("registry"), path)
- npm.registry.get(uri, { timeout : 60000 }, function (er, list) {
- if (er) return cb()
- console.error(list)
- return cb(null, list[un])
+ var path = "/-/by-user/"
+ mapToRegistry(path, npm.config, function (er, uri) {
+ if (er) return cb(er)
+
+ var c = npm.config.getCredentialsByURI(uri)
+ if (!(c && c.username)) return cb()
+
+ npm.registry.get(uri + c.username, { timeout : 60000 }, function (er, list) {
+ if (er) return cb()
+ console.error(list)
+ return cb(null, list[c.username])
+ })
})
}
@@ -25,11 +30,15 @@ function deprecate (args, cb) {
var pkg = args[0]
, msg = args[1]
if (msg === undefined) return cb("Usage: " + deprecate.usage)
+
// fetch the data and make sure it exists.
- pkg = pkg.split(/@/)
- var name = pkg.shift()
- , ver = pkg.join("@")
- , uri = url.resolve(npm.config.get("registry"), name)
+ var p = npa(pkg)
+
+ mapToRegistry(p.name, npm.config, next)
+
+ function next (er, uri) {
+ if (er) return cb(er)
- npm.registry.deprecate(uri, ver, msg, cb)
+ npm.registry.deprecate(uri, p.spec, msg, cb)
+ }
}
diff --git a/deps/npm/lib/docs.js b/deps/npm/lib/docs.js
index 77073fbb9c1..dead3f7551c 100644
--- a/deps/npm/lib/docs.js
+++ b/deps/npm/lib/docs.js
@@ -5,18 +5,21 @@ docs.usage += "\n"
docs.usage += "npm docs ."
docs.completion = function (opts, cb) {
- var uri = url_.resolve(npm.config.get("registry"), "/-/short")
- registry.get(uri, { timeout : 60000 }, function (er, list) {
- return cb(null, list || [])
+ mapToRegistry("/-/short", npm.config, function (er, uri) {
+ if (er) return cb(er)
+
+ registry.get(uri, { timeout : 60000 }, function (er, list) {
+ return cb(null, list || [])
+ })
})
}
-var url_ = require("url")
- , npm = require("./npm.js")
+var npm = require("./npm.js")
, registry = npm.registry
, opener = require("opener")
, path = require("path")
, log = require("npmlog")
+ , mapToRegistry = require("./utils/map-to-registry.js")
function url (json) {
return json.homepage ? json.homepage : "https://npmjs.org/package/" + json.name
@@ -38,7 +41,7 @@ function docs (args, cb) {
function getDoc (project, cb) {
project = project || '.'
- var package = path.resolve(process.cwd(), "package.json")
+ var package = path.resolve(npm.localPrefix, "package.json")
if (project === '.' || project === './') {
var json
@@ -54,8 +57,13 @@ function getDoc (project, cb) {
return opener(url(json), { command: npm.config.get("browser") }, cb)
}
- var uri = url_.resolve(npm.config.get("registry"), project + "/latest")
- registry.get(uri, { timeout : 3600 }, function (er, json) {
+ mapToRegistry(project, npm.config, function (er, uri) {
+ if (er) return cb(er)
+
+ registry.get(uri + "/latest", { timeout : 3600 }, next)
+ })
+
+ function next (er, json) {
var github = "https://github.com/" + project + "#readme"
if (er) {
@@ -64,5 +72,5 @@ function getDoc (project, cb) {
}
return opener(url(json), { command: npm.config.get("browser") }, cb)
- })
+ }
}
diff --git a/deps/npm/lib/explore.js b/deps/npm/lib/explore.js
index 767d9a876a2..e87e839354b 100644
--- a/deps/npm/lib/explore.js
+++ b/deps/npm/lib/explore.js
@@ -27,7 +27,7 @@ function explore (args, cb) {
"Type 'exit' or ^D when finished\n")
npm.spinner.stop()
- var shell = spawn(sh, args, { cwd: cwd, customFds: [0, 1, 2] })
+ var shell = spawn(sh, args, { cwd: cwd, stdio: "inherit" })
shell.on("close", function (er) {
// only fail if non-interactive.
if (!args.length) return cb()
diff --git a/deps/npm/lib/help.js b/deps/npm/lib/help.js
index 8f54d69ded7..747bd5020da 100644
--- a/deps/npm/lib/help.js
+++ b/deps/npm/lib/help.js
@@ -31,7 +31,7 @@ function help (args, cb) {
// npm help : show basic usage
if (!section) {
- var valid = argv[0] === 'help' ? 0 : 1
+ var valid = argv[0] === "help" ? 0 : 1
return npmUsage(valid, cb)
}
@@ -111,7 +111,7 @@ function viewMan (man, cb) {
switch (viewer) {
case "woman":
var a = ["-e", "(woman-find-file \"" + man + "\")"]
- conf = { env: env, customFds: [ 0, 1, 2] }
+ conf = { env: env, stdio: "inherit" }
var woman = spawn("emacsclient", a, conf)
woman.on("close", cb)
break
@@ -121,7 +121,7 @@ function viewMan (man, cb) {
break
default:
- conf = { env: env, customFds: [ 0, 1, 2] }
+ conf = { env: env, stdio: "inherit" }
var manProcess = spawn("man", [num, section], conf)
manProcess.on("close", cb)
break
@@ -153,8 +153,8 @@ function htmlMan (man) {
function npmUsage (valid, cb) {
npm.config.set("loglevel", "silent")
log.level = "silent"
- console.log
- ( ["\nUsage: npm "
+ console.log(
+ [ "\nUsage: npm "
, ""
, "where is one of:"
, npm.config.get("long") ? usages()
@@ -196,7 +196,7 @@ function usages () {
function wrap (arr) {
- var out = ['']
+ var out = [""]
, l = 0
, line
@@ -209,9 +209,9 @@ function wrap (arr) {
arr.sort(function (a,b) { return a --save` afterwards to install a package and"
- ,"save it as a dependency in the package.json file."
- ,""
- ,"Press ^C at any time to quit."
- ].join("\n"))
-
+ var initFile = npm.config.get("init-module")
+ if (!initJson.yes(npm.config)) {
+ console.log(
+ ["This utility will walk you through creating a package.json file."
+ ,"It only covers the most common items, and tries to guess sane defaults."
+ ,""
+ ,"See `npm help json` for definitive documentation on these fields"
+ ,"and exactly what they do."
+ ,""
+ ,"Use `npm install --save` afterwards to install a package and"
+ ,"save it as a dependency in the package.json file."
+ ,""
+ ,"Press ^C at any time to quit."
+ ].join("\n"))
+ }
initJson(dir, initFile, npm.config, function (er, data) {
log.resume()
- log.silly('package data', data)
- log.info('init', 'written successfully')
- if (er && er.message === 'canceled') {
- log.warn('init', 'canceled')
+ log.silly("package data", data)
+ log.info("init", "written successfully")
+ if (er && er.message === "canceled") {
+ log.warn("init", "canceled")
return cb(null, data)
}
cb(er, data)
diff --git a/deps/npm/lib/install.js b/deps/npm/lib/install.js
index 9d2c2cfa279..e539307aff3 100644
--- a/deps/npm/lib/install.js
+++ b/deps/npm/lib/install.js
@@ -34,28 +34,34 @@ install.completion = function (opts, cb) {
// if it starts with https?://, then just give up, because it's a url
// for now, not yet implemented.
var registry = npm.registry
- , uri = url.resolve(npm.config.get("registry"), "-/short")
- registry.get(uri, null, function (er, pkgs) {
- if (er) return cb()
- if (!opts.partialWord) return cb(null, pkgs)
-
- var name = opts.partialWord.split("@").shift()
- pkgs = pkgs.filter(function (p) {
- return p.indexOf(name) === 0
- })
-
- if (pkgs.length !== 1 && opts.partialWord === name) {
- return cb(null, pkgs)
- }
+ mapToRegistry("-/short", npm.config, function (er, uri) {
+ if (er) return cb(er)
- uri = url.resolve(npm.config.get("registry"), pkgs[0])
- registry.get(uri, null, function (er, d) {
+ registry.get(uri, null, function (er, pkgs) {
if (er) return cb()
- return cb(null, Object.keys(d["dist-tags"] || {})
- .concat(Object.keys(d.versions || {}))
- .map(function (t) {
- return pkgs[0] + "@" + t
- }))
+ if (!opts.partialWord) return cb(null, pkgs)
+
+ var name = npa(opts.partialWord).name
+ pkgs = pkgs.filter(function (p) {
+ return p.indexOf(name) === 0
+ })
+
+ if (pkgs.length !== 1 && opts.partialWord === name) {
+ return cb(null, pkgs)
+ }
+
+ mapToRegistry(pkgs[0], npm.config, function (er, uri) {
+ if (er) return cb(er)
+
+ registry.get(uri, null, function (er, d) {
+ if (er) return cb()
+ return cb(null, Object.keys(d["dist-tags"] || {})
+ .concat(Object.keys(d.versions || {}))
+ .map(function (t) {
+ return pkgs[0] + "@" + t
+ }))
+ })
+ })
})
})
}
@@ -67,6 +73,7 @@ var npm = require("./npm.js")
, log = require("npmlog")
, path = require("path")
, fs = require("graceful-fs")
+ , writeFileAtomic = require("write-file-atomic")
, cache = require("./cache.js")
, asyncMap = require("slide").asyncMap
, chain = require("slide").chain
@@ -74,9 +81,14 @@ var npm = require("./npm.js")
, mkdir = require("mkdirp")
, lifecycle = require("./utils/lifecycle.js")
, archy = require("archy")
- , isGitUrl = require("./utils/is-git-url.js")
, npmInstallChecks = require("npm-install-checks")
, sortedObject = require("sorted-object")
+ , mapToRegistry = require("./utils/map-to-registry.js")
+ , npa = require("npm-package-arg")
+ , inflight = require("inflight")
+ , locker = require("./utils/locker.js")
+ , lock = locker.lock
+ , unlock = locker.unlock
function install (args, cb_) {
var hasArguments = !!args.length
@@ -112,7 +124,7 @@ function install (args, cb_) {
where = args
args = [].concat(cb_) // pass in [] to do default dep-install
cb_ = arguments[2]
- log.verbose("install", "where,what", [where, args])
+ log.verbose("install", "where, what", [where, args])
}
if (!npm.config.get("global")) {
@@ -136,6 +148,22 @@ function install (args, cb_) {
}
var deps = Object.keys(data.dependencies || {})
log.verbose("install", "where, deps", [where, deps])
+
+ // FIXME: Install peerDependencies as direct dependencies, but only at
+ // the top level. Should only last until peerDependencies are nerfed to
+ // no longer implicitly install themselves.
+ var peers = []
+ Object.keys(data.peerDependencies || {}).forEach(function (dep) {
+ if (!data.dependencies[dep]) {
+ log.verbose(
+ "install",
+ "peerDependency", dep, "wasn't going to be installed; adding"
+ )
+ peers.push(dep)
+ }
+ })
+ log.verbose("install", "where, peers", [where, peers])
+
var context = { family: {}
, ancestors: {}
, explicit: false
@@ -153,10 +181,12 @@ function install (args, cb_) {
installManyTop(deps.map(function (dep) {
var target = data.dependencies[dep]
- target = dep + "@" + target
- return target
- }), where, context, function(er, results) {
- if (er) return cb(er, results)
+ return dep + "@" + target
+ }).concat(peers.map(function (dep) {
+ var target = data.peerDependencies[dep]
+ return dep + "@" + target
+ })), where, context, function(er, results) {
+ if (er || npm.config.get("production")) return cb(er, results)
lifecycle(data, "prepublish", where, function(er) {
return cb(er, results)
})
@@ -198,7 +228,7 @@ function findPeerInvalid (where, cb) {
function findPeerInvalid_ (packageMap, fpiList) {
if (fpiList.indexOf(packageMap) !== -1)
- return
+ return undefined
fpiList.push(packageMap)
@@ -206,7 +236,7 @@ function findPeerInvalid_ (packageMap, fpiList) {
var pkg = packageMap[packageName]
if (pkg.peerInvalid) {
- var peersDepending = {};
+ var peersDepending = {}
for (var peerName in packageMap) {
var peer = packageMap[peerName]
if (peer.peerDependencies && peer.peerDependencies[packageName]) {
@@ -253,7 +283,13 @@ function readDependencies (context, where, opts, cb) {
if (opts && opts.dev) {
if (!data.dependencies) data.dependencies = {}
Object.keys(data.devDependencies || {}).forEach(function (k) {
- data.dependencies[k] = data.devDependencies[k]
+ if (data.dependencies[k]) {
+ log.warn("package.json", "Dependency '%s' exists in both dependencies " +
+ "and devDependencies, using '%s@%s' from dependencies",
+ k, k, data.dependencies[k])
+ } else {
+ data.dependencies[k] = data.devDependencies[k]
+ }
})
}
@@ -285,11 +321,9 @@ function readDependencies (context, where, opts, cb) {
var wrapfile = path.resolve(where, "npm-shrinkwrap.json")
fs.readFile(wrapfile, "utf8", function (er, wrapjson) {
- if (er) {
- log.verbose("readDependencies", "using package.json deps")
- return cb(null, data, null)
- }
+ if (er) return cb(null, data, null)
+ log.verbose("readDependencies", "npm-shrinkwrap.json is overriding dependencies")
var newwrap
try {
newwrap = JSON.parse(wrapjson)
@@ -338,21 +372,33 @@ function save (where, installed, tree, pretty, hasArguments, cb) {
return cb(null, installed, tree, pretty)
}
- var saveBundle = npm.config.get('save-bundle')
- var savePrefix = npm.config.get('save-prefix') || "^";
+ var saveBundle = npm.config.get("save-bundle")
+ var savePrefix = npm.config.get("save-prefix")
// each item in the tree is a top-level thing that should be saved
// to the package.json file.
// The relevant tree shape is { : {what:} }
var saveTarget = path.resolve(where, "package.json")
- , things = Object.keys(tree).map(function (k) {
- // if "what" was a url, then save that instead.
- var t = tree[k]
- , u = url.parse(t.from)
- , w = t.what.split("@")
- if (u && u.protocol) w[1] = t.from
- return w
- }).reduce(function (set, k) {
+
+ asyncMap(Object.keys(tree), function (k, cb) {
+ // if "what" was a url, then save that instead.
+ var t = tree[k]
+ , u = url.parse(t.from)
+ , a = npa(t.what)
+ , w = [a.name, a.spec]
+
+
+ fs.stat(t.from, function (er){
+ if (!er) {
+ w[1] = "file:" + t.from
+ } else if (u && u.protocol) {
+ w[1] = t.from
+ }
+ cb(null, [w])
+ })
+ }
+ , function (er, arr) {
+ var things = arr.reduce(function (set, k) {
var rangeDescriptor = semver.valid(k[1], true) &&
semver.gte(k[1], "0.1.0", true) &&
!npm.config.get("save-exact")
@@ -361,47 +407,49 @@ function save (where, installed, tree, pretty, hasArguments, cb) {
return set
}, {})
- // don't use readJson, because we don't want to do all the other
- // tricky npm-specific stuff that's in there.
- fs.readFile(saveTarget, function (er, data) {
- // ignore errors here, just don't save it.
- try {
- data = JSON.parse(data.toString("utf8"))
- } catch (ex) {
- er = ex
- }
- if (er) {
- return cb(null, installed, tree, pretty)
- }
+ // don't use readJson, because we don't want to do all the other
+ // tricky npm-specific stuff that's in there.
+ fs.readFile(saveTarget, function (er, data) {
+ // ignore errors here, just don't save it.
+ try {
+ data = JSON.parse(data.toString("utf8"))
+ } catch (ex) {
+ er = ex
+ }
- var deps = npm.config.get("save-optional") ? "optionalDependencies"
- : npm.config.get("save-dev") ? "devDependencies"
- : "dependencies"
+ if (er) {
+ return cb(null, installed, tree, pretty)
+ }
- if (saveBundle) {
- var bundle = data.bundleDependencies || data.bundledDependencies
- delete data.bundledDependencies
- if (!Array.isArray(bundle)) bundle = []
- data.bundleDependencies = bundle.sort()
- }
+ var deps = npm.config.get("save-optional") ? "optionalDependencies"
+ : npm.config.get("save-dev") ? "devDependencies"
+ : "dependencies"
- log.verbose('saving', things)
- data[deps] = data[deps] || {}
- Object.keys(things).forEach(function (t) {
- data[deps][t] = things[t]
if (saveBundle) {
- var i = bundle.indexOf(t)
- if (i === -1) bundle.push(t)
+ var bundle = data.bundleDependencies || data.bundledDependencies
+ delete data.bundledDependencies
+ if (!Array.isArray(bundle)) bundle = []
data.bundleDependencies = bundle.sort()
}
- })
- data[deps] = sortedObject(data[deps])
+ log.verbose("saving", things)
+ data[deps] = data[deps] || {}
+ Object.keys(things).forEach(function (t) {
+ data[deps][t] = things[t]
+ if (saveBundle) {
+ var i = bundle.indexOf(t)
+ if (i === -1) bundle.push(t)
+ data.bundleDependencies = bundle.sort()
+ }
+ })
+
+ data[deps] = sortedObject(data[deps])
- data = JSON.stringify(data, null, 2) + "\n"
- fs.writeFile(saveTarget, data, function (er) {
- cb(er, installed, tree, pretty)
+ data = JSON.stringify(data, null, 2) + "\n"
+ writeFileAtomic(saveTarget, data, function (er) {
+ cb(er, installed, tree, pretty)
+ })
})
})
}
@@ -412,22 +460,22 @@ function save (where, installed, tree, pretty, hasArguments, cb) {
// that the submodules are not immediately require()able.
// TODO: Show the complete tree, ls-style, but only if --long is provided
function prettify (tree, installed) {
- if (npm.config.get("json")) {
- function red (set, kv) {
- set[kv[0]] = kv[1]
- return set
- }
+ function red (set, kv) {
+ set[kv[0]] = kv[1]
+ return set
+ }
+ if (npm.config.get("json")) {
tree = Object.keys(tree).map(function (p) {
if (!tree[p]) return null
- var what = tree[p].what.split("@")
- , name = what.shift()
- , version = what.join("@")
+ var what = npa(tree[p].what)
+ , name = what.name
+ , version = what.spec
, o = { name: name, version: version, from: tree[p].from }
o.dependencies = tree[p].children.map(function P (dep) {
- var what = dep.what.split("@")
- , name = what.shift()
- , version = what.join("@")
+ var what = npa(dep.what)
+ , name = what.name
+ , version = what.spec
, o = { version: version, from: dep.from }
o.dependencies = dep.children.map(P).reduce(red, {})
return [name, o]
@@ -530,30 +578,58 @@ function installManyTop_ (what, where, context, cb) {
fs.readdir(nm, function (er, pkgs) {
if (er) return installMany(what, where, context, cb)
- pkgs = pkgs.filter(function (p) {
+
+ var scopes = [], unscoped = []
+ pkgs.filter(function (p) {
return !p.match(/^[\._-]/)
+ }).forEach(function (p) {
+ // @names deserve deeper investigation
+ if (p[0] === "@") {
+ scopes.push(p)
+ }
+ else {
+ unscoped.push(p)
+ }
})
- asyncMap(pkgs.map(function (p) {
- return path.resolve(nm, p, "package.json")
- }), function (jsonfile, cb) {
- readJson(jsonfile, log.warn, function (er, data) {
- if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er)
- if (er) return cb(null, [])
- return cb(null, [[data.name, data.version]])
- })
- }, function (er, packages) {
- // if there's nothing in node_modules, then don't freak out.
- if (er) packages = []
- // add all the existing packages to the family list.
- // however, do not add to the ancestors list.
- packages.forEach(function (p) {
- context.family[p[0]] = p[1]
+
+ maybeScoped(scopes, nm, function (er, scoped) {
+ if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er)
+ // recombine unscoped with @scope/package packages
+ asyncMap(unscoped.concat(scoped).map(function (p) {
+ return path.resolve(nm, p, "package.json")
+ }), function (jsonfile, cb) {
+ readJson(jsonfile, log.warn, function (er, data) {
+ if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er)
+ if (er) return cb(null, [])
+ cb(null, [[data.name, data.version]])
+ })
+ }, function (er, packages) {
+ // if there's nothing in node_modules, then don't freak out.
+ if (er) packages = []
+ // add all the existing packages to the family list.
+ // however, do not add to the ancestors list.
+ packages.forEach(function (p) {
+ context.family[p[0]] = p[1]
+ })
+ installMany(what, where, context, cb)
})
- return installMany(what, where, context, cb)
})
})
}
+function maybeScoped (scopes, where, cb) {
+ // find packages in scopes
+ asyncMap(scopes, function (scope, cb) {
+ fs.readdir(path.resolve(where, scope), function (er, scoped) {
+ if (er) return cb(er)
+ var paths = scoped.map(function (p) {
+ return path.join(scope, p)
+ })
+ cb(null, paths)
+ })
+ }, cb)
+}
+
function installMany (what, where, context, cb) {
// readDependencies takes care of figuring out whether the list of
// dependencies we'll iterate below comes from an existing shrinkwrap from a
@@ -593,7 +669,7 @@ function installMany (what, where, context, cb) {
targets.forEach(function (t) {
newPrev[t.name] = t.version
})
- log.silly("resolved", targets)
+ log.silly("install resolved", targets)
targets.filter(function (t) { return t }).forEach(function (t) {
log.info("install", "%s into %s", t._id, where)
})
@@ -615,60 +691,69 @@ function installMany (what, where, context, cb) {
}
function targetResolver (where, context, deps) {
- var alreadyInstalledManually = context.explicit ? [] : null
+ var alreadyInstalledManually = []
+ , resolveLeft = 0
, nm = path.resolve(where, "node_modules")
, parent = context.parent
, wrap = context.wrap
- if (!context.explicit) fs.readdir(nm, function (er, inst) {
- if (er) return alreadyInstalledManually = []
+ if (!context.explicit) readdir(nm)
- // don't even mess with non-package looking things
- inst = inst.filter(function (p) {
- return !p.match(/^[\._-]/)
- })
+ function readdir(name) {
+ resolveLeft++
+ fs.readdir(name, function (er, inst) {
+ if (er) return resolveLeft--
- asyncMap(inst, function (pkg, cb) {
- readJson(path.resolve(nm, pkg, "package.json"), log.warn, function (er, d) {
- if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er)
- // error means it's not a package, most likely.
- if (er) return cb(null, [])
-
- // if it's a bundled dep, then assume that anything there is valid.
- // otherwise, make sure that it's a semver match with what we want.
- var bd = parent.bundleDependencies
- if (bd && bd.indexOf(d.name) !== -1 ||
- semver.satisfies(d.version, deps[d.name] || "*", true) ||
- deps[d.name] === d._resolved) {
- return cb(null, d.name)
- }
+ // don't even mess with non-package looking things
+ inst = inst.filter(function (p) {
+ if (!p.match(/^[@\._-]/)) return true
+ // scoped packages
+ readdir(path.join(name, p))
+ })
- // see if the package had been previously linked
- fs.lstat(path.resolve(nm, pkg), function(err, s) {
- if (err) return cb(null, [])
- if (s.isSymbolicLink()) {
+ asyncMap(inst, function (pkg, cb) {
+ readJson(path.resolve(name, pkg, "package.json"), log.warn, function (er, d) {
+ if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er)
+ // error means it's not a package, most likely.
+ if (er) return cb(null, [])
+
+ // if it's a bundled dep, then assume that anything there is valid.
+ // otherwise, make sure that it's a semver match with what we want.
+ var bd = parent.bundleDependencies
+ if (bd && bd.indexOf(d.name) !== -1 ||
+ semver.satisfies(d.version, deps[d.name] || "*", true) ||
+ deps[d.name] === d._resolved) {
return cb(null, d.name)
}
- // something is there, but it's not satisfactory. Clobber it.
- return cb(null, [])
+ // see if the package had been previously linked
+ fs.lstat(path.resolve(nm, pkg), function(err, s) {
+ if (err) return cb(null, [])
+ if (s.isSymbolicLink()) {
+ return cb(null, d.name)
+ }
+
+ // something is there, but it's not satisfactory. Clobber it.
+ return cb(null, [])
+ })
})
+ }, function (er, inst) {
+ // this is the list of things that are valid and should be ignored.
+ alreadyInstalledManually = alreadyInstalledManually.concat(inst)
+ resolveLeft--
})
- }, function (er, inst) {
- // this is the list of things that are valid and should be ignored.
- alreadyInstalledManually = inst
})
- })
+ }
var to = 0
return function resolver (what, cb) {
- if (!alreadyInstalledManually) return setTimeout(function () {
+ if (resolveLeft) return setTimeout(function () {
resolver(what, cb)
}, to++)
// now we know what's been installed here manually,
// or tampered with in some way that npm doesn't want to overwrite.
- if (alreadyInstalledManually.indexOf(what.split("@").shift()) !== -1) {
+ if (alreadyInstalledManually.indexOf(npa(what).name) !== -1) {
log.verbose("already installed", "skipping %s %s", what, where)
return cb(null, [])
}
@@ -692,7 +777,7 @@ function targetResolver (where, context, deps) {
}
if (wrap) {
- var name = what.split(/@/).shift()
+ var name = npa(what).name
if (wrap[name]) {
var wrapTarget = readWrap(wrap[name])
what = name + "@" + wrapTarget
@@ -709,19 +794,16 @@ function targetResolver (where, context, deps) {
// already has a matching copy.
// If it's not a git repo, and the parent already has that pkg, then
// we can skip installing it again.
- cache.add(what, null, false, function (er, data) {
+ var pkgroot = path.resolve(npm.prefix, (parent && parent._from) || "")
+ cache.add(what, null, pkgroot, false, function (er, data) {
if (er && parent && parent.optionalDependencies &&
- parent.optionalDependencies.hasOwnProperty(what.split("@")[0])) {
+ parent.optionalDependencies.hasOwnProperty(npa(what).name)) {
log.warn("optional dep failed, continuing", what)
log.verbose("optional dep failed, continuing", [what, er])
return cb(null, [])
}
- var isGit = false
- , maybeGit = what.split("@").slice(1).join()
-
- if (maybeGit)
- isGit = isGitUrl(url.parse(maybeGit))
+ var isGit = npa(what).type === "git"
if (!er &&
data &&
@@ -733,6 +815,7 @@ function targetResolver (where, context, deps) {
return cb(null, [])
}
+
if (data && !data._from) data._from = what
if (er && parent && parent.name) er.parent = parent.name
return cb(er, data || [])
@@ -771,6 +854,13 @@ function localLink (target, where, context, cb) {
, parent = context.parent
readJson(jsonFile, log.warn, function (er, data) {
+ function thenLink () {
+ npm.commands.link([target.name], function (er, d) {
+ log.silly("localLink", "back from link", [er, d])
+ cb(er, [resultList(target, where, parent && parent._id)])
+ })
+ }
+
if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er)
if (er || data._id === target._id) {
if (er) {
@@ -781,14 +871,6 @@ function localLink (target, where, context, cb) {
thenLink()
})
} else thenLink()
-
- function thenLink () {
- npm.commands.link([target.name], function (er, d) {
- log.silly("localLink", "back from link", [er, d])
- cb(er, [resultList(target, where, parent && parent._id)])
- })
- }
-
} else {
log.verbose("localLink", "install locally (no link)", target._id)
installOne_(target, where, context, cb)
@@ -819,15 +901,9 @@ function resultList (target, where, parentId) {
, target._from ]
}
-// name => install locations
-var installOnesInProgress = Object.create(null)
+var installed = Object.create(null)
-function isIncompatibleInstallOneInProgress(target, where) {
- return target.name in installOnesInProgress &&
- installOnesInProgress[target.name].indexOf(where) !== -1
-}
-
-function installOne_ (target, where, context, cb) {
+function installOne_ (target, where, context, cb_) {
var nm = path.resolve(where, "node_modules")
, targetFolder = path.resolve(nm, target.name)
, prettyWhere = path.relative(process.cwd(), where)
@@ -835,37 +911,55 @@ function installOne_ (target, where, context, cb) {
if (prettyWhere === ".") prettyWhere = null
- if (isIncompatibleInstallOneInProgress(target, where)) {
- // just call back, with no error. the error will be detected in the
- // final check for peer-invalid dependencies
- return cb()
+ cb_ = inflight(target.name + ":" + where, cb_)
+ if (!cb_) return log.verbose(
+ "installOne",
+ "of", target.name,
+ "to", where,
+ "already in flight; waiting"
+ )
+ else log.verbose(
+ "installOne",
+ "of", target.name,
+ "to", where,
+ "not in flight; installing"
+ )
+
+ function cb(er, data) {
+ unlock(nm, target.name, function () { cb_(er, data) })
}
- if (!(target.name in installOnesInProgress)) {
- installOnesInProgress[target.name] = []
- }
- installOnesInProgress[target.name].push(where)
- var indexOfIOIP = installOnesInProgress[target.name].length - 1
- , force = npm.config.get("force")
- , nodeVersion = npm.config.get("node-version")
- , strict = npm.config.get("engine-strict")
- , c = npmInstallChecks
-
- chain
- ( [ [c.checkEngine, target, npm.version, nodeVersion, force, strict]
- , [c.checkPlatform, target, force]
- , [c.checkCycle, target, context.ancestors]
- , [c.checkGit, targetFolder]
- , [write, target, targetFolder, context] ]
- , function (er, d) {
- installOnesInProgress[target.name].splice(indexOfIOIP, 1)
+ lock(nm, target.name, function (er) {
+ if (er) return cb(er)
- if (er) return cb(er)
+ if (targetFolder in installed) {
+ log.error("install", "trying to install", target.version, "to", targetFolder)
+ log.error("install", "but already installed versions", installed[targetFolder])
+ installed[targetFolder].push(target.version)
+ }
+ else {
+ installed[targetFolder] = [target.version]
+ }
- d.push(resultList(target, where, parent && parent._id))
- cb(er, d)
- }
- )
+ var force = npm.config.get("force")
+ , nodeVersion = npm.config.get("node-version")
+ , strict = npm.config.get("engine-strict")
+ , c = npmInstallChecks
+
+ chain(
+ [ [c.checkEngine, target, npm.version, nodeVersion, force, strict]
+ , [c.checkPlatform, target, force]
+ , [c.checkCycle, target, context.ancestors]
+ , [c.checkGit, targetFolder]
+ , [write, target, targetFolder, context] ]
+ , function (er, d) {
+ if (er) return cb(er)
+
+ d.push(resultList(target, where, parent && parent._id))
+ cb(er, d)
+ }
+ )
+ })
}
function write (target, targetFolder, context, cb_) {
@@ -879,15 +973,16 @@ function write (target, targetFolder, context, cb_) {
// is the list of installed packages from that last thing.
if (!er) return cb_(er, data)
- if (false === npm.config.get("rollback")) return cb_(er)
+ if (npm.config.get("rollback") === false) return cb_(er)
npm.rollbacks.push(targetFolder)
cb_(er, data)
}
var bundled = []
- chain
- ( [ [ cache.unpack, target.name, target.version, targetFolder
+ log.silly("install write", "writing", target.name, target.version, "to", targetFolder)
+ chain(
+ [ [ cache.unpack, target.name, target.version, targetFolder
, null, null, user, group ]
, [ fs, "writeFile"
, path.resolve(targetFolder, "package.json")
@@ -922,14 +1017,27 @@ function write (target, targetFolder, context, cb_) {
, explicit: false
, wrap: wrap }
+ var actions =
+ [ [ installManyAndBuild, deps, depsTargetFolder, depsContext ] ]
+
+ // FIXME: This is an accident waiting to happen!
+ //
+ // 1. If multiple children at the same level of the tree share a
+ // peerDependency that's not in the parent's dependencies, because
+ // the peerDeps don't get added to the family, they will keep
+ // getting reinstalled (worked around by inflighting installOne).
+ // 2. The installer can't safely build at the parent level because
+ // that's already being done by the parent's installAndBuild. This
+ // runs the risk of the peerDependency never getting built.
+ //
+ // The fix: Don't install peerDependencies; require them to be
+ // included as explicit dependencies / devDependencies, and warn
+ // or error when they're missing. See #5080 for more arguments in
+ // favor of killing implicit peerDependency installs with fire.
var peerDeps = prepareForInstallMany(data, "peerDependencies", bundled,
wrap, family)
var pdTargetFolder = path.resolve(targetFolder, "..", "..")
var pdContext = context
-
- var actions =
- [ [ installManyAndBuild, deps, depsTargetFolder, depsContext ] ]
-
if (peerDeps.length > 0) {
actions.push(
[ installMany, peerDeps, pdTargetFolder, pdContext ]
@@ -972,8 +1080,9 @@ function prepareForInstallMany (packageData, depsKey, bundled, wrap, family) {
return !semver.satisfies(family[d], packageData[depsKey][d], true)
return true
}).map(function (d) {
- var t = packageData[depsKey][d]
- t = d + "@" + t
+ var v = packageData[depsKey][d]
+ var t = d + "@" + v
+ log.silly("prepareForInstallMany", "adding", t, "from", packageData.name, depsKey)
return t
})
}
diff --git a/deps/npm/lib/link.js b/deps/npm/lib/link.js
index 8022fc78dfe..8c6a9302905 100644
--- a/deps/npm/lib/link.js
+++ b/deps/npm/lib/link.js
@@ -10,6 +10,7 @@ var npm = require("./npm.js")
, path = require("path")
, rm = require("./utils/gently-rm.js")
, build = require("./build.js")
+ , npa = require("npm-package-arg")
module.exports = link
@@ -49,25 +50,26 @@ function link (args, cb) {
function linkInstall (pkgs, cb) {
asyncMap(pkgs, function (pkg, cb) {
+ var t = path.resolve(npm.globalDir, "..")
+ , pp = path.resolve(npm.globalDir, pkg)
+ , rp = null
+ , target = path.resolve(npm.dir, pkg)
+
function n (er, data) {
if (er) return cb(er, data)
// install returns [ [folder, pkgId], ... ]
// but we definitely installed just one thing.
var d = data.filter(function (d) { return !d[3] })
+ var what = npa(d[0][0])
pp = d[0][1]
- pkg = path.basename(pp)
+ pkg = what.name
target = path.resolve(npm.dir, pkg)
next()
}
- var t = path.resolve(npm.globalDir, "..")
- , pp = path.resolve(npm.globalDir, pkg)
- , rp = null
- , target = path.resolve(npm.dir, pkg)
-
- // if it's a folder or a random not-installed thing, then
- // link or install it first
- if (pkg.indexOf("/") !== -1 || pkg.indexOf("\\") !== -1) {
+ // if it's a folder, a random not-installed thing, or not a scoped package,
+ // then link or install it first
+ if (pkg[0] !== "@" && (pkg.indexOf("/") !== -1 || pkg.indexOf("\\") !== -1)) {
return fs.lstat(path.resolve(pkg), function (er, st) {
if (er || !st.isDirectory()) {
npm.commands.install(t, pkg, n)
diff --git a/deps/npm/lib/ls.js b/deps/npm/lib/ls.js
index 781b6443b99..ed329d19e1b 100644
--- a/deps/npm/lib/ls.js
+++ b/deps/npm/lib/ls.js
@@ -14,8 +14,8 @@ var npm = require("./npm.js")
, archy = require("archy")
, semver = require("semver")
, url = require("url")
- , isGitUrl = require("./utils/is-git-url.js")
, color = require("ansicolors")
+ , npa = require("npm-package-arg")
ls.usage = "npm ls"
@@ -29,9 +29,9 @@ function ls (args, silent, cb) {
// npm ls 'foo@~1.3' bar 'baz@<2'
if (!args) args = []
else args = args.map(function (a) {
- var nv = a.split("@")
- , name = nv.shift()
- , ver = semver.validRange(nv.join("@")) || ""
+ var p = npa(a)
+ , name = p.name
+ , ver = semver.validRange(p.rawSpec) || ""
return [ name, ver ]
})
@@ -39,6 +39,7 @@ function ls (args, silent, cb) {
var depth = npm.config.get("depth")
var opt = { depth: depth, log: log.warn, dev: true }
readInstalled(dir, opt, function (er, data) {
+ pruneNestedExtraneous(data)
var bfs = bfsify(data, args)
, lite = getLite(bfs)
@@ -75,6 +76,18 @@ function ls (args, silent, cb) {
})
}
+function pruneNestedExtraneous (data, visited) {
+ visited = visited || []
+ visited.push(data)
+ for (var i in data.dependencies) {
+ if (data.dependencies[i].extraneous) {
+ data.dependencies[i].dependencies = {}
+ } else if (visited.indexOf(data.dependencies[i]) === -1) {
+ pruneNestedExtraneous(data.dependencies[i], visited)
+ }
+ }
+}
+
function alphasort (a, b) {
a = a.toLowerCase()
b = b.toLowerCase()
@@ -265,7 +278,7 @@ function makeArchy_ (data, long, dir, depth, parent, d) {
// add giturl to name@version
if (data._resolved) {
- if (isGitUrl(url.parse(data._resolved)))
+ if (npa(data._resolved).type === "git")
out.label += " (" + data._resolved + ")"
}
diff --git a/deps/npm/lib/npm.js b/deps/npm/lib/npm.js
index 3139b1d1452..e933a1346cc 100644
--- a/deps/npm/lib/npm.js
+++ b/deps/npm/lib/npm.js
@@ -16,7 +16,7 @@ require('child-process-close')
var EventEmitter = require("events").EventEmitter
, npm = module.exports = new EventEmitter()
- , npmconf = require("npmconf")
+ , npmconf = require("./config/core.js")
, log = require("npmlog")
, fs = require("graceful-fs")
, path = require("path")
@@ -46,16 +46,6 @@ try {
var j = JSON.parse(fs.readFileSync(
path.join(__dirname, "../package.json"))+"")
npm.version = j.version
- npm.nodeVersionRequired = j.engines.node
- if (!semver.satisfies(pv, j.engines.node)) {
- log.warn("unsupported version", [""
- ,"npm requires node version: "+j.engines.node
- ,"And you have: "+pv
- ,"which is not satisfactory."
- ,""
- ,"Bad things will likely happen. You have been warned."
- ,""].join("\n"))
- }
} catch (ex) {
try {
log.info("error reading version", ex)
@@ -109,7 +99,6 @@ var commandCache = {}
, "update"
, "outdated"
, "prune"
- , "submodule"
, "pack"
, "dedupe"
@@ -153,6 +142,7 @@ var commandCache = {}
]
, plumbing = [ "build"
, "unbuild"
+ , "isntall"
, "xmas"
, "substack"
, "visnup"
@@ -433,11 +423,7 @@ Object.defineProperty(npm, "cache",
})
var tmpFolder
-var crypto = require("crypto")
-var rand = crypto.randomBytes(6)
- .toString("base64")
- .replace(/\//g, '_')
- .replace(/\+/, '-')
+var rand = require("crypto").randomBytes(4).toString("hex")
Object.defineProperty(npm, "tmp",
{ get : function () {
if (!tmpFolder) tmpFolder = "npm-" + process.pid + "-" + rand
diff --git a/deps/npm/lib/outdated.js b/deps/npm/lib/outdated.js
index a71df7fe76a..fdfd7624db2 100644
--- a/deps/npm/lib/outdated.js
+++ b/deps/npm/lib/outdated.js
@@ -28,12 +28,13 @@ var path = require("path")
, asyncMap = require("slide").asyncMap
, npm = require("./npm.js")
, url = require("url")
- , isGitUrl = require("./utils/is-git-url.js")
, color = require("ansicolors")
, styles = require("ansistyles")
, table = require("text-table")
, semver = require("semver")
, os = require("os")
+ , mapToRegistry = require("./utils/map-to-registry.js")
+ , npa = require("npm-package-arg")
function outdated (args, silent, cb) {
if (typeof cb !== "function") cb = silent, silent = false
@@ -43,7 +44,7 @@ function outdated (args, silent, cb) {
if (npm.config.get("json")) {
console.log(makeJSON(list))
} else if (npm.config.get("parseable")) {
- console.log(makeParseable(list));
+ console.log(makeParseable(list))
} else {
var outList = list.map(makePretty)
var outTable = [[ "Package"
@@ -99,7 +100,7 @@ function makePretty (p) {
function ansiTrim (str) {
var r = new RegExp("\x1b(?:\\[(?:\\d+[ABCDEFGJKSTm]|\\d+;\\d+[Hfm]|" +
- "\\d+;\\d+;\\d+m|6n|s|u|\\?25[lh])|\\w)", "g");
+ "\\d+;\\d+;\\d+m|6n|s|u|\\?25[lh])|\\w)", "g")
return str.replace(r, "")
}
@@ -114,7 +115,7 @@ function makeParseable (list) {
, dir = path.resolve(p[0], "node_modules", dep)
, has = p[2]
, want = p[3]
- , latest = p[4];
+ , latest = p[4]
return [ dir
, dep + "@" + want
@@ -264,20 +265,25 @@ function shouldUpdate (args, dir, dep, has, req, depth, cb) {
return skip()
}
- if (isGitUrl(url.parse(req)))
+ if (npa(req).type === "git")
return doIt("git", "git")
// search for the latest package
- var uri = url.resolve(npm.config.get("registry"), dep)
- npm.registry.get(uri, null, function (er, d) {
+ mapToRegistry(dep, npm.config, function (er, uri) {
+ if (er) return cb(er)
+
+ npm.registry.get(uri, null, updateDeps)
+ })
+
+ function updateDeps (er, d) {
if (er) return cb()
- if (!d || !d['dist-tags'] || !d.versions) return cb()
- var l = d.versions[d['dist-tags'].latest]
+ if (!d || !d["dist-tags"] || !d.versions) return cb()
+ var l = d.versions[d["dist-tags"].latest]
if (!l) return cb()
var r = req
- if (d['dist-tags'][req])
- r = d['dist-tags'][req]
+ if (d["dist-tags"][req])
+ r = d["dist-tags"][req]
if (semver.validRange(r, true)) {
// some kind of semver range.
@@ -290,13 +296,13 @@ function shouldUpdate (args, dir, dep, has, req, depth, cb) {
}
// We didn't find the version in the doc. See if cache can find it.
- cache.add(dep, req, false, onCacheAdd)
+ cache.add(dep, req, null, false, onCacheAdd)
function onCacheAdd(er, d) {
// if this fails, then it means we can't update this thing.
// it's probably a thing that isn't published.
if (er) {
- if (er.code && er.code === 'ETARGET') {
+ if (er.code && er.code === "ETARGET") {
// no viable version found
return skip(er)
}
@@ -315,6 +321,5 @@ function shouldUpdate (args, dir, dep, has, req, depth, cb) {
else
skip()
}
-
- })
+ }
}
diff --git a/deps/npm/lib/owner.js b/deps/npm/lib/owner.js
index 34dbbc24722..2fdee7adb69 100644
--- a/deps/npm/lib/owner.js
+++ b/deps/npm/lib/owner.js
@@ -5,6 +5,12 @@ owner.usage = "npm owner add "
+ "\nnpm owner rm "
+ "\nnpm owner ls "
+var npm = require("./npm.js")
+ , registry = npm.registry
+ , log = require("npmlog")
+ , readJson = require("read-package-json")
+ , mapToRegistry = require("./utils/map-to-registry.js")
+
owner.completion = function (opts, cb) {
var argv = opts.conf.argv.remain
if (argv.length > 4) return cb()
@@ -14,65 +20,78 @@ owner.completion = function (opts, cb) {
else subs.push("ls", "list")
return cb(null, subs)
}
- var un = encodeURIComponent(npm.config.get("username"))
- var theUser, uri
- switch (argv[2]) {
- case "ls":
- if (argv.length > 3) return cb()
- uri = url.resolve(npm.config.get("registry"), "-/short")
- return registry.get(uri, null, cb)
-
- case "rm":
- if (argv.length > 3) {
- theUser = encodeURIComponent(argv[3])
- uri = url.resolve(npm.config.get("registry"), "-/by-user/"+theUser+"|"+un)
- console.error(uri)
- return registry.get(uri, null, function (er, d) {
+
+ npm.commands.whoami([], true, function (er, username) {
+ if (er) return cb()
+
+ var un = encodeURIComponent(username)
+ var byUser, theUser
+ switch (argv[2]) {
+ case "ls":
+ if (argv.length > 3) return cb()
+ return mapToRegistry("-/short", npm.config, function (er, uri) {
if (er) return cb(er)
- // return the intersection
- return cb(null, d[theUser].filter(function (p) {
- // kludge for server adminery.
- return un === "isaacs" || d[un].indexOf(p) === -1
- }))
+
+ registry.get(uri, null, cb)
})
- }
- // else fallthrough
- case "add":
- if (argv.length > 3) {
- theUser = encodeURIComponent(argv[3])
- uri = url.resolve(npm.config.get("registry"), "-/by-user/"+theUser+"|"+un)
- console.error(uri)
- return registry.get(uri, null, function (er, d) {
- console.error(uri, er || d)
- // return mine that they're not already on.
+
+ case "rm":
+ if (argv.length > 3) {
+ theUser = encodeURIComponent(argv[3])
+ byUser = "-/by-user/" + theUser + "|" + un
+ return mapToRegistry(byUser, npm.config, function (er, uri) {
+ if (er) return cb(er)
+
+ console.error(uri)
+ registry.get(uri, null, function (er, d) {
+ if (er) return cb(er)
+ // return the intersection
+ return cb(null, d[theUser].filter(function (p) {
+ // kludge for server adminery.
+ return un === "isaacs" || d[un].indexOf(p) === -1
+ }))
+ })
+ })
+ }
+ // else fallthrough
+ case "add":
+ if (argv.length > 3) {
+ theUser = encodeURIComponent(argv[3])
+ byUser = "-/by-user/" + theUser + "|" + un
+ return mapToRegistry(byUser, npm.config, function (er, uri) {
+ if (er) return cb(er)
+
+ console.error(uri)
+ registry.get(uri, null, function (er, d) {
+ console.error(uri, er || d)
+ // return mine that they're not already on.
+ if (er) return cb(er)
+ var mine = d[un] || []
+ , theirs = d[theUser] || []
+ return cb(null, mine.filter(function (p) {
+ return theirs.indexOf(p) === -1
+ }))
+ })
+ })
+ }
+ // just list all users who aren't me.
+ return mapToRegistry("-/users", npm.config, function (er, uri) {
if (er) return cb(er)
- var mine = d[un] || []
- , theirs = d[theUser] || []
- return cb(null, mine.filter(function (p) {
- return theirs.indexOf(p) === -1
- }))
+
+ registry.get(uri, null, function (er, list) {
+ if (er) return cb()
+ return cb(null, Object.keys(list).filter(function (n) {
+ return n !== un
+ }))
+ })
})
- }
- // just list all users who aren't me.
- uri = url.resolve(npm.config.get("registry"), "-/users")
- return registry.get(uri, null, function (er, list) {
- if (er) return cb()
- return cb(null, Object.keys(list).filter(function (n) {
- return n !== un
- }))
- })
- default:
- return cb()
- }
+ default:
+ return cb()
+ }
+ })
}
-var npm = require("./npm.js")
- , registry = npm.registry
- , log = require("npmlog")
- , readJson = require("read-package-json")
- , url = require("url")
-
function owner (args, cb) {
var action = args.shift()
switch (action) {
@@ -90,18 +109,23 @@ function ls (pkg, cb) {
ls(pkg, cb)
})
- var uri = url.resolve(npm.config.get("registry"), pkg)
- registry.get(uri, null, function (er, data) {
- var msg = ""
- if (er) {
- log.error("owner ls", "Couldn't get owner data", pkg)
- return cb(er)
- }
- var owners = data.maintainers
- if (!owners || !owners.length) msg = "admin party!"
- else msg = owners.map(function (o) { return o.name +" <"+o.email+">" }).join("\n")
- console.log(msg)
- cb(er, owners)
+ mapToRegistry(pkg, npm.config, function (er, uri) {
+ if (er) return cb(er)
+
+ registry.get(uri, null, function (er, data) {
+ var msg = ""
+ if (er) {
+ log.error("owner ls", "Couldn't get owner data", pkg)
+ return cb(er)
+ }
+ var owners = data.maintainers
+ if (!owners || !owners.length) msg = "admin party!"
+ else msg = owners.map(function (o) {
+ return o.name + " <" + o.email + ">"
+ }).join("\n")
+ console.log(msg)
+ cb(er, owners)
+ })
})
}
@@ -120,7 +144,7 @@ function add (user, pkg, cb) {
var o = owners[i]
if (o.name === u.name) {
log.info( "owner add"
- , "Already a package owner: "+o.name+" <"+o.email+">")
+ , "Already a package owner: " + o.name + " <" + o.email + ">")
return false
}
}
@@ -145,7 +169,7 @@ function rm (user, pkg, cb) {
return !match
})
if (!found) {
- log.info("owner rm", "Not a package owner: "+user)
+ log.info("owner rm", "Not a package owner: " + user)
return false
}
if (!m.length) return new Error(
@@ -156,15 +180,19 @@ function rm (user, pkg, cb) {
function mutate (pkg, user, mutation, cb) {
if (user) {
- var uri = url.resolve(npm.config.get("registry"), "-/user/org.couchdb.user:"+user)
- registry.get(uri, null, mutate_)
+ var byUser = "-/user/org.couchdb.user:" + user
+ mapToRegistry(byUser, npm.config, function (er, uri) {
+ if (er) return cb(er)
+
+ registry.get(uri, null, mutate_)
+ })
} else {
mutate_(null, null)
}
function mutate_ (er, u) {
if (!er && user && (!u || u.error)) er = new Error(
- "Couldn't get user data for "+user+": "+JSON.stringify(u))
+ "Couldn't get user data for " + user + ": " + JSON.stringify(u))
if (er) {
log.error("owner mutate", "Error getting user data for %s", user)
@@ -172,27 +200,34 @@ function mutate (pkg, user, mutation, cb) {
}
if (u) u = { "name" : u.name, "email" : u.email }
- var uri = url.resolve(npm.config.get("registry"), pkg)
- registry.get(uri, null, function (er, data) {
- if (er) {
- log.error("owner mutate", "Error getting package data for %s", pkg)
- return cb(er)
- }
- var m = mutation(u, data.maintainers)
- if (!m) return cb() // handled
- if (m instanceof Error) return cb(m) // error
- data = { _id : data._id
- , _rev : data._rev
- , maintainers : m
- }
- var uri = url.resolve(npm.config.get("registry"), pkg+"/-rev/"+data._rev)
- registry.request("PUT", uri, { body : data }, function (er, data) {
- if (!er && data.error) er = new Error(
- "Failed to update package metadata: "+JSON.stringify(data))
+ mapToRegistry(pkg, npm.config, function (er, uri) {
+ if (er) return cb(er)
+
+ registry.get(uri, null, function (er, data) {
if (er) {
- log.error("owner mutate", "Failed to update package metadata")
+ log.error("owner mutate", "Error getting package data for %s", pkg)
+ return cb(er)
}
- cb(er, data)
+ var m = mutation(u, data.maintainers)
+ if (!m) return cb() // handled
+ if (m instanceof Error) return cb(m) // error
+ data = { _id : data._id
+ , _rev : data._rev
+ , maintainers : m
+ }
+ var dataPath = pkg + "/-rev/" + data._rev
+ mapToRegistry(dataPath, npm.config, function (er, uri) {
+ if (er) return cb(er)
+
+ registry.request("PUT", uri, { body : data }, function (er, data) {
+ if (!er && data.error) er = new Error(
+ "Failed to update package metadata: " + JSON.stringify(data))
+ if (er) {
+ log.error("owner mutate", "Failed to update package metadata")
+ }
+ cb(er, data)
+ })
+ })
})
})
}
@@ -207,5 +242,5 @@ function readLocalPkg (cb) {
}
function unknown (action, cb) {
- cb("Usage: \n"+owner.usage)
+ cb("Usage: \n" + owner.usage)
}
diff --git a/deps/npm/lib/pack.js b/deps/npm/lib/pack.js
index ea94dd15422..a5ce90094f6 100644
--- a/deps/npm/lib/pack.js
+++ b/deps/npm/lib/pack.js
@@ -11,6 +11,8 @@ var npm = require("./npm.js")
, chain = require("slide").chain
, path = require("path")
, cwd = process.cwd()
+ , writeStream = require('fs-write-stream-atomic')
+ , cachedPackageRoot = require("./cache/cached-package-root.js")
pack.usage = "npm pack "
@@ -40,15 +42,17 @@ function printFiles (files, cb) {
// add to cache, then cp to the cwd
function pack_ (pkg, cb) {
- cache.add(pkg, null, false, function (er, data) {
+ cache.add(pkg, null, null, false, function (er, data) {
if (er) return cb(er)
- var fname = path.resolve(data._id.replace(/@/g, "-") + ".tgz")
- , cached = path.resolve( npm.cache
- , data.name
- , data.version
- , "package.tgz" )
+
+ // scoped packages get special treatment
+ var name = data.name
+ if (name[0] === "@") name = name.substr(1).replace(/\//g, "-")
+ var fname = name + "-" + data.version + ".tgz"
+
+ var cached = path.join(cachedPackageRoot(data), "package.tgz")
, from = fs.createReadStream(cached)
- , to = fs.createWriteStream(fname)
+ , to = writeStream(fname)
, errState = null
from.on("error", cb_)
diff --git a/deps/npm/lib/publish.js b/deps/npm/lib/publish.js
index ccad3ea8270..2a0fcff5a5c 100644
--- a/deps/npm/lib/publish.js
+++ b/deps/npm/lib/publish.js
@@ -1,14 +1,17 @@
module.exports = publish
-var npm = require("./npm.js")
+var url = require("url")
+ , npm = require("./npm.js")
, log = require("npmlog")
, path = require("path")
, readJson = require("read-package-json")
, lifecycle = require("./utils/lifecycle.js")
, chain = require("slide").chain
- , Conf = require("npmconf").Conf
+ , Conf = require("./config/core.js").Conf
, RegClient = require("npm-registry-client")
+ , mapToRegistry = require("./utils/map-to-registry.js")
+ , cachedPackageRoot = require("./cache/cached-package-root.js")
publish.usage = "npm publish "
+ "\nnpm publish "
@@ -22,7 +25,10 @@ publish.completion = function (opts, cb) {
}
function publish (args, isRetry, cb) {
- if (typeof cb !== "function") cb = isRetry, isRetry = false
+ if (typeof cb !== "function") {
+ cb = isRetry
+ isRetry = false
+ }
if (args.length === 0) args = ["."]
if (args.length !== 1) return cb(publish.usage)
@@ -30,14 +36,18 @@ function publish (args, isRetry, cb) {
var arg = args[0]
// if it's a local folder, then run the prepublish there, first.
readJson(path.resolve(arg, "package.json"), function (er, data) {
- er = needVersion(er, data)
if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er)
- // error is ok. could be publishing a url or tarball
- // however, that means that we will not have automatically run
- // the prepublish script, since that gets run when adding a folder
- // to the cache.
+
+ if (data) {
+ if (!data.name) return cb(new Error("No name provided"))
+ if (!data.version) return cb(new Error("No version provided"))
+ }
+
+ // Error is OK. Could be publishing a URL or tarball, however, that means
+ // that we will not have automatically run the prepublish script, since
+ // that gets run when adding a folder to the cache.
if (er) return cacheAddPublish(arg, false, isRetry, cb)
- cacheAddPublish(arg, true, isRetry, cb)
+ else cacheAddPublish(arg, true, isRetry, cb)
})
}
@@ -47,15 +57,12 @@ function publish (args, isRetry, cb) {
// That means that we can run publish/postpublish in the dir, rather than
// in the cache dir.
function cacheAddPublish (dir, didPre, isRetry, cb) {
- npm.commands.cache.add(dir, null, false, function (er, data) {
+ npm.commands.cache.add(dir, null, null, false, function (er, data) {
if (er) return cb(er)
log.silly("publish", data)
- var cachedir = path.resolve( npm.cache
- , data.name
- , data.version
- , "package" )
- chain
- ( [ !didPre && [lifecycle, data, "prepublish", cachedir]
+ var cachedir = path.resolve(cachedPackageRoot(data), "package")
+ chain([ !didPre &&
+ [lifecycle, data, "prepublish", cachedir]
, [publish_, dir, data, isRetry, cachedir]
, [lifecycle, data, "publish", didPre ? dir : cachedir]
, [lifecycle, data, "postpublish", didPre ? dir : cachedir] ]
@@ -66,53 +73,61 @@ function cacheAddPublish (dir, didPre, isRetry, cb) {
function publish_ (arg, data, isRetry, cachedir, cb) {
if (!data) return cb(new Error("no package.json file found"))
- // check for publishConfig hash
var registry = npm.registry
- var registryURI = npm.config.get("registry")
+ var config = npm.config
+
+ // check for publishConfig hash
if (data.publishConfig) {
- var pubConf = new Conf(npm.config)
- pubConf.save = npm.config.save.bind(npm.config)
+ config = new Conf(npm.config)
+ config.save = npm.config.save.bind(npm.config)
// don't modify the actual publishConfig object, in case we have
// to set a login token or some other data.
- pubConf.unshift(Object.keys(data.publishConfig).reduce(function (s, k) {
+ config.unshift(Object.keys(data.publishConfig).reduce(function (s, k) {
s[k] = data.publishConfig[k]
return s
}, {}))
- registry = new RegClient(pubConf)
- registryURI = pubConf.get("registry")
+ registry = new RegClient(config)
}
- data._npmVersion = npm.version
- data._npmUser = { name: npm.config.get("username")
- , email: npm.config.get("email") }
+ data._npmVersion = npm.version
+ data._nodeVersion = process.versions.node
delete data.modules
- if (data.private) return cb(new Error
- ("This package has been marked as private\n"
- +"Remove the 'private' field from the package.json to publish it."))
-
- var tarball = cachedir + ".tgz"
- registry.publish(registryURI, data, tarball, function (er) {
- if (er && er.code === "EPUBLISHCONFLICT"
- && npm.config.get("force") && !isRetry) {
- log.warn("publish", "Forced publish over "+data._id)
- return npm.commands.unpublish([data._id], function (er) {
- // ignore errors. Use the force. Reach out with your feelings.
- // but if it fails again, then report the first error.
- publish([arg], er || true, cb)
- })
- }
- // report the unpublish error if this was a retry and unpublish failed
- if (er && isRetry && isRetry !== true) return cb(isRetry)
+ if (data.private) return cb(
+ new Error(
+ "This package has been marked as private\n" +
+ "Remove the 'private' field from the package.json to publish it."
+ )
+ )
+
+ mapToRegistry(data.name, config, function (er, registryURI) {
if (er) return cb(er)
- console.log("+ " + data._id)
- cb()
- })
-}
-function needVersion(er, data) {
- return er ? er
- : (data && !data.version) ? new Error("No version provided")
- : null
+ var tarball = cachedir + ".tgz"
+
+ // we just want the base registry URL in this case
+ var registryBase = url.resolve(registryURI, ".")
+ log.verbose("publish", "registryBase", registryBase)
+
+ var c = config.getCredentialsByURI(registryBase)
+ data._npmUser = {name: c.username, email: c.email}
+
+ registry.publish(registryBase, data, tarball, function (er) {
+ if (er && er.code === "EPUBLISHCONFLICT"
+ && npm.config.get("force") && !isRetry) {
+ log.warn("publish", "Forced publish over " + data._id)
+ return npm.commands.unpublish([data._id], function (er) {
+ // ignore errors. Use the force. Reach out with your feelings.
+ // but if it fails again, then report the first error.
+ publish([arg], er || true, cb)
+ })
+ }
+ // report the unpublish error if this was a retry and unpublish failed
+ if (er && isRetry && isRetry !== true) return cb(isRetry)
+ if (er) return cb(er)
+ console.log("+ " + data._id)
+ cb()
+ })
+ })
}
diff --git a/deps/npm/lib/rebuild.js b/deps/npm/lib/rebuild.js
index e296451b705..ab372c6ec07 100644
--- a/deps/npm/lib/rebuild.js
+++ b/deps/npm/lib/rebuild.js
@@ -5,6 +5,7 @@ var readInstalled = require("read-installed")
, semver = require("semver")
, log = require("npmlog")
, npm = require("./npm.js")
+ , npa = require("npm-package-arg")
rebuild.usage = "npm rebuild [[@] [name[@] ...]]"
@@ -46,9 +47,9 @@ function filter (data, args, set, seen) {
else if (data.name && data._id) {
for (var i = 0, l = args.length; i < l; i ++) {
var arg = args[i]
- , nv = arg.split("@")
- , n = nv.shift()
- , v = nv.join("@")
+ , nv = npa(arg)
+ , n = nv.name
+ , v = nv.rawSpec
if (n !== data.name) continue
if (!semver.satisfies(data.version, v, true)) continue
pass = true
diff --git a/deps/npm/lib/repo.js b/deps/npm/lib/repo.js
index d209c3ca836..c6db8e37b01 100644
--- a/deps/npm/lib/repo.js
+++ b/deps/npm/lib/repo.js
@@ -5,9 +5,12 @@ repo.usage = "npm repo "
repo.completion = function (opts, cb) {
if (opts.conf.argv.remain.length > 2) return cb()
- var uri = url_.resolve(npm.config.get("registry"), "/-/short")
- registry.get(uri, { timeout : 60000 }, function (er, list) {
- return cb(null, list || [])
+ mapToRegistry("/-/short", npm.config, function (er, uri) {
+ if (er) return cb(er)
+
+ registry.get(uri, { timeout : 60000 }, function (er, list) {
+ return cb(null, list || [])
+ })
})
}
@@ -19,10 +22,12 @@ var npm = require("./npm.js")
, path = require("path")
, readJson = require("read-package-json")
, fs = require("fs")
- , url_ = require('url')
+ , url_ = require("url")
+ , mapToRegistry = require("./utils/map-to-registry.js")
+ , npa = require("npm-package-arg")
function repo (args, cb) {
- var n = args.length && args[0].split("@").shift() || '.'
+ var n = args.length && npa(args[0]).name || "."
fs.stat(n, function (er, s) {
if (er && er.code === "ENOENT") return callRegistry(n, cb)
else if (er) return cb(er)
@@ -35,8 +40,8 @@ function repo (args, cb) {
}
function getUrlAndOpen (d, cb) {
- var r = d.repository;
- if (!r) return cb(new Error('no repository'));
+ var r = d.repository
+ if (!r) return cb(new Error('no repository'))
// XXX remove this when npm@v1.3.10 from node 0.10 is deprecated
// from https://github.com/npm/npm-www/issues/418
if (githubUserRepo(r.url))
@@ -52,10 +57,13 @@ function getUrlAndOpen (d, cb) {
}
function callRegistry (n, cb) {
- var uri = url_.resolve(npm.config.get("registry"), n + "/latest")
- registry.get(uri, { timeout : 3600 }, function (er, d) {
+ mapToRegistry(n, npm.config, function (er, uri) {
if (er) return cb(er)
- getUrlAndOpen(d, cb)
+
+ registry.get(uri + "/latest", { timeout : 3600 }, function (er, d) {
+ if (er) return cb(er)
+ getUrlAndOpen(d, cb)
+ })
})
}
diff --git a/deps/npm/lib/run-script.js b/deps/npm/lib/run-script.js
index 25e98f01d65..4495b93c48e 100644
--- a/deps/npm/lib/run-script.js
+++ b/deps/npm/lib/run-script.js
@@ -8,7 +8,7 @@ var lifecycle = require("./utils/lifecycle.js")
, log = require("npmlog")
, chain = require("slide").chain
-runScript.usage = "npm run-script [] "
+runScript.usage = "npm run-script [-- ]"
runScript.completion = function (opts, cb) {
@@ -21,7 +21,7 @@ runScript.completion = function (opts, cb) {
if (argv.length === 3) {
// either specified a script locally, in which case, done,
// or a package, in which case, complete against its scripts
- var json = path.join(npm.prefix, "package.json")
+ var json = path.join(npm.localPrefix, "package.json")
return readJson(json, function (er, d) {
if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er)
if (er) d = {}
@@ -30,7 +30,7 @@ runScript.completion = function (opts, cb) {
if (scripts.indexOf(argv[2]) !== -1) return cb()
// ok, try to find out which package it was, then
var pref = npm.config.get("global") ? npm.config.get("prefix")
- : npm.prefix
+ : npm.localPrefix
var pkgDir = path.resolve( pref, "node_modules"
, argv[2], "package.json" )
readJson(pkgDir, function (er, d) {
@@ -53,8 +53,11 @@ runScript.completion = function (opts, cb) {
next()
})
- if (npm.config.get("global")) scripts = [], next()
- else readJson(path.join(npm.prefix, "package.json"), function (er, d) {
+ if (npm.config.get("global")) {
+ scripts = []
+ next()
+ }
+ else readJson(path.join(npm.localPrefix, "package.json"), function (er, d) {
if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er)
d = d || {}
scripts = Object.keys(d.scripts || {})
@@ -63,26 +66,27 @@ runScript.completion = function (opts, cb) {
function next () {
if (!installed || !scripts) return
- return cb(null, scripts.concat(installed))
+
+ cb(null, scripts.concat(installed))
}
}
function runScript (args, cb) {
if (!args.length) return list(cb)
- var pkgdir = args.length === 1 ? process.cwd()
- : path.resolve(npm.dir, args[0])
- , cmd = args.pop()
+
+ var pkgdir = npm.localPrefix
+ , cmd = args.shift()
readJson(path.resolve(pkgdir, "package.json"), function (er, d) {
if (er) return cb(er)
- run(d, pkgdir, cmd, cb)
+ run(d, pkgdir, cmd, args, cb)
})
}
function list(cb) {
- var json = path.join(npm.prefix, 'package.json')
+ var json = path.join(npm.localPrefix, "package.json")
return readJson(json, function(er, d) {
- if (er && er.code !== 'ENOENT' && er.code !== 'ENOTDIR') return cb(er)
+ if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er)
if (er) d = {}
var scripts = Object.keys(d.scripts || {})
@@ -109,22 +113,41 @@ function list(cb) {
})
}
-function run (pkg, wd, cmd, cb) {
- var cmds = []
+function run (pkg, wd, cmd, args, cb) {
if (!pkg.scripts) pkg.scripts = {}
+
+ var cmds
if (cmd === "restart") {
- cmds = ["prestop","stop","poststop"
- ,"restart"
- ,"prestart","start","poststart"]
+ cmds = [
+ "prestop", "stop", "poststop",
+ "restart",
+ "prestart", "start", "poststart"
+ ]
} else {
cmds = [cmd]
}
+
if (!cmd.match(/^(pre|post)/)) {
cmds = ["pre"+cmd].concat(cmds).concat("post"+cmd)
}
+
log.verbose("run-script", cmds)
chain(cmds.map(function (c) {
+ // pass cli arguments after -- to script.
+ if (pkg.scripts[c] && c === cmd) pkg.scripts[c] = pkg.scripts[c] + joinArgs(args)
+
// when running scripts explicitly, assume that they're trusted.
return [lifecycle, pkg, c, wd, true]
}), cb)
}
+
+// join arguments after '--' and pass them to script,
+// handle special characters such as ', ", ' '.
+function joinArgs (args) {
+ var joinedArgs = ""
+ args.forEach(function(arg) {
+ if (arg.match(/[ '"]/)) arg = '"' + arg.replace(/"/g, '\\"') + '"'
+ joinedArgs += " " + arg
+ })
+ return joinedArgs
+}
diff --git a/deps/npm/lib/search.js b/deps/npm/lib/search.js
index e7892350ca6..5dd060f829c 100644
--- a/deps/npm/lib/search.js
+++ b/deps/npm/lib/search.js
@@ -1,10 +1,10 @@
module.exports = exports = search
-var url = require("url")
- , npm = require("./npm.js")
+var npm = require("./npm.js")
, registry = npm.registry
, columnify = require('columnify')
+ , mapToRegistry = require("./utils/map-to-registry.js")
search.usage = "npm search [some search terms ...]"
@@ -63,10 +63,13 @@ function getFilteredData (staleness, args, notArgs, cb) {
follow : true,
staleOk : true
}
- var uri = url.resolve(npm.config.get("registry"), "-/all")
- registry.get(uri, opts, function (er, data) {
+ mapToRegistry("-/all", npm.config, function (er, uri) {
if (er) return cb(er)
- return cb(null, filter(data, args, notArgs))
+
+ registry.get(uri, opts, function (er, data) {
+ if (er) return cb(er)
+ return cb(null, filter(data, args, notArgs))
+ })
})
}
@@ -215,7 +218,7 @@ function addColorMarker (str, arg, i) {
if (arg.charAt(0) === "/") {
//arg = arg.replace(/\/$/, "")
- return str.replace( new RegExp(arg.substr(1, arg.length - 1), "gi")
+ return str.replace( new RegExp(arg.substr(1, arg.length - 2), "gi")
, function (bit) { return markStart + bit + markEnd } )
}
diff --git a/deps/npm/lib/shrinkwrap.js b/deps/npm/lib/shrinkwrap.js
index 5f8261d095f..a5783837c67 100644
--- a/deps/npm/lib/shrinkwrap.js
+++ b/deps/npm/lib/shrinkwrap.js
@@ -6,6 +6,7 @@ module.exports = exports = shrinkwrap
var npm = require("./npm.js")
, log = require("npmlog")
, fs = require("fs")
+ , writeFileAtomic = require("write-file-atomic")
, path = require("path")
, readJson = require("read-package-json")
, sortedObject = require("sorted-object")
@@ -70,7 +71,7 @@ function save (pkginfo, silent, cb) {
var file = path.resolve(npm.prefix, "npm-shrinkwrap.json")
- fs.writeFile(file, swdata, function (er) {
+ writeFileAtomic(file, swdata, function (er) {
if (er) return cb(er)
if (silent) return cb(null, pkginfo)
console.log("wrote npm-shrinkwrap.json")
diff --git a/deps/npm/lib/star.js b/deps/npm/lib/star.js
index 9c0b4ea9ed9..123c4ebbb44 100644
--- a/deps/npm/lib/star.js
+++ b/deps/npm/lib/star.js
@@ -1,19 +1,22 @@
module.exports = star
-var url = require("url")
- , npm = require("./npm.js")
+var npm = require("./npm.js")
, registry = npm.registry
, log = require("npmlog")
, asyncMap = require("slide").asyncMap
+ , mapToRegistry = require("./utils/map-to-registry.js")
star.usage = "npm star [pkg, pkg, ...]\n"
+ "npm unstar [pkg, pkg, ...]"
star.completion = function (opts, cb) {
- var uri = url.resolve(npm.config.get("registry"), "-/short")
- registry.get(uri, { timeout : 60000 }, function (er, list) {
- return cb(null, list || [])
+ mapToRegistry("-/short", npm.config, function (er, uri) {
+ if (er) return cb(er)
+
+ registry.get(uri, { timeout : 60000 }, function (er, list) {
+ return cb(null, list || [])
+ })
})
}
@@ -24,13 +27,16 @@ function star (args, cb) {
, using = !(npm.command.match(/^un/))
if (!using) s = u
asyncMap(args, function (pkg, cb) {
- var uri = url.resolve(npm.config.get("registry"), pkg)
- registry.star(uri, using, function (er, data, raw, req) {
- if (!er) {
- console.log(s + " "+pkg)
- log.verbose("star", data)
- }
- cb(er, data, raw, req)
+ mapToRegistry(pkg, npm.config, function (er, uri) {
+ if (er) return cb(er)
+
+ registry.star(uri, using, function (er, data, raw, req) {
+ if (!er) {
+ console.log(s + " "+pkg)
+ log.verbose("star", data)
+ }
+ cb(er, data, raw, req)
+ })
})
}, cb)
}
diff --git a/deps/npm/lib/stars.js b/deps/npm/lib/stars.js
index f0d2ef73aeb..dee5c152afa 100644
--- a/deps/npm/lib/stars.js
+++ b/deps/npm/lib/stars.js
@@ -2,23 +2,26 @@ module.exports = stars
stars.usage = "npm stars [username]"
-var url = require("url")
- , npm = require("./npm.js")
+var npm = require("./npm.js")
, registry = npm.registry
, log = require("npmlog")
+ , mapToRegistry = require("./utils/map-to-registry.js")
function stars (args, cb) {
- var name = args.length === 1 ? args[0] : npm.config.get("username")
- , uri = url.resolve(npm.config.get("registry"), name)
- registry.stars(uri, showstars)
+ npm.commands.whoami([], true, function (er, username) {
+ var name = args.length === 1 ? args[0] : username
+ mapToRegistry("", npm.config, function (er, uri) {
+ if (er) return cb(er)
+
+ registry.stars(uri, name, showstars)
+ })
+ })
function showstars (er, data) {
- if (er) {
- return cb(er)
- }
+ if (er) return cb(er)
if (data.rows.length === 0) {
- log.warn('stars', 'user has not starred any packages.')
+ log.warn("stars", "user has not starred any packages.")
} else {
data.rows.forEach(function(a) {
console.log(a.value)
diff --git a/deps/npm/lib/submodule.js b/deps/npm/lib/submodule.js
deleted file mode 100644
index 2231ced9cfb..00000000000
--- a/deps/npm/lib/submodule.js
+++ /dev/null
@@ -1,91 +0,0 @@
-// npm submodule
-// Check the package contents for a git repository url.
-// If there is one, then create a git submodule in the node_modules folder.
-
-module.exports = submodule
-
-var npm = require("./npm.js")
- , cache = require("./cache.js")
- , git = require("./utils/git.js")
- , asyncMap = require("slide").asyncMap
- , chain = require("slide").chain
- , which = require("which")
-
-submodule.usage = "npm submodule "
-
-submodule.completion = require("./docs.js").completion
-
-function submodule (args, cb) {
- if (npm.config.get("global")) {
- return cb(new Error("Cannot use submodule command in global mode."))
- }
-
- if (args.length === 0) return cb(submodule.usage)
-
- asyncMap(args, function (arg, cb) {
- cache.add(arg, null, false, cb)
- }, function (er, pkgs) {
- if (er) return cb(er)
- chain(pkgs.map(function (pkg) { return function (cb) {
- submodule_(pkg, cb)
- }}), cb)
- })
-
-}
-
-function submodule_ (pkg, cb) {
- if (!pkg.repository
- || pkg.repository.type !== "git"
- || !pkg.repository.url) {
- return cb(new Error(pkg._id + ": No git repository listed"))
- }
-
- // prefer https:// github urls
- pkg.repository.url = pkg.repository.url
- .replace(/^(git:\/\/)?(git@)?github.com[:\/]/, "https://github.com/")
-
- // first get the list of submodules, and update if it's already there.
- getSubmodules(function (er, modules) {
- if (er) return cb(er)
- // if there's already a submodule, then just update it.
- if (modules.indexOf(pkg.name) !== -1) {
- return updateSubmodule(pkg.name, cb)
- }
- addSubmodule(pkg.name, pkg.repository.url, cb)
- })
-}
-
-function updateSubmodule (name, cb) {
- var args = [ "submodule", "update", "--init", "node_modules/", name ]
-
- git.whichAndExec(args, cb)
-}
-
-function addSubmodule (name, url, cb) {
- var args = [ "submodule", "add", url, "node_modules/", name ]
-
- git.whichAndExec(args, cb)
-}
-
-
-var getSubmodules = function (cb) {
- var args = [ "submodule", "status" ]
-
-
- git.whichAndExec(args, function _(er, stdout) {
- if (er) return cb(er)
- var res = stdout.trim().split(/\n/).map(function (line) {
- return line.trim().split(/\s+/)[1]
- }).filter(function (line) {
- // only care about submodules in the node_modules folder.
- return line && line.match(/^node_modules\//)
- }).map(function (line) {
- return line.replace(/^node_modules\//g, "")
- })
-
- // memoize.
- getSubmodules = function (cb) { return cb(null, res) }
-
- cb(null, res)
- })
-}
diff --git a/deps/npm/lib/tag.js b/deps/npm/lib/tag.js
index 1d04ad1f7e0..47e9a8c0ac7 100644
--- a/deps/npm/lib/tag.js
+++ b/deps/npm/lib/tag.js
@@ -5,16 +5,30 @@ tag.usage = "npm tag @ []"
tag.completion = require("./unpublish.js").completion
-var url = require("url")
- , npm = require("./npm.js")
+var npm = require("./npm.js")
, registry = npm.registry
+ , mapToRegistry = require("./utils/map-to-registry.js")
+ , npa = require("npm-package-arg")
+ , semver = require("semver")
function tag (args, cb) {
- var thing = (args.shift() || "").split("@")
- , project = thing.shift()
- , version = thing.join("@")
+ var thing = npa(args.shift() || "")
+ , project = thing.name
+ , version = thing.rawSpec
, t = args.shift() || npm.config.get("tag")
+
+ t = t.trim()
+
if (!project || !version || !t) return cb("Usage:\n"+tag.usage)
- var uri = url.resolve(npm.config.get("registry"), project)
- registry.tag(uri, version, t, cb)
+
+ if (semver.validRange(t)) {
+ var er = new Error("Tag name must not be a valid SemVer range: " + t)
+ return cb(er)
+ }
+
+ mapToRegistry(project, npm.config, function (er, uri) {
+ if (er) return cb(er)
+
+ registry.tag(uri, version, t, cb)
+ })
}
diff --git a/deps/npm/lib/unbuild.js b/deps/npm/lib/unbuild.js
index b594f28a9ba..8bd6e8507f3 100644
--- a/deps/npm/lib/unbuild.js
+++ b/deps/npm/lib/unbuild.js
@@ -2,7 +2,6 @@ module.exports = unbuild
unbuild.usage = "npm unbuild \n(this is plumbing)"
var readJson = require("read-package-json")
- , rm = require("./utils/gently-rm.js")
, gentlyRm = require("./utils/gently-rm.js")
, npm = require("./npm.js")
, path = require("path")
@@ -15,7 +14,7 @@ var readJson = require("read-package-json")
// args is a list of folders.
// remove any bins/etc, and then delete the folder.
function unbuild (args, silent, cb) {
- if (typeof silent === 'function') cb = silent, silent = false
+ if (typeof silent === "function") cb = silent, silent = false
asyncMap(args, unbuild_(silent), cb)
}
@@ -25,10 +24,10 @@ function unbuild_ (silent) { return function (folder, cb_) {
}
folder = path.resolve(folder)
delete build._didBuild[folder]
- log.verbose(folder.substr(npm.prefix.length + 1), "unbuild")
+ log.verbose("unbuild", folder.substr(npm.prefix.length + 1))
readJson(path.resolve(folder, "package.json"), function (er, pkg) {
// if no json, then just trash it, but no scripts or whatever.
- if (er) return rm(folder, cb)
+ if (er) return gentlyRm(folder, false, cb)
readJson.cache.del(folder)
chain
( [ [lifecycle, pkg, "preuninstall", folder, false, true]
@@ -39,7 +38,7 @@ function unbuild_ (silent) { return function (folder, cb_) {
}
, [rmStuff, pkg, folder]
, [lifecycle, pkg, "postuninstall", folder, false, true]
- , [rm, folder] ]
+ , [gentlyRm, folder, undefined] ]
, cb )
})
}}
@@ -54,7 +53,8 @@ function rmStuff (pkg, folder, cb) {
readJson.cache.del(path.resolve(folder, "package.json"))
- log.verbose([top, gnm, parent], "unbuild " + pkg._id)
+ log.verbose("unbuild rmStuff", pkg._id, "from", gnm)
+ if (!top) log.verbose("unbuild rmStuff", "in", parent)
asyncMap([rmBins, rmMans], function (fn, cb) {
fn(pkg, folder, parent, top, cb)
}, cb)
@@ -66,8 +66,8 @@ function rmBins (pkg, folder, parent, top, cb) {
log.verbose([binRoot, pkg.bin], "binRoot")
asyncMap(Object.keys(pkg.bin), function (b, cb) {
if (process.platform === "win32") {
- chain([ [rm, path.resolve(binRoot, b) + ".cmd"]
- , [rm, path.resolve(binRoot, b) ] ], cb)
+ chain([ [gentlyRm, path.resolve(binRoot, b) + ".cmd", undefined]
+ , [gentlyRm, path.resolve(binRoot, b), undefined] ], cb)
} else {
gentlyRm( path.resolve(binRoot, b)
, !npm.config.get("force") && folder
diff --git a/deps/npm/lib/uninstall.js b/deps/npm/lib/uninstall.js
index 42a9a83e0e5..68869f57902 100644
--- a/deps/npm/lib/uninstall.js
+++ b/deps/npm/lib/uninstall.js
@@ -9,6 +9,7 @@ uninstall.usage = "npm uninstall [@ [[@] ...]"
uninstall.completion = require("./utils/completion/installed-shallow.js")
var fs = require("graceful-fs")
+ , writeFileAtomic = require("write-file-atomic")
, log = require("npmlog")
, readJson = require("read-package-json")
, path = require("path")
@@ -120,7 +121,7 @@ function saver (args, nm, cb_) {
}
}
- fs.writeFile(pj, JSON.stringify(pkg, null, 2) + "\n", function (er) {
+ writeFileAtomic(pj, JSON.stringify(pkg, null, 2) + "\n", function (er) {
return cb_(er, data)
})
})
diff --git a/deps/npm/lib/unpublish.js b/deps/npm/lib/unpublish.js
index 225c1c3c455..2566cd5ae62 100644
--- a/deps/npm/lib/unpublish.js
+++ b/deps/npm/lib/unpublish.js
@@ -1,40 +1,51 @@
module.exports = unpublish
-var url = require("url")
- , log = require("npmlog")
+var log = require("npmlog")
, npm = require("./npm.js")
, registry = npm.registry
, readJson = require("read-package-json")
, path = require("path")
+ , mapToRegistry = require("./utils/map-to-registry.js")
+ , npa = require("npm-package-arg")
unpublish.usage = "npm unpublish [@]"
unpublish.completion = function (opts, cb) {
if (opts.conf.argv.remain.length >= 3) return cb()
- var un = encodeURIComponent(npm.config.get("username"))
- if (!un) return cb()
- var uri = url.resolve(npm.config.get("registry"), "-/by-user/"+un)
- registry.get(uri, null, function (er, pkgs) {
- // do a bit of filtering at this point, so that we don't need
- // to fetch versions for more than one thing, but also don't
- // accidentally a whole project.
- pkgs = pkgs[un]
- if (!pkgs || !pkgs.length) return cb()
- var partial = opts.partialWord.split("@")
- , pp = partial.shift()
- pkgs = pkgs.filter(function (p) {
- return p.indexOf(pp) === 0
- })
- if (pkgs.length > 1) return cb(null, pkgs)
- var uri = url.resolve(npm.config.get("registry"), pkgs[0])
- registry.get(uri, null, function (er, d) {
+ npm.commands.whoami([], true, function (er, username) {
+ if (er) return cb()
+
+ var un = encodeURIComponent(username)
+ if (!un) return cb()
+ var byUser = "-/by-user/" + un
+ mapToRegistry(byUser, npm.config, function (er, uri) {
if (er) return cb(er)
- var vers = Object.keys(d.versions)
- if (!vers.length) return cb(null, pkgs)
- return cb(null, vers.map(function (v) {
- return pkgs[0]+"@"+v
- }))
+
+ registry.get(uri, null, function (er, pkgs) {
+ // do a bit of filtering at this point, so that we don't need
+ // to fetch versions for more than one thing, but also don't
+ // accidentally a whole project.
+ pkgs = pkgs[un]
+ if (!pkgs || !pkgs.length) return cb()
+ var pp = npa(opts.partialWord).name
+ pkgs = pkgs.filter(function (p) {
+ return p.indexOf(pp) === 0
+ })
+ if (pkgs.length > 1) return cb(null, pkgs)
+ mapToRegistry(pkgs[0], npm.config, function (er, uri) {
+ if (er) return cb(er)
+
+ registry.get(uri, null, function (er, d) {
+ if (er) return cb(er)
+ var vers = Object.keys(d.versions)
+ if (!vers.length) return cb(null, pkgs)
+ return cb(null, vers.map(function (v) {
+ return pkgs[0] + "@" + v
+ }))
+ })
+ })
+ })
})
})
}
@@ -42,23 +53,25 @@ unpublish.completion = function (opts, cb) {
function unpublish (args, cb) {
if (args.length > 1) return cb(unpublish.usage)
- var thing = args.length ? args.shift().split("@") : []
- , project = thing.shift()
- , version = thing.join("@")
+ var thing = args.length ? npa(args[0]) : {}
+ , project = thing.name
+ , version = thing.rawSpec
+ log.silly("unpublish", "args[0]", args[0])
+ log.silly("unpublish", "thing", thing)
if (!version && !npm.config.get("force")) {
return cb("Refusing to delete entire project.\n"
- +"Run with --force to do this.\n"
- +unpublish.usage)
+ + "Run with --force to do this.\n"
+ + unpublish.usage)
}
- if (!project || path.resolve(project) === npm.prefix) {
+ if (!project || path.resolve(project) === npm.localPrefix) {
// if there's a package.json in the current folder, then
// read the package name and version out of that.
- var cwdJson = path.join(process.cwd(), "package.json")
+ var cwdJson = path.join(npm.localPrefix, "package.json")
return readJson(cwdJson, function (er, data) {
if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er)
- if (er) return cb("Usage:\n"+unpublish.usage)
+ if (er) return cb("Usage:\n" + unpublish.usage)
gotProject(data.name, data.version, cb)
})
}
@@ -79,7 +92,10 @@ function gotProject (project, version, cb_) {
return cb(er)
}
- var uri = url.resolve(npm.config.get("registry"), project)
- registry.unpublish(uri, version, cb)
+ mapToRegistry(project, npm.config, function (er, uri) {
+ if (er) return cb(er)
+
+ registry.unpublish(uri, version, cb)
+ })
})
}
diff --git a/deps/npm/lib/utils/error-handler.js b/deps/npm/lib/utils/error-handler.js
index 5c4f4c99e80..95b78a8ccbe 100644
--- a/deps/npm/lib/utils/error-handler.js
+++ b/deps/npm/lib/utils/error-handler.js
@@ -11,6 +11,7 @@ var cbCalled = false
, exitCode = 0
, rollbacks = npm.rollbacks
, chain = require("slide").chain
+ , writeStream = require("fs-write-stream-atomic")
process.on("exit", function (code) {
@@ -24,13 +25,18 @@ process.on("exit", function (code) {
}
if (wroteLogFile) {
- log.error("", [""
- ,"Additional logging details can be found in:"
+ // just a line break
+ if (log.levels[log.level] <= log.levels.error) console.error("")
+
+ log.error("",
+ ["Please include the following file with any support request:"
," " + path.resolve("npm-debug.log")
].join("\n"))
wroteLogFile = false
}
- log.error("not ok", "code", code)
+ if (code) {
+ log.error("code", code)
+ }
}
var doExit = npm.config.get("_exit")
@@ -61,17 +67,21 @@ function exit (code, noLog) {
if (er) {
log.error("error rolling back", er)
if (!code) errorHandler(er)
- else reallyExit(er)
+ else if (noLog) rm("npm-debug.log", reallyExit.bind(null, er))
+ else writeLogFile(reallyExit.bind(this, er))
} else {
- rm("npm-debug.log", reallyExit)
+ if (!noLog && code) writeLogFile(reallyExit)
+ else rm("npm-debug.log", reallyExit)
}
})
rollbacks.length = 0
}
else if (code && !noLog) writeLogFile(reallyExit)
- else reallyExit()
+ else rm("npm-debug.log", reallyExit)
+
+ function reallyExit (er) {
+ if (er && !code) code = typeof er.errno === "number" ? er.errno : 1
- function reallyExit() {
// truncate once it's been written.
log.record.length = 0
@@ -87,7 +97,6 @@ function exit (code, noLog) {
function errorHandler (er) {
- var printStack = false
// console.error("errorHandler", er)
if (!npm.config || !npm.config.loaded) {
// logging won't work unless we pretend that it's ready
@@ -112,13 +121,55 @@ function errorHandler (er) {
var m = er.code || er.message.match(/^(?:Error: )?(E[A-Z]+)/)
if (m && !er.code) er.code = m
+ ; [ "type"
+ , "fstream_path"
+ , "fstream_unc_path"
+ , "fstream_type"
+ , "fstream_class"
+ , "fstream_finish_call"
+ , "fstream_linkpath"
+ , "stack"
+ , "fstream_stack"
+ , "statusCode"
+ , "pkgid"
+ ].forEach(function (k) {
+ var v = er[k]
+ if (!v) return
+ if (k === "fstream_stack") v = v.join("\n")
+ log.verbose(k, v)
+ })
+
+ log.verbose("cwd", process.cwd())
+
+ var os = require("os")
+ // log.error("System", os.type() + " " + os.release())
+ // log.error("command", process.argv.map(JSON.stringify).join(" "))
+ // log.error("node -v", process.version)
+ // log.error("npm -v", npm.version)
+ log.error("", os.type() + " " + os.release())
+ log.error("argv", process.argv.map(JSON.stringify).join(" "))
+ log.error("node", process.version)
+ log.error("npm ", "v" + npm.version)
+
+ ; [ "file"
+ , "path"
+ , "code"
+ , "errno"
+ , "syscall"
+ ].forEach(function (k) {
+ var v = er[k]
+ if (v) log.error(k, v)
+ })
+
+ // just a line break
+ if (log.levels[log.level] <= log.levels.error) console.error("")
+
switch (er.code) {
case "ECONNREFUSED":
log.error("", er)
log.error("", ["\nIf you are behind a proxy, please make sure that the"
,"'proxy' config is set properly. See: 'npm help config'"
].join("\n"))
- printStack = true
break
case "EACCES":
@@ -126,7 +177,6 @@ function errorHandler (er) {
log.error("", er)
log.error("", ["\nPlease try running this command again as root/Administrator."
].join("\n"))
- printStack = true
break
case "ELIFECYCLE":
@@ -160,24 +210,22 @@ function errorHandler (er) {
].join("\n"), "JSON.parse")
break
+ // TODO(isaacs)
+ // Add a special case here for E401 and E403 explaining auth issues?
+
case "E404":
var msg = [er.message]
if (er.pkgid && er.pkgid !== "-") {
msg.push("", "'"+er.pkgid+"' is not in the npm registry."
- ,"You should bug the author to publish it")
+ ,"You should bug the author to publish it (or use the name yourself!)")
if (er.parent) {
msg.push("It was specified as a dependency of '"+er.parent+"'")
}
- if (er.pkgid.match(/^node[\.\-]|[\.\-]js$/)) {
- var s = er.pkgid.replace(/^node[\.\-]|[\.\-]js$/g, "")
- if (s !== er.pkgid) {
- s = s.replace(/[^a-z0-9]/g, ' ')
- msg.push("\nMaybe try 'npm search " + s + "'")
- }
- }
msg.push("\nNote that you can also install from a"
- ,"tarball, folder, or http url, or git url.")
+ ,"tarball, folder, http url, or git url.")
}
+ // There's no need to have 404 in the message as well.
+ msg[0] = msg[0].replace(/^404\s+/, "")
log.error("404", msg.join("\n"))
break
@@ -185,9 +233,6 @@ function errorHandler (er) {
log.error("publish fail", ["Cannot publish over existing version."
,"Update the 'version' field in package.json and try again."
,""
- ,"If the previous version was published in error, see:"
- ," npm help unpublish"
- ,""
,"To automatically increment version numbers, see:"
," npm help version"
].join("\n"))
@@ -295,50 +340,13 @@ function errorHandler (er) {
break
default:
- log.error("", er.stack || er.message || er)
- log.error("", ["If you need help, you may report this *entire* log,"
- ,"including the npm and node versions, at:"
+ log.error("", er.message || er)
+ log.error("", ["", "If you need help, you may report this error at:"
," "
].join("\n"))
- printStack = false
break
}
- var os = require("os")
- // just a line break
- if (log.levels[log.level] <= log.levels.error) console.error("")
- log.error("System", os.type() + " " + os.release())
- log.error("command", process.argv
- .map(JSON.stringify).join(" "))
- log.error("cwd", process.cwd())
- log.error("node -v", process.version)
- log.error("npm -v", npm.version)
-
- ; [ "file"
- , "path"
- , "type"
- , "syscall"
- , "fstream_path"
- , "fstream_unc_path"
- , "fstream_type"
- , "fstream_class"
- , "fstream_finish_call"
- , "fstream_linkpath"
- , "code"
- , "errno"
- , "stack"
- , "fstream_stack"
- ].forEach(function (k) {
- var v = er[k]
- if (k === "stack") {
- if (!printStack) return
- if (!v) v = er.message
- }
- if (!v) return
- if (k === "fstream_stack") v = v.join("\n")
- log.error(k, v)
- })
-
exit(typeof er.errno === "number" ? er.errno : 1)
}
@@ -348,19 +356,17 @@ function writeLogFile (cb) {
writingLogFile = true
wroteLogFile = true
- var fs = require("graceful-fs")
- , fstr = fs.createWriteStream("npm-debug.log")
- , util = require("util")
+ var fstr = writeStream("npm-debug.log")
, os = require("os")
, out = ""
log.record.forEach(function (m) {
var pref = [m.id, m.level]
if (m.prefix) pref.push(m.prefix)
- pref = pref.join(' ')
+ pref = pref.join(" ")
m.message.trim().split(/\r?\n/).map(function (line) {
- return (pref + ' ' + line).trim()
+ return (pref + " " + line).trim()
}).forEach(function (line) {
out += line + os.EOL
})
diff --git a/deps/npm/lib/utils/fetch.js b/deps/npm/lib/utils/fetch.js
deleted file mode 100644
index f6e5166ff5f..00000000000
--- a/deps/npm/lib/utils/fetch.js
+++ /dev/null
@@ -1,106 +0,0 @@
-/**
- * Fetch an HTTP url to a local file.
- **/
-
-var request = require("request")
- , fs = require("graceful-fs")
- , npm = require("../npm.js")
- , url = require("url")
- , log = require("npmlog")
- , path = require("path")
- , mkdir = require("mkdirp")
- , chownr = require("chownr")
- , regHost
- , once = require("once")
- , crypto = require("crypto")
-
-module.exports = fetch
-
-function fetch (remote, local, headers, cb) {
- if (typeof cb !== "function") cb = headers, headers = {}
- cb = once(cb)
- log.verbose("fetch", "to=", local)
- mkdir(path.dirname(local), function (er, made) {
- if (er) return cb(er)
- fetch_(remote, local, headers, cb)
- })
-}
-
-function fetch_ (remote, local, headers, cb) {
- var fstr = fs.createWriteStream(local, { mode : npm.modes.file })
- var response = null
-
- fstr.on("error", function (er) {
- cb(er)
- fstr.destroy()
- })
-
- var req = makeRequest(remote, fstr, headers)
- req.on("response", function (res) {
- log.http(res.statusCode, remote)
- response = res
- response.resume()
- // Work around bug in node v0.10.0 where the CryptoStream
- // gets stuck and never starts reading again.
- if (process.version === "v0.10.0") {
- response.resume = function (orig) { return function() {
- var ret = orig.apply(response, arguments)
- if (response.socket.encrypted)
- response.socket.encrypted.read(0)
- return ret
- }}(response.resume)
- }
- })
-
- fstr.on("close", function () {
- var er
- if (response && response.statusCode && response.statusCode >= 400) {
- er = new Error(response.statusCode + " "
- + require("http").STATUS_CODES[response.statusCode])
- }
- cb(er, response)
- })
-}
-
-function makeRequest (remote, fstr, headers) {
- remote = url.parse(remote)
- log.http("GET", remote.href)
- regHost = regHost || url.parse(npm.config.get("registry")).host
-
- if (remote.host === regHost && npm.config.get("always-auth")) {
- remote.auth = new Buffer( npm.config.get("_auth")
- , "base64" ).toString("utf8")
- if (!remote.auth) return fstr.emit("error", new Error(
- "Auth required and none provided. Please run 'npm adduser'"))
- }
-
- var proxy
- if (remote.protocol !== "https:" || !(proxy = npm.config.get("https-proxy"))) {
- proxy = npm.config.get("proxy")
- }
-
- var sessionToken = npm.registry.sessionToken
- if (!sessionToken) {
- sessionToken = crypto.randomBytes(8).toString("hex")
- npm.registry.sessionToken = sessionToken
- }
-
- var ca = remote.host === regHost ? npm.config.get("ca") : undefined
- var opts = { url: remote
- , proxy: proxy
- , strictSSL: npm.config.get("strict-ssl")
- , rejectUnauthorized: npm.config.get("strict-ssl")
- , ca: ca
- , headers:
- { "user-agent": npm.config.get("user-agent")
- , "npm-session": sessionToken
- , referer: npm.registry.refer
- }
- }
- var req = request(opts)
- req.on("error", function (er) {
- fstr.emit("error", er)
- })
- req.pipe(fstr)
- return req
-}
diff --git a/deps/npm/lib/utils/gently-rm.js b/deps/npm/lib/utils/gently-rm.js
index 241740fed6a..d43d0725ebb 100644
--- a/deps/npm/lib/utils/gently-rm.js
+++ b/deps/npm/lib/utils/gently-rm.js
@@ -3,54 +3,159 @@
module.exports = gentlyRm
-var rimraf = require("rimraf")
- , fs = require("graceful-fs")
- , npm = require("../npm.js")
- , path = require("path")
+var npm = require("../npm.js")
+ , log = require("npmlog")
+ , resolve = require("path").resolve
+ , dirname = require("path").dirname
+ , lstat = require("graceful-fs").lstat
+ , readlink = require("graceful-fs").readlink
+ , isInside = require("path-is-inside")
+ , vacuum = require("fs-vacuum")
+ , rimraf = require("rimraf")
+ , some = require("async-some")
-function gentlyRm (p, gently, cb) {
- if (!cb) cb = gently, gently = null
+function gentlyRm (path, gently, cb) {
+ if (!cb) {
+ cb = gently
+ gently = null
+ }
// never rm the root, prefix, or bin dirs.
// just a safety precaution.
- p = path.resolve(p)
- if (p === npm.dir ||
- p === npm.root ||
- p === npm.bin ||
- p === npm.prefix ||
- p === npm.globalDir ||
- p === npm.globalRoot ||
- p === npm.globalBin ||
- p === npm.globalPrefix) {
- return cb(new Error("May not delete: " + p))
+ var prefixes = [
+ npm.dir, npm.root, npm.bin, npm.prefix,
+ npm.globalDir, npm.globalRoot, npm.globalBin, npm.globalPrefix
+ ]
+
+ var resolved = resolve(path)
+ if (prefixes.indexOf(resolved) !== -1) {
+ log.verbose("gentlyRm", resolved, "is part of npm and can't be removed")
+ return cb(new Error("May not delete: "+resolved))
}
- if (npm.config.get("force") || !gently) {
- return rimraf(p, cb)
+ var options = {log : log.silly.bind(log, "gentlyRm")}
+ if (npm.config.get("force") || !gently) options.purge = true
+
+ if (!gently) {
+ log.verbose("gentlyRm", "vacuuming", resolved)
+ return vacuum(resolved, options, cb)
}
- gently = path.resolve(gently)
+ var parent = resolve(gently)
+ log.verbose("gentlyRm", "verifying that", parent, "is managed by npm")
+ some(prefixes, isManaged(parent), function (er, matched) {
+ if (er) return cb(er)
+
+ if (!matched) {
+ log.verbose("gentlyRm", parent, "is not managed by npm")
+ return clobberFail(resolved, parent, cb)
+ }
+
+ log.silly("gentlyRm", parent, "is managed by npm")
+
+ if (isInside(resolved, parent)) {
+ log.silly("gentlyRm", resolved, "is under", parent)
+ log.verbose("gentlyRm", "vacuuming", resolved, "up to", parent)
+ options.base = parent
+ return vacuum(resolved, options, cb)
+ }
+
+ log.silly("gentlyRm", resolved, "is not under", parent)
+ log.silly("gentlyRm", "checking to see if", resolved, "is a link")
+ lstat(resolved, function (er, stat) {
+ if (er) {
+ if (er.code === "ENOENT") return cb(null)
+ return cb(er)
+ }
+
+ if (!stat.isSymbolicLink()) {
+ log.verbose("gentlyRm", resolved, "is outside", parent, "and not a link")
+ return clobberFail(resolved, parent, cb)
+ }
+
+ log.silly("gentlyRm", resolved, "is a link")
+ readlink(resolved, function (er, link) {
+ if (er) {
+ if (er.code === "ENOENT") return cb(null)
+ return cb(er)
+ }
- // lstat it, see if it's a symlink.
- fs.lstat(p, function (er, s) {
- if (er) return rimraf(p, cb)
- if (!s.isSymbolicLink()) next(null, path.resolve(p))
- realish(p, next)
+ var source = resolve(dirname(resolved), link)
+ if (isInside(source, parent)) {
+ log.silly("gentlyRm", source, "inside", parent)
+ log.verbose("gentlyRm", "vacuuming", resolved)
+ return vacuum(resolved, options, cb)
+ }
+
+ log.silly("gentlyRm", "checking to see if", source, "is managed by npm")
+ some(prefixes, isManaged(source), function (er, matched) {
+ if (er) return cb(er)
+
+ if (matched) {
+ log.silly("gentlyRm", source, "is under", matched)
+ log.verbose("gentlyRm", "removing", resolved)
+ rimraf(resolved, cb)
+ }
+
+ log.verbose("gentlyRm", source, "is not managed by npm")
+ return clobberFail(path, parent, cb)
+ })
+ })
+ })
})
+}
- function next (er, rp) {
- if (rp && rp.indexOf(gently) !== 0) {
- return clobberFail(p, gently, cb)
+var resolvedPaths = {}
+function isManaged (target) {
+ return predicate
+
+ function predicate (path, cb) {
+ if (!path) {
+ log.verbose("isManaged", "no path")
+ return cb(null, false)
+ }
+
+ path = resolve(path)
+
+ // if the path has already been memoized, return immediately
+ var resolved = resolvedPaths[path]
+ if (resolved) {
+ var inside = isInside(target, resolved)
+ log.silly("isManaged", target, inside ? "is" : "is not", "inside", resolved)
+
+ return cb(null, inside && path)
}
- rimraf(p, cb)
+
+ // otherwise, check the path
+ lstat(path, function (er, stat) {
+ if (er) {
+ if (er.code === "ENOENT") return cb(null, false)
+
+ return cb(er)
+ }
+
+ // if it's not a link, cache & test the path itself
+ if (!stat.isSymbolicLink()) return cacheAndTest(path, path, target, cb)
+
+ // otherwise, cache & test the link's source
+ readlink(path, function (er, source) {
+ if (er) {
+ if (er.code === "ENOENT") return cb(null, false)
+
+ return cb(er)
+ }
+
+ cacheAndTest(resolve(path, source), path, target, cb)
+ })
+ })
}
-}
-function realish (p, cb) {
- fs.readlink(p, function (er, r) {
- if (er) return cb(er)
- return cb(null, path.resolve(path.dirname(p), r))
- })
+ function cacheAndTest (resolved, source, target, cb) {
+ resolvedPaths[source] = resolved
+ var inside = isInside(target, resolved)
+ log.silly("cacheAndTest", target, inside ? "is" : "is not", "inside", resolved)
+ cb(null, inside && source)
+ }
}
function clobberFail (p, g, cb) {
diff --git a/deps/npm/lib/utils/git.js b/deps/npm/lib/utils/git.js
index 7e20151938c..db5cc7baf07 100644
--- a/deps/npm/lib/utils/git.js
+++ b/deps/npm/lib/utils/git.js
@@ -10,16 +10,20 @@ var exec = require("child_process").execFile
, npm = require("../npm.js")
, which = require("which")
, git = npm.config.get("git")
+ , assert = require("assert")
+ , log = require("npmlog")
function prefixGitArgs() {
return process.platform === "win32" ? ["-c", "core.longpaths=true"] : []
}
function execGit(args, options, cb) {
+ log.info("git", args)
return exec(git, prefixGitArgs().concat(args || []), options, cb)
}
function spawnGit(args, options, cb) {
+ log.info("git", args)
return spawn(git, prefixGitArgs().concat(args || []), options)
}
@@ -33,6 +37,7 @@ function whichGit(cb) {
}
function whichAndExec(args, options, cb) {
+ assert.equal(typeof cb, "function", "no callback provided")
// check for git
whichGit(function (err) {
if (err) {
diff --git a/deps/npm/lib/utils/is-git-url.js b/deps/npm/lib/utils/is-git-url.js
deleted file mode 100644
index 7ded4b602a2..00000000000
--- a/deps/npm/lib/utils/is-git-url.js
+++ /dev/null
@@ -1,13 +0,0 @@
-module.exports = isGitUrl
-
-function isGitUrl (url) {
- switch (url.protocol) {
- case "git:":
- case "git+http:":
- case "git+https:":
- case "git+rsync:":
- case "git+ftp:":
- case "git+ssh:":
- return true
- }
-}
diff --git a/deps/npm/lib/utils/lifecycle.js b/deps/npm/lib/utils/lifecycle.js
index 8bcb99689f4..c0eb83dfb1d 100644
--- a/deps/npm/lib/utils/lifecycle.js
+++ b/deps/npm/lib/utils/lifecycle.js
@@ -71,11 +71,6 @@ function lifecycle_ (pkg, stage, wd, env, unsafe, failOk, cb) {
, p = wd.split("node_modules")
, acc = path.resolve(p.shift())
- // first add the directory containing the `node` executable currently
- // running, so that any lifecycle script that invoke "node" will execute
- // this same one.
- pathArr.unshift(path.dirname(process.execPath))
-
p.forEach(function (pp) {
pathArr.unshift(path.join(acc, "node_modules", ".bin"))
acc = path.join(acc, "node_modules", pp)
@@ -353,13 +348,9 @@ function makeEnv (data, prefix, env) {
function cmd (stage) {
function CMD (args, cb) {
- if (args.length) {
- chain(args.map(function (p) {
- return [npm.commands, "run-script", [p, stage]]
- }), cb)
- } else npm.commands["run-script"]([stage], cb)
+ npm.commands["run-script"]([stage].concat(args), cb)
}
- CMD.usage = "npm "+stage+" "
+ CMD.usage = "npm "+stage+" [-- ]"
var installedShallow = require("./completion/installed-shallow.js")
CMD.completion = function (opts, cb) {
installedShallow(opts, function (d) {
diff --git a/deps/npm/lib/utils/locker.js b/deps/npm/lib/utils/locker.js
index 9e322d7af3e..4479f241dab 100644
--- a/deps/npm/lib/utils/locker.js
+++ b/deps/npm/lib/utils/locker.js
@@ -1,52 +1,75 @@
var crypto = require("crypto")
-var path = require("path")
+var resolve = require("path").resolve
-var npm = require("../npm.js")
-var lockFile = require("lockfile")
+var lockfile = require("lockfile")
var log = require("npmlog")
-var getCacheStat = require("../cache/get-stat.js")
-
-function lockFileName (u) {
- var c = u.replace(/[^a-zA-Z0-9]+/g, "-").replace(/^-+|-+$/g, "")
- , h = crypto.createHash("sha1").update(u).digest("hex")
- h = h.substr(0, 8)
- c = c.substr(-32)
- log.silly("lockFile", h + "-" + c, u)
- return path.resolve(npm.config.get("cache"), h + "-" + c + ".lock")
+var mkdirp = require("mkdirp")
+
+var npm = require("../npm.js")
+var getStat = require("../cache/get-stat.js")
+
+var installLocks = {}
+
+function lockFileName (base, name) {
+ var c = name.replace(/[^a-zA-Z0-9]+/g, "-").replace(/^-+|-+$/g, "")
+ , p = resolve(base, name)
+ , h = crypto.createHash("sha1").update(p).digest("hex")
+ , l = resolve(npm.cache, "_locks")
+
+ return resolve(l, c.substr(0, 24)+"-"+h.substr(0, 16)+".lock")
}
-var myLocks = {}
-function lock (u, cb) {
- // the cache dir needs to exist already for this.
- getCacheStat(function (er, cs) {
- if (er) return cb(er)
- var opts = { stale: npm.config.get("cache-lock-stale")
- , retries: npm.config.get("cache-lock-retries")
- , wait: npm.config.get("cache-lock-wait") }
- var lf = lockFileName(u)
- log.verbose("lock", u, lf)
- lockFile.lock(lf, opts, function(er) {
- if (!er) myLocks[lf] = true
- cb(er)
+function lock (base, name, cb) {
+ getStat(function (er) {
+ var lockDir = resolve(npm.cache, "_locks")
+ mkdirp(lockDir, function () {
+ if (er) return cb(er)
+
+ var opts = { stale: npm.config.get("cache-lock-stale")
+ , retries: npm.config.get("cache-lock-retries")
+ , wait: npm.config.get("cache-lock-wait") }
+ var lf = lockFileName(base, name)
+ lockfile.lock(lf, opts, function (er) {
+ if (er) log.warn("locking", lf, "failed", er)
+
+ if (!er) {
+ log.verbose("lock", "using", lf, "for", resolve(base, name))
+ installLocks[lf] = true
+ }
+
+ cb(er)
+ })
})
})
}
-function unlock (u, cb) {
- var lf = lockFileName(u)
- , locked = myLocks[lf]
+function unlock (base, name, cb) {
+ var lf = lockFileName(base, name)
+ , locked = installLocks[lf]
if (locked === false) {
return process.nextTick(cb)
- } else if (locked === true) {
- myLocks[lf] = false
- lockFile.unlock(lockFileName(u), cb)
- } else {
- throw new Error("Attempt to unlock " + u + ", which hasn't been locked")
+ }
+ else if (locked === true) {
+ lockfile.unlock(lf, function (er) {
+ if (er) {
+ log.warn("unlocking", lf, "failed", er)
+ }
+ else {
+ installLocks[lf] = false
+ log.verbose("unlock", "done using", lf, "for", resolve(base, name))
+ }
+
+ cb(er)
+ })
+ }
+ else {
+ throw new Error(
+ "Attempt to unlock " + resolve(base, name) + ", which hasn't been locked"
+ )
}
}
module.exports = {
- lock: lock,
- unlock: unlock,
- _lockFileName: lockFileName
+ lock : lock,
+ unlock : unlock
}
diff --git a/deps/npm/lib/utils/map-to-registry.js b/deps/npm/lib/utils/map-to-registry.js
new file mode 100644
index 00000000000..cf665e4f656
--- /dev/null
+++ b/deps/npm/lib/utils/map-to-registry.js
@@ -0,0 +1,54 @@
+var url = require("url")
+
+var log = require("npmlog")
+ , npa = require("npm-package-arg")
+
+module.exports = mapToRegistry
+
+function mapToRegistry(name, config, cb) {
+ var uri
+ var scopedRegistry
+
+ // the name itself takes precedence
+ var data = npa(name)
+ if (data.scope) {
+ // the name is definitely scoped, so escape now
+ name = name.replace("/", "%2f")
+
+ log.silly("mapToRegistry", "scope", data.scope)
+
+ scopedRegistry = config.get(data.scope + ":registry")
+ if (scopedRegistry) {
+ log.silly("mapToRegistry", "scopedRegistry (scoped package)", scopedRegistry)
+ uri = url.resolve(scopedRegistry, name)
+ }
+ else {
+ log.verbose("mapToRegistry", "no registry URL found for scope", data.scope)
+ }
+ }
+
+ // ...then --scope=@scope or --scope=scope
+ var scope = config.get("scope")
+ if (!uri && scope) {
+ // I'm an enabler, sorry
+ if (scope.charAt(0) !== "@") scope = "@" + scope
+
+ scopedRegistry = config.get(scope + ":registry")
+ if (scopedRegistry) {
+ log.silly("mapToRegistry", "scopedRegistry (scope in config)", scopedRegistry)
+ uri = url.resolve(scopedRegistry, name)
+ }
+ else {
+ log.verbose("mapToRegistry", "no registry URL found for scope", scope)
+ }
+ }
+
+ // ...and finally use the default registry
+ if (!uri) {
+ uri = url.resolve(config.get("registry"), name)
+ }
+
+ log.verbose("mapToRegistry", "name", name)
+ log.verbose("mapToRegistry", "uri", uri)
+ cb(null, uri)
+}
diff --git a/deps/npm/lib/utils/tar.js b/deps/npm/lib/utils/tar.js
index 192de7a26a2..ede49a121ed 100644
--- a/deps/npm/lib/utils/tar.js
+++ b/deps/npm/lib/utils/tar.js
@@ -3,6 +3,7 @@
var npm = require("../npm.js")
, fs = require("graceful-fs")
+ , writeFileAtomic = require("write-file-atomic")
, path = require("path")
, log = require("npmlog")
, uidNumber = require("uid-number")
@@ -15,15 +16,6 @@ var npm = require("../npm.js")
, fstream = require("fstream")
, Packer = require("fstream-npm")
, lifecycle = require("./lifecycle.js")
- , locker = require("./locker.js")
-
-function lock(path, cb) {
- return locker.lock('tar://' + path, cb)
-}
-
-function unlock(path, cb) {
- return locker.unlock('tar://' + path, cb)
-}
if (process.env.SUDO_UID && myUid === 0) {
if (!isNaN(process.env.SUDO_UID)) myUid = +process.env.SUDO_UID
@@ -51,73 +43,40 @@ function pack (tarball, folder, pkg, dfc, cb) {
}
}
-function pack_ (tarball, folder, pkg, cb_) {
- var tarballLock = false
- , folderLock = false
-
- function cb (er) {
- if (folderLock)
- unlock(folder, function() {
- folderLock = false
- cb(er)
- })
- else if (tarballLock)
- unlock(tarball, function() {
- tarballLock = false
- cb(er)
- })
- else
- cb_(er)
- }
-
- lock(folder, function(er) {
- if (er) return cb(er)
- folderLock = true
- next()
- })
-
- lock(tarball, function (er) {
- if (er) return cb(er)
- tarballLock = true
- next()
- })
-
- function next () {
- if (!tarballLock || !folderLock) return
-
- new Packer({ path: folder, type: "Directory", isDirectory: true })
- .on("error", function (er) {
- if (er) log.error("tar pack", "Error reading " + folder)
- return cb(er)
- })
+function pack_ (tarball, folder, pkg, cb) {
+ new Packer({ path: folder, type: "Directory", isDirectory: true })
+ .on("error", function (er) {
+ if (er) log.error("tar pack", "Error reading " + folder)
+ return cb(er)
+ })
- // By default, npm includes some proprietary attributes in the
- // package tarball. This is sane, and allowed by the spec.
- // However, npm *itself* excludes these from its own package,
- // so that it can be more easily bootstrapped using old and
- // non-compliant tar implementations.
- .pipe(tar.Pack({ noProprietary: !npm.config.get("proprietary-attribs") }))
- .on("error", function (er) {
- if (er) log.error("tar.pack", "tar creation error", tarball)
- cb(er)
- })
- .pipe(zlib.Gzip())
- .on("error", function (er) {
- if (er) log.error("tar.pack", "gzip error "+tarball)
- cb(er)
- })
- .pipe(fstream.Writer({ type: "File", path: tarball }))
- .on("error", function (er) {
- if (er) log.error("tar.pack", "Could not write "+tarball)
- cb(er)
- })
- .on("close", cb)
- }
+ // By default, npm includes some proprietary attributes in the
+ // package tarball. This is sane, and allowed by the spec.
+ // However, npm *itself* excludes these from its own package,
+ // so that it can be more easily bootstrapped using old and
+ // non-compliant tar implementations.
+ .pipe(tar.Pack({ noProprietary: !npm.config.get("proprietary-attribs") }))
+ .on("error", function (er) {
+ if (er) log.error("tar.pack", "tar creation error", tarball)
+ cb(er)
+ })
+ .pipe(zlib.Gzip())
+ .on("error", function (er) {
+ if (er) log.error("tar.pack", "gzip error "+tarball)
+ cb(er)
+ })
+ .pipe(fstream.Writer({ type: "File", path: tarball }))
+ .on("error", function (er) {
+ if (er) log.error("tar.pack", "Could not write "+tarball)
+ cb(er)
+ })
+ .on("close", cb)
}
function unpack (tarball, unpackTarget, dMode, fMode, uid, gid, cb) {
- log.verbose("tar unpack", tarball)
+ log.verbose("tar", "unpack", tarball)
+ log.verbose("tar", "unpacking to", unpackTarget)
if (typeof cb !== "function") cb = gid, gid = null
if (typeof cb !== "function") cb = uid, uid = null
if (typeof cb !== "function") cb = fMode, fMode = npm.modes.file
@@ -129,52 +88,9 @@ function unpack (tarball, unpackTarget, dMode, fMode, uid, gid, cb) {
})
}
-function unpack_ ( tarball, unpackTarget, dMode, fMode, uid, gid, cb_ ) {
- var parent = path.dirname(unpackTarget)
- , base = path.basename(unpackTarget)
- , folderLock
- , tarballLock
-
- function cb (er) {
- if (folderLock)
- unlock(unpackTarget, function() {
- folderLock = false
- cb(er)
- })
- else if (tarballLock)
- unlock(tarball, function() {
- tarballLock = false
- cb(er)
- })
- else
- cb_(er)
- }
-
- lock(unpackTarget, function (er) {
- if (er) return cb(er)
- folderLock = true
- next()
- })
-
- lock(tarball, function (er) {
+function unpack_ ( tarball, unpackTarget, dMode, fMode, uid, gid, cb ) {
+ rm(unpackTarget, function (er) {
if (er) return cb(er)
- tarballLock = true
- next()
- })
-
- function next() {
- if (!tarballLock || !folderLock) return
- rmGunz()
- }
-
- function rmGunz () {
- rm(unpackTarget, function (er) {
- if (er) return cb(er)
- gtp()
- })
- }
-
- function gtp () {
// gzip {tarball} --decompress --stdout \
// | tar -mvxpf - --strip-components=1 -C {unpackTarget}
gunzTarPerm( tarball, unpackTarget
@@ -184,7 +100,7 @@ function unpack_ ( tarball, unpackTarget, dMode, fMode, uid, gid, cb_ ) {
if (er) return cb(er)
readJson(path.resolve(folder, "package.json"), cb)
})
- }
+ })
}
@@ -202,6 +118,17 @@ function gunzTarPerm (tarball, target, dMode, fMode, uid, gid, cb_) {
var fst = fs.createReadStream(tarball)
+ fst.on("open", function (fd) {
+ fs.fstat(fd, function (er, st) {
+ if (er) return fst.emit("error", er)
+ if (st.size === 0) {
+ er = new Error("0-byte tarball\n" +
+ "Please run `npm cache clean`")
+ fst.emit("error", er)
+ }
+ })
+ })
+
// figure out who we're supposed to be, if we're not pretending
// to be a specific user.
if (npm.config.get("unsafe-perm") && process.platform !== "win32") {
@@ -275,73 +202,74 @@ function gunzTarPerm (tarball, target, dMode, fMode, uid, gid, cb_) {
}
- fst.on("error", function (er) {
- if (er) log.error("tar.unpack", "error reading "+tarball)
- cb(er)
- })
- fst.on("data", function OD (c) {
- // detect what it is.
- // Then, depending on that, we'll figure out whether it's
- // a single-file module, gzipped tarball, or naked tarball.
- // gzipped files all start with 1f8b08
- if (c[0] === 0x1F &&
- c[1] === 0x8B &&
- c[2] === 0x08) {
- fst
- .pipe(zlib.Unzip())
- .on("error", function (er) {
- if (er) log.error("tar.unpack", "unzip error "+tarball)
- cb(er)
- })
- .pipe(tar.Extract(extractOpts))
- .on("entry", extractEntry)
- .on("error", function (er) {
- if (er) log.error("tar.unpack", "untar error "+tarball)
- cb(er)
- })
- .on("close", cb)
- } else if (c.toString().match(/^package\//) ||
- c.toString().match(/^pax_global_header/)) {
- // naked tar
- fst
- .pipe(tar.Extract(extractOpts))
- .on("entry", extractEntry)
- .on("error", function (er) {
- if (er) log.error("tar.unpack", "untar error "+tarball)
- cb(er)
- })
- .on("close", cb)
- } else {
- // naked js file
- var jsOpts = { path: path.resolve(target, "index.js") }
-
- if (process.platform !== "win32" &&
- typeof uid === "number" &&
- typeof gid === "number") {
- jsOpts.uid = uid
- jsOpts.gid = gid
- }
+ fst
+ .on("error", function (er) {
+ if (er) log.error("tar.unpack", "error reading "+tarball)
+ cb(er)
+ })
+ .on("data", function OD (c) {
+ // detect what it is.
+ // Then, depending on that, we'll figure out whether it's
+ // a single-file module, gzipped tarball, or naked tarball.
+ // gzipped files all start with 1f8b08
+ if (c[0] === 0x1F &&
+ c[1] === 0x8B &&
+ c[2] === 0x08) {
+ fst
+ .pipe(zlib.Unzip())
+ .on("error", function (er) {
+ if (er) log.error("tar.unpack", "unzip error "+tarball)
+ cb(er)
+ })
+ .pipe(tar.Extract(extractOpts))
+ .on("entry", extractEntry)
+ .on("error", function (er) {
+ if (er) log.error("tar.unpack", "untar error "+tarball)
+ cb(er)
+ })
+ .on("close", cb)
+ } else if (c.toString().match(/^package\//) ||
+ c.toString().match(/^pax_global_header/)) {
+ // naked tar
+ fst
+ .pipe(tar.Extract(extractOpts))
+ .on("entry", extractEntry)
+ .on("error", function (er) {
+ if (er) log.error("tar.unpack", "untar error "+tarball)
+ cb(er)
+ })
+ .on("close", cb)
+ } else {
+ // naked js file
+ var jsOpts = { path: path.resolve(target, "index.js") }
+
+ if (process.platform !== "win32" &&
+ typeof uid === "number" &&
+ typeof gid === "number") {
+ jsOpts.uid = uid
+ jsOpts.gid = gid
+ }
- fst
- .pipe(fstream.Writer(jsOpts))
- .on("error", function (er) {
- if (er) log.error("tar.unpack", "copy error "+tarball)
- cb(er)
- })
- .on("close", function () {
- var j = path.resolve(target, "package.json")
- readJson(j, function (er, d) {
- if (er) {
- log.error("not a package", tarball)
- return cb(er)
- }
- fs.writeFile(j, JSON.stringify(d) + "\n", cb)
+ fst
+ .pipe(fstream.Writer(jsOpts))
+ .on("error", function (er) {
+ if (er) log.error("tar.unpack", "copy error "+tarball)
+ cb(er)
})
- })
- }
+ .on("close", function () {
+ var j = path.resolve(target, "package.json")
+ readJson(j, function (er, d) {
+ if (er) {
+ log.error("not a package", tarball)
+ return cb(er)
+ }
+ writeFileAtomic(j, JSON.stringify(d) + "\n", cb)
+ })
+ })
+ }
- // now un-hook, and re-emit the chunk
- fst.removeListener("data", OD)
- fst.emit("data", c)
- })
+ // now un-hook, and re-emit the chunk
+ fst.removeListener("data", OD)
+ fst.emit("data", c)
+ })
}
diff --git a/deps/npm/lib/version.js b/deps/npm/lib/version.js
index 95d5ff2ee2b..a15e2c391c8 100644
--- a/deps/npm/lib/version.js
+++ b/deps/npm/lib/version.js
@@ -6,6 +6,7 @@ var exec = require("child_process").execFile
, semver = require("semver")
, path = require("path")
, fs = require("graceful-fs")
+ , writeFileAtomic = require("write-file-atomic")
, chain = require("slide").chain
, log = require("npmlog")
, which = require("which")
@@ -23,7 +24,7 @@ version.usage = "npm version [ | major | minor | patch | prerelease
function version (args, silent, cb_) {
if (typeof cb_ !== "function") cb_ = silent, silent = false
if (args.length > 1) return cb_(version.usage)
- fs.readFile(path.join(process.cwd(), "package.json"), function (er, data) {
+ fs.readFile(path.join(npm.localPrefix, "package.json"), function (er, data) {
if (!args.length) {
var v = {}
Object.keys(process.versions).forEach(function (k) {
@@ -63,7 +64,7 @@ function version (args, silent, cb_) {
if (data.version === newVer) return cb_(new Error("Version not changed"))
data.version = newVer
- fs.stat(path.join(process.cwd(), ".git"), function (er, s) {
+ fs.stat(path.join(npm.localPrefix, ".git"), function (er, s) {
function cb (er) {
if (!er && !silent) console.log("v" + newVer)
cb_(er)
@@ -83,6 +84,15 @@ function checkGit (data, cb) {
// check for git
git.whichAndExec(args, options, function (er, stdout) {
+ if (er && er.code === "ENOGIT") {
+ log.warn(
+ "version",
+ "This is a Git checkout, but the git command was not found.",
+ "npm could not create a Git tag for this release!"
+ )
+ return write(data, cb)
+ }
+
var lines = stdout.trim().split("\n").filter(function (line) {
return line.trim() && !line.match(/^\?\? /)
}).map(function (line) {
@@ -111,7 +121,7 @@ function checkGit (data, cb) {
}
function write (data, cb) {
- fs.writeFile( path.join(process.cwd(), "package.json")
+ writeFileAtomic( path.join(npm.localPrefix, "package.json")
, new Buffer(JSON.stringify(data, null, 2) + "\n")
, cb )
}
diff --git a/deps/npm/lib/view.js b/deps/npm/lib/view.js
index 33bf550dd9f..6b45cca2ec0 100644
--- a/deps/npm/lib/view.js
+++ b/deps/npm/lib/view.js
@@ -4,21 +4,26 @@ module.exports = view
view.usage = "npm view pkg[@version] [[.subfield]...]"
view.completion = function (opts, cb) {
- var uri
if (opts.conf.argv.remain.length <= 2) {
- uri = url.resolve(npm.config.get("registry"), "-/short")
- return registry.get(uri, null, cb)
+ return mapToRegistry("-/short", npm.config, function (er, uri) {
+ if (er) return cb(er)
+
+ registry.get(uri, null, cb)
+ })
}
// have the package, get the fields.
var tag = npm.config.get("tag")
- uri = url.resolve(npm.config.get("registry"), opts.conf.argv.remain[2])
- registry.get(uri, null, function (er, d) {
+ mapToRegistry(opts.conf.argv.remain[2], npm.config, function (er, uri) {
if (er) return cb(er)
- var dv = d.versions[d["dist-tags"][tag]]
- , fields = []
- d.versions = Object.keys(d.versions).sort(semver.compareLoose)
- fields = getFields(d).concat(getFields(dv))
- cb(null, fields)
+
+ registry.get(uri, null, function (er, d) {
+ if (er) return cb(er)
+ var dv = d.versions[d["dist-tags"][tag]]
+ , fields = []
+ d.versions = Object.keys(d.versions).sort(semver.compareLoose)
+ fields = getFields(d).concat(getFields(dv))
+ cb(null, fields)
+ })
})
function getFields (d, f, pref) {
@@ -30,11 +35,12 @@ view.completion = function (opts, cb) {
var p = pref.concat(k).join(".")
f.push(p)
if (Array.isArray(d[k])) {
- return d[k].forEach(function (val, i) {
+ d[k].forEach(function (val, i) {
var pi = p + "[" + i + "]"
if (val && typeof val === "object") getFields(val, f, [p])
else f.push(pi)
})
+ return
}
if (typeof d[k] === "object") getFields(d[k], f, [p])
})
@@ -42,71 +48,105 @@ view.completion = function (opts, cb) {
}
}
-var url = require("url")
- , npm = require("./npm.js")
+var npm = require("./npm.js")
+ , readJson = require("read-package-json")
, registry = npm.registry
, log = require("npmlog")
, util = require("util")
, semver = require("semver")
+ , mapToRegistry = require("./utils/map-to-registry.js")
+ , npa = require("npm-package-arg")
+ , path = require("path")
function view (args, silent, cb) {
if (typeof cb !== "function") cb = silent, silent = false
- if (!args.length) return cb("Usage: "+view.usage)
+
+ if (!args.length) args = ["."]
+
var pkg = args.shift()
- , nv = pkg.split("@")
- , name = nv.shift()
- , version = nv.join("@") || npm.config.get("tag")
+ , nv = npa(pkg)
+ , name = nv.name
+ , local = (name === "." || !name)
+
+ if (npm.config.get("global") && local) {
+ return cb(new Error("Cannot use view command in global mode."))
+ }
- if (name === ".") return cb(view.usage)
+ if (local) {
+ var dir = npm.prefix
+ readJson(path.resolve(dir, "package.json"), function (er, d) {
+ d = d || {}
+ if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er)
+ if (!d.name) return cb(new Error("Invalid package.json"))
+ var p = d.name
+ nv = npa(p)
+ if (pkg && ~pkg.indexOf("@")) {
+ nv.rawSpec = pkg.split("@")[pkg.indexOf("@")]
+ }
+
+ fetchAndRead(nv, args, silent, cb)
+ })
+ } else {
+ fetchAndRead(nv, args, silent, cb)
+ }
+}
+
+function fetchAndRead (nv, args, silent, cb) {
// get the data about this package
- var uri = url.resolve(npm.config.get("registry"), name)
- registry.get(uri, null, function (er, data) {
+ var name = nv.name
+ , version = nv.rawSpec || npm.config.get("tag")
+
+ mapToRegistry(name, npm.config, function (er, uri) {
if (er) return cb(er)
- if (data["dist-tags"] && data["dist-tags"].hasOwnProperty(version)) {
- version = data["dist-tags"][version]
- }
- if (data.time && data.time.unpublished) {
- var u = data.time.unpublished
- er = new Error("Unpublished by " + u.name + " on " + u.time)
- er.statusCode = 404
- er.code = "E404"
- er.pkgid = data._id
- return cb(er, data)
- }
+ registry.get(uri, null, function (er, data) {
+ if (er) return cb(er)
+ if (data["dist-tags"] && data["dist-tags"].hasOwnProperty(version)) {
+ version = data["dist-tags"][version]
+ }
+ if (data.time && data.time.unpublished) {
+ var u = data.time.unpublished
+ er = new Error("Unpublished by " + u.name + " on " + u.time)
+ er.statusCode = 404
+ er.code = "E404"
+ er.pkgid = data._id
+ return cb(er, data)
+ }
- var results = []
- , error = null
- , versions = data.versions || {}
- data.versions = Object.keys(versions).sort(semver.compareLoose)
- if (!args.length) args = [""]
-
- // remove readme unless we asked for it
- if (-1 === args.indexOf("readme")) {
- delete data.readme
- }
- Object.keys(versions).forEach(function (v) {
- if (semver.satisfies(v, version, true)) args.forEach(function (args) {
- // remove readme unless we asked for it
- if (-1 === args.indexOf("readme")) {
- delete versions[v].readme
- }
- results.push(showFields(data, versions[v], args))
+ var results = []
+ , error = null
+ , versions = data.versions || {}
+ data.versions = Object.keys(versions).sort(semver.compareLoose)
+ if (!args.length) args = [""]
+
+ // remove readme unless we asked for it
+ if (-1 === args.indexOf("readme")) {
+ delete data.readme
+ }
+
+ Object.keys(versions).forEach(function (v) {
+ if (semver.satisfies(v, version, true)) args.forEach(function (args) {
+ // remove readme unless we asked for it
+ if (-1 === args.indexOf("readme")) {
+ delete versions[v].readme
+ }
+ results.push(showFields(data, versions[v], args))
+ })
})
- })
- results = results.reduce(reducer, {})
- var retval = results
+ results = results.reduce(reducer, {})
+ var retval = results
- if (args.length === 1 && args[0] === "") {
- retval = cleanBlanks(retval)
- log.silly("cleanup", retval)
- }
+ if (args.length === 1 && args[0] === "") {
+ retval = cleanBlanks(retval)
+ log.silly("cleanup", retval)
+ }
- if (error || silent) cb(error, retval)
- else printData(results, data._id, cb.bind(null, error, retval))
+ if (error || silent) cb(error, retval)
+ else printData(results, data._id, cb.bind(null, error, retval))
+ })
})
}
@@ -175,9 +215,7 @@ function search (data, fields, version, title) {
results = results.reduce(reducer, {})
return results
}
- if (!data.hasOwnProperty(field)) {
- return
- }
+ if (!data.hasOwnProperty(field)) return undefined
data = data[field]
if (tail.length) {
if (typeof data === "object") {
@@ -196,15 +234,15 @@ function search (data, fields, version, title) {
function printData (data, name, cb) {
var versions = Object.keys(data)
, msg = ""
- , showVersions = versions.length > 1
- , showFields
+ , includeVersions = versions.length > 1
+ , includeFields
versions.forEach(function (v) {
var fields = Object.keys(data[v])
- showFields = showFields || (fields.length > 1)
+ includeFields = includeFields || (fields.length > 1)
fields.forEach(function (f) {
var d = cleanup(data[v][f])
- if (showVersions || showFields || typeof d !== "string") {
+ if (includeVersions || includeFields || typeof d !== "string") {
d = cleanup(data[v][f])
d = npm.config.get("json")
? JSON.stringify(d, null, 2)
@@ -212,10 +250,10 @@ function printData (data, name, cb) {
} else if (typeof d === "string" && npm.config.get("json")) {
d = JSON.stringify(d)
}
- if (f && showFields) f += " = "
+ if (f && includeFields) f += " = "
if (d.indexOf("\n") !== -1) d = " \n" + d
- msg += (showVersions ? name + "@" + v + " " : "")
- + (showFields ? f : "") + d + "\n"
+ msg += (includeVersions ? name + "@" + v + " " : "")
+ + (includeFields ? f : "") + d + "\n"
})
})
@@ -259,4 +297,3 @@ function unparsePerson (d) {
+ (d.email ? " <"+d.email+">" : "")
+ (d.url ? " ("+d.url+")" : "")
}
-
diff --git a/deps/npm/lib/whoami.js b/deps/npm/lib/whoami.js
index f1c67e2b0df..b33f93743d2 100644
--- a/deps/npm/lib/whoami.js
+++ b/deps/npm/lib/whoami.js
@@ -1,13 +1,39 @@
-module.exports = whoami
-
var npm = require("./npm.js")
-whoami.usage = "npm whoami\n(just prints the 'username' config)"
+module.exports = whoami
+
+whoami.usage = "npm whoami\n(just prints username according to given registry)"
function whoami (args, silent, cb) {
- if (typeof cb !== "function") cb = silent, silent = false
- var me = npm.config.get("username")
- var msg = me ? me : "Not authed. Run 'npm adduser'"
+ // FIXME: need tighter checking on this, but is a breaking change
+ if (typeof cb !== "function") {
+ cb = silent
+ silent = false
+ }
+
+ var registry = npm.config.get("registry")
+ if (!registry) return cb(new Error("no default registry set"))
+
+ var credentials = npm.config.getCredentialsByURI(registry)
+ if (credentials) {
+ if (credentials.username) {
+ if (!silent) console.log(credentials.username)
+ return process.nextTick(cb.bind(this, null, credentials.username))
+ }
+ else if (credentials.token) {
+ return npm.registry.whoami(registry, function (er, username) {
+ if (er) return cb(er)
+
+ if (!silent) console.log(username)
+ cb(null, username)
+ })
+ }
+ }
+
+ // At this point, if they have a credentials object, it doesn't
+ // have a token or auth in it. Probably just the default
+ // registry.
+ var msg = "Not authed. Run 'npm adduser'"
if (!silent) console.log(msg)
- process.nextTick(cb.bind(this, null, me))
+ process.nextTick(cb.bind(this, null, msg))
}
diff --git a/deps/npm/man/man1/npm-README.1 b/deps/npm/man/man1/npm-README.1
index cfa8b459836..a7cf1046f0c 100644
--- a/deps/npm/man/man1/npm-README.1
+++ b/deps/npm/man/man1/npm-README.1
@@ -1,220 +1,176 @@
-.\" Generated with Ronnjs 0.3.8
-.\" http://github.com/kapouer/ronnjs/
-.
-.TH "NPM" "1" "September 2014" "" ""
-.
+.TH "NPM" "1" "October 2014" "" ""
.SH "NAME"
-\fBnpm\fR \-\- node package manager![Build Status \fIhttps://img\.shields\.io/travis/npm/npm/master\.svg)](https://travis\-ci\.org/npm/npm\fR
-## SYNOPSIS
-.
+\fBnpm\fR \- node package manager
+.P
+Build Status \fIhttps://img\.shields\.io/travis/npm/npm/master\.svg\fR \fIhttps://travis\-ci\.org/npm/npm\fR
+.SH SYNOPSIS
.P
This is just enough info to get you up and running\.
-.
.P
-Much more info available via \fBnpm help\fR once it\'s installed\.
-.
-.SH "IMPORTANT"
+Much more info available via \fBnpm help\fR once it's installed\.
+.SH IMPORTANT
+.P
\fBYou need node v0\.8 or higher to run this program\.\fR
-.
.P
To install an old \fBand unsupported\fR version of npm that works on node 0\.3
and prior, clone the git repo and dig through the old tags and branches\.
-.
-.SH "Super Easy Install"
-npm comes with node now\.
-.
-.SS "Windows Computers"
-Get the MSI\. npm is in it\.
-.
-.SS "Apple Macintosh Computers"
-Get the pkg\. npm is in it\.
-.
-.SS "Other Sorts of Unices"
+.SH Super Easy Install
+.P
+npm comes with node \fIhttp://nodejs\.org/download/\fR now\.
+.SS Windows Computers
+.P
+Get the MSI \fIhttp://nodejs\.org/download/\fR\|\. npm is in it\.
+.SS Apple Macintosh Computers
+.P
+Get the pkg \fIhttp://nodejs\.org/download/\fR\|\. npm is in it\.
+.SS Other Sorts of Unices
+.P
Run \fBmake install\fR\|\. npm will be installed with node\.
-.
.P
If you want a more fancy pants install (a different version, customized
paths, etc\.) then read on\.
-.
-.SH "Fancy Install (Unix)"
-There\'s a pretty robust install script at \fIhttps://www\.npmjs\.org/install\.sh\fR\|\. You can download that and run it\.
-.
-.P
-Here\'s an example using curl:
-.
-.IP "" 4
-.
+.SH Fancy Install (Unix)
+.P
+There's a pretty robust install script at
+https://www\.npmjs\.org/install\.sh\|\. You can download that and run it\.
+.P
+Here's an example using curl:
+.P
+.RS 2
.nf
curl \-L https://npmjs\.org/install\.sh | sh
-.
.fi
-.
-.IP "" 0
-.
-.SS "Slightly Fancier"
+.RE
+.SS Slightly Fancier
+.P
You can set any npm configuration params with that script:
-.
-.IP "" 4
-.
+.P
+.RS 2
.nf
npm_config_prefix=/some/path sh install\.sh
-.
.fi
-.
-.IP "" 0
-.
+.RE
.P
Or, you can run it in uber\-debuggery mode:
-.
-.IP "" 4
-.
+.P
+.RS 2
.nf
npm_debug=1 sh install\.sh
-.
.fi
-.
-.IP "" 0
-.
-.SS "Even Fancier"
+.RE
+.SS Even Fancier
+.P
Get the code with git\. Use \fBmake\fR to build the docs and do other stuff\.
If you plan on hacking on npm, \fBmake link\fR is your friend\.
-.
.P
-If you\'ve got the npm source code, you can also semi\-permanently set
+If you've got the npm source code, you can also semi\-permanently set
arbitrary config keys using the \fB\|\./configure \-\-key=val \.\.\.\fR, and then
run npm commands by doing \fBnode cli\.js \fR\|\. (This is helpful
for testing, or running stuff without actually installing npm itself\.)
-.
-.SH "Fancy Windows Install"
-You can download a zip file from \fIhttps://npmjs\.org/dist/\fR, and unpack it
+.SH Fancy Windows Install
+.P
+You can download a zip file from https://npmjs\.org/dist/, and unpack it
in the same folder where node\.exe lives\.
-.
.P
-If that\'s not fancy enough for you, then you can fetch the code with
+If that's not fancy enough for you, then you can fetch the code with
git, and mess with it directly\.
-.
-.SH "Installing on Cygwin"
+.SH Installing on Cygwin
+.P
No\.
-.
-.SH "Permissions when Using npm to Install Other Stuff"
+.SH Permissions when Using npm to Install Other Stuff
+.P
\fBtl;dr\fR
-.
-.IP "\(bu" 4
-Use \fBsudo\fR for greater safety\. Or don\'t, if you prefer not to\.
-.
-.IP "\(bu" 4
-npm will downgrade permissions if it\'s root before running any build
+.RS 0
+.IP \(bu 2
+Use \fBsudo\fR for greater safety\. Or don't, if you prefer not to\.
+.IP \(bu 2
+npm will downgrade permissions if it's root before running any build
scripts that package authors specified\.
-.
-.IP "" 0
-.
-.SS "More details\.\.\."
+
+.RE
+.SS More details\.\.\.
+.P
As of version 0\.3, it is recommended to run npm as root\.
This allows npm to change the user identifier to the \fBnobody\fR user prior
to running any package build or test commands\.
-.
.P
If you are not the root user, or if you are on a platform that does not
support uid switching, then npm will not attempt to change the userid\.
-.
.P
If you would like to ensure that npm \fBalways\fR runs scripts as the
"nobody" user, and have it fail if it cannot downgrade permissions, then
set the following configuration param:
-.
-.IP "" 4
-.
+.P
+.RS 2
.nf
npm config set unsafe\-perm false
-.
.fi
-.
-.IP "" 0
-.
+.RE
.P
This will prevent running in unsafe mode, even as non\-root users\.
-.
-.SH "Uninstalling"
+.SH Uninstalling
+.P
So sad to see you go\.
-.
-.IP "" 4
-.
+.P
+.RS 2
.nf
sudo npm uninstall npm \-g
-.
.fi
-.
-.IP "" 0
-.
+.RE
.P
Or, if that fails,
-.
-.IP "" 4
-.
+.P
+.RS 2
.nf
sudo make uninstall
-.
.fi
-.
-.IP "" 0
-.
-.SH "More Severe Uninstalling"
+.RE
+.SH More Severe Uninstalling
+.P
Usually, the above instructions are sufficient\. That will remove
-npm, but leave behind anything you\'ve installed\.
-.
+npm, but leave behind anything you've installed\.
.P
If you would like to remove all the packages that you have installed,
then you can use the \fBnpm ls\fR command to find them, and then \fBnpm rm\fR to
remove them\.
-.
.P
-To remove cruft left behind by npm 0\.x, you can use the included \fBclean\-old\.sh\fR script file\. You can run it conveniently like this:
-.
-.IP "" 4
-.
+To remove cruft left behind by npm 0\.x, you can use the included
+\fBclean\-old\.sh\fR script file\. You can run it conveniently like this:
+.P
+.RS 2
.nf
npm explore npm \-g \-\- sh scripts/clean\-old\.sh
-.
.fi
-.
-.IP "" 0
-.
+.RE
.P
npm uses two configuration files, one for per\-user configs, and another
for global (every\-user) configs\. You can view them by doing:
-.
-.IP "" 4
-.
+.P
+.RS 2
.nf
npm config get userconfig # defaults to ~/\.npmrc
npm config get globalconfig # defaults to /usr/local/etc/npmrc
-.
.fi
-.
-.IP "" 0
-.
+.RE
.P
Uninstalling npm does not remove configuration files by default\. You
must remove them yourself manually if you want them gone\. Note that
this means that future npm installs will not remember the settings that
you have chosen\.
-.
-.SH "Using npm Programmatically"
+.SH Using npm Programmatically
+.P
If you would like to use npm programmatically, you can do that\.
-It\'s not very well documented, but it \fIis\fR rather simple\.
-.
+It's not very well documented, but it \fIis\fR rather simple\.
.P
Most of the time, unless you actually want to do all the things that
-npm does, you should try using one of npm\'s dependencies rather than
+npm does, you should try using one of npm's dependencies rather than
using npm itself, if possible\.
-.
.P
Eventually, npm will be just a thin cli wrapper around the modules
that it depends on, but for now, there are some things that you must
use npm itself to do\.
-.
-.IP "" 4
-.
+.P
+.RS 2
.nf
var npm = require("npm")
npm\.load(myConfigObject, function (er) {
@@ -223,119 +179,100 @@ npm\.load(myConfigObject, function (er) {
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) { \.\.\.\. })
})
-.
.fi
-.
-.IP "" 0
-.
+.RE
.P
The \fBload\fR function takes an object hash of the command\-line configs\.
The various \fBnpm\.commands\.\fR functions take an \fBarray\fR of
-positional argument \fBstrings\fR\|\. The last argument to any \fBnpm\.commands\.\fR function is a callback\. Some commands take other
+positional argument \fBstrings\fR\|\. The last argument to any
+\fBnpm\.commands\.\fR function is a callback\. Some commands take other
optional arguments\. Read the source\.
-.
.P
You cannot set configs individually for any single npm function at this
time\. Since \fBnpm\fR is a singleton, any call to \fBnpm\.config\.set\fR will
change the value for \fIall\fR npm commands in that process\.
-.
.P
See \fB\|\./bin/npm\-cli\.js\fR for an example of pulling config values off of the
command line arguments using nopt\. You may also want to check out \fBnpm
help config\fR to learn about all the options you can set there\.
-.
-.SH "More Docs"
+.SH More Docs
+.P
Check out the docs \fIhttps://www\.npmjs\.org/doc/\fR,
especially the faq \fIhttps://www\.npmjs\.org/doc/faq\.html\fR\|\.
-.
.P
You can use the \fBnpm help\fR command to read any of them\.
-.
.P
-If you\'re a developer, and you want to use npm to publish your program,
+If you're a developer, and you want to use npm to publish your program,
you should read this \fIhttps://www\.npmjs\.org/doc/developers\.html\fR
-.
-.SH "Legal Stuff"
+.SH Legal Stuff
+.P
"npm" and "The npm Registry" are owned by npm, Inc\.
All rights reserved\. See the included LICENSE file for more details\.
-.
.P
"Node\.js" and "node" are trademarks owned by Joyent, Inc\.
-.
.P
Modules published on the npm registry are not officially endorsed by
npm, Inc\. or the Node\.js project\.
-.
.P
Data published to the npm registry is not part of npm itself, and is
the sole property of the publisher\. While every effort is made to
ensure accountability, there is absolutely no guarantee, warrantee, or
assertion expressed or implied as to the quality, fitness for a
specific purpose, or lack of malice in any given npm package\.
-.
.P
If you have a complaint about a package in the public npm registry,
and cannot resolve it with the package
-owner \fIhttps://www\.npmjs\.org/doc/misc/npm\-disputes\.html\fR, please email \fIsupport@npmjs\.com\fR and explain the situation\.
-.
+owner \fIhttps://www\.npmjs\.org/doc/misc/npm\-disputes\.html\fR, please email
+support@npmjs\.com and explain the situation\.
.P
Any data published to The npm Registry (including user account
information) may be removed or modified at the sole discretion of the
npm server administrators\.
-.
-.SS "In plainer english"
+.SS In plainer english
+.P
npm is the property of npm, Inc\.
-.
.P
-If you publish something, it\'s yours, and you are solely accountable
+If you publish something, it's yours, and you are solely accountable
for it\.
-.
.P
-If other people publish something, it\'s theirs\.
-.
+If other people publish something, it's theirs\.
.P
Users can publish Bad Stuff\. It will be removed promptly if reported\.
But there is no vetting process for published modules, and you use
them at your own risk\. Please inspect the source\.
-.
.P
If you publish Bad Stuff, we may delete it from the registry, or even
-ban your account in extreme cases\. So don\'t do that\.
-.
-.SH "BUGS"
+ban your account in extreme cases\. So don't do that\.
+.SH BUGS
+.P
When you find issues, please report them:
-.
-.IP "\(bu" 4
-web: \fIhttps://github\.com/npm/npm/issues\fR
-.
-.IP "\(bu" 4
-email: \fInpm\-@googlegroups\.com\fR
-.
-.IP "" 0
-.
-.P
-Be sure to include \fIall\fR of the output from the npm command that didn\'t work
+.RS 0
+.IP \(bu 2
+web:
+https://github\.com/npm/npm/issues
+.IP \(bu 2
+email:
+npm\-@googlegroups\.com
+
+.RE
+.P
+Be sure to include \fIall\fR of the output from the npm command that didn't work
as expected\. The \fBnpm\-debug\.log\fR file is also helpful to provide\.
-.
.P
You can also look for isaacs in #node\.js on irc://irc\.freenode\.net\. He
will no doubt tell you to put the output in a gist or email\.
-.
-.SH "SEE ALSO"
-.
-.IP "\(bu" 4
+.SH SEE ALSO
+.RS 0
+.IP \(bu 2
npm help npm
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help 7 faq
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help help
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help 7 index
-.
-.IP "" 0
+
+.RE
diff --git a/deps/npm/man/man1/npm-adduser.1 b/deps/npm/man/man1/npm-adduser.1
index da1dcdbc3f3..6b85986e02e 100644
--- a/deps/npm/man/man1/npm-adduser.1
+++ b/deps/npm/man/man1/npm-adduser.1
@@ -1,63 +1,85 @@
-.\" Generated with Ronnjs 0.3.8
-.\" http://github.com/kapouer/ronnjs/
-.
-.TH "NPM\-ADDUSER" "1" "September 2014" "" ""
-.
+.TH "NPM\-ADDUSER" "1" "October 2014" "" ""
.SH "NAME"
-\fBnpm-adduser\fR \-\- Add a registry user account
-.
-.SH "SYNOPSIS"
-.
+\fBnpm-adduser\fR \- Add a registry user account
+.SH SYNOPSIS
+.P
+.RS 2
.nf
-npm adduser
-.
+npm adduser [\-\-registry=url] [\-\-scope=@orgname] [\-\-always\-auth]
.fi
-.
-.SH "DESCRIPTION"
-Create or verify a user named \fB\fR in the npm registry, and
-save the credentials to the \fB\|\.npmrc\fR file\.
-.
+.RE
+.SH DESCRIPTION
+.P
+Create or verify a user named \fB\fR in the specified registry, and
+save the credentials to the \fB\|\.npmrc\fR file\. If no registry is specified,
+the default registry will be used (see npm help 7 \fBnpm\-config\fR)\.
.P
The username, password, and email are read in from prompts\.
-.
.P
You may use this command to change your email address, but not username
or password\.
-.
.P
-To reset your password, go to \fIhttps://npmjs\.org/forgot\fR
-.
+To reset your password, go to https://www\.npmjs\.org/forgot
.P
You may use this command multiple times with the same user account to
authorize on a new machine\.
-.
-.SH "CONFIGURATION"
-.
-.SS "registry"
+.P
+\fBnpm login\fR is an alias to \fBadduser\fR and behaves exactly the same way\.
+.SH CONFIGURATION
+.SS registry
+.P
Default: http://registry\.npmjs\.org/
-.
.P
-The base URL of the npm package registry\.
-.
-.SH "SEE ALSO"
-.
-.IP "\(bu" 4
+The base URL of the npm package registry\. If \fBscope\fR is also specified,
+this registry will only be used for packages with that scope\. See npm help 7 \fBnpm\-scope\fR\|\.
+.SS scope
+.P
+Default: none
+.P
+If specified, the user and login credentials given will be associated
+with the specified scope\. See npm help 7 \fBnpm\-scope\fR\|\. You can use both at the same time,
+e\.g\.
+.P
+.RS 2
+.nf
+npm adduser \-\-registry=http://myregistry\.example\.com \-\-scope=@myco
+.fi
+.RE
+.P
+This will set a registry for the given scope and login or create a user for
+that registry at the same time\.
+.SS always\-auth
+.P
+Default: false
+.P
+If specified, save configuration indicating that all requests to the given
+registry should include authorization information\. Useful for private
+registries\. Can be used with \fB\-\-registry\fR and / or \fB\-\-scope\fR, e\.g\.
+.P
+.RS 2
+.nf
+npm adduser \-\-registry=http://private\-registry\.example\.com \-\-always\-auth
+.fi
+.RE
+.P
+This will ensure that all requests to that registry (including for tarballs)
+include an authorization header\. See \fBalways\-auth\fR in npm help 7 \fBnpm\-config\fR for more
+details on always\-auth\. Registry\-specific configuaration of \fBalways\-auth\fR takes
+precedence over any global configuration\.
+.SH SEE ALSO
+.RS 0
+.IP \(bu 2
npm help 7 registry
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help config
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help 7 config
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help 5 npmrc
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help owner
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help whoami
-.
-.IP "" 0
+
+.RE
diff --git a/deps/npm/man/man1/npm-bin.1 b/deps/npm/man/man1/npm-bin.1
index 548bb6ad347..6552d6cf4d5 100644
--- a/deps/npm/man/man1/npm-bin.1
+++ b/deps/npm/man/man1/npm-bin.1
@@ -1,40 +1,30 @@
-.\" Generated with Ronnjs 0.3.8
-.\" http://github.com/kapouer/ronnjs/
-.
-.TH "NPM\-BIN" "1" "September 2014" "" ""
-.
+.TH "NPM\-BIN" "1" "October 2014" "" ""
.SH "NAME"
-\fBnpm-bin\fR \-\- Display npm bin folder
-.
-.SH "SYNOPSIS"
-.
+\fBnpm-bin\fR \- Display npm bin folder
+.SH SYNOPSIS
+.P
+.RS 2
.nf
npm bin
-.
.fi
-.
-.SH "DESCRIPTION"
+.RE
+.SH DESCRIPTION
+.P
Print the folder where npm will install executables\.
-.
-.SH "SEE ALSO"
-.
-.IP "\(bu" 4
+.SH SEE ALSO
+.RS 0
+.IP \(bu 2
npm help prefix
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help root
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help 5 folders
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help config
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help 7 config
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help 5 npmrc
-.
-.IP "" 0
+
+.RE
diff --git a/deps/npm/man/man1/npm-bugs.1 b/deps/npm/man/man1/npm-bugs.1
index 328ac304515..09c7659c600 100644
--- a/deps/npm/man/man1/npm-bugs.1
+++ b/deps/npm/man/man1/npm-bugs.1
@@ -1,78 +1,59 @@
-.\" Generated with Ronnjs 0.3.8
-.\" http://github.com/kapouer/ronnjs/
-.
-.TH "NPM\-BUGS" "1" "September 2014" "" ""
-.
+.TH "NPM\-BUGS" "1" "October 2014" "" ""
.SH "NAME"
-\fBnpm-bugs\fR \-\- Bugs for a package in a web browser maybe
-.
-.SH "SYNOPSIS"
-.
+\fBnpm-bugs\fR \- Bugs for a package in a web browser maybe
+.SH SYNOPSIS
+.P
+.RS 2
.nf
npm bugs
npm bugs (with no args in a package dir)
-.
.fi
-.
-.SH "DESCRIPTION"
-This command tries to guess at the likely location of a package\'s
+.RE
+.SH DESCRIPTION
+.P
+This command tries to guess at the likely location of a package's
bug tracker URL, and then tries to open it using the \fB\-\-browser\fR
config param\. If no package name is provided, it will search for
a \fBpackage\.json\fR in the current folder and use the \fBname\fR property\.
-.
-.SH "CONFIGURATION"
-.
-.SS "browser"
-.
-.IP "\(bu" 4
+.SH CONFIGURATION
+.SS browser
+.RS 0
+.IP \(bu 2
Default: OS X: \fB"open"\fR, Windows: \fB"start"\fR, Others: \fB"xdg\-open"\fR
-.
-.IP "\(bu" 4
+.IP \(bu 2
Type: String
-.
-.IP "" 0
-.
+
+.RE
.P
The browser that is called by the \fBnpm bugs\fR command to open websites\.
-.
-.SS "registry"
-.
-.IP "\(bu" 4
+.SS registry
+.RS 0
+.IP \(bu 2
Default: https://registry\.npmjs\.org/
-.
-.IP "\(bu" 4
+.IP \(bu 2
Type: url
-.
-.IP "" 0
-.
+
+.RE
.P
The base URL of the npm package registry\.
-.
-.SH "SEE ALSO"
-.
-.IP "\(bu" 4
+.SH SEE ALSO
+.RS 0
+.IP \(bu 2
npm help docs
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help view
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help publish
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help 7 registry
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help config
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help 7 config
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help 5 npmrc
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help 5 package\.json
-.
-.IP "" 0
+
+.RE
diff --git a/deps/npm/man/man1/npm-build.1 b/deps/npm/man/man1/npm-build.1
index cc815b63b51..0f2184292a7 100644
--- a/deps/npm/man/man1/npm-build.1
+++ b/deps/npm/man/man1/npm-build.1
@@ -1,43 +1,34 @@
-.\" Generated with Ronnjs 0.3.8
-.\" http://github.com/kapouer/ronnjs/
-.
-.TH "NPM\-BUILD" "1" "September 2014" "" ""
-.
+.TH "NPM\-BUILD" "1" "October 2014" "" ""
.SH "NAME"
-\fBnpm-build\fR \-\- Build a package
-.
-.SH "SYNOPSIS"
-.
+\fBnpm-build\fR \- Build a package
+.SH SYNOPSIS
+.P
+.RS 2
.nf
npm build
-.
.fi
-.
-.IP "\(bu" 4
+.RE
+.RS 0
+.IP \(bu 2
\fB\fR:
A folder containing a \fBpackage\.json\fR file in its root\.
-.
-.IP "" 0
-.
-.SH "DESCRIPTION"
+
+.RE
+.SH DESCRIPTION
+.P
This is the plumbing command called by \fBnpm link\fR and \fBnpm install\fR\|\.
-.
.P
It should generally not be called directly\.
-.
-.SH "SEE ALSO"
-.
-.IP "\(bu" 4
+.SH SEE ALSO
+.RS 0
+.IP \(bu 2
npm help install
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help link
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help 7 scripts
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help 5 package\.json
-.
-.IP "" 0
+
+.RE
diff --git a/deps/npm/man/man1/npm-bundle.1 b/deps/npm/man/man1/npm-bundle.1
index 5799f4b19d9..0748922dae2 100644
--- a/deps/npm/man/man1/npm-bundle.1
+++ b/deps/npm/man/man1/npm-bundle.1
@@ -1,23 +1,17 @@
-.\" Generated with Ronnjs 0.3.8
-.\" http://github.com/kapouer/ronnjs/
-.
-.TH "NPM\-BUNDLE" "1" "September 2014" "" ""
-.
+.TH "NPM\-BUNDLE" "1" "October 2014" "" ""
.SH "NAME"
-\fBnpm-bundle\fR \-\- REMOVED
-.
-.SH "DESCRIPTION"
+\fBnpm-bundle\fR \- REMOVED
+.SH DESCRIPTION
+.P
The \fBnpm bundle\fR command has been removed in 1\.0, for the simple reason
that it is no longer necessary, as the default behavior is now to
install packages into the local space\.
-.
.P
Just use \fBnpm install\fR now to do what \fBnpm bundle\fR used to do\.
-.
-.SH "SEE ALSO"
-.
-.IP "\(bu" 4
+.SH SEE ALSO
+.RS 0
+.IP \(bu 2
npm help install
-.
-.IP "" 0
+
+.RE
diff --git a/deps/npm/man/man1/npm-cache.1 b/deps/npm/man/man1/npm-cache.1
index 3977da0b1af..c49015ae6e7 100644
--- a/deps/npm/man/man1/npm-cache.1
+++ b/deps/npm/man/man1/npm-cache.1
@@ -1,100 +1,86 @@
-.\" Generated with Ronnjs 0.3.8
-.\" http://github.com/kapouer/ronnjs/
-.
-.TH "NPM\-CACHE" "1" "September 2014" "" ""
-.
+.TH "NPM\-CACHE" "1" "October 2014" "" ""
.SH "NAME"
-\fBnpm-cache\fR \-\- Manipulates packages cache
-.
-.SH "SYNOPSIS"
-.
+\fBnpm-cache\fR \- Manipulates packages cache
+.SH SYNOPSIS
+.P
+.RS 2
.nf
npm cache add
npm cache add
npm cache add
npm cache add @
+
npm cache ls []
+
npm cache clean []
-.
.fi
-.
-.SH "DESCRIPTION"
+.RE
+.SH DESCRIPTION
+.P
Used to add, list, or clear the npm cache folder\.
-.
-.IP "\(bu" 4
+.RS 0
+.IP \(bu 2
add:
Add the specified package to the local cache\. This command is primarily
intended to be used internally by npm, but it can provide a way to
add data to the local installation cache explicitly\.
-.
-.IP "\(bu" 4
+.IP \(bu 2
ls:
Show the data in the cache\. Argument is a path to show in the cache
-folder\. Works a bit like the \fBfind\fR program, but limited by the \fBdepth\fR config\.
-.
-.IP "\(bu" 4
+folder\. Works a bit like the \fBfind\fR program, but limited by the
+\fBdepth\fR config\.
+.IP \(bu 2
clean:
Delete data out of the cache folder\. If an argument is provided, then
it specifies a subpath to delete\. If no argument is provided, then
the entire cache is cleared\.
-.
-.IP "" 0
-.
-.SH "DETAILS"
+
+.RE
+.SH DETAILS
+.P
npm stores cache data in the directory specified in \fBnpm config get cache\fR\|\.
For each package that is added to the cache, three pieces of information are
stored in \fB{cache}/{name}/{version}\fR:
-.
-.IP "\(bu" 4
+.RS 0
+.IP \(bu 2
\|\.\.\./package/package\.json:
The package\.json file, as npm sees it\.
-.
-.IP "\(bu" 4
+.IP \(bu 2
\|\.\.\./package\.tgz:
The tarball for that version\.
-.
-.IP "" 0
-.
+
+.RE
.P
Additionally, whenever a registry request is made, a \fB\|\.cache\.json\fR file
is placed at the corresponding URI, to store the ETag and the requested
data\. This is stored in \fB{cache}/{hostname}/{path}/\.cache\.json\fR\|\.
-.
.P
-Commands that make non\-essential registry requests (such as \fBsearch\fR and \fBview\fR, or the completion scripts) generally specify a minimum timeout\.
+Commands that make non\-essential registry requests (such as \fBsearch\fR and
+\fBview\fR, or the completion scripts) generally specify a minimum timeout\.
If the \fB\|\.cache\.json\fR file is younger than the specified timeout, then
they do not make an HTTP request to the registry\.
-.
-.SH "CONFIGURATION"
-.
-.SS "cache"
+.SH CONFIGURATION
+.SS cache
+.P
Default: \fB~/\.npm\fR on Posix, or \fB%AppData%/npm\-cache\fR on Windows\.
-.
.P
The root cache folder\.
-.
-.SH "SEE ALSO"
-.
-.IP "\(bu" 4
+.SH SEE ALSO
+.RS 0
+.IP \(bu 2
npm help 5 folders
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help config
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help 7 config
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help 5 npmrc
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help install
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help publish
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help pack
-.
-.IP "" 0
+
+.RE
diff --git a/deps/npm/man/man1/npm-completion.1 b/deps/npm/man/man1/npm-completion.1
index 2ae25687a68..a89cc6fd5ff 100644
--- a/deps/npm/man/man1/npm-completion.1
+++ b/deps/npm/man/man1/npm-completion.1
@@ -1,47 +1,37 @@
-.\" Generated with Ronnjs 0.3.8
-.\" http://github.com/kapouer/ronnjs/
-.
-.TH "NPM\-COMPLETION" "1" "September 2014" "" ""
-.
+.TH "NPM\-COMPLETION" "1" "October 2014" "" ""
.SH "NAME"
-\fBnpm-completion\fR \-\- Tab Completion for npm
-.
-.SH "SYNOPSIS"
-.
+\fBnpm-completion\fR \- Tab Completion for npm
+.SH SYNOPSIS
+.P
+.RS 2
.nf
\|\. <(npm completion)
-.
.fi
-.
-.SH "DESCRIPTION"
+.RE
+.SH DESCRIPTION
+.P
Enables tab\-completion in all npm commands\.
-.
.P
The synopsis above
loads the completions into your current shell\. Adding it to
your ~/\.bashrc or ~/\.zshrc will make the completions available
everywhere\.
-.
.P
You may of course also pipe the output of npm completion to a file
such as \fB/usr/local/etc/bash_completion\.d/npm\fR if you have a system
that will read that file for you\.
-.
.P
When \fBCOMP_CWORD\fR, \fBCOMP_LINE\fR, and \fBCOMP_POINT\fR are defined in the
environment, \fBnpm completion\fR acts in "plumbing mode", and outputs
completions based on the arguments\.
-.
-.SH "SEE ALSO"
-.
-.IP "\(bu" 4
+.SH SEE ALSO
+.RS 0
+.IP \(bu 2
npm help 7 developers
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help 7 faq
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help npm
-.
-.IP "" 0
+
+.RE
diff --git a/deps/npm/man/man1/npm-config.1 b/deps/npm/man/man1/npm-config.1
index 0b019c7c025..a93ebace724 100644
--- a/deps/npm/man/man1/npm-config.1
+++ b/deps/npm/man/man1/npm-config.1
@@ -1,13 +1,9 @@
-.\" Generated with Ronnjs 0.3.8
-.\" http://github.com/kapouer/ronnjs/
-.
-.TH "NPM\-CONFIG" "1" "September 2014" "" ""
-.
+.TH "NPM\-CONFIG" "1" "October 2014" "" ""
.SH "NAME"
-\fBnpm-config\fR \-\- Manage the npm configuration files
-.
-.SH "SYNOPSIS"
-.
+\fBnpm-config\fR \- Manage the npm configuration files
+.SH SYNOPSIS
+.P
+.RS 2
.nf
npm config set [\-\-global]
npm config get
@@ -17,97 +13,83 @@ npm config edit
npm c [set|get|delete|list]
npm get
npm set [\-\-global]
-.
.fi
-.
-.SH "DESCRIPTION"
+.RE
+.SH DESCRIPTION
+.P
npm gets its config settings from the command line, environment
variables, \fBnpmrc\fR files, and in some cases, the \fBpackage\.json\fR file\.
-.
.P
See npm help 5 npmrc for more information about the npmrc files\.
-.
.P
See npm help 7 \fBnpm\-config\fR for a more thorough discussion of the mechanisms
involved\.
-.
.P
The \fBnpm config\fR command can be used to update and edit the contents
of the user and global npmrc files\.
-.
-.SH "Sub\-commands"
+.SH Sub\-commands
+.P
Config supports the following sub\-commands:
-.
-.SS "set"
-.
+.SS set
+.P
+.RS 2
.nf
npm config set key value
-.
.fi
-.
+.RE
.P
Sets the config key to the value\.
-.
.P
If value is omitted, then it sets it to "true"\.
-.
-.SS "get"
-.
+.SS get
+.P
+.RS 2
.nf
npm config get key
-.
.fi
-.
+.RE
.P
Echo the config value to stdout\.
-.
-.SS "list"
-.
+.SS list
+.P
+.RS 2
.nf
npm config list
-.
.fi
-.
+.RE
.P
Show all the config settings\.
-.
-.SS "delete"
-.
+.SS delete
+.P
+.RS 2
.nf
npm config delete key
-.
.fi
-.
+.RE
.P
Deletes the key from all configuration files\.
-.
-.SS "edit"
-.
+.SS edit
+.P
+.RS 2
.nf
npm config edit
-.
.fi
-.
+.RE
.P
Opens the config file in an editor\. Use the \fB\-\-global\fR flag to edit the
global config\.
-.
-.SH "SEE ALSO"
-.
-.IP "\(bu" 4
+.SH SEE ALSO
+.RS 0
+.IP \(bu 2
npm help 5 folders
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help 7 config
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help 5 package\.json
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help 5 npmrc
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help npm
-.
-.IP "" 0
+
+.RE
diff --git a/deps/npm/man/man1/npm-dedupe.1 b/deps/npm/man/man1/npm-dedupe.1
index cdfa3520f68..24548077e30 100644
--- a/deps/npm/man/man1/npm-dedupe.1
+++ b/deps/npm/man/man1/npm-dedupe.1
@@ -1,96 +1,74 @@
-.\" Generated with Ronnjs 0.3.8
-.\" http://github.com/kapouer/ronnjs/
-.
-.TH "NPM\-DEDUPE" "1" "September 2014" "" ""
-.
+.TH "NPM\-DEDUPE" "1" "October 2014" "" ""
.SH "NAME"
-\fBnpm-dedupe\fR \-\- Reduce duplication
-.
-.SH "SYNOPSIS"
-.
+\fBnpm-dedupe\fR \- Reduce duplication
+.SH SYNOPSIS
+.P
+.RS 2
.nf
npm dedupe [package names\.\.\.]
npm ddp [package names\.\.\.]
-.
.fi
-.
-.SH "DESCRIPTION"
+.RE
+.SH DESCRIPTION
+.P
Searches the local package tree and attempts to simplify the overall
structure by moving dependencies further up the tree, where they can
be more effectively shared by multiple dependent packages\.
-.
.P
For example, consider this dependency graph:
-.
-.IP "" 4
-.
+.P
+.RS 2
.nf
a
+\-\- b <\-\- depends on c@1\.0\.x
| `\-\- c@1\.0\.3
`\-\- d <\-\- depends on c@~1\.0\.9
`\-\- c@1\.0\.10
-.
.fi
-.
-.IP "" 0
-.
+.RE
.P
In this case, npm help \fBnpm\-dedupe\fR will transform the tree to:
-.
-.IP "" 4
-.
+.P
+.RS 2
.nf
a
+\-\- b
+\-\- d
`\-\- c@1\.0\.10
-.
.fi
-.
-.IP "" 0
-.
+.RE
.P
-Because of the hierarchical nature of node\'s module lookup, b and d
+Because of the hierarchical nature of node's module lookup, b and d
will both get their dependency met by the single c package at the root
level of the tree\.
-.
.P
If a suitable version exists at the target location in the tree
already, then it will be left untouched, but the other duplicates will
be deleted\.
-.
.P
If no suitable version can be found, then a warning is printed, and
nothing is done\.
-.
.P
If any arguments are supplied, then they are filters, and only the
named packages will be touched\.
-.
.P
Note that this operation transforms the dependency tree, and may
result in packages getting updated versions, perhaps from the npm
registry\.
-.
.P
This feature is experimental, and may change in future versions\.
-.
.P
The \fB\-\-tag\fR argument will apply to all of the affected dependencies\. If a
tag with the given name exists, the tagged version is preferred over newer
versions\.
-.
-.SH "SEE ALSO"
-.
-.IP "\(bu" 4
+.SH SEE ALSO
+.RS 0
+.IP \(bu 2
npm help ls
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help update
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help install
-.
-.IP "" 0
+
+.RE
diff --git a/deps/npm/man/man1/npm-deprecate.1 b/deps/npm/man/man1/npm-deprecate.1
index cc2d18ee52f..581a58948f3 100644
--- a/deps/npm/man/man1/npm-deprecate.1
+++ b/deps/npm/man/man1/npm-deprecate.1
@@ -1,48 +1,37 @@
-.\" Generated with Ronnjs 0.3.8
-.\" http://github.com/kapouer/ronnjs/
-.
-.TH "NPM\-DEPRECATE" "1" "September 2014" "" ""
-.
+.TH "NPM\-DEPRECATE" "1" "October 2014" "" ""
.SH "NAME"
-\fBnpm-deprecate\fR \-\- Deprecate a version of a package
-.
-.SH "SYNOPSIS"
-.
+\fBnpm-deprecate\fR \- Deprecate a version of a package
+.SH SYNOPSIS
+.P
+.RS 2
.nf
npm deprecate [@]
-.
.fi
-.
-.SH "DESCRIPTION"
+.RE
+.SH DESCRIPTION
+.P
This command will update the npm registry entry for a package, providing
a deprecation warning to all who attempt to install it\.
-.
.P
It works on version ranges as well as specific versions, so you can do
something like this:
-.
-.IP "" 4
-.
+.P
+.RS 2
.nf
npm deprecate my\-thing@"< 0\.2\.3" "critical bug fixed in v0\.2\.3"
-.
.fi
-.
-.IP "" 0
-.
+.RE
.P
-Note that you must be the package owner to deprecate something\. See the \fBowner\fR and \fBadduser\fR help topics\.
-.
+Note that you must be the package owner to deprecate something\. See the
+\fBowner\fR and \fBadduser\fR help topics\.
.P
To un\-deprecate a package, specify an empty string (\fB""\fR) for the \fBmessage\fR argument\.
-.
-.SH "SEE ALSO"
-.
-.IP "\(bu" 4
+.SH SEE ALSO
+.RS 0
+.IP \(bu 2
npm help publish
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help 7 registry
-.
-.IP "" 0
+
+.RE
diff --git a/deps/npm/man/man1/npm-docs.1 b/deps/npm/man/man1/npm-docs.1
index db3d4e768fb..1e9e5c19901 100644
--- a/deps/npm/man/man1/npm-docs.1
+++ b/deps/npm/man/man1/npm-docs.1
@@ -1,78 +1,60 @@
-.\" Generated with Ronnjs 0.3.8
-.\" http://github.com/kapouer/ronnjs/
-.
-.TH "NPM\-DOCS" "1" "September 2014" "" ""
-.
+.TH "NPM\-DOCS" "1" "October 2014" "" ""
.SH "NAME"
-\fBnpm-docs\fR \-\- Docs for a package in a web browser maybe
-.
-.SH "SYNOPSIS"
-.
+\fBnpm-docs\fR \- Docs for a package in a web browser maybe
+.SH SYNOPSIS
+.P
+.RS 2
.nf
npm docs [ [ \.\.\.]]
npm docs (with no args in a package dir)
npm home [ [ \.\.\.]]
npm home (with no args in a package dir)
-.
.fi
-.
-.SH "DESCRIPTION"
-This command tries to guess at the likely location of a package\'s
+.RE
+.SH DESCRIPTION
+.P
+This command tries to guess at the likely location of a package's
documentation URL, and then tries to open it using the \fB\-\-browser\fR
config param\. You can pass multiple package names at once\. If no
package name is provided, it will search for a \fBpackage\.json\fR in
the current folder and use the \fBname\fR property\.
-.
-.SH "CONFIGURATION"
-.
-.SS "browser"
-.
-.IP "\(bu" 4
+.SH CONFIGURATION
+.SS browser
+.RS 0
+.IP \(bu 2
Default: OS X: \fB"open"\fR, Windows: \fB"start"\fR, Others: \fB"xdg\-open"\fR
-.
-.IP "\(bu" 4
+.IP \(bu 2
Type: String
-.
-.IP "" 0
-.
+
+.RE
.P
The browser that is called by the \fBnpm docs\fR command to open websites\.
-.
-.SS "registry"
-.
-.IP "\(bu" 4
+.SS registry
+.RS 0
+.IP \(bu 2
Default: https://registry\.npmjs\.org/
-.
-.IP "\(bu" 4
+.IP \(bu 2
Type: url
-.
-.IP "" 0
-.
+
+.RE
.P
The base URL of the npm package registry\.
-.
-.SH "SEE ALSO"
-.
-.IP "\(bu" 4
+.SH SEE ALSO
+.RS 0
+.IP \(bu 2
npm help view
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help publish
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help 7 registry
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help config
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help 7 config
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help 5 npmrc
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help 5 package\.json
-.
-.IP "" 0
+
+.RE
diff --git a/deps/npm/man/man1/npm-edit.1 b/deps/npm/man/man1/npm-edit.1
index 036d0715a4f..8a19d125788 100644
--- a/deps/npm/man/man1/npm-edit.1
+++ b/deps/npm/man/man1/npm-edit.1
@@ -1,66 +1,50 @@
-.\" Generated with Ronnjs 0.3.8
-.\" http://github.com/kapouer/ronnjs/
-.
-.TH "NPM\-EDIT" "1" "September 2014" "" ""
-.
+.TH "NPM\-EDIT" "1" "October 2014" "" ""
.SH "NAME"
-\fBnpm-edit\fR \-\- Edit an installed package
-.
-.SH "SYNOPSIS"
-.
+\fBnpm-edit\fR \- Edit an installed package
+.SH SYNOPSIS
+.P
+.RS 2
.nf
npm edit [@]
-.
.fi
-.
-.SH "DESCRIPTION"
-Opens the package folder in the default editor (or whatever you\'ve
+.RE
+.SH DESCRIPTION
+.P
+Opens the package folder in the default editor (or whatever you've
configured as the npm \fBeditor\fR config \-\- see npm help 7 \fBnpm\-config\fR\|\.)
-.
.P
After it has been edited, the package is rebuilt so as to pick up any
changes in compiled packages\.
-.
.P
For instance, you can do \fBnpm install connect\fR to install connect
into your package, and then \fBnpm edit connect\fR to make a few
changes to your locally installed copy\.
-.
-.SH "CONFIGURATION"
-.
-.SS "editor"
-.
-.IP "\(bu" 4
+.SH CONFIGURATION
+.SS editor
+.RS 0
+.IP \(bu 2
Default: \fBEDITOR\fR environment variable if set, or \fB"vi"\fR on Posix,
or \fB"notepad"\fR on Windows\.
-.
-.IP "\(bu" 4
+.IP \(bu 2
Type: path
-.
-.IP "" 0
-.
+
+.RE
.P
The command to run for \fBnpm edit\fR or \fBnpm config edit\fR\|\.
-.
-.SH "SEE ALSO"
-.
-.IP "\(bu" 4
+.SH SEE ALSO
+.RS 0
+.IP \(bu 2
npm help 5 folders
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help explore
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help install
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help config
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help 7 config
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help 5 npmrc
-.
-.IP "" 0
+
+.RE
diff --git a/deps/npm/man/man1/npm-explore.1 b/deps/npm/man/man1/npm-explore.1
index c7d570745cf..0211aef43e9 100644
--- a/deps/npm/man/man1/npm-explore.1
+++ b/deps/npm/man/man1/npm-explore.1
@@ -1,76 +1,55 @@
-.\" Generated with Ronnjs 0.3.8
-.\" http://github.com/kapouer/ronnjs/
-.
-.TH "NPM\-EXPLORE" "1" "September 2014" "" ""
-.
+.TH "NPM\-EXPLORE" "1" "October 2014" "" ""
.SH "NAME"
-\fBnpm-explore\fR \-\- Browse an installed package
-.
-.SH "SYNOPSIS"
-.
+\fBnpm-explore\fR \- Browse an installed package
+.SH SYNOPSIS
+.P
+.RS 2
.nf
npm explore [ \-\- ]
-.
.fi
-.
-.SH "DESCRIPTION"
+.RE
+.SH DESCRIPTION
+.P
Spawn a subshell in the directory of the installed package specified\.
-.
.P
If a command is specified, then it is run in the subshell, which then
immediately terminates\.
-.
.P
-This is particularly handy in the case of git submodules in the \fBnode_modules\fR folder:
-.
-.IP "" 4
-.
+This is particularly handy in the case of git submodules in the
+\fBnode_modules\fR folder:
+.P
+.RS 2
.nf
npm explore some\-dependency \-\- git pull origin master
-.
.fi
-.
-.IP "" 0
-.
+.RE
.P
Note that the package is \fInot\fR automatically rebuilt afterwards, so be
sure to use \fBnpm rebuild \fR if you make any changes\.
-.
-.SH "CONFIGURATION"
-.
-.SS "shell"
-.
-.IP "\(bu" 4
+.SH CONFIGURATION
+.SS shell
+.RS 0
+.IP \(bu 2
Default: SHELL environment variable, or "bash" on Posix, or "cmd" on
Windows
-.
-.IP "\(bu" 4
+.IP \(bu 2
Type: path
-.
-.IP "" 0
-.
+
+.RE
.P
The shell to run for the \fBnpm explore\fR command\.
-.
-.SH "SEE ALSO"
-.
-.IP "\(bu" 4
-npm help submodule
-.
-.IP "\(bu" 4
+.SH SEE ALSO
+.RS 0
+.IP \(bu 2
npm help 5 folders
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help edit
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help rebuild
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help build
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help install
-.
-.IP "" 0
+
+.RE
diff --git a/deps/npm/man/man1/npm-help-search.1 b/deps/npm/man/man1/npm-help-search.1
index 37ba03c7960..a18a8e97a68 100644
--- a/deps/npm/man/man1/npm-help-search.1
+++ b/deps/npm/man/man1/npm-help-search.1
@@ -1,59 +1,45 @@
-.\" Generated with Ronnjs 0.3.8
-.\" http://github.com/kapouer/ronnjs/
-.
-.TH "NPM\-HELP\-SEARCH" "1" "September 2014" "" ""
-.
+.TH "NPM\-HELP\-SEARCH" "1" "October 2014" "" ""
.SH "NAME"
-\fBnpm-help-search\fR \-\- Search npm help documentation
-.
-.SH "SYNOPSIS"
-.
+\fBnpm-help-search\fR \- Search npm help documentation
+.SH SYNOPSIS
+.P
+.RS 2
.nf
npm help\-search some search terms
-.
.fi
-.
-.SH "DESCRIPTION"
+.RE
+.SH DESCRIPTION
+.P
This command will search the npm markdown documentation files for the
terms provided, and then list the results, sorted by relevance\.
-.
.P
If only one result is found, then it will show that help topic\.
-.
.P
If the argument to \fBnpm help\fR is not a known help topic, then it will
call \fBhelp\-search\fR\|\. It is rarely if ever necessary to call this
command directly\.
-.
-.SH "CONFIGURATION"
-.
-.SS "long"
-.
-.IP "\(bu" 4
+.SH CONFIGURATION
+.SS long
+.RS 0
+.IP \(bu 2
Type: Boolean
-.
-.IP "\(bu" 4
+.IP \(bu 2
Default false
-.
-.IP "" 0
-.
+
+.RE
.P
If true, the "long" flag will cause help\-search to output context around
where the terms were found in the documentation\.
-.
.P
If false, then help\-search will just list out the help topics found\.
-.
-.SH "SEE ALSO"
-.
-.IP "\(bu" 4
+.SH SEE ALSO
+.RS 0
+.IP \(bu 2
npm help npm
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help 7 faq
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help help
-.
-.IP "" 0
+
+.RE
diff --git a/deps/npm/man/man1/npm-help.1 b/deps/npm/man/man1/npm-help.1
index 7cc361f463b..556eeb52ee8 100644
--- a/deps/npm/man/man1/npm-help.1
+++ b/deps/npm/man/man1/npm-help.1
@@ -1,77 +1,57 @@
-.\" Generated with Ronnjs 0.3.8
-.\" http://github.com/kapouer/ronnjs/
-.
-.TH "NPM\-HELP" "1" "September 2014" "" ""
-.
+.TH "NPM\-HELP" "1" "October 2014" "" ""
.SH "NAME"
-\fBnpm-help\fR \-\- Get help on npm
-.
-.SH "SYNOPSIS"
-.
+\fBnpm-help\fR \- Get help on npm
+.SH SYNOPSIS
+.P
+.RS 2
.nf
npm help
npm help some search terms
-.
.fi
-.
-.SH "DESCRIPTION"
+.RE
+.SH DESCRIPTION
+.P
If supplied a topic, then show the appropriate documentation page\.
-.
.P
If the topic does not exist, or if multiple terms are provided, then run
the \fBhelp\-search\fR command to find a match\. Note that, if \fBhelp\-search\fR
finds a single subject, then it will run \fBhelp\fR on that topic, so unique
matches are equivalent to specifying a topic name\.
-.
-.SH "CONFIGURATION"
-.
-.SS "viewer"
-.
-.IP "\(bu" 4
+.SH CONFIGURATION
+.SS viewer
+.RS 0
+.IP \(bu 2
Default: "man" on Posix, "browser" on Windows
-.
-.IP "\(bu" 4
+.IP \(bu 2
Type: path
-.
-.IP "" 0
-.
+
+.RE
.P
The program to use to view help content\.
-.
.P
Set to \fB"browser"\fR to view html help content in the default web browser\.
-.
-.SH "SEE ALSO"
-.
-.IP "\(bu" 4
+.SH SEE ALSO
+.RS 0
+.IP \(bu 2
npm help npm
-.
-.IP "\(bu" 4
+.IP \(bu 2
README
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help 7 faq
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help 5 folders
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help config
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help 7 config
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help 5 npmrc
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help 5 package\.json
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help help\-search
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help 7 index
-.
-.IP "" 0
+
+.RE
diff --git a/deps/npm/man/man1/npm-init.1 b/deps/npm/man/man1/npm-init.1
index 5091fdefd83..3d4ed0957f5 100644
--- a/deps/npm/man/man1/npm-init.1
+++ b/deps/npm/man/man1/npm-init.1
@@ -1,43 +1,36 @@
-.\" Generated with Ronnjs 0.3.8
-.\" http://github.com/kapouer/ronnjs/
-.
-.TH "NPM\-INIT" "1" "September 2014" "" ""
-.
+.TH "NPM\-INIT" "1" "October 2014" "" ""
.SH "NAME"
-\fBnpm-init\fR \-\- Interactively create a package\.json file
-.
-.SH "SYNOPSIS"
-.
+\fBnpm-init\fR \- Interactively create a package\.json file
+.SH SYNOPSIS
+.P
+.RS 2
.nf
-npm init
-.
+npm init [\-f|\-\-force|\-y|\-\-yes]
.fi
-.
-.SH "DESCRIPTION"
+.RE
+.SH DESCRIPTION
+.P
This will ask you a bunch of questions, and then write a package\.json for you\.
-.
.P
It attempts to make reasonable guesses about what you want things to be set to,
-and then writes a package\.json file with the options you\'ve selected\.
-.
+and then writes a package\.json file with the options you've selected\.
.P
-If you already have a package\.json file, it\'ll read that first, and default to
+If you already have a package\.json file, it'll read that first, and default to
the options in there\.
-.
.P
It is strictly additive, so it does not delete options from your package\.json
without a really good reason to do so\.
-.
-.SH "SEE ALSO"
-.
-.IP "\(bu" 4
-\fIhttps://github\.com/isaacs/init\-package\-json\fR
-.
-.IP "\(bu" 4
+.P
+If you invoke it with \fB\-f\fR, \fB\-\-force\fR, \fB\-y\fR, or \fB\-\-yes\fR, it will use only
+defaults and not prompt you for any options\.
+.SH SEE ALSO
+.RS 0
+.IP \(bu 2
+https://github\.com/isaacs/init\-package\-json
+.IP \(bu 2
npm help 5 package\.json
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help version
-.
-.IP "" 0
+
+.RE
diff --git a/deps/npm/man/man1/npm-install.1 b/deps/npm/man/man1/npm-install.1
index 7e874f34900..0df0197b0c5 100644
--- a/deps/npm/man/man1/npm-install.1
+++ b/deps/npm/man/man1/npm-install.1
@@ -1,334 +1,269 @@
-.\" Generated with Ronnjs 0.3.8
-.\" http://github.com/kapouer/ronnjs/
-.
-.TH "NPM\-INSTALL" "1" "September 2014" "" ""
-.
+.TH "NPM\-INSTALL" "1" "October 2014" "" ""
.SH "NAME"
-\fBnpm-install\fR \-\- Install a package
-.
-.SH "SYNOPSIS"
-.
+\fBnpm-install\fR \- Install a package
+.SH SYNOPSIS
+.P
+.RS 2
.nf
npm install (with no args in a package dir)
npm install
npm install
npm install
-npm install [\-\-save|\-\-save\-dev|\-\-save\-optional] [\-\-save\-exact]
-npm install @
-npm install @
-npm install @
+npm install [@/] [\-\-save|\-\-save\-dev|\-\-save\-optional] [\-\-save\-exact]
+npm install [@/]@
+npm install [@/]@
+npm install [@/]@
npm i (with any of the previous argument usage)
-.
.fi
-.
-.SH "DESCRIPTION"
+.RE
+.SH DESCRIPTION
+.P
This command installs a package, and any packages that it depends on\. If the
package has a shrinkwrap file, the installation of dependencies will be driven
by that\. See npm help shrinkwrap\.
-.
.P
A \fBpackage\fR is:
-.
-.IP "\(bu" 4
+.RS 0
+.IP \(bu 2
a) a folder containing a program described by a package\.json file
-.
-.IP "\(bu" 4
+.IP \(bu 2
b) a gzipped tarball containing (a)
-.
-.IP "\(bu" 4
+.IP \(bu 2
c) a url that resolves to (b)
-.
-.IP "\(bu" 4
+.IP \(bu 2
d) a \fB@\fR that is published on the registry (see npm help 7 \fBnpm\-registry\fR) with (c)
-.
-.IP "\(bu" 4
+.IP \(bu 2
e) a \fB@\fR that points to (d)
-.
-.IP "\(bu" 4
+.IP \(bu 2
f) a \fB\fR that has a "latest" tag satisfying (e)
-.
-.IP "\(bu" 4
+.IP \(bu 2
g) a \fB\fR that resolves to (b)
-.
-.IP "" 0
-.
+
+.RE
.P
Even if you never publish your package, you can still get a lot of
benefits of using npm if you just want to write a node program (a), and
perhaps if you also want to be able to easily install it elsewhere
after packing it up into a tarball (b)\.
-.
-.IP "\(bu" 4
+.RS 0
+.IP \(bu 2
\fBnpm install\fR (in package directory, no arguments):
-.
-.IP
-Install the dependencies in the local node_modules folder\.
-.
-.IP
-In global mode (ie, with \fB\-g\fR or \fB\-\-global\fR appended to the command),
-it installs the current package context (ie, the current working
-directory) as a global package\.
-.
-.IP
-By default, \fBnpm install\fR will install all modules listed as
-dependencies\. With the \fB\-\-production\fR flag,
-npm will not install modules listed in \fBdevDependencies\fR\|\.
-.
-.IP "\(bu" 4
+ Install the dependencies in the local node_modules folder\.
+ In global mode (ie, with \fB\-g\fR or \fB\-\-global\fR appended to the command),
+ it installs the current package context (ie, the current working
+ directory) as a global package\.
+ By default, \fBnpm install\fR will install all modules listed as
+ dependencies\. With the \fB\-\-production\fR flag,
+ npm will not install modules listed in \fBdevDependencies\fR\|\.
+.IP \(bu 2
\fBnpm install \fR:
-.
-.IP
-Install a package that is sitting in a folder on the filesystem\.
-.
-.IP "\(bu" 4
+ Install a package that is sitting in a folder on the filesystem\.
+.IP \(bu 2
\fBnpm install \fR:
-.
-.IP
-Install a package that is sitting on the filesystem\. Note: if you just want
-to link a dev directory into your npm root, you can do this more easily by
-using \fBnpm link\fR\|\.
-.
-.IP
-Example:
-.
-.IP "" 4
-.
+ Install a package that is sitting on the filesystem\. Note: if you just want
+ to link a dev directory into your npm root, you can do this more easily by
+ using \fBnpm link\fR\|\.
+ Example:
+.P
+.RS 2
.nf
- npm install \./package\.tgz
-.
+ npm install \./package\.tgz
.fi
-.
-.IP "" 0
-
-.
-.IP "\(bu" 4
+.RE
+.IP \(bu 2
\fBnpm install \fR:
-.
-.IP
-Fetch the tarball url, and then install it\. In order to distinguish between
-this and other options, the argument must start with "http://" or "https://"
-.
-.IP
-Example:
-.
-.IP "" 4
-.
+ Fetch the tarball url, and then install it\. In order to distinguish between
+ this and other options, the argument must start with "http://" or "https://"
+ Example:
+.P
+.RS 2
.nf
- npm install https://github\.com/indexzero/forever/tarball/v0\.5\.6
-.
+ npm install https://github\.com/indexzero/forever/tarball/v0\.5\.6
.fi
-.
-.IP "" 0
-
-.
-.IP "\(bu" 4
-\fBnpm install [\-\-save|\-\-save\-dev|\-\-save\-optional]\fR:
-.
-.IP
-Do a \fB@\fR install, where \fB\fR is the "tag" config\. (See npm help 7 \fBnpm\-config\fR\|\.)
-.
-.IP
-In most cases, this will install the latest version
-of the module published on npm\.
-.
-.IP
-Example:
-.
-.IP
- npm install sax
-.
-.IP
-\fBnpm install\fR takes 3 exclusive, optional flags which save or update
-the package version in your main package\.json:
-.
-.IP "\(bu" 4
+.RE
+.IP \(bu 2
+\fBnpm install [@/] [\-\-save|\-\-save\-dev|\-\-save\-optional]\fR:
+ Do a \fB@\fR install, where \fB\fR is the "tag" config\. (See
+ npm help 7 \fBnpm\-config\fR\|\.)
+ In most cases, this will install the latest version
+ of the module published on npm\.
+ Example:
+.P
+.RS 2
+.nf
+ npm install sax
+.fi
+.RE
+ \fBnpm install\fR takes 3 exclusive, optional flags which save or update
+ the package version in your main package\.json:
+.RS 0
+.IP \(bu 2
\fB\-\-save\fR: Package will appear in your \fBdependencies\fR\|\.
-.
-.IP "\(bu" 4
+.IP \(bu 2
\fB\-\-save\-dev\fR: Package will appear in your \fBdevDependencies\fR\|\.
-.
-.IP "\(bu" 4
+.IP \(bu 2
\fB\-\-save\-optional\fR: Package will appear in your \fBoptionalDependencies\fR\|\.
-.
-.IP
When using any of the above options to save dependencies to your
package\.json, there is an additional, optional flag:
-.
-.IP "\(bu" 4
+.IP \(bu 2
\fB\-\-save\-exact\fR: Saved dependencies will be configured with an
-exact version rather than using npm\'s default semver range
+exact version rather than using npm's default semver range
operator\.
-.
-.IP
+\fB\fR is optional\. The package will be downloaded from the registry
+associated with the specified scope\. If no registry is associated with
+the given scope the default registry is assumed\. See npm help 7 \fBnpm\-scope\fR\|\.
+Note: if you do not include the @\-symbol on your scope name, npm will
+interpret this as a GitHub repository instead, see below\. Scopes names
+must also be followed by a slash\.
Examples:
-.
-.IP
- npm install sax \-\-save
- npm install node\-tap \-\-save\-dev
- npm install dtrace\-provider \-\-save\-optional
- npm install readable\-stream \-\-save \-\-save\-exact
-.
-.IP
-\fBNote\fR: If there is a file or folder named \fB\fR in the current
+.P
+.RS 2
+.nf
+npm install sax \-\-save
+npm install githubname/reponame
+npm install @myorg/privatepackage
+npm install node\-tap \-\-save\-dev
+npm install dtrace\-provider \-\-save\-optional
+npm install readable\-stream \-\-save \-\-save\-exact
+.fi
+.RE
+
+.RE
+
+.RE
+.P
+.RS 2
+.nf
+**Note**: If there is a file or folder named `` in the current
working directory, then it will try to install that, and only try to
fetch the package by name if it is not valid\.
-.
-.IP "" 0
-
-.
-.IP "\(bu" 4
-\fBnpm install @\fR:
-.
-.IP
-Install the version of the package that is referenced by the specified tag\.
-If the tag does not exist in the registry data for that package, then this
-will fail\.
-.
-.IP
-Example:
-.
-.IP "" 4
-.
+.fi
+.RE
+.RS 0
+.IP \(bu 2
+\fBnpm install [@/]@\fR:
+ Install the version of the package that is referenced by the specified tag\.
+ If the tag does not exist in the registry data for that package, then this
+ will fail\.
+ Example:
+.P
+.RS 2
.nf
- npm install sax@latest
-.
+ npm install sax@latest
+ npm install @myorg/mypackage@latest
.fi
-.
-.IP "" 0
-
-.
-.IP "\(bu" 4
-\fBnpm install @\fR:
-.
-.IP
-Install the specified version of the package\. This will fail if the version
-has not been published to the registry\.
-.
-.IP
-Example:
-.
-.IP "" 4
-.
+.RE
+.IP \(bu 2
+\fBnpm install [@/]@\fR:
+ Install the specified version of the package\. This will fail if the
+ version has not been published to the registry\.
+ Example:
+.P
+.RS 2
.nf
- npm install sax@0\.1\.1
-.
+ npm install sax@0\.1\.1
+ npm install @myorg/privatepackage@1\.5\.0
.fi
-.
-.IP "" 0
-
-.
-.IP "\(bu" 4
-\fBnpm install @\fR:
-.
-.IP
-Install a version of the package matching the specified version range\. This
-will follow the same rules for resolving dependencies described in npm help 5 \fBpackage\.json\fR\|\.
-.
-.IP
-Note that most version ranges must be put in quotes so that your shell will
-treat it as a single argument\.
-.
-.IP
-Example:
-.
-.IP
- npm install sax@">=0\.1\.0 <0\.2\.0"
-.
-.IP "\(bu" 4
+.RE
+.IP \(bu 2
+\fBnpm install [@/]@\fR:
+ Install a version of the package matching the specified version range\. This
+ will follow the same rules for resolving dependencies described in npm help 5 \fBpackage\.json\fR\|\.
+ Note that most version ranges must be put in quotes so that your shell will
+ treat it as a single argument\.
+ Example:
+.P
+.RS 2
+.nf
+ npm install sax@">=0\.1\.0 <0\.2\.0"
+ npm install @myorg/privatepackage@">=0\.1\.0 <0\.2\.0"
+.fi
+.RE
+.IP \(bu 2
+\fBnpm install /\fR:
+ Install the package at \fBhttps://github\.com/githubname/githubrepo" by
+ attempting to clone it using\fRgit`\.
+ Example:
+.P
+.RS 2
+.nf
+ npm install mygithubuser/myproject
+.fi
+.RE
+ To reference a package in a git repo that is not on GitHub, see git
+ remote urls below\.
+.IP \(bu 2
\fBnpm install \fR:
-.
-.IP
-Install a package by cloning a git remote url\. The format of the git
-url is:
-.
-.IP
- ://[@][#]
-.
-.IP
-\fB\fR is one of \fBgit\fR, \fBgit+ssh\fR, \fBgit+http\fR, or \fBgit+https\fR\|\. If no \fB\fR is specified, then \fBmaster\fR is
-used\.
-.
-.IP
-Examples:
-.
-.IP "" 4
-.
+ Install a package by cloning a git remote url\. The format of the git
+ url is:
+.P
+.RS 2
.nf
- git+ssh://git@github\.com:npm/npm\.git#v1\.0\.27
- git+https://isaacs@github\.com/npm/npm\.git
- git://github\.com/npm/npm\.git#v1\.0\.27
-.
+ ://[@][#]
.fi
-.
-.IP "" 0
+.RE
+ \fB\fR is one of \fBgit\fR, \fBgit+ssh\fR, \fBgit+http\fR, or
+ \fBgit+https\fR\|\. If no \fB\fR is specified, then \fBmaster\fR is
+ used\.
+ Examples:
+.P
+.RS 2
+.nf
+ git+ssh://git@github\.com:npm/npm\.git#v1\.0\.27
+ git+https://isaacs@github\.com/npm/npm\.git
+ git://github\.com/npm/npm\.git#v1\.0\.27
+.fi
+.RE
-.
-.IP "" 0
-.
+.RE
.P
You may combine multiple arguments, and even multiple types of arguments\.
For example:
-.
-.IP "" 4
-.
+.P
+.RS 2
.nf
npm install sax@">=0\.1\.0 <0\.2\.0" bench supervisor
-.
.fi
-.
-.IP "" 0
-.
+.RE
.P
The \fB\-\-tag\fR argument will apply to all of the specified install targets\. If a
tag with the given name exists, the tagged version is preferred over newer
versions\.
-.
.P
The \fB\-\-force\fR argument will force npm to fetch remote resources even if a
local copy exists on disk\.
-.
-.IP "" 4
-.
+.P
+.RS 2
.nf
npm install sax \-\-force
-.
.fi
-.
-.IP "" 0
-.
+.RE
.P
The \fB\-\-global\fR argument will cause npm to install the package globally
rather than locally\. See npm help 5 \fBnpm\-folders\fR\|\.
-.
.P
The \fB\-\-link\fR argument will cause npm to link global installs into the
local space in some cases\.
-.
.P
The \fB\-\-no\-bin\-links\fR argument will prevent npm from creating symlinks for
any binaries the package might contain\.
-.
.P
The \fB\-\-no\-optional\fR argument will prevent optional dependencies from
being installed\.
-.
.P
The \fB\-\-no\-shrinkwrap\fR argument, which will ignore an available
shrinkwrap file and use the package\.json instead\.
-.
.P
The \fB\-\-nodedir=/path/to/node/source\fR argument will allow npm to find the
node source code so that npm can compile native modules\.
-.
.P
See npm help 7 \fBnpm\-config\fR\|\. Many of the configuration params have some
-effect on installation, since that\'s most of what npm does\.
-.
-.SH "ALGORITHM"
+effect on installation, since that's most of what npm does\.
+.SH ALGORITHM
+.P
To install a package, npm uses the following algorithm:
-.
-.IP "" 4
-.
+.P
+.RS 2
.nf
install(where, what, family, ancestors)
fetch what, unpack to /node_modules/
@@ -339,103 +274,78 @@ for each dep@version in what\.dependencies
and not in
add precise version deps to
install(/node_modules/, dep, family)
-.
.fi
-.
-.IP "" 0
-.
+.RE
.P
For this \fBpackage{dep}\fR structure: \fBA{B,C}, B{C}, C{D}\fR,
this algorithm produces:
-.
-.IP "" 4
-.
+.P
+.RS 2
.nf
A
+\-\- B
`\-\- C
`\-\- D
-.
.fi
-.
-.IP "" 0
-.
+.RE
.P
That is, the dependency from B to C is satisfied by the fact that A
already caused C to be installed at a higher level\.
-.
.P
See npm help 5 folders for a more detailed description of the specific
folder structures that npm creates\.
-.
-.SS "Limitations of npm's Install Algorithm"
+.SS Limitations of npm's Install Algorithm
+.P
There are some very rare and pathological edge\-cases where a cycle can
cause npm to try to install a never\-ending tree of packages\. Here is
the simplest case:
-.
-.IP "" 4
-.
+.P
+.RS 2
.nf
-A \-> B \-> A\' \-> B\' \-> A \-> B \-> A\' \-> B\' \-> A \-> \.\.\.
-.
+A \-> B \-> A' \-> B' \-> A \-> B \-> A' \-> B' \-> A \-> \.\.\.
.fi
-.
-.IP "" 0
-.
+.RE
.P
-where \fBA\fR is some version of a package, and \fBA\'\fR is a different version
+where \fBA\fR is some version of a package, and \fBA'\fR is a different version
of the same package\. Because \fBB\fR depends on a different version of \fBA\fR
than the one that is already in the tree, it must install a separate
-copy\. The same is true of \fBA\'\fR, which must install \fBB\'\fR\|\. Because \fBB\'\fR
+copy\. The same is true of \fBA'\fR, which must install \fBB'\fR\|\. Because \fBB'\fR
depends on the original version of \fBA\fR, which has been overridden, the
cycle falls into infinite regress\.
-.
.P
-To avoid this situation, npm flat\-out refuses to install any \fBname@version\fR that is already present anywhere in the tree of package
+To avoid this situation, npm flat\-out refuses to install any
+\fBname@version\fR that is already present anywhere in the tree of package
folder ancestors\. A more correct, but more complex, solution would be
to symlink the existing version into the new location\. If this ever
affects a real use\-case, it will be investigated\.
-.
-.SH "SEE ALSO"
-.
-.IP "\(bu" 4
+.SH SEE ALSO
+.RS 0
+.IP \(bu 2
npm help 5 folders
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help update
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help link
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help rebuild
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help 7 scripts
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help build
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help config
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help 7 config
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help 5 npmrc
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help 7 registry
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help tag
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help rm
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help shrinkwrap
-.
-.IP "" 0
+
+.RE
diff --git a/deps/npm/man/man1/npm-link.1 b/deps/npm/man/man1/npm-link.1
index 15d45e4e079..62d76503f6a 100644
--- a/deps/npm/man/man1/npm-link.1
+++ b/deps/npm/man/man1/npm-link.1
@@ -1,119 +1,100 @@
-.\" Generated with Ronnjs 0.3.8
-.\" http://github.com/kapouer/ronnjs/
-.
-.TH "NPM\-LINK" "1" "September 2014" "" ""
-.
+.TH "NPM\-LINK" "1" "October 2014" "" ""
.SH "NAME"
-\fBnpm-link\fR \-\- Symlink a package folder
-.
-.SH "SYNOPSIS"
-.
+\fBnpm-link\fR \- Symlink a package folder
+.SH SYNOPSIS
+.P
+.RS 2
.nf
npm link (in package folder)
-npm link
+npm link [@/]
npm ln (with any of the previous argument usage)
-.
.fi
-.
-.SH "DESCRIPTION"
+.RE
+.SH DESCRIPTION
+.P
Package linking is a two\-step process\.
-.
.P
First, \fBnpm link\fR in a package folder will create a globally\-installed
-symbolic link from \fBprefix/package\-name\fR to the current folder\.
-.
+symbolic link from \fBprefix/package\-name\fR to the current folder (see
+npm help 7 \fBnpm\-config\fR for the value of \fBprefix\fR)\.
.P
Next, in some other location, \fBnpm link package\-name\fR will create a
symlink from the local \fBnode_modules\fR folder to the global symlink\.
-.
.P
Note that \fBpackage\-name\fR is taken from \fBpackage\.json\fR,
not from directory name\.
-.
+.P
+The package name can be optionally prefixed with a scope\. See npm help 7 \fBnpm\-scope\fR\|\.
+The scope must by preceded by an @\-symbol and followed by a slash\.
.P
When creating tarballs for \fBnpm publish\fR, the linked packages are
"snapshotted" to their current state by resolving the symbolic links\.
-.
.P
-This is
-handy for installing your own stuff, so that you can work on it and test it
-iteratively without having to continually rebuild\.
-.
+This is handy for installing your own stuff, so that you can work on it and
+test it iteratively without having to continually rebuild\.
.P
For example:
-.
-.IP "" 4
-.
+.P
+.RS 2
.nf
cd ~/projects/node\-redis # go into the package directory
npm link # creates global link
cd ~/projects/node\-bloggy # go into some other package directory\.
npm link redis # link\-install the package
-.
.fi
-.
-.IP "" 0
-.
+.RE
.P
Now, any changes to ~/projects/node\-redis will be reflected in
~/projects/node\-bloggy/node_modules/redis/
-.
.P
You may also shortcut the two steps in one\. For example, to do the
above use\-case in a shorter way:
-.
-.IP "" 4
-.
+.P
+.RS 2
.nf
cd ~/projects/node\-bloggy # go into the dir of your main project
npm link \.\./node\-redis # link the dir of your dependency
-.
.fi
-.
-.IP "" 0
-.
+.RE
.P
The second line is the equivalent of doing:
-.
-.IP "" 4
-.
+.P
+.RS 2
.nf
(cd \.\./node\-redis; npm link)
npm link redis
-.
.fi
-.
-.IP "" 0
-.
+.RE
.P
That is, it first creates a global link, and then links the global
-installation target into your project\'s \fBnode_modules\fR folder\.
-.
-.SH "SEE ALSO"
-.
-.IP "\(bu" 4
+installation target into your project's \fBnode_modules\fR folder\.
+.P
+If your linked package is scoped (see npm help 7 \fBnpm\-scope\fR) your link command must
+include that scope, e\.g\.
+.P
+.RS 2
+.nf
+npm link @myorg/privatepackage
+.fi
+.RE
+.SH SEE ALSO
+.RS 0
+.IP \(bu 2
npm help 7 developers
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help 7 faq
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help 5 package\.json
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help install
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help 5 folders
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help config
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help 7 config
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help 5 npmrc
-.
-.IP "" 0
+
+.RE
diff --git a/deps/npm/man/man1/npm-ls.1 b/deps/npm/man/man1/npm-ls.1
index 1584fb0f28c..9cf4823c9a6 100644
--- a/deps/npm/man/man1/npm-ls.1
+++ b/deps/npm/man/man1/npm-ls.1
@@ -1,146 +1,111 @@
-.\" Generated with Ronnjs 0.3.8
-.\" http://github.com/kapouer/ronnjs/
-.
-.TH "NPM\-LS" "1" "September 2014" "" ""
-.
+.TH "NPM\-LS" "1" "October 2014" "" ""
.SH "NAME"
-\fBnpm-ls\fR \-\- List installed packages
-.
-.SH "SYNOPSIS"
-.
+\fBnpm-ls\fR \- List installed packages
+.SH SYNOPSIS
+.P
+.RS 2
.nf
-npm list [ \.\.\.]
-npm ls [ \.\.\.]
-npm la [ \.\.\.]
-npm ll [ \.\.\.]
-.
+npm list [[@/] \.\.\.]
+npm ls [[@/] \.\.\.]
+npm la [[@/] \.\.\.]
+npm ll [[@/] \.\.\.]
.fi
-.
-.SH "DESCRIPTION"
+.RE
+.SH DESCRIPTION
+.P
This command will print to stdout all the versions of packages that are
installed, as well as their dependencies, in a tree\-structure\.
-.
.P
Positional arguments are \fBname@version\-range\fR identifiers, which will
limit the results to only the paths to the packages named\. Note that
nested packages will \fIalso\fR show the paths to the specified packages\.
-For example, running \fBnpm ls promzard\fR in npm\'s source tree will show:
-.
-.IP "" 4
-.
+For example, running \fBnpm ls promzard\fR in npm's source tree will show:
+.P
+.RS 2
.nf
-npm@1.4.28 /path/to/npm
+npm@2.1.6 /path/to/npm
└─┬ init\-package\-json@0\.0\.4
└── promzard@0\.1\.5
-.
.fi
-.
-.IP "" 0
-.
+.RE
.P
It will print out extraneous, missing, and invalid packages\.
-.
.P
If a project specifies git urls for dependencies these are shown
in parentheses after the name@version to make it easier for users to
recognize potential forks of a project\.
-.
.P
When run as \fBll\fR or \fBla\fR, it shows extended information by default\.
-.
-.SH "CONFIGURATION"
-.
-.SS "json"
-.
-.IP "\(bu" 4
+.SH CONFIGURATION
+.SS json
+.RS 0
+.IP \(bu 2
Default: false
-.
-.IP "\(bu" 4
+.IP \(bu 2
Type: Boolean
-.
-.IP "" 0
-.
+
+.RE
.P
Show information in JSON format\.
-.
-.SS "long"
-.
-.IP "\(bu" 4
+.SS long
+.RS 0
+.IP \(bu 2
Default: false
-.
-.IP "\(bu" 4
+.IP \(bu 2
Type: Boolean
-.
-.IP "" 0
-.
+
+.RE
.P
Show extended information\.
-.
-.SS "parseable"
-.
-.IP "\(bu" 4
+.SS parseable
+.RS 0
+.IP \(bu 2
Default: false
-.
-.IP "\(bu" 4
+.IP \(bu 2
Type: Boolean
-.
-.IP "" 0
-.
+
+.RE
.P
Show parseable output instead of tree view\.
-.
-.SS "global"
-.
-.IP "\(bu" 4
+.SS global
+.RS 0
+.IP \(bu 2
Default: false
-.
-.IP "\(bu" 4
+.IP \(bu 2
Type: Boolean
-.
-.IP "" 0
-.
+
+.RE
.P
List packages in the global install prefix instead of in the current
project\.
-.
-.SS "depth"
-.
-.IP "\(bu" 4
+.SS depth
+.RS 0
+.IP \(bu 2
Type: Int
-.
-.IP "" 0
-.
+
+.RE
.P
Max display depth of the dependency tree\.
-.
-.SH "SEE ALSO"
-.
-.IP "\(bu" 4
+.SH SEE ALSO
+.RS 0
+.IP \(bu 2
npm help config
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help 7 config
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help 5 npmrc
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help 5 folders
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help install
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help link
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help prune
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help outdated
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help update
-.
-.IP "" 0
+
+.RE
diff --git a/deps/npm/man/man1/npm-outdated.1 b/deps/npm/man/man1/npm-outdated.1
index 7376fcd24af..45433a814e2 100644
--- a/deps/npm/man/man1/npm-outdated.1
+++ b/deps/npm/man/man1/npm-outdated.1
@@ -1,102 +1,79 @@
-.\" Generated with Ronnjs 0.3.8
-.\" http://github.com/kapouer/ronnjs/
-.
-.TH "NPM\-OUTDATED" "1" "September 2014" "" ""
-.
+.TH "NPM\-OUTDATED" "1" "October 2014" "" ""
.SH "NAME"
-\fBnpm-outdated\fR \-\- Check for outdated packages
-.
-.SH "SYNOPSIS"
-.
+\fBnpm-outdated\fR \- Check for outdated packages
+.SH SYNOPSIS
+.P
+.RS 2
.nf
npm outdated [ [ \.\.\.]]
-.
.fi
-.
-.SH "DESCRIPTION"
+.RE
+.SH DESCRIPTION
+.P
This command will check the registry to see if any (or, specific) installed
packages are currently outdated\.
-.
.P
-The resulting field \'wanted\' shows the latest version according to the
-version specified in the package\.json, the field \'latest\' the very latest
+The resulting field 'wanted' shows the latest version according to the
+version specified in the package\.json, the field 'latest' the very latest
version of the package\.
-.
-.SH "CONFIGURATION"
-.
-.SS "json"
-.
-.IP "\(bu" 4
+.SH CONFIGURATION
+.SS json
+.RS 0
+.IP \(bu 2
Default: false
-.
-.IP "\(bu" 4
+.IP \(bu 2
Type: Boolean
-.
-.IP "" 0
-.
+
+.RE
.P
Show information in JSON format\.
-.
-.SS "long"
-.
-.IP "\(bu" 4
+.SS long
+.RS 0
+.IP \(bu 2
Default: false
-.
-.IP "\(bu" 4
+.IP \(bu 2
Type: Boolean
-.
-.IP "" 0
-.
+
+.RE
.P
Show extended information\.
-.
-.SS "parseable"
-.
-.IP "\(bu" 4
+.SS parseable
+.RS 0
+.IP \(bu 2
Default: false
-.
-.IP "\(bu" 4
+.IP \(bu 2
Type: Boolean
-.
-.IP "" 0
-.
+
+.RE
.P
Show parseable output instead of tree view\.
-.
-.SS "global"
-.
-.IP "\(bu" 4
+.SS global
+.RS 0
+.IP \(bu 2
Default: false
-.
-.IP "\(bu" 4
+.IP \(bu 2
Type: Boolean
-.
-.IP "" 0
-.
+
+.RE
.P
Check packages in the global install prefix instead of in the current
project\.
-.
-.SS "depth"
-.
-.IP "\(bu" 4
+.SS depth
+.RS 0
+.IP \(bu 2
Type: Int
-.
-.IP "" 0
-.
+
+.RE
.P
Max depth for checking dependency tree\.
-.
-.SH "SEE ALSO"
-.
-.IP "\(bu" 4
+.SH SEE ALSO
+.RS 0
+.IP \(bu 2
npm help update
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help 7 registry
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help 5 folders
-.
-.IP "" 0
+
+.RE
diff --git a/deps/npm/man/man1/npm-owner.1 b/deps/npm/man/man1/npm-owner.1
index f204431e5dc..3ed5549f71c 100644
--- a/deps/npm/man/man1/npm-owner.1
+++ b/deps/npm/man/man1/npm-owner.1
@@ -1,58 +1,47 @@
-.\" Generated with Ronnjs 0.3.8
-.\" http://github.com/kapouer/ronnjs/
-.
-.TH "NPM\-OWNER" "1" "September 2014" "" ""
-.
+.TH "NPM\-OWNER" "1" "October 2014" "" ""
.SH "NAME"
-\fBnpm-owner\fR \-\- Manage package owners
-.
-.SH "SYNOPSIS"
-.
+\fBnpm-owner\fR \- Manage package owners
+.SH SYNOPSIS
+.P
+.RS 2
.nf
npm owner ls
npm owner add
npm owner rm
-.
.fi
-.
-.SH "DESCRIPTION"
+.RE
+.SH DESCRIPTION
+.P
Manage ownership of published packages\.
-.
-.IP "\(bu" 4
+.RS 0
+.IP \(bu 2
ls:
List all the users who have access to modify a package and push new versions\.
Handy when you need to know who to bug for help\.
-.
-.IP "\(bu" 4
+.IP \(bu 2
add:
Add a new user as a maintainer of a package\. This user is enabled to modify
metadata, publish new versions, and add other owners\.
-.
-.IP "\(bu" 4
+.IP \(bu 2
rm:
Remove a user from the package owner list\. This immediately revokes their
privileges\.
-.
-.IP "" 0
-.
+
+.RE
.P
Note that there is only one level of access\. Either you can modify a package,
-or you can\'t\. Future versions may contain more fine\-grained access levels, but
+or you can't\. Future versions may contain more fine\-grained access levels, but
that is not implemented at this time\.
-.
-.SH "SEE ALSO"
-.
-.IP "\(bu" 4
+.SH SEE ALSO
+.RS 0
+.IP \(bu 2
npm help publish
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help 7 registry
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help adduser
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help 7 disputes
-.
-.IP "" 0
+
+.RE
diff --git a/deps/npm/man/man1/npm-pack.1 b/deps/npm/man/man1/npm-pack.1
index 951d209adb1..8b9408abb27 100644
--- a/deps/npm/man/man1/npm-pack.1
+++ b/deps/npm/man/man1/npm-pack.1
@@ -1,48 +1,37 @@
-.\" Generated with Ronnjs 0.3.8
-.\" http://github.com/kapouer/ronnjs/
-.
-.TH "NPM\-PACK" "1" "September 2014" "" ""
-.
+.TH "NPM\-PACK" "1" "October 2014" "" ""
.SH "NAME"
-\fBnpm-pack\fR \-\- Create a tarball from a package
-.
-.SH "SYNOPSIS"
-.
+\fBnpm-pack\fR \- Create a tarball from a package
+.SH SYNOPSIS
+.P
+.RS 2
.nf
npm pack [ [ \.\.\.]]
-.
.fi
-.
-.SH "DESCRIPTION"
-For anything that\'s installable (that is, a package folder, tarball,
+.RE
+.SH DESCRIPTION
+.P
+For anything that's installable (that is, a package folder, tarball,
tarball url, name@tag, name@version, or name), this command will fetch
it to the cache, and then copy the tarball to the current working
directory as \fB\-\.tgz\fR, and then write the filenames out to
stdout\.
-.
.P
If the same package is specified multiple times, then the file will be
overwritten the second time\.
-.
.P
If no arguments are supplied, then npm packs the current package folder\.
-.
-.SH "SEE ALSO"
-.
-.IP "\(bu" 4
+.SH SEE ALSO
+.RS 0
+.IP \(bu 2
npm help cache
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help publish
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help config
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help 7 config
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help 5 npmrc
-.
-.IP "" 0
+
+.RE
diff --git a/deps/npm/man/man1/npm-prefix.1 b/deps/npm/man/man1/npm-prefix.1
index 9cc3f7cadd6..b7bcac63956 100644
--- a/deps/npm/man/man1/npm-prefix.1
+++ b/deps/npm/man/man1/npm-prefix.1
@@ -1,40 +1,34 @@
-.\" Generated with Ronnjs 0.3.8
-.\" http://github.com/kapouer/ronnjs/
-.
-.TH "NPM\-PREFIX" "1" "September 2014" "" ""
-.
+.TH "NPM\-PREFIX" "1" "October 2014" "" ""
.SH "NAME"
-\fBnpm-prefix\fR \-\- Display prefix
-.
-.SH "SYNOPSIS"
-.
+\fBnpm-prefix\fR \- Display prefix
+.SH SYNOPSIS
+.P
+.RS 2
.nf
-npm prefix
-.
+npm prefix [\-g]
.fi
-.
-.SH "DESCRIPTION"
-Print the prefix to standard out\.
-.
-.SH "SEE ALSO"
-.
-.IP "\(bu" 4
+.RE
+.SH DESCRIPTION
+.P
+Print the local prefix to standard out\. This is the closest parent directory
+to contain a package\.json file unless \fB\-g\fR is also specified\.
+.P
+If \fB\-g\fR is specified, this will be the value of the global prefix\. See
+npm help 7 \fBnpm\-config\fR for more detail\.
+.SH SEE ALSO
+.RS 0
+.IP \(bu 2
npm help root
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help bin
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help 5 folders
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help config
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help 7 config
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help 5 npmrc
-.
-.IP "" 0
+
+.RE
diff --git a/deps/npm/man/man1/npm-prune.1 b/deps/npm/man/man1/npm-prune.1
index 71bb77c407d..1a8cc952156 100644
--- a/deps/npm/man/man1/npm-prune.1
+++ b/deps/npm/man/man1/npm-prune.1
@@ -1,42 +1,33 @@
-.\" Generated with Ronnjs 0.3.8
-.\" http://github.com/kapouer/ronnjs/
-.
-.TH "NPM\-PRUNE" "1" "September 2014" "" ""
-.
+.TH "NPM\-PRUNE" "1" "October 2014" "" ""
.SH "NAME"
-\fBnpm-prune\fR \-\- Remove extraneous packages
-.
-.SH "SYNOPSIS"
-.
+\fBnpm-prune\fR \- Remove extraneous packages
+.SH SYNOPSIS
+.P
+.RS 2
.nf
npm prune [ [ [ [\-\-tag ]
npm publish [\-\-tag ]
-.
.fi
-.
-.SH "DESCRIPTION"
-Publishes a package to the registry so that it can be installed by name\.
-.
-.IP "\(bu" 4
+.RE
+.SH DESCRIPTION
+.P
+Publishes a package to the registry so that it can be installed by name\. See
+npm help 7 \fBnpm\-developers\fR for details on what's included in the published package, as
+well as details on how the package is built\.
+.P
+By default npm will publish to the public registry\. This can be overridden by
+specifying a different default registry or using a npm help 7 \fBnpm\-scope\fR in the name
+(see npm help 5 \fBpackage\.json\fR)\.
+.RS 0
+.IP \(bu 2
\fB\fR:
A folder containing a package\.json file
-.
-.IP "\(bu" 4
+.IP \(bu 2
\fB\fR:
A url or file path to a gzipped tar archive containing a single folder
with a package\.json file inside\.
-.
-.IP "\(bu" 4
+.IP \(bu 2
\fB[\-\-tag ]\fR
Registers the published package with the given tag, such that \fBnpm install
@\fR will install this version\. By default, \fBnpm publish\fR updates
and \fBnpm install\fR installs the \fBlatest\fR tag\.
-.
-.IP "" 0
-.
+
+.RE
.P
Fails if the package name and version combination already exists in
-the registry\.
-.
+the specified registry\.
.P
Once a package is published with a given name and version, that
specific name and version combination can never be used again, even if
it is removed with npm help unpublish\.
-.
-.SH "SEE ALSO"
-.
-.IP "\(bu" 4
+.SH SEE ALSO
+.RS 0
+.IP \(bu 2
npm help 7 registry
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help adduser
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help owner
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help deprecate
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help tag
-.
-.IP "" 0
+
+.RE
diff --git a/deps/npm/man/man1/npm-rebuild.1 b/deps/npm/man/man1/npm-rebuild.1
index 4130eb773f2..0e04b9cfbe1 100644
--- a/deps/npm/man/man1/npm-rebuild.1
+++ b/deps/npm/man/man1/npm-rebuild.1
@@ -1,37 +1,31 @@
-.\" Generated with Ronnjs 0.3.8
-.\" http://github.com/kapouer/ronnjs/
-.
-.TH "NPM\-REBUILD" "1" "September 2014" "" ""
-.
+.TH "NPM\-REBUILD" "1" "October 2014" "" ""
.SH "NAME"
-\fBnpm-rebuild\fR \-\- Rebuild a package
-.
-.SH "SYNOPSIS"
-.
+\fBnpm-rebuild\fR \- Rebuild a package
+.SH SYNOPSIS
+.P
+.RS 2
.nf
npm rebuild [ [ \.\.\.]]
npm rb [ [ \.\.\.]]
-.
.fi
-.
-.IP "\(bu" 4
+.RE
+.RS 0
+.IP \(bu 2
\fB\fR:
The package to rebuild
-.
-.IP "" 0
-.
-.SH "DESCRIPTION"
+
+.RE
+.SH DESCRIPTION
+.P
This command runs the \fBnpm build\fR command on the matched folders\. This is useful
when you install a new version of node, and must recompile all your C++ addons with
the new binary\.
-.
-.SH "SEE ALSO"
-.
-.IP "\(bu" 4
+.SH SEE ALSO
+.RS 0
+.IP \(bu 2
npm help build
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help install
-.
-.IP "" 0
+
+.RE
diff --git a/deps/npm/man/man1/npm-repo.1 b/deps/npm/man/man1/npm-repo.1
index 557a3566eaa..dc8428d0242 100644
--- a/deps/npm/man/man1/npm-repo.1
+++ b/deps/npm/man/man1/npm-repo.1
@@ -1,47 +1,37 @@
-.\" Generated with Ronnjs 0.3.8
-.\" http://github.com/kapouer/ronnjs/
-.
-.TH "NPM\-REPO" "1" "September 2014" "" ""
-.
+.TH "NPM\-REPO" "1" "October 2014" "" ""
.SH "NAME"
-\fBnpm-repo\fR \-\- Open package repository page in the browser
-.
-.SH "SYNOPSIS"
-.
+\fBnpm-repo\fR \- Open package repository page in the browser
+.SH SYNOPSIS
+.P
+.RS 2
.nf
npm repo
npm repo (with no args in a package dir)
-.
.fi
-.
-.SH "DESCRIPTION"
-This command tries to guess at the likely location of a package\'s
+.RE
+.SH DESCRIPTION
+.P
+This command tries to guess at the likely location of a package's
repository URL, and then tries to open it using the \fB\-\-browser\fR
config param\. If no package name is provided, it will search for
a \fBpackage\.json\fR in the current folder and use the \fBname\fR property\.
-.
-.SH "CONFIGURATION"
-.
-.SS "browser"
-.
-.IP "\(bu" 4
+.SH CONFIGURATION
+.SS browser
+.RS 0
+.IP \(bu 2
Default: OS X: \fB"open"\fR, Windows: \fB"start"\fR, Others: \fB"xdg\-open"\fR
-.
-.IP "\(bu" 4
+.IP \(bu 2
Type: String
-.
-.IP "" 0
-.
+
+.RE
.P
The browser that is called by the \fBnpm repo\fR command to open websites\.
-.
-.SH "SEE ALSO"
-.
-.IP "\(bu" 4
+.SH SEE ALSO
+.RS 0
+.IP \(bu 2
npm help docs
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help config
-.
-.IP "" 0
+
+.RE
diff --git a/deps/npm/man/man1/npm-restart.1 b/deps/npm/man/man1/npm-restart.1
index 828a43f30fc..234d0aa76e9 100644
--- a/deps/npm/man/man1/npm-restart.1
+++ b/deps/npm/man/man1/npm-restart.1
@@ -1,42 +1,29 @@
-.\" Generated with Ronnjs 0.3.8
-.\" http://github.com/kapouer/ronnjs/
-.
-.TH "NPM\-RESTART" "1" "September 2014" "" ""
-.
+.TH "NPM\-RESTART" "1" "October 2014" "" ""
.SH "NAME"
-\fBnpm-restart\fR \-\- Start a package
-.
-.SH "SYNOPSIS"
-.
+\fBnpm-restart\fR \- Start a package
+.SH SYNOPSIS
+.P
+.RS 2
.nf
-npm restart
-.
+npm restart [\-\- ]
.fi
-.
-.SH "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\.
-.
+.RE
+.SH DESCRIPTION
.P
-If no version is specified, then it restarts the "active" version\.
-.
-.SH "SEE ALSO"
-.
-.IP "\(bu" 4
+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\.
+.SH SEE ALSO
+.RS 0
+.IP \(bu 2
npm help run\-script
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help 7 scripts
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help test
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help start
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help stop
-.
-.IP "" 0
+
+.RE
diff --git a/deps/npm/man/man1/npm-rm.1 b/deps/npm/man/man1/npm-rm.1
index 424314c7d57..c7f92fb52bf 100644
--- a/deps/npm/man/man1/npm-rm.1
+++ b/deps/npm/man/man1/npm-rm.1
@@ -1,44 +1,34 @@
-.\" Generated with Ronnjs 0.3.8
-.\" http://github.com/kapouer/ronnjs/
-.
-.TH "NPM\-RM" "1" "September 2014" "" ""
-.
+.TH "NPM\-RM" "1" "October 2014" "" ""
.SH "NAME"
-\fBnpm-rm\fR \-\- Remove a package
-.
-.SH "SYNOPSIS"
-.
+\fBnpm-rm\fR \- Remove a package
+.SH SYNOPSIS
+.P
+.RS 2
.nf
npm rm
npm r
npm uninstall
npm un
-.
.fi
-.
-.SH "DESCRIPTION"
+.RE
+.SH DESCRIPTION
+.P
This uninstalls a package, completely removing everything npm installed
on its behalf\.
-.
-.SH "SEE ALSO"
-.
-.IP "\(bu" 4
+.SH SEE ALSO
+.RS 0
+.IP \(bu 2
npm help prune
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help install
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help 5 folders
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help config
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help 7 config
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help 5 npmrc
-.
-.IP "" 0
+
+.RE
diff --git a/deps/npm/man/man1/npm-root.1 b/deps/npm/man/man1/npm-root.1
index 463eeaf934f..f85ebb97085 100644
--- a/deps/npm/man/man1/npm-root.1
+++ b/deps/npm/man/man1/npm-root.1
@@ -1,40 +1,30 @@
-.\" Generated with Ronnjs 0.3.8
-.\" http://github.com/kapouer/ronnjs/
-.
-.TH "NPM\-ROOT" "1" "September 2014" "" ""
-.
+.TH "NPM\-ROOT" "1" "October 2014" "" ""
.SH "NAME"
-\fBnpm-root\fR \-\- Display npm root
-.
-.SH "SYNOPSIS"
-.
+\fBnpm-root\fR \- Display npm root
+.SH SYNOPSIS
+.P
+.RS 2
.nf
npm root
-.
.fi
-.
-.SH "DESCRIPTION"
+.RE
+.SH DESCRIPTION
+.P
Print the effective \fBnode_modules\fR folder to standard out\.
-.
-.SH "SEE ALSO"
-.
-.IP "\(bu" 4
+.SH SEE ALSO
+.RS 0
+.IP \(bu 2
npm help prefix
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help bin
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help 5 folders
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help config
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help 7 config
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help 5 npmrc
-.
-.IP "" 0
+
+.RE
diff --git a/deps/npm/man/man1/npm-run-script.1 b/deps/npm/man/man1/npm-run-script.1
index aa2740c1198..905908a7a10 100644
--- a/deps/npm/man/man1/npm-run-script.1
+++ b/deps/npm/man/man1/npm-run-script.1
@@ -1,45 +1,49 @@
-.\" Generated with Ronnjs 0.3.8
-.\" http://github.com/kapouer/ronnjs/
-.
-.TH "NPM\-RUN\-SCRIPT" "1" "September 2014" "" ""
-.
+.TH "NPM\-RUN\-SCRIPT" "1" "October 2014" "" ""
.SH "NAME"
-\fBnpm-run-script\fR \-\- Run arbitrary package scripts
-.
-.SH "SYNOPSIS"
-.
+\fBnpm-run-script\fR \- Run arbitrary package scripts
+.SH SYNOPSIS
+.P
+.RS 2
.nf
-npm run\-script [] [command]
-npm run [] [command]
-.
+npm run\-script [command] [\-\- ]
+npm run [command] [\-\- ]
.fi
-.
-.SH "DESCRIPTION"
-This runs an arbitrary command from a package\'s \fB"scripts"\fR object\.
+.RE
+.SH DESCRIPTION
+.P
+This runs an arbitrary command from a package's \fB"scripts"\fR object\.
If no package name is provided, it will search for a \fBpackage\.json\fR
in the current folder and use its \fB"scripts"\fR object\. If no \fB"command"\fR
is provided, it will list the available top level scripts\.
-.
.P
It is used by the test, start, restart, and stop commands, but can be
called directly, as well\.
-.
-.SH "SEE ALSO"
-.
-.IP "\(bu" 4
+.P
+As of \fBnpm@2\.0\.0\fR \fIhttp://blog\.npmjs\.org/post/98131109725/npm\-2\-0\-0\fR, you can
+use custom arguments when executing scripts\. The special option \fB\-\-\fR is used by
+getopt \fIhttp://goo\.gl/KxMmtG\fR to delimit the end of the options\. npm will pass
+all the arguments after the \fB\-\-\fR directly to your script:
+.P
+.RS 2
+.nf
+npm run test \-\- \-\-grep="pattern"
+.fi
+.RE
+.P
+The arguments will only be passed to the script specified after \fBnpm run\fR
+and not to any pre or post script\.
+.SH SEE ALSO
+.RS 0
+.IP \(bu 2
npm help 7 scripts
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help test
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help start
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help restart
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help stop
-.
-.IP "" 0
+
+.RE
diff --git a/deps/npm/man/man1/npm-search.1 b/deps/npm/man/man1/npm-search.1
index 2c7edcd2ad0..4ad5a67b8c9 100644
--- a/deps/npm/man/man1/npm-search.1
+++ b/deps/npm/man/man1/npm-search.1
@@ -1,62 +1,48 @@
-.\" Generated with Ronnjs 0.3.8
-.\" http://github.com/kapouer/ronnjs/
-.
-.TH "NPM\-SEARCH" "1" "September 2014" "" ""
-.
+.TH "NPM\-SEARCH" "1" "October 2014" "" ""
.SH "NAME"
-\fBnpm-search\fR \-\- Search for packages
-.
-.SH "SYNOPSIS"
-.
+\fBnpm-search\fR \- Search for packages
+.SH SYNOPSIS
+.P
+.RS 2
.nf
npm search [\-\-long] [search terms \.\.\.]
npm s [search terms \.\.\.]
npm se [search terms \.\.\.]
-.
.fi
-.
-.SH "DESCRIPTION"
+.RE
+.SH DESCRIPTION
+.P
Search the registry for packages matching the search terms\.
-.
.P
-If a term starts with \fB/\fR, then it\'s interpreted as a regular expression\.
+If a term starts with \fB/\fR, then it's interpreted as a regular expression\.
A trailing \fB/\fR will be ignored in this case\. (Note that many regular
expression characters must be escaped or quoted in most shells\.)
-.
-.SH "CONFIGURATION"
-.
-.SS "long"
-.
-.IP "\(bu" 4
+.SH CONFIGURATION
+.SS long
+.RS 0
+.IP \(bu 2
Default: false
-.
-.IP "\(bu" 4
+.IP \(bu 2
Type: Boolean
-.
-.IP "" 0
-.
+
+.RE
.P
Display full package descriptions and other long text across multiple
lines\. When disabled (default) search results are truncated to fit
neatly on a single line\. Modules with extremely long names will
fall on multiple lines\.
-.
-.SH "SEE ALSO"
-.
-.IP "\(bu" 4
+.SH SEE ALSO
+.RS 0
+.IP \(bu 2
npm help 7 registry
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help config
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help 7 config
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help 5 npmrc
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help view
-.
-.IP "" 0
+
+.RE
diff --git a/deps/npm/man/man1/npm-shrinkwrap.1 b/deps/npm/man/man1/npm-shrinkwrap.1
index 2a053a5b0b7..fa2b313ab2b 100644
--- a/deps/npm/man/man1/npm-shrinkwrap.1
+++ b/deps/npm/man/man1/npm-shrinkwrap.1
@@ -1,43 +1,36 @@
-.\" Generated with Ronnjs 0.3.8
-.\" http://github.com/kapouer/ronnjs/
-.
-.TH "NPM\-SHRINKWRAP" "1" "September 2014" "" ""
-.
+.TH "NPM\-SHRINKWRAP" "1" "October 2014" "" ""
.SH "NAME"
-\fBnpm-shrinkwrap\fR \-\- Lock down dependency versions
-.
-.SH "SYNOPSIS"
-.
+\fBnpm-shrinkwrap\fR \- Lock down dependency versions
+.SH SYNOPSIS
+.P
+.RS 2
.nf
npm shrinkwrap
-.
.fi
-.
-.SH "DESCRIPTION"
-This command locks down the versions of a package\'s dependencies so
+.RE
+.SH DESCRIPTION
+.P
+This command locks down the versions of a package's dependencies so
that you can control exactly which versions of each dependency will be
used when your package is installed\. The "package\.json" file is still
required if you want to use "npm install"\.
-.
.P
-By default, "npm install" recursively installs the target\'s
+By default, "npm install" recursively installs the target's
dependencies (as specified in package\.json), choosing the latest
-available version that satisfies the dependency\'s semver pattern\. In
+available version that satisfies the dependency's semver pattern\. In
some situations, particularly when shipping software where each change
-is tightly managed, it\'s desirable to fully specify each version of
+is tightly managed, it's desirable to fully specify each version of
each dependency recursively so that subsequent builds and deploys do
not inadvertently pick up newer versions of a dependency that satisfy
the semver pattern\. Specifying specific semver patterns in each
-dependency\'s package\.json would facilitate this, but that\'s not always
+dependency's package\.json would facilitate this, but that's not always
possible or desirable, as when another author owns the npm package\.
-It\'s also possible to check dependencies directly into source control,
+It's also possible to check dependencies directly into source control,
but that may be undesirable for other reasons\.
-.
.P
As an example, consider package A:
-.
-.IP "" 4
-.
+.P
+.RS 2
.nf
{
"name": "A",
@@ -46,16 +39,12 @@ As an example, consider package A:
"B": "<0\.1\.0"
}
}
-.
.fi
-.
-.IP "" 0
-.
+.RE
.P
package B:
-.
-.IP "" 4
-.
+.P
+.RS 2
.nf
{
"name": "B",
@@ -64,82 +53,61 @@ package B:
"C": "<0\.1\.0"
}
}
-.
.fi
-.
-.IP "" 0
-.
+.RE
.P
and package C:
-.
-.IP "" 4
-.
+.P
+.RS 2
.nf
{
"name": "C,
"version": "0\.0\.1"
}
-.
.fi
-.
-.IP "" 0
-.
+.RE
.P
If these are the only versions of A, B, and C available in the
registry, then a normal "npm install A" will install:
-.
-.IP "" 4
-.
+.P
+.RS 2
.nf
A@0\.1\.0
`\-\- B@0\.0\.1
`\-\- C@0\.0\.1
-.
.fi
-.
-.IP "" 0
-.
+.RE
.P
However, if B@0\.0\.2 is published, then a fresh "npm install A" will
install:
-.
-.IP "" 4
-.
+.P
+.RS 2
.nf
A@0\.1\.0
`\-\- B@0\.0\.2
`\-\- C@0\.0\.1
-.
.fi
-.
-.IP "" 0
-.
+.RE
.P
-assuming the new version did not modify B\'s dependencies\. Of course,
+assuming the new version did not modify B's dependencies\. Of course,
the new version of B could include a new version of C and any number
of new dependencies\. If such changes are undesirable, the author of A
-could specify a dependency on B@0\.0\.1\. However, if A\'s author and B\'s
-author are not the same person, there\'s no way for A\'s author to say
+could specify a dependency on B@0\.0\.1\. However, if A's author and B's
+author are not the same person, there's no way for A's author to say
that he or she does not want to pull in newly published versions of C
-when B hasn\'t changed at all\.
-.
+when B hasn't changed at all\.
+.P
+In this case, A's author can run
.P
-In this case, A\'s author can run
-.
-.IP "" 4
-.
+.RS 2
.nf
npm shrinkwrap
-.
.fi
-.
-.IP "" 0
-.
+.RE
.P
This generates npm\-shrinkwrap\.json, which will look something like this:
-.
-.IP "" 4
-.
+.P
+.RS 2
.nf
{
"name": "A",
@@ -155,79 +123,68 @@ This generates npm\-shrinkwrap\.json, which will look something like this:
}
}
}
-.
.fi
-.
-.IP "" 0
-.
+.RE
.P
The shrinkwrap command has locked down the dependencies based on
-what\'s currently installed in node_modules\. When "npm install"
+what's currently installed in node_modules\. When "npm install"
installs a package with a npm\-shrinkwrap\.json file in the package
root, the shrinkwrap file (rather than package\.json files) completely
drives the installation of that package and all of its dependencies
(recursively)\. So now the author publishes A@0\.1\.0, and subsequent
installs of this package will use B@0\.0\.1 and C@0\.1\.0, regardless the
-dependencies and versions listed in A\'s, B\'s, and C\'s package\.json
+dependencies and versions listed in A's, B's, and C's package\.json
files\.
-.
-.SS "Using shrinkwrapped packages"
+.SS Using shrinkwrapped packages
+.P
Using a shrinkwrapped package is no different than using any other
package: you can "npm install" it by hand, or add a dependency to your
package\.json file and "npm install" it\.
-.
-.SS "Building shrinkwrapped packages"
+.SS Building shrinkwrapped packages
+.P
To shrinkwrap an existing package:
-.
-.IP "1" 4
+.RS 0
+.IP 1. 3
Run "npm install" in the package root to install the current
versions of all dependencies\.
-.
-.IP "2" 4
+.IP 2. 3
Validate that the package works as expected with these versions\.
-.
-.IP "3" 4
+.IP 3. 3
Run "npm shrinkwrap", add npm\-shrinkwrap\.json to git, and publish
your package\.
-.
-.IP "" 0
-.
+
+.RE
.P
To add or update a dependency in a shrinkwrapped package:
-.
-.IP "1" 4
+.RS 0
+.IP 1. 3
Run "npm install" in the package root to install the current
versions of all dependencies\.
-.
-.IP "2" 4
+.IP 2. 3
Add or update dependencies\. "npm install" each new or updated
package individually and then update package\.json\. Note that they
must be explicitly named in order to be installed: running \fBnpm
install\fR with no arguments will merely reproduce the existing
shrinkwrap\.
-.
-.IP "3" 4
+.IP 3. 3
Validate that the package works as expected with the new
dependencies\.
-.
-.IP "4" 4
+.IP 4. 3
Run "npm shrinkwrap", commit the new npm\-shrinkwrap\.json, and
publish your package\.
-.
-.IP "" 0
-.
+
+.RE
.P
You can use npm help outdated to view dependencies with newer versions
available\.
-.
-.SS "Other Notes"
-A shrinkwrap file must be consistent with the package\'s package\.json
+.SS Other Notes
+.P
+A shrinkwrap file must be consistent with the package's package\.json
file\. "npm shrinkwrap" will fail if required dependencies are not
already installed, since that would result in a shrinkwrap that
-wouldn\'t actually work\. Similarly, the command will fail if there are
+wouldn't actually work\. Similarly, the command will fail if there are
extraneous packages (not referenced by package\.json), since that would
indicate that package\.json is not correct\.
-.
.P
Since "npm shrinkwrap" is intended to lock down your dependencies for
production use, \fBdevDependencies\fR will not be included unless you
@@ -235,31 +192,27 @@ explicitly set the \fB\-\-dev\fR flag when you run \fBnpm shrinkwrap\fR\|\. If
installed \fBdevDependencies\fR are excluded, then npm will print a
warning\. If you want them to be installed with your module by
default, please consider adding them to \fBdependencies\fR instead\.
-.
.P
-If shrinkwrapped package A depends on shrinkwrapped package B, B\'s
+If shrinkwrapped package A depends on shrinkwrapped package B, B's
shrinkwrap will not be used as part of the installation of A\. However,
-because A\'s shrinkwrap is constructed from a valid installation of B
-and recursively specifies all dependencies, the contents of B\'s
-shrinkwrap will implicitly be included in A\'s shrinkwrap\.
-.
-.SS "Caveats"
+because A's shrinkwrap is constructed from a valid installation of B
+and recursively specifies all dependencies, the contents of B's
+shrinkwrap will implicitly be included in A's shrinkwrap\.
+.SS Caveats
+.P
If you wish to lock down the specific bytes included in a package, for
example to have 100% confidence in being able to reproduce a
deployment or build, then you ought to check your dependencies into
source control, or pursue some other mechanism that can verify
contents rather than versions\.
-.
-.SH "SEE ALSO"
-.
-.IP "\(bu" 4
+.SH SEE ALSO
+.RS 0
+.IP \(bu 2
npm help install
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help 5 package\.json
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help ls
-.
-.IP "" 0
+
+.RE
diff --git a/deps/npm/man/man1/npm-star.1 b/deps/npm/man/man1/npm-star.1
index bbcfee19eb1..8dbc0292ae7 100644
--- a/deps/npm/man/man1/npm-star.1
+++ b/deps/npm/man/man1/npm-star.1
@@ -1,39 +1,30 @@
-.\" Generated with Ronnjs 0.3.8
-.\" http://github.com/kapouer/ronnjs/
-.
-.TH "NPM\-STAR" "1" "September 2014" "" ""
-.
+.TH "NPM\-STAR" "1" "October 2014" "" ""
.SH "NAME"
-\fBnpm-star\fR \-\- Mark your favorite packages
-.
-.SH "SYNOPSIS"
-.
+\fBnpm-star\fR \- Mark your favorite packages
+.SH SYNOPSIS
+.P
+.RS 2
.nf
npm star [, \.\.\.]
npm unstar [, \.\.\.]
-.
.fi
-.
-.SH "DESCRIPTION"
-"Starring" a package means that you have some interest in it\. It\'s
+.RE
+.SH DESCRIPTION
+.P
+"Starring" a package means that you have some interest in it\. It's
a vaguely positive way to show that you care\.
-.
.P
"Unstarring" is the same thing, but in reverse\.
-.
.P
-It\'s a boolean thing\. Starring repeatedly has no additional effect\.
-.
-.SH "SEE ALSO"
-.
-.IP "\(bu" 4
+It's a boolean thing\. Starring repeatedly has no additional effect\.
+.SH SEE ALSO
+.RS 0
+.IP \(bu 2
npm help view
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help whoami
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help adduser
-.
-.IP "" 0
+
+.RE
diff --git a/deps/npm/man/man1/npm-stars.1 b/deps/npm/man/man1/npm-stars.1
index 9b2d6d187e4..1762a0f08bd 100644
--- a/deps/npm/man/man1/npm-stars.1
+++ b/deps/npm/man/man1/npm-stars.1
@@ -1,40 +1,31 @@
-.\" Generated with Ronnjs 0.3.8
-.\" http://github.com/kapouer/ronnjs/
-.
-.TH "NPM\-STARS" "1" "September 2014" "" ""
-.
+.TH "NPM\-STARS" "1" "October 2014" "" ""
.SH "NAME"
-\fBnpm-stars\fR \-\- View packages marked as favorites
-.
-.SH "SYNOPSIS"
-.
+\fBnpm-stars\fR \- View packages marked as favorites
+.SH SYNOPSIS
+.P
+.RS 2
.nf
npm stars
npm stars [username]
-.
.fi
-.
-.SH "DESCRIPTION"
+.RE
+.SH DESCRIPTION
+.P
If you have starred a lot of neat things and want to find them again
quickly this command lets you do just that\.
-.
.P
-You may also want to see your friend\'s favorite packages, in this case
+You may also want to see your friend's favorite packages, in this case
you will most certainly enjoy this command\.
-.
-.SH "SEE ALSO"
-.
-.IP "\(bu" 4
+.SH SEE ALSO
+.RS 0
+.IP \(bu 2
npm help star
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help view
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help whoami
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help adduser
-.
-.IP "" 0
+
+.RE
diff --git a/deps/npm/man/man1/npm-start.1 b/deps/npm/man/man1/npm-start.1
index c76e2c92a5d..0a342ee1f1d 100644
--- a/deps/npm/man/man1/npm-start.1
+++ b/deps/npm/man/man1/npm-start.1
@@ -1,37 +1,28 @@
-.\" Generated with Ronnjs 0.3.8
-.\" http://github.com/kapouer/ronnjs/
-.
-.TH "NPM\-START" "1" "September 2014" "" ""
-.
+.TH "NPM\-START" "1" "October 2014" "" ""
.SH "NAME"
-\fBnpm-start\fR \-\- Start a package
-.
-.SH "SYNOPSIS"
-.
+\fBnpm-start\fR \- Start a package
+.SH SYNOPSIS
+.P
+.RS 2
.nf
-npm start
-.
+npm start [\-\- ]
.fi
-.
-.SH "DESCRIPTION"
-This runs a package\'s "start" script, if one was provided\.
-.
-.SH "SEE ALSO"
-.
-.IP "\(bu" 4
+.RE
+.SH DESCRIPTION
+.P
+This runs a package's "start" script, if one was provided\.
+.SH SEE ALSO
+.RS 0
+.IP \(bu 2
npm help run\-script
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help 7 scripts
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help test
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help restart
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help stop
-.
-.IP "" 0
+
+.RE
diff --git a/deps/npm/man/man1/npm-stop.1 b/deps/npm/man/man1/npm-stop.1
index 37c1a5fe03f..8622d18d964 100644
--- a/deps/npm/man/man1/npm-stop.1
+++ b/deps/npm/man/man1/npm-stop.1
@@ -1,37 +1,28 @@
-.\" Generated with Ronnjs 0.3.8
-.\" http://github.com/kapouer/ronnjs/
-.
-.TH "NPM\-STOP" "1" "September 2014" "" ""
-.
+.TH "NPM\-STOP" "1" "October 2014" "" ""
.SH "NAME"
-\fBnpm-stop\fR \-\- Stop a package
-.
-.SH "SYNOPSIS"
-.
+\fBnpm-stop\fR \- Stop a package
+.SH SYNOPSIS
+.P
+.RS 2
.nf
-npm stop
-.
+npm stop [\-\- ]
.fi
-.
-.SH "DESCRIPTION"
-This runs a package\'s "stop" script, if one was provided\.
-.
-.SH "SEE ALSO"
-.
-.IP "\(bu" 4
+.RE
+.SH DESCRIPTION
+.P
+This runs a package's "stop" script, if one was provided\.
+.SH SEE ALSO
+.RS 0
+.IP \(bu 2
npm help run\-script
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help 7 scripts
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help test
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help start
-.
-.IP "\(bu" 4
+.IP \(bu 2
npm help restart
-.
-.IP "" 0
+
+.RE
diff --git a/deps/npm/man/man1/npm-submodule.1 b/deps/npm/man/man1/npm-submodule.1
index 71853335c59..4999ac64e91 100644
--- a/deps/npm/man/man1/npm-submodule.1
+++ b/deps/npm/man/man1/npm-submodule.1
@@ -1,42 +1,35 @@
-.\" Generated with Ronnjs 0.3.8
-.\" http://github.com/kapouer/ronnjs/
-.
-.TH "NPM\-SUBMODULE" "1" "September 2014" "" ""
-.
+.TH "NPM\-SUBMODULE" "1" "October 2014" "" ""
.SH "NAME"
-\fBnpm-submodule\fR \-\- Add a package as a git submodule
-.
-.SH "SYNOPSIS"
-.
+\fBnpm-submodule\fR \- Add a package as a git submodule
+.SH SYNOPSIS
+.P
+.RS 2
.nf
npm submodule
-.
.fi
-.
-.SH "DESCRIPTION"
+.RE
+.SH DESCRIPTION
+.P
If the specified package has a git repository url in its package\.json
-description, then this command will add it as a git submodule at \fBnode_modules/\fR\|\.
-.
+description, then this command will add it as a git submodule at
+\fBnode_modules/\fR\|\.
.P
-This is a convenience only\. From then on, it\'s up to you to manage
+This is a convenience only\. From then on, it's up to you to manage
updates by using the appropriate git commands\. npm will stubbornly
refuse to update, modify, or remove anything with a \fB\|\.git\fR subfolder
in it\.
-.
.P
This command also does not install missing dependencies, if the package
does not include them in its git repository\. If \fBnpm ls\fR reports that
things are missing, you can either install, link, or submodule them yourself,
or you can do \fBnpm explore \-\- npm install\fR to install the
dependencies into the submodule folder\.
-.
-.SH "SEE ALSO"
-.
-.IP "\(bu" 4
+.SH SEE ALSO
+.RS 0
+.IP \(bu 2
npm help 5 package\.json
-.
-.IP "\(bu" 4
+.IP \(bu 2
git help submodule
-.
-.IP "" 0
+
+.RE
diff --git a/deps/npm/man/man1/npm-tag.1 b/deps/npm/man/man1/npm-tag.1
index c1d463f8cef..5aace75083f 100644
--- a/deps/npm/man/man1/npm-tag.1
+++ b/deps/npm/man/man1/npm-tag.1
@@ -1,74 +1,54 @@
-.\" Generated with Ronnjs 0.3.8
-.\" http://github.com/kapouer/ronnjs/
-.
-.TH "NPM\-TAG" "1" "September 2014" "" ""
-.
+.TH "NPM\-TAG" "1" "October 2014" "" ""
.SH "NAME"
-\fBnpm-tag\fR \-\- Tag a published version
-.
-.SH "SYNOPSIS"
-.
+\fBnpm-tag\fR \- Tag a published version
+.SH SYNOPSIS
+.P
+.RS 2
.nf
npm tag @ [