Simple email application for Android. Original source code: https://framagit.org/dystopia-project/simple-email
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

141 lines
3.4 KiB

  1. .TH "NPM\-UPDATE" "1" "August 2018" "" ""
  2. .SH "NAME"
  3. \fBnpm-update\fR \- Update a package
  4. .SH SYNOPSIS
  5. .P
  6. .RS 2
  7. .nf
  8. npm update [\-g] [<pkg>\.\.\.]
  9. aliases: up, upgrade
  10. .fi
  11. .RE
  12. .SH DESCRIPTION
  13. .P
  14. This command will update all the packages listed to the latest version
  15. (specified by the \fBtag\fP config), respecting semver\.
  16. .P
  17. It will also install missing packages\. As with all commands that install
  18. packages, the \fB\-\-dev\fP flag will cause \fBdevDependencies\fP to be processed
  19. as well\.
  20. .P
  21. If the \fB\-g\fP flag is specified, this command will update globally installed
  22. packages\.
  23. .P
  24. If no package name is specified, all packages in the specified location (global
  25. or local) will be updated\.
  26. .P
  27. As of \fB, the\fPnpm update\fBwill only inspect top\-level packages\.
  28. Prior versions of\fPnpm\fBwould also recursively inspect all dependencies\.
  29. To get the old behavior, use\fPnpm \-\-depth 9999 update`\.
  30. .P
  31. As of \fB, the\fPnpm update\fBwill change\fPpackage\.json\fBto save the
  32. new version as the minimum required dependency\. To get the old behavior,
  33. use\fPnpm update \-\-no\-save`\.
  34. .SH EXAMPLES
  35. .P
  36. IMPORTANT VERSION NOTE: these examples assume \fBor later\. For
  37. older versions of\fPnpm\fB, you must specify\fP\-\-depth 0` to get the behavior
  38. described below\.
  39. .P
  40. For the examples below, assume that the current package is \fBapp\fP and it depends
  41. on dependencies, \fBdep1\fP (\fBdep2\fP, \.\. etc\.)\. The published versions of \fBdep1\fP are:
  42. .P
  43. .RS 2
  44. .nf
  45. {
  46. "dist\-tags": { "latest": "1\.2\.2" },
  47. "versions": [
  48. "1\.2\.2",
  49. "1\.2\.1",
  50. "1\.2\.0",
  51. "1\.1\.2",
  52. "1\.1\.1",
  53. "1\.0\.0",
  54. "0\.4\.1",
  55. "0\.4\.0",
  56. "0\.2\.0"
  57. ]
  58. }
  59. .fi
  60. .RE
  61. .SS Caret Dependencies
  62. .P
  63. If \fBapp\fP\|'s \fBpackage\.json\fP contains:
  64. .P
  65. .RS 2
  66. .nf
  67. "dependencies": {
  68. "dep1": "^1\.1\.1"
  69. }
  70. .fi
  71. .RE
  72. .P
  73. Then \fBnpm update\fP will install \fB, because\fP1\.2\.2\fBis\fPlatest\fBand\fP1\.2\.2\fBsatisfies\fP^1\.1\.1`\.
  74. .SS Tilde Dependencies
  75. .P
  76. However, if \fBapp\fP\|'s \fBpackage\.json\fP contains:
  77. .P
  78. .RS 2
  79. .nf
  80. "dependencies": {
  81. "dep1": "~1\.1\.1"
  82. }
  83. .fi
  84. .RE
  85. .P
  86. In this case, running \fBnpm update\fP will install \fB\|\. Even though the\fPlatest\fBtag points to\fP1\.2\.2\fB, this version does not satisfy\fP~1\.1\.1\fB, which is equivalent
  87. to\fP>=1\.1\.1 <1\.2\.0\fB\|\. So the highest\-sorting version that satisfies\fP~1\.1\.1\fBis used,
  88. which is\fP1\.1\.2`\.
  89. .SS Caret Dependencies below 1\.0\.0
  90. .P
  91. Suppose \fBapp\fP has a caret dependency on a version below \fB1\.0\.0\fP, for example:
  92. .P
  93. .RS 2
  94. .nf
  95. "dependencies": {
  96. "dep1": "^0\.2\.0"
  97. }
  98. .fi
  99. .RE
  100. .P
  101. \fBnpm update\fP will install \fB, because there are no other
  102. versions which satisfy\fP^0\.2\.0`\.
  103. .P
  104. If the dependence were on \fB^0\.4\.0\fP:
  105. .P
  106. .RS 2
  107. .nf
  108. "dependencies": {
  109. "dep1": "^0\.4\.0"
  110. }
  111. .fi
  112. .RE
  113. .P
  114. Then \fBnpm update\fP will install \fB, because that is the highest\-sorting
  115. version that satisfies\fP^0\.4\.0\fB(\fP>= 0\.4\.0 <0\.5\.0`)
  116. .SS Updating Globally\-Installed Packages
  117. .P
  118. \fBnpm update \-g\fP will apply the \fBupdate\fP action to each globally installed
  119. package that is \fBoutdated\fP \-\- that is, has a version that is different from
  120. \fBlatest\fP\|\.
  121. .P
  122. NOTE: If a package has been upgraded to a version newer than \fBlatest\fP, it will
  123. be \fIdowngraded\fR\|\.
  124. .SH SEE ALSO
  125. .RS 0
  126. .IP \(bu 2
  127. npm help install
  128. .IP \(bu 2
  129. npm help outdated
  130. .IP \(bu 2
  131. npm help shrinkwrap
  132. .IP \(bu 2
  133. npm help 7 registry
  134. .IP \(bu 2
  135. npm help 5 folders
  136. .IP \(bu 2
  137. npm help ls
  138. .RE