semantic-versioning

Specifying version numbers in Bower

安稳与你 提交于 2019-12-03 20:34:47
问题 When writing bower.json you can specify version numbers in your dependencies. Sometimes I see people writing { ... "devDependencies" : { "grunt" : "~0.3.13", } } What exactly does the ~ mean? Why not write >=0.3.13? Is this some sort of best practice? 回答1: It's semver and the notation is the same as >=0.3.13 <0.4.0 , which will match all patch releases after and including 0.3.13 , but not 0.4.0 . This means you'll get bug fixes ( patch ), but not new features ( minor ). >=0.3.13 is not

Specifying version numbers in Bower

為{幸葍}努か 提交于 2019-11-30 17:00:37
When writing bower.json you can specify version numbers in your dependencies. Sometimes I see people writing { ... "devDependencies" : { "grunt" : "~0.3.13", } } What exactly does the ~ mean? Why not write >=0.3.13? Is this some sort of best practice? It's semver and the notation is the same as >=0.3.13 <0.4.0 , which will match all patch releases after and including 0.3.13 , but not 0.4.0 . This means you'll get bug fixes ( patch ), but not new features ( minor ). >=0.3.13 is not recommended as it will match anything above which will at some point break. 来源: https://stackoverflow.com

How to get the semver Major part of a Maven version?

不羁岁月 提交于 2019-11-30 06:38:48
Is it possible to get the major version ( <Major>.<Minor>.<Patch> ) of the project.version ? For example if my version is 1.3.4 , I'd like to get 1 to later use it in a configuration of the same pom.xml Something like: <configuration> <name>project_name.${project.version:major}</name> </configuration> If not, what are the alternatives? Yuriy Nemtsov Found it. The build-helper-maven-plugin has the ability to parse-out the components of the version. <build> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>build-helper-maven-plugin</artifactId> <version>1.5</version>

What exactly is considered a breaking change to a library crate?

半腔热情 提交于 2019-11-29 13:08:09
问题 Rust crates use Semantic Versioning. As a consequence, each release with a breaking change should result in a major version bump. A breaking change is commonly considered something that may break downstream crates (code the depends on the library in question). However, in Rust a whole lot has the potential of breaking downstream crates. For example, changing (including merely adding to ) the set of public symbols is possibly a breaking change, because downstream crates can use glob-imports (

How to get the semver Major part of a Maven version?

☆樱花仙子☆ 提交于 2019-11-29 06:18:07
问题 Is it possible to get the major version ( <Major>.<Minor>.<Patch> ) of the project.version ? For example if my version is 1.3.4 , I'd like to get 1 to later use it in a configuration of the same pom.xml Something like: <configuration> <name>project_name.${project.version:major}</name> </configuration> If not, what are the alternatives? 回答1: Found it. The build-helper-maven-plugin has the ability to parse-out the components of the version. <build> <plugins> <plugin> <groupId>org.codehaus.mojo<

What is the bower (and npm) version syntax?

↘锁芯ラ 提交于 2019-11-26 16:51:50
Bower enables me to specify version requirements for packages using the following syntax: "dependencies": { "<name>": "<version>", }, But I have not been able to find what is the syntax to use for the <version> . I know that I can specify versions to be: greater than a certain version with ">1.0.0" greater than or equal to a version: ">=1.0.0" or in some range: "1.0.0 - 2.0.0" . I also know that there is a common version syntax containing the tilde: "~1.0.0" . But I am not sure what it means and whether it is the same as "=1.0.0" . I am also interested to know whether I am able to specify

What&#39;s the difference between tilde(~) and caret(^) in package.json?

梦想与她 提交于 2019-11-25 22:29:00
问题 After I upgraded to latest stable node and npm , I tried npm install moment --save . It saves the entry in the package.json with the caret ^ prefix. Previously, it was a tilde ~ prefix. Why are these changes made in npm ? What is the difference between tilde ~ and caret ^ ? What is the advantages over others? 回答1: See the NPM docs ~version “Approximately equivalent to version” See semver. ~1.2.3 will use releases from 1.2.3 to <1.3.0. ^version Will update you to the next major version See