diff --git a/deps/npm/doc/cli/npm-run-script.md b/deps/npm/doc/cli/npm-run-script.md index 80b813cff7..783fab30e4 100644 --- a/deps/npm/doc/cli/npm-run-script.md +++ b/deps/npm/doc/cli/npm-run-script.md @@ -3,13 +3,14 @@ npm-run-script(1) -- Run arbitrary package scripts ## SYNOPSIS - npm run-script [] + npm run-script [] [command] ## 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. +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. diff --git a/deps/npm/html/doc/README.html b/deps/npm/html/doc/README.html index 5a82afc26d..df5c3ce038 100644 --- a/deps/npm/html/doc/README.html +++ b/deps/npm/html/doc/README.html @@ -10,153 +10,97 @@

npm

node package manager

- -

![Build Status -## SYNOPSIS

- +

Build Status

+

SYNOPSIS

This is just enough info to get you up and running.

-

Much more info available via npm help once it's installed.

- -

IMPORTANT

- +

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

- +

Super Easy Install

npm comes with node now.

- -

Windows Computers

- +

Windows Computers

Get the MSI. npm is in it.

- -

Apple Macintosh Computers

- +

Apple Macintosh Computers

Get the pkg. npm is in it.

- -

Other Sorts of Unices

- +

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)

- +

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

- +
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

- +
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

- +

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

- +

Installing on Cygwin

No.

- -

Permissions when Using npm to Install Other Stuff

- +

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...

- +
    +
  • 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

- +
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

- +
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 +

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 +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

- +

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)
@@ -165,90 +109,72 @@ npm.load(myConfigObject, function (er) {
     // command succeeded, and data might have some info
   })
   npm.on("log", function (message) { .... })
-})
- -

The load function takes an object hash of the command-line configs. +}) +

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

- +

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

- - - +

"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.

- +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

- +

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

- +

BUGS

When you find issues, please report them:

- - - +

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

+ -

SEE ALSO

- -
@@ -260,5 +186,5 @@ will no doubt tell you to put the output in a gist or email.

- + diff --git a/deps/npm/html/doc/api/npm-bin.html b/deps/npm/html/doc/api/npm-bin.html index a05ce13f7e..56bde010d9 100644 --- a/deps/npm/html/doc/api/npm-bin.html +++ b/deps/npm/html/doc/api/npm-bin.html @@ -10,17 +10,13 @@

npm-bin

Display npm bin folder

- -

SYNOPSIS

- -
npm.commands.bin(args, cb)
- -

DESCRIPTION

- +

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 member.

+
@@ -32,5 +28,5 @@ to the npm.bin member.

- + diff --git a/deps/npm/html/doc/api/npm-bugs.html b/deps/npm/html/doc/api/npm-bugs.html index 4bebd01512..4e5074f545 100644 --- a/deps/npm/html/doc/api/npm-bugs.html +++ b/deps/npm/html/doc/api/npm-bugs.html @@ -10,23 +10,18 @@

npm-bugs

Bugs for a package in a web browser maybe

- -

SYNOPSIS

- -
npm.commands.bugs(package, callback)
- -

DESCRIPTION

- +

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.

+
@@ -38,5 +33,5 @@ friendly for programmatic use.

- + diff --git a/deps/npm/html/doc/api/npm-commands.html b/deps/npm/html/doc/api/npm-commands.html index d0363d2fe9..3c68e4ba52 100644 --- a/deps/npm/html/doc/api/npm-commands.html +++ b/deps/npm/html/doc/api/npm-commands.html @@ -10,26 +10,21 @@

npm-commands

npm commands

- -

SYNOPSIS

- -
npm.commands[<command>](args, callback)
- -

DESCRIPTION

- +

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

+ -

SEE ALSO

- -
@@ -41,5 +36,5 @@ usage, or man 3 npm-<command> for programmatic usage.

- + diff --git a/deps/npm/html/doc/api/npm-config.html b/deps/npm/html/doc/api/npm-config.html index caad29032a..eee2e52bb5 100644 --- a/deps/npm/html/doc/api/npm-config.html +++ b/deps/npm/html/doc/api/npm-config.html @@ -10,31 +10,42 @@

npm-config

Manage the npm configuration files

- -

SYNOPSIS

- +

SYNOPSIS

npm.commands.config(args, callback)
 var val = npm.config.get(key)
-npm.config.set(key, val)
- -

DESCRIPTION

- +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.

- +
    +
  • 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

+ -

SEE ALSO

- -
@@ -46,5 +57,5 @@ functions instead.

- + diff --git a/deps/npm/html/doc/api/npm-deprecate.html b/deps/npm/html/doc/api/npm-deprecate.html index 0dc3214921..9513b96482 100644 --- a/deps/npm/html/doc/api/npm-deprecate.html +++ b/deps/npm/html/doc/api/npm-deprecate.html @@ -10,30 +10,32 @@

npm-deprecate

Deprecate a version of a package

- -

SYNOPSIS

- -
npm.commands.deprecate(args, callback)
- -

DESCRIPTION

- +

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.

- +
    +
  • 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

+ -

SEE ALSO

- -
@@ -45,5 +47,5 @@ install the package.

- + diff --git a/deps/npm/html/doc/api/npm-docs.html b/deps/npm/html/doc/api/npm-docs.html index 26ce16900e..62e246e060 100644 --- a/deps/npm/html/doc/api/npm-docs.html +++ b/deps/npm/html/doc/api/npm-docs.html @@ -10,23 +10,18 @@

npm-docs

Docs for a package in a web browser maybe

- -

SYNOPSIS

- -
npm.commands.docs(package, callback)
- -

DESCRIPTION

- +

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.

+
@@ -38,5 +33,5 @@ friendly for programmatic use.

- + diff --git a/deps/npm/html/doc/api/npm-edit.html b/deps/npm/html/doc/api/npm-edit.html index 28404e8775..78e685f04c 100644 --- a/deps/npm/html/doc/api/npm-edit.html +++ b/deps/npm/html/doc/api/npm-edit.html @@ -10,28 +10,21 @@

npm-edit

Edit an installed package

- -

SYNOPSIS

- -
npm.commands.edit(package, callback)
- -

DESCRIPTION

- +

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.

+
@@ -43,5 +36,5 @@ and how this is used.

- + diff --git a/deps/npm/html/doc/api/npm-explore.html b/deps/npm/html/doc/api/npm-explore.html index da568a5ebe..d177e9089d 100644 --- a/deps/npm/html/doc/api/npm-explore.html +++ b/deps/npm/html/doc/api/npm-explore.html @@ -10,22 +10,16 @@

npm-explore

Browse an installed package

- -

SYNOPSIS

- -
npm.commands.explore(args, callback)
- -

DESCRIPTION

- +

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.

+
@@ -37,5 +31,5 @@ sure to use npm rebuild <pkg> if you make any changes.

- + diff --git a/deps/npm/html/doc/api/npm-help-search.html b/deps/npm/html/doc/api/npm-help-search.html index b59a915114..ec4c6ea06e 100644 --- a/deps/npm/html/doc/api/npm-help-search.html +++ b/deps/npm/html/doc/api/npm-help-search.html @@ -10,30 +10,29 @@

npm-help-search

Search the help pages

- -

SYNOPSIS

- -
npm.commands.helpSearch(args, [silent,] callback)
- -

DESCRIPTION

- +

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
- +
    +
  • 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 neccessary not used, but it may in the future.

+
@@ -45,5 +44,5 @@ Name of the file that matched - + diff --git a/deps/npm/html/doc/api/npm-init.html b/deps/npm/html/doc/api/npm-init.html index 9c5167718a..81d790bb75 100644 --- a/deps/npm/html/doc/api/npm-init.html +++ b/deps/npm/html/doc/api/npm-init.html @@ -10,33 +10,24 @@

npm init

Interactively create a package.json file

- -

SYNOPSIS

- -
npm.commands.init(args, callback)
- -

DESCRIPTION

- +

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

- +

SEE ALSO

package.json(5)

+
@@ -48,5 +39,5 @@ then go ahead and use this programmatically.

- + diff --git a/deps/npm/html/doc/api/npm-install.html b/deps/npm/html/doc/api/npm-install.html index 1ffdc9c142..5fa76079aa 100644 --- a/deps/npm/html/doc/api/npm-install.html +++ b/deps/npm/html/doc/api/npm-install.html @@ -10,23 +10,17 @@

npm-install

install a package programmatically

- -

SYNOPSIS

- -
npm.commands.install([where,] packages, callback)
- -

DESCRIPTION

- +

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.

+
@@ -38,5 +32,5 @@ installed or when an error has been encountered.

- + diff --git a/deps/npm/html/doc/api/npm-link.html b/deps/npm/html/doc/api/npm-link.html index 9be928229c..1f162e3b40 100644 --- a/deps/npm/html/doc/api/npm-link.html +++ b/deps/npm/html/doc/api/npm-link.html @@ -10,37 +10,27 @@

npm-link

Symlink a package folder

- -

SYNOPSIS

- +

SYNOPSIS

npm.command.link(callback)
-npm.command.link(packages, callback)
- -

DESCRIPTION

- +npm.command.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 +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

+
@@ -52,5 +42,5 @@ the package in the current working directory

- + diff --git a/deps/npm/html/doc/api/npm-load.html b/deps/npm/html/doc/api/npm-load.html index 9b28559a05..b996d7aa9a 100644 --- a/deps/npm/html/doc/api/npm-load.html +++ b/deps/npm/html/doc/api/npm-load.html @@ -10,30 +10,22 @@

npm-load

Load config settings

- -

SYNOPSIS

- -
npm.load(conf, cb)
- -

DESCRIPTION

- +

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 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 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

-

For a list of all the available command-line configs, see npm help config

@@ -45,5 +37,5 @@ config object.

- + diff --git a/deps/npm/html/doc/api/npm-ls.html b/deps/npm/html/doc/api/npm-ls.html index aead5264be..cd5f19880b 100644 --- a/deps/npm/html/doc/api/npm-ls.html +++ b/deps/npm/html/doc/api/npm-ls.html @@ -10,57 +10,48 @@

npm-ls

List installed packages

- -

SYNOPSIS

- -
npm.commands.ls(args, [silent,] callback)
- -

DESCRIPTION

- +

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

- +

CONFIGURATION

long

- -
  • Default: false
  • Type: Boolean
- +
    +
  • Default: false
  • +
  • Type: Boolean
  • +

Show extended information.

-

parseable

- -
  • Default: false
  • Type: Boolean
- +
    +
  • Default: false
  • +
  • Type: Boolean
  • +

Show parseable output instead of tree view.

-

global

- -
  • Default: false
  • Type: Boolean
- +
    +
  • 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.

+
@@ -72,5 +63,5 @@ dependency will only be output once.

- + diff --git a/deps/npm/html/doc/api/npm-outdated.html b/deps/npm/html/doc/api/npm-outdated.html index 895b679a24..854942b7d6 100644 --- a/deps/npm/html/doc/api/npm-outdated.html +++ b/deps/npm/html/doc/api/npm-outdated.html @@ -10,17 +10,13 @@

npm-outdated

Check for outdated packages

- -

SYNOPSIS

- -
npm.commands.outdated([packages,] callback)
- -

DESCRIPTION

- +

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.

+
@@ -32,5 +28,5 @@ currently outdated.

- + diff --git a/deps/npm/html/doc/api/npm-owner.html b/deps/npm/html/doc/api/npm-owner.html index d0abc7095a..8a71f25e40 100644 --- a/deps/npm/html/doc/api/npm-owner.html +++ b/deps/npm/html/doc/api/npm-owner.html @@ -10,32 +10,32 @@

npm-owner

Manage package owners

- -

SYNOPSIS

- -
npm.commands.owner(args, callback)
- -

DESCRIPTION

- +

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): +
      +
    • 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): +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): +metadata, publish new versions, and add other owners.
    • +
    • rm (user, package): Remove a user from the package owner list. This immediately revokes their -privileges.
    - +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

+ -

SEE ALSO

- -
@@ -47,5 +47,5 @@ that is not implemented at this time.

- + diff --git a/deps/npm/html/doc/api/npm-pack.html b/deps/npm/html/doc/api/npm-pack.html index dfa62abd02..d08cbfae64 100644 --- a/deps/npm/html/doc/api/npm-pack.html +++ b/deps/npm/html/doc/api/npm-pack.html @@ -10,23 +10,18 @@

npm-pack

Create a tarball from a package

- -

SYNOPSIS

- -
npm.commands.pack([packages,] callback)
- -

DESCRIPTION

- +

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.

+
@@ -38,5 +33,5 @@ overwritten the second time.

- + diff --git a/deps/npm/html/doc/api/npm-prefix.html b/deps/npm/html/doc/api/npm-prefix.html index 24725f0706..44a17f79cb 100644 --- a/deps/npm/html/doc/api/npm-prefix.html +++ b/deps/npm/html/doc/api/npm-prefix.html @@ -10,19 +10,14 @@

npm-prefix

Display prefix

- -

SYNOPSIS

- -
npm.commands.prefix(args, callback)
- -

DESCRIPTION

- +

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

+
@@ -34,5 +29,5 @@ - + diff --git a/deps/npm/html/doc/api/npm-prune.html b/deps/npm/html/doc/api/npm-prune.html index 9eb26c5fc5..0358f77a6b 100644 --- a/deps/npm/html/doc/api/npm-prune.html +++ b/deps/npm/html/doc/api/npm-prune.html @@ -10,21 +10,15 @@

npm-prune

Remove extraneous packages

- -

SYNOPSIS

- -
npm.commands.prune([packages,] callback)
- -

DESCRIPTION

- +

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.

+
@@ -36,5 +30,5 @@ package's dependencies list.

- + diff --git a/deps/npm/html/doc/api/npm-publish.html b/deps/npm/html/doc/api/npm-publish.html index bc13269845..e3e03960b1 100644 --- a/deps/npm/html/doc/api/npm-publish.html +++ b/deps/npm/html/doc/api/npm-publish.html @@ -10,30 +10,31 @@

npm-publish

Publish a package

- -

SYNOPSIS

- -
npm.commands.publish([packages,] callback)
- -

DESCRIPTION

- +

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>: +

      +
    • <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.

    - +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

+ -

SEE ALSO

- -
@@ -45,5 +46,5 @@ the registry. Overwrites when the "force" environment variable is set - + diff --git a/deps/npm/html/doc/api/npm-rebuild.html b/deps/npm/html/doc/api/npm-rebuild.html index 8debe23793..f37301f564 100644 --- a/deps/npm/html/doc/api/npm-rebuild.html +++ b/deps/npm/html/doc/api/npm-rebuild.html @@ -10,20 +10,15 @@

npm-rebuild

Rebuild a package

- -

SYNOPSIS

- -
npm.commands.rebuild([packages,] callback)
- -

DESCRIPTION

- +

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

- +

CONFIGURATION

See npm help build

+
@@ -35,5 +30,5 @@ the new binary. If no 'packages' parameter is specify, every package wil - + diff --git a/deps/npm/html/doc/api/npm-repo.html b/deps/npm/html/doc/api/npm-repo.html index 1919ad405c..8af28e55c2 100644 --- a/deps/npm/html/doc/api/npm-repo.html +++ b/deps/npm/html/doc/api/npm-repo.html @@ -10,23 +10,18 @@

npm-repo

Open package repository page in the browser

- -

SYNOPSIS

- -
npm.commands.repo(package, callback)
- -

DESCRIPTION

- +

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.

+
@@ -38,5 +33,5 @@ friendly for programmatic use.

- + diff --git a/deps/npm/html/doc/api/npm-restart.html b/deps/npm/html/doc/api/npm-restart.html index fd97a5d434..bd33c4458f 100644 --- a/deps/npm/html/doc/api/npm-restart.html +++ b/deps/npm/html/doc/api/npm-restart.html @@ -10,25 +10,21 @@

npm-restart

Start a package

- -

SYNOPSIS

- -
npm.commands.restart(packages, callback)
- -

DESCRIPTION

- +

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

+ -

SEE ALSO

- -
@@ -40,5 +36,5 @@ in the packages parameter.

- + diff --git a/deps/npm/html/doc/api/npm-root.html b/deps/npm/html/doc/api/npm-root.html index 720b215ae5..ef54abb66d 100644 --- a/deps/npm/html/doc/api/npm-root.html +++ b/deps/npm/html/doc/api/npm-root.html @@ -10,19 +10,14 @@

npm-root

Display npm root

- -

SYNOPSIS

- -
npm.commands.root(args, callback)
- -

DESCRIPTION

- +

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.

+
@@ -34,5 +29,5 @@ - + diff --git a/deps/npm/html/doc/api/npm-run-script.html b/deps/npm/html/doc/api/npm-run-script.html index 3a85569d14..b1575d6992 100644 --- a/deps/npm/html/doc/api/npm-run-script.html +++ b/deps/npm/html/doc/api/npm-run-script.html @@ -10,27 +10,26 @@

npm-run-script

Run arbitrary package scripts

- -

SYNOPSIS

- -
npm.commands.run-script(args, callback)
- -

DESCRIPTION

- +

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

+ -

SEE ALSO

- -
@@ -42,5 +41,5 @@ assumed to be the command to run. All other elements are ignored.

- + diff --git a/deps/npm/html/doc/api/npm-search.html b/deps/npm/html/doc/api/npm-search.html index 1eded8ed59..d13d836c97 100644 --- a/deps/npm/html/doc/api/npm-search.html +++ b/deps/npm/html/doc/api/npm-search.html @@ -10,30 +10,38 @@

npm-search

Search for packages

- -

SYNOPSIS

- -
npm.commands.search(searchTerms, [silent,] [staleness,] callback)
- -

DESCRIPTION

- +

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: +
      +
    • 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: +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
    - +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).

+
@@ -45,5 +53,5 @@ like).

- + diff --git a/deps/npm/html/doc/api/npm-shrinkwrap.html b/deps/npm/html/doc/api/npm-shrinkwrap.html index 8a34fa5f31..659d1b392a 100644 --- a/deps/npm/html/doc/api/npm-shrinkwrap.html +++ b/deps/npm/html/doc/api/npm-shrinkwrap.html @@ -10,24 +10,18 @@

npm-shrinkwrap

programmatically generate package shrinkwrap file

- -

SYNOPSIS

- -
npm.commands.shrinkwrap(args, [silent,] callback)
- -

DESCRIPTION

- +

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.

+
@@ -39,5 +33,5 @@ been saved.

- + diff --git a/deps/npm/html/doc/api/npm-start.html b/deps/npm/html/doc/api/npm-start.html index 2487a7356a..2b2f41fd81 100644 --- a/deps/npm/html/doc/api/npm-start.html +++ b/deps/npm/html/doc/api/npm-start.html @@ -10,17 +10,13 @@

npm-start

Start a package

- -

SYNOPSIS

- -
npm.commands.start(packages, callback)
- -

DESCRIPTION

- +

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.

+
@@ -32,5 +28,5 @@ in the packages parameter.

- + diff --git a/deps/npm/html/doc/api/npm-stop.html b/deps/npm/html/doc/api/npm-stop.html index efe89b327e..a7dfcedd4d 100644 --- a/deps/npm/html/doc/api/npm-stop.html +++ b/deps/npm/html/doc/api/npm-stop.html @@ -10,17 +10,13 @@

npm-stop

Stop a package

- -

SYNOPSIS

- -
npm.commands.stop(packages, callback)
- -

DESCRIPTION

- +

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.

+
@@ -32,5 +28,5 @@ in the packages parameter.

- + diff --git a/deps/npm/html/doc/api/npm-submodule.html b/deps/npm/html/doc/api/npm-submodule.html index 2e9ff82ef4..ab98ab5bc7 100644 --- a/deps/npm/html/doc/api/npm-submodule.html +++ b/deps/npm/html/doc/api/npm-submodule.html @@ -10,31 +10,27 @@

npm-submodule

Add a package as a git submodule

- -

SYNOPSIS

- -
npm.commands.submodule(packages, callback)
- -

DESCRIPTION

- +

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
  • +
-

SEE ALSO

- -
  • npm help json
  • git help submodule
@@ -46,5 +42,5 @@ dependencies into the submodule folder.

- + diff --git a/deps/npm/html/doc/api/npm-tag.html b/deps/npm/html/doc/api/npm-tag.html index 8855068be9..af49ab4556 100644 --- a/deps/npm/html/doc/api/npm-tag.html +++ b/deps/npm/html/doc/api/npm-tag.html @@ -10,27 +10,21 @@

npm-tag

Tag a published version

- -

SYNOPSIS

- -
npm.commands.tag(package@version, tag, callback)
- -

DESCRIPTION

- +

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.

+
@@ -42,5 +36,5 @@ used. For more information about how to set this config, check - + diff --git a/deps/npm/html/doc/api/npm-test.html b/deps/npm/html/doc/api/npm-test.html index a185a379e3..548d979374 100644 --- a/deps/npm/html/doc/api/npm-test.html +++ b/deps/npm/html/doc/api/npm-test.html @@ -10,20 +10,15 @@

npm-test

Test a package

- -

SYNOPSIS

- -
  npm.commands.test(packages, callback)
- -

DESCRIPTION

- +

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.

+
@@ -35,5 +30,5 @@ in the packages parameter.

- + diff --git a/deps/npm/html/doc/api/npm-uninstall.html b/deps/npm/html/doc/api/npm-uninstall.html index 3a14ad08b8..77f6233a00 100644 --- a/deps/npm/html/doc/api/npm-uninstall.html +++ b/deps/npm/html/doc/api/npm-uninstall.html @@ -10,20 +10,15 @@

npm-uninstall

uninstall a package programmatically

- -

SYNOPSIS

- -
npm.commands.uninstall(packages, callback)
- -

DESCRIPTION

- +

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.

+
@@ -35,5 +30,5 @@ uninstalled or when an error has been encountered.

- + diff --git a/deps/npm/html/doc/api/npm-unpublish.html b/deps/npm/html/doc/api/npm-unpublish.html index 3d3924c520..7b3c99df22 100644 --- a/deps/npm/html/doc/api/npm-unpublish.html +++ b/deps/npm/html/doc/api/npm-unpublish.html @@ -10,24 +10,18 @@

npm-unpublish

Remove a package from the registry

- -

SYNOPSIS

- -
npm.commands.unpublish(package, callback)
- -

DESCRIPTION

- +

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.

+
@@ -39,5 +33,5 @@ the root package entry is removed from the registry entirely.

- + diff --git a/deps/npm/html/doc/api/npm-update.html b/deps/npm/html/doc/api/npm-update.html index 60366fc1fe..f706f1e861 100644 --- a/deps/npm/html/doc/api/npm-update.html +++ b/deps/npm/html/doc/api/npm-update.html @@ -10,16 +10,12 @@

npm-update

Update a package

- -

SYNOPSIS

- -
npm.commands.update(packages, callback)
- -

DESCRIPTION

- +

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.

+
@@ -31,5 +27,5 @@ - + diff --git a/deps/npm/html/doc/api/npm-version.html b/deps/npm/html/doc/api/npm-version.html index b60668c947..ede9d6b37f 100644 --- a/deps/npm/html/doc/api/npm-version.html +++ b/deps/npm/html/doc/api/npm-version.html @@ -10,22 +10,17 @@

npm-version

Bump a package version

- -

SYNOPSIS

- -
npm.commands.version(newversion, callback)
- -

DESCRIPTION

- +

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.

+
@@ -37,5 +32,5 @@ not have exactly one element. The only element should be a version number.

- + diff --git a/deps/npm/html/doc/api/npm-view.html b/deps/npm/html/doc/api/npm-view.html index 68cc00da18..b4c54cf1fc 100644 --- a/deps/npm/html/doc/api/npm-view.html +++ b/deps/npm/html/doc/api/npm-view.html @@ -10,97 +10,66 @@

npm-view

View registry info

- -

SYNOPSIS

- -
npm.commands.view(args, [silent,] callback)
- -

DESCRIPTION

- +

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.

- +
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. +

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 +

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 +

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. +

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 +

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 +

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

- +
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

- +

RETURN VALUE

The data returned will be an object in this formation:

-
{ <version>:
   { <field>: <value>
   , ... }
-, ... }
+, ... } +

corresponding to the list of fields selected.

-

corresponding to the list of fields selected.

@@ -112,5 +81,5 @@ the field name.

- + diff --git a/deps/npm/html/doc/api/npm-whoami.html b/deps/npm/html/doc/api/npm-whoami.html index 2eb06fa97f..b6e17a6b51 100644 --- a/deps/npm/html/doc/api/npm-whoami.html +++ b/deps/npm/html/doc/api/npm-whoami.html @@ -10,19 +10,14 @@

npm-whoami

Display npm username

- -

SYNOPSIS

- -
npm.commands.whoami(args, callback)
- -

DESCRIPTION

- +

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

+
@@ -34,5 +29,5 @@ - + diff --git a/deps/npm/html/doc/api/npm.html b/deps/npm/html/doc/api/npm.html index 4b7edc2d27..2cc3b64482 100644 --- a/deps/npm/html/doc/api/npm.html +++ b/deps/npm/html/doc/api/npm.html @@ -10,9 +10,7 @@

npm

node package manager

- -

SYNOPSIS

- +

SYNOPSIS

var npm = require("npm")
 npm.load([configObject, ]function (er, npm) {
   // use the npm object, now that it's loaded.
@@ -23,18 +21,13 @@ npm.load([configObject, ]function (er, npm) {
   console.log("prefix = %s", npm.prefix)
 
   npm.commands.install(["package"], cb)
-})
- -

VERSION

- -

1.4.9

- -

DESCRIPTION

- +}) +

VERSION

+

1.4.10

+

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 hash of top-level configs, they override the values stored in the various config @@ -42,58 +35,70 @@ 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

- +

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 hash, 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 +> 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

- +

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"
+
var cmd = npm.deref("unp") // cmd === "unpublish"
+
@@ -105,5 +110,5 @@ method names. Use the npm.deref method to find the real name.

- + diff --git a/deps/npm/html/doc/cli/npm-adduser.html b/deps/npm/html/doc/cli/npm-adduser.html index 497321c8a5..94f3f5d9ea 100644 --- a/deps/npm/html/doc/cli/npm-adduser.html +++ b/deps/npm/html/doc/cli/npm-adduser.html @@ -10,37 +10,31 @@

npm-adduser

Add a registry user account

- -

SYNOPSIS

- -
npm adduser
- -

DESCRIPTION

- +

SYNOPSIS

+
npm adduser
+

DESCRIPTION

Create or verify a user named <username> in the npm registry, and save the credentials to the .npmrc file.

-

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

-

You may use this command multiple times with the same user account to authorize on a new machine.

- -

CONFIGURATION

- +

CONFIGURATION

registry

- -

Default: http://registry.npmjs.org/

- +

Default: http://registry.npmjs.org/

The base URL of the npm package registry.

+

SEE ALSO

+ -

SEE ALSO

- -
@@ -52,5 +46,5 @@ authorize on a new machine.

- + diff --git a/deps/npm/html/doc/cli/npm-bin.html b/deps/npm/html/doc/cli/npm-bin.html index 49f516cff7..7bb77547ab 100644 --- a/deps/npm/html/doc/cli/npm-bin.html +++ b/deps/npm/html/doc/cli/npm-bin.html @@ -10,18 +10,20 @@

npm-bin

Display npm bin folder

- -

SYNOPSIS

- -
npm bin
- -

DESCRIPTION

- +

SYNOPSIS

+
npm bin
+

DESCRIPTION

Print the folder where npm will install executables.

+

SEE ALSO

+ -

SEE ALSO

