summaryrefslogtreecommitdiff
path: root/deps/npm/doc
diff options
context:
space:
mode:
authorForrest L Norvell <forrest@npmjs.com>2015-05-28 22:27:26 -0400
committerForrest L Norvell <forrest@npmjs.com>2015-05-30 08:15:11 -0400
commitc1afa53648cf872f62b551e868522fdc2612e3a9 (patch)
tree138449538f9d0a350f1db43593ac8ed3d9c04d8f /deps/npm/doc
parenta65762cab6edf33d87a129e406f633dfa445bb23 (diff)
downloadandroid-node-v8-c1afa53648cf872f62b551e868522fdc2612e3a9.tar.gz
android-node-v8-c1afa53648cf872f62b551e868522fdc2612e3a9.tar.bz2
android-node-v8-c1afa53648cf872f62b551e868522fdc2612e3a9.zip
deps: upgrade npm to 2.11.0
PR-URL: https://github.com/iojs/io.js/pull/1829 Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Diffstat (limited to 'deps/npm/doc')
-rw-r--r--deps/npm/doc/cli/npm-shrinkwrap.md28
-rw-r--r--deps/npm/doc/cli/npm-version.md10
-rw-r--r--deps/npm/doc/misc/npm-faq.md14
-rw-r--r--deps/npm/doc/misc/npm-scripts.md4
4 files changed, 35 insertions, 21 deletions
diff --git a/deps/npm/doc/cli/npm-shrinkwrap.md b/deps/npm/doc/cli/npm-shrinkwrap.md
index d781a683e7..ca9cb257b9 100644
--- a/deps/npm/doc/cli/npm-shrinkwrap.md
+++ b/deps/npm/doc/cli/npm-shrinkwrap.md
@@ -13,14 +13,14 @@ 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
+dependencies (as specified in `package.json`), choosing the latest
available version that satisfies the dependency's semver pattern. In
some situations, particularly when shipping software where each change
is tightly managed, it's desirable to fully specify each version of
each dependency recursively so that subsequent builds and deploys do
not inadvertently pick up newer versions of a dependency that satisfy
the semver pattern. Specifying specific semver patterns in each
-dependency's package.json would facilitate this, but that's not always
+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.
@@ -48,7 +48,7 @@ package B:
and package C:
{
- "name": "C,
+ "name": "C",
"version": "0.0.1"
}
@@ -78,7 +78,7 @@ In this case, A's author can run
npm shrinkwrap
-This generates npm-shrinkwrap.json, which will look something like this:
+This generates `npm-shrinkwrap.json`, which will look something like this:
{
"name": "A",
@@ -97,12 +97,12 @@ This generates npm-shrinkwrap.json, which will look something like this:
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
+installs a package with an `npm-shrinkwrap.json` in the package
+root, the shrinkwrap file (rather than `package.json` files) completely
drives the installation of that package and all of its dependencies
(recursively). So now the author publishes A@0.1.0, and subsequent
installs of this package will use B@0.0.1 and C@0.0.1, regardless the
-dependencies and versions listed in A's, B's, and C's package.json
+dependencies and versions listed in A's, B's, and C's `package.json`
files.
@@ -110,7 +110,7 @@ files.
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.
+`package.json` file and `npm install` it.
### Building shrinkwrapped packages
@@ -119,7 +119,7 @@ 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
+3. Run `npm shrinkwrap`, add `npm-shrinkwrap.json` to git, and publish
your package.
To add or update a dependency in a shrinkwrapped package:
@@ -127,13 +127,13 @@ 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
- package individually and then update package.json. Note that they
+ 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.
3. Validate that the package works as expected with the new
dependencies.
-4. Run `npm shrinkwrap`, commit the new npm-shrinkwrap.json, and
+4. Run `npm shrinkwrap`, commit the new `npm-shrinkwrap.json`, and
publish your package.
You can use npm-outdated(1) to view dependencies with newer versions
@@ -141,12 +141,12 @@ available.
### Other Notes
-A shrinkwrap file must be consistent with the package's package.json
+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.
+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
diff --git a/deps/npm/doc/cli/npm-version.md b/deps/npm/doc/cli/npm-version.md
index 545bce6b6b..63a5e95122 100644
--- a/deps/npm/doc/cli/npm-version.md
+++ b/deps/npm/doc/cli/npm-version.md
@@ -40,6 +40,14 @@ in your git config for this to work properly. For example:
Enter passphrase:
+If "preversion", "version", "postversion" in the "scripts" property of
+the package.json, it will execute by running `npm version`. preversion
+and version ware executed before bump the package version, postversion
+was executed after bump the package version. For example to run `npm version`
+after passed all test:
+
+ "scripts": { "preversion": "npm test" }
+
## CONFIGURATION
### git-tag-version
@@ -52,6 +60,8 @@ Commit and tag the version change.
## SEE ALSO
* npm-init(1)
+* npm-run-script(1)
+* npm-scripts(7)
* package.json(5)
* semver(7)
* config(7)
diff --git a/deps/npm/doc/misc/npm-faq.md b/deps/npm/doc/misc/npm-faq.md
index 176effc4e4..b9e837f76d 100644
--- a/deps/npm/doc/misc/npm-faq.md
+++ b/deps/npm/doc/misc/npm-faq.md
@@ -328,9 +328,9 @@ on Freenode IRC.
## Why no namespaces?
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.
+you may: simply use the `-` character to separate the names or use scoped
+packages. npm is a mostly anarchic system. There is not sufficient need to
+impose namespace rules on everyone.
As of 2.0, npm supports scoped packages, which allow you to publish a group of
related modules without worrying about name collisions.
@@ -340,11 +340,11 @@ 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.
+Scoped packages are supported by the public npm registry. The npm client is
+backwards-compatible with un-scoped registries, so it can be used to work with
+scoped and un-scoped registries at the same time.
-Unscoped packages can only depend on other unscoped packages. Scoped packages
+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).
diff --git a/deps/npm/doc/misc/npm-scripts.md b/deps/npm/doc/misc/npm-scripts.md
index e1380d1ed7..1594d3c413 100644
--- a/deps/npm/doc/misc/npm-scripts.md
+++ b/deps/npm/doc/misc/npm-scripts.md
@@ -19,6 +19,10 @@ following scripts:
Run BEFORE the package is uninstalled.
* postuninstall:
Run AFTER the package is uninstalled.
+* preversion, version:
+ Run BEFORE bump the package version.
+* postversion:
+ Run AFTER bump the package version.
* pretest, test, posttest:
Run by the `npm test` command.
* prestop, stop, poststop: