Crates.io | latest-version |
lib.rs | latest-version |
version | 0.1.2 |
source | src |
created_at | 2021-06-04 19:28:34.811877 |
updated_at | 2021-06-06 19:58:47.400941 |
description | Check deps.dev for the latest version of artifacts |
homepage | https://github.com/knutwalker/latest-version/ |
repository | https://github.com/knutwalker/latest-version/ |
max_upload_size | |
id | 406242 |
size | 88,752 |
Check deps.dev for the latest version of any artifact
Pre-build binaries for the main architectures can be pulled from Github releases.
This project is published to crates.io, if you have a rust toolchain installed, you can also install via cargo:
cargo install latest-version
Alternatively, you can build from source.
This tool is build with Rust so you need to have a rust toolchain and cargo installed. If you don't, please visit https://rustup.rs/ and follow their instructions.
The preferred way is to run:
make install
If you do not have a fairly recent make (on macOS, homebrew can install a newer version),
or don't want to use make, you can also run cargo install --path .
.
Run latest-version --help
for an overview of all available options.
The main usage is by providing artifact coordinates in the form of [system:]groupId:artifact
, followed by multiple :version
qualifiers.
These version qualifier are Semantic Version Ranges.
For each of the provided versions, the latest available version on maven central is printed.
The version ranges can be left out, in which case the latest overall version is printed.
You can also enter multiple coordinates, each with their own versions to check against. The result are printed as they arrive, so they might be out of order.
Pre-releases can be included with the --include-pre-releases
flag (or -i
for short).
The versions are matched in order and a single version can only be matched by one qualifier. Previous matches will – depending on the range – consume all versions that would have also been matched by later qualifiers. Try to define the qualifiers in the order from most restrictive to least.
Matching against minor-compatible releases.
$ latest-version org.neo4j.gds:proc:~1.1:~1.3:1
Latest version for maven:org.neo4j.gds:proc matching >=1.1.0, <1.2.0: 1.1.6
Latest version for maven:org.neo4j.gds:proc matching >=1.3.0, <1.4.0: 1.3.5
Latest version for maven:org.neo4j.gds:proc matching >=1.0.0, <2.0.0: 1.6.0
Matching against major compatible releases. Note that 1.3
does not produce any match, as it is already covered by 1.1
.
$ latest-version org.neo4j.gds:proc:^1.1:^1.3:^1
Latest version for maven:org.neo4j.gds:proc matching >=1.1.0, <2.0.0: 1.6.0
No version for maven:org.neo4j.gds:proc matching >=1.3.0, <2.0.0
Latest version for maven:org.neo4j.gds:proc matching >=1.0.0, <2.0.0: 1.0.0
Inclusion of pre releases.
$ latest-version org.neo4j.gds:proc:~1.1:~1.3:1 --include-pre-releases
Latest version for maven:org.neo4j.gds:proc matching >=1.1.0, <1.2.0: 1.1.6
Latest version for maven:org.neo4j.gds:proc matching >=1.3.0, <1.4.0: 1.3.5
Latest version for maven:org.neo4j.gds:proc matching >=1.0.0, <2.0.0: 1.4.0-alpha02
Default version.
$ latest-version org.neo4j.gds:proc
Latest version for maven:org.neo4j.gds:proc matching >=0.0.0: 1.6.0
$ latest-version org.neo4j.gds:proc --include-pre-releases
Latest version for maven:org.neo4j.gds:proc matching *: 1.4.0-alpha02
Multiple checks.
$ latest-version org.neo4j.gds:proc org.neo4j:neo4j
Latest version for maven:org.neo4j.gds:proc matching >=0.0.0: 1.6.0
Latest version for maven:org.neo4j:neo4j matching >=0.0.0: 4.2.6
The default specifier searches for maven packages and uses the groupId:artifactId
scheme.
These specifiers can be prefixed with one of the available systems on deps.dev.
At the time this is:
maven
cargo
npm
go
The presence of a system selector changes the way that the remaining specifier is understood.
[maven:]$groupId:$artifactId
Maven packages require two components, the groupId
and the artifactId
.
This is also the default system.
The following calls are identical
$ latest-version org.neo4j:neo4j maven:org.neo4j:neo4j
Latest version for maven:org.neo4j:neo4j matching >=0.0.0: 4.2.6
Latest version for maven:org.neo4j:neo4j matching >=0.0.0: 4.2.6
The explicit maven:
can be used to search for artifacts that contain a group id that is also a system identifier, such as
cargo:cargo
.
Using cargo:cargo
will search the cargo
system for a cargo
crate.
Using maven:cargo:cargo
will search the maven
system for a cargo
groupId and a cargo
artifactId.
cargo:$crate
Cargo crates require an explicit cargo:
system identifier, followed by a single crate name.
$ latest-version cargo:lenient_semver
Latest version for cargo:lenient_semver matching >=0.0.0: 0.3.0
npm:[$scope:]$package
NPM packages require an explicit npm:
system identifier, followed by an optional scope, followed by the package.
In the easiest form, npm requires only a single package specifier
$ latest-version npm:neo4j-driver
Latest version for npm:neo4j-driver matching >=0.0.0: 4.3.0
In order to search for scoped packages, the scope needs be before the package name.
The scope can be separated via /
or :
and the leading @
is optional.
All of these are identical
$ latest-version npm:@types/neo4j npm:types/neo4j npm:@types:neo4j npm:types:neo4j
Latest version for npm:@types/neo4j matching >=0.0.0: 2.0.2
Latest version for npm:@types/neo4j matching >=0.0.0: 2.0.2
Latest version for npm:@types/neo4j matching >=0.0.0: 2.0.2
Latest version for npm:@types/neo4j matching >=0.0.0: 2.0.2
Searching for scoped packages where the package could be parsed as a version requirement,
such as @euler/1
requires the usage of either @
or /
to disambiguate from just searching for euler
and the version requirement 1
.
$ latest-version npm:euler:1 npm:@euler:1 npm:euler/1 npm:@euler/1
No version for npm:euler matching >=1.0.0, <2.0.0 # <- `npm:euler:1` -> unscoped `euler`, version 1
Latest version for npm:@euler/1 matching >=0.0.0: 0.0.5 # using `@` to disambiguate
Latest version for npm:@euler/1 matching >=0.0.0: 0.0.5 # using `/` disambiguate
Latest version for npm:@euler/1 matching >=0.0.0: 0.0.5 # using `@` and `/` to disambiguate
go:$user:$module
Go modules require an explicit go:
system identifier, followed by two more identifiers.
Those will be searched as the full module path github.com/$user/$module
.
To align the syntax with the :
as separator, github.com
can also be used instead of go
to specify a module from the github.com repository.
To use a different repository, you can specify the full path as a single argument.
The following are identical
$ latest-version go:neo4j:neo4j-go-driver go:github.com/neo4j/neo4j-go-driver github.com:neo4j:neo4j-go-driver
Latest version for go:github.com/neo4j/neo4j-go-driver matching >=0.0.0: v1.8.3
Latest version for go:github.com/neo4j/neo4j-go-driver matching >=0.0.0: v1.8.3
Latest version for go:github.com/neo4j/neo4j-go-driver matching >=0.0.0: v1.8.3
Note that using a single identifier with /
does require a repository:
$ latest-version go:neo4j/neo4j-go-driver
No version for go:neo4j/neo4j-go-driver matching >=0.0.0
latest-version
uses Open Source Insights (deps.dev) to provide the data.
Package information is usually up to date within the hour.
See What packages does Insights cover? and How fresh is the information? for more information.
License: MIT OR Apache-2.0