heroku/heroku-buildpack-nodejs — pull request #131 by assaf (2014-12-04 04:34:34+00:00)
Title: Bypass semver.io and s3pository when not necessary to complete build

For context see: https://github.com/heroku/heroku-buildpack-nodejs/issues/129

1. If `package.json` specifies the exact Node version number, use that version number, do not make HTTP request to `semver.io`. All other version specs are resolved against `semver.io`.

The idea is to allow builds that target specific version the extra reliability of not depending on a separate service, so for the sake of simplicity, not extending this feature to unstable releases. Pre-release, RC, etc will all get resolved via `semver.io`.

2. If the requested version of Node already available in `/vendor`, use that version, otherwise download the requested version.

Determine if the previous build successfully installed Node, by checking that both the binary exist, and that it's executable. If you're running in VM/container that already has the correct version of Node deployed, this eliminates dependency on `s3pository.heroku.com`.