npm outdated

检查过时的包

概要

npm outdated [<package-spec> ...]

描述

此命令将检查注册表以查看当前是否有任何(或特定)已安装的包已过时。

默认情况下,仅显示根项目的直接依赖项和配置的工作区的直接依赖项。也可以使用 --all 查找所有过时的元依赖项。

在输出中:

  • wanted 是满足 package.json 中指定的 semver 范围的包的最大版本。如果没有可用的 semver 范围(即您正在运行 npm outdated --global,或者该包未包含在 package.json 中),则 wanted 显示当前安装的版本。
  • latest 是在注册表中标记为最新的包的版本。在没有特殊配置的情况下运行 npm publish 将发布带有 latest 的 dist-tag 的包。这可能是也可能不是包的最高版本,或者是最近发布的包版本,这取决于包的开发人员如何管理最新的 dist-tag
  • location 是包在物理树中的位置。
  • depended by 显示哪个包依赖于显示的依赖项
  • package type(使用 --long / -l 时)告诉你这个包是 dependency 还是 dev/peer/optional 依赖。未包含在 package.json 中的包始终标记为 dependencies
  • homepage(使用 --long / -l 时)是包的包中包含的 homepage
  • 红色表示有更新的版本符合您的 semver 要求,因此您应该立即更新。
  • 黄色表示有高于您的 semver 要求的较新版本(通常是新的主要版本或新的 0.x 次要版本),因此请谨慎操作。

一个示例

$ npm outdated
Package      Current   Wanted   Latest  Location                  Depended by
glob          5.0.15   5.0.15    6.0.1  node_modules/glob         dependent-package-name
nothingness    0.0.3      git      git  node_modules/nothingness  dependent-package-name
npm            3.5.1    3.5.2    3.5.1  node_modules/npm          dependent-package-name
local-dev      0.0.3   linked   linked  local-dev                 dependent-package-name
once           1.3.2    1.3.3    1.3.3  node_modules/once         dependent-package-name

CZswr6/LwxoCp+92fUbfr/yGcfghbmpE3zW4QylYuDgttALOOQIv6uCkcJPrTxdg

{
  "glob": "^5.0.15",
  "nothingness": "github:othiym23/nothingness#master",
  "npm": "^3.5.1",
  "once": "^1.3.1"
}

CQwFX4pCERcm3XnWlDU1FI+NfpAAA1tXzGyS8p1nlvw=

    +u6QTaeeAAGqqMMsEOdJTFc0tG5WfHCxdJ0Er9i0BSQu1qiHFxtJ5E6c+BAUEJoJevjRDr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