Merge pull request #2938 from Bartvds/runner/110

switched tester to tsc 1.1.0-1
This commit is contained in:
Bart van der Schoor
2014-10-08 00:18:48 +02:00
2 changed files with 33 additions and 7 deletions
+22
View File
@@ -1 +1,23 @@
var path = require('path');
var fs = require('fs');
function readJSON(target) {
return JSON.parse(fs.readFileSync(target, 'utf8'));
}
function getSemFloat(str) {
var m = /^[^\d]*(\d+)\.(\d+)/.exec(str);
return parseFloat(m[1] + '.' + m[2]);
}
var repo = readJSON(path.resolve(__dirname, '..', 'package.json'));
var testerPath = path.resolve(__dirname, '..', 'node_modules', 'definition-tester', 'package.json');
// ultra lame semver major/minor check
if (!fs.existsSync(testerPath) || getSemFloat(repo.dependencies['definition-tester']) > getSemFloat(readJSON(testerPath).version)) {
console.log('DefinitelyTyped tester needs an update!\n\n please run \'npm install\'\n');
process.exit(1);
}
require('definition-tester');
+11 -7
View File
@@ -20,16 +20,20 @@
"node": ">= 0.10.0"
},
"scripts": {
"test": "node ./_infrastructure/runner.js --test-changes",
"changes": "node ./_infrastructure/runner.js --test-changes",
"lint": "node ./_infrastructure/runner.js --lint-changes",
"all": "node ./_infrastructure/runner.js",
"dry": "node ./_infrastructure/runner.js --skip-tests --test-changes",
"list": "node ./_infrastructure/runner.js --skip-tests --print-files --print-refmap",
"test": "node ./_infrastructure/runner.js --changes",
"changes": "node ./_infrastructure/runner.js --changes",
"lint": "node ./_infrastructure/runner.js --lint",
"tscparams": "node ./_infrastructure/runner.js --tscparams --no-tests --no-headers",
"all": "node ./_infrastructure/runner.js ",
"dry": "node ./_infrastructure/runner.js --dry --changes",
"list": "node ./_infrastructure/runner.js --dry --print-files --print-refmap",
"last": "node ./_infrastructure/runner.js --dry --print-files --print-refmap --changes",
"files": "node ./_infrastructure/runner.js --dry --print-files",
"refmap": "node ./_infrastructure/runner.js --dry --print-refmap",
"help": "node ./_infrastructure/runner.js -h"
},
"dependencies": {
"definition-tester": "~0.0.4"
"definition-tester": "~0.1.4"
},
"devDependencies": {}
}