mirror of
https://github.com/TangentFoxy/semver.lua.git
synced 2025-07-29 19:42:20 +00:00
Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
32679b1947 | ||
|
35c69808f5 |
@@ -98,8 +98,9 @@ busted
|
|||||||
* Removed global variable which was declared by mistake
|
* Removed global variable which was declared by mistake
|
||||||
* Changed spec tool from telescope to busted
|
* Changed spec tool from telescope to busted
|
||||||
* Changed README format from textile to markdown
|
* Changed README format from textile to markdown
|
||||||
|
|
||||||
## v.1.2.0:
|
## v.1.2.0:
|
||||||
* Fix error: builds were being used for comparison, but according with semver 2.0.0 they should be ignored (so v'1.0.0-build1' is equal to v'1.0.0-build2')
|
* Fix error: builds were being used for comparison, but according with semver 2.0.0 they should be ignored (so v'1.0.0+build1' is equal to v'1.0.0+build2')
|
||||||
* Fix several errors and inconsistencies in the way the comparisons where implemented.
|
* Fix several errors and inconsistencies in the way the comparisons where implemented.
|
||||||
* Added a lot more tests to cover more edge cases when comparing versions
|
* Added a lot more tests to cover more edge cases when comparing versions
|
||||||
|
|
||||||
|
@@ -173,6 +173,7 @@ end
|
|||||||
-- if a and b are versions, a ^ b means "b is backwards-compatible with a"
|
-- if a and b are versions, a ^ b means "b is backwards-compatible with a"
|
||||||
-- in other words, "it's safe to upgrade from a to b"
|
-- in other words, "it's safe to upgrade from a to b"
|
||||||
function mt:__pow(other)
|
function mt:__pow(other)
|
||||||
|
if self.major == 0 then return false end
|
||||||
return self.major == other.major and
|
return self.major == other.major and
|
||||||
self.minor <= other.minor
|
self.minor <= other.minor
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user