11cb0ef41Sopenharmony_ci<!DOCTYPE html><html><head>
21cb0ef41Sopenharmony_ci<meta charset="utf-8">
31cb0ef41Sopenharmony_ci<title>npm-outdated</title>
41cb0ef41Sopenharmony_ci<style>
51cb0ef41Sopenharmony_cibody {
61cb0ef41Sopenharmony_ci    background-color: #ffffff;
71cb0ef41Sopenharmony_ci    color: #24292e;
81cb0ef41Sopenharmony_ci
91cb0ef41Sopenharmony_ci    margin: 0;
101cb0ef41Sopenharmony_ci
111cb0ef41Sopenharmony_ci    line-height: 1.5;
121cb0ef41Sopenharmony_ci
131cb0ef41Sopenharmony_ci    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
141cb0ef41Sopenharmony_ci}
151cb0ef41Sopenharmony_ci#rainbar {
161cb0ef41Sopenharmony_ci    height: 10px;
171cb0ef41Sopenharmony_ci    background-image: linear-gradient(139deg, #fb8817, #ff4b01, #c12127, #e02aff);
181cb0ef41Sopenharmony_ci}
191cb0ef41Sopenharmony_ci
201cb0ef41Sopenharmony_cia {
211cb0ef41Sopenharmony_ci    text-decoration: none;
221cb0ef41Sopenharmony_ci    color: #0366d6;
231cb0ef41Sopenharmony_ci}
241cb0ef41Sopenharmony_cia:hover {
251cb0ef41Sopenharmony_ci    text-decoration: underline;
261cb0ef41Sopenharmony_ci}
271cb0ef41Sopenharmony_ci
281cb0ef41Sopenharmony_cipre {
291cb0ef41Sopenharmony_ci    margin: 1em 0px;
301cb0ef41Sopenharmony_ci    padding: 1em;
311cb0ef41Sopenharmony_ci    border: solid 1px #e1e4e8;
321cb0ef41Sopenharmony_ci    border-radius: 6px;
331cb0ef41Sopenharmony_ci
341cb0ef41Sopenharmony_ci    display: block;
351cb0ef41Sopenharmony_ci    overflow: auto;
361cb0ef41Sopenharmony_ci
371cb0ef41Sopenharmony_ci    white-space: pre;
381cb0ef41Sopenharmony_ci
391cb0ef41Sopenharmony_ci    background-color: #f6f8fa;
401cb0ef41Sopenharmony_ci    color: #393a34;
411cb0ef41Sopenharmony_ci}
421cb0ef41Sopenharmony_cicode {
431cb0ef41Sopenharmony_ci    font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace;
441cb0ef41Sopenharmony_ci    font-size: 85%;
451cb0ef41Sopenharmony_ci    padding: 0.2em 0.4em;
461cb0ef41Sopenharmony_ci    background-color: #f6f8fa;
471cb0ef41Sopenharmony_ci    color: #393a34;
481cb0ef41Sopenharmony_ci}
491cb0ef41Sopenharmony_cipre > code {
501cb0ef41Sopenharmony_ci    padding: 0;
511cb0ef41Sopenharmony_ci    background-color: inherit;
521cb0ef41Sopenharmony_ci    color: inherit;
531cb0ef41Sopenharmony_ci}
541cb0ef41Sopenharmony_cih1, h2, h3 {
551cb0ef41Sopenharmony_ci    font-weight: 600;
561cb0ef41Sopenharmony_ci}
571cb0ef41Sopenharmony_ci
581cb0ef41Sopenharmony_ci#logobar {
591cb0ef41Sopenharmony_ci    background-color: #333333;
601cb0ef41Sopenharmony_ci    margin: 0 auto;
611cb0ef41Sopenharmony_ci    padding: 1em 4em;
621cb0ef41Sopenharmony_ci}
631cb0ef41Sopenharmony_ci#logobar .logo {
641cb0ef41Sopenharmony_ci    float: left;
651cb0ef41Sopenharmony_ci}
661cb0ef41Sopenharmony_ci#logobar .title {
671cb0ef41Sopenharmony_ci    font-weight: 600;
681cb0ef41Sopenharmony_ci    color: #dddddd;
691cb0ef41Sopenharmony_ci    float: left;
701cb0ef41Sopenharmony_ci    margin: 5px 0 0 1em;
711cb0ef41Sopenharmony_ci}
721cb0ef41Sopenharmony_ci#logobar:after {
731cb0ef41Sopenharmony_ci    content: "";
741cb0ef41Sopenharmony_ci    display: block;
751cb0ef41Sopenharmony_ci    clear: both;
761cb0ef41Sopenharmony_ci}
771cb0ef41Sopenharmony_ci
781cb0ef41Sopenharmony_ci#content {
791cb0ef41Sopenharmony_ci    margin: 0 auto;
801cb0ef41Sopenharmony_ci    padding: 0 4em;
811cb0ef41Sopenharmony_ci}
821cb0ef41Sopenharmony_ci
831cb0ef41Sopenharmony_ci#table_of_contents > h2 {
841cb0ef41Sopenharmony_ci    font-size: 1.17em;
851cb0ef41Sopenharmony_ci}
861cb0ef41Sopenharmony_ci#table_of_contents ul:first-child {
871cb0ef41Sopenharmony_ci    border: solid 1px #e1e4e8;
881cb0ef41Sopenharmony_ci    border-radius: 6px;
891cb0ef41Sopenharmony_ci    padding: 1em;
901cb0ef41Sopenharmony_ci    background-color: #f6f8fa;
911cb0ef41Sopenharmony_ci    color: #393a34;
921cb0ef41Sopenharmony_ci}
931cb0ef41Sopenharmony_ci#table_of_contents ul {
941cb0ef41Sopenharmony_ci    list-style-type: none;
951cb0ef41Sopenharmony_ci    padding-left: 1.5em;
961cb0ef41Sopenharmony_ci}
971cb0ef41Sopenharmony_ci#table_of_contents li {
981cb0ef41Sopenharmony_ci    font-size: 0.9em;
991cb0ef41Sopenharmony_ci}
1001cb0ef41Sopenharmony_ci#table_of_contents li a {
1011cb0ef41Sopenharmony_ci    color: #000000;
1021cb0ef41Sopenharmony_ci}
1031cb0ef41Sopenharmony_ci
1041cb0ef41Sopenharmony_ciheader.title {
1051cb0ef41Sopenharmony_ci    border-bottom: solid 1px #e1e4e8;
1061cb0ef41Sopenharmony_ci}
1071cb0ef41Sopenharmony_ciheader.title > h1 {
1081cb0ef41Sopenharmony_ci    margin-bottom: 0.25em;
1091cb0ef41Sopenharmony_ci}
1101cb0ef41Sopenharmony_ciheader.title > .description {
1111cb0ef41Sopenharmony_ci    display: block;
1121cb0ef41Sopenharmony_ci    margin-bottom: 0.5em;
1131cb0ef41Sopenharmony_ci    line-height: 1;
1141cb0ef41Sopenharmony_ci}
1151cb0ef41Sopenharmony_ci
1161cb0ef41Sopenharmony_cifooter#edit {
1171cb0ef41Sopenharmony_ci    border-top: solid 1px #e1e4e8;
1181cb0ef41Sopenharmony_ci    margin: 3em 0 4em 0;
1191cb0ef41Sopenharmony_ci    padding-top: 2em;
1201cb0ef41Sopenharmony_ci}
1211cb0ef41Sopenharmony_ci</style>
1221cb0ef41Sopenharmony_ci</head>
1231cb0ef41Sopenharmony_ci<body>
1241cb0ef41Sopenharmony_ci<div id="banner">
1251cb0ef41Sopenharmony_ci<div id="rainbar"></div>
1261cb0ef41Sopenharmony_ci<div id="logobar">
1271cb0ef41Sopenharmony_ci<svg class="logo" role="img" height="32" width="32" viewBox="0 0 700 700">
1281cb0ef41Sopenharmony_ci<polygon fill="#cb0000" points="0,700 700,700 700,0 0,0"></polygon>
1291cb0ef41Sopenharmony_ci<polygon fill="#ffffff" points="150,550 350,550 350,250 450,250 450,550 550,550 550,150 150,150"></polygon>
1301cb0ef41Sopenharmony_ci</svg>
1311cb0ef41Sopenharmony_ci<div class="title">
1321cb0ef41Sopenharmony_cinpm command-line interface
1331cb0ef41Sopenharmony_ci</div>
1341cb0ef41Sopenharmony_ci</div>
1351cb0ef41Sopenharmony_ci</div>
1361cb0ef41Sopenharmony_ci
1371cb0ef41Sopenharmony_ci<section id="content">
1381cb0ef41Sopenharmony_ci<header class="title">
1391cb0ef41Sopenharmony_ci<h1 id="npm-outdated">npm-outdated</h1>
1401cb0ef41Sopenharmony_ci<span class="description">Check for outdated packages</span>
1411cb0ef41Sopenharmony_ci</header>
1421cb0ef41Sopenharmony_ci
1431cb0ef41Sopenharmony_ci<section id="table_of_contents">
1441cb0ef41Sopenharmony_ci<h2 id="table-of-contents">Table of contents</h2>
1451cb0ef41Sopenharmony_ci<div id="_table_of_contents"><ul><li><a href="#synopsis">Synopsis</a></li><li><a href="#description">Description</a></li><li><a href="#an-example">An example</a></li><li><a href="#configuration">Configuration</a></li><ul><li><a href="#all"><code>all</code></a></li><li><a href="#json"><code>json</code></a></li><li><a href="#long"><code>long</code></a></li><li><a href="#parseable"><code>parseable</code></a></li><li><a href="#global"><code>global</code></a></li><li><a href="#workspace"><code>workspace</code></a></li></ul><li><a href="#see-also">See Also</a></li></ul></div>
1461cb0ef41Sopenharmony_ci</section>
1471cb0ef41Sopenharmony_ci
1481cb0ef41Sopenharmony_ci<div id="_content"><h3 id="synopsis">Synopsis</h3>
1491cb0ef41Sopenharmony_ci<pre><code class="language-bash">npm outdated [&lt;package-spec&gt; ...]
1501cb0ef41Sopenharmony_ci</code></pre>
1511cb0ef41Sopenharmony_ci<h3 id="description">Description</h3>
1521cb0ef41Sopenharmony_ci<p>This command will check the registry to see if any (or, specific) installed
1531cb0ef41Sopenharmony_cipackages are currently outdated.</p>
1541cb0ef41Sopenharmony_ci<p>By default, only the direct dependencies of the root project and direct
1551cb0ef41Sopenharmony_cidependencies of your configured <em>workspaces</em> are shown.
1561cb0ef41Sopenharmony_ciUse <code>--all</code> to find all outdated meta-dependencies as well.</p>
1571cb0ef41Sopenharmony_ci<p>In the output:</p>
1581cb0ef41Sopenharmony_ci<ul>
1591cb0ef41Sopenharmony_ci<li><code>wanted</code> is the maximum version of the package that satisfies the semver
1601cb0ef41Sopenharmony_cirange specified in <code>package.json</code>. If there's no available semver range
1611cb0ef41Sopenharmony_ci(i.e.  you're running <code>npm outdated --global</code>, or the package isn't
1621cb0ef41Sopenharmony_ciincluded in <code>package.json</code>), then <code>wanted</code> shows the currently-installed
1631cb0ef41Sopenharmony_civersion.</li>
1641cb0ef41Sopenharmony_ci<li><code>latest</code> is the version of the package tagged as latest in the registry.
1651cb0ef41Sopenharmony_ciRunning <code>npm publish</code> with no special configuration will publish the
1661cb0ef41Sopenharmony_cipackage with a dist-tag of <code>latest</code>. This may or may not be the maximum
1671cb0ef41Sopenharmony_civersion of the package, or the most-recently published version of the
1681cb0ef41Sopenharmony_cipackage, depending on how the package's developer manages the latest
1691cb0ef41Sopenharmony_ci<a href="../commands/npm-dist-tag.html">dist-tag</a>.</li>
1701cb0ef41Sopenharmony_ci<li><code>location</code> is where in the physical tree the package is located.</li>
1711cb0ef41Sopenharmony_ci<li><code>depended by</code> shows which package depends on the displayed dependency</li>
1721cb0ef41Sopenharmony_ci<li><code>package type</code> (when using <code>--long</code> / <code>-l</code>) tells you whether this
1731cb0ef41Sopenharmony_cipackage is a <code>dependency</code> or a dev/peer/optional dependency. Packages not
1741cb0ef41Sopenharmony_ciincluded in <code>package.json</code> are always marked <code>dependencies</code>.</li>
1751cb0ef41Sopenharmony_ci<li><code>homepage</code> (when using <code>--long</code> / <code>-l</code>) is the <code>homepage</code> value contained
1761cb0ef41Sopenharmony_ciin the package's packument</li>
1771cb0ef41Sopenharmony_ci<li>Red means there's a newer version matching your semver requirements, so
1781cb0ef41Sopenharmony_ciyou should update now.</li>
1791cb0ef41Sopenharmony_ci<li>Yellow indicates that there's a newer version <em>above</em> your semver
1801cb0ef41Sopenharmony_cirequirements (usually new major, or new 0.x minor) so proceed with
1811cb0ef41Sopenharmony_cicaution.</li>
1821cb0ef41Sopenharmony_ci</ul>
1831cb0ef41Sopenharmony_ci<h3 id="an-example">An example</h3>
1841cb0ef41Sopenharmony_ci<pre><code class="language-bash">$ npm outdated
1851cb0ef41Sopenharmony_ciPackage      Current   Wanted   Latest  Location                  Depended by
1861cb0ef41Sopenharmony_ciglob          5.0.15   5.0.15    6.0.1  node_modules/glob         dependent-package-name
1871cb0ef41Sopenharmony_cinothingness    0.0.3      git      git  node_modules/nothingness  dependent-package-name
1881cb0ef41Sopenharmony_cinpm            3.5.1    3.5.2    3.5.1  node_modules/npm          dependent-package-name
1891cb0ef41Sopenharmony_cilocal-dev      0.0.3   linked   linked  local-dev                 dependent-package-name
1901cb0ef41Sopenharmony_cionce           1.3.2    1.3.3    1.3.3  node_modules/once         dependent-package-name
1911cb0ef41Sopenharmony_ci</code></pre>
1921cb0ef41Sopenharmony_ci<p>With these <code>dependencies</code>:</p>
1931cb0ef41Sopenharmony_ci<pre><code class="language-json">{
1941cb0ef41Sopenharmony_ci  "glob": "^5.0.15",
1951cb0ef41Sopenharmony_ci  "nothingness": "github:othiym23/nothingness#master",
1961cb0ef41Sopenharmony_ci  "npm": "^3.5.1",
1971cb0ef41Sopenharmony_ci  "once": "^1.3.1"
1981cb0ef41Sopenharmony_ci}
1991cb0ef41Sopenharmony_ci</code></pre>
2001cb0ef41Sopenharmony_ci<p>A few things to note:</p>
2011cb0ef41Sopenharmony_ci<ul>
2021cb0ef41Sopenharmony_ci<li><code>glob</code> requires <code>^5</code>, which prevents npm from installing <code>glob@6</code>, which
2031cb0ef41Sopenharmony_ciis outside the semver range.</li>
2041cb0ef41Sopenharmony_ci<li>Git dependencies will always be reinstalled, because of how they're
2051cb0ef41Sopenharmony_cispecified.  The installed committish might satisfy the dependency
2061cb0ef41Sopenharmony_cispecifier (if it's something immutable, like a commit SHA), or it might
2071cb0ef41Sopenharmony_cinot, so <code>npm outdated</code> and <code>npm update</code> have to fetch Git repos to check.
2081cb0ef41Sopenharmony_ciThis is why currently doing a reinstall of a Git dependency always forces
2091cb0ef41Sopenharmony_cia new clone and install.</li>
2101cb0ef41Sopenharmony_ci<li><code>npm@3.5.2</code> is marked as "wanted", but "latest" is <code>npm@3.5.1</code> because
2111cb0ef41Sopenharmony_cinpm uses dist-tags to manage its <code>latest</code> and <code>next</code> release channels.
2121cb0ef41Sopenharmony_ci<code>npm update</code> will install the <em>newest</em> version, but <code>npm install npm</code>
2131cb0ef41Sopenharmony_ci(with no semver range) will install whatever's tagged as <code>latest</code>.</li>
2141cb0ef41Sopenharmony_ci<li><code>once</code> is just plain out of date. Reinstalling <code>node_modules</code> from
2151cb0ef41Sopenharmony_ciscratch or running <code>npm update</code> will bring it up to spec.</li>
2161cb0ef41Sopenharmony_ci</ul>
2171cb0ef41Sopenharmony_ci<h3 id="configuration">Configuration</h3>
2181cb0ef41Sopenharmony_ci<h4 id="all"><code>all</code></h4>
2191cb0ef41Sopenharmony_ci<ul>
2201cb0ef41Sopenharmony_ci<li>Default: false</li>
2211cb0ef41Sopenharmony_ci<li>Type: Boolean</li>
2221cb0ef41Sopenharmony_ci</ul>
2231cb0ef41Sopenharmony_ci<p>When running <code>npm outdated</code> and <code>npm ls</code>, setting <code>--all</code> will show all
2241cb0ef41Sopenharmony_cioutdated or installed packages, rather than only those directly depended
2251cb0ef41Sopenharmony_ciupon by the current project.</p>
2261cb0ef41Sopenharmony_ci<h4 id="json"><code>json</code></h4>
2271cb0ef41Sopenharmony_ci<ul>
2281cb0ef41Sopenharmony_ci<li>Default: false</li>
2291cb0ef41Sopenharmony_ci<li>Type: Boolean</li>
2301cb0ef41Sopenharmony_ci</ul>
2311cb0ef41Sopenharmony_ci<p>Whether or not to output JSON data, rather than the normal output.</p>
2321cb0ef41Sopenharmony_ci<ul>
2331cb0ef41Sopenharmony_ci<li>In <code>npm pkg set</code> it enables parsing set values with JSON.parse() before
2341cb0ef41Sopenharmony_cisaving them to your <code>package.json</code>.</li>
2351cb0ef41Sopenharmony_ci</ul>
2361cb0ef41Sopenharmony_ci<p>Not supported by all npm commands.</p>
2371cb0ef41Sopenharmony_ci<h4 id="long"><code>long</code></h4>
2381cb0ef41Sopenharmony_ci<ul>
2391cb0ef41Sopenharmony_ci<li>Default: false</li>
2401cb0ef41Sopenharmony_ci<li>Type: Boolean</li>
2411cb0ef41Sopenharmony_ci</ul>
2421cb0ef41Sopenharmony_ci<p>Show extended information in <code>ls</code>, <code>search</code>, and <code>help-search</code>.</p>
2431cb0ef41Sopenharmony_ci<h4 id="parseable"><code>parseable</code></h4>
2441cb0ef41Sopenharmony_ci<ul>
2451cb0ef41Sopenharmony_ci<li>Default: false</li>
2461cb0ef41Sopenharmony_ci<li>Type: Boolean</li>
2471cb0ef41Sopenharmony_ci</ul>
2481cb0ef41Sopenharmony_ci<p>Output parseable results from commands that write to standard output. For
2491cb0ef41Sopenharmony_ci<code>npm search</code>, this will be tab-separated table format.</p>
2501cb0ef41Sopenharmony_ci<h4 id="global"><code>global</code></h4>
2511cb0ef41Sopenharmony_ci<ul>
2521cb0ef41Sopenharmony_ci<li>Default: false</li>
2531cb0ef41Sopenharmony_ci<li>Type: Boolean</li>
2541cb0ef41Sopenharmony_ci</ul>
2551cb0ef41Sopenharmony_ci<p>Operates in "global" mode, so that packages are installed into the <code>prefix</code>
2561cb0ef41Sopenharmony_cifolder instead of the current working directory. See
2571cb0ef41Sopenharmony_ci<a href="../configuring-npm/folders.html">folders</a> for more on the differences in behavior.</p>
2581cb0ef41Sopenharmony_ci<ul>
2591cb0ef41Sopenharmony_ci<li>packages are installed into the <code>{prefix}/lib/node_modules</code> folder, instead
2601cb0ef41Sopenharmony_ciof the current working directory.</li>
2611cb0ef41Sopenharmony_ci<li>bin files are linked to <code>{prefix}/bin</code></li>
2621cb0ef41Sopenharmony_ci<li>man pages are linked to <code>{prefix}/share/man</code></li>
2631cb0ef41Sopenharmony_ci</ul>
2641cb0ef41Sopenharmony_ci<h4 id="workspace"><code>workspace</code></h4>
2651cb0ef41Sopenharmony_ci<ul>
2661cb0ef41Sopenharmony_ci<li>Default:</li>
2671cb0ef41Sopenharmony_ci<li>Type: String (can be set multiple times)</li>
2681cb0ef41Sopenharmony_ci</ul>
2691cb0ef41Sopenharmony_ci<p>Enable running a command in the context of the configured workspaces of the
2701cb0ef41Sopenharmony_cicurrent project while filtering by running only the workspaces defined by
2711cb0ef41Sopenharmony_cithis configuration option.</p>
2721cb0ef41Sopenharmony_ci<p>Valid values for the <code>workspace</code> config are either:</p>
2731cb0ef41Sopenharmony_ci<ul>
2741cb0ef41Sopenharmony_ci<li>Workspace names</li>
2751cb0ef41Sopenharmony_ci<li>Path to a workspace directory</li>
2761cb0ef41Sopenharmony_ci<li>Path to a parent workspace directory (will result in selecting all
2771cb0ef41Sopenharmony_ciworkspaces within that folder)</li>
2781cb0ef41Sopenharmony_ci</ul>
2791cb0ef41Sopenharmony_ci<p>When set for the <code>npm init</code> command, this may be set to the folder of a
2801cb0ef41Sopenharmony_ciworkspace which does not yet exist, to create the folder and set it up as a
2811cb0ef41Sopenharmony_cibrand new workspace within the project.</p>
2821cb0ef41Sopenharmony_ci<p>This value is not exported to the environment for child processes.</p>
2831cb0ef41Sopenharmony_ci<h3 id="see-also">See Also</h3>
2841cb0ef41Sopenharmony_ci<ul>
2851cb0ef41Sopenharmony_ci<li><a href="../using-npm/package-spec.html">package spec</a></li>
2861cb0ef41Sopenharmony_ci<li><a href="../commands/npm-update.html">npm update</a></li>
2871cb0ef41Sopenharmony_ci<li><a href="../commands/npm-dist-tag.html">npm dist-tag</a></li>
2881cb0ef41Sopenharmony_ci<li><a href="../using-npm/registry.html">npm registry</a></li>
2891cb0ef41Sopenharmony_ci<li><a href="../configuring-npm/folders.html">npm folders</a></li>
2901cb0ef41Sopenharmony_ci<li><a href="../using-npm/workspaces.html">npm workspaces</a></li>
2911cb0ef41Sopenharmony_ci</ul></div>
2921cb0ef41Sopenharmony_ci
2931cb0ef41Sopenharmony_ci<footer id="edit">
2941cb0ef41Sopenharmony_ci<a href="https://github.com/npm/cli/edit/latest/docs/content/commands/npm-outdated.md">
2951cb0ef41Sopenharmony_ci<svg role="img" viewBox="0 0 16 16" width="16" height="16" fill="currentcolor" style="vertical-align: text-bottom; margin-right: 0.3em;">
2961cb0ef41Sopenharmony_ci<path fill-rule="evenodd" d="M11.013 1.427a1.75 1.75 0 012.474 0l1.086 1.086a1.75 1.75 0 010 2.474l-8.61 8.61c-.21.21-.47.364-.756.445l-3.251.93a.75.75 0 01-.927-.928l.929-3.25a1.75 1.75 0 01.445-.758l8.61-8.61zm1.414 1.06a.25.25 0 00-.354 0L10.811 3.75l1.439 1.44 1.263-1.263a.25.25 0 000-.354l-1.086-1.086zM11.189 6.25L9.75 4.81l-6.286 6.287a.25.25 0 00-.064.108l-.558 1.953 1.953-.558a.249.249 0 00.108-.064l6.286-6.286z"></path>
2971cb0ef41Sopenharmony_ci</svg>
2981cb0ef41Sopenharmony_ciEdit this page on GitHub
2991cb0ef41Sopenharmony_ci</a>
3001cb0ef41Sopenharmony_ci</footer>
3011cb0ef41Sopenharmony_ci</section>
3021cb0ef41Sopenharmony_ci
3031cb0ef41Sopenharmony_ci
3041cb0ef41Sopenharmony_ci
3051cb0ef41Sopenharmony_ci</body></html>