Permalink
Browse files

Merge pull request #31 from heroku/update_default_versions

default to latest versions of node and npm
  • Loading branch information...
2 parents faee766 + 978ee28 commit 427bd1e7d84238c8c4c3502bd1bf9fdc2c352323 @zeke zeke committed Mar 11, 2013
Showing with 12 additions and 13 deletions.
  1. +10 −11 bin/compile
  2. +2 −2 bin/test
View
@@ -60,15 +60,17 @@ function resolve_version() {
requested_version="$2"
default_version="$3"
+ args=""
+ for version in $available_versions; do args="${args} -v \"${version}\""; done
+
if [ "$2" == "" ]; then
- echo $3
+ args="${args} -r \"${default_version}\"";
else
- args=""
- for version in $available_versions; do args="${args} -v \"${version}\""; done
- for version in $requested_version; do args="${args} -r \"${version}\""; done
- evaluated_version=$(eval $bootstrap_node/bin/node $LP_DIR/vendor/node-semver/bin/semver ${args} || echo "")
- echo "$evaluated_version" | tail -n 1
+ args="${args} -r \"${requested_version}\"";
fi
+
+ evaluated_versions=$(eval $bootstrap_node/bin/node $LP_DIR/vendor/node-semver/bin/semver ${args} || echo "")
+ echo "$evaluated_versions" | tail -n 1
}
function package_engine_version() {
@@ -107,8 +109,8 @@ declare -A engine_versions
declare -A engine_defaults
declare -A engine_requests
-engine_defaults["node"]="0.4.7"
-engine_defaults["npm"]="1.0.106"
+engine_defaults["node"]="0.10.x"
+engine_defaults["npm"]="1.2.x"
engine_versions["node"]=$(manifest_versions "nodejs")
engine_requests["node"]=$(package_engine_version "node")
@@ -124,9 +126,6 @@ if [ "${engine_requests["node"]}" == "" ]; then
echo "WARNING: No version of Node.js specified in package.json, see:" | indent
echo "https://devcenter.heroku.com/articles/nodejs-versions" | indent
echo
- echo "WARNING: The default version of Node.js and npm on Heroku will begin" | indent
- echo "tracking the latest stable release starting September 1, 2012." | indent
- echo
fi
NODE_VERSION=$(package_resolve_version "node")
View
@@ -30,8 +30,8 @@ testPackageJsonWithVersion() {
testPackageJsonWithoutVersion() {
compile "package-json-noversion"
assertCaptured "WARNING: No version of Node.js specified"
- assertCaptured "Using Node.js version: 0.4.7"
- assertCaptured "Using npm version: 1.0.106"
+ assertCaptured "Using Node.js version: 0.10"
+ assertCaptured "Using npm version: 1.2"
assertCapturedSuccess
}

0 comments on commit 427bd1e

Please sign in to comment.