New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
upgrade to newer semver, fixes #1817,#1845,#1851 #1852
Conversation
+1 |
3 similar comments
+1 |
+1 |
+1 |
@@ -73,6 +73,7 @@ | |||
"nock": "^0.56.0", | |||
"node-uuid": "^1.4.2", | |||
"proxyquire": "^1.3.0", | |||
"semver": "^5.0.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why? its already in dependencies
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, that shouldn't be there; removed and PR rescoped.
cdb9fbe
to
7720ddb
Compare
AppVeyor and Travis CI builds failed. But according to a quick look not because of this code change but some failures other services. Maybe you could do a repush so the checks are run again. |
Upgrading to latest version of semver to fix (bower#1817, bower#1845, bower#1851). Possible breaking changes in regards to the way semvers handles pre-releases. If a version has a prerelease tags (for example, 1.2.3-alpha.3) then it will only be allowed to satisfy comparator sets if at least one comparator with the same [major, minor, patch] tuple also has a prerelease tag. For example, the range >1.2.3-alpha.0 would be allowed to match the version 1.2.3-alpha.7, but it would not be satisfied by * or 1.2.3. See [semvers](https://github.com/npm/node-semver#prerelease-tags) additional details.
7720ddb
to
8744449
Compare
|
As you said it's breaking change so we can implement it only behind a flag. |
@sheerun It "COULD" be a breaking change base on the semver spec and description regarding pre-release identifier. Prior to semver 5.x, pre-releases version were satisfying comparator without at least one comparator with the same [major, minor, patch] tuple also has a prerelease tag. I had added "COULD" be a breaking change in hopes that the contributors would review if it was. |
As for compatibility breaking your tests show it is indeed backward-incompatible. For example Because it's not likely and lots of issues that were fixed until 5.x of node-semver, that it think it's reasonable to give it a go for 1.5.. Does your patch fix http://stackoverflow.com/questions/31144268/bower-no-suitable-angular-version/31274670 ? I still get "unable to find a suitable version for angular". |
@sheerun I'm not sure. Let me check in regards to the "unable to find a suitable version for angular" issue. |
@sheerun Hope this makes sense, or makes your head spin a bit. From what I can see, the output of that bower.json file is the following.
angular-ui-grid Because semver MyApp requires requires angular This then restricts the range for angular that bower can work with Bower then found only three possible angular versions that satisfies some of the components but not all.
Breaking down the versions for the above angular gives us: angular
angular
angular
Therefore, bower with semver 5.x seems to be behaving as intended. |
Makes sense. As I said the benefits overweight drawbacks (backward-incompatibility can only happen if package consists of only prereleases and user required non-prerelease version), so I'm merging it. We'll rollback it, if we receive negative feedback. |
Would be nice to release that to npm :) |
Upgrading to latest version of semver to fix (#1817, #1845, #1851).
Possible breaking changes in regards to the way semvers handles pre-releases.
If a version has a prerelease tags (for example, 1.2.3-alpha.3) then it will only be allowed to satisfy comparator sets if at least one comparator with the same [major, minor, patch] tuple also has a prerelease tag.
For example, the range >1.2.3-alpha.0 would be allowed to match the version 1.2.3-alpha.7, but it would not be satisfied by * or 1.2.3. See semvers additional details.