我正在开发一个以 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.
在本例中,latest
是 3.x.x
,next
是 4.x.x
因为它位于 semver 之后,这意味着存在向后不兼容的更改。如果您检查 gulpjs.com ,文档链接会将您带到 3.x.x
文档。这是目前由 gulp 维护者设置的权威版本。
关于npm - Gulp版本4。为什么不是 'latest'版本?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52888630/