Skip to content

ehrmann/semver-java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

semver-java

CircleCI

Java implementation of Semantic Versioning and Node Semantic Version specifiers

Use

Versions

new Version(1, 0, 1);
new Version(1, 0, 1, "beta3", null);
Version.of("1.0.1");

Stream.of("1.0.1", "1.0.0-beta.2", "1.0.0-beta.1")
    .map(Version::of)
    .sorted()
    .collect(Collectors.toList()); // 1.0.0-beta.1, 1.0.0-beta.2, 1.0.1

NodeVersionSpecs

NodeVersionSpec.of(">=1.0").isSatisfiedBy(Version.of("1.5.0") // true
NodeVersionSpec.of("latest").isSatisfiedBy(Version.of("1.5.0") // false
NodeVersionSpec.of("latest").isLatest() // true
NodeVersionSpec.of("*").isSatisfiedBy(Version.of("1.5.0") // true
NodeVersionSpec.of(">=1.5 <2.0.0").isSatisfiedBy(Version.of("1.6.0") // true

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages