summaryrefslogtreecommitdiff
path: root/deps/npm/doc
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/doc')
-rw-r--r--deps/npm/doc/api/npm-ls.md2
-rw-r--r--deps/npm/doc/api/npm-restart.md33
-rw-r--r--deps/npm/doc/api/npm-start.md4
-rw-r--r--deps/npm/doc/cli/npm-adduser.md11
-rw-r--r--deps/npm/doc/cli/npm-link.md2
-rw-r--r--deps/npm/doc/cli/npm-restart.md29
-rw-r--r--deps/npm/doc/cli/npm-version.md3
-rw-r--r--deps/npm/doc/files/npmrc.md6
-rw-r--r--deps/npm/doc/files/package.json.md11
-rw-r--r--deps/npm/doc/misc/npm-coding-style.md4
-rw-r--r--deps/npm/doc/misc/npm-config.md25
-rw-r--r--deps/npm/doc/misc/npm-developers.md8
-rw-r--r--deps/npm/doc/misc/npm-faq.md45
-rw-r--r--deps/npm/doc/misc/npm-index.md6
-rw-r--r--deps/npm/doc/misc/npm-registry.md2
-rw-r--r--deps/npm/doc/misc/npm-scripts.md4
-rw-r--r--deps/npm/doc/misc/semver.md35
17 files changed, 173 insertions, 57 deletions
diff --git a/deps/npm/doc/api/npm-ls.md b/deps/npm/doc/api/npm-ls.md
index ed890ff146..5de78f2104 100644
--- a/deps/npm/doc/api/npm-ls.md
+++ b/deps/npm/doc/api/npm-ls.md
@@ -52,5 +52,5 @@ 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
+This means that if a submodule has the same dependency as a parent module, then the
dependency will only be output once.
diff --git a/deps/npm/doc/api/npm-restart.md b/deps/npm/doc/api/npm-restart.md
index c40704438e..606c41bf85 100644
--- a/deps/npm/doc/api/npm-restart.md
+++ b/deps/npm/doc/api/npm-restart.md
@@ -1,5 +1,5 @@
-npm-restart(3) -- Start a package
-=================================
+npm-restart(3) -- Restart a package
+===================================
## SYNOPSIS
@@ -7,14 +7,33 @@ npm-restart(3) -- Start a package
## DESCRIPTION
-This runs a package's "restart" script, if one was provided.
-Otherwise it runs package's "stop" script, if one was provided, and then
-the "start" script.
+This restarts a package (or multiple packages).
+
+This runs a package's "stop", "restart", and "start" scripts, and associated
+pre- and post- scripts, in the order given below:
+
+1. prerestart
+2. prestop
+3. stop
+4. poststop
+5. restart
+6. prestart
+7. start
+8. poststart
+9. postrestart
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.
+npm can restart multiple packages. Just specify multiple packages in
+the `packages` parameter.
+
+## NOTE
+
+Note that the "restart" script is run **in addition to** the "stop"
+and "start" scripts, not instead of them.
+
+This is the behavior as of `npm` major version 2. A change in this
+behavior will be accompanied by an increase in major version number
## SEE ALSO
diff --git a/deps/npm/doc/api/npm-start.md b/deps/npm/doc/api/npm-start.md
index 74491146aa..deeea90d97 100644
--- a/deps/npm/doc/api/npm-start.md
+++ b/deps/npm/doc/api/npm-start.md
@@ -9,5 +9,5 @@ npm-start(3) -- Start a package
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.
+npm can start multiple packages. Just specify multiple packages in the
+`packages` parameter.
diff --git a/deps/npm/doc/cli/npm-adduser.md b/deps/npm/doc/cli/npm-adduser.md
index 54e785b07f..80d0f9855b 100644
--- a/deps/npm/doc/cli/npm-adduser.md
+++ b/deps/npm/doc/cli/npm-adduser.md
@@ -13,13 +13,14 @@ the default registry will be used (see `npm-config(7)`).
The username, password, and email are read in from prompts.
-You may use this command to change your email address, but not username
-or password.
+To reset your password, go to <https://www.npmjs.com/forgot>
-To reset your password, go to <https://www.npmjs.org/forgot>
+To change your email address, go to <https://www.npmjs.com/email-edit>
You may use this command multiple times with the same user account to
-authorize on a new machine.
+authorize on a new machine. When authenticating on a new machine,
+the username, password and email address must all match with
+your existing record.
`npm login` is an alias to `adduser` and behaves exactly the same way.
@@ -57,7 +58,7 @@ registries. Can be used with `--registry` and / or `--scope`, e.g.
This will ensure that all requests to that registry (including for tarballs)
include an authorization header. See `always-auth` in `npm-config(7)` for more
-details on always-auth. Registry-specific configuaration of `always-auth` takes
+details on always-auth. Registry-specific configuration of `always-auth` takes
precedence over any global configuration.
## SEE ALSO
diff --git a/deps/npm/doc/cli/npm-link.md b/deps/npm/doc/cli/npm-link.md
index a6c2747900..786ad815dc 100644
--- a/deps/npm/doc/cli/npm-link.md
+++ b/deps/npm/doc/cli/npm-link.md
@@ -22,7 +22,7 @@ Note that `package-name` is taken from `package.json`,
not from directory name.
The package name can be optionally prefixed with a scope. See `npm-scope(7)`.
-The scope must by preceded by an @-symbol and followed by a slash.
+The scope must be preceded by an @-symbol and followed by a slash.
When creating tarballs for `npm publish`, the linked packages are
"snapshotted" to their current state by resolving the symbolic links.
diff --git a/deps/npm/doc/cli/npm-restart.md b/deps/npm/doc/cli/npm-restart.md
index 6d594a26c1..1aa0c57a68 100644
--- a/deps/npm/doc/cli/npm-restart.md
+++ b/deps/npm/doc/cli/npm-restart.md
@@ -1,5 +1,5 @@
-npm-restart(1) -- Start a package
-=================================
+npm-restart(1) -- Restart a package
+===================================
## SYNOPSIS
@@ -7,8 +7,28 @@ npm-restart(1) -- Start a package
## DESCRIPTION
-This runs a package's "restart" script, if one was provided. Otherwise it runs
-package's "stop" script, if one was provided, and then the "start" script.
+This restarts a package.
+
+This runs a package's "stop", "restart", and "start" scripts, and associated
+pre- and post- scripts, in the order given below:
+
+1. prerestart
+2. prestop
+3. stop
+4. poststop
+5. restart
+6. prestart
+7. start
+8. poststart
+9. postrestart
+
+## NOTE
+
+Note that the "restart" script is run **in addition to** the "stop"
+and "start" scripts, not instead of them.
+
+This is the behavior as of `npm` major version 2. A change in this
+behavior will be accompanied by an increase in major version number
## SEE ALSO
@@ -17,3 +37,4 @@ package's "stop" script, if one was provided, and then the "start" script.
* npm-test(1)
* npm-start(1)
* npm-stop(1)
+* npm-restart(3) \ No newline at end of file
diff --git a/deps/npm/doc/cli/npm-version.md b/deps/npm/doc/cli/npm-version.md
index b30b6a3a21..69f3581bfc 100644
--- a/deps/npm/doc/cli/npm-version.md
+++ b/deps/npm/doc/cli/npm-version.md
@@ -8,7 +8,7 @@ npm-version(1) -- Bump a package version
## DESCRIPTION
Run this in a package directory to bump the version and write the new
-data back to the package.json file.
+data back to `package.json` and, if present, `npm-shrinkwrap.json`.
The `newversion` argument should be a valid semver string, *or* a
valid second argument to semver.inc (one of "patch", "minor", "major",
@@ -38,6 +38,7 @@ in your git config for this to work properly. For example:
Enter passphrase:
+
## SEE ALSO
* npm-init(1)
diff --git a/deps/npm/doc/files/npmrc.md b/deps/npm/doc/files/npmrc.md
index ba57a6f2c3..a3eb4389f4 100644
--- a/deps/npm/doc/files/npmrc.md
+++ b/deps/npm/doc/files/npmrc.md
@@ -30,6 +30,12 @@ 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.
+Array values are specified by adding "[]" after the key name. For
+example:
+
+ key[] = "first value"
+ key[] = "second value"
+
### Per-project config file
When working locally in a project, a `.npmrc` file in the root of the
diff --git a/deps/npm/doc/files/package.json.md b/deps/npm/doc/files/package.json.md
index 1138bc2749..e23f7affc7 100644
--- a/deps/npm/doc/files/package.json.md
+++ b/deps/npm/doc/files/package.json.md
@@ -253,7 +253,7 @@ 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`
+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:
@@ -366,13 +366,16 @@ an argument to `git checkout`. The default is `master`.
## GitHub URLs
-As of version 1.1.65, you can refer to GitHub urls as just "foo": "user/foo-project". For example:
+As of version 1.1.65, you can refer to GitHub urls as just "foo":
+"user/foo-project". Just as with git URLs, a `commit-ish` suffix can be
+included. For example:
{
"name": "foo",
"version": "0.0.0",
"dependencies": {
- "express": "visionmedia/express"
+ "express": "visionmedia/express",
+ "mocha": "visionmedia/mocha#4727d357ea"
}
}
@@ -442,7 +445,7 @@ run this script as well, so that you can test it easily.
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
+This is usually referred to as a *plugin*. Notably, your module may be exposing
a specific interface, expected and specified by the host documentation.
For example:
diff --git a/deps/npm/doc/misc/npm-coding-style.md b/deps/npm/doc/misc/npm-coding-style.md
index 80609f4f2f..7dd7ad556d 100644
--- a/deps/npm/doc/misc/npm-coding-style.md
+++ b/deps/npm/doc/misc/npm-coding-style.md
@@ -10,7 +10,7 @@ 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
+Note: this concerns npm's code not the specific packages that you can download from the npm registry.
## Line Length
@@ -21,7 +21,7 @@ statements onto multiple lines.
## Indentation
Two-spaces. Tabs are better, but they look like hell in web browsers
-(and on github), and node uses 2 spaces, so that's that.
+(and on GitHub), and node uses 2 spaces, so that's that.
Configure your editor appropriately.
diff --git a/deps/npm/doc/misc/npm-config.md b/deps/npm/doc/misc/npm-config.md
index 6e7d995dd8..fc6201e667 100644
--- a/deps/npm/doc/misc/npm-config.md
+++ b/deps/npm/doc/misc/npm-config.md
@@ -137,14 +137,22 @@ The browser that is called by the `npm docs` command to open websites.
### ca
* Default: The npm CA certificate
-* Type: String or null
+* Type: String, Array or null
The Certificate Authority signing certificate that is trusted for SSL
-connections to the registry.
+connections to the registry. Values should be in PEM format with newlines
+replaced by the string "\n". For example:
+
+ ca="-----BEGIN CERTIFICATE-----\nXXXX\nXXXX\n-----END CERTIFICATE-----"
Set to `null` to only allow "known" registrars, or to a specific CA cert
to trust only that specific signing authority.
+Multiple CAs can be trusted by specifying an array of certificates:
+
+ ca[]="..."
+ ca[]="..."
+
See also the `strict-ssl` config.
### cafile
@@ -361,11 +369,12 @@ 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.
+* Default: null
* Type: url
-A proxy to use for outgoing https requests.
+A proxy to use for outgoing https requests. If the `HTTPS_PROXY` or
+`https_proxy` or `HTTP_PROXY` or `http_proxy` environment variables are set,
+proxy settings will be honored by the underlying `request` library.
### ignore-scripts
@@ -577,10 +586,12 @@ this as true.
### proxy
-* Default: `HTTP_PROXY` or `http_proxy` environment variable, or null
+* Default: null
* Type: url
-A proxy to use for outgoing http requests.
+A proxy to use for outgoing http requests. If the `HTTP_PROXY` or
+`http_proxy` environment variables are set, proxy settings will be
+honored by the underlying `request` library.
### rebuild-bundle
diff --git a/deps/npm/doc/misc/npm-developers.md b/deps/npm/doc/misc/npm-developers.md
index f6ea01176f..2b025034f8 100644
--- a/deps/npm/doc/misc/npm-developers.md
+++ b/deps/npm/doc/misc/npm-developers.md
@@ -102,6 +102,14 @@ 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.
+`.npmignore` files follow the [same pattern rules](http://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository#Ignoring-Files)
+as `.gitignore` files:
+
+* Blank lines or lines starting with `#` are ignored.
+* Standard glob patterns work.
+* You can end patterns with a forward slash `/` to specify a directory.
+* You can negate a pattern by starting it with an exclamation point `!`.
+
By default, the following paths and files are ignored, so there's no
need to add them to `.npmignore` explicitly:
diff --git a/deps/npm/doc/misc/npm-faq.md b/deps/npm/doc/misc/npm-faq.md
index 72891271f9..176effc4e4 100644
--- a/deps/npm/doc/misc/npm-faq.md
+++ b/deps/npm/doc/misc/npm-faq.md
@@ -3,7 +3,7 @@ npm-faq(7) -- Frequently Asked Questions
## Where can I find these docs in HTML?
-<https://www.npmjs.org/doc/>, or run:
+<https://docs.npmjs.com/>, or run:
npm config set viewer browser
@@ -80,7 +80,7 @@ Usually, no. Allow npm to resolve dependencies for your packages.
For packages you **deploy**, such as websites and apps,
you should use npm shrinkwrap to lock down your full dependency tree:
-https://www.npmjs.org/doc/cli/npm-shrinkwrap.html
+<https://docs.npmjs.com/cli/shrinkwrap>
If you are paranoid about depending on the npm ecosystem,
you should run a private npm mirror or a private cache.
@@ -147,7 +147,7 @@ command.)
In those cases, you can do this:
- curl https://www.npmjs.org/install.sh | sh
+ curl https://www.npmjs.com/install.sh | sh
## What is a `package`?
@@ -307,7 +307,7 @@ See `npm-registry(7)`.
## I forgot my password, and can't publish. How do I reset it?
-Go to <https://npmjs.org/forgot>.
+Go to <https://npmjs.com/forgot>.
## I get ECONNREFUSED a lot. What's up?
@@ -327,13 +327,38 @@ on Freenode IRC.
## Why no namespaces?
-Please see this discussion: <https://github.com/npm/npm/issues/798>
+npm has only one global namespace. 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.
-tl;dr - It doesn't actually make things better, and can make them worse.
+As of 2.0, npm supports scoped packages, which allow you to publish a group of
+related modules without worrying about name collisions.
-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.
+Every npm user owns the scope associated with their username. For example, the
+user named `npm` owns the scope `@npm`. Scoped packages are published inside a
+scope by naming them as if they were files under the scope directory, e.g., by
+setting `name` in `package.json` to `@npm/npm`.
+
+Scoped packages can coexist with public npm packages in a private npm registry.
+At present (2014-11-04) scoped packages may NOT be published to the public npm
+registry.
+
+Unscoped packages can only depend on other unscoped packages. Scoped packages
+can depend on packages from their own scope, a different scope, or the public
+registry (unscoped).
+
+For the current documentation of scoped packages, see
+<https://docs.npmjs.com/misc/scope>
+
+References:
+
+1. For the reasoning behind the "one global namespace", 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.)
+
+2. For the pre-implementation discussion of the scoped package feature, see
+ this discussion: <https://github.com/npm/npm/issues/5239>
## Who does npm?
@@ -341,7 +366,7 @@ 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](https://www.npmjs.org) are maintained and operated by the
+website](https://www.npmjs.com) are maintained and operated by the
good folks at [npm, Inc.](http://www.npmjs.com)
## I have a question or request not addressed here. Where should I put it?
diff --git a/deps/npm/doc/misc/npm-index.md b/deps/npm/doc/misc/npm-index.md
index 9c804bf802..a68ac30c97 100644
--- a/deps/npm/doc/misc/npm-index.md
+++ b/deps/npm/doc/misc/npm-index.md
@@ -3,7 +3,7 @@ npm-index(7) -- Index of all npm documentation
### README(1)
-node package manager
+a JavaScript package manager
## Command Line Documentation
@@ -123,7 +123,7 @@ Open package repository page in the browser
### npm-restart(1)
-Start a package
+Restart a package
### npm-rm(1)
@@ -295,7 +295,7 @@ Open package repository page in the browser
### npm-restart(3)
-Start a package
+Restart a package
### npm-root(3)
diff --git a/deps/npm/doc/misc/npm-registry.md b/deps/npm/doc/misc/npm-registry.md
index 42cec59448..b0487f6df9 100644
--- a/deps/npm/doc/misc/npm-registry.md
+++ b/deps/npm/doc/misc/npm-registry.md
@@ -57,7 +57,7 @@ effectively implement the entire CouchDB API anyway.
## Is there a website or something to see package docs and such?
-Yes, head over to <https://npmjs.org/>
+Yes, head over to <https://npmjs.com/>
## SEE ALSO
diff --git a/deps/npm/doc/misc/npm-scripts.md b/deps/npm/doc/misc/npm-scripts.md
index 054886b4d5..3be4af377f 100644
--- a/deps/npm/doc/misc/npm-scripts.md
+++ b/deps/npm/doc/misc/npm-scripts.md
@@ -19,10 +19,6 @@ following scripts:
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:
diff --git a/deps/npm/doc/misc/semver.md b/deps/npm/doc/misc/semver.md
index bd697d959e..3f9555db14 100644
--- a/deps/npm/doc/misc/semver.md
+++ b/deps/npm/doc/misc/semver.md
@@ -16,12 +16,12 @@ As a command-line utility:
$ semver -h
- Usage: semver <version> [<version> [...]] [-r <range> | -i <inc> | -d <dec>]
+ Usage: semver <version> [<version> [...]] [-r <range> | -i <inc> | --preid <identifier> | -l | -rv]
Test if version(s) satisfy the supplied range(s), and sort them.
Multiple versions or ranges may be supplied, unless increment
- or decrement options are specified. In that case, only a single
- version may be used, and it is incremented by the specified level
+ option is specified. In that case, only a single version may
+ be used, and it is incremented by the specified level
Program exits successfully if any valid version satisfies
all supplied ranges, and prints all satisfying versions.
@@ -101,6 +101,30 @@ the user is indicating that they are aware of the risk. However, it
is still not appropriate to assume that they have opted into taking a
similar risk on the *next* set of prerelease versions.
+#### Prerelease Identifiers
+
+The method `.inc` takes an additional `identifier` string argument that
+will append the value of the string as a prerelease identifier:
+
+````javascript
+> semver.inc('1.2.3', 'pre', 'beta')
+'1.2.4-beta.0'
+```
+
+command-line example:
+
+```shell
+$ semver 1.2.3 -i prerelease --preid beta
+1.2.4-beta.0
+```
+
+Which then can be used to increment further:
+
+```shell
+$ semver 1.2.4-beta.0 -i prerelease
+1.2.4-beta.1
+```
+
### Advanced Range Syntax
Advanced range syntax desugars to primitive comparators in
@@ -161,8 +185,6 @@ comparator. Allows minor-level changes if not.
`1.2.4-beta.2` would not, because it is a prerelease of a
different `[major, minor, patch]` tuple.
-Note: this is the same as the `~>` operator in rubygems.
-
#### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4`
Allows changes that do not modify the left-most non-zero digit in the
@@ -245,6 +267,9 @@ strings that they parse.
`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()`.
+* `diff(v1, v2)`: Returns difference between two versions by the release type
+ (`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`),
+ or null if the versions are the same.
### Ranges