404

[ Avaa Bypassed ]




Upload:

Command:

botdev@3.145.82.96: ~ $
.TH "NPM\-UPDATE" "1" "August 2020" "" ""
.SH "NAME"
\fBnpm-update\fR \- Update a package
.SS Synopsis
.P
.RS 2
.nf
npm update [\-g] [<pkg>\.\.\.]

aliases: up, upgrade
.fi
.RE
.SS Description
.P
This command will update all the packages listed to the latest version
(specified by the \fBtag\fP config), respecting semver\.
.P
It will also install missing packages\. As with all commands that install
packages, the \fB\-\-dev\fP flag will cause \fBdevDependencies\fP to be processed
as well\.
.P
If the \fB\-g\fP flag is specified, this command will update globally installed
packages\.
.P
If no package name is specified, all packages in the specified location (global
or local) will be updated\.
.P
As of \fBnpm@2\.6\.1\fP, the \fBnpm update\fP will only inspect top\-level packages\.
Prior versions of \fBnpm\fP would also recursively inspect all dependencies\.
To get the old behavior, use \fBnpm \-\-depth 9999 update\fP\|\.
.P
As of \fBnpm@5\.0\.0\fP, the \fBnpm update\fP will change \fBpackage\.json\fP to save the 
new version as the minimum required dependency\. To get the old behavior, 
use \fBnpm update \-\-no\-save\fP\|\.
.SS Example
.P
IMPORTANT VERSION NOTE: these examples assume \fBnpm@2\.6\.1\fP or later\.  For
older versions of \fBnpm\fP, you must specify \fB\-\-depth 0\fP to get the behavior
described below\.
.P
For the examples below, assume that the current package is \fBapp\fP and it depends
on dependencies, \fBdep1\fP (\fBdep2\fP, \.\. etc\.)\.  The published versions of \fBdep1\fP are:
.P
.RS 2
.nf
{
  "dist\-tags": { "latest": "1\.2\.2" },
  "versions": [
    "1\.2\.2",
    "1\.2\.1",
    "1\.2\.0",
    "1\.1\.2",
    "1\.1\.1",
    "1\.0\.0",
    "0\.4\.1",
    "0\.4\.0",
    "0\.2\.0"
  ]
}
.fi
.RE
.SS Caret Dependencies
.P
If \fBapp\fP\|'s \fBpackage\.json\fP contains:
.P
.RS 2
.nf
"dependencies": {
  "dep1": "^1\.1\.1"
}
.fi
.RE
.P
Then \fBnpm update\fP will install \fBdep1@1\.2\.2\fP, because \fB1\.2\.2\fP is \fBlatest\fP and
\fB1\.2\.2\fP satisfies \fB^1\.1\.1\fP\|\.
.SS Tilde Dependencies
.P
However, if \fBapp\fP\|'s \fBpackage\.json\fP contains:
.P
.RS 2
.nf
"dependencies": {
  "dep1": "~1\.1\.1"
}
.fi
.RE
.P
In this case, running \fBnpm update\fP will install \fBdep1@1\.1\.2\fP\|\.  Even though the \fBlatest\fP
tag points to \fB1\.2\.2\fP, this version does not satisfy \fB~1\.1\.1\fP, which is equivalent
to \fB>=1\.1\.1 <1\.2\.0\fP\|\.  So the highest\-sorting version that satisfies \fB~1\.1\.1\fP is used,
which is \fB1\.1\.2\fP\|\.
.SS Caret Dependencies below 1\.0\.0
.P
Suppose \fBapp\fP has a caret dependency on a version below \fB1\.0\.0\fP, for example:
.P
.RS 2
.nf
"dependencies": {
  "dep1": "^0\.2\.0"
}
.fi
.RE
.P
\fBnpm update\fP will install \fBdep1@0\.2\.0\fP, because there are no other
versions which satisfy \fB^0\.2\.0\fP\|\.
.P
If the dependence were on \fB^0\.4\.0\fP:
.P
.RS 2
.nf
"dependencies": {
  "dep1": "^0\.4\.0"
}
.fi
.RE
.P
Then \fBnpm update\fP will install \fBdep1@0\.4\.1\fP, because that is the highest\-sorting
version that satisfies \fB^0\.4\.0\fP (\fB>= 0\.4\.0 <0\.5\.0\fP)
.SS Updating Globally\-Installed Packages
.P
\fBnpm update \-g\fP will apply the \fBupdate\fP action to each globally installed
package that is \fBoutdated\fP \-\- that is, has a version that is different from
\fBwanted\fP\|\.
.P
Note: Globally installed packages are treated as if they are installed with a caret semver range specified\. So if you require to update to \fBlatest\fP you may need to run \fBnpm install \-g [<pkg>\.\.\.]\fP
.P
NOTE: If a package has been upgraded to a version newer than \fBlatest\fP, it will
be \fIdowngraded\fR\|\.
.SS See Also
.RS 0
.IP \(bu 2
npm help install
.IP \(bu 2
npm help outdated
.IP \(bu 2
npm help shrinkwrap
.IP \(bu 2
npm help registry
.IP \(bu 2
npm help folders
.IP \(bu 2
npm help ls

.RE

Filemanager

Name Type Size Permission Actions
npm-README.1 File 4.77 KB 0644
npm-access.1 File 2.99 KB 0644
npm-adduser.1 File 3.12 KB 0644
npm-audit.1 File 4.39 KB 0644
npm-bin.1 File 379 B 0644
npm-bugs.1 File 1.05 KB 0644
npm-build.1 File 639 B 0644
npm-bundle.1 File 410 B 0644
npm-cache.1 File 2.76 KB 0644
npm-ci.1 File 2 KB 0644
npm-completion.1 File 960 B 0644
npm-config.1 File 1.62 KB 0644
npm-dedupe.1 File 1.46 KB 0644
npm-deprecate.1 File 952 B 0644
npm-dist-tag.1 File 3.18 KB 0644
npm-docs.1 File 1.14 KB 0644
npm-doctor.1 File 4.84 KB 0644
npm-edit.1 File 1.07 KB 0644
npm-explore.1 File 1.11 KB 0644
npm-fund.1 File 1.68 KB 0644
npm-help-search.1 File 926 B 0644
npm-help.1 File 965 B 0644
npm-hook.1 File 2.05 KB 0644
npm-init.1 File 2.37 KB 0644
npm-install-ci-test.1 File 297 B 0644
npm-install-test.1 File 755 B 0644
npm-install.1 File 19.63 KB 0644
npm-link.1 File 2.8 KB 0644
npm-logout.1 File 1.25 KB 0644
npm-ls.1 File 2.79 KB 0644
npm-org.1 File 1.09 KB 0644
npm-outdated.1 File 4.28 KB 0644
npm-owner.1 File 1.21 KB 0644
npm-pack.1 File 986 B 0644
npm-ping.1 File 509 B 0644
npm-prefix.1 File 618 B 0644
npm-profile.1 File 3.49 KB 0644
npm-prune.1 File 1.43 KB 0644
npm-publish.1 File 3.14 KB 0644
npm-rebuild.1 File 465 B 0644
npm-repo.1 File 773 B 0644
npm-restart.1 File 957 B 0644
npm-root.1 File 374 B 0644
npm-run-script.1 File 3.69 KB 0644
npm-search.1 File 3.11 KB 0644
npm-shrinkwrap.1 File 848 B 0644
npm-star.1 File 544 B 0644
npm-stars.1 File 539 B 0644
npm-start.1 File 748 B 0644
npm-stop.1 File 382 B 0644
npm-team.1 File 2.26 KB 0644
npm-test.1 File 399 B 0644
npm-token.1 File 3.68 KB 0644
npm-uninstall.1 File 1.63 KB 0644
npm-unpublish.1 File 1.38 KB 0644
npm-update.1 File 3.73 KB 0644
npm-version.1 File 4.84 KB 0644
npm-view.1 File 3.26 KB 0644
npm-whoami.1 File 342 B 0644
npm.1 File 5.53 KB 0644
npx.1 File 6.7 KB 0644