- -
@@ -33,5 +35,5 @@ - + diff --git a/deps/npm/html/doc/cli/npm-bugs.html b/deps/npm/html/doc/cli/npm-bugs.html index 2a943ee81f..e308b56873 100644 --- a/deps/npm/html/doc/cli/npm-bugs.html +++ b/deps/npm/html/doc/cli/npm-bugs.html @@ -10,36 +10,39 @@

npm-bugs

Bugs for a package in a web browser maybe

- -

SYNOPSIS

- +

SYNOPSIS

npm bugs <pkgname>
-npm bugs (with no args in a package dir)
- -

DESCRIPTION

- +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

- +

CONFIGURATION

browser

- -
  • Default: OS X: "open", Windows: "start", Others: "xdg-open"
  • Type: String
- +
    +
  • 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

+ -

SEE ALSO

- -
@@ -51,5 +54,5 @@ a package.json in the current folder and use the name - + diff --git a/deps/npm/html/doc/cli/npm-build.html b/deps/npm/html/doc/cli/npm-build.html index f52e038bb2..ccf049e04b 100644 --- a/deps/npm/html/doc/cli/npm-build.html +++ b/deps/npm/html/doc/cli/npm-build.html @@ -10,23 +10,23 @@

npm-build

Build a package

- -

SYNOPSIS

- -
npm build <package-folder>
- -
  • <package-folder>: -A folder containing a package.json file in its root.
- -

DESCRIPTION

- +

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

+ -

SEE ALSO

- -
@@ -38,5 +38,5 @@ A folder containing a package.json file in its root. - + diff --git a/deps/npm/html/doc/cli/npm-bundle.html b/deps/npm/html/doc/cli/npm-bundle.html index 8723d06fda..7493151d1d 100644 --- a/deps/npm/html/doc/cli/npm-bundle.html +++ b/deps/npm/html/doc/cli/npm-bundle.html @@ -10,18 +10,16 @@

npm-bundle

REMOVED

- -

DESCRIPTION

- +

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

+ -

SEE ALSO

- -
@@ -33,5 +31,5 @@ install packages into the local space.

- + diff --git a/deps/npm/html/doc/cli/npm-cache.html b/deps/npm/html/doc/cli/npm-cache.html index f31c4d0bef..1d0d0805c6 100644 --- a/deps/npm/html/doc/cli/npm-cache.html +++ b/deps/npm/html/doc/cli/npm-cache.html @@ -10,9 +10,7 @@

npm-cache

Manipulates packages cache

- -

SYNOPSIS

- +

SYNOPSIS

npm cache add <tarball file>
 npm cache add <folder>
 npm cache add <tarball url>
@@ -20,54 +18,60 @@ npm cache add <name>@<version>
 
 npm cache ls [<path>]
 
-npm cache clean [<path>]
- -

DESCRIPTION

- +npm cache clean [<path>] +

DESCRIPTION

Used to add, list, or clear the npm cache folder.

- -
  • add: +

      +
    • 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: +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: +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

    - +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/: -A folder containing the package contents as they appear in the tarball.
  • .../package.json: -The package.json file, as npm sees it, with overlays applied and a _id attribute.
  • .../package.tgz: -The tarball for that version.
- +
    +
  • .../package/: +A folder containing the package contents as they appear in the tarball.
  • +
  • .../package.json: +The package.json file, as npm sees it, with overlays applied and a _id attribute.
  • +
  • .../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.

-

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

- +

CONFIGURATION

cache

-

Default: ~/.npm on Posix, or %AppData%/npm-cache on Windows.

-

The root cache folder.

+

SEE ALSO

+ -

SEE ALSO

- -
@@ -79,5 +83,5 @@ they do not make an HTTP request to the registry.

- + diff --git a/deps/npm/html/doc/cli/npm-completion.html b/deps/npm/html/doc/cli/npm-completion.html index 1d287a7d21..5208ee05d9 100644 --- a/deps/npm/html/doc/cli/npm-completion.html +++ b/deps/npm/html/doc/cli/npm-completion.html @@ -10,31 +10,27 @@

npm-completion

Tab Completion for npm

- -

SYNOPSIS

- -
. <(npm completion)
- -

DESCRIPTION

- +

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

+ -

SEE ALSO

- -
@@ -46,5 +42,5 @@ completions based on the arguments.

- + diff --git a/deps/npm/html/doc/cli/npm-config.html b/deps/npm/html/doc/cli/npm-config.html index a15402dce7..a44e771d51 100644 --- a/deps/npm/html/doc/cli/npm-config.html +++ b/deps/npm/html/doc/cli/npm-config.html @@ -10,9 +10,7 @@

npm-config

Manage the npm configuration files

- -

SYNOPSIS

- +

SYNOPSIS

npm config set <key> <value> [--global]
 npm config get <key>
 npm config delete <key>
@@ -20,61 +18,43 @@ npm config list
 npm config edit
 npm c [set|get|delete|list]
 npm get <key>
-npm set <key> <value> [--global]
- -

DESCRIPTION

- +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

- +

Sub-commands

Config supports the following sub-commands:

-

set

- -
npm config set key value
- -

Sets the config key to the value.

- +
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.

- +
npm config get key
+

Echo the config value to stdout.

list

- -
npm config list
- -

Show all the config settings.

- +
npm config list
+

Show all the config settings.

delete

- -
npm config delete key
- -

Deletes the key from all configuration files.

- +
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 +

npm config edit
+

Opens the config file in an editor. Use the --global flag to edit the global config.

+

SEE ALSO

+ -

SEE ALSO

- -
@@ -86,5 +66,5 @@ global config.

- + diff --git a/deps/npm/html/doc/cli/npm-dedupe.html b/deps/npm/html/doc/cli/npm-dedupe.html index 60a0c53500..17bbbe7033 100644 --- a/deps/npm/html/doc/cli/npm-dedupe.html +++ b/deps/npm/html/doc/cli/npm-dedupe.html @@ -10,60 +10,48 @@

npm-dedupe

Reduce duplication

- -

SYNOPSIS

- +

SYNOPSIS

npm dedupe [package names...]
-npm ddp [package names...]
- -

DESCRIPTION

- +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:

- + `-- 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 +`-- 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

+ -

SEE ALSO

- -
@@ -75,5 +63,5 @@ versions.

- + diff --git a/deps/npm/html/doc/cli/npm-deprecate.html b/deps/npm/html/doc/cli/npm-deprecate.html index 259c8a2284..4852aa3393 100644 --- a/deps/npm/html/doc/cli/npm-deprecate.html +++ b/deps/npm/html/doc/cli/npm-deprecate.html @@ -10,29 +10,23 @@

npm-deprecate

Deprecate a version of a package

- -

SYNOPSIS

- -
npm deprecate <name>[@<version>] <message>
- -

DESCRIPTION

- +

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 +

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

+ -

SEE ALSO

- -
@@ -44,5 +38,5 @@ something like this:

- + diff --git a/deps/npm/html/doc/cli/npm-docs.html b/deps/npm/html/doc/cli/npm-docs.html index 3f488f5309..bef7fad933 100644 --- a/deps/npm/html/doc/cli/npm-docs.html +++ b/deps/npm/html/doc/cli/npm-docs.html @@ -10,39 +10,41 @@

npm-docs

Docs for a package in a web browser maybe

- -

SYNOPSIS

- +

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

- +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

- +

CONFIGURATION

browser

- -
  • Default: OS X: "open", Windows: "start", Others: "xdg-open"
  • Type: String
- +
    +
  • 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

+ -

SEE ALSO

- -
@@ -54,5 +56,5 @@ the current folder and use the name property.

- + diff --git a/deps/npm/html/doc/cli/npm-edit.html b/deps/npm/html/doc/cli/npm-edit.html index 06187074f5..ad2b9b2c53 100644 --- a/deps/npm/html/doc/cli/npm-edit.html +++ b/deps/npm/html/doc/cli/npm-edit.html @@ -10,35 +10,34 @@

npm-edit

Edit an installed package

- -

SYNOPSIS

- -
npm edit <name>[@<version>]
- -

DESCRIPTION

- +

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

- +

CONFIGURATION

editor

- -
  • Default: EDITOR environment variable if set, or "vi" on Posix, -or "notepad" on Windows.
  • Type: path
- +
    +
  • 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

+ -

SEE ALSO

