HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/ZelfVerkopen/zelfverkopen.nl/node_modules/npm/man/man1/npm-update.1
.TH "NPM\-UPDATE" "1" "February 2018" "" ""
.SH "NAME"
\fBnpm-update\fR \- Update a package
.SH SYNOPSIS
.P
.RS 2
.nf
npm update [\-g] [<pkg>\.\.\.]

aliases: up, upgrade
.fi
.RE
.SH DESCRIPTION
.P
This command will update all the packages listed to the latest version
(specified by the \fB\fP config), respecting semver\.
.P
It will also install missing packages\. As with all commands that install
packages, the \fB\fP flag will cause \fB\fP to be processed
as well\.
.P
If the \fB\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 \fB\fPnpm update\fB \fPnpm\fB \fPnpm \-\-depth 9999 update`\.
.SH EXAMPLES
.P
IMPORTANT VERSION NOTE: these examples assume \fB \fPnpm\fB\fP\-\-depth 0` to get the behavior
described below\.
.P
For the examples below, assume that the current package is \fB\fP and it depends
on dependencies, \fB\fP (\fB\fP, \.\. etc\.)\.  The published versions of \fB\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 \fB\fP\|'s \fB\fP contains:
.P
.RS 2
.nf
"dependencies": {
  "dep1": "^1\.1\.1"
}
.fi
.RE
.P
Then \fB\fP will install \fB\fP1\.2\.2\fB \fPlatest\fB \fP^1\.1\.1`\.
.SS Tilde Dependencies
.P
However, if \fB\fP\|'s \fB\fP contains:
.P
.RS 2
.nf
"dependencies": {
  "dep1": "~1\.1\.1"
}
.fi
.RE
.P
In this case, running \fB\fP will install \fB\fPlatest\fB\fP1\.2\.2\fB\fP~1\.1\.1\fB\fP>=1\.1\.1 <1\.2\.0\fB\fP~1\.1\.1\fB \fP1\.1\.2`\.
.SS Caret Dependencies below 1\.0\.0
.P
Suppose \fB\fP has a caret dependency on a version below \fB\fP, for example:
.P
.RS 2
.nf
"dependencies": {
  "dep1": "^0\.2\.0"
}
.fi
.RE
.P
\fB\fP will install \fB\fP^0\.2\.0`\.
.P
If the dependence were on \fB\fP:
.P
.RS 2
.nf
"dependencies": {
  "dep1": "^0\.4\.0"
}
.fi
.RE
.P
Then \fB\fP will install \fB\fP^0\.4\.0\fB\fP>= 0\.4\.0 <0\.5\.0`)
.SS Recording Updates with \fB\fP
.P
When you want to update a package and save the new version as
the minimum required dependency in \fB\fP, you can use
\fB\fP or \fB\fP\|\.  For example if
\fB\fP contains:
.P
.RS 2
.nf
"dependencies": {
  "dep1": "^1\.1\.1"
}
.fi
.RE
.P
Then \fB\fP will install \fB \fPlatest\fB\fPpackage\.json` will be modified:
.P
.RS 2
.nf
"dependencies": {
  "dep1": "^1\.2\.2"
}
.fi
.RE
.P
Note that \fB\fP will only write an updated version to \fB\fP
if it installs a new package\.
.SS Updating Globally\-Installed Packages
.P
\fB\fP will apply the \fB\fP action to each globally installed
package that is \fB\fP \-\- that is, has a version that is different from
\fB\fP\|\.
.P
NOTE: If a package has been upgraded to a version newer than \fB\fP, it will
be \fIdowngraded\fR\|\.
.SH 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 7 registry
.IP \(bu 2
npm help 5 folders
.IP \(bu 2
npm help ls

.RE