Skip to content
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

Allow 2.0.0-beta's to use current templates. #44

Merged
merged 1 commit into from
Jun 19, 2015

Conversation

rwjblue
Copy link
Contributor

@rwjblue rwjblue commented Jun 19, 2015

For a few reasons the semver.satisfies function does not match
prelease versions in the same way as we want (it does make sense
though).

See https://github.com/npm/node-semver#prerelease-tags.

This PR switches over to use the simpler gt/lt methods which behaves
much more like what we need with prerelease versions.

A few examples using semver.lt:

> semver.lt('1.12.0-beta.1', '1.13.0')
true
> semver.lt('1.13.0-beta.1', '1.13.0')
true
> semver.lt('1.12.0', '1.13.0-beta.1')
true
> semver.lt('2.0.0', '1.13.0-beta.1')
false
> semver.lt('1.13.0', '1.13.0-beta.1')
false
> semver.lt('1.13.0-beta.1', '1.13.0-beta.1')
false

Thanks to @ef4 for pointing this out!

For a few reasons the `semver.satisfies` function does not match
prelease versions in the same way as we want (it does make sense
though).

See https://github.com/npm/node-semver#prerelease-tags.

This PR switches over to use the simpler `gt`/`lt` methods which behaves
much more like what we need with prerelease versions.

A few examples using `semver.lt`:

```
> semver.lt('1.12.0-beta.1', '1.13.0')
true
> semver.lt('1.13.0-beta.1', '1.13.0')
true
> semver.lt('1.12.0', '1.13.0-beta.1')
true
> semver.lt('2.0.0', '1.13.0-beta.1')
false
> semver.lt('1.13.0', '1.13.0-beta.1')
false
> semver.lt('1.13.0-beta.1', '1.13.0-beta.1')
false
```
@rwjblue rwjblue force-pushed the use-lt-instead-of-satisfieds branch from 9f7d326 to 5dc0a65 Compare June 19, 2015 15:05
@rwjblue
Copy link
Contributor Author

rwjblue commented Jun 19, 2015

Fixed issue with failing test (it was silly bower doing silly things).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants