semantic_compare
Version, currently 0.5.112 versions
- 0.5.1latestJun 19, 2020
- 0.5.0not indexedJun 19, 2020
- 0.4.0not indexedJun 19, 2020
- 0.3.2not indexedJun 19, 2020
- 0.3.1not indexedJun 19, 2020
- 0.3.0not indexedJun 19, 2020
- 0.2.3not indexedJun 19, 2020
- 0.2.2not indexedJun 19, 2020
- 0.2.1not indexedJun 19, 2020
- 0.2.0not indexedJun 19, 2020
- 0.1.1not indexedJun 19, 2020
- 0.1.0not indexedJun 19, 2020
github.com/j8r/semantic_compare
Compare semver versions using semantic expressions
5 stars
2 dependents
License: ISC
Installation
# Add this to your shard.yml
dependencies:
semantic_compare:
github: j8r/semantic_compare
version: ~> 0.5.1Then run:
shards installshard.yml
- Crystal
- no constraint declared
- License
- ISC
- Author
- Julien Reichardt
Dependencies
This version declares no dependencies.
README
SemanticCompare
Compare semver versions using semantic expressions.
Most of the npm's semver implementation expressions are supported.
This library is based on stdlib's SemanticVersion.
Documentation
https://j8r.github.io/semantic_compare
Installation
Add the dependency to your shard.yml:
dependencies:
semantic_compare:
github: j8r/semantic_compare
Usage
Compare with simple expressions
require "semantic_compare"
semantic_version = SemanticVersion.new "1.2.3"
SemanticCompare.simple_expression semantic_version, "<1.5.0" #=> true
SemanticCompare.simple_expression semantic_version, "1.2.0 - 1.4.0" #=> true
Compare with complex expressions, which can include 'or' || signs
require "semantic_compare"
# Compare with simple expressions
semantic_version = SemanticVersion.new "1.2.3"
SemanticCompare.complex_expression semantic_version, ">1.2.3 <2.0.0" #=> true
SemanticCompare.complex_expression semantic_version, ">=1.0.4 || <2.0.0 || ~1.2.1" #=> true
License
Copyright (c) 2017-2020 Julien Reichardt - ISC License
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This release
- Version
0.5.1- Tagged
- Jun 19, 2020
- Commit
2d941fccebc9- Indexed
- yes
Dependents
Repository
github.com/j8r/semantic_compare
Metadata
- Created
- Aug 12, 2026
- Updated
- Sep 25, 2026
- Synced
- Sep 25, 2026
- Versions
- 12