Skip to content

Latest commit

 

History

History
73 lines (53 loc) · 2.8 KB

README.md

File metadata and controls

73 lines (53 loc) · 2.8 KB

semver.io

semver.io is a plaintext and JSON webservice that tracks all available versions of node.js and uses that version info to resolve semver range queries. It's used by heroku's node buildpack and is open-sourced on github.

On the command line

curl https://semver.io/node/stable
# {{current_stable_version}}

curl https://semver.io/node/unstable
# {{current_unstable_version}}

curl https://semver.io/node/resolve/0.8.x
# 0.8.26

In the browser

There a CORS-friendly HTTP endpoint at semver.io/node.json that gives you the whole kit and caboodle:

{
  "stable": "0.10.22",
  "unstable": "0.11.8",
  "versions": [
    "0.8.6",
    "...",
    "0.11.9"
  ]
}

Ranges

semver.io supports any range that isaacs/node-semver can parse. Here are some examples:

These named routes are also provided for convenience:

How does it work?

Under the hood, semver.io is powered by node-version-resolver, a node module that does all the work of talking to nodejs.org and parsing version data.

While currently only implemented for node, semver.io is designed to support any software that follows the semver rules.

What about npm versions?

npm versions are not tracked because the node binary has shipped with npm included since node 0.6.3. The buildpack ignores engines.npm, deferring to node for npm version resolution.

Links