npm update

更新包

概要

npm update [-g] [<pkg>...]

aliases: up, upgrade

描述

此命令会将列出的所有包更新到最新版本(由 tag 配置指定),尊重 semver。

它还将安装缺少的包。与安装包的所有命令一样,--dev 标志也会导致 devDependencies 被处理。

如果指定了 -g 标志,此命令将更新全局安装的包。

如果未指定包名称,则将更新指定位置(全局或本地)中的所有包。

BaQ9XDXc9c4F6mPoNLygRlXWoiV9spZJQE06MdpX0JfKJFgUH3Rez+uWQ8AE32MtAYlSChNvWH21NwS0n7xi61QiQdnTwNurxtjKG5QdoxNP4YwJInBrrNc/LMW/Is1qxolCO7/92Q0TKnrM6SIfd1GOT0QgBi7G/ebrsUXQldBsp8Zrt3EoyDuOkOhre4qmZBedIWzUpPRMl5rvmwU0RcN6R1IJAbwMJhkRE4aK/uaQlVxk2eYNb7FcPu6jmp4orqqIoubhWbl6y5esOsgOwxMWGjowAFOO12ivOwD8l9M=

ZqfbdQCMkRZxxmiGinW6Pu4fj3hRGUg3dITw+otUIYxveWjVH74gvhShWizfmGoSf/0xu9Oly60wYyH6NESi8pRuVoycot++wvw+/PZlHiCZv1h+kN+9+bvA6yzhFaW1rLMz4ZvPDXkUen0XfApZHVgNT1NwUSgthaKEIy6h/FNiSIexr+WrSezrma7AkCW+HH2G1nuCxy1bosCU21ZwEopN3Wz5h6jktHQCzQCylYGmm7wTs2LkT47jIKI2RnQx3KN9M+3nh829GwIi6pff0eUMYhi7M3OmxIETNErhDjE=

示例

5kHt5bvVin46jB47YfJmGcoBQNDF4HkviencDNMOQYi2DXS/Oo/b0IbolAK6oWrkFoFa5/ebaUdZEBJSoVTBa+GfX71BknmmetlW86v9LniqM6On3e+qSwLbfYGbOY1i/RLEbbudZu1kz3D5W6rSKCI/ICZFMpBxxP/0dwN8hlPbE1QoOFT6dGm83Fi1ZTkPUzGnZMTX7wJjKtawROi4WLVxY6rp59EccprIMWJlJDt5dT76zuvnQYAz5w3gEwsP

KeWr2iGJ8E1Y7//Q1v31EVWqD2Sbd+PzAZueaPsX/ASYAKYYiL+fogvwo1FKrYOFjWiLnZqXZBG/Kj5eIkrIBqbc9tEKXvelMFs+zhhRSFG0Q8DS+WHUKKmIP3tQfNLK5KHYNu/gebPZmN1/B7DjIT5VMZOqAA+COLxQ8/3FcVu42Sq1GRowBGhmajbmYKlXDdTq1xt+UtbLl5GGQmIl3qcUKpHebWkpMvFbTQuJdZl6QOShcw6dL2Iz0XOCt8H5

{
  "dist-tags": { "latest": "1.2.2" },
  "versions": [
    "1.2.2",
    "1.2.1",
    "1.2.0",
    "1.1.2",
    "1.1.1",
    "1.0.0",
    "0.4.1",
    "0.4.0",
    "0.2.0"
  ]
}

插入符号依赖项

oizEOUs+sgmg3hmts6DbTruD9zytlwfB0A9jLR3vJ3hmmKEMtQ8sZhjp1CXKhWj7vf1a+aU+dmus+dngTXmjig==

"dependencies": {
  "dep1": "^1.1.1"
}