- -
@@ -50,5 +49,5 @@ or "notepad" on Windows.
  • Type: path
  • - + diff --git a/deps/npm/html/doc/cli/npm-explore.html b/deps/npm/html/doc/cli/npm-explore.html index 185fd35eeb..13a906d26d 100644 --- a/deps/npm/html/doc/cli/npm-explore.html +++ b/deps/npm/html/doc/cli/npm-explore.html @@ -10,38 +10,35 @@

    npm-explore

    Browse an installed package

    - -

    SYNOPSIS

    - -
    npm explore <name>[@<version>] [ -- <cmd>]
    - -

    DESCRIPTION

    - +

    SYNOPSIS

    +
    npm explore <name>[@<version>] [ -- <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 +

    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

    - +

    CONFIGURATION

    shell

    - -
    • Default: SHELL environment variable, or "bash" on Posix, or "cmd" on -Windows
    • Type: path
    - +
      +
    • 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

    + -

    SEE ALSO

    - -
    @@ -53,5 +50,5 @@ Windows
  • Type: path
  • - + diff --git a/deps/npm/html/doc/cli/npm-help-search.html b/deps/npm/html/doc/cli/npm-help-search.html index 322d9b7182..74c0efae50 100644 --- a/deps/npm/html/doc/cli/npm-help-search.html +++ b/deps/npm/html/doc/cli/npm-help-search.html @@ -10,36 +10,31 @@

    npm-help-search

    Search npm help documentation

    - -

    SYNOPSIS

    - -
    npm help-search some search terms
    - -

    DESCRIPTION

    - +

    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

    - +

    CONFIGURATION

    long

    - -
    • Type: Boolean
    • Default false
    - +
      +
    • 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

    + -

    SEE ALSO

    - -
    @@ -51,5 +46,5 @@ where the terms were found in the documentation.

    - + diff --git a/deps/npm/html/doc/cli/npm-help.html b/deps/npm/html/doc/cli/npm-help.html index abdde7523c..da1bbd929f 100644 --- a/deps/npm/html/doc/cli/npm-help.html +++ b/deps/npm/html/doc/cli/npm-help.html @@ -10,34 +10,37 @@

    npm-help

    Get help on npm

    - -

    SYNOPSIS

    - +

    SYNOPSIS

    npm help <topic>
    -npm help some search terms
    - -

    DESCRIPTION

    - +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

    - +

    CONFIGURATION

    viewer

    - -
    • Default: "man" on Posix, "browser" on Windows
    • Type: path
    - +
      +
    • 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

    + -

    SEE ALSO

    - -
    @@ -49,5 +52,5 @@ matches are equivalent to specifying a topic name.

    - + diff --git a/deps/npm/html/doc/cli/npm-init.html b/deps/npm/html/doc/cli/npm-init.html index 66326e5043..4435030608 100644 --- a/deps/npm/html/doc/cli/npm-init.html +++ b/deps/npm/html/doc/cli/npm-init.html @@ -10,27 +10,23 @@

    npm-init

    Interactively create a package.json file

    - -

    SYNOPSIS

    - -
    npm init
    - -

    DESCRIPTION

    - +

    SYNOPSIS

    +
    npm init
    +

    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.

    +

    SEE ALSO

    + -

    SEE ALSO

    - -
    @@ -42,5 +38,5 @@ without a really good reason to do so.

    - + diff --git a/deps/npm/html/doc/cli/npm-install.html b/deps/npm/html/doc/cli/npm-install.html index af2512d677..af7251cd74 100644 --- a/deps/npm/html/doc/cli/npm-install.html +++ b/deps/npm/html/doc/cli/npm-install.html @@ -10,9 +10,7 @@

    npm-install

    Install a package

    - -

    SYNOPSIS

    - +

    SYNOPSIS

    npm install (with no args in a package dir)
     npm install <tarball file>
     npm install <tarball url>
    @@ -21,92 +19,144 @@ npm install <name> [--save|--save-dev|--save-optional] [--save-exact]
     npm install <name>@<tag>
     npm install <name>@<version>
     npm install <name>@<version range>
    -npm i (with any of the previous argument usage)
    - -

    DESCRIPTION

    - +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)
    - +
      +
    • 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 <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 +

          +
        • 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 <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.

            Examples:

            npm install sax --save - 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 +operator.

            +

            Examples:

            +
            npm install sax --save
            +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 <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 <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 <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 <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
    - +fetch the package by name if it is not valid. +
      +
    • npm install <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 <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 <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 <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 +

    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 +

    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

    - +

    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
    @@ -115,46 +165,50 @@ 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}, + 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 + `-- 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

    - +

    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 +

    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

    + -

    SEE ALSO

    - -
    @@ -166,5 +220,5 @@ affects a real use-case, it will be investigated.

    - + diff --git a/deps/npm/html/doc/cli/npm-link.html b/deps/npm/html/doc/cli/npm-link.html index d47465a51c..ab9d36e59e 100644 --- a/deps/npm/html/doc/cli/npm-link.html +++ b/deps/npm/html/doc/cli/npm-link.html @@ -10,60 +10,51 @@

    npm-link

    Symlink a package folder

    - -

    SYNOPSIS

    - +

    SYNOPSIS

    npm link (in package folder)
     npm link <pkgname>
    -npm ln (with any of the previous argument usage)
    - -

    DESCRIPTION

    - +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.

    -

    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.

    -

    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 +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:

    - +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 +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.

    +

    SEE ALSO

    + -

    SEE ALSO

    - -
    @@ -75,5 +66,5 @@ installation target into your project's node_modules folder.

    - + diff --git a/deps/npm/html/doc/cli/npm-ls.html b/deps/npm/html/doc/cli/npm-ls.html index cb7bef9668..1d7ecfa1b9 100644 --- a/deps/npm/html/doc/cli/npm-ls.html +++ b/deps/npm/html/doc/cli/npm-ls.html @@ -10,72 +10,70 @@

    npm-ls

    List installed packages

    - -

    SYNOPSIS

    - +

    SYNOPSIS

    npm list [<pkg> ...]
     npm ls [<pkg> ...]
     npm la [<pkg> ...]
    -npm ll [<pkg> ...]
    - -

    DESCRIPTION

    - +npm ll [<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@1.4.9 /path/to/npm
    +
    npm@1.4.10 /path/to/npm
     └─┬ init-package-json@0.0.4
    -  └── promzard@0.1.5
    - -

    It will print out extraneous, missing, and invalid packages.

    - + └── 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

    - +

    CONFIGURATION

    json

    - -
    • Default: false
    • Type: Boolean
    - +
      +
    • Default: false
    • +
    • Type: Boolean
    • +

    Show information in JSON format.

    -

    long

    - -
    • Default: false
    • Type: Boolean
    - +
      +
    • Default: false
    • +
    • Type: Boolean
    • +

    Show extended information.

    -

    parseable

    - -
    • Default: false
    • Type: Boolean
    - +
      +
    • Default: false
    • +
    • Type: Boolean
    • +

    Show parseable output instead of tree view.

    -

    global

    - -
    • Default: false
    • Type: Boolean
    - +
      +
    • Default: false
    • +
    • Type: Boolean
    • +

    List packages in the global install prefix instead of in the current project.

    -

    depth

    - -
    • Type: Int
    - +
      +
    • Type: Int
    • +

    Max display depth of the dependency tree.

    +

    SEE ALSO

    + -

    SEE ALSO

    - -
    @@ -87,5 +85,5 @@ project.

    - + diff --git a/deps/npm/html/doc/cli/npm-outdated.html b/deps/npm/html/doc/cli/npm-outdated.html index 61f8b73f56..94224cc905 100644 --- a/deps/npm/html/doc/cli/npm-outdated.html +++ b/deps/npm/html/doc/cli/npm-outdated.html @@ -10,56 +10,52 @@

    npm-outdated

    Check for outdated packages

    - -

    SYNOPSIS

    - -
    npm outdated [<name> [<name> ...]]
    - -

    DESCRIPTION

    - +

    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

    - +

    CONFIGURATION

    json

    - -
    • Default: false
    • Type: Boolean
    - +
      +
    • Default: false
    • +
    • Type: Boolean
    • +

    Show information in JSON format.

    -

    long

    - -
    • Default: false
    • Type: Boolean
    - +
      +
    • Default: false
    • +
    • Type: Boolean
    • +

    Show extended information.

    -

    parseable

    - -
    • Default: false
    • Type: Boolean
    - +
      +
    • Default: false
    • +
    • Type: Boolean
    • +

    Show parseable output instead of tree view.

    -

    global

    - -
    • Default: false
    • Type: Boolean
    - +
      +
    • Default: false
    • +
    • Type: Boolean
    • +

    Check packages in the global install prefix instead of in the current project.

    -

    depth

    - -
    • Type: Int
    - +
      +
    • Type: Int
    • +

    Max depth for checking dependency tree.

    +

    SEE ALSO

    + -

    SEE ALSO

    - -
    @@ -71,5 +67,5 @@ project.

    - + diff --git a/deps/npm/html/doc/cli/npm-owner.html b/deps/npm/html/doc/cli/npm-owner.html index e485fbb23b..e73d1d3525 100644 --- a/deps/npm/html/doc/cli/npm-owner.html +++ b/deps/npm/html/doc/cli/npm-owner.html @@ -10,32 +10,34 @@

    npm-owner

    Manage package owners

    - -

    SYNOPSIS

    - +

    SYNOPSIS

    npm owner ls <package name>
     npm owner add <user> <package name>
    -npm owner rm <user> <package name>
    - -

    DESCRIPTION

    - +npm owner rm <user> <package name> +

    DESCRIPTION

    Manage ownership of published packages.

    - -
    • ls: +
        +
      • 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: +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: +metadata, publish new versions, and add other owners.
      • +
      • rm: Remove a user from the package owner list. This immediately revokes their -privileges.
      - +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

    + -

    SEE ALSO

    - -
    @@ -47,5 +49,5 @@ that is not implemented at this time.

    - + diff --git a/deps/npm/html/doc/cli/npm-pack.html b/deps/npm/html/doc/cli/npm-pack.html index c89022672d..9d6b56b109 100644 --- a/deps/npm/html/doc/cli/npm-pack.html +++ b/deps/npm/html/doc/cli/npm-pack.html @@ -10,27 +10,26 @@

    npm-pack

    Create a tarball from a package

    - -

    SYNOPSIS

    - -
    npm pack [<pkg> [<pkg> ...]]
    - -

    DESCRIPTION

    - +

    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

    + -

    SEE ALSO

    - -
    @@ -42,5 +41,5 @@ overwritten the second time.

    - + diff --git a/deps/npm/html/doc/cli/npm-prefix.html b/deps/npm/html/doc/cli/npm-prefix.html index 449901ac6b..3ddc96fab4 100644 --- a/deps/npm/html/doc/cli/npm-prefix.html +++ b/deps/npm/html/doc/cli/npm-prefix.html @@ -10,18 +10,20 @@

    npm-prefix

    Display prefix

    - -

    SYNOPSIS

    - -
    npm prefix
    - -

    DESCRIPTION

    - +

    SYNOPSIS

    +
    npm prefix
    +

    DESCRIPTION

    Print the prefix to standard out.

    +

    SEE ALSO

    + -

    SEE ALSO

    - -
    @@ -33,5 +35,5 @@ - + diff --git a/deps/npm/html/doc/cli/npm-prune.html b/deps/npm/html/doc/cli/npm-prune.html index e6d981b5db..f555382b21 100644 --- a/deps/npm/html/doc/cli/npm-prune.html +++ b/deps/npm/html/doc/cli/npm-prune.html @@ -10,27 +10,24 @@

    npm-prune

    Remove extraneous packages

    - -

    SYNOPSIS

    - +

    SYNOPSIS

    npm prune [<name> [<name ...]]
    -npm prune [<name> [<name ...]] [--production]
    - -

    DESCRIPTION

    - +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

    + -

    SEE ALSO

    - -
    @@ -42,5 +39,5 @@ packages specified in your devDependencies.

    - + diff --git a/deps/npm/html/doc/cli/npm-publish.html b/deps/npm/html/doc/cli/npm-publish.html index caef7461d6..876c2caf46 100644 --- a/deps/npm/html/doc/cli/npm-publish.html +++ b/deps/npm/html/doc/cli/npm-publish.html @@ -10,34 +10,39 @@

    npm-publish

    Publish a package

    - -

    SYNOPSIS

    - +

    SYNOPSIS

    npm publish <tarball> [--tag <tag>]
    -npm publish <folder> [--tag <tag>]
    - -

    DESCRIPTION

    - +npm publish <folder> [--tag <tag>] +

    DESCRIPTION

    Publishes a package to the registry so that it can be installed by name.

    - -
    • <folder>: -A folder containing a package.json file

    • <tarball>: +

        +
      • <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>] +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.

      - +and npm install installs the latest tag.

      +
    • +

    Fails if the package name and version combination already exists in the 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

    + -

    SEE ALSO

    - -
    @@ -49,5 +54,5 @@ it is removed with npm-unpublish(1).

    - + diff --git a/deps/npm/html/doc/cli/npm-rebuild.html b/deps/npm/html/doc/cli/npm-rebuild.html index 5da83bdfcf..cf5b553d1a 100644 --- a/deps/npm/html/doc/cli/npm-rebuild.html +++ b/deps/npm/html/doc/cli/npm-rebuild.html @@ -10,24 +10,23 @@

    npm-rebuild

    Rebuild a package

    - -

    SYNOPSIS

    - +

    SYNOPSIS

    npm rebuild [<name> [<name> ...]]
    -npm rb [<name> [<name> ...]]
    - -
    • <name>: -The package to rebuild
    - -

    DESCRIPTION

    - +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

    + -

    SEE ALSO

    - -
    @@ -39,5 +38,5 @@ the new binary.

    - + diff --git a/deps/npm/html/doc/cli/npm-repo.html b/deps/npm/html/doc/cli/npm-repo.html index fb53224244..325d607a89 100644 --- a/deps/npm/html/doc/cli/npm-repo.html +++ b/deps/npm/html/doc/cli/npm-repo.html @@ -10,30 +10,27 @@

    npm-repo

    Open package repository page in the browser

    - -

    SYNOPSIS

    - +

    SYNOPSIS

    npm repo <pkgname>
    -npm repo (with no args in a package dir)
    - -

    DESCRIPTION

    - +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

    - +

    CONFIGURATION

    browser

    - -
    • Default: OS X: "open", Windows: "start", Others: "xdg-open"
    • Type: String
    - +
      +
    • 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

    + -

    SEE ALSO

    - -
    @@ -45,5 +42,5 @@ a package.json in the current folder and use the name - + diff --git a/deps/npm/html/doc/cli/npm-restart.html b/deps/npm/html/doc/cli/npm-restart.html index 7cfa2aeec5..cef310499f 100644 --- a/deps/npm/html/doc/cli/npm-restart.html +++ b/deps/npm/html/doc/cli/npm-restart.html @@ -10,22 +10,22 @@

    npm-restart

    Start a package

    - -

    SYNOPSIS

    - -
    npm restart <name>
    - -

    DESCRIPTION

    - +

    SYNOPSIS

    +
    npm restart <name>
    +

    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.

    +

    SEE ALSO

    + -

    SEE ALSO

    - -
    @@ -37,5 +37,5 @@ the "start" script.

    - + diff --git a/deps/npm/html/doc/cli/npm-rm.html b/deps/npm/html/doc/cli/npm-rm.html index 9d5106f975..d8f6491ba4 100644 --- a/deps/npm/html/doc/cli/npm-rm.html +++ b/deps/npm/html/doc/cli/npm-rm.html @@ -10,22 +10,24 @@

    npm-rm

    Remove a package

    - -

    SYNOPSIS

    - +

    SYNOPSIS

    npm rm <name>
     npm r <name>
     npm uninstall <name>
    -npm un <name>
    - -

    DESCRIPTION

    - +npm un <name> +

    DESCRIPTION

    This uninstalls a package, completely removing everything npm installed on its behalf.

    +

    SEE ALSO

    + -

    SEE ALSO

    - -
    @@ -37,5 +39,5 @@ on its behalf.

    - + diff --git a/deps/npm/html/doc/cli/npm-root.html b/deps/npm/html/doc/cli/npm-root.html index 2e7b205ec4..e4f097ee1b 100644 --- a/deps/npm/html/doc/cli/npm-root.html +++ b/deps/npm/html/doc/cli/npm-root.html @@ -10,18 +10,20 @@

    npm-root

    Display npm root

    - -

    SYNOPSIS

    - -
    npm root
    - -

    DESCRIPTION

    - +

    SYNOPSIS

    +
    npm root
    +

    DESCRIPTION

    Print the effective node_modules folder to standard out.

    +

    SEE ALSO

    + -

    SEE ALSO

    - -
    @@ -33,5 +35,5 @@ - + diff --git a/deps/npm/html/doc/cli/npm-run-script.html b/deps/npm/html/doc/cli/npm-run-script.html index 17048060b8..64afc282b9 100644 --- a/deps/npm/html/doc/cli/npm-run-script.html +++ b/deps/npm/html/doc/cli/npm-run-script.html @@ -10,23 +10,24 @@

    npm-run-script

    Run arbitrary package scripts

    - -

    SYNOPSIS

    - -
    npm run-script [<pkg>] <command>
    - -

    DESCRIPTION

    - +

    SYNOPSIS

    +
    npm run-script [<pkg>] [command]
    +

    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.

    - +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.

    +

    SEE ALSO

    + -

    SEE ALSO

    - -
    @@ -38,5 +39,5 @@ called directly, as well.

    - + diff --git a/deps/npm/html/doc/cli/npm-search.html b/deps/npm/html/doc/cli/npm-search.html index 1c2a51d574..e71c6bb2a4 100644 --- a/deps/npm/html/doc/cli/npm-search.html +++ b/deps/npm/html/doc/cli/npm-search.html @@ -10,35 +10,34 @@

    npm-search

    Search for packages

    - -

    SYNOPSIS

    - +

    SYNOPSIS

    npm search [--long] [search terms ...]
     npm s [search terms ...]
    -npm se [search terms ...]
    - -

    DESCRIPTION

    - +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

    - +

    CONFIGURATION

    long

    - -
    • Default: false
    • Type: Boolean
    - +
      +
    • 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

    + -

    SEE ALSO

    - -
    @@ -50,5 +49,5 @@ fall on multiple lines.

    - + diff --git a/deps/npm/html/doc/cli/npm-shrinkwrap.html b/deps/npm/html/doc/cli/npm-shrinkwrap.html index f4334d428a..03c63e443e 100644 --- a/deps/npm/html/doc/cli/npm-shrinkwrap.html +++ b/deps/npm/html/doc/cli/npm-shrinkwrap.html @@ -10,18 +10,13 @@

    npm-shrinkwrap

    Lock down dependency versions

    - -

    SYNOPSIS

    - -
    npm shrinkwrap
    - -

    DESCRIPTION

    - +

    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 @@ -34,62 +29,47 @@ 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:

    - +} +

    package B:

    {
       "name": "B",
       "version": "0.0.1",
       "dependencies": {
         "C": "<0.1.0"
       }
    -}
    - -

    and package C:

    - +} +

    and package C:

    {
       "name": "C,
       "version": "0.0.1"
    -}
    - -

    If these are the only versions of A, B, and C available in the +} +

    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 + `-- 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, + `-- 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:

    - +
    npm shrinkwrap
    +

    This generates npm-shrinkwrap.json, which will look something like this:

    {
       "name": "A",
       "version": "0.1.0",
    @@ -103,9 +83,8 @@ when B hasn't changed at all.

    } } } -}
    - -

    The shrinkwrap command has locked down the dependencies based on +} +

    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 @@ -114,59 +93,54 @@ drives the installation of that package and all of its dependencies 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 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

    - +

    Building shrinkwrapped packages

    To shrinkwrap an existing package:

    - -
    1. Run "npm install" in the package root to install the current -versions of all dependencies.
    2. Validate that the package works as expected with these versions.
    3. Run "npm shrinkwrap", add npm-shrinkwrap.json to git, and publish -your package.
    - +
      +
    1. Run "npm install" in the package root to install the current +versions of all dependencies.
    2. +
    3. Validate that the package works as expected with these versions.
    4. +
    5. Run "npm shrinkwrap", add npm-shrinkwrap.json to git, and publish +your package.
    6. +

    To add or update a dependency in a shrinkwrapped package:

    - -
    1. Run "npm install" in the package root to install the current -versions of all dependencies.
    2. Add or update dependencies. "npm install" each new or updated +
        +
      1. Run "npm install" in the package root to install the current +versions of all dependencies.
      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 npm install with no arguments will merely reproduce the existing -shrinkwrap.
      4. Validate that the package works as expected with the new -dependencies.
      5. Run "npm shrinkwrap", commit the new npm-shrinkwrap.json, and -publish your package.
      - +shrinkwrap.
    3. +
    4. Validate that the package works as expected with the new +dependencies.
    5. +
    6. Run "npm shrinkwrap", commit the new npm-shrinkwrap.json, and +publish your package.
    7. +

    You can use npm-outdated(1) to view dependencies with newer versions available.

    - -

    Other Notes

    - +

    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

    - +

    Caveats

    Shrinkwrap files only lock down package versions, not actual package contents. While discouraged, a package author can republish an existing version of a package, causing shrinkwrapped packages using @@ -175,16 +149,18 @@ want to avoid any risk that a byzantine author replaces a package you're using with code that breaks your application, you could modify the shrinkwrap file to use git URL references rather than version numbers so that npm always fetches all packages from git.

    -

    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

    + -

    SEE ALSO

    - -
    @@ -196,5 +172,5 @@ contents rather than versions.

    - + diff --git a/deps/npm/html/doc/cli/npm-star.html b/deps/npm/html/doc/cli/npm-star.html index 5edee59c4c..053fd9b8ec 100644 --- a/deps/npm/html/doc/cli/npm-star.html +++ b/deps/npm/html/doc/cli/npm-star.html @@ -10,24 +10,21 @@

    npm-star

    Mark your favorite packages

    - -

    SYNOPSIS

    - +

    SYNOPSIS

    npm star <pkgname> [<pkg>, ...]
    -npm unstar <pkgname> [<pkg>, ...]
    - -

    DESCRIPTION

    - +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

    + -

    SEE ALSO

    - -
    @@ -39,5 +36,5 @@ a vaguely positive way to show that you care.

    - + diff --git a/deps/npm/html/doc/cli/npm-stars.html b/deps/npm/html/doc/cli/npm-stars.html index 4148cf6f45..4ce9697ca6 100644 --- a/deps/npm/html/doc/cli/npm-stars.html +++ b/deps/npm/html/doc/cli/npm-stars.html @@ -10,23 +10,22 @@

    npm-stars

    View packages marked as favorites

    - -

    SYNOPSIS

    - +

    SYNOPSIS

    npm stars
    -npm stars [username]
    - -

    DESCRIPTION

    - +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

    + -

    SEE ALSO

    - -
    @@ -38,5 +37,5 @@ you will most certainly enjoy this command.

    - + diff --git a/deps/npm/html/doc/cli/npm-start.html b/deps/npm/html/doc/cli/npm-start.html index ec10f71c33..412a9916ce 100644 --- a/deps/npm/html/doc/cli/npm-start.html +++ b/deps/npm/html/doc/cli/npm-start.html @@ -10,18 +10,19 @@

    npm-start

    Start a package

    - -

    SYNOPSIS

    - -
    npm start <name>
    - -

    DESCRIPTION

    - +

    SYNOPSIS

    +
    npm start <name>
    +

    DESCRIPTION

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

    +

    SEE ALSO

    + -

    SEE ALSO

    - -
    @@ -33,5 +34,5 @@ - + diff --git a/deps/npm/html/doc/cli/npm-stop.html b/deps/npm/html/doc/cli/npm-stop.html index 50316abf2d..76a83fd566 100644 --- a/deps/npm/html/doc/cli/npm-stop.html +++ b/deps/npm/html/doc/cli/npm-stop.html @@ -10,18 +10,19 @@

    npm-stop

    Stop a package

    - -

    SYNOPSIS

    - -
    npm stop <name>
    - -

    DESCRIPTION

    - +

    SYNOPSIS

    +
    npm stop <name>
    +

    DESCRIPTION

    This runs a package's "stop" script, if one was provided.

    +

    SEE ALSO

    + -

    SEE ALSO

    - -
    @@ -33,5 +34,5 @@ - + diff --git a/deps/npm/html/doc/cli/npm-submodule.html b/deps/npm/html/doc/cli/npm-submodule.html index 10915be891..e8cba1b488 100644 --- a/deps/npm/html/doc/cli/npm-submodule.html +++ b/deps/npm/html/doc/cli/npm-submodule.html @@ -10,31 +10,27 @@

    npm-submodule

    Add a package as a git submodule

    - -

    SYNOPSIS

    - -
    npm submodule <pkg>
    - -

    DESCRIPTION

    - +

    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

    + -

    SEE ALSO

    - -
    @@ -46,5 +42,5 @@ dependencies into the submodule folder.

    - + diff --git a/deps/npm/html/doc/cli/npm-tag.html b/deps/npm/html/doc/cli/npm-tag.html index da180a548c..9e7a83f7d3 100644 --- a/deps/npm/html/doc/cli/npm-tag.html +++ b/deps/npm/html/doc/cli/npm-tag.html @@ -10,32 +10,29 @@

    npm-tag

    Tag a published version

    - -

    SYNOPSIS

    - -
    npm tag <name>@<version> [<tag>]
    - -

    DESCRIPTION

    - +

    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.

    - +
    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

    + -

    SEE ALSO

    - -
    @@ -47,5 +44,5 @@ of using a specific version number:

    - + diff --git a/deps/npm/html/doc/cli/npm-test.html b/deps/npm/html/doc/cli/npm-test.html index 9b43d629a8..155b930056 100644 --- a/deps/npm/html/doc/cli/npm-test.html +++ b/deps/npm/html/doc/cli/npm-test.html @@ -10,22 +10,22 @@

    npm-test

    Test a package

    - -

    SYNOPSIS

    - +

    SYNOPSIS

      npm test <name>
    -  npm tst <name>
    - -

    DESCRIPTION

    - + npm tst <name> +

    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

    + -

    SEE ALSO

    - -
    @@ -37,5 +37,5 @@ true.

    - + diff --git a/deps/npm/html/doc/cli/npm-uninstall.html b/deps/npm/html/doc/cli/npm-uninstall.html index 297a26d3ed..343bc01d81 100644 --- a/deps/npm/html/doc/cli/npm-uninstall.html +++ b/deps/npm/html/doc/cli/npm-uninstall.html @@ -10,38 +10,40 @@

    npm-rm

    Remove a package

    - -

    SYNOPSIS

    - +

    SYNOPSIS

    npm uninstall <name> [--save|--save-dev|--save-optional]
    -npm rm (with any of the previous argument usage)
    - -

    DESCRIPTION

    - +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), +

    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.

    - +
      +
    • --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.

      +
    • +

    Examples:

    -
    npm uninstall sax --save
     npm uninstall node-tap --save-dev
    -npm uninstall dtrace-provider --save-optional
    - -

    SEE ALSO

    +npm uninstall dtrace-provider --save-optional +

    SEE ALSO

    + -
    @@ -53,5 +55,5 @@ npm uninstall dtrace-provider --save-optional - + diff --git a/deps/npm/html/doc/cli/npm-unpublish.html b/deps/npm/html/doc/cli/npm-unpublish.html index 06cdad5a49..de53589b53 100644 --- a/deps/npm/html/doc/cli/npm-unpublish.html +++ b/deps/npm/html/doc/cli/npm-unpublish.html @@ -10,36 +10,31 @@

    npm-unpublish

    Remove a package from the registry

    - -

    SYNOPSIS

    - -
    npm unpublish <name>[@<version>]
    - -

    WARNING

    - +

    SYNOPSIS

    +
    npm unpublish <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

    - +

    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.

    +

    SEE ALSO

    + -

    SEE ALSO

    - -
    @@ -51,5 +46,5 @@ package again, a new version number must be used.

    - + diff --git a/deps/npm/html/doc/cli/npm-update.html b/deps/npm/html/doc/cli/npm-update.html index f7d06ae73a..7d624199f6 100644 --- a/deps/npm/html/doc/cli/npm-update.html +++ b/deps/npm/html/doc/cli/npm-update.html @@ -10,24 +10,23 @@

    npm-update

    Update a package

    - -

    SYNOPSIS

    - -
    npm update [-g] [<name> [<name> ...]]
    - -

    DESCRIPTION

    - +

    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

    + -

    SEE ALSO

    - -
    @@ -39,5 +38,5 @@ If no package name is specified, all packages in the specified location (global - + diff --git a/deps/npm/html/doc/cli/npm-version.html b/deps/npm/html/doc/cli/npm-version.html index d431867b37..027c8ebfec 100644 --- a/deps/npm/html/doc/cli/npm-version.html +++ b/deps/npm/html/doc/cli/npm-version.html @@ -10,35 +10,25 @@

    npm-version

    Bump a package version

    - -

    SYNOPSIS

    - -
    npm version [<newversion> | major | minor | patch]
    - -

    DESCRIPTION

    - +

    SYNOPSIS

    +
    npm version [<newversion> | major | minor | patch]
    +

    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", or "major"). 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 +

    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
     
    @@ -46,11 +36,14 @@ 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

    +Enter passphrase: +

    SEE ALSO

    + -
    @@ -62,5 +55,5 @@ Enter passphrase: - + diff --git a/deps/npm/html/doc/cli/npm-view.html b/deps/npm/html/doc/cli/npm-view.html index 4d83eedaae..adce11547d 100644 --- a/deps/npm/html/doc/cli/npm-view.html +++ b/deps/npm/html/doc/cli/npm-view.html @@ -10,89 +10,67 @@

    npm-view

    View registry info

    - -

    SYNOPSIS

    - +

    SYNOPSIS

    npm view <name>[@<version>] [<field>[.<subfield>]...]
    -npm v <name>[@<version>] [<field>[.<subfield>]...]
    - -

    DESCRIPTION

    - +npm v <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.

    - +
    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. +

    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 +

    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 +

    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 +

    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. +

    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 +

    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 +

    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

    - +
    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

    + -

    SEE ALSO

    - -
    @@ -104,5 +82,5 @@ the field name.

    - + diff --git a/deps/npm/html/doc/cli/npm-whoami.html b/deps/npm/html/doc/cli/npm-whoami.html index 62f98941c9..e91ab740da 100644 --- a/deps/npm/html/doc/cli/npm-whoami.html +++ b/deps/npm/html/doc/cli/npm-whoami.html @@ -10,18 +10,18 @@

    npm-whoami

    Display npm username

    - -

    SYNOPSIS

    - -
    npm whoami
    - -

    DESCRIPTION

    - +

    SYNOPSIS

    +
    npm whoami
    +

    DESCRIPTION

    Print the username config to standard output.

    +

    SEE ALSO

    + -

    SEE ALSO

    - -
    @@ -33,5 +33,5 @@ - + diff --git a/deps/npm/html/doc/cli/npm.html b/deps/npm/html/doc/cli/npm.html index 7804a47aad..6381af2905 100644 --- a/deps/npm/html/doc/cli/npm.html +++ b/deps/npm/html/doc/cli/npm.html @@ -10,129 +10,126 @@

    npm

    node package manager

    - -

    SYNOPSIS

    - -
    npm <command> [args]
    - -

    VERSION

    - -

    1.4.9

    - -

    DESCRIPTION

    - +

    SYNOPSIS

    +
    npm <command> [args]
    +

    VERSION

    +

    1.4.10

    +

    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

    - +

    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.

    - -

    DIRECTORIES

    - +

    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 +
        +
      • 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.
      - +./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

    - +

    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: +
        +
      • 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: +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: +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

      - +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 +
        +
      • 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 +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 +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.
      - +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

    - +

    CONTRIBUTIONS

    Patches welcome!

    - -
    • code: +
        +
      • 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: +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.)
      - +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

    - + +

    BUGS

    When you find issues, please report them:

    - - - +

    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

    - +

    AUTHOR

    Isaac Z. Schlueter :: isaacs :: @izs :: -i@izs.me

    - -

    SEE ALSO

    +i@izs.me

    +

    SEE ALSO

    + -
    @@ -144,5 +141,5 @@ will no doubt tell you to put the output in a gist or email.

    - + diff --git a/deps/npm/html/doc/files/npm-folders.html b/deps/npm/html/doc/files/npm-folders.html index c5e50d2fd5..5846fe9622 100644 --- a/deps/npm/html/doc/files/npm-folders.html +++ b/deps/npm/html/doc/files/npm-folders.html @@ -10,119 +10,87 @@

    npm-folders

    Folder Structures Used by npm

    - -

    DESCRIPTION

    - +

    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

    - +
      +
    • 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

    - +

    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.)

    -

    If you wish to require() a package, then install it locally.

    - -

    Executables

    - +

    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

    - +

    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

    - +

    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

    - +

    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

    - +

    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 cded 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

    - +

    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, 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 @@ -130,21 +98,16 @@ structure is: foo/node_modules/bar/node_modules/baz, there's no 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

    - +

    Example

    Consider this dependency graph:

    -
    foo
     +-- blerg@1.2.5
     +-- bar@1.2.3
    @@ -155,10 +118,8 @@ highest level possible, below the localized "target" folder.

    | `-- asdf@* `-- baz@1.2.3 `-- quux@3.x - `-- bar
    - -

    In this case, we might expect a folder structure like this:

    - + `-- bar +

    In this case, we might expect a folder structure like this:

    foo
     +-- node_modules
         +-- blerg (1.2.5) <---[A]
    @@ -170,43 +131,43 @@ highest level possible, below the localized "target" folder.

    | `-- 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 + `-- 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

    - +

    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

    + -

    SEE ALSO

    - -
    @@ -218,5 +179,5 @@ cannot be found elsewhere. See packa - + diff --git a/deps/npm/html/doc/files/npm-global.html b/deps/npm/html/doc/files/npm-global.html index c5e50d2fd5..5846fe9622 100644 --- a/deps/npm/html/doc/files/npm-global.html +++ b/deps/npm/html/doc/files/npm-global.html @@ -10,119 +10,87 @@

    npm-folders

    Folder Structures Used by npm

    - -

    DESCRIPTION

    - +

    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

    - +
      +
    • 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

    - +

    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.)

    -

    If you wish to require() a package, then install it locally.

    - -

    Executables

    - +

    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

    - +

    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

    - +

    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

    - +

    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

    - +

    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 cded 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

    - +

    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, 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 @@ -130,21 +98,16 @@ structure is: foo/node_modules/bar/node_modules/baz, there's no 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

    - +

    Example

    Consider this dependency graph:

    -
    foo
     +-- blerg@1.2.5
     +-- bar@1.2.3
    @@ -155,10 +118,8 @@ highest level possible, below the localized "target" folder.

    | `-- asdf@* `-- baz@1.2.3 `-- quux@3.x - `-- bar
    - -

    In this case, we might expect a folder structure like this:

    - + `-- bar +

    In this case, we might expect a folder structure like this:

    foo
     +-- node_modules
         +-- blerg (1.2.5) <---[A]
    @@ -170,43 +131,43 @@ highest level possible, below the localized "target" folder.

    | `-- 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 + `-- 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

    - +

    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

    + -

    SEE ALSO

    - -
    @@ -218,5 +179,5 @@ cannot be found elsewhere. See packa - + diff --git a/deps/npm/html/doc/files/npm-json.html b/deps/npm/html/doc/files/npm-json.html index fd4c35e760..43a9f07429 100644 --- a/deps/npm/html/doc/files/npm-json.html +++ b/deps/npm/html/doc/files/npm-json.html @@ -10,257 +10,178 @@

    package.json

    Specifics of npm's package.json handling

    - -

    DESCRIPTION

    - +

    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 +
        +
      • 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 +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/
      - +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/
    • +

    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 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. +

    { "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.

    - +} +

    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 +

    { "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:

    - +, "bin": "./path/to/program" } +

    would be the same as this:

    { "name": "my-program"
     , "version": "1.2.5"
    -, "bin" : { "my-program" : "./path/to/program" } }
    - -

    man

    - +, "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

    - +} +

    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.

    - +} +

    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

    - +} +

    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 hash. 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.

    -

    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"
    @@ -269,52 +190,52 @@ command will be able to find you.

    "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 + } +

    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" member is an object hash of 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" hash 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 +, "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 with a simple hash of package name to 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 hash. 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
    - +
      +
    • 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
    • +

    For example, these are all valid:

    -
    { "dependencies" :
       { "foo" : "1.0.0 - 2.9999.9999"
       , "bar" : ">=1.0.2 <2.1.2"
    @@ -327,59 +248,42 @@ a tarball or git URL.

    , "two" : "2.x" , "thr" : "3.3.x" } -}
    - -

    URLs as Dependencies

    - +} +

    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 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 +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

    - +

    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"
       }
    -}
    - -

    devDependencies

    - +} +

    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.

    -

    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",
    @@ -390,64 +294,48 @@ script to do this, and make the required package a devDependency.

    "prepublish": "coffee -o lib/ -c src/waza.coffee" }, "main": "lib/waza.js" -}
    - -

    The prepublish script will be run before publishing, so that users +} +

    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

    - +

    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 +} +

    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 +└── 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

    - +

    bundledDependencies

    Array of package names that will be bundled when publishing the package.

    -

    If this is spelled "bundleDependencies", then that is also honorable.

    - -

    optionalDependencies

    - +

    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.

    -

    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
    @@ -462,122 +350,104 @@ if ( notGoodFooVersion(fooVersion) ) {
     
     if (foo) {
       foo.doFooThings()
    -}
    - -

    Entries in optionalDependencies will override entries of the same name in +} +

    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 +

    { "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 +

    { "engines" : { "npm" : "~1.0.20" } }
    +

    Note that, unless the user has set the engine-strict config flag, this field is advisory only.

    - -

    engineStrict

    - +

    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, 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 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, +

    "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

    - +
    "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

    - +
    "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 hash described below to override the registry config param at publish-time.

    - -

    publishConfig

    - +

    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

    - +

    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 +

        +
      • "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

      +ignored.

      +
    • +
    +

    SEE ALSO

    + -
    @@ -589,5 +459,5 @@ ignored.

    - + diff --git a/deps/npm/html/doc/files/npmrc.html b/deps/npm/html/doc/files/npmrc.html index 24351e1aae..b6df4dc575 100644 --- a/deps/npm/html/doc/files/npmrc.html +++ b/deps/npm/html/doc/files/npmrc.html @@ -10,57 +10,49 @@

    npmrc

    The npm config files

    - -

    DESCRIPTION

    - +

    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

    - +

    FILES

    The three relevant files are:

    - -
    • per-user config file (~/.npmrc)
    • global config file ($PREFIX/npmrc)
    • npm builtin config file (/path/to/npm/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 +

    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-user config file

    - +

    Per-user config file

    $HOME/.npmrc (or the userconfig param, if set in the environment or on the command line)

    - -

    Global config file

    - +

    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

    - +

    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

    + -

    SEE ALSO

    - -
    @@ -72,5 +64,5 @@ manner.

    - + diff --git a/deps/npm/html/doc/files/package.json.html b/deps/npm/html/doc/files/package.json.html index fd4c35e760..43a9f07429 100644 --- a/deps/npm/html/doc/files/package.json.html +++ b/deps/npm/html/doc/files/package.json.html @@ -10,257 +10,178 @@

    package.json

    Specifics of npm's package.json handling

    - -

    DESCRIPTION

    - +

    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 +
        +
      • 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 +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/
      - +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/
    • +

    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 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. +

    { "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.

    - +} +

    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 +

    { "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:

    - +, "bin": "./path/to/program" } +

    would be the same as this:

    { "name": "my-program"
     , "version": "1.2.5"
    -, "bin" : { "my-program" : "./path/to/program" } }
    - -

    man

    - +, "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

    - +} +

    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.

    - +} +

    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

    - +} +

    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 hash. 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.

    -

    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"
    @@ -269,52 +190,52 @@ command will be able to find you.

    "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 + } +

    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" member is an object hash of 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" hash 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 +, "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 with a simple hash of package name to 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 hash. 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
    - +
      +
    • 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
    • +

    For example, these are all valid:

    -
    { "dependencies" :
       { "foo" : "1.0.0 - 2.9999.9999"
       , "bar" : ">=1.0.2 <2.1.2"
    @@ -327,59 +248,42 @@ a tarball or git URL.

    , "two" : "2.x" , "thr" : "3.3.x" } -}
    - -

    URLs as Dependencies

    - +} +

    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 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 +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

    - +

    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"
       }
    -}
    - -

    devDependencies

    - +} +

    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.

    -

    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",
    @@ -390,64 +294,48 @@ script to do this, and make the required package a devDependency.

    "prepublish": "coffee -o lib/ -c src/waza.coffee" }, "main": "lib/waza.js" -}
    - -

    The prepublish script will be run before publishing, so that users +} +

    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

    - +

    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 +} +

    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 +└── 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

    - +

    bundledDependencies

    Array of package names that will be bundled when publishing the package.

    -

    If this is spelled "bundleDependencies", then that is also honorable.

    - -

    optionalDependencies

    - +

    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.

    -

    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
    @@ -462,122 +350,104 @@ if ( notGoodFooVersion(fooVersion) ) {
     
     if (foo) {
       foo.doFooThings()
    -}
    - -

    Entries in optionalDependencies will override entries of the same name in +} +

    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 +

    { "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 +

    { "engines" : { "npm" : "~1.0.20" } }
    +

    Note that, unless the user has set the engine-strict config flag, this field is advisory only.

    - -

    engineStrict

    - +

    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, 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 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, +

    "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

    - +
    "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

    - +
    "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 hash described below to override the registry config param at publish-time.

    - -

    publishConfig

    - +

    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

    - +

    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 +

        +
      • "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

      +ignored.

      +
    • +
    +

    SEE ALSO

    + -
    @@ -589,5 +459,5 @@ ignored.

    - + diff --git a/deps/npm/html/doc/index.html b/deps/npm/html/doc/index.html index b989a25546..91c6876e94 100644 --- a/deps/npm/html/doc/index.html +++ b/deps/npm/html/doc/index.html @@ -10,414 +10,211 @@

    npm-index

    Index of all npm documentation

    - -

    README

    - +

    README

    node package manager

    - -

    Command Line Documentation

    - -

    npm(1)

    - +

    Command Line Documentation

    +

    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

    - - - +

    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)

    - +

    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

    - -

    npm(3)

    - +

    API Documentation

    +

    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-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

    - - - +

    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)

    - +

    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

    - -

    npm-folders(5)

    - +

    Files

    +

    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

    - -

    npm-coding-style(7)

    - +

    Misc

    +

    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-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

    +
    @@ -429,5 +226,5 @@ - + diff --git a/deps/npm/html/doc/misc/npm-coding-style.html b/deps/npm/html/doc/misc/npm-coding-style.html index dfe693fee4..f26eb29314 100644 --- a/deps/npm/html/doc/misc/npm-coding-style.html +++ b/deps/npm/html/doc/misc/npm-coding-style.html @@ -10,71 +10,51 @@

    npm-coding-style

    npm's "funny" coding style

    - -

    DESCRIPTION

    - +

    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

    - +

    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

    - +

    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

    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 +{ +

    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:

    - + bar() +

    Good:

    if (foo) bar()
     while (foo) {
       bar()
    -}
    - -

    Semicolons

    - +} +

    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. +
        +
      • 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.
      - +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 ++) {
    @@ -84,18 +64,14 @@ for (var i = 0; i < 10; i ++) {
         default: throw new Error("unknown state")
       }
       end()
    -}
    - -

    Note that starting lines with - and + also should be prefixed +} +

    Note that starting lines with - and + also should be prefixed with a semicolon, but this is much less common.

    - -

    Comma First

    - +

    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"
    @@ -106,84 +82,60 @@ final token in the list on a line by itself.  For example:

    , a = 1 , b = "abc" , etc - , somethingElse
    - -

    Whitespace

    - + , 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

    - +

    Functions

    Use named functions. They make stack traces a lot easier to read.

    - -

    Callbacks, Sync/async Style

    - +

    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

    - +

    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

    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.

    - +

    Case, naming, etc.

    Use lowerCamelCase for multiword identifiers when they refer to objects, functions, methods, members, 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

    + -

    SEE ALSO

    - -
    @@ -195,5 +147,5 @@ set to anything."

    - + diff --git a/deps/npm/html/doc/misc/npm-config.html b/deps/npm/html/doc/misc/npm-config.html index bbdd96c156..e279450aa1 100644 --- a/deps/npm/html/doc/misc/npm-config.html +++ b/deps/npm/html/doc/misc/npm-config.html @@ -10,20 +10,14 @@

    npm-config

    More than you probably want to know about npm configuration

    - -

    DESCRIPTION

    - +

    DESCRIPTION

    npm gets its configuration values from 6 sources, in this priority:

    - -

    Command Line Flags

    - +

    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

    - +

    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 @@ -31,707 +25,701 @@ configuration parameter to bar. Any environment configurations tha 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

    - +

    npmrc Files

    The three relevant files are:

    - -
    • per-user config file (~/.npmrc)
    • global config file ($PREFIX/npmrc)
    • npm builtin config file (/path/to/npm/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

    - +

    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

    - +

    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
    • -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
    - +
      +
    • -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
    • +
    • -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 +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

    - +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

    - +, "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
    - +
      +
    • Default: false
    • +
    • Type: Boolean
    • +

    Force npm to always require authentication when accessing the registry, even for GET requests.

    - - -
    • Default: true
    • Type: Boolean
    - +
      +
    • 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
    - +
      +
    • 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
    - +
      +
    • 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.

    -

    cache

    - -
    • Default: Windows: %AppData%\npm-cache, Posix: ~/.npm
    • Type: path
    - +
      +
    • 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
    - +
      +
    • Default: 60000 (1 minute)
    • +
    • Type: Number
    • +

    The number of ms before cache folder lockfiles are considered stale.

    -

    cache-lock-retries

    - -
    • Default: 10
    • Type: Number
    - +
      +
    • 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
    - +
      +
    • Default: 10000 (10 seconds)
    • +
    • Type: Number
    • +

    Number of ms to wait for cache lock files to expire.

    -

    cache-max

    - -
    • Default: Infinity
    • Type: Number
    - +
      +
    • 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
    - +
      +
    • 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
    - +
      +
    • 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"
    - +
      +
    • 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
    - +
      +
    • Default: Infinity
    • +
    • Type: Number
    • +

    The depth to go when recursing directories for npm ls and npm cache ls.

    -

    description

    - -
    • Default: true
    • Type: Boolean
    - +
      +
    • Default: true
    • +
    • Type: Boolean
    • +

    Show the description in npm search

    -

    dev

    - -
    • Default: false
    • Type: Boolean
    - +
      +
    • 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
    - +
      +
    • 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.

    -

    email

    -

    The email of the logged-in user.

    -

    Set by the npm adduser command. Should not be set explicitly.

    -

    engine-strict

    - -
    • Default: false
    • Type: Boolean
    - +
      +
    • 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
    - +
      +
    • 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.
    - +
      +
    • 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
    - +
      +
    • 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
    - +
      +
    • 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
    - +
      +
    • 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
    - +
      +
    • Default: 60000 (1 minute)
    • +
    • Type: Number
    • +

    The "maxTimeout" config for the retry module to use when fetching packages.

    -

    git

    - -
    • Default: "git"
    • Type: String
    - +
      +
    • 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
    - +
      +
    • Default: true
    • +
    • Type: Boolean
    • +

    Tag the commit when using the npm version command.

    -

    global

    - -
    • Default: false
    • Type: Boolean
    - +
      +
    • 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
    - +
      +
    • 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
    - +
      +
    • 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
    - +
      +
    • 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
    - +
      +
    • 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
    - +
      +
    • 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
    - +
      +
    • Default: false
    • +
    • Type: Boolean
    • +

    If true, npm does not run scripts specified in package.json files.

    -

    init-module

    - -
    • Default: ~/.npm-init.js
    • Type: path
    - +
      +
    • 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
    - +
      +
    • Default: ""
    • +
    • Type: String
    • +

    The value npm init should use by default for the package author's name.

    -

    init.author.email

    - -
    • Default: ""
    • Type: String
    - +
      +
    • Default: ""
    • +
    • Type: String
    • +

    The value npm init should use by default for the package author's email.

    -

    init.author.url

    - -
    • Default: ""
    • Type: String
    - +
      +
    • Default: ""
    • +
    • Type: String
    • +

    The value npm init should use by default for the package author's homepage.

    -

    init.license

    - -
    • Default: "ISC"
    • Type: String
    - +
      +
    • Default: "ISC"
    • +
    • Type: String
    • +

    The value npm init should use by default for the package license.

    -

    json

    - -
    • Default: false
    • Type: Boolean
    - +
      +
    • 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
    - +
      +
    • Default: null
    • +
    • Type: String
    • +

    A client key to pass when accessing the registry.

    - - -
    • Default: false
    • Type: Boolean
    - +
      +
    • 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.
    - +
      +
    • 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
    - +
      +
    • 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: "http"
    • Type: String
    • Values: "silent", "win", "error", "warn", "http", "info", "verbose", "silly"
    - +
      +
    • Default: "http"
    • +
    • Type: String
    • +
    • Values: "silent", "win", "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.

    -

    logstream

    - -
    • Default: process.stderr
    • Type: Stream
    - +
      +
    • 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
    - +
      +
    • Default: false
    • +
    • Type: Boolean
    • +

    Show extended information in npm ls and npm search.

    -

    message

    - -
    • Default: "%s"
    • Type: String
    - +
      +
    • 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
    - +
      +
    • Default: process.version
    • +
    • Type: semver or false
    • +

    The node version to use when checking package's "engines" hash.

    -

    npat

    - -
    • Default: false
    • Type: Boolean
    - +
      +
    • Default: false
    • +
    • Type: Boolean
    • +

    Run tests on installation.

    -

    onload-script

    - -
    • Default: false
    • Type: path
    - +
      +
    • Default: false
    • +
    • Type: path
    • +

    A node module to require() when npm loads. Useful for programmatic usage.

    -

    optional

    - -
    • Default: true
    • Type: Boolean
    - +
      +
    • Default: true
    • +
    • Type: Boolean
    • +

    Attempt to install packages in the optionalDependencies hash. Note that if these packages fail to install, the overall installation process is not aborted.

    -

    parseable

    - -
    • Default: false
    • Type: Boolean
    - +
      +
    • Default: false
    • +
    • Type: Boolean
    • +

    Output parseable results from commands that write to standard output.

    -

    prefix

    - - - +

    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
    - +
      +
    • Default: false
    • +
    • Type: Boolean
    • +

    Set to true to run in "production" mode.

    - -
    1. devDependencies are not installed at the topmost level when running -local npm install without any arguments.
    2. Set the NODE_ENV="production" for lifecycle scripts.
    - +
      +
    1. devDependencies are not installed at the topmost level when running +local npm install without any arguments.
    2. +
    3. Set the NODE_ENV="production" for lifecycle scripts.
    4. +

    proprietary-attribs

    - -
    • Default: true
    • Type: Boolean
    - +
      +
    • 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
    - +
      +
    • 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
    - +
      +
    • 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
    - +
      +
    • Default: true
    • +
    • Type: Boolean
    • +

    Remove failed installs.

    -

    save

    - -
    • Default: false
    • Type: Boolean
    - +
      +
    • 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 hash.

    -

    Only works if there is already a package.json file present.

    -

    save-bundle

    - -
    • Default: false
    • Type: Boolean
    - +
      +
    • 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
    - +
      +
    • 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 hash.

    -

    Only works if there is already a package.json file present.

    -

    save-exact

    - -
    • Default: false
    • Type: Boolean
    - +
      +
    • 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
    - +
      +
    • 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 hash.

    -

    Only works if there is already a package.json file present.

    -

    save-prefix

    - -
    • Default: '^'
    • Type: String
    - +
      +
    • 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 +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.

    -

    searchopts

    - -
    • Default: ""
    • Type: String
    - +
      +
    • Default: ""
    • +
    • Type: String
    • +

    Space-separated options that are always passed to search.

    -

    searchexclude

    - -
    • Default: ""
    • Type: String
    - +
      +
    • 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"
    - +
      +
    • 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
    - +
      +
    • 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
    - +
      +
    • Default: true
    • +
    • Type: Boolean
    • +

    If set to false, then ignore npm-shrinkwrap.json files when installing.

    -

    sign-git-tag

    - -
    • Default: false
    • Type: Boolean
    - +
      +
    • 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.

    -

    strict-ssl

    - -
    • Default: true
    • Type: Boolean
    - +
      +
    • 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
    - +
      +
    • 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
    - +
      +
    • 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
    - +
      +
    • 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
    - +
      +
    • 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
    - +
      +
    • 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
    - +
      +
    • Default: "nobody"
    • +
    • Type: String or Number
    • +

    The UID to set to when running package scripts as root.

    -

    username

    - -
    • Default: null
    • Type: String
    - +
      +
    • Default: null
    • +
    • Type: String
    • +

    The username on the npm registry. Set with npm adduser

    -

    userconfig

    - -
    • Default: ~/.npmrc
    • Type: path
    - +
      +
    • Default: ~/.npmrc
    • +
    • Type: path
    • +

    The location of user-level configuration settings.

    -

    umask

    - -
    • Default: 022
    • Type: Octal numeric string
    - +
      +
    • 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
    - +
      +
    • Default: node/{process.version} {process.platform} {process.arch}
    • +
    • Type: String
    • +

    Sets a User-Agent to the request header

    -

    version

    - -
    • Default: false
    • Type: boolean
    - +
      +
    • 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
    - +
      +
    • Default: false
    • +
    • Type: boolean
    • +

    If true, output the npm version as well as node's process.versions hash, and exit successfully.

    -

    Only relevant when specified explicitly on the command line.

    -

    viewer

    - -
    • Default: "man" on Posix, "browser" on Windows
    • Type: path
    - +
      +
    • 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

    + -

    SEE ALSO

    - -
    @@ -743,5 +731,5 @@ hash, and exit successfully.

    - + diff --git a/deps/npm/html/doc/misc/npm-developers.html b/deps/npm/html/doc/misc/npm-developers.html index 129aeb4243..6076b8ef1e 100644 --- a/deps/npm/html/doc/misc/npm-developers.html +++ b/deps/npm/html/doc/misc/npm-developers.html @@ -10,172 +10,166 @@

    npm-developers

    Developer Guide

    - -

    DESCRIPTION

    - +

    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

    - +

    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

    - +

    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).
    - +
      +
    • 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 +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

    - +

    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: +

        +
      • 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: +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: +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 hash. You should definitely have at least a basic smoke-test command as the "scripts.test" field. -See npm-scripts(7).

      • main: +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: +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 -they'll get installed just like these ones.

      - +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

    - +

    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
    - +
      +
    • .*.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:

    - - - - - + +

    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

    - +

    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 +

    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.

    - +
    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.

    - +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 Account

    Create a user with the adduser command. It works like this:

    - -
    npm adduser
    - -

    and then follow the prompts.

    - +
    npm adduser
    +

    and then follow the prompts.

    This is documented better in npm-adduser(1).

    - -

    Publish your package

    - +

    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, +

    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

    - +

    Brag about it

    Send emails, write blogs, blab in IRC.

    -

    Tell the world how easy it is to install your program!

    +

    SEE ALSO

    + -

    SEE ALSO

    - -
    @@ -187,5 +181,5 @@ from a fresh checkout.

    - + diff --git a/deps/npm/html/doc/misc/npm-disputes.html b/deps/npm/html/doc/misc/npm-disputes.html index 89127a3c86..e7db18cab4 100644 --- a/deps/npm/html/doc/misc/npm-disputes.html +++ b/deps/npm/html/doc/misc/npm-disputes.html @@ -10,90 +10,97 @@

    npm-disputes

    Handling Module Name Disputes

    - -

    SYNOPSIS

    - -
    1. Get the author email with npm owner ls <pkgname>
    2. Email the author, CC support@npmjs.com
    3. After a few weeks, if there's no resolution, we'll sort it out.
    - +

    SYNOPSIS

    +
      +
    1. Get the author email with npm owner ls <pkgname>
    2. +
    3. Email the author, CC support@npmjs.com
    4. +
    5. After a few weeks, if there's no resolution, we'll sort it out.
    6. +

    Don't squat on package names. Publish code or move out of the way.

    - -

    DESCRIPTION

    - +

    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.)

    - -
    1. Joe writes a JavaScript module foo, which is not node-specific. +
        +
      1. 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.
      2. Bob writes an npm module foo, and publishes it. Perhaps much +and wants to take over management of his program.
      3. +
      4. 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.
      5. Bob writes a 10-line flow-control library, and calls it foo, and +taken.
      6. +
      7. 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.
      8. Bob writes a parser for the widely-known foo file format, because +routinely confused when npm install foo is some different thing.
      9. +
      10. 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.
      - +but can't publish, because Bob's foo is in the way.
    2. +

    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.

    - -
    1. npm owner ls foo. This will tell Joe the email address of the -owner (Bob).
    2. Joe emails Bob, explaining the situation as respectfully as +
        +
      1. npm owner ls foo. This will tell Joe the email address of the +owner (Bob).
      2. +
      3. 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.
      4. After a reasonable amount of time, if Bob has not responded, or if +joe foo to add Joe as an owner of the foo package.
      5. +
      6. 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.)
      - -

      REASONING

      - +holidays.)
    3. +
    +

    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

    - +

    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:

    - -
    1. Malware (that is, a package designed to exploit or harm the machine on -which it is installed).
    2. Violations of copyright or licenses (for example, cloning an +
        +
      1. Malware (that is, a package designed to exploit or harm the machine on +which it is installed).
      2. +
      3. Violations of copyright or licenses (for example, cloning an MIT-licensed program, and then removing or changing the copyright and -license statement).
      4. Illegal content.
      5. "Squatting" on a package name that you plan to use, but aren't +license statement).
      6. +
      7. Illegal content.
      8. +
      9. "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.
      10. Putting empty packages in the registry. Packages must have SOME +an empty tarball, you're going to be evicted.
      11. +
      12. Putting empty packages in the registry. Packages must have SOME functionality. It can be silly, but it can't be nothing. (See -also: squatting.)
      13. Doing weird things with the registry, like using it as your own +also: squatting.)
      14. +
      15. Doing weird things with the registry, like using it as your own personal application database or otherwise putting non-packagey -things into it.
      - +things into it.
    3. +

    If you see bad behavior like this, please report it right away.

    +

    SEE ALSO

    + -

    SEE ALSO

    - -
    @@ -105,5 +112,5 @@ things into it. - + diff --git a/deps/npm/html/doc/misc/npm-faq.html b/deps/npm/html/doc/misc/npm-faq.html index 40500b6b42..02ba3f9019 100644 --- a/deps/npm/html/doc/misc/npm-faq.html +++ b/deps/npm/html/doc/misc/npm-faq.html @@ -10,238 +10,181 @@

    npm-faq

    Frequently Asked Questions

    - -

    Where can I find these docs in HTML?

    - +

    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.

    - +
    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?

    - +

    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?

    - +

    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 +
        +
      • 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?

      - +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

    - +

    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?

    - +

    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.

    - +

    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?

    - +

    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.
    - -

    Is it 'npm' or 'NPM' or 'Npm'?

    - +
      +
    • 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.
    • +
    +

    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?

    - +

    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?

    - +

    How do I list installed packages?

    npm ls

    - -

    How do I search for packages?

    - +

    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
    - -

    You can also update all outdated local packages by doing npm update without +

    How do I update npm?

    +
    npm update 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?

    - +
    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).
    - +
      +
    • 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 +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?

    - +

    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.
    - +
      +
    • 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?

    - +
    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?

    - +

    "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 @@ -249,7 +192,6 @@ 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 @@ -258,98 +200,80 @@ 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 #5.

    -

    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?

    - +

    How do I install node with npm?

    You don't. Try one of these node version managers:

    -

    Unix:

    - - - +

    Windows:

    - - - -

    How can I use npm for development?

    - + +

    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?

    - +

    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.)

    - - - +

    See npm-link(1)

    - -

    The package registry website. What is that exactly?

    - +

    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?

    - +

    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?

    - +

    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 +

    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?

    - +

    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?

    - +

    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?

    - +

    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?

    - + +

    Why does npm hate me?

    npm is not capable of hatred. It loves everyone, especially you.

    +

    SEE ALSO

    + -

    SEE ALSO

    - -
    @@ -361,5 +285,5 @@ good folks at npm, Inc.

    - + diff --git a/deps/npm/html/doc/misc/npm-index.html b/deps/npm/html/doc/misc/npm-index.html index 1bed387219..47dcc35c71 100644 --- a/deps/npm/html/doc/misc/npm-index.html +++ b/deps/npm/html/doc/misc/npm-index.html @@ -10,414 +10,211 @@

    npm-index

    Index of all npm documentation

    - -

    README

    - +

    README

    node package manager

    - -

    Command Line Documentation

    - -

    npm(1)

    - +

    Command Line Documentation

    +

    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

    - - - +

    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)

    - +

    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

    - -

    npm(3)

    - +

    API Documentation

    +

    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-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

    - - - +

    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)

    - +

    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

    - -

    npm-folders(5)

    - +

    Files

    +

    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

    - -

    npm-coding-style(7)

    - +

    Misc

    +

    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-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

    +
    @@ -429,5 +226,5 @@ - + diff --git a/deps/npm/html/doc/misc/npm-registry.html b/deps/npm/html/doc/misc/npm-registry.html index b1f88195b9..50f0b59679 100644 --- a/deps/npm/html/doc/misc/npm-registry.html +++ b/deps/npm/html/doc/misc/npm-registry.html @@ -10,69 +10,56 @@

    npm-registry

    The JavaScript Package Registry

    - -

    DESCRIPTION

    - +

    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 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.

    - -

    Can I run my own private registry?

    - +

    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.

    - +

    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?

    - +

    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?

    - +

    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?

    - +

    Is there a website or something to see package docs and such?

    Yes, head over to https://npmjs.org/

    +

    SEE ALSO

    + -

    SEE ALSO

    - -
    @@ -84,5 +71,5 @@ effectively implement the entire CouchDB API anyway.

    - + diff --git a/deps/npm/html/doc/misc/npm-scripts.html b/deps/npm/html/doc/misc/npm-scripts.html index 1877799029..2fcb009494 100644 --- a/deps/npm/html/doc/misc/npm-scripts.html +++ b/deps/npm/html/doc/misc/npm-scripts.html @@ -10,221 +10,203 @@

    npm-scripts

    How npm handles the "scripts" field

    - -

    DESCRIPTION

    - +

    DESCRIPTION

    npm supports the "scripts" member of the package.json script, for the following scripts:

    - -
    • prepublish: +
        +
      • 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: +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.
      - +stop and start scripts if no restart script is provided.
    • +

    Additionally, arbitrary scripts can be run by doing npm run-script <stage> <pkg>.

    - -

    NOTE: INSTALL SCRIPTS ARE AN ANTIPATTERN

    - +

    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.
    - +
      +
    • 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

    - +
      +
    • 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

    - +
      +
    • "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

    - +

    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 +, "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" hash

    - +

    Special: package.json "config" hash

    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

    - +, "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

    - +
    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, +} +

    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

    - +} +

    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

    - +

    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. +

      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 +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 +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 +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

      +the user will sudo the npm command in question.
    • +
    +

    SEE ALSO

    + -
    @@ -236,5 +218,5 @@ the user will sudo the npm command in question. - + diff --git a/deps/npm/html/doc/misc/removing-npm.html b/deps/npm/html/doc/misc/removing-npm.html index 8e20ad8b60..7b77eecf33 100644 --- a/deps/npm/html/doc/misc/removing-npm.html +++ b/deps/npm/html/doc/misc/removing-npm.html @@ -10,56 +10,42 @@

    npm-removal

    Cleaning the Slate

    - -

    SYNOPSIS

    - +

    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

    - +
    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 +

    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 +

    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

    + -
    find /usr/local/{lib/node,bin} -exec grep -l npm \{\} \; ;
    - -

    (This is also in the README file.)

    - -

    SEE ALSO

    - -
    @@ -71,5 +57,5 @@ modules. To track those down, you can do the following:

    - + diff --git a/deps/npm/html/doc/misc/semver.html b/deps/npm/html/doc/misc/semver.html index dc075b1fb8..4e28efd606 100644 --- a/deps/npm/html/doc/misc/semver.html +++ b/deps/npm/html/doc/misc/semver.html @@ -10,9 +10,7 @@

    semver

    The semantic versioner for npm

    - -

    Usage

    - +

    Usage

    $ npm install semver
     
     semver.valid('1.2.3') // '1.2.3'
    @@ -20,10 +18,8 @@ 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.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>]
    @@ -40,75 +36,96 @@ 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

    - +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

    - +

    Ranges

    The following range styles are supported:

    - -
    • 1.2.3 A specific version. When nothing else will do. Note that +
        +
      • 1.2.3 A specific version. When nothing else will do. 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 +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 +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 +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 +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 +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 := >=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"
      - +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 := >=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"
    • +

    Ranges can be joined with either a space (which implies "and") or a || (which implies "or").

    - -

    Functions

    - +

    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, minor, patch, or prerelease), or null if it's not valid.
    - -

    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, +
        +
      • 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, minor, patch, or prerelease), or null if it's not valid.
      • +
      +

      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 +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 +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.)
      - +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 @@ -116,9 +133,9 @@ until 2.0.0, so the version 1.2.10 would not be greate 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.

    +
    @@ -130,5 +147,5 @@ range, use the satisfies(version, range) function.

    - + diff --git a/deps/npm/lib/npm.js b/deps/npm/lib/npm.js index 63f9be3156..613bf0095a 100644 --- a/deps/npm/lib/npm.js +++ b/deps/npm/lib/npm.js @@ -204,17 +204,19 @@ Object.keys(abbrevs).concat(plumbing).forEach(function addCommand (c) { } if (args.length === 1) args.unshift([]) - npm.registry.refer = [a].concat(args[0]).map(function (arg) { - // exclude anything that might be a URL, path, or private module - // Those things will always have a slash in them somewhere - if (arg && arg.match && arg.match(/\/|\\/)) { - return "[REDACTED]" - } else { - return arg - } - }).filter(function (arg) { - return arg && arg.match - }).join(" ") + if (!npm.registry.refer) { + npm.registry.refer = [a].concat(args[0]).map(function (arg) { + // exclude anything that might be a URL, path, or private module + // Those things will always have a slash in them somewhere + if (arg && arg.match && arg.match(/\/|\\/)) { + return "[REDACTED]" + } else { + return arg + } + }).filter(function (arg) { + return arg && arg.match + }).join(" ") + } cmd.apply(npm, args) } diff --git a/deps/npm/lib/run-script.js b/deps/npm/lib/run-script.js index 0808f2edd6..8797ccd9d1 100644 --- a/deps/npm/lib/run-script.js +++ b/deps/npm/lib/run-script.js @@ -70,7 +70,7 @@ runScript.completion = function (opts, cb) { } function runScript (args, cb) { - if (!args.length) return cb(runScript.usage) + if (!args.length) return list(cb) var pkgdir = args.length === 1 ? process.cwd() : path.resolve(npm.dir, args[0]) , cmd = args.pop() @@ -81,6 +81,36 @@ function runScript (args, cb) { }) } +function list(cb) { + var json = path.join(npm.prefix, 'package.json') + return readJson(json, function(er, d) { + if (er && er.code !== 'ENOENT' && er.code !== 'ENOTDIR') return cb(er) + if (er) d = {} + var scripts = Object.keys(d.scripts || {}) + + if (log.level === "silent") { + return cb(null, scripts) + } + + if (npm.config.get("json")) { + console.log(JSON.stringify(d.scripts || {}, null, 2)) + return cb(null, scripts) + } + + var s = ":" + var prefix = "" + if (!npm.config.get("parseable")) { + s = "\n " + prefix = " " + console.log("Available scripts in the %s package:", d.name) + } + scripts.forEach(function(script) { + console.log(prefix + script + s + d.scripts[script]) + }) + return cb(null, scripts) + }) +} + function run (pkg, wd, cmd, cb) { var cmds = [] if (!pkg.scripts) pkg.scripts = {} diff --git a/deps/npm/lib/utils/fetch.js b/deps/npm/lib/utils/fetch.js index e92b68d14a..f6e5166ff5 100644 --- a/deps/npm/lib/utils/fetch.js +++ b/deps/npm/lib/utils/fetch.js @@ -12,6 +12,7 @@ var request = require("request") , chownr = require("chownr") , regHost , once = require("once") + , crypto = require("crypto") module.exports = fetch @@ -78,12 +79,24 @@ function makeRequest (remote, fstr, headers) { 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: remote.host === regHost ? npm.config.get("ca") : undefined - , headers: { "user-agent": npm.config.get("user-agent") }} + , 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) diff --git a/deps/npm/man/man1/npm-ls.1 b/deps/npm/man/man1/npm-ls.1 index 977bd0207a..f0662f64c0 100644 --- a/deps/npm/man/man1/npm-ls.1 +++ b/deps/npm/man/man1/npm-ls.1 @@ -29,7 +29,7 @@ For example, running \fBnpm ls promzard\fR in npm\'s source tree will show: .IP "" 4 . .nf -npm@1.4.9 /path/to/npm +npm@1.4.10 /path/to/npm └─┬ init\-package\-json@0\.0\.4 └── promzard@0\.1\.5 . diff --git a/deps/npm/man/man1/npm-run-script.1 b/deps/npm/man/man1/npm-run-script.1 index b81fa80b87..c350d9f192 100644 --- a/deps/npm/man/man1/npm-run-script.1 +++ b/deps/npm/man/man1/npm-run-script.1 @@ -9,14 +9,15 @@ .SH "SYNOPSIS" . .nf -npm run\-script [] +npm run\-script [] [command] . .fi . .SH "DESCRIPTION" 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\. +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 diff --git a/deps/npm/man/man1/npm.1 b/deps/npm/man/man1/npm.1 index 562ae36bdf..dd60a59ae9 100644 --- a/deps/npm/man/man1/npm.1 +++ b/deps/npm/man/man1/npm.1 @@ -14,7 +14,7 @@ npm [args] .fi . .SH "VERSION" -1.4.9 +1.4.10 . .SH "DESCRIPTION" npm is the package manager for the Node JavaScript platform\. It puts diff --git a/deps/npm/man/man3/npm.3 b/deps/npm/man/man3/npm.3 index 93850f5ed1..d7f2ad3c89 100644 --- a/deps/npm/man/man3/npm.3 +++ b/deps/npm/man/man3/npm.3 @@ -21,7 +21,7 @@ npm\.load([configObject, ]function (er, npm) { .fi . .SH "VERSION" -1.4.9 +1.4.10 . .SH "DESCRIPTION" This is the API documentation for npm\. diff --git a/deps/npm/package.json b/deps/npm/package.json index e10263e039..a2b0667ab4 100644 --- a/deps/npm/package.json +++ b/deps/npm/package.json @@ -1,5 +1,5 @@ { - "version": "1.4.9", + "version": "1.4.10", "name": "npm", "publishConfig": { "proprietary-attribs": false @@ -138,6 +138,7 @@ "which" ], "devDependencies": { + "marked": "~0.3.2", "npm-registry-mock": "~0.6.3", "ronn": "~0.3.6", "tap": "~0.4.9" diff --git a/deps/npm/scripts/doc-build.sh b/deps/npm/scripts/doc-build.sh index 0eb59321bf..98dfa82f60 100755 --- a/deps/npm/scripts/doc-build.sh +++ b/deps/npm/scripts/doc-build.sh @@ -55,13 +55,13 @@ case $dest in *.html) url=${dest/html\//} (cat html/dochead.html && \ - ./node_modules/.bin/ronn -f $src && + cat $src | ./node_modules/.bin/marked && cat html/docfoot.html)\ | sed "s|@NAME@|$name|g" \ | sed "s|@DATE@|$date|g" \ | sed "s|@URL@|$url|g" \ | sed "s|@VERSION@|$version|g" \ - | perl -pi -e 's/

    ([^\(]*\([0-9]\)) -- (.*?)<\/h1>/

    \1<\/h1>

    \2<\/p>/g' \ + | perl -pi -e 's/]*)>([^\(]*\([0-9]\)) -- (.*?)<\/h1>/

    \2<\/h1>

    \3<\/p>/g' \ | perl -pi -e 's/npm-npm/npm/g' \ | perl -pi -e 's/([^"-])(npm-)?README(?!\.html)(\(1\))?/\1README<\/a>/g' \ | perl -pi -e 's/<a href="[^"]+README.html">README<\/a><\/title>/<title>README<\/title>/g' \ diff --git a/deps/npm/test/tap/install-save-prefix.js b/deps/npm/test/tap/install-save-prefix.js index 9cb6bd9cbb..753150924a 100644 --- a/deps/npm/test/tap/install-save-prefix.js +++ b/deps/npm/test/tap/install-save-prefix.js @@ -32,7 +32,7 @@ test('"npm install --save with default save-prefix should install local pkg vers var pkgJson = JSON.parse(fs.readFileSync(pkg + '/package.json', 'utf8')) t.deepEqual(pkgJson.dependencies, { 'underscore': '^1.5.1' - }, 'Underscore dependency should specify ^1.3.1') + }, 'Underscore dependency should specify ^1.5.1') npm.config.set('save', undefined) s.close() t.end() diff --git a/deps/npm/test/tap/test-run-ls.js b/deps/npm/test/tap/test-run-ls.js new file mode 100644 index 0000000000..4c869e5e24 --- /dev/null +++ b/deps/npm/test/tap/test-run-ls.js @@ -0,0 +1,33 @@ +var common = require("../common-tap.js") +var test = require("tap").test +var path = require("path") +var cwd = path.resolve(__dirname, "..", "..") +var testscript = require("../../package.json").scripts.test +var tsregexp = testscript.replace(/([\[\.\*\]])/g, "\\$1") + +test("default", function (t) { + common.npm(["run"], { cwd: cwd }, function (er, code, so, se) { + if (er) throw er + t.notOk(code) + t.similar(so, new RegExp("\\n test\\n " + tsregexp + "\\n")) + t.end() + }) +}) + +test("parseable", function (t) { + common.npm(["run", "-p"], { cwd: cwd }, function (er, code, so, se) { + if (er) throw er + t.notOk(code) + t.similar(so, new RegExp("\\ntest:" + tsregexp + "\\n")) + t.end() + }) +}) + +test("parseable", function (t) { + common.npm(["run", "--json"], { cwd: cwd }, function (er, code, so, se) { + if (er) throw er + t.notOk(code) + t.equal(JSON.parse(so).test, testscript) + t.end() + }) +})