heroku/heroku-buildpack-nodejs — pull request #95 by zeke (2014-01-21 21:45:44+00:00)
Title: Namespaced caching and node runtime version tracking

Changes are as follows:

- Cache everything one level deeper (inside `$cache_dir/node`) to avoid clobbering cached artifacts from other buildpacks.
- Store `node-version` file in new `.heroku` directory, in both the slug _and_ the cache.
- Run `npm rebuild` after restoring node_modules when current node version differs from last-deployed node version.

Sample build output:

```
-----> Pruning cached dependencies not specified in package.json
-----> Node version changed since last build; rebuilding dependencies
express@3.3.8 /tmp/build_f2d52764-e024-458a-b842-267760370fa6/node_modules/express
connect@2.8.8 /tmp/build_f2d52764-e024-458a-b842-267760370fa6/node_modules/express/node_modules/connect
qs@0.6.5 /tmp/build_f2d52764-e024-458a-b842-267760370fa6/node_modules/express/node_modules/connect/node_modules/qs
formidable@1.0.14 /tmp/build_f2d52764-e024-458a-b842-267760370fa6/node_modules/express/node_modules/connect/node_modules/formidable
...
```