Git Product home page Git Product logo

semver.io's Introduction

👷‍♀️This project is in maintenance mode. It is still used by older buildpacks, but is no longer being actively updated.

semver.io

semver.io is a plaintext and JSON webservice that tracks all available versions of node.js, iojs, npm, yarn, nginx, and mongodb. It uses that version info to resolve semver range queries. It's used by Heroku's node buildpack and is open-sourced on GitHub.

Other sources

Semver.io uses a simple and short module system to pull version data from a variety of sources. Pull requests are welcome! You can start with one of the current implementations as a template:

Usage

Command-line

curl https://semver.io/node/stable
0.10.33

curl https://semver.io/node/unstable
0.11.14

curl https://semver.io/node/resolve/0.8.x
0.8.28

curl https://semver.io/nginx/stable
1.6.2

In the browser

There are CORS-friendly HTTP endpoints for each source with the whole kit and caboodle:

The response is something like:

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

Ranges

semver.io supports any range that node-semver can parse. For example:

These named routes are also provided for convenience (for each source):

Links

semver.io's People

Contributors

danieltdt avatar hunterloftis avatar jmorrell avatar mathieug avatar matthew-andrews avatar mgol avatar vincentbernat avatar zeke avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

semver.io's Issues

Add support for yarn

Many people & projects (like Angular) are now using yarn instead of npm so it'd be cool if semver.io supported it.

Node stable/unstable confusion

It seems like the Node stable and unstable have been mixed up.

https://semver.io/node/stable => 5.11.1
https://semver.io/node/unstable => 6.2.1

I would expect the LTS version (6.2.1) to be the stable version. Is this the expected behaviour? I don't mind giving the code a jab to fix things up, I just wanted a heads-up before I do so.

@hunterloftis

Autorestart

The semver.io app currently downloads the latest info from nodejs.org at startup. In order to keep the node version information more fresh, I want to restart every fifteen minutes or so, instead of once a day when the dynos roll.

@jclem @ddollar, how would you go about this? Heroku Scheduler + an npm task? Modify the app to make it re-initialize itself?

Yarn Versions Sometimes Fail to Load

Sometimes this route will load the data I expect, but sometimes it will not. Refreshing the browser seems to randomly provide valid or invalid responses. This happens for Yarn and NPM, but not the others, as far as I can tell.

https://semver.io/yarn.json

https://semver.io/npm.json

{"all":[],"stableVersions":[]}
{"stable":"1.16.0","unstable":"1.16.0","all":["0.1.0","0.1.1","0.1.2","0.1.3","0.15.1","0.16.0","0.16.1","0.17.0","0.17.2","0.17.3","0.17.4","0.17.5","0.17.6","0.17.7","0.17.8","0.17.9","0.17.10","0.18.0","0.18.1","0.18.2","0.19.0","0.19.1","0.20.0","0.20.3","0.20.4","0.21.0","0.21.1","0.21.2","0.21.3","0.22.0","0.23.0","0.23.1","0.23.2","0.23.3","0.23.4","0.24.0","0.24.1","0.24.2","0.24.3","0.24.4","0.24.5","0.24.6","0.25.1","0.25.2","0.25.3","0.25.4","0.26.0","0.26.1","0.27.0","0.27.1","0.27.2","0.27.3","0.27.4","0.27.5","0.28.1","0.28.4","1.0.0","1.0.1","1.0.2","1.1.0","1.2.0","1.2.1","1.3.1","1.3.2","1.4.0","1.5.0","1.5.1","1.6.0","1.7.0","1.8.0","1.9.1","1.9.2","1.9.4","1.10.0","1.10.1","1.11.0","1.11.1","1.12.0","1.12.1","1.12.3","1.13.0","1.14.0","1.15.0","1.15.1","1.15.2","1.16.0"],"stableVersions":["0.1.0","0.1.1","0.1.2","0.1.3","0.15.1","0.16.0","0.16.1","0.17.0","0.17.2","0.17.3","0.17.4","0.17.5","0.17.6","0.17.7","0.17.8","0.17.9","0.17.10","0.18.0","0.18.1","0.18.2","0.19.0","0.19.1","0.20.0","0.20.3","0.20.4","0.21.0","0.21.1","0.21.2","0.21.3","0.22.0","0.23.0","0.23.1","0.23.2","0.23.3","0.23.4","0.24.0","0.24.1","0.24.2","0.24.3","0.24.4","0.24.5","0.24.6","0.25.1","0.25.2","0.25.3","0.25.4","0.26.0","0.26.1","0.27.0","0.27.1","0.27.2","0.27.3","0.27.4","0.27.5","0.28.1","0.28.4","1.0.0","1.0.1","1.0.2","1.1.0","1.2.0","1.2.1","1.3.1","1.3.2","1.4.0","1.5.0","1.5.1","1.6.0","1.7.0","1.8.0","1.9.1","1.9.2","1.9.4","1.10.0","1.10.1","1.11.0","1.11.1","1.12.0","1.12.1","1.12.3","1.13.0","1.14.0","1.15.0","1.15.1","1.15.2","1.16.0"],"updated":"2019-06-06T16:07:40.066Z"}

This was causing our CI builds to fail.

Provide optional list of versions to match against

This is a great tool and is quite helpful for the nodenv ecosystem. @hurrymaplelad built a plugin for nodenv that lets nodenv pull its version from package.json engines instead of .node-version. It is using this service to determine the best node version that satisfies the version spec from engines. However, that's only half the puzzle for nodenv. In addition to simply finding the maximum version match for a given semver range, we would like to take into account versions that are installed.

I would love to see the ability to pass a semver range and also a list of versions, and have semver.io select the best option available from the provided list (defaulting to current behavior if none match).

Since this would be an optional extra parameter (array), then omitting it does not alter current behavior.

Example:

https://semver.io/node/resolve?range=>%3D4.0.0
5.0.0

https://semver.io/node/resolve?range=>%3D4.0.0&v=4.2.1
4.2.1

https://semver.io/node/resolve?range=>%3D4.0.0&v=4.0.0&v=4.1.0&v=4.2.1
4.2.1

https://semver.io/node/resolve?range=>%3D4.0.0&v=0.10.0&v=0.12.0
5.0.0

Thoughts?

iojs is incorrectly resolving to v 4.0.0

❯ curl --get --data-urlencode "range=2.5.x" https://semver.herokuapp.com/iojs/resolve
4.0.0

This is causing Heroku deploys to fail for iojs:

remote: -----> Installing binaries
remote:        engines.iojs (package.json):  2.5.x (iojs)
remote:        engines.npm (package.json):   unspecified (use default)
remote:
remote:        Resolving iojs version 2.5.x via semver.io...
remote:        Downloading and installing iojs 4.0.0...
remote:        Unable to download iojs 4.0.0; does it exist?
remote:
remote: -----> Build failed
remote:
remote:        We're sorry this build is failing! You can troubleshoot common issues here:
remote:        https://devcenter.heroku.com/articles/troubleshooting-node-deploys
remote:
remote:        If you're stuck, please submit a ticket so we can help:
remote:        https://help.heroku.com/
remote:
remote:        Love,
remote:        Heroku
remote:
remote:
remote:  !     Push rejected, failed to compile Node.js app

How to handle pre-release and LTS versions of Node post v4.0.0

The Node.js and io.js projects have merged and had their first unified release: Node 4.0.0

In October 2015 the Node Foundation will take a snapshot of the then stable version of v4 (eg. 4.1.7) which will become the first LTS (Long Term Support) version of Node with support until April 2017. At the same time a pre-release version Node 5.0.0 will be made available.

This issue is here to track suggestion for how semver.io will handle pre-release and LTS versions of Node post v4.0.0 now that Node has moved away from it's linux style odd:unstable::even:stable versioning system and is now SemVer compliant.

document support for query params

Hi @jmorrell !!!

I want to open a PR documenting support for the range query param:

$ curl "https://semver.io/node/resolve/?range=^8.3.0"
8.11.1

Before I do so, just want to make sure it's wanted, and that it has a chance of being merged :)

Versions in README are out of date

Are these updated manually now? If so, I can submit a PR with latest results.

curl https://semver.io/node/stable
0.10.33

curl https://semver.io/node/unstable
0.11.14

curl https://semver.io/node/resolve/0.8.x
0.8.28

curl https://semver.io/nginx/stable
1.6.2

https://semver.io is now sunset

This project has been deprecated since 2019 (#69), and the Heroku instance of the project is due to be switched off shortly.

As such, any consumers of https://semver.io, https://www.semver.io or https://semver.herokuapp.com should migrate to another solution, or host their own version of the site using the source here.

Alternatively, if all you need is a list of Node.js versions or to find out which is the latest (rather than semver range expression parsing etc), you could use one of these newer options directly:
https://nodejs.org/dist/index.json
https://raw.githubusercontent.com/nodejs/Release/main/schedule.json
https://www.npmjs.com/package/node-release-lines

If you are using a buildpack and are getting semver.io related errors - you are likely pinned to an outdated version tag of a buildpack, or using an unmaintained fork. Switch to an official/maintained buildpack instead:
https://devcenter.heroku.com/articles/buildpacks#officially-supported-buildpacks

stable incorrectly omits some versions

The IoJsSource.prototype._parse function incorrectly assumes that a non-even minor means the version is unstable. This was only a valid convention for Node.js, it was never valid for io.js. All io.js versions are considered final & stable. io.js follows semver.

In particular, this incorrectly marks io.js 2.1.0 as unstable.

The logic should be removed in the io.js case.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.