Skip to content

nodejs中的package.json里面的版本号 ~ 与 ^ 的区别 #11

Description

@milixie

一个版本号是三位 x.y.z

  • x 是表示 major 主版本号
  • y 是表示 minor 中版本号
  • z 是表示 patch 小版本号

波浪符 ~ 会将版本更新到 minor version
也就是说 ~1.3.5 代表的是 >= 1.3.5 & <1.4.0版本

尖号符 ^ 会将版本更新到 major version
也就是说 ^1.3.5 代表的是 >= 1.3.5 & <2.0.0版本

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions