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.

129 lines
3.0 KiB

  1. npm-update(1) -- Update a package
  2. =================================
  3. ## SYNOPSIS
  4. npm update [-g] [<pkg>...]
  5. aliases: up, upgrade
  6. ## DESCRIPTION
  7. This command will update all the packages listed to the latest version
  8. (specified by the `tag` config), respecting semver.
  9. It will also install missing packages. As with all commands that install
  10. packages, the `--dev` flag will cause `devDependencies` to be processed
  11. as well.
  12. If the `-g` flag is specified, this command will update globally installed
  13. packages.
  14. If no package name is specified, all packages in the specified location (global
  15. or local) will be updated.
  16. As of `npm@2.6.1`, the `npm update` will only inspect top-level packages.
  17. Prior versions of `npm` would also recursively inspect all dependencies.
  18. To get the old behavior, use `npm --depth 9999 update`.
  19. As of `npm@5.0.0`, the `npm update` will change `package.json` to save the
  20. new version as the minimum required dependency. To get the old behavior,
  21. use `npm update --no-save`.
  22. ## EXAMPLES
  23. IMPORTANT VERSION NOTE: these examples assume `npm@2.6.1` or later. For
  24. older versions of `npm`, you must specify `--depth 0` to get the behavior
  25. described below.
  26. For the examples below, assume that the current package is `app` and it depends
  27. on dependencies, `dep1` (`dep2`, .. etc.). The published versions of `dep1` are:
  28. ```
  29. {
  30. "dist-tags": { "latest": "1.2.2" },
  31. "versions": [
  32. "1.2.2",
  33. "1.2.1",
  34. "1.2.0",
  35. "1.1.2",
  36. "1.1.1",
  37. "1.0.0",
  38. "0.4.1",
  39. "0.4.0",
  40. "0.2.0"
  41. ]
  42. }
  43. ```
  44. ### Caret Dependencies
  45. If `app`'s `package.json` contains:
  46. ```
  47. "dependencies": {
  48. "dep1": "^1.1.1"
  49. }
  50. ```
  51. Then `npm update` will install `dep1@1.2.2`, because `1.2.2` is `latest` and
  52. `1.2.2` satisfies `^1.1.1`.
  53. ### Tilde Dependencies
  54. However, if `app`'s `package.json` contains:
  55. ```
  56. "dependencies": {
  57. "dep1": "~1.1.1"
  58. }
  59. ```
  60. In this case, running `npm update` will install `dep1@1.1.2`. Even though the `latest`
  61. tag points to `1.2.2`, this version does not satisfy `~1.1.1`, which is equivalent
  62. to `>=1.1.1 <1.2.0`. So the highest-sorting version that satisfies `~1.1.1` is used,
  63. which is `1.1.2`.
  64. ### Caret Dependencies below 1.0.0
  65. Suppose `app` has a caret dependency on a version below `1.0.0`, for example:
  66. ```
  67. "dependencies": {
  68. "dep1": "^0.2.0"
  69. }
  70. ```
  71. `npm update` will install `dep1@0.2.0`, because there are no other
  72. versions which satisfy `^0.2.0`.
  73. If the dependence were on `^0.4.0`:
  74. ```
  75. "dependencies": {
  76. "dep1": "^0.4.0"
  77. }
  78. ```
  79. Then `npm update` will install `dep1@0.4.1`, because that is the highest-sorting
  80. version that satisfies `^0.4.0` (`>= 0.4.0 <0.5.0`)
  81. ### Updating Globally-Installed Packages
  82. `npm update -g` will apply the `update` action to each globally installed
  83. package that is `outdated` -- that is, has a version that is different from
  84. `latest`.
  85. NOTE: If a package has been upgraded to a version newer than `latest`, it will
  86. be _downgraded_.
  87. ## SEE ALSO
  88. * npm-install(1)
  89. * npm-outdated(1)
  90. * npm-shrinkwrap(1)
  91. * npm-registry(7)
  92. * npm-folders(5)
  93. * npm-ls(1)