npm - Gulp版本4。为什么不是 'latest'版本?

标签 npm gulp npm-install

我正在开发一个以 gulp 作为依赖项的项目。我正在考虑将其更新到 gulp 4。快速查看 npm show gulp@latest 的输出显示

...
dist-tags:
latest: 3.9.1  next: 4.0.0
...

我想知道为什么 gulp 团队离开了 latest: 3.9.1 并选择 next: 4.0.0,即 npm install gulp 安装3.9.1 而要获取 4.0.0,则必须请求 npm install gulp@next。为什么默认版本还是3.9.1? 4.0.0版本还没有完全支持还是什么?我在 gulp 网站上没有找到任何与此相关的内容。

最佳答案

来自 npm dist-tag 文档:

By default, the latest tag is used by npm to identify the current version of a package, and npm install (without any @ or @ specifier) installs the latest tag. Typically, projects only use the latest tag for stable release versions, and use other tags for unstable versions such as prereleases.

The next tag is used by some projects to identify the upcoming version.

By default, other than latest, no tag has any special significance to npm itself.

在本例中,latest3.x.xnext4.x.x 因为它位于 semver 之后,这意味着存在向后不兼容的更改。如果您检查 gulpjs.com ,文档链接会将您带到 3.x.x 文档。这是目前由 gulp 维护者设置的权威版本。

关于npm - Gulp版本4。为什么不是 'latest'版本?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52888630/

相关文章:

javascript - 从 node.js 中的平面数组构建树数组

php - Laravel 应用程序的结构(API、后台、前台)

npm 修剪坏的 PATH?无法执行安装脚本

ruby-on-rails - bower-rails 无法再安装包

gulp - 使用 Gulp 运行 Stubby4node 时出错

javascript - Gulp eslint 找不到我的 .eslintrc 文件

javascript - 运行 npm install 时获取 "npm ERR! code ELIFECYCLE npm ERR! errno 126"

node.js - 使用与 package.json 不同配置的 npm

javascript - 如何使用npm安装 "AmCharts"的商业版本

Django 如何使用带有静态/模板的 npm 模块