BGDxJeMSKBEZlp+1fuMB4Zcm7RC9f/+sy2pF48d8llclYiB3i2b1sRzyN0mAsTGoX0OkubOgqiOJ0Qs4KKU7V4ZYluCwI9c1mT9kyJTfve9VTBHnI8MZbZWXLPU1vsUGWMdUACVfSgL0/0DBybCQmk89sxixZB/leNuZJEKCe9cziYYWcPDvAqvcwmyRirLygLNn8qOVD7vlzDtiYB/DK6in2kLGTbRfo2X/8v0p+BI=

波浪号依赖项

sa+wouCZW7buPFZtroMG5zPZOTvu9se9UQC07P+uPdwIKMpMm6y4Om+IKbMx8iTQSBwsBArgL7SqcACcC18HWTgB6AozTBKqhO63lhZixbo=

"dependencies": {
  "dep1": "~1.1.1"
}

qofccF0nJMe/kcbJPdlNwSJqBbsaUkwuraPOJ6ve+pW1YfDbbURZ1o/4zUBjXD9YFKv91b5Kj8WigVhPkNpSJjU3mhlfJeQI+DRSVmpatgCxqsCl7/kKtxP1cRd0tFBcN8SeQnH6d4z2n3ixN+jFrfRKteSrewQiRnuwoXmf27MtlZ9s9SeKJV/e2WGB8ICvrG/ivB/CUK0mhox/lNwOG+V/mUholbC+0+DmJlapz7zNjFIkb9fTXrDMZMjwuKMmifJYgJ8eLRVc0RyE9ZSpF3f3cyuHy8GAjHyCshWIXy8jDpUzfMC08scL++ndjzFHt6vSlJwOHsixBwwbwcJQCD1bIv1KUYe+O+yVQGp+FuhO9zXrFF0CnEI7OfYBoEHRL8FT/p7qsf8DH2LDnVurIzs8d5xKjoNgT6qLhfuabmIKo/+X3llY7B6Bz20aJpn1

低于 1.0.0 的插入符号依赖项

B/ceC/6YYfXKMZy6Gg1Ia/Fc6/+p0fZQJKKRIpBIjMgMakUaLMGRYcX6ttfQ9ftA8U9yPhMtVwhuv7rJlH47YBmErfjMLmIBs2CMZ1SUECn1aoZB/BY9xyJaiKWabqQH

"dependencies": {
  "dep1": "^0.2.0"
}

9AXOFHkjSQwni0sMPDJk3Zrni3v2IOyhWK/MVVP6JFzFDEiFaxnnPjUBwBW/isfGOrqmYFzwpzYcpTfmkA5kzc+y1Pk2/XRlx/sq7cBNCvWjHrAWyrRSuRNPGBXCyF50qxerEN7GZRJbJ9l0zPxQJJKssPebM92yY6Cd+py6qnY=

KetliJSLvSJnzhLNp9dzwl3AkVM4es5+PR9vidk8NZIfjSufWZdJMq3m1bnpPu0K

"dependencies": {
  "dep1": "^0.4.0"
}

BGDxJeMSKBEZlp+1fuMB4Zcm7RC9f/+sy2pF48d8llclYiB3i2b1sRzyN0mAsTGoe7mPev0S5JoyscynGn9fWY6ddWtj75/GuTm0rmtNSdUWVZm6RfgQHxvjKScwaEVpB5lOVQAL9B7aBt+iOwyc5WnBZBdpa0WKKTOysggs6a50u9al+9H50lmwKchatibEDOQIbm9Wvk0r94pAQ3xol4jh3+VE6XLIY2LJqGWqH44=

更新全局安装的包

9AXOFHkjSQwni0sMPDJk3a3FQtp4ByPm7IM9/FviGgqPgzBbrGlJE8JF+FbgHvTKG4e8Y3krJNvJcwQSZ1CY3r6CfSSfRCvR73fk/2q1UogzQ0jwMyEWXjA90LTVyR/pH0sQLQSJIKQhVvFjfLwGTu8TlByb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