https://github.com/hugojosefson/deno-semver-version
Web service for finding latest release of a repo, from a semver range.
https://github.com/hugojosefson/deno-semver-version
api github latest range release semver tag version
Last synced: 2 months ago
JSON representation
Web service for finding latest release of a repo, from a semver range.
- Host: GitHub
- URL: https://github.com/hugojosefson/deno-semver-version
- Owner: hugojosefson
- License: mit
- Created: 2022-07-17T12:45:51.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2025-12-27T17:34:50.000Z (6 months ago)
- Last Synced: 2025-12-29T15:42:00.347Z (6 months ago)
- Topics: api, github, latest, range, release, semver, tag, version
- Language: TypeScript
- Homepage: https://semver-version.deno.dev
- Size: 55.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# semver.se.deno.net
Web service API for finding the latest release of a repo, from a semver range.
Similar to Matt Andrews'
[semver-as-a-service](https://github.com/matthew-andrews/semver-as-a-service).
## Usage
Make an HTTP `GET` request to an API endpoint, and get the relevant version as a
`text/plain` response.
### API Endpoints
#### Latest version
`GET https://semver.se.deno.net/api/github/:owner/:repo`
Finds the latest git tag for a Github repo.
Examples:
```sh
curl -f https://semver.se.deno.net/api/github/ziglang/zig
curl -f https://semver.se.deno.net/api/github/denoland/fresh
```
#### Range
`GET https://semver.se.deno.net/api/github/:owner/:repo/:range`
Finds the latest git tag for a Github repo, that satisfies a specified
[semantic Versioning range](https://devhints.io/semver).
Examples:
```sh
curl -f https://semver.se.deno.net/api/github/ziglang/zig/0.8
curl -f https://semver.se.deno.net/api/github/denoland/fresh/1
```
> When specifying a range, the range must be a valid semver range. It must also
> be correctly URI encoded.
>
> For example, the URI encoding of `>=0.7 <0.8` is `%3E%3D0.7%20%3C0.8`:
>
> ```js
> encodeURIComponent(">=0.7 <0.8");
> // "%3E%3D0.7%20%3C0.8"
> ```
>
> So to get the version of `ziglang/zig` that satisfies the range `>=0.7 <0.8`,
> you would do:
>
> ```sh
> curl -f https://semver.se.deno.net/api/github/ziglang/zig/"%3E%3D0.7%20%3C0.8"
> ```
>
> ...and get:
>
> ```
> 0.7.1
> ```
## Contributing
### Local development
Start the project:
```
deno task dev
```
This will watch the project directory and restart as necessary.