npm-outdated.1 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  1. .TH "NPM\-OUTDATED" "1" "October 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. By default, only the direct dependencies of the root project and direct
  17. dependencies of your configured \fIworkspaces\fR are shown\.
  18. Use \fB\-\-all\fP to find all outdated meta\-dependencies as well\.
  19. .P
  20. In the output:
  21. .RS 0
  22. .IP \(bu 2
  23. \fBwanted\fP is the maximum version of the package that satisfies the semver
  24. range specified in \fBpackage\.json\fP\|\. If there's no available semver range
  25. (i\.e\. you're running \fBnpm outdated \-\-global\fP, or the package isn't
  26. included in \fBpackage\.json\fP), then \fBwanted\fP shows the currently\-installed
  27. version\.
  28. .IP \(bu 2
  29. \fBlatest\fP is the version of the package tagged as latest in the registry\.
  30. Running \fBnpm publish\fP with no special configuration will publish the
  31. package with a dist\-tag of \fBlatest\fP\|\. This may or may not be the maximum
  32. version of the package, or the most\-recently published version of the
  33. package, depending on how the package's developer manages the latest
  34. npm help dist\-tag\.
  35. .IP \(bu 2
  36. \fBlocation\fP is where in the physical tree the package is located\.
  37. .IP \(bu 2
  38. \fBdepended by\fP shows which package depends on the displayed dependency
  39. .IP \(bu 2
  40. \fBpackage type\fP (when using \fB\-\-long\fP / \fB\-l\fP) tells you whether this
  41. package is a \fBdependency\fP or a dev/peer/optional dependency\. Packages not
  42. included in \fBpackage\.json\fP are always marked \fBdependencies\fP\|\.
  43. .IP \(bu 2
  44. \fBhomepage\fP (when using \fB\-\-long\fP / \fB\-l\fP) is the \fBhomepage\fP value contained
  45. in the package's packument
  46. .IP \(bu 2
  47. Red means there's a newer version matching your semver requirements, so
  48. you should update now\.
  49. .IP \(bu 2
  50. Yellow indicates that there's a newer version \fIabove\fR your semver
  51. requirements (usually new major, or new 0\.x minor) so proceed with
  52. caution\.
  53. .RE
  54. .SS An example
  55. .P
  56. .RS 2
  57. .nf
  58. $ npm outdated
  59. Package Current Wanted Latest Location Depended by
  60. glob 5\.0\.15 5\.0\.15 6\.0\.1 node_modules/glob dependent\-package\-name
  61. nothingness 0\.0\.3 git git node_modules/nothingness dependent\-package\-name
  62. npm 3\.5\.1 3\.5\.2 3\.5\.1 node_modules/npm dependent\-package\-name
  63. local\-dev 0\.0\.3 linked linked local\-dev dependent\-package\-name
  64. once 1\.3\.2 1\.3\.3 1\.3\.3 node_modules/once dependent\-package\-name
  65. .fi
  66. .RE
  67. .P
  68. With these \fBdependencies\fP:
  69. .P
  70. .RS 2
  71. .nf
  72. {
  73. "glob": "^5\.0\.15",
  74. "nothingness": "github:othiym23/nothingness#master",
  75. "npm": "^3\.5\.1",
  76. "once": "^1\.3\.1"
  77. }
  78. .fi
  79. .RE
  80. .P
  81. A few things to note:
  82. .RS 0
  83. .IP \(bu 2
  84. \fBglob\fP requires \fB^5\fP, which prevents npm from installing \fBglob@6\fP, which
  85. is outside the semver range\.
  86. .IP \(bu 2
  87. Git dependencies will always be reinstalled, because of how they're
  88. specified\. The installed committish might satisfy the dependency
  89. specifier (if it's something immutable, like a commit SHA), or it might
  90. not, so \fBnpm outdated\fP and \fBnpm update\fP have to fetch Git repos to check\.
  91. This is why currently doing a reinstall of a Git dependency always forces
  92. a new clone and install\.
  93. .IP \(bu 2
  94. \fBnpm@3\.5\.2\fP is marked as "wanted", but "latest" is \fBnpm@3\.5\.1\fP because
  95. npm uses dist\-tags to manage its \fBlatest\fP and \fBnext\fP release channels\.
  96. \fBnpm update\fP will install the \fInewest\fR version, but \fBnpm install npm\fP
  97. (with no semver range) will install whatever's tagged as \fBlatest\fP\|\.
  98. .IP \(bu 2
  99. \fBonce\fP is just plain out of date\. Reinstalling \fBnode_modules\fP from
  100. scratch or running \fBnpm update\fP will bring it up to spec\.
  101. .RE
  102. .SS Configuration
  103. <!\-\- AUTOGENERATED CONFIG DESCRIPTIONS START \-\->
  104. <!\-\- automatically generated, do not edit manually \-\->
  105. <!\-\- see lib/utils/config/definitions\.js \-\->
  106. .SS \fBall\fP
  107. .RS 0
  108. .IP \(bu 2
  109. Default: false
  110. .IP \(bu 2
  111. Type: Boolean
  112. .RE
  113. .P
  114. When running \fBnpm outdated\fP and \fBnpm ls\fP, setting \fB\-\-all\fP will show all
  115. outdated or installed packages, rather than only those directly depended
  116. upon by the current project\.
  117. <!\-\- automatically generated, do not edit manually \-\->
  118. <!\-\- see lib/utils/config/definitions\.js \-\->
  119. .SS \fBjson\fP
  120. .RS 0
  121. .IP \(bu 2
  122. Default: false
  123. .IP \(bu 2
  124. Type: Boolean
  125. .RE
  126. .P
  127. Whether or not to output JSON data, rather than the normal output\.
  128. .RS 0
  129. .IP \(bu 2
  130. In \fBnpm pkg set\fP it enables parsing set values with JSON\.parse() before
  131. saving them to your \fBpackage\.json\fP\|\.
  132. .RE
  133. .P
  134. Not supported by all npm commands\.
  135. <!\-\- automatically generated, do not edit manually \-\->
  136. <!\-\- see lib/utils/config/definitions\.js \-\->
  137. .SS \fBlong\fP
  138. .RS 0
  139. .IP \(bu 2
  140. Default: false
  141. .IP \(bu 2
  142. Type: Boolean
  143. .RE
  144. .P
  145. Show extended information in \fBls\fP, \fBsearch\fP, and \fBhelp\-search\fP\|\.
  146. <!\-\- automatically generated, do not edit manually \-\->
  147. <!\-\- see lib/utils/config/definitions\.js \-\->
  148. .SS \fBparseable\fP
  149. .RS 0
  150. .IP \(bu 2
  151. Default: false
  152. .IP \(bu 2
  153. Type: Boolean
  154. .RE
  155. .P
  156. Output parseable results from commands that write to standard output\. For
  157. \fBnpm search\fP, this will be tab\-separated table format\.
  158. <!\-\- automatically generated, do not edit manually \-\->
  159. <!\-\- see lib/utils/config/definitions\.js \-\->
  160. .SS \fBglobal\fP
  161. .RS 0
  162. .IP \(bu 2
  163. Default: false
  164. .IP \(bu 2
  165. Type: Boolean
  166. .RE
  167. .P
  168. Operates in "global" mode, so that packages are installed into the \fBprefix\fP
  169. folder instead of the current working directory\. See
  170. npm help folders for more on the differences in behavior\.
  171. .RS 0
  172. .IP \(bu 2
  173. packages are installed into the \fB{prefix}/lib/node_modules\fP folder, instead
  174. of the current working directory\.
  175. .IP \(bu 2
  176. bin files are linked to \fB{prefix}/bin\fP
  177. .IP \(bu 2
  178. man pages are linked to \fB{prefix}/share/man\fP
  179. .RE
  180. <!\-\- automatically generated, do not edit manually \-\->
  181. <!\-\- see lib/utils/config/definitions\.js \-\->
  182. .SS \fBworkspace\fP
  183. .RS 0
  184. .IP \(bu 2
  185. Default:
  186. .IP \(bu 2
  187. Type: String (can be set multiple times)
  188. .RE
  189. .P
  190. Enable running a command in the context of the configured workspaces of the
  191. current project while filtering by running only the workspaces defined by
  192. this configuration option\.
  193. .P
  194. Valid values for the \fBworkspace\fP config are either:
  195. .RS 0
  196. .IP \(bu 2
  197. Workspace names
  198. .IP \(bu 2
  199. Path to a workspace directory
  200. .IP \(bu 2
  201. Path to a parent workspace directory (will result in selecting all
  202. workspaces within that folder)
  203. .RE
  204. .P
  205. When set for the \fBnpm init\fP command, this may be set to the folder of a
  206. workspace which does not yet exist, to create the folder and set it up as a
  207. brand new workspace within the project\.
  208. .P
  209. This value is not exported to the environment for child processes\.
  210. <!\-\- automatically generated, do not edit manually \-\->
  211. <!\-\- see lib/utils/config/definitions\.js \-\->
  212. <!\-\- AUTOGENERATED CONFIG DESCRIPTIONS END \-\->
  213. .SS See Also
  214. .RS 0
  215. .IP \(bu 2
  216. npm help update
  217. .IP \(bu 2
  218. npm help dist\-tag
  219. .IP \(bu 2
  220. npm help registry
  221. .IP \(bu 2
  222. npm help folders
  223. .IP \(bu 2
  224. npm help workspaces
  225. .RE