From a2987f4a36ec87bc300a327eb63cb88f827b3769 Mon Sep 17 00:00:00 2001 From: Lloyd Hilaiel <lloyd@hilaiel.com> Date: Tue, 29 Nov 2011 13:15:19 -0700 Subject: [PATCH] express our dependency on nodejs >= 0.6.3 in package.json and in code. (note: I'm not sure package.json actually does anything useful, but it's a good place to document it)c --- lib/configuration.js | 10 ++++++++++ package.json | 3 +++ 2 files changed, 13 insertions(+) diff --git a/lib/configuration.js b/lib/configuration.js index 6c87b32b9..0e231f386 100644 --- a/lib/configuration.js +++ b/lib/configuration.js @@ -49,6 +49,16 @@ urlparse = require('urlparse'), secrets = require('./secrets'), temp = require('temp'); +// verify the proper version of node.js is in use +try { + var m = /^v0.6.(\d+)$/.exec(process.version); + if (!m) throw process.version + " version not supported"; + if (!(parseInt(m[1], 10) >= 3)) throw "0.6." + m[1] + " not supported" ; +} catch (e) { + process.stderr.write("node 0.6.3 required" + (e ? (" (" + e.toString() + ")") : "") + "\n"); + process.exit(1); +} + var g_config = { }; diff --git a/package.json b/package.json index f69ed26da..9eae7bba4 100644 --- a/package.json +++ b/package.json @@ -36,5 +36,8 @@ "postinstall": "./scripts/generate_ephemeral_keys.sh", "test": "./scripts/run_all_tests.sh", "start": "./scripts/run_locally.js" + }, + "engines": { + "node": ">= 0.6.3" } } -- GitLab