NPM 插入符号不会引入最新的次要版本 [英] NPM caret doesn't bring in newest minor version

查看:43
本文介绍了NPM 插入符号不会引入最新的次要版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的 package.json 中,我的依赖项之一是..."@packageXXX": "^0.7.0",

In my package.json one of my dependencies is... "@packageXXX": "^0.7.0",

当我执行npm outdated"时,我看到...@packageXXX 当前:0.7.0 想要:0.7.0 最新:0.8.0

When I do a "npm outdated" I see... @packageXXX current: 0.7.0 wanted: 0.7.0 latest: 0.8.0

当我做npm i"时它没有安装最新的次要版本0.8.0"

When I do "npm i" it doesn't install the latest minor version "0.8.0"

我的理解是插入符号应该更新到最新的次要版本,但事实并非如此.有人可以解释我做错了什么吗?

My understand is having the caret there is suppose to update to the latest minor version, but it doesn't. Can someone explain what I'm doing wrong?

推荐答案

这是 0.x.x 的情况,因为前导零表示包尚未进入稳定"版本.在您的包达到 1.x.x 之前,您需要手动进行这些更新(请注意……您的包还不稳定,这意味着可能会发生重大更改!).

This is the case with 0.x.x since a leading zero indicates that the package isn't into a "stable" version yet. Until your package hits 1.x.x you'll need to do these updates manually (and be careful...your package isn't stable yet, meaning breaking changes can occur!).

https://semver.org/

主要版本零 (0.y.z) 用于初始开发.什么都可以随时更改.公共 API 不应被视为稳定.

Major version zero (0.y.z) is for initial development. Anything may change at any time. The public API should not be considered stable.

这篇关于NPM 插入符号不会引入最新的次要版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