deps: upgrade npm to 6.1.0

PR-URL: https://github.com/nodejs/node/pull/20190
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
This commit is contained in:
Rebecca Turner 2018-04-20 18:26:37 -07:00
parent ac8226115e
commit 468ab4519e
4567 changed files with 116745 additions and 144271 deletions

View File

@ -3,6 +3,7 @@
- [ ] npm is crashing.
- [ ] npm is producing an incorrect install.
- [ ] npm is doing something I don't understand.
- [ ] npm is producing incorrect or undesirable behavior.
- [ ] Other (_see below for feature requests_):
#### What's going wrong?

7
deps/npm/.mailmap vendored
View File

@ -13,6 +13,7 @@ Dalmais Maxence <root@ip-10-195-202-5.ec2.internal>
Danila Gerasimov <danila.gerasimov@gmail.com>
Dave Galbraith <dave@jut.io>
David Beitey <david@davidjb.com>
David Rousselie <guido.dassori@gmail.com>
Domenic Denicola <domenic@domenicdenicola.com>
Einar Otto Stangvik <einaros@gmail.com>
Emma Ramirez <ramirez.emma.g@gmail.com>
@ -32,11 +33,15 @@ Jake Verbaten <raynos2@gmail.com>
James Sanders <jimmyjazz14@gmail.com>
James Treworgy <jamietre@gmail.com>
Jason Smith <jhs@iriscouch.com>
Jed Fox <git@twopointzero.us>
Joshua Bennett <legodudejb@gmail.com>
Joshua Bennett <legodudejb@gmail.com> <legodude17@users.noreply.github.com>
Jonas Weber <github@jonasw.de>
Julien Meddah <julien.meddah@deveryware.com>
Kat Marchán <kzm@zkat.tech> <kzm@sykosomatic.org>
Kevin Lorenz <mail@kevinlorenz.com>
Kris Windham <kriswindham@gmail.com>
Leonardo Rojas <leonardo.rojas@shopify.com>
Lin Clark <lin.w.clark@gmail.com>
Luke Arduini <luke.arduini@gmail.com> <luke.arduini@me.com>
Maciej Małecki <me@mmalecki.com> <maciej.malecki@notimplemented.org>
@ -46,12 +51,14 @@ Maxim Bogushevich <boga1@mail.ru>
Maximilian Antoni <mail@maxantoni.de> <maximilian.antoni@juliusbaer.com>
Michael Hayes <michael@hayes.io> <mhayes@newrelic.com>
Nicolas Morel <marsup@gmail.com>
Misha Kaletsky <misha.kaletsky@gmail.com>
Olivier Melcher <olivier.melcher@gmail.com>
Ra'Shaun Stovall <rashaunstovall@gmail.com>
Rebecca Turner <me@re-becca.org> <turner@mikomi.org>
Rebecca Turner <me@re-becca.org> <rebecca@npmjs.com>
Ryan Emery <seebees@gmail.com>
Sam Mikes <smikes@cubane.com>
Sreenivas Alapati <sreenivas9alapati@gmail.com>
Stephanie Snopek <stephaniesnopek@gmail.com>
Takaya Kobayashi <jigsaw@live.jp>
Ted Yavuzkurt <hello@TedY.io> <davidteoman@gmail.com>

11
deps/npm/.npmignore vendored
View File

@ -1,13 +1,7 @@
*.swp
.*.swp
npm-debug.log
/test/bin
/test/output.log
/test/packages/*/node_modules
/test/packages/npm-test-depends-on-spark/which-spark.log
/test/packages/test-package/random-data.txt
/test/root
/test/npm_cache
/test
node_modules/marked
node_modules/ronn
node_modules/tap
@ -27,8 +21,5 @@ html/*.png
*.pyc
/test/tap/builtin-config
.nyc_output
npm-shrinkwrap.json

View File

@ -15,13 +15,10 @@ matrix:
- "node . run tap-cover -- \"test/tap/*.js\""
- "unset COVERALLS_REPO_TOKEN ; node . run tap -- \"test/broken-under-*/*.js\""
# previous LTS is next most important
- node_js: "4"
env: DEPLOY_VERSION=testing
- node_js: "6"
env: DEPLOY_VERSION=testing
- node_js: "7"
- node_js: "10"
env: DEPLOY_VERSION=testing
# then master
- node_js: "9"
env: DEPLOY_VERSION=testing
script:

48
deps/npm/AUTHORS vendored
View File

@ -285,7 +285,7 @@ Clay Carpenter <claycarpenter@gmail.com>
bangbang93 <bangbang93@163.com>
Nick Malaguti <nmalaguti@palantir.com>
Cedric Nelson <cedric.nelson@gmail.com>
Kat Marchán <kzm@sykosomatic.org>
Kat Marchán <kzm@zkat.tech>
Andrew <talktome@aboutandrew.co.uk>
Eduardo Pinho <enet4mikeenet@gmail.com>
Rachel Hutchison <rhutchix@intel.com>
@ -453,14 +453,13 @@ Henry Zhu <hi@henryzoo.com>
Nate Goldman <ungoldman@gmail.com>
Ted Yavuzkurt <hello@TedY.io>
Arseniy Maximov <localhost@kern0.ru>
Joshua Bennett <legodude17@users.noreply.github.com>
Evgeny Kulikov <beyondcompute@users.noreply.github.com>
Сковорода Никита Андреевич <chalkerx@gmail.com>
Carol (Nichols || Goulding) <carol.nichols@gmail.com>
Jarid Margolin <jaridmargolin@gmail.com>
David Cook <divergentdave@gmail.com>
Brian Dukes <bdukes@engagesoftware.com>
J F <git@twopointzero.us>
Jed Fox <git@twopointzero.us>
Pavlo Liulia <pavloblack@hotmail.com>
Ján Dzurek <famousgarkin@outlook.com>
Lucas Theisen <ltheisen@mitre.org>
@ -487,21 +486,21 @@ Leonard Martin <leonard.martin@gmail.com>
Teddy Katz <teddy.katz@gmail.com>
Simon Legg <leggsimon@gmail.com>
Kin Lum <kenneth.kin.lum@gmail.com>
dax <guido.dassori@gmail.com>
David Rousselie <guido.dassori@gmail.com>
Jože Mlakar <JozeM@ixtlan-team.si>
happylynx <happylynx@users.noreply.github.com>
Dominic Watson <intellix@users.noreply.github.com>
Enrico Weigelt, metux IT consult <enrico.weigelt@gr13.net>
Brian Beck <exogen@gmail.com>
Ramana Venkata <vramana@users.noreply.github.com>
mmkal <misha.kaletsky@gmail.com>
Misha Kaletsky <misha.kaletsky@gmail.com>
Andrew Schmadel <schmod@users.noreply.github.com>
AJ Jordan <alex@strugee.net>
Mark Banner <standard8@mozilla.com>
Richard Simko <richardsimko@users.noreply.github.com>
Sanketh Katta <sankethkatta@gmail.com>
Tim Needham <tim.needham@wmfs.net>
leonardo rojas <leonardo.rojas@shopify.com>
Leonardo Rojas <leonardo.rojas@shopify.com>
Mark Peter Fejes <fejes.mark@gmail.com>
Ryan Florence <rpflorence@gmail.com>
MichaelQQ <mingsian.tu@vpon.com>
@ -513,7 +512,6 @@ Luis Gustavo Pereira <lgp1985@yahoo.com.br>
Amos Wenger <fasterthanlime@users.noreply.github.com>
Samuel Marks <samuelmarks@gmail.com>
Victor Travieso <victor@grabcad.com>
legodude17 <legodude17@users.noreply.github.com>
Joshua Chaitin-Pollak <jbcpollak@users.noreply.github.com>
Brendan Warkentin <faazshift@gmail.com>
Scott Santucci <ScottFreeCode@users.noreply.github.com>
@ -536,3 +534,39 @@ Jacob Wejendorp <jacob@wejendorp.dk>
Alejandro López <a.lopez.sanchez@outlook.es>
Victor Belozyorov <hi@vbelozyorov.com>
Bradley Farias <bfarias@godaddy.com>
Kyle E. Mitchell <kyle@kemitchell.com>
Tuan Anh Tran <me@tuananh.org>
Nathan Woltman <nwoltman@outlook.com>
Kyra <kyranet@users.noreply.github.com>
Leаh Neukirchen <chneukirchen@gmail.com>
Kyle Spier-Swenson <kyleshome@gmail.com>
Joe Bowbeer <joe.bowbeer@gmail.com>
Nalin Bhardwaj <6984346+nalinbhardwaj@users.noreply.github.com>
Nicolas Garnier <ngarnier@users.noreply.github.com>
Vladislav Rassokhin <vladrassokhin@gmail.com>
Josh Goldberg <joshuakgoldberg@outlook.com>
laggingreflex <laggingreflex@gmail.com>
Kristofer Selbekk <selbekk@users.noreply.github.com>
Sreenivas Alapati <sreenivas9alapati@gmail.com>
Ben Creasy <ben@bencreasy.com>
Allan Kimmer Jensen <allankimmerjensen@gmail.com>
rinfan <rinfan@users.noreply.github.com>
Matt Hoyle <code@deployable.co>
Mason Pawsey <mpawsey@csub.edu>
Johannes Bader <olydis@users.noreply.github.com>
Michael Zabka <zabka.michael@gmail.com>
Bruce MacNaughton <bmacnaughton@gmail.com>
Christopher Patty <christopher.patty@aggiemail.usu.edu>
Max Stoiber <contact@mxstbr.com>
Enrico Weigelt <enrico.weigelt@gr13.net>
David Hu <davidjhu@gmail.com>
Steven R. Loomis <srl295@gmail.com>
Julien Deniau <julien.deniau@gmail.com>
Prasanna Venkatesh T S <vipranarayan14@gmail.com>
Alec Larson <aleclarson@users.noreply.github.com>
John-David Dalton <john.david.dalton@gmail.com>
Raymond Feng <enjoyjava@gmail.com>
Tieme van Veen <tiemevanveen@hotmail.com>
Finn Pauls <derfinn@gmail.com>
Jeremy Kahn <jeremyckahn@gmail.com>
Mertcan Mermerkaya <mertcan@mermerkaya.net>

2014
deps/npm/CHANGELOG.md vendored

File diff suppressed because it is too large Load Diff

4
deps/npm/Makefile vendored
View File

@ -65,9 +65,9 @@ dev: install
link: uninstall
node bin/npm-cli.js link -f
clean: markedclean marked-manclean doc-clean uninstall
clean: markedclean marked-manclean doc-clean
rm -rf npmrc
node bin/npm-cli.js cache clean
node bin/npm-cli.js cache clean --force
uninstall:
node bin/npm-cli.js rm npm -g -f

4
deps/npm/README.md vendored
View File

@ -11,9 +11,9 @@ Much more info available via `npm help` once it's installed.
## IMPORTANT
**You need node v4 or higher to run this program.**
**You need node v6 or higher to run this program.**
To install an old **and unsupported** version of npm that works on node v0.12
To install an old **and unsupported** version of npm that works on node v5
and prior, clone the git repo and dig through the old tags and branches.
**npm is configured to use npm, Inc.'s public package registry at

View File

