nodejs/deps/npm/man/man1/npm-outdated.1

167 lines
4.5 KiB
Groff
Raw Normal View History

.TH "NPM\-OUTDATED" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-outdated\fR \- Check for outdated packages
.SS Synopsis
2014-09-24 14:41:07 -07:00
.P
.RS 2
2014-11-04 15:08:12 -08:00
.nf
npm outdated [[<@scope>/]<pkg> \.\.\.]
2014-11-04 15:08:12 -08:00
.fi
2014-09-24 14:41:07 -07:00
.RE
.SS Description
2014-09-24 14:41:07 -07:00
.P
This command will check the registry to see if any (or, specific) installed
packages are currently outdated\.
2013-10-24 09:21:59 -07:00
.P
By default, only the direct dependencies of the root project are shown\.
Use \fB\-\-all\fP to find all outdated meta\-dependencies as well\.
.P
In the output:
.RS 0
.IP \(bu 2
\fBwanted\fP is the maximum version of the package that satisfies the semver
range specified in \fBpackage\.json\fP\|\. If there's no available semver range
(i\.e\. you're running \fBnpm outdated \-\-global\fP, or the package isn't
included in \fBpackage\.json\fP), then \fBwanted\fP shows the currently\-installed
version\.
.IP \(bu 2
\fBlatest\fP is the version of the package tagged as latest in the registry\.
Running \fBnpm publish\fP with no special configuration will publish the
package with a dist\-tag of \fBlatest\fP\|\. This may or may not be the maximum
version of the package, or the most\-recently published version of the
package, depending on how the package's developer manages the latest
npm help dist\-tag\.
.IP \(bu 2
\fBlocation\fP is where in the physical tree the package is located\.
.IP \(bu 2
\fBdepended by\fP shows which package depends on the displayed dependency
.IP \(bu 2
\fBpackage type\fP (when using \fB\-\-long\fP / \fB\-l\fP) tells you whether this
package is a \fBdependency\fP or a dev/peer/optional dependency\. Packages not
included in \fBpackage\.json\fP are always marked \fBdependencies\fP\|\.
.IP \(bu 2
\fBhomepage\fP (when using \fB\-\-long\fP / \fB\-l\fP) is the \fBhomepage\fP value contained
in the package's packument
.IP \(bu 2
Red means there's a newer version matching your semver requirements, so
you should update now\.
.IP \(bu 2
Yellow indicates that there's a newer version \fIabove\fR your semver
requirements (usually new major, or new 0\.x minor) so proceed with
caution\.
.RE
.SS An example
.P
.RS 2
.nf
$ npm outdated
Package Current Wanted Latest Location Depended by
glob 5\.0\.15 5\.0\.15 6\.0\.1 node_modules/glob dependent\-package\-name
nothingness 0\.0\.3 git git node_modules/nothingness dependent\-package\-name
npm 3\.5\.1 3\.5\.2 3\.5\.1 node_modules/npm dependent\-package\-name
local\-dev 0\.0\.3 linked linked local\-dev dependent\-package\-name
once 1\.3\.2 1\.3\.3 1\.3\.3 node_modules/once dependent\-package\-name
.fi
.RE
.P
With these \fBdependencies\fP:
.P
.RS 2
.nf
{
"glob": "^5\.0\.15",
"nothingness": "github:othiym23/nothingness#master",
"npm": "^3\.5\.1",
"once": "^1\.3\.1"
}
.fi
.RE
.P
A few things to note:
.RS 0
.IP \(bu 2
\fBglob\fP requires \fB^5\fP, which prevents npm from installing \fBglob@6\fP, which
is outside the semver range\.
.IP \(bu 2
Git dependencies will always be reinstalled, because of how they're
specified\. The installed committish might satisfy the dependency
specifier (if it's something immutable, like a commit SHA), or it might
not, so \fBnpm outdated\fP and \fBnpm update\fP 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\.
.IP \(bu 2
\fBnpm@3\.5\.2\fP is marked as "wanted", but "latest" is \fBnpm@3\.5\.1\fP because
npm uses dist\-tags to manage its \fBlatest\fP and \fBnext\fP release channels\.
\fBnpm update\fP will install the \fInewest\fR version, but \fBnpm install npm\fP
(with no semver range) will install whatever's tagged as \fBlatest\fP\|\.
.IP \(bu 2
\fBonce\fP is just plain out of date\. Reinstalling \fBnode_modules\fP from
scratch or running \fBnpm update\fP will bring it up to spec\.
.RE
.SS Configuration
2014-09-24 14:41:07 -07:00
.SS json
.RS 0
.IP \(bu 2
Default: false
2014-09-24 14:41:07 -07:00
.IP \(bu 2
Type: Boolean
2014-09-24 14:41:07 -07:00
.RE
.P
Show information in JSON format\.
2014-09-24 14:41:07 -07:00
.SS long
.RS 0
.IP \(bu 2
Default: false
2014-09-24 14:41:07 -07:00
.IP \(bu 2
Type: Boolean
2014-09-24 14:41:07 -07:00
.RE
.P
Show extended information\.
2014-09-24 14:41:07 -07:00
.SS parseable
.RS 0
.IP \(bu 2
Default: false
2014-09-24 14:41:07 -07:00
.IP \(bu 2
Type: Boolean
2014-09-24 14:41:07 -07:00
.RE
.P
Show parseable output instead of tree view\.
2014-09-24 14:41:07 -07:00
.SS global
.RS 0
.IP \(bu 2
Default: false
2014-09-24 14:41:07 -07:00
.IP \(bu 2
Type: Boolean
2014-09-24 14:41:07 -07:00
.RE
.P
Check packages in the global install prefix instead of in the current
project\.
.SS all
2014-09-24 14:41:07 -07:00
.RS 0
.IP \(bu 2
Default: false
.IP \(bu 2
Type: Boolean
2014-09-24 14:41:07 -07:00
.RE
.P
Display all outdated dependencies on the tree\.
.SS See Also
2014-09-24 14:41:07 -07:00
.RS 0
.IP \(bu 2
npm help update
2014-09-24 14:41:07 -07:00
.IP \(bu 2
npm help dist\-tag
.IP \(bu 2
npm help registry
2014-09-24 14:41:07 -07:00
.IP \(bu 2
npm help folders
2014-09-24 14:41:07 -07:00
.RE