| > | Any version greater than the specified version. | >3.1: any version greater than 3.1. |
| < | Any version less than the specified version. | <3.1: any version less than 3.1. |
| <= | Any version less than or equal to the specified version. | <=3.1: any version less than or equal to 3.1. |
| >= | Any version greater than or equal to the specified version. | >=3.1: version 3.1 and greater. |
| == | Exactly the specified version. | ==3.1: only 3.1. |
| != | Any version not equal to the specified version. | !=3.1: any version other than 3.1. |
| ~= | Any compatible release. Compatible releases are releases that are within the same major or minor version, assuming the package author is using semantic versioning. | ~=3.1: version 3.1 or later, but not version 4.0 or later. ~=3.1.2: version 3.1.2 or later, but not version 3.2.0 or later. |
| * | Can be used at the end of a version number to represent all, | ==3.1.*: any version that starts with 3.1. Equivalent to ~=3.1.0. |
评论
登录后参与技术讨论,分享你的经验与见解。
登录 / 注册暂无评论