npm-outdated.1 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. .TH "NPM\-OUTDATED" "1" "August 2021" "" ""
  2. .SH "NAME"
  3. \fBnpm-outdated\fR \- Check for outdated packages
  4. .SS Synopsis
  5. .P
  6. .RS 2
  7. .nf
  8. npm outdated [[<@scope>/]<pkg> \.\.\.]
  9. .fi
  10. .RE
  11. .SS Description
  12. .P
  13. This command will check the registry to see if any (or, specific) installed
  14. packages are currently outdated\.
  15. .P
  16. In the output:
  17. .RS 0
  18. .IP \(bu 2
  19. \fBwanted\fP is the maximum version of the package that satisfies the semver
  20. range specified in \fBpackage\.json\fP\|\. If there's no available semver range (i\.e\.
  21. you're running \fBnpm outdated \-\-global\fP, or the package isn't included in
  22. \fBpackage\.json\fP), then \fBwanted\fP shows the currently\-installed version\.
  23. .IP \(bu 2
  24. \fBlatest\fP is the version of the package tagged as latest in the registry\.
  25. Running \fBnpm publish\fP with no special configuration will publish the package
  26. with a dist\-tag of \fBlatest\fP\|\. This may or may not be the maximum version of
  27. the package, or the most\-recently published version of the package, depending
  28. on how the package's developer manages the latest dist\-tag \fInpm\-dist\-tag\fR\|\.
  29. .IP \(bu 2
  30. \fBlocation\fP is where in the dependency tree the package is located\. Note that
  31. \fBnpm outdated\fP defaults to a depth of 0, so unless you override that, you'll
  32. always be seeing only top\-level dependencies that are outdated\.
  33. .IP \(bu 2
  34. \fBpackage type\fP (when using \fB\-\-long\fP / \fB\-l\fP) tells you whether this package is
  35. a \fBdependency\fP or a \fBdevDependency\fP\|\. Packages not included in \fBpackage\.json\fP
  36. are always marked \fBdependencies\fP\|\.
  37. .IP \(bu 2
  38. \fBhomepage\fP (when using \fB\-\-long\fP / \fB\-l\fP) is the \fBhomepage\fP value contained in the package's \fBpackage\.json\fP
  39. .IP \(bu 2
  40. Red means there's a newer version matching your semver requirements, so you should update now\.
  41. .IP \(bu 2
  42. Yellow indicates that there's a newer version above your semver requirements (usually new major, or new 0\.x minor) so proceed with caution\.
  43. .RE
  44. .SS An example
  45. .P
  46. .RS 2
  47. .nf
  48. $ npm outdated
  49. Package Current Wanted Latest Location
  50. glob 5\.0\.15 5\.0\.15 6\.0\.1 test\-outdated\-output
  51. nothingness 0\.0\.3 git git test\-outdated\-output
  52. npm 3\.5\.1 3\.5\.2 3\.5\.1 test\-outdated\-output
  53. local\-dev 0\.0\.3 linked linked test\-outdated\-output
  54. once 1\.3\.2 1\.3\.3 1\.3\.3 test\-outdated\-output
  55. .fi
  56. .RE
  57. .P
  58. With these \fBdependencies\fP:
  59. .P
  60. .RS 2
  61. .nf
  62. {
  63. "glob": "^5\.0\.15",
  64. "nothingness": "github:othiym23/nothingness#master",
  65. "npm": "^3\.5\.1",
  66. "once": "^1\.3\.1"
  67. }
  68. .fi
  69. .RE
  70. .P
  71. A few things to note:
  72. .RS 0
  73. .IP \(bu 2
  74. \fBglob\fP requires \fB^5\fP, which prevents npm from installing \fBglob@6\fP, which is
  75. outside the semver range\.
  76. .IP \(bu 2
  77. Git dependencies will always be reinstalled, because of how they're specified\.
  78. The installed committish might satisfy the dependency specifier (if it's
  79. something immutable, like a commit SHA), or it might not, so \fBnpm outdated\fP and
  80. \fBnpm update\fP have to fetch Git repos to check\. This is why currently doing a
  81. reinstall of a Git dependency always forces a new clone and install\.
  82. .IP \(bu 2
  83. \fBnpm@3\.5\.2\fP is marked as "wanted", but "latest" is \fBnpm@3\.5\.1\fP because npm
  84. uses dist\-tags to manage its \fBlatest\fP and \fBnext\fP release channels\. \fBnpm update\fP
  85. will install the \fInewest\fR version, but \fBnpm install npm\fP (with no semver range)
  86. will install whatever's tagged as \fBlatest\fP\|\.
  87. .IP \(bu 2
  88. \fBonce\fP is just plain out of date\. Reinstalling \fBnode_modules\fP from scratch or
  89. running \fBnpm update\fP will bring it up to spec\.
  90. .RE
  91. .SS Configuration
  92. .SS json
  93. .RS 0
  94. .IP \(bu 2
  95. Default: false
  96. .IP \(bu 2
  97. Type: Boolean
  98. .RE
  99. .P
  100. Show information in JSON format\.
  101. .SS long
  102. .RS 0
  103. .IP \(bu 2
  104. Default: false
  105. .IP \(bu 2
  106. Type: Boolean
  107. .RE
  108. .P
  109. Show extended information\.
  110. .SS parseable
  111. .RS 0
  112. .IP \(bu 2
  113. Default: false
  114. .IP \(bu 2
  115. Type: Boolean
  116. .RE
  117. .P
  118. Show parseable output instead of tree view\.
  119. .SS global
  120. .RS 0
  121. .IP \(bu 2
  122. Default: false
  123. .IP \(bu 2
  124. Type: Boolean
  125. .RE
  126. .P
  127. Check packages in the global install prefix instead of in the current
  128. project\.
  129. .SS depth
  130. .RS 0
  131. .IP \(bu 2
  132. Default: 0
  133. .IP \(bu 2
  134. Type: Int
  135. .RE
  136. .P
  137. Max depth for checking dependency tree\.
  138. .SS See Also
  139. .RS 0
  140. .IP \(bu 2
  141. npm help update
  142. .IP \(bu 2
  143. npm help dist\-tag
  144. .IP \(bu 2
  145. npm help registry
  146. .IP \(bu 2
  147. npm help folders
  148. .RE