@ -1,7 +1,7 @@
#!/usr/bin/env node
;(function () { // wrapper in case we're in module_context mode
// windows: running "npm blah" in this folder will invoke WSH, not node.
/*global WScript*/
/* global WScript */
if (typeof WScript !== 'undefined') {
WScript.echo(
'npm does not work when run\n' +
@ -25,17 +25,10 @@
unsupported.checkForUnsupportedNode()
if (!unsupported.checkVersion(process.version).unsupported) {
var updater = require('update-notifier')
var pkg = require('../package.json')
updater({pkg: pkg}).notify({defer: true})
}
var path = require('path')
var npm = require('../lib/npm.js')
var npmconf = require('../lib/config/core.js')
var errorHandler = require('../lib/utils/error-handler.js')
var output = require('../lib/utils/output.js')
var configDefs = npmconf.defs
var shorthands = configDefs.shorthands
@ -81,10 +74,70 @@
conf._exit = true
npm.load(conf, function (er) {
if (er) return errorHandler(er)
if (!unsupported.checkVersion(process.version).unsupported) {
const pkg = require('../package.json')
let notifier = require('update-notifier')({pkg})
if (
notifier.update &&
notifier.update.latest !== pkg.version
) {
const color = require('ansicolors')
const useColor = npm.config.get('color')
const useUnicode = npm.config.get('unicode')
const old = notifier.update.current
const latest = notifier.update.latest
let type = notifier.update.type
if (useColor) {
switch (type) {
case 'major':
type = color.red(type)
break
case 'minor':
type = color.yellow(type)
break
case 'patch':
type = color.green(type)
break
}
}
const changelog = `https://github.com/npm/npm/releases/tag/v${latest}`
notifier.notify({
message: `New ${type} version of ${pkg.name} available! ${
useColor ? color.red(old) : old
} ${useUnicode ? '→' : '->'} ${
useColor ? color.green(latest) : latest
}\n` +
`${
useColor ? color.yellow('Changelog:') : 'Changelog:'
} ${
useColor ? color.cyan(changelog) : changelog
}\n` +
`Run ${
useColor
? color.green(`npm install -g ${pkg.name}`)
: `npm i -g ${pkg.name}`
} to update!`
})
}
}
npm.commands[npm.command](npm.argv, function (err) {
// https://www.youtube.com/watch?v=7nfPu8qTiQU
if (!err && npm.config.get('ham-it-up') && !npm.config.get('json') && !npm.config.get('parseable') && npm.command !== 'completion') {
output('\n 🎵 I Have the Honour to Be Your Obedient Servant,🎵 ~ npm 📜🖋\n')
// https://genius.com/Lin-manuel-miranda-your-obedient-servant-lyrics
if (
!err &&
npm.config.get('ham-it-up') &&
!npm.config.get('json') &&
!npm.config.get('parseable') &&
npm.command !== 'completion'
) {
console.error(
`\n ${
npm.config.get('unicode') ? '🎵 ' : ''
} I Have the Honour to Be Your Obedient Servant,${
npm.config.get('unicode') ? '🎵 ' : ''
} ~ npm ${
npm.config.get('unicode') ? '📜🖋 ' : ''
}\n`
)
}
errorHandler.apply(this, arguments)
})

5
deps/npm/bin/npx vendored
View File

@ -12,18 +12,19 @@ if ! [ -x "$NODE_EXE" ]; then
NODE_EXE=node
fi
NPM_CLI_JS="$basedir/node_modules/npm/bin/npm-cli.js"
NPX_CLI_JS="$basedir/node_modules/npm/bin/npx-cli.js"
case `uname` in
*MINGW*)
NPM_PREFIX=`"$NODE_EXE" "$NPX_CLI_JS" prefix -g`
NPM_PREFIX=`"$NODE_EXE" "$NPM_CLI_JS" prefix -g`
NPM_PREFIX_NPX_CLI_JS="$NPM_PREFIX/node_modules/npm/bin/npx-cli.js"
if [ -f "$NPM_PREFIX_NPX_CLI_JS" ]; then
NPX_CLI_JS="$NPM_PREFIX_NPX_CLI_JS"
fi
;;
*CYGWIN*)
NPM_PREFIX=`"$NODE_EXE" "$NPX_CLI_JS" prefix -g`
NPM_PREFIX=`"$NODE_EXE" "$NPM_CLI_JS" prefix -g`
NPM_PREFIX_NPX_CLI_JS="$NPM_PREFIX/node_modules/npm/bin/npx-cli.js"
if [ -f "$NPM_PREFIX_NPX_CLI_JS" ]; then
NPX_CLI_JS="$NPM_PREFIX_NPX_CLI_JS"

View File

@ -8,8 +8,9 @@ IF NOT EXIST "%NODE_EXE%" (
SET "NODE_EXE=node"
)
SET "NPM_CLI_JS=%~dp0\node_modules\npm\bin\npm-cli.js"
SET "NPX_CLI_JS=%~dp0\node_modules\npm\bin\npx-cli.js"
FOR /F "delims=" %%F IN ('CALL "%NODE_EXE%" "%NPX_CLI_JS%" prefix -g') DO (
FOR /F "delims=" %%F IN ('CALL "%NODE_EXE%" "%NPM_CLI_JS%" prefix -g') DO (
SET "NPM_PREFIX_NPX_CLI_JS=%%F\node_modules\npm\bin\npx-cli.js"
)
IF EXIST "%NPM_PREFIX_NPX_CLI_JS%" (

2360
deps/npm/changelogs/CHANGELOG-5.md vendored Normal file

File diff suppressed because it is too large Load Diff

94
deps/npm/doc/cli/npm-audit.md vendored Normal file
View File

@ -0,0 +1,94 @@
npm-audit(1) -- Run a security audit
====================================
## SYNOPSIS
npm audit [--json]
npm audit fix [--force|--package-lock-only|--dry-run|--production|--only=dev]
## EXAMPLES
Scan your project for vulnerabilities and automatically install any compatible
updates to vulnerable dependencies:
```
$ npm audit fix
```
Run `audit fix` without modifying `node_modules`, but still updating the
pkglock:
```
$ npm audit fix --package-lock-only
```
Skip updating `devDependencies`:
```
$ npm audit fix --only=prod
```
Have `audit fix` install semver-major updates to toplevel dependencies, not just
semver-compatible ones:
```
$ npm audit fix --force
```
Do a dry run to get an idea of what `audit fix` will do, and _also_ output
install information in JSON format:
```
$ npm audit fix --dry-run --json
```
Scan your project for vulnerabilities and just show the details, without fixing
anything:
```
$ npm audit
```
Get the detailed audit report in JSON format:
```
$ npm audit --json
```
## DESCRIPTION
The audit command submits a description of the dependencies configured in
your project to your default registry and asks for a report of known
vulnerabilities. The report returned includes instructions on how to act on
this information.
You can also have npm automatically fix the vulnerabilities by running `npm
audit fix`. Note that some vulnerabilities cannot be fixed automatically and
will require manual intervention or review. Also note that since `npm audit fix`
runs a full-fledged `npm install` under the hood, all configs that apply to the
installer will also apply to `npm install` -- so things like `npm audit fix
--package-lock-only` will work as expected.
## CONTENT SUBMITTED
* npm_version
* node_version
* platform
* node_env
* A scrubbed version of your package-lock.json or npm-shrinkwrap.json
### SCRUBBING
In order to ensure that potentially sensitive information is not included in
the audit data bundle, some dependencies may have their names (and sometimes
versions) replaced with opaque non-reversible identifiers. It is done for
the following dependency types:
* Any module referencing a scope that is configured for a non-default
registry has its name scrubbed. (That is, a scope you did a `npm login --scope=@ourscope` for.)
* All git dependencies have their names and specifiers scrubbed.
* All remote tarball dependencies have their names and specifiers scrubbed.
* All local directory and tarball dependencies have their names and specifiers scrubbed.
The non-reversible identifiers are a sha256 of a session-specific UUID and the
value being replaced, ensuring a consistent value within the payload that is
different between runs.
## SEE ALSO
* npm-install(1)
* package-locks(5)
* config(7)

58
deps/npm/doc/cli/npm-ci.md vendored Normal file
View File

@ -0,0 +1,58 @@
npm-ci(1) -- Install a project with a clean slate
===================================
## SYNOPSIS
npm ci
## EXAMPLE
Make sure you have a package-lock and an up-to-date install:
```
$ cd ./my/npm/project
$ npm install
added 154 packages in 10s
$ ls | grep package-lock
```
Run `npm ci` in that project
```
$ npm ci
added 154 packages in 5s
```
Configure Travis to build using `npm ci` instead of `npm install`:
```
# .travis.yml
install:
- npm ci
# keep the npm cache around to speed up installs
cache:
directories:
- "$HOME/.npm"
```
## DESCRIPTION
This command is similar to `npm-install(1)`, except it's meant to be used in
automated environments such as test platforms, continuous integration, and
deployment. It can be significantly faster than a regular npm install by
skipping certain user-oriented features. It is also more strict than a regular
install, which can help catch errors or inconsistencies caused by the
incrementally-installed local environments of most npm users.
In short, the main differences between using `npm install` and `npm ci` are:
* The project **must** have an existing `package-lock.json` or `npm-shrinkwrap.json`.
* If dependencies in the package lock do not match those in `package.json`, `npm ci` will exit with an error, instead of updating the package lock.
* `npm ci` can only install entire projects at a time: individual dependencies cannot be added with this command.
* If a `node_modules` is already present, it will be automatically removed before `npm ci` begins its install.
* It will never write to `package.json` or any of the package-locks: installs are essentially frozen.
## SEE ALSO
* npm-install(1)
* npm-package-locks(5)

72
deps/npm/doc/cli/npm-hook.md vendored Normal file
View File

@ -0,0 +1,72 @@
npm-hook(1) -- Manage registry hooks
===================================
## SYNOPSIS
npm hook ls [pkg]
npm hook add <entity> <url> <secret>
npm hook update <id> <url> [secret]
npm hook rm <id>
## EXAMPLE
Add a hook to watch a package for changes:
```
$ npm hook add lodash https://example.com/ my-shared-secret
```
Add a hook to watch packages belonging to the user `substack`:
```
$ npm hook add ~substack https://example.com/ my-shared-secret
```
Add a hook to watch packages in the scope `@npm`
```
$ npm hook add @npm https://example.com/ my-shared-secret
```
List all your active hooks:
```
$ npm hook ls
```
List your active hooks for the `lodash` package:
```
$ npm hook ls lodash
```
Update an existing hook's url:
```
$ npm hook update id-deadbeef https://my-new-website.here/
```
Remove a hook:
```
$ npm hook rm id-deadbeef
```
## DESCRIPTION
Allows you to manage [npm
hooks](http://blog.npmjs.org/post/145260155635/introducing-hooks-get-notifications-of-npm),
including adding, removing, listing, and updating.
Hooks allow you to configure URL endpoints that will be notified whenever a
change happens to any of the supported entity types. Three different types of
entities can be watched by hooks: packages, owners, and scopes.
To create a package hook, simply reference the package name.
To create an owner hook, prefix the owner name with `~` (as in, `~youruser`).
To create a scope hook, prefix the scope name with `@` (as in, `@yourscope`).
The hook `id` used by `update` and `rm` are the IDs listed in `npm hook ls` for
that particular hook.
The shared secret will be sent along to the URL endpoint so you can verify the
request came from your own configured hook.
## SEE ALSO
* ["Introducing Hooks" blog post](http://blog.npmjs.org/post/145260155635/introducing-hooks-get-notifications-of-npm)

View File

@ -1,34 +1,62 @@
npm-init(1) -- Interactively create a package.json file
npm-init(1) -- create a package.json file
=======================================================
## SYNOPSIS
npm init [-f|--force|-y|--yes]
npm init [--force|-f|--yes|-y|--scope]
npm init <@scope> (same as `npx <@scope>/create`)
npm init [<@scope>/]<name> (same as `npx [<@scope>/]create-<name>`)
## EXAMPLES
Create a new React-based project using [`create-react-app`](https://npm.im/create-react-app):
```
$ npm init react-app ./my-react-app
```
Create a new `esm`-compatible package using [`create-esm`](https://npm.im/create-esm):
```
$ mkdir my-esm-lib && cd my-esm-lib
$ npm init esm --yes
```
Generate a plain old package.json using legacy init:
```
$ mkdir my-npm-pkg && cd my-npm-pkg
$ git init
$ npm init
```
Generate it without having it ask any questions:
```
$ npm init -y
```
## DESCRIPTION
This will ask you a bunch of questions, and then write a package.json for you.
`npm init <initializer>` can be used to set up a new or existing npm package.
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.
`initializer` in this case is an npm package named `create-<initializer>`, which
will be installed by [`npx(1)`](https://npm.im/npx), and then have its main bin
executed -- presumably creating or updating `package.json` and running any other
initialization-related operations.
If you already have a package.json file, it'll read that first, and default to
the options in there.
The init command is transformed to a corresponding `npx` operation as follows:
It is strictly additive, so it does not delete options from your package.json
without a really good reason to do so.
* `npm init foo` -> `npx create-foo`
* `npm init @usr/foo` -> `npx @usr/create-foo`
* `npm init @usr` -> `npx @usr/create`
If you invoke it with `-f`, `--force`, `-y`, or `--yes`, it will use only
defaults and not prompt you for any options.
Any additional options will be passed directly to the command, so `npm init foo
--hello` will map to `npx create-foo --hello`.
## CONFIGURATION
### scope
* Default: none
* Type: String
The scope under which the new module should be created.
If the initializer is omitted (by just calling `npm init`), init will fall back
to legacy init behavior. It will ask you a bunch of questions, and then write a
package.json for you. It will attempt to make reasonable guesses based on
existing fields, dependencies, and options selected. It is strictly additive, so
it will keep any fields and values that were already set. You can also use
`-y`/`--yes` to skip the questionnaire altogether. If you pass `--scope`, it
will create a scoped package.
## SEE ALSO

16
deps/npm/doc/cli/npm-install-ci-test.md vendored Normal file
View File

@ -0,0 +1,16 @@
# npm install-ci-test(1) -- Install a project with a clean slate and run tests
## SYNOPSIS
npm install-ci-test
alias: npm cit
## DESCRIPTION
This command runs an `npm ci` followed immediately by an `npm test`.
## SEE ALSO
- npm-ci(1)
- npm-test(1)

View File

@ -55,6 +55,9 @@ after packing it up into a tarball (b).
is set to `production`), npm will not install modules listed in
`devDependencies`.
> NOTE: The `--production` flag has no particular meaning when adding a
dependency to a project.
* `npm install <folder>`:
Install the package in the directory as a symlink in the current project.
@ -347,7 +350,8 @@ The `--no-shrinkwrap` argument, which will ignore an available
package lock or shrinkwrap file and use the package.json instead.
The `--no-package-lock` argument will prevent npm from creating a
`package-lock.json` file.
`package-lock.json` file. When running with package-lock's disabled npm
will not automatically prune your node modules when installing.
The `--nodedir=/path/to/node/source` argument will allow npm to find the
node source code so that npm can compile native modules.
@ -355,6 +359,9 @@ node source code so that npm can compile native modules.
The `--only={prod[uction]|dev[elopment]}` argument will cause either only
`devDependencies` or only non-`devDependencies` to be installed regardless of the `NODE_ENV`.
The `--no-audit` argument can be used to disable sending of audit reports to
the configured registries. See `npm-audit(1)` for details on what is sent.
See `npm-config(7)`. Many of the configuration params have some
effect on installation, since that's most of what npm does.
@ -430,6 +437,7 @@ affects a real use-case, it will be investigated.
* npm-folders(5)
* npm-update(1)
* npm-audit(1)
* npm-link(1)
* npm-rebuild(1)
* npm-scripts(7)

View File

@ -76,7 +76,7 @@ Max display depth of the dependency tree.
Display only the dependency tree for packages in `dependencies`.
### dev
### dev / development
* Type: Boolean
* Default: false

View File

@ -27,6 +27,8 @@ In the output:
* `package type` (when using `--long` / `-l`) tells you whether this package is
a `dependency` or a `devDependency`. Packages not included in `package.json`
are always marked `dependencies`.
* Red means there's a newer version matching your semver requirements, so you should update now.
* Yellow indicates that there's a newer version above your semver requirements (usually new major, or new 0.x minor) so proceed with caution.
### An example

View File

@ -3,7 +3,7 @@ npm-prune(1) -- Remove extraneous packages
## SYNOPSIS
npm prune [[<@scope>/]<pkg>...] [--production]
npm prune [[<@scope>/]<pkg>...] [--production] [--dry-run] [--json]
## DESCRIPTION
@ -16,9 +16,21 @@ package's dependencies list.
If the `--production` flag is specified or the `NODE_ENV` environment
variable is set to `production`, this command will remove the packages
specified in your `devDependencies`. Setting `--production=false` will
specified in your `devDependencies`. Setting `--no-production` will
negate `NODE_ENV` being set to `production`.
If the `--dry-run` flag is used then no changes will actually be made.
If the `--json` flag is used then the changes `npm prune` made (or would
have made with `--dry-run`) are printed as a JSON object.
In normal operation with package-locks enabled, extraneous modules are
pruned automatically when modules are installed and you'll only need
this command with the `--production` flag.
If you've disabled package-locks then extraneous modules will not be removed
and it's up to you to run `npm prune` from time-to-time to remove them.
## SEE ALSO
* npm-uninstall(1)

View File

@ -68,6 +68,10 @@ you will be given a warning to run `npm install`, just in case you've forgotten.
You can use the `--silent` flag to prevent showing `npm ERR!` output on error.
You can use the `--if-present` flag to avoid exiting with a non-zero exit code
when the script is undefined. This lets you run potentially undefined scripts
without breaking the execution chain.
## SEE ALSO
* npm-scripts(7)

View File

@ -34,6 +34,9 @@ when operating on them, separated by a colon (`:`). That is, if you have a
under that organization. If performed on a team, it will instead return a list
of all users belonging to that particular team.
* edit:
Edit a current team.
## DETAILS
`npm team` always operates directly on the current registry, configurable from

View File

@ -26,6 +26,10 @@ As of `npm@2.6.1`, the `npm update` will only inspect top-level packages.
Prior versions of `npm` would also recursively inspect all dependencies.
To get the old behavior, use `npm --depth 9999 update`.
As of `npm@5.0.0`, the `npm update` will change `package.json` to save the
new version as the minimum required dependency. To get the old behavior,
use `npm update --no-save`.
## EXAMPLES
IMPORTANT VERSION NOTE: these examples assume `npm@2.6.1` or later. For
@ -104,30 +108,6 @@ If the dependence were on `^0.4.0`:
Then `npm update` will install `dep1@0.4.1`, because that is the highest-sorting
version that satisfies `^0.4.0` (`>= 0.4.0 <0.5.0`)
### Recording Updates with `--save`
When you want to update a package and save the new version as
the minimum required dependency in `package.json`, you can use
`npm update -S` or `npm update --save`. For example if
`package.json` contains:
```
"dependencies": {
"dep1": "^1.1.1"
}
```
Then `npm update --save` will install `dep1@1.2.2` (i.e., `latest`),
and `package.json` will be modified:
```
"dependencies": {
"dep1": "^1.2.2"
}
```
Note that `npm` will only write an updated version to `package.json`
if it installs a new package.
### Updating Globally-Installed Packages

View File

@ -12,7 +12,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 `package.json` and, if present, `npm-shrinkwrap.json`.
data back to `package.json`, `package-lock.json`, and, if present, `npm-shrinkwrap.json`.
The `newversion` argument should be a valid semver string, a
valid second argument to [semver.inc](https://github.com/npm/node-semver#functions) (one of `patch`, `minor`, `major`,

View File

@ -93,7 +93,7 @@ npm is extremely configurable. It reads its configuration options from
* 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
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

View File

@ -68,7 +68,7 @@ Man pages are not installed on Windows systems.
### Cache
See `npm-cache(1)`. Cache files are stored in `~/.npm` on Posix, or
`~/npm-cache` on Windows.
`%AppData%/npm-cache` on Windows.
This is controlled by the `cache` configuration param.

View File

@ -136,6 +136,25 @@ on. Additionally, the diffs from these changes are human-readable and will
inform you of any changes npm has made to your `node_modules`, so you can notice
if any transitive dependencies were updated, hoisted, etc.
### Resolving lockfile conflicts
Occasionally, two separate npm install will create package locks that cause
merge conflicts in source control systems. As of `npm@5.7.0`, these conflicts
can be resolved by manually fixing any `package.json` conflicts, and then
running `npm install [--package-lock-only]` again. npm will automatically
resolve any conflicts for you and write a merged package lock that includes all
the dependencies from both branches in a reasonable tree. If
`--package-lock-only` is provided, it will do this without also modifying your
local `node_modules/`.
To make this process seamless on git, consider installing
[`npm-merge-driver`](https://npm.im/npm-merge-driver), which will teach git how
to do this itself without any user interaction. In short: `$ npx
npm-merge-driver install -g` will let you do this, and even works with
pre-`npm@5.7.0` versions of npm 5, albeit a bit more noisily. Note that if
`package.json` itself conflicts, you will have to resolve that by hand and run
`npm install` manually, even with the merge driver.
## SEE ALSO
* https://medium.com/@sdboyer/so-you-want-to-write-a-package-manager-4ae9c17d9527

View File

@ -120,6 +120,15 @@ transitive dependency of a non-optional dependency of the top level.
All optional dependencies should be included even if they're uninstallable
on the current platform.
#### requires
This is a mapping of module name to version. This is a list of everything
this module requires, regardless of where it will be installed. The version
should match via normal matching rules a dependency either in our
`dependencies` or in a level higher than us.
#### dependencies
The dependencies of this dependency, exactly as at the top level.
@ -128,5 +137,6 @@ The dependencies of this dependency, exactly as at the top level.
* npm-shrinkwrap(1)
* npm-shrinkwrap.json(5)
* npm-package-locks(5)
* package.json(5)
* npm-install(1)

View File

@ -11,11 +11,11 @@ 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.
If you plan to publish your package, the *most* important things in your
package.json are the name and version fields as they will be required. 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. If you don't
plan to publish your package, the name and version fields are optional.
The name is what your thing is called.
@ -44,11 +44,11 @@ A name can be optionally prefixed by a scope, e.g. `@myorg/mypackage`. See
## 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.
If you plan to publish your package, the *most* important things in your
package.json are the name and version fields as they will be required. 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. If you don't
plan to publish your package, the name and version fields are optional.
Version must be parseable by
[node-semver](https://github.com/isaacs/node-semver), which is bundled
@ -70,6 +70,10 @@ discover your package as it's listed in `npm search`.
The url to the project homepage.
Example:
"homepage": "https://github.com/owner/project#readme"
## bugs
The url to your project's issue tracker and / or the email address to which
@ -168,13 +172,15 @@ npm also sets a top-level "maintainers" field with your npm user info.
## files
The optional "files" field is an array of file patterns that describes
The optional `files` field is an array of file patterns that describes
the entries to be included when your package is installed as a
dependency. If the files array is omitted, everything except
automatically-excluded files will be included in your publish. 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 in this
section.).
dependency. File patterns follow a similar syntax to `.gitignore`, but
reversed: including a file, directory, or glob pattern (`*`, `**/*`, and such)
will make it so that file is included in the tarball when it's packed. Omitting
the field will make it default to `["*"]`, which means it will include all files.
Some special files and directories are also included or excluded regardless of
whether they exist in the `files` array (see below).
You can also provide a `.npmignore` file in the root of your package or
in subdirectories, which will keep files from being included. At the
@ -226,6 +232,12 @@ 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.
## browser
If your module is meant to be used client-side the browser field should be
used instead of the main field. This is helpful to hint users that it might
rely on primitives that aren't available in Node.js modules. (e.g. `window`)
## bin
A lot of packages have one or more executable files that they'd like to
@ -745,8 +757,8 @@ especially handy if you want to set the tag, registry or access, so that
you can ensure that a given package is not tagged with "latest", published
to the global public registry or that a scoped module is private by default.
Any config values can be overridden, but of course only "tag", "registry" and
"access" probably matter for the purposes of publishing.
Any config values can be overridden, but only "tag", "registry" and "access"
probably matter for the purposes of publishing.
See `npm-config(7)` to see the list of config options that can be
overridden.

View File

@ -115,7 +115,7 @@ Good:
## Whitespace
Put a single space in front of ( for anything other than a function call.
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

View File

@ -155,6 +155,15 @@ even for `GET` requests.
When "dev" or "development" and running local `npm shrinkwrap`,
`npm outdated`, or `npm update`, is an alias for `--dev`.
### audit
* Default: true
* Type: Boolean
When "true" submit audit reports alongside `npm install` runs to the default
registry and all registries configured for scopes. See the documentation
for npm-audit(1) for details on what is submitted.
### auth-type
* Default: `'legacy'`
@ -284,6 +293,9 @@ This is a list of CIDR address to be used when configuring limited access tokens
If false, never shows colors. If `"always"` then always shows colors.
If true, then only prints color codes for tty file descriptors.
This option can also be changed using the environment: colors are
disabled when the environment variable `NO_COLOR` is set to any value.
### depth
* Default: Infinity
@ -672,6 +684,13 @@ impact how lifecycle scripts are called.
The node version to use when checking a package's `engines` map.
### no-proxy
* Default: null
* Type: String or Array
A comma-separated string or an array of domain extensions that a proxy should not be used for.
### offline
* Default: false
@ -731,6 +750,10 @@ when publishing or changing package permissions with `npm access`.
If set to false, then ignore `package-lock.json` files when installing. This
will also prevent _writing_ `package-lock.json` if `save` is true.
When package package-locks are disabled, automatic pruning of extraneous
modules will also be disabled. To remove extraneous modules with
package-locks disabled use `npm prune`.
This option is an alias for `--shrinkwrap`.
### package-lock-only
@ -738,7 +761,7 @@ This option is an alias for `--shrinkwrap`.
* Default: false
* Type: Boolean
If set to true, it will update only the `package-json`,
If set to true, it will update only the `package-lock.json`,
instead of checking `node_modules` and downloading dependencies.
### parseable
@ -835,7 +858,7 @@ Remove failed installs.
### save
* Default: false
* Default: true
* Type: Boolean
Save installed packages to a package.json file as dependencies.

View File

@ -57,7 +57,7 @@ least, you need:
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.
well assumed that it's JavaScript.
It does not necessarily need to match your github repository name.

View File

@ -21,6 +21,10 @@ Set access level on published packages
Add a registry user account
### npm-audit(1)
Run a security audit
### npm-bin(1)
Display npm bin folder
@ -41,6 +45,10 @@ REMOVED
Manipulates packages cache
### npm-ci(1)
Install a project with a clean slate
### npm-completion(1)
Tab Completion for npm
@ -85,9 +93,17 @@ Search npm help documentation
Get help on npm
### npm-hook(1)
Manage registry hooks
### npm-init(1)
Interactively create a package.json file
create a package.json file
### npm-install-ci-test(1)
Install a project with a clean slate and run tests
### npm-install-test(1)

View File

@ -75,7 +75,7 @@ to `public` as if you had run `npm access public` after publishing.
### Publishing private scoped packages to the npm registry
To publish a private scoped package to the npm registry, you must have
an [npm Private Modules](https://www.npmjs.com/private-modules)
an [npm Private Modules](https://docs.npmjs.com/private-modules/intro)
account.
You can then publish the module with `npm publish` or `npm publish

View File

@ -20,6 +20,8 @@ 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
semver.valid(semver.coerce('v2')) // '2.0.0'
semver.valid(semver.coerce('42.6.7.9.3-alpha')) // '42.6.7'
```
As a command-line utility:
@ -52,6 +54,10 @@ Options:
-l --loose
Interpret versions and ranges loosely
-c --coerce
Coerce a string into SemVer if possible
(does not imply --loose)
Program exits successfully if any valid version satisfies
all supplied ranges, and prints all satisfying versions.
@ -364,3 +370,19 @@ satisfy the range.
If you want to know if a version satisfies or does not satisfy a
range, use the `satisfies(version, range)` function.
### Coercion
* `coerce(version)`: Coerces a string to semver if possible
This aims to provide a very forgiving translation of a non-semver
string to semver. It looks for the first digit in a string, and
consumes all remaining characters which satisfy at least a partial semver
(e.g., `1`, `1.2`, `1.2.3`) up to the max permitted length (256 characters).
Longer versions are simply truncated (`4.6.3.9.2-alpha2` becomes `4.6.3`).
All surrounding text is simply ignored (`v3.4 replaces v3.3.1` becomes `3.4.0`).
Only text which lacks digits will fail coercion (`version one` is not valid).
The maximum length for any semver component considered for coercion is 16 characters;
longer components will be ignored (`10000000000000000.4.7.4` becomes `4.7.4`).
The maximum value for any semver component is `Integer.MAX_SAFE_INTEGER || (2**53 - 1)`;
higher value components are invalid (`9999999999999999.4.7.4` is likely invalid).

View File

@ -107,10 +107,10 @@ transitive dependency of a non-optional dependency of the top level.
All optional dependencies should be included even if they're uninstallable
on the current platform.
#### from *(deprecated)*
#### from
This is a record of what specifier was used to originally install this
package. This should not be included in new `package-lock.json` files.
package. This should be used only for git dependencies.
#### requires

View File

@ -15,8 +15,8 @@
<p>This is just enough info to get you up and running.</p>
<p>Much more info available via <code>npm help</code> once it&#39;s installed.</p>
<h2 id="important">IMPORTANT</h2>
<p><strong>You need node v4 or higher to run this program.</strong></p>
<p>To install an old <strong>and unsupported</strong> version of npm that works on node v0.12
<p><strong>You need node v6 or higher to run this program.</strong></p>
<p>To install an old <strong>and unsupported</strong> version of npm that works on node v5
and prior, clone the git repo and dig through the old tags and branches.</p>
<p><strong>npm is configured to use npm, Inc.&#39;s public package registry at
<a href="https://registry.npmjs.org">https://registry.npmjs.org</a> by default.</strong></p>
@ -127,5 +127,5 @@ doubt tell you to put the output in a gist or email.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer"><a href="../doc/README.html">README</a> &mdash; npm@5.6.0</p>
<p id="footer"><a href="../doc/README.html">README</a> &mdash; npm@6.1.0</p>

View File

@ -86,5 +86,5 @@ with an HTTP 402 status code (logically enough), unless you use
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-access &mdash; npm@5.6.0</p>
<p id="footer">npm-access &mdash; npm@6.1.0</p>

View File

@ -81,5 +81,5 @@ username/password entry in legacy npm.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-adduser &mdash; npm@5.6.0</p>
<p id="footer">npm-adduser &mdash; npm@6.1.0</p>

88
deps/npm/html/doc/cli/npm-audit.html vendored Normal file
View File

@ -0,0 +1,88 @@
<!doctype html>
<html>
<title>npm-audit</title>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="../../static/style.css">
<link rel="canonical" href="https://www.npmjs.org/doc/cli/npm-audit.html">
<script async=true src="../../static/toc.js"></script>
<body>
<div id="wrapper">
<h1><a href="../cli/npm-audit.html">npm-audit</a></h1> <p>Run a security audit</p>
<h2 id="synopsis">SYNOPSIS</h2>
<pre><code>npm audit [--json]
npm audit fix [--force|--package-lock-only|--dry-run|--production|--only=dev]
</code></pre><h2 id="examples">EXAMPLES</h2>
<p>Scan your project for vulnerabilities and automatically install any compatible
updates to vulnerable dependencies:</p>
<pre><code>$ npm audit fix
</code></pre><p>Run <code>audit fix</code> without modifying <code>node_modules</code>, but still updating the
pkglock:</p>
<pre><code>$ npm audit fix --package-lock-only
</code></pre><p>Skip updating <code>devDependencies</code>:</p>
<pre><code>$ npm audit fix --only=prod
</code></pre><p>Have <code>audit fix</code> install semver-major updates to toplevel dependencies, not just
semver-compatible ones:</p>
<pre><code>$ npm audit fix --force
</code></pre><p>Do a dry run to get an idea of what <code>audit fix</code> will do, and <em>also</em> output
install information in JSON format:</p>
<pre><code>$ npm audit fix --dry-run --json
</code></pre><p>Scan your project for vulnerabilities and just show the details, without fixing
anything:</p>
<pre><code>$ npm audit
</code></pre><p>Get the detailed audit report in JSON format:</p>
<pre><code>$ npm audit --json
</code></pre><h2 id="description">DESCRIPTION</h2>
<p>The audit command submits a description of the dependencies configured in
your project to your default registry and asks for a report of known
vulnerabilities. The report returned includes instructions on how to act on
this information.</p>
<p>You can also have npm automatically fix the vulnerabilities by running <code>npm
audit fix</code>. Note that some vulnerabilities cannot be fixed automatically and
will require manual intervention or review. Also note that since <code>npm audit fix</code>
runs a full-fledged <code>npm install</code> under the hood, all configs that apply to the
installer will also apply to <code>npm install</code> -- so things like <code>npm audit fix
--package-lock-only</code> will work as expected.</p>
<h2 id="content-submitted">CONTENT SUBMITTED</h2>
<ul>
<li>npm_version</li>
<li>node_version</li>
<li>platform</li>
<li>node_env</li>
<li>A scrubbed version of your package-lock.json or npm-shrinkwrap.json</li>
</ul>
<h3 id="scrubbing">SCRUBBING</h3>
<p>In order to ensure that potentially sensitive information is not included in
the audit data bundle, some dependencies may have their names (and sometimes
versions) replaced with opaque non-reversible identifiers. It is done for
the following dependency types:</p>
<ul>
<li>Any module referencing a scope that is configured for a non-default
registry has its name scrubbed. (That is, a scope you did a <code>npm login --scope=@ourscope</code> for.)</li>
<li>All git dependencies have their names and specifiers scrubbed.</li>
<li>All remote tarball dependencies have their names and specifiers scrubbed.</li>
<li>All local directory and tarball dependencies have their names and specifiers scrubbed.</li>
</ul>
<p>The non-reversible identifiers are a sha256 of a session-specific UUID and the
value being replaced, ensuring a consistent value within the payload that is
different between runs.</p>
<h2 id="see-also">SEE ALSO</h2>
<ul>
<li><a href="../cli/npm-install.html">npm-install(1)</a></li>
<li><a href="../files/package-locks.html">package-locks(5)</a></li>
<li><a href="../misc/config.html">config(7)</a></li>
</ul>
</div>
<table border=0 cellspacing=0 cellpadding=0 id=npmlogo>
<tr><td style="width:180px;height:10px;background:rgb(237,127,127)" colspan=18>&nbsp;</td></tr>
<tr><td rowspan=4 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td><td style="width:40px;height:10px;background:#fff" colspan=4>&nbsp;</td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=4>&nbsp;</td><td style="width:40px;height:10px;background:#fff" colspan=4>&nbsp;</td><td rowspan=4 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td><td colspan=6 style="width:60px;height:10px;background:#fff">&nbsp;</td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=4>&nbsp;</td></tr>
<tr><td colspan=2 style="width:20px;height:30px;background:#fff" rowspan=3>&nbsp;</td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=3>&nbsp;</td><td style="width:10px;height:10px;background:#fff" rowspan=3>&nbsp;</td><td style="width:20px;height:10px;background:#fff" rowspan=4 colspan=2>&nbsp;</td><td style="width:10px;height:20px;background:rgb(237,127,127)" rowspan=2>&nbsp;</td><td style="width:10px;height:10px;background:#fff" rowspan=3>&nbsp;</td><td style="width:20px;height:10px;background:#fff" rowspan=3 colspan=2>&nbsp;</td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=3>&nbsp;</td><td style="width:10px;height:10px;background:#fff" rowspan=3>&nbsp;</td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=3>&nbsp;</td></tr>
<tr><td style="width:10px;height:10px;background:#fff" rowspan=2>&nbsp;</td></tr>
<tr><td style="width:10px;height:10px;background:#fff">&nbsp;</td></tr>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-audit &mdash; npm@6.1.0</p>

View File

@ -35,5 +35,5 @@
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-bin &mdash; npm@5.6.0</p>
<p id="footer">npm-bin &mdash; npm@6.1.0</p>

View File

@ -55,5 +55,5 @@ a <code>package.json</code> in the current folder and use the <code>name</code>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-bugs &mdash; npm@5.6.0</p>
<p id="footer">npm-bugs &mdash; npm@6.1.0</p>

View File

@ -40,5 +40,5 @@ directly, run:</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-build &mdash; npm@5.6.0</p>
<p id="footer">npm-build &mdash; npm@6.1.0</p>

View File

@ -31,5 +31,5 @@ install packages into the local space.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-bundle &mdash; npm@5.6.0</p>
<p id="footer">npm-bundle &mdash; npm@6.1.0</p>

View File

@ -89,5 +89,5 @@ verify</code>.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-cache &mdash; npm@5.6.0</p>
<p id="footer">npm-cache &mdash; npm@6.1.0</p>

64
deps/npm/html/doc/cli/npm-ci.html vendored Normal file
View File

@ -0,0 +1,64 @@
<!doctype html>
<html>
<title>npm-ci</title>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="../../static/style.css">
<link rel="canonical" href="https://www.npmjs.org/doc/cli/npm-ci.html">
<script async=true src="../../static/toc.js"></script>
<body>
<div id="wrapper">
<h1><a href="../cli/npm-ci.html">npm-ci</a></h1> <p>Install a project with a clean slate</p>
<h2 id="synopsis">SYNOPSIS</h2>
<pre><code>npm ci
</code></pre><h2 id="example">EXAMPLE</h2>
<p>Make sure you have a package-lock and an up-to-date install:</p>
<pre><code>$ cd ./my/npm/project
$ npm install
added 154 packages in 10s
$ ls | grep package-lock
</code></pre><p>Run <code>npm ci</code> in that project</p>
<pre><code>$ npm ci
added 154 packages in 5s
</code></pre><p>Configure Travis to build using <code>npm ci</code> instead of <code>npm install</code>:</p>
<pre><code># .travis.yml
install:
- npm ci
# keep the npm cache around to speed up installs
cache:
directories:
- &quot;$HOME/.npm&quot;
</code></pre><h2 id="description">DESCRIPTION</h2>
<p>This command is similar to <code><a href="../cli/npm-install.html">npm-install(1)</a></code>, except it&#39;s meant to be used in
automated environments such as test platforms, continuous integration, and
deployment. It can be significantly faster than a regular npm install by
skipping certain user-oriented features. It is also more strict than a regular
install, which can help catch errors or inconsistencies caused by the
incrementally-installed local environments of most npm users.</p>
<p>In short, the main differences between using <code>npm install</code> and <code>npm ci</code> are:</p>
<ul>
<li>The project <strong>must</strong> have an existing <code>package-lock.json</code> or <code>npm-shrinkwrap.json</code>.</li>
<li>If dependencies in the package lock do not match those in <code>package.json</code>, <code>npm ci</code> will exit with an error, instead of updating the package lock.</li>
<li><code>npm ci</code> can only install entire projects at a time: individual dependencies cannot be added with this command.</li>
<li>If a <code>node_modules</code> is already present, it will be automatically removed before <code>npm ci</code> begins its install.</li>
<li>It will never write to <code>package.json</code> or any of the package-locks: installs are essentially frozen.</li>
</ul>
<h2 id="see-also">SEE ALSO</h2>
<ul>
<li><a href="../cli/npm-install.html">npm-install(1)</a></li>
<li><a href="../files/npm-package-locks.html">npm-package-locks(5)</a></li>
</ul>
</div>
<table border=0 cellspacing=0 cellpadding=0 id=npmlogo>
<tr><td style="width:180px;height:10px;background:rgb(237,127,127)" colspan=18>&nbsp;</td></tr>
<tr><td rowspan=4 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td><td style="width:40px;height:10px;background:#fff" colspan=4>&nbsp;</td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=4>&nbsp;</td><td style="width:40px;height:10px;background:#fff" colspan=4>&nbsp;</td><td rowspan=4 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td><td colspan=6 style="width:60px;height:10px;background:#fff">&nbsp;</td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=4>&nbsp;</td></tr>
<tr><td colspan=2 style="width:20px;height:30px;background:#fff" rowspan=3>&nbsp;</td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=3>&nbsp;</td><td style="width:10px;height:10px;background:#fff" rowspan=3>&nbsp;</td><td style="width:20px;height:10px;background:#fff" rowspan=4 colspan=2>&nbsp;</td><td style="width:10px;height:20px;background:rgb(237,127,127)" rowspan=2>&nbsp;</td><td style="width:10px;height:10px;background:#fff" rowspan=3>&nbsp;</td><td style="width:20px;height:10px;background:#fff" rowspan=3 colspan=2>&nbsp;</td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=3>&nbsp;</td><td style="width:10px;height:10px;background:#fff" rowspan=3>&nbsp;</td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=3>&nbsp;</td></tr>
<tr><td style="width:10px;height:10px;background:#fff" rowspan=2>&nbsp;</td></tr>
<tr><td style="width:10px;height:10px;background:#fff">&nbsp;</td></tr>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-ci &mdash; npm@6.1.0</p>

View File

@ -43,5 +43,5 @@ completions based on the arguments.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-completion &mdash; npm@5.6.0</p>
<p id="footer">npm-completion &mdash; npm@6.1.0</p>

View File

@ -68,5 +68,5 @@ global config.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-config &mdash; npm@5.6.0</p>
<p id="footer">npm-config &mdash; npm@6.1.0</p>

View File

@ -61,5 +61,5 @@ result in new modules being installed.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-dedupe &mdash; npm@5.6.0</p>
<p id="footer">npm-dedupe &mdash; npm@6.1.0</p>

View File

@ -38,5 +38,5 @@ something like this:</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-deprecate &mdash; npm@5.6.0</p>
<p id="footer">npm-deprecate &mdash; npm@6.1.0</p>

View File

@ -88,5 +88,5 @@ begin with a number or the letter <code>v</code>.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-dist-tag &mdash; npm@5.6.0</p>
<p id="footer">npm-dist-tag &mdash; npm@6.1.0</p>

View File

@ -56,5 +56,5 @@ the current folder and use the <code>name</code> property.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-docs &mdash; npm@5.6.0</p>
<p id="footer">npm-docs &mdash; npm@6.1.0</p>

View File

@ -32,7 +32,7 @@ old versions of npm. Since npm is constantly improving, running <code>npm@latest
better than an old version.</p>
<p><code>npm doctor</code> verifies the following items in your environment, and if there are
any recommended changes, it will display them.</p>
<h3 id="-npm-ping-"><code>npm ping</code></h3>
<h3 id="npm-ping"><code>npm ping</code></h3>
<p>By default, npm installs from the primary npm registry, <code>registry.npmjs.org</code>.
<code>npm doctor</code> hits a special ping endpoint within the registry. This can also be
checked with <code>npm ping</code>. If this check fails, you may be using a proxy that
@ -42,7 +42,7 @@ HTTPS to <code>registry.npmjs.org</code>.</p>
what that is by running <code>npm config get registry</code>), and if you&#39;re using a
private registry that doesn&#39;t support the <code>/whoami</code> endpoint supported by the
primary registry, this check may fail.</p>
<h3 id="-npm-v-"><code>npm -v</code></h3>
<h3 id="npm-v"><code>npm -v</code></h3>
<p>While Node.js may come bundled with a particular version of npm, it&#39;s the
policy of the CLI team that we recommend all users run <code>npm@latest</code> if they
can. As the CLI is maintained by a small team of contributors, there are only
@ -50,21 +50,21 @@ resources for a single line of development, so npm&#39;s own long-term support
releases typically only receive critical security and regression fixes. The
team believes that the latest tested version of npm is almost always likely to
be the most functional and defect-free version of npm.</p>
<h3 id="-node-v-"><code>node -v</code></h3>
<h3 id="node-v"><code>node -v</code></h3>
<p>For most users, in most circumstances, the best version of Node will be the
latest long-term support (LTS) release. Those of you who want access to new
ECMAscript features or bleeding-edge changes to Node&#39;s standard library may be
running a newer version, and some of you may be required to run an older
version of Node because of enterprise change control policies. That&#39;s OK! But
in general, the npm team recommends that most users run Node.js LTS.</p>
<h3 id="-npm-config-get-registry-"><code>npm config get registry</code></h3>
<h3 id="npm-config-get-registry"><code>npm config get registry</code></h3>
<p>Some of you may be installing from private package registries for your project
or company. That&#39;s great! Others of you may be following tutorials or
StackOverflow questions in an effort to troubleshoot problems you may be
having. Sometimes, this may entail changing the registry you&#39;re pointing at.
This part of <code>npm doctor</code> just lets you, and maybe whoever&#39;s helping you with
support, know that you&#39;re not using the default registry.</p>
<h3 id="-which-git-"><code>which git</code></h3>
<h3 id="which-git"><code>which git</code></h3>
<p>While it&#39;s documented in the <a href="../../doc/README.html">README</a>, it may not be obvious that npm needs Git
installed to do many of the things that it does. Also, in some cases
especially on Windows you may have Git set up in such a way that it&#39;s not
@ -103,4 +103,4 @@ cache, you should probably run <code>npm cache clean</code> and reset the cache.
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-doctor &mdash; npm@5.6.0</p>
<p id="footer">npm-doctor &mdash; npm@6.1.0</p>

View File

@ -49,5 +49,5 @@ or <code>&quot;notepad&quot;</code> on Windows.</li>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-edit &mdash; npm@5.6.0</p>
<p id="footer">npm-edit &mdash; npm@6.1.0</p>

View File

@ -49,5 +49,5 @@ Windows</li>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-explore &mdash; npm@5.6.0</p>
<p id="footer">npm-explore &mdash; npm@6.1.0</p>

View File

@ -45,5 +45,5 @@ where the terms were found in the documentation.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-help-search &mdash; npm@5.6.0</p>
<p id="footer">npm-help-search &mdash; npm@6.1.0</p>

View File

@ -50,5 +50,5 @@ matches are equivalent to specifying a topic name.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-help &mdash; npm@5.6.0</p>
<p id="footer">npm-help &mdash; npm@6.1.0</p>

63
deps/npm/html/doc/cli/npm-hook.html vendored Normal file
View File

@ -0,0 +1,63 @@
<!doctype html>
<html>
<title>npm-hook</title>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="../../static/style.css">
<link rel="canonical" href="https://www.npmjs.org/doc/cli/npm-hook.html">
<script async=true src="../../static/toc.js"></script>
<body>
<div id="wrapper">
<h1><a href="../cli/npm-hook.html">npm-hook</a></h1> <p>Manage registry hooks</p>
<h2 id="synopsis">SYNOPSIS</h2>
<pre><code>npm hook ls [pkg]
npm hook add &lt;entity&gt; &lt;url&gt; &lt;secret&gt;
npm hook update &lt;id&gt; &lt;url&gt; [secret]
npm hook rm &lt;id&gt;
</code></pre><h2 id="example">EXAMPLE</h2>
<p>Add a hook to watch a package for changes:</p>
<pre><code>$ npm hook add lodash https://example.com/ my-shared-secret
</code></pre><p>Add a hook to watch packages belonging to the user <code>substack</code>:</p>
<pre><code>$ npm hook add ~substack https://example.com/ my-shared-secret
</code></pre><p>Add a hook to watch packages in the scope <code>@npm</code></p>
<pre><code>$ npm hook add @npm https://example.com/ my-shared-secret
</code></pre><p>List all your active hooks:</p>
<pre><code>$ npm hook ls
</code></pre><p>List your active hooks for the <code>lodash</code> package:</p>
<pre><code>$ npm hook ls lodash
</code></pre><p>Update an existing hook&#39;s url:</p>
<pre><code>$ npm hook update id-deadbeef https://my-new-website.here/
</code></pre><p>Remove a hook:</p>
<pre><code>$ npm hook rm id-deadbeef
</code></pre><h2 id="description">DESCRIPTION</h2>
<p>Allows you to manage <a href="http://blog.npmjs.org/post/145260155635/introducing-hooks-get-notifications-of-npm">npm
hooks</a>,
including adding, removing, listing, and updating.</p>
<p>Hooks allow you to configure URL endpoints that will be notified whenever a
change happens to any of the supported entity types. Three different types of
entities can be watched by hooks: packages, owners, and scopes.</p>
<p>To create a package hook, simply reference the package name.</p>
<p>To create an owner hook, prefix the owner name with <code>~</code> (as in, <code>~youruser</code>).</p>
<p>To create a scope hook, prefix the scope name with <code>@</code> (as in, <code>@yourscope</code>).</p>
<p>The hook <code>id</code> used by <code>update</code> and <code>rm</code> are the IDs listed in <code>npm hook ls</code> for
that particular hook.</p>
<p>The shared secret will be sent along to the URL endpoint so you can verify the
request came from your own configured hook.</p>
<h2 id="see-also">SEE ALSO</h2>
<ul>
<li><a href="http://blog.npmjs.org/post/145260155635/introducing-hooks-get-notifications-of-npm">&quot;Introducing Hooks&quot; blog post</a></li>
</ul>
</div>
<table border=0 cellspacing=0 cellpadding=0 id=npmlogo>
<tr><td style="width:180px;height:10px;background:rgb(237,127,127)" colspan=18>&nbsp;</td></tr>
<tr><td rowspan=4 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td><td style="width:40px;height:10px;background:#fff" colspan=4>&nbsp;</td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=4>&nbsp;</td><td style="width:40px;height:10px;background:#fff" colspan=4>&nbsp;</td><td rowspan=4 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td><td colspan=6 style="width:60px;height:10px;background:#fff">&nbsp;</td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=4>&nbsp;</td></tr>
<tr><td colspan=2 style="width:20px;height:30px;background:#fff" rowspan=3>&nbsp;</td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=3>&nbsp;</td><td style="width:10px;height:10px;background:#fff" rowspan=3>&nbsp;</td><td style="width:20px;height:10px;background:#fff" rowspan=4 colspan=2>&nbsp;</td><td style="width:10px;height:20px;background:rgb(237,127,127)" rowspan=2>&nbsp;</td><td style="width:10px;height:10px;background:#fff" rowspan=3>&nbsp;</td><td style="width:20px;height:10px;background:#fff" rowspan=3 colspan=2>&nbsp;</td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=3>&nbsp;</td><td style="width:10px;height:10px;background:#fff" rowspan=3>&nbsp;</td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=3>&nbsp;</td></tr>
<tr><td style="width:10px;height:10px;background:#fff" rowspan=2>&nbsp;</td></tr>
<tr><td style="width:10px;height:10px;background:#fff">&nbsp;</td></tr>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-hook &mdash; npm@6.1.0</p>

View File

@ -9,26 +9,44 @@
<body>
<div id="wrapper">
<h1><a href="../cli/npm-init.html">npm-init</a></h1> <p>Interactively create a package.json file</p>
<h1><a href="../cli/npm-init.html">npm-init</a></h1> <p>create a package.json file</p>
<h2 id="synopsis">SYNOPSIS</h2>
<pre><code>npm init [-f|--force|-y|--yes]
<pre><code>npm init [--force|-f|--yes|-y|--scope]
npm init &lt;@scope&gt; (same as `npx &lt;@scope&gt;/create`)
npm init [&lt;@scope&gt;/]&lt;name&gt; (same as `npx [&lt;@scope&gt;/]create-&lt;name&gt;`)
</code></pre><h2 id="examples">EXAMPLES</h2>
<p>Create a new React-based project using <a href="https://npm.im/create-react-app"><code>create-react-app</code></a>:</p>
<pre><code>$ npm init react-app ./my-react-app
</code></pre><p>Create a new <code>esm</code>-compatible package using <a href="https://npm.im/create-esm"><code>create-esm</code></a>:</p>
<pre><code>$ mkdir my-esm-lib &amp;&amp; cd my-esm-lib
$ npm init esm --yes
</code></pre><p>Generate a plain old package.json using legacy init:</p>
<pre><code>$ mkdir my-npm-pkg &amp;&amp; cd my-npm-pkg
$ git init
$ npm init
</code></pre><p>Generate it without having it ask any questions:</p>
<pre><code>$ npm init -y
</code></pre><h2 id="description">DESCRIPTION</h2>
<p>This will ask you a bunch of questions, and then write a package.json for you.</p>
<p>It attempts to make reasonable guesses about what you want things to be set to,
and then writes a package.json file with the options you&#39;ve selected.</p>
<p>If you already have a package.json file, it&#39;ll read that first, and default to
the options in there.</p>
<p>It is strictly additive, so it does not delete options from your package.json
without a really good reason to do so.</p>
<p>If you invoke it with <code>-f</code>, <code>--force</code>, <code>-y</code>, or <code>--yes</code>, it will use only
defaults and not prompt you for any options.</p>
<h2 id="configuration">CONFIGURATION</h2>
<h3 id="scope">scope</h3>
<p><code>npm init &lt;initializer&gt;</code> can be used to set up a new or existing npm package.</p>
<p><code>initializer</code> in this case is an npm package named <code>create-&lt;initializer&gt;</code>, which
will be installed by <a href="https://npm.im/npx"><code><a href="../cli/npx.html">npx(1)</a></code></a>, and then have its main bin
executed -- presumably creating or updating <code>package.json</code> and running any other
initialization-related operations.</p>
<p>The init command is transformed to a corresponding <code>npx</code> operation as follows:</p>
<ul>
<li>Default: none</li>
<li>Type: String</li>
<li><code>npm init foo</code> -&gt; <code>npx create-foo</code></li>
<li><code>npm init @usr/foo</code> -&gt; <code>npx @usr/create-foo</code></li>
<li><code>npm init @usr</code> -&gt; <code>npx @usr/create</code></li>
</ul>
<p>The scope under which the new module should be created.</p>
<p>Any additional options will be passed directly to the command, so <code>npm init foo
--hello</code> will map to <code>npx create-foo --hello</code>.</p>
<p>If the initializer is omitted (by just calling <code>npm init</code>), init will fall back
to legacy init behavior. It will ask you a bunch of questions, and then write a
package.json for you. It will attempt to make reasonable guesses based on
existing fields, dependencies, and options selected. It is strictly additive, so
it will keep any fields and values that were already set. You can also use
<code>-y</code>/<code>--yes</code> to skip the questionnaire altogether. If you pass <code>--scope</code>, it
will create a scoped package.</p>
<h2 id="see-also">SEE ALSO</h2>
<ul>
<li><a href="https://github.com/isaacs/init-package-json">https://github.com/isaacs/init-package-json</a></li>
@ -48,5 +66,5 @@ defaults and not prompt you for any options.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-init &mdash; npm@5.6.0</p>
<p id="footer">npm-init &mdash; npm@6.1.0</p>

View File

@ -0,0 +1,36 @@
<!doctype html>
<html>
<title>npm-install-ci-test</title>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="../../static/style.css">
<link rel="canonical" href="https://www.npmjs.org/doc/cli/npm-install-ci-test.html">
<script async=true src="../../static/toc.js"></script>
<body>
<div id="wrapper">
<h1>npm <a href="../cli/install-ci-test.html">install-ci-test</a></h1> <p>Install a project with a clean slate and run tests</p>
<h2 id="synopsis">SYNOPSIS</h2>
<pre><code>npm install-ci-test
alias: npm cit
</code></pre><h2 id="description">DESCRIPTION</h2>
<p>This command runs an <code>npm ci</code> followed immediately by an <code>npm test</code>.</p>
<h2 id="see-also">SEE ALSO</h2>
<ul>
<li><a href="../cli/npm-ci.html">npm-ci(1)</a></li>
<li><a href="../cli/npm-test.html">npm-test(1)</a></li>
</ul>
</div>
<table border=0 cellspacing=0 cellpadding=0 id=npmlogo>
<tr><td style="width:180px;height:10px;background:rgb(237,127,127)" colspan=18>&nbsp;</td></tr>
<tr><td rowspan=4 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td><td style="width:40px;height:10px;background:#fff" colspan=4>&nbsp;</td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=4>&nbsp;</td><td style="width:40px;height:10px;background:#fff" colspan=4>&nbsp;</td><td rowspan=4 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td><td colspan=6 style="width:60px;height:10px;background:#fff">&nbsp;</td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=4>&nbsp;</td></tr>
<tr><td colspan=2 style="width:20px;height:30px;background:#fff" rowspan=3>&nbsp;</td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=3>&nbsp;</td><td style="width:10px;height:10px;background:#fff" rowspan=3>&nbsp;</td><td style="width:20px;height:10px;background:#fff" rowspan=4 colspan=2>&nbsp;</td><td style="width:10px;height:20px;background:rgb(237,127,127)" rowspan=2>&nbsp;</td><td style="width:10px;height:10px;background:#fff" rowspan=3>&nbsp;</td><td style="width:20px;height:10px;background:#fff" rowspan=3 colspan=2>&nbsp;</td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=3>&nbsp;</td><td style="width:10px;height:10px;background:#fff" rowspan=3>&nbsp;</td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=3>&nbsp;</td></tr>
<tr><td style="width:10px;height:10px;background:#fff" rowspan=2>&nbsp;</td></tr>
<tr><td style="width:10px;height:10px;background:#fff">&nbsp;</td></tr>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-install-ci-test &mdash; npm@6.1.0</p>

View File

@ -42,5 +42,5 @@ takes exactly the same arguments as <code>npm install</code>.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-install-test &mdash; npm@5.6.0</p>
<p id="footer">npm-install-test &mdash; npm@6.1.0</p>

View File

@ -54,6 +54,10 @@ after packing it up into a tarball (b).</p>
<p> With the <code>--production</code> flag (or when the <code>NODE_ENV</code> environment variable
is set to <code>production</code>), npm will not install modules listed in
<code>devDependencies</code>.</p>
<blockquote>
<p>NOTE: The <code>--production</code> flag has no particular meaning when adding a
dependency to a project.</p>
</blockquote>
</li>
<li><p><code>npm install &lt;folder&gt;</code>:</p>
<p> Install the package in the directory as a symlink in the current project.
@ -281,11 +285,14 @@ being installed.</p>
<p>The <code>--no-shrinkwrap</code> argument, which will ignore an available
package lock or shrinkwrap file and use the package.json instead.</p>
<p>The <code>--no-package-lock</code> argument will prevent npm from creating a
<code>package-lock.json</code> file.</p>
<code>package-lock.json</code> file. When running with package-lock&#39;s disabled npm
will not automatically prune your node modules when installing.</p>
<p>The <code>--nodedir=/path/to/node/source</code> argument will allow npm to find the
node source code so that npm can compile native modules.</p>
<p>The <code>--only={prod[uction]|dev[elopment]}</code> argument will cause either only
<code>devDependencies</code> or only non-<code>devDependencies</code> to be installed regardless of the <code>NODE_ENV</code>.</p>
<p>The <code>--no-audit</code> argument can be used to disable sending of audit reports to
the configured registries. See <code><a href="../cli/npm-audit.html">npm-audit(1)</a></code> for details on what is sent.</p>
<p>See <code><a href="../misc/npm-config.html">npm-config(7)</a></code>. Many of the configuration params have some
effect on installation, since that&#39;s most of what npm does.</p>
<h2 id="algorithm">ALGORITHM</h2>
@ -344,6 +351,7 @@ affects a real use-case, it will be investigated.</p>
<ul>
<li><a href="../files/npm-folders.html">npm-folders(5)</a></li>
<li><a href="../cli/npm-update.html">npm-update(1)</a></li>
<li><a href="../cli/npm-audit.html">npm-audit(1)</a></li>
<li><a href="../cli/npm-link.html">npm-link(1)</a></li>
<li><a href="../cli/npm-rebuild.html">npm-rebuild(1)</a></li>
<li><a href="../misc/npm-scripts.html">npm-scripts(7)</a></li>
@ -369,5 +377,5 @@ affects a real use-case, it will be investigated.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-install &mdash; npm@5.6.0</p>
<p id="footer">npm-install &mdash; npm@6.1.0</p>

View File

@ -74,5 +74,5 @@ include that scope, e.g.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-link &mdash; npm@5.6.0</p>
<p id="footer">npm-link &mdash; npm@6.1.0</p>

View File

@ -51,5 +51,5 @@ it takes precedence.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-logout &mdash; npm@5.6.0</p>
<p id="footer">npm-logout &mdash; npm@6.1.0</p>

View File

@ -21,7 +21,7 @@ installed, as well as their dependencies, in a tree-structure.</p>
limit the results to only the paths to the packages named. Note that
nested packages will <em>also</em> show the paths to the specified packages.
For example, running <code>npm ls promzard</code> in npm&#39;s source tree will show:</p>
<pre><code>npm@5.6.0 /path/to/npm
<pre><code>npm@6.1.0 /path/to/npm
└─┬ init-package-json@0.0.4
└── promzard@0.1.5
</code></pre><p>It will print out extraneous, missing, and invalid packages.</p>
@ -68,7 +68,7 @@ project.</p>
<li>Default: false</li>
</ul>
<p>Display only the dependency tree for packages in <code>dependencies</code>.</p>
<h3 id="dev">dev</h3>
<h3 id="dev-development">dev / development</h3>
<ul>
<li>Type: Boolean</li>
<li>Default: false</li>
@ -110,5 +110,5 @@ project.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-ls &mdash; npm@5.6.0</p>
<p id="footer">npm-ls &mdash; npm@6.1.0</p>

View File

@ -32,6 +32,8 @@ always be seeing only top-level dependencies that are outdated.</li>
<li><code>package type</code> (when using <code>--long</code> / <code>-l</code>) tells you whether this package is
a <code>dependency</code> or a <code>devDependency</code>. Packages not included in <code>package.json</code>
are always marked <code>dependencies</code>.</li>
<li>Red means there&#39;s a newer version matching your semver requirements, so you should update now.</li>
<li>Yellow indicates that there&#39;s a newer version above your semver requirements (usually new major, or new 0.x minor) so proceed with caution.</li>
</ul>
<h3 id="an-example">An example</h3>
<pre><code>$ npm outdated
@ -58,10 +60,9 @@ The installed committish might satisfy the dependency specifier (if it&#39;s
something immutable, like a commit SHA), or it might not, so <code>npm outdated</code> and
<code>npm update</code> have to fetch Git repos to check. This is why currently doing a
reinstall of a Git dependency always forces a new clone and install.</li>
<li><code>npm@3.5.2</code> is marked as &quot;wanted&quot;, but &quot;latest&quot; is <code>npm@3.5.1</code> because npm
uses dist-tags to manage its <code>latest</code> and <code>next</code> release channels. <code>npm update</code>
will install the <em>newest</em> version, but <code>npm install npm</code> (with no semver range)
will install whatever&#39;s tagged as <code>latest</code>.</li>
<li><a href="mailto:`npm@3.5.2">`npm@3.5.2</a><code>is marked as &quot;wanted&quot;, but &quot;latest&quot; is</code><a href="mailto:npm@3.5.1">npm@3.5.1</a><code>because npm
uses dist-tags to manage its</code>latest<code>and</code>next<code>release channels.</code>npm update<code>will install the _newest_ version, but</code>npm install npm<code>(with no semver range)
will install whatever&#39;s tagged as</code>latest`.</li>
<li><code>once</code> is just plain out of date. Reinstalling <code>node_modules</code> from scratch or
running <code>npm update</code> will bring it up to spec.</li>
</ul>
@ -116,5 +117,5 @@ project.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-outdated &mdash; npm@5.6.0</p>
<p id="footer">npm-outdated &mdash; npm@6.1.0</p>

View File

@ -54,5 +54,5 @@ with <code>--otp</code>.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-owner &mdash; npm@5.6.0</p>
<p id="footer">npm-owner &mdash; npm@6.1.0</p>

View File

@ -41,5 +41,5 @@ overwritten the second time.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-pack &mdash; npm@5.6.0</p>
<p id="footer">npm-pack &mdash; npm@6.1.0</p>

View File

@ -36,5 +36,5 @@ If it works it will output something like:</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-ping &mdash; npm@5.6.0</p>
<p id="footer">npm-ping &mdash; npm@6.1.0</p>

View File

@ -38,5 +38,5 @@ to contain a package.json file unless <code>-g</code> is also specified.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-prefix &mdash; npm@5.6.0</p>
<p id="footer">npm-prefix &mdash; npm@6.1.0</p>

View File

@ -90,4 +90,4 @@ available on non npmjs.com registries.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-profile &mdash; npm@5.6.0</p>
<p id="footer">npm-profile &mdash; npm@6.1.0</p>

View File

@ -11,7 +11,7 @@
<h1><a href="../cli/npm-prune.html">npm-prune</a></h1> <p>Remove extraneous packages</p>
<h2 id="synopsis">SYNOPSIS</h2>
<pre><code>npm prune [[&lt;@scope&gt;/]&lt;pkg&gt;...] [--production]
<pre><code>npm prune [[&lt;@scope&gt;/]&lt;pkg&gt;...] [--production] [--dry-run] [--json]
</code></pre><h2 id="description">DESCRIPTION</h2>
<p>This command removes &quot;extraneous&quot; packages. If a package name is
provided, then only packages matching one of the supplied names are
@ -20,8 +20,16 @@ removed.</p>
package&#39;s dependencies list.</p>
<p>If the <code>--production</code> flag is specified or the <code>NODE_ENV</code> environment
variable is set to <code>production</code>, this command will remove the packages
specified in your <code>devDependencies</code>. Setting <code>--production=false</code> will
specified in your <code>devDependencies</code>. Setting <code>--no-production</code> will
negate <code>NODE_ENV</code> being set to <code>production</code>.</p>
<p>If the <code>--dry-run</code> flag is used then no changes will actually be made.</p>
<p>If the <code>--json</code> flag is used then the changes <code>npm prune</code> made (or would
have made with <code>--dry-run</code>) are printed as a JSON object.</p>
<p>In normal operation with package-locks enabled, extraneous modules are
pruned automatically when modules are installed and you&#39;ll only need
this command with the <code>--production</code> flag.</p>
<p>If you&#39;ve disabled package-locks then extraneous modules will not be removed
and it&#39;s up to you to run <code>npm prune</code> from time-to-time to remove them.</p>
<h2 id="see-also">SEE ALSO</h2>
<ul>
<li><a href="../cli/npm-uninstall.html">npm-uninstall(1)</a></li>
@ -40,5 +48,5 @@ negate <code>NODE_ENV</code> being set to <code>production</code>.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-prune &mdash; npm@5.6.0</p>
<p id="footer">npm-prune &mdash; npm@6.1.0</p>

View File

@ -85,5 +85,5 @@ packs them into a tarball to be uploaded to the registry.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-publish &mdash; npm@5.6.0</p>
<p id="footer">npm-publish &mdash; npm@6.1.0</p>

View File

@ -35,5 +35,5 @@ the new binary.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-rebuild &mdash; npm@5.6.0</p>
<p id="footer">npm-rebuild &mdash; npm@6.1.0</p>

View File

@ -41,5 +41,5 @@ a <code>package.json</code> in the current folder and use the <code>name</code>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-repo &mdash; npm@5.6.0</p>
<p id="footer">npm-repo &mdash; npm@6.1.0</p>

View File

@ -53,5 +53,5 @@ behavior will be accompanied by an increase in major version number</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-restart &mdash; npm@5.6.0</p>
<p id="footer">npm-restart &mdash; npm@6.1.0</p>

View File

@ -35,5 +35,5 @@
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-root &mdash; npm@5.6.0</p>
<p id="footer">npm-root &mdash; npm@6.1.0</p>

View File

@ -59,6 +59,9 @@ not found in the <code>PATH</code>.</p>
<p>If you try to run a script without having a <code>node_modules</code> directory and it fails,
you will be given a warning to run <code>npm install</code>, just in case you&#39;ve forgotten.</p>
<p>You can use the <code>--silent</code> flag to prevent showing <code>npm ERR!</code> output on error.</p>
<p>You can use the <code>--if-present</code> flag to avoid exiting with a non-zero exit code
when the script is undefined. This lets you run potentially undefined scripts
without breaking the execution chain.</p>
<h2 id="see-also">SEE ALSO</h2>
<ul>
<li><a href="../misc/npm-scripts.html">npm-scripts(7)</a></li>
@ -80,5 +83,5 @@ you will be given a warning to run <code>npm install</code>, just in case you&#3
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-run-script &mdash; npm@5.6.0</p>
<p id="footer">npm-run-script &mdash; npm@6.1.0</p>

View File

@ -109,5 +109,5 @@ setting.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-search &mdash; npm@5.6.0</p>
<p id="footer">npm-search &mdash; npm@6.1.0</p>

View File

@ -41,5 +41,5 @@ of package locks in npm, see <a href="../files/npm-package-locks.html">npm-packa
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-shrinkwrap &mdash; npm@5.6.0</p>
<p id="footer">npm-shrinkwrap &mdash; npm@6.1.0</p>

View File

@ -36,5 +36,5 @@ a vaguely positive way to show that you care.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-star &mdash; npm@5.6.0</p>
<p id="footer">npm-star &mdash; npm@6.1.0</p>

View File

@ -36,5 +36,5 @@ you will most certainly enjoy this command.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-stars &mdash; npm@5.6.0</p>
<p id="footer">npm-stars &mdash; npm@6.1.0</p>

View File

@ -39,5 +39,5 @@ more details.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-start &mdash; npm@5.6.0</p>
<p id="footer">npm-start &mdash; npm@6.1.0</p>

View File

@ -34,5 +34,5 @@
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-stop &mdash; npm@5.6.0</p>
<p id="footer">npm-stop &mdash; npm@6.1.0</p>

View File

@ -39,6 +39,9 @@ If performed on an organization name, will return a list of existing teams
under that organization. If performed on a team, it will instead return a list
of all users belonging to that particular team.</p>
</li>
<li><p>edit:
Edit a current team.</p>
</li>
</ul>
<h2 id="details">DETAILS</h2>
<p><code>npm team</code> always operates directly on the current registry, configurable from
@ -67,5 +70,5 @@ use the <code>npm access</code> command to grant or revoke the appropriate permi
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-team &mdash; npm@5.6.0</p>
<p id="footer">npm-team &mdash; npm@6.1.0</p>

View File

@ -36,5 +36,5 @@
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-test &mdash; npm@5.6.0</p>
<p id="footer">npm-test &mdash; npm@6.1.0</p>

View File

@ -73,4 +73,4 @@ This will NOT accept the truncated token found in <code>npm token list</code> ou
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-token &mdash; npm@5.6.0</p>
<p id="footer">npm-token &mdash; npm@6.1.0</p>

View File

@ -63,5 +63,5 @@ npm uninstall lodash --no-save
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-uninstall &mdash; npm@5.6.0</p>
<p id="footer">npm-uninstall &mdash; npm@6.1.0</p>

View File

@ -29,7 +29,7 @@ package again, a new version number must be used.</p>
<p>With the default registry (<code>registry.npmjs.org</code>), unpublish is
only allowed with versions published in the last 24 hours. If you
are trying to unpublish a version published longer ago than that,
contact support@npmjs.com.</p>
contact <a href="mailto:support@npmjs.com">support@npmjs.com</a>.</p>
<p>The scope is optional and follows the usual rules for <code><a href="../misc/npm-scope.html">npm-scope(7)</a></code>.</p>
<h2 id="see-also">SEE ALSO</h2>
<ul>
@ -51,5 +51,5 @@ contact support@npmjs.com.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-unpublish &mdash; npm@5.6.0</p>
<p id="footer">npm-unpublish &mdash; npm@6.1.0</p>

View File

@ -24,12 +24,15 @@ as well.</p>
packages.</p>
<p>If no package name is specified, all packages in the specified location (global
or local) will be updated.</p>
<p>As of <code>npm@2.6.1</code>, the <code>npm update</code> will only inspect top-level packages.
Prior versions of <code>npm</code> would also recursively inspect all dependencies.
To get the old behavior, use <code>npm --depth 9999 update</code>.</p>
<p>As of <a href="mailto:`npm@2.6.1">`npm@2.6.1</a><code>, the</code>npm update<code>will only inspect top-level packages.
Prior versions of</code>npm<code>would also recursively inspect all dependencies.
To get the old behavior, use</code>npm --depth 9999 update`.</p>
<p>As of <a href="mailto:`npm@5.0.0">`npm@5.0.0</a><code>, the</code>npm update<code>will change</code>package.json<code>to save the
new version as the minimum required dependency. To get the old behavior,
use</code>npm update --no-save`.</p>
<h2 id="examples">EXAMPLES</h2>
<p>IMPORTANT VERSION NOTE: these examples assume <code>npm@2.6.1</code> or later. For
older versions of <code>npm</code>, you must specify <code>--depth 0</code> to get the behavior
<p>IMPORTANT VERSION NOTE: these examples assume <a href="mailto:`npm@2.6.1">`npm@2.6.1</a><code>or later. For
older versions of</code>npm<code>, you must specify</code>--depth 0` to get the behavior
described below.</p>
<p>For the examples below, assume that the current package is <code>app</code> and it depends
on dependencies, <code>dep1</code> (<code>dep2</code>, .. etc.). The published versions of <code>dep1</code> are:</p>
@ -52,45 +55,28 @@ on dependencies, <code>dep1</code> (<code>dep2</code>, .. etc.). The published
<pre><code>&quot;dependencies&quot;: {
&quot;dep1&quot;: &quot;^1.1.1&quot;
}
</code></pre><p>Then <code>npm update</code> will install <code>dep1@1.2.2</code>, because <code>1.2.2</code> is <code>latest</code> and
<code>1.2.2</code> satisfies <code>^1.1.1</code>.</p>
</code></pre><p>Then <code>npm update</code> will install <a href="mailto:`dep1@1.2.2">`dep1@1.2.2</a><code>, because</code>1.2.2<code>is</code>latest<code>and</code>1.2.2<code>satisfies</code>^1.1.1`.</p>
<h3 id="tilde-dependencies">Tilde Dependencies</h3>
<p>However, if <code>app</code>&#39;s <code>package.json</code> contains:</p>
<pre><code>&quot;dependencies&quot;: {
&quot;dep1&quot;: &quot;~1.1.1&quot;
}
</code></pre><p>In this case, running <code>npm update</code> will install <code>dep1@1.1.2</code>. Even though the <code>latest</code>
tag points to <code>1.2.2</code>, this version does not satisfy <code>~1.1.1</code>, which is equivalent
to <code>&gt;=1.1.1 &lt;1.2.0</code>. So the highest-sorting version that satisfies <code>~1.1.1</code> is used,
which is <code>1.1.2</code>.</p>
</code></pre><p>In this case, running <code>npm update</code> will install <a href="mailto:`dep1@1.1.2">`dep1@1.1.2</a><code>. Even though the</code>latest<code>tag points to</code>1.2.2<code>, this version does not satisfy</code>~1.1.1<code>, which is equivalent
to</code>&gt;=1.1.1 &lt;1.2.0<code>. So the highest-sorting version that satisfies</code>~1.1.1<code>is used,
which is</code>1.1.2`.</p>
<h3 id="caret-dependencies-below-1-0-0">Caret Dependencies below 1.0.0</h3>
<p>Suppose <code>app</code> has a caret dependency on a version below <code>1.0.0</code>, for example:</p>
<pre><code>&quot;dependencies&quot;: {
&quot;dep1&quot;: &quot;^0.2.0&quot;
}
</code></pre><p><code>npm update</code> will install <code>dep1@0.2.0</code>, because there are no other
versions which satisfy <code>^0.2.0</code>.</p>
</code></pre><p><code>npm update</code> will install <a href="mailto:`dep1@0.2.0">`dep1@0.2.0</a><code>, because there are no other
versions which satisfy</code>^0.2.0`.</p>
<p>If the dependence were on <code>^0.4.0</code>:</p>
<pre><code>&quot;dependencies&quot;: {
&quot;dep1&quot;: &quot;^0.4.0&quot;
}
</code></pre><p>Then <code>npm update</code> will install <code>dep1@0.4.1</code>, because that is the highest-sorting
version that satisfies <code>^0.4.0</code> (<code>&gt;= 0.4.0 &lt;0.5.0</code>)</p>
<h3 id="recording-updates-with-save-">Recording Updates with <code>--save</code></h3>
<p>When you want to update a package and save the new version as
the minimum required dependency in <code>package.json</code>, you can use
<code>npm update -S</code> or <code>npm update --save</code>. For example if
<code>package.json</code> contains:</p>
<pre><code>&quot;dependencies&quot;: {
&quot;dep1&quot;: &quot;^1.1.1&quot;
}
</code></pre><p>Then <code>npm update --save</code> will install <code>dep1@1.2.2</code> (i.e., <code>latest</code>),
and <code>package.json</code> will be modified:</p>
<pre><code>&quot;dependencies&quot;: {
&quot;dep1&quot;: &quot;^1.2.2&quot;
}
</code></pre><p>Note that <code>npm</code> will only write an updated version to <code>package.json</code>
if it installs a new package.</p>
</code></pre><p>Then <code>npm update</code> will install <a href="mailto:`dep1@0.4.1">`dep1@0.4.1</a><code>, because that is the highest-sorting
version that satisfies</code>^0.4.0<code>(</code>&gt;= 0.4.0 &lt;0.5.0`)</p>
<h3 id="updating-globally-installed-packages">Updating Globally-Installed Packages</h3>
<p><code>npm update -g</code> will apply the <code>update</code> action to each globally installed
package that is <code>outdated</code> -- that is, has a version that is different from
@ -118,5 +104,5 @@ be <em>downgraded</em>.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-update &mdash; npm@5.6.0</p>
<p id="footer">npm-update &mdash; npm@6.1.0</p>

View File

@ -18,7 +18,7 @@
&#39;npm ls&#39; to inspect current package/dependency versions
</code></pre><h2 id="description">DESCRIPTION</h2>
<p>Run this in a package directory to bump the version and write the new
data back to <code>package.json</code> and, if present, <code>npm-shrinkwrap.json</code>.</p>
data back to <code>package.json</code>, <code>package-lock.json</code>, and, if present, <code>npm-shrinkwrap.json</code>.</p>
<p>The <code>newversion</code> argument should be a valid semver string, a
valid second argument to <a href="https://github.com/npm/node-semver#functions">semver.inc</a> (one of <code>patch</code>, <code>minor</code>, <code>major</code>,
<code>prepatch</code>, <code>preminor</code>, <code>premajor</code>, <code>prerelease</code>), or <code>from-git</code>. In the second case,
@ -120,5 +120,5 @@ to the same value as the current version.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-version &mdash; npm@5.6.0</p>
<p id="footer">npm-version &mdash; npm@6.1.0</p>

View File

@ -86,5 +86,5 @@ the field name.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-view &mdash; npm@5.6.0</p>
<p id="footer">npm-view &mdash; npm@6.1.0</p>

View File

@ -33,5 +33,5 @@
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-whoami &mdash; npm@5.6.0</p>
<p id="footer">npm-whoami &mdash; npm@6.1.0</p>

View File

@ -13,7 +13,7 @@
<h2 id="synopsis">SYNOPSIS</h2>
<pre><code>npm &lt;command&gt; [args]
</code></pre><h2 id="version">VERSION</h2>
<p>5.6.0</p>
<p>6.1.0</p>
<h2 id="description">DESCRIPTION</h2>
<p>npm is the package manager for the Node JavaScript platform. It puts
modules in place so that node can find them, and manages dependency
@ -79,7 +79,7 @@ Use the <code>npm publish</code> command to upload your code to the registry.</l
<ul>
<li>Command line switches:<br>Set a config with <code>--key val</code>. All keys take a value, even if they
are booleans (the config parser doesn&#39;t know what the options are at
the time of parsing.) If no value is provided, then the option is set
the time of parsing). If no value is provided, then the option is set
to boolean <code>true</code>.</li>
<li>Environment Variables:<br>Set any config by prefixing the name in an environment variable with
<code>npm_config_</code>. For example, <code>export npm_config_key=val</code>.</li>
@ -126,7 +126,7 @@ will no doubt tell you to put the output in a gist or email.</p>
<p><a href="http://blog.izs.me/">Isaac Z. Schlueter</a> ::
<a href="https://github.com/isaacs/">isaacs</a> ::
<a href="http://twitter.com/izs">@izs</a> ::
<a href="&#109;&#97;&#105;&#x6c;&#x74;&#x6f;&#x3a;&#105;&#x40;&#105;&#x7a;&#115;&#46;&#109;&#x65;">&#105;&#x40;&#105;&#x7a;&#115;&#46;&#109;&#x65;</a></p>
<a href="mailto:&#x69;&#x40;&#105;&#122;&#115;&#46;&#109;&#x65;">&#x69;&#x40;&#105;&#122;&#115;&#46;&#109;&#x65;</a></p>
<h2 id="see-also">SEE ALSO</h2>
<ul>
<li><a href="../cli/npm-help.html">npm-help(1)</a></li>
@ -150,5 +150,5 @@ will no doubt tell you to put the output in a gist or email.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm &mdash; npm@5.6.0</p>
<p id="footer">npm &mdash; npm@6.1.0</p>

View File

@ -58,7 +58,7 @@ when you run <code>npm test</code>.)</p>
<p>Man pages are not installed on Windows systems.</p>
<h3 id="cache">Cache</h3>
<p>See <code><a href="../cli/npm-cache.html">npm-cache(1)</a></code>. Cache files are stored in <code>~/.npm</code> on Posix, or
<code>~/npm-cache</code> on Windows.</p>
<code>%AppData%/npm-cache</code> on Windows.</p>
<p>This is controlled by the <code>cache</code> configuration param.</p>
<h3 id="temp-files">Temp Files</h3>
<p>Temporary files are stored by default in the folder specified by the
@ -135,15 +135,15 @@ highest level possible, below the localized &quot;target&quot; folder.</p>
`-- baz (1.2.3) &lt;---[D]
`-- node_modules
`-- quux (3.2.0) &lt;---[E]
</code></pre><p>Since foo depends directly on <code>bar@1.2.3</code> and <code>baz@1.2.3</code>, those are
installed in foo&#39;s <code>node_modules</code> folder.</p>
</code></pre><p>Since foo depends directly on <a href="mailto:`bar@1.2.3">`bar@1.2.3</a><code>and</code><a href="mailto:baz@1.2.3">baz@1.2.3</a><code>, those are
installed in foo&#39;s</code>node_modules` folder.</p>
<p>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&#39;s dependency on <code>blerg@1.x</code>,
parent installation of blerg satisfies bar&#39;s dependency on <a href="mailto:`blerg@1.x">`blerg@1.x</a>`,
it does not install another copy under [B].</p>
<p>Bar [B] also has dependencies on baz and asdf, so those are installed in
bar&#39;s <code>node_modules</code> folder. Because it depends on <code>baz@2.x</code>, it cannot
re-use the <code>baz@1.2.3</code> installed in the parent <code>node_modules</code> folder [D],
bar&#39;s <code>node_modules</code> folder. Because it depends on <a href="mailto:`baz@2.x">`baz@2.x</a><code>, it cannot
re-use the</code><a href="mailto:baz@1.2.3">baz@1.2.3</a><code>installed in the parent</code>node_modules` folder [D],
and must install its own copy [C].</p>
<p>Underneath bar, the <code>baz -&gt; quux -&gt; bar</code> dependency creates a cycle.
However, because bar is already in quux&#39;s ancestry [B], it does not
@ -181,5 +181,5 @@ cannot be found elsewhere. See <code><a href="../files/package.json.html">packa
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-folders &mdash; npm@5.6.0</p>
<p id="footer">npm-folders &mdash; npm@6.1.0</p>

View File

@ -58,7 +58,7 @@ when you run <code>npm test</code>.)</p>
<p>Man pages are not installed on Windows systems.</p>
<h3 id="cache">Cache</h3>
<p>See <code><a href="../cli/npm-cache.html">npm-cache(1)</a></code>. Cache files are stored in <code>~/.npm</code> on Posix, or
<code>~/npm-cache</code> on Windows.</p>
<code>%AppData%/npm-cache</code> on Windows.</p>
<p>This is controlled by the <code>cache</code> configuration param.</p>
<h3 id="temp-files">Temp Files</h3>
<p>Temporary files are stored by default in the folder specified by the
@ -135,15 +135,15 @@ highest level possible, below the localized &quot;target&quot; folder.</p>
`-- baz (1.2.3) &lt;---[D]
`-- node_modules
`-- quux (3.2.0) &lt;---[E]
</code></pre><p>Since foo depends directly on <code>bar@1.2.3</code> and <code>baz@1.2.3</code>, those are
installed in foo&#39;s <code>node_modules</code> folder.</p>
</code></pre><p>Since foo depends directly on <a href="mailto:`bar@1.2.3">`bar@1.2.3</a><code>and</code><a href="mailto:baz@1.2.3">baz@1.2.3</a><code>, those are
installed in foo&#39;s</code>node_modules` folder.</p>
<p>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&#39;s dependency on <code>blerg@1.x</code>,
parent installation of blerg satisfies bar&#39;s dependency on <a href="mailto:`blerg@1.x">`blerg@1.x</a>`,
it does not install another copy under [B].</p>
<p>Bar [B] also has dependencies on baz and asdf, so those are installed in
bar&#39;s <code>node_modules</code> folder. Because it depends on <code>baz@2.x</code>, it cannot
re-use the <code>baz@1.2.3</code> installed in the parent <code>node_modules</code> folder [D],
bar&#39;s <code>node_modules</code> folder. Because it depends on <a href="mailto:`baz@2.x">`baz@2.x</a><code>, it cannot
re-use the</code><a href="mailto:baz@1.2.3">baz@1.2.3</a><code>installed in the parent</code>node_modules` folder [D],
and must install its own copy [C].</p>
<p>Underneath bar, the <code>baz -&gt; quux -&gt; bar</code> dependency creates a cycle.
However, because bar is already in quux&#39;s ancestry [B], it does not
@ -181,5 +181,5 @@ cannot be found elsewhere. See <code><a href="../files/package.json.html">packa
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-folders &mdash; npm@5.6.0</p>
<p id="footer">npm-folders &mdash; npm@6.1.0</p>

View File

@ -16,11 +16,11 @@ file. It must be actual JSON, not just a JavaScript object literal.</p>
<p>A lot of the behavior described in this document is affected by the config
settings described in <code><a href="../misc/npm-config.html">npm-config(7)</a></code>.</p>
<h2 id="name">name</h2>
<p>The <em>most</em> important things in your package.json are the name and version fields.
Those are actually required, and your package won&#39;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.</p>
<p>If you plan to publish your package, the <em>most</em> important things in your
package.json are the name and version fields as they will be required. 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. If you don&#39;t
plan to publish your package, the name and version fields are optional.</p>
<p>The name is what your thing is called.</p>
<p>Some rules:</p>
<ul>
@ -45,11 +45,11 @@ already, before you get too attached to it. <a href="https://www.npmjs.com/">htt
<p>A name can be optionally prefixed by a scope, e.g. <code>@myorg/mypackage</code>. See
<code><a href="../misc/npm-scope.html">npm-scope(7)</a></code> for more detail.</p>
<h2 id="version">version</h2>
<p>The <em>most</em> important things in your package.json are the name and version fields.
Those are actually required, and your package won&#39;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.</p>
<p>If you plan to publish your package, the <em>most</em> important things in your
package.json are the name and version fields as they will be required. 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. If you don&#39;t
plan to publish your package, the name and version fields are optional.</p>
<p>Version must be parseable by
<a href="https://github.com/isaacs/node-semver">node-semver</a>, which is bundled
with npm as a dependency. (<code>npm install semver</code> to use it yourself.)</p>
@ -62,7 +62,9 @@ package, as it&#39;s listed in <code>npm search</code>.</p>
discover your package as it&#39;s listed in <code>npm search</code>.</p>
<h2 id="homepage">homepage</h2>
<p>The url to the project homepage.</p>
<h2 id="bugs">bugs</h2>
<p>Example:</p>
<pre><code>&quot;homepage&quot;: &quot;https://github.com/owner/project#readme&quot;
</code></pre><h2 id="bugs">bugs</h2>
<p>The url to your project&#39;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.</p>
@ -129,13 +131,14 @@ is an object with a &quot;name&quot; field and optionally &quot;url&quot; and &q
</code></pre><p>Both email and url are optional either way.</p>
<p>npm also sets a top-level &quot;maintainers&quot; field with your npm user info.</p>
<h2 id="files">files</h2>
<p>The optional &quot;files&quot; field is an array of file patterns that describes
<p>The optional <code>files</code> field is an array of file patterns that describes
the entries to be included when your package is installed as a
dependency. If the files array is omitted, everything except
automatically-excluded files will be included in your publish. 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 in this
section.).</p>
dependency. File patterns follow a similar syntax to <code>.gitignore</code>, but
reversed: including a file, directory, or glob pattern (<code>*</code>, <code>**/*</code>, and such)
will make it so that file is included in the tarball when it&#39;s packed. Omitting
the field will make it default to <code>[&quot;*&quot;]</code>, which means it will include all files.</p>
<p>Some special files and directories are also included or excluded regardless of
whether they exist in the <code>files</code> array (see below).</p>
<p>You can also provide a <code>.npmignore</code> file in the root of your package or
in subdirectories, which will keep files from being included. At the
root of your package it will not override the &quot;files&quot; field, but in
@ -179,6 +182,10 @@ That is, if your package is named <code>foo</code>, and a user installs it, and
<p>This should be a module ID relative to the root of your package folder.</p>
<p>For most modules, it makes the most sense to have a main script and often not
much else.</p>
<h2 id="browser">browser</h2>
<p>If your module is meant to be used client-side the browser field should be
used instead of the main field. This is helpful to hint users that it might
rely on primitives that aren&#39;t available in Node.js modules. (e.g. <code>window</code>)</p>
<h2 id="bin">bin</h2>
<p>A lot of packages have one or more executable files that they&#39;d like to
install into the PATH. npm makes this pretty easy (in fact, it uses this
@ -557,8 +564,8 @@ param at publish-time.</p>
especially handy if you want to set the tag, registry or access, so that
you can ensure that a given package is not tagged with &quot;latest&quot;, published
to the global public registry or that a scoped module is private by default.</p>
<p>Any config values can be overridden, but of course only &quot;tag&quot;, &quot;registry&quot; and
&quot;access&quot; probably matter for the purposes of publishing.</p>
<p>Any config values can be overridden, but only &quot;tag&quot;, &quot;registry&quot; and &quot;access&quot;
probably matter for the purposes of publishing.</p>
<p>See <code><a href="../misc/npm-config.html">npm-config(7)</a></code> to see the list of config options that can be
overridden.</p>
<h2 id="default-values">DEFAULT VALUES</h2>
@ -603,5 +610,5 @@ ignored.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">package.json &mdash; npm@5.6.0</p>
<p id="footer">package.json &mdash; npm@6.1.0</p>

View File

@ -53,7 +53,7 @@ registry, then a normal <code>npm install A</code> will install:</p>
<pre><code>A@0.1.0
`-- B@0.0.1
`-- C@0.0.1
</code></pre><p>However, if B@0.0.2 is published, then a fresh <code>npm install A</code> will
</code></pre><p>However, if <a href="mailto:B@0.0.2">B@0.0.2</a> is published, then a fresh <code>npm install A</code> will
install:</p>
<pre><code>A@0.1.0
`-- B@0.0.2
@ -61,7 +61,7 @@ install:</p>
</code></pre><p>assuming the new version did not modify B&#39;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&#39;s author and B&#39;s
could specify a dependency on <a href="mailto:B@0.0.1">B@0.0.1</a>. However, if A&#39;s author and B&#39;s
author are not the same person, there&#39;s no way for A&#39;s author to say
that he or she does not want to pull in newly published versions of C
when B hasn&#39;t changed at all.</p>
@ -125,6 +125,19 @@ package source to get the exact same dependency tree that you were developing
on. Additionally, the diffs from these changes are human-readable and will
inform you of any changes npm has made to your <code>node_modules</code>, so you can notice
if any transitive dependencies were updated, hoisted, etc.</p>
<h3 id="resolving-lockfile-conflicts">Resolving lockfile conflicts</h3>
<p>Occasionally, two separate npm install will create package locks that cause
merge conflicts in source control systems. As of <a href="mailto:`npm@5.7.0">`npm@5.7.0</a><code>, these conflicts
can be resolved by manually fixing any</code>package.json<code>conflicts, and then
running</code>npm install [--package-lock-only]<code>again. npm will automatically
resolve any conflicts for you and write a merged package lock that includes all
the dependencies from both branches in a reasonable tree. If</code>--package-lock-only<code>is provided, it will do this without also modifying your
local</code>node_modules/`.</p>
<p>To make this process seamless on git, consider installing
<a href="https://npm.im/npm-merge-driver"><code>npm-merge-driver</code></a>, which will teach git how
to do this itself without any user interaction. In short: <code>$ npx
npm-merge-driver install -g</code> will let you do this, and even works with
<a href="mailto:pre-`npm@5.7.0">pre-`npm@5.7.0</a><code>versions of npm 5, albeit a bit more noisily. Note that if</code>package.json<code>itself conflicts, you will have to resolve that by hand and run</code>npm install` manually, even with the merge driver.</p>
<h2 id="see-also">SEE ALSO</h2>
<ul>
<li><a href="https://medium.com/@sdboyer/so-you-want-to-write-a-package-manager-4ae9c17d9527">https://medium.com/@sdboyer/so-you-want-to-write-a-package-manager-4ae9c17d9527</a></li>
@ -145,4 +158,4 @@ if any transitive dependencies were updated, hoisted, etc.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-package-locks &mdash; npm@5.6.0</p>
<p id="footer">npm-package-locks &mdash; npm@6.1.0</p>

View File

@ -42,4 +42,4 @@ to the manual page for <a href="../files/package-lock.json.html">package-lock.js
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-shrinkwrap.json &mdash; npm@5.6.0</p>
<p id="footer">npm-shrinkwrap.json &mdash; npm@6.1.0</p>

Some files were not shown because too many files have changed in this diff Show More