Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes15kdownloads
npm-outdated.html367 linesDownload Raw Back to commands
1<!DOCTYPE html><html><head>
2<meta charset="utf-8">
3<title>npm-outdated</title>
4<style>
5body {
6    background-color: #ffffff;
7    color: #24292e;
8
9    margin: 0;
10
11    line-height: 1.5;
12
13    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
14}
15#rainbar {
16    height: 10px;
17    background-image: linear-gradient(139deg, #fb8817, #ff4b01, #c12127, #e02aff);
18}
19
20a {
21    text-decoration: none;
22    color: #0366d6;
23}
24a:hover {
25    text-decoration: underline;
26}
27
28pre {
29    margin: 1em 0px;
30    padding: 1em;
31    border: solid 1px #e1e4e8;
32    border-radius: 6px;
33
34    display: block;
35    overflow: auto;
36
37    white-space: pre;
38
39    background-color: #f6f8fa;
40    color: #393a34;
41}
42code {
43    font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace;
44    font-size: 85%;
45    padding: 0.2em 0.4em;
46    background-color: #f6f8fa;
47    color: #393a34;
48}
49pre > code {
50    padding: 0;
51    background-color: inherit;
52    color: inherit;
53}
54h1, h2, h3 {
55    font-weight: 600;
56}
57
58#logobar {
59    background-color: #333333;
60    margin: 0 auto;
61    padding: 1em 4em;
62}
63#logobar .logo {
64    float: left;
65}
66#logobar .title {
67    font-weight: 600;
68    color: #dddddd;
69    float: left;
70    margin: 5px 0 0 1em;
71}
72#logobar:after {
73    content: "";
74    display: block;
75    clear: both;
76}
77
78#content {
79    margin: 0 auto;
80    padding: 0 4em;
81}
82
83#table_of_contents > h2 {
84    font-size: 1.17em;
85}
86#table_of_contents ul:first-child {
87    border: solid 1px #e1e4e8;
88    border-radius: 6px;
89    padding: 1em;
90    background-color: #f6f8fa;
91    color: #393a34;
92}
93#table_of_contents ul {
94    list-style-type: none;
95    padding-left: 1.5em;
96}
97#table_of_contents li {
98    font-size: 0.9em;
99}
100#table_of_contents li a {
101    color: #000000;
102}
103
104header.title {
105    border-bottom: solid 1px #e1e4e8;
106}
107header.title > h1 {
108    margin-bottom: 0.25em;
109}
110header.title > .description {
111    display: block;
112    margin-bottom: 0.5em;
113    line-height: 1;
114}
115
116header.title .version {
117    font-size: 0.8em;
118    color: #666666;
119}
120
121footer#edit {
122    border-top: solid 1px #e1e4e8;
123    margin: 3em 0 4em 0;
124    padding-top: 2em;
125}
126
127table {
128    width: 100%;
129    margin: 1em 0;
130    border-radius: 6px;
131    border: 1px solid #e1e4e8;
132    overflow: hidden;
133    border-collapse: separate;
134    border-spacing: 0;
135}
136
137table thead {
138    background-color: #f6f8fa;
139}
140
141table tbody {
142    background-color: #ffffff;
143}
144
145table th,
146table td {
147    padding: 0.75em;
148    text-align: left;
149    border-right: 1px solid #e1e4e8;
150    border-bottom: 1px solid #e1e4e8;
151}
152
153table th:last-child,
154table td:last-child {
155    border-right: none;
156}
157
158table tbody tr:last-child td {
159    border-bottom: none;
160}
161
162table th {
163    font-weight: 600;
164    background-color: #f6f8fa;
165}
166
167table code {
168    white-space: nowrap;
169}
170
171</style>
172</head>
173<body>
174<div id="banner">
175<div id="rainbar"></div>
176<div id="logobar">
177<svg class="logo" role="img" height="32" width="32" viewBox="0 0 700 700">
178<polygon fill="#cb0000" points="0,700 700,700 700,0 0,0"></polygon>
179<polygon fill="#ffffff" points="150,550 350,550 350,250 450,250 450,550 550,550 550,150 150,150"></polygon>
180</svg>
181<div class="title">
182npm command-line interface
183</div>
184</div>
185</div>
186
187<section id="content">
188<header class="title">
189<h1 id="----npm-outdated----11130">
190    <span>npm-outdated</span>
191    <span class="version">@11.13.0</span>
192</h1>
193<span class="description">Check for outdated packages</span>
194</header>
195
196<section id="table_of_contents">
197<h2 id="table-of-contents">Table of contents</h2>
198<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><li><a href="#before"><code>before</code></a></li><li><a href="#min-release-age"><code>min-release-age</code></a></li></ul><li><a href="#see-also">See Also</a></li></ul></div>
199</section>
200
201<div id="_content"><h3 id="synopsis">Synopsis</h3>
202<pre><code class="language-bash">npm outdated [&lt;package-spec&gt; ...]
203</code></pre>
204<h3 id="description">Description</h3>
205<p>This command will check the registry to see if any (or, specific) installed packages are currently outdated.</p>
206<p>By default, only the direct dependencies of the root project and direct dependencies of your configured <em>workspaces</em> are shown.
207Use <code>--all</code> to find all outdated meta-dependencies as well.</p>
208<p>In the output:</p>
209<ul>
210<li><code>wanted</code> is the maximum version of the package that satisfies the semver range specified in <code>package.json</code>.
211If there's no available semver range (i.e. you're running <code>npm outdated --global</code>, or the package isn't included in <code>package.json</code>), then <code>wanted</code> shows the currently-installed version.</li>
212<li><code>latest</code> is the version of the package tagged as latest in the registry.
213Running <code>npm publish</code> with no special configuration will publish the package with a dist-tag of <code>latest</code>.
214This 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 <a href="../commands/npm-dist-tag.html">dist-tag</a>.</li>
215<li><code>location</code> is where in the physical tree the package is located.</li>
216<li><code>depended by</code> shows which package depends on the displayed dependency</li>
217<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 dev/peer/optional dependency.
218Packages not included in <code>package.json</code> are always marked <code>dependencies</code>.</li>
219<li><code>homepage</code> (when using <code>--long</code> / <code>-l</code>) is the <code>homepage</code> value contained in the package's packument</li>
220<li><code>depended by location</code> (when using <code>--long</code> / <code>-l</code>) shows location of the package that depends on the displayed dependency</li>
221<li>Red means there's a newer version matching your semver requirements, so you should update now.</li>
222<li>Yellow indicates that there's a newer version <em>above</em> your semver requirements (usually new major, or new 0.x minor) so proceed with caution.</li>
223</ul>
224<h3 id="an-example">An example</h3>
225<pre><code class="language-bash">$ npm outdated
226Package      Current   Wanted   Latest  Location                  Depended by
227glob          5.0.15   5.0.15    6.0.1  node_modules/glob         dependent-package-name
228nothingness    0.0.3      git      git  node_modules/nothingness  dependent-package-name
229npm            3.5.1    3.5.2    3.5.1  node_modules/npm          dependent-package-name
230local-dev      0.0.3   linked   linked  local-dev                 dependent-package-name
231once           1.3.2    1.3.3    1.3.3  node_modules/once         dependent-package-name
232</code></pre>
233<p>With these <code>dependencies</code>:</p>
234<pre><code class="language-json">{
235  "glob": "^5.0.15",
236  "nothingness": "github:othiym23/nothingness#master",
237  "npm": "^3.5.1",
238  "once": "^1.3.1"
239}
240</code></pre>
241<p>A few things to note:</p>
242<ul>
243<li><code>glob</code> requires <code>^5</code>, which prevents npm from installing <code>glob@6</code>, which is outside the semver range.</li>
244<li>Git dependencies will always be reinstalled, because of how they're specified.
245The installed committish might satisfy the dependency specifier (if it'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.
246This is why currently doing a reinstall of a Git dependency always forces a new clone and install.</li>
247<li><code>npm@3.5.2</code> is marked as "wanted", but "latest" is <code>npm@3.5.1</code> because npm uses dist-tags to manage its <code>latest</code> and <code>next</code> release channels.
248<code>npm update</code> will install the <em>newest</em> version, but <code>npm install npm</code> (with no semver range) will install whatever's tagged as <code>latest</code>.</li>
249<li><code>once</code> is just plain out of date.
250Reinstalling <code>node_modules</code> from scratch or running <code>npm update</code> will bring it up to spec.</li>
251</ul>
252<h3 id="configuration">Configuration</h3>
253<h4 id="all"><code>all</code></h4>
254<ul>
255<li>Default: false</li>
256<li>Type: Boolean</li>
257</ul>
258<p>When running <code>npm outdated</code> and <code>npm ls</code>, setting <code>--all</code> will show all
259outdated or installed packages, rather than only those directly depended
260upon by the current project.</p>
261<h4 id="json"><code>json</code></h4>
262<ul>
263<li>Default: false</li>
264<li>Type: Boolean</li>
265</ul>
266<p>Whether or not to output JSON data, rather than the normal output.</p>
267<ul>
268<li>In <code>npm pkg set</code> it enables parsing set values with JSON.parse() before
269saving them to your <code>package.json</code>.</li>
270</ul>
271<p>Not supported by all npm commands.</p>
272<h4 id="long"><code>long</code></h4>
273<ul>
274<li>Default: false</li>
275<li>Type: Boolean</li>
276</ul>
277<p>Show extended information in <code>ls</code>, <code>search</code>, and <code>help-search</code>.</p>
278<h4 id="parseable"><code>parseable</code></h4>
279<ul>
280<li>Default: false</li>
281<li>Type: Boolean</li>
282</ul>
283<p>Output parseable results from commands that write to standard output. For
284<code>npm search</code>, this will be tab-separated table format.</p>
285<h4 id="global"><code>global</code></h4>
286<ul>
287<li>Default: false</li>
288<li>Type: Boolean</li>
289</ul>
290<p>Operates in "global" mode, so that packages are installed into the <code>prefix</code>
291folder instead of the current working directory. See
292<a href="../configuring-npm/folders.html">folders</a> for more on the differences in behavior.</p>
293<ul>
294<li>packages are installed into the <code>{prefix}/lib/node_modules</code> folder, instead
295of the current working directory.</li>
296<li>bin files are linked to <code>{prefix}/bin</code></li>
297<li>man pages are linked to <code>{prefix}/share/man</code></li>
298</ul>
299<h4 id="workspace"><code>workspace</code></h4>
300<ul>
301<li>Default:</li>
302<li>Type: String (can be set multiple times)</li>
303</ul>
304<p>Enable running a command in the context of the configured workspaces of the
305current project while filtering by running only the workspaces defined by
306this configuration option.</p>
307<p>Valid values for the <code>workspace</code> config are either:</p>
308<ul>
309<li>Workspace names</li>
310<li>Path to a workspace directory</li>
311<li>Path to a parent workspace directory (will result in selecting all
312workspaces within that folder)</li>
313</ul>
314<p>When set for the <code>npm init</code> command, this may be set to the folder of a
315workspace which does not yet exist, to create the folder and set it up as a
316brand new workspace within the project.</p>
317<p>This value is not exported to the environment for child processes.</p>
318<h4 id="before"><code>before</code></h4>
319<ul>
320<li>Default: null</li>
321<li>Type: null or Date</li>
322</ul>
323<p>If passed to <code>npm install</code>, will rebuild the npm tree such that only
324versions that were available <strong>on or before</strong> the given date are installed.
325If there are no versions available for the current set of dependencies, the
326command will error.</p>
327<p>If the requested version is a <code>dist-tag</code> and the given tag does not pass the
328<code>--before</code> filter, the most recent version less than or equal to that tag
329will be used. For example, <code>foo@latest</code> might install <code>foo@1.2</code> even though
330<code>latest</code> is <code>2.0</code>.</p>
331<p>This config cannot be used with: <code>min-release-age</code></p>
332<h4 id="min-release-age"><code>min-release-age</code></h4>
333<ul>
334<li>Default: null</li>
335<li>Type: null or Number</li>
336</ul>
337<p>If set, npm will build the npm tree such that only versions that were
338available more than the given number of days ago will be installed. If there
339are no versions available for the current set of dependencies, the command
340will error.</p>
341<p>This flag is a complement to <code>before</code>, which accepts an exact date instead
342of a relative number of days.</p>
343<p>This config cannot be used with: <code>before</code></p>
344<p>This value is not exported to the environment for child processes.</p>
345<h3 id="see-also">See Also</h3>
346<ul>
347<li><a href="../using-npm/package-spec.html">package spec</a></li>
348<li><a href="../commands/npm-update.html">npm update</a></li>
349<li><a href="../commands/npm-dist-tag.html">npm dist-tag</a></li>
350<li><a href="../using-npm/registry.html">npm registry</a></li>
351<li><a href="../configuring-npm/folders.html">npm folders</a></li>
352<li><a href="../using-npm/workspaces.html">npm workspaces</a></li>
353</ul></div>
354
355<footer id="edit">
356<a href="https://github.com/npm/cli/edit/latest/docs/lib/content/commands/npm-outdated.md">
357<svg role="img" viewBox="0 0 16 16" width="16" height="16" fill="currentcolor" style="vertical-align: text-bottom; margin-right: 0.3em;">
358<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>
359</svg>
360Edit this page on GitHub
361</a>
362</footer>
363</section>
364
365
366
367</body></html>
codekingpro/portable-devtools · Team Ai