mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Merge pull request #697 from knolleary/node12
Add node 0.12 to Travis config and fix resulting errors
This commit is contained in:
commit
90b8806e7c
@ -2,6 +2,7 @@ language: node_js
|
||||
before_install:
|
||||
- npm install -g npm@~1.4.18
|
||||
node_js:
|
||||
- "0.12"
|
||||
- "0.10"
|
||||
script:
|
||||
- istanbul cover ./node_modules/.bin/grunt --report lcovonly && istanbul report text && ( cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js || true ) && rm -rf coverage
|
||||
|
@ -106,16 +106,28 @@ module.exports = function(RED) {
|
||||
this.status({fill:"yellow",shape:"dot",text:""+converted});
|
||||
}
|
||||
} catch(err) {
|
||||
var errorMessage = err.toString();
|
||||
|
||||
var line = 0;
|
||||
var errorMessage;
|
||||
var stack = err.stack.split(/\r?\n/);
|
||||
if (stack.length > 0) {
|
||||
var m = /at undefined:(\d+):(\d+)$/.exec(stack[1]);
|
||||
while(line < stack.length && stack[line].indexOf("ReferenceError") !== 0) {
|
||||
line++;
|
||||
}
|
||||
|
||||
if (line < stack.length) {
|
||||
errorMessage = stack[line];
|
||||
var m = /:(\d+):(\d+)$/.exec(stack[line+1]);
|
||||
if (m) {
|
||||
var line = Number(m[1])-1;
|
||||
var cha = m[2];
|
||||
errorMessage += " (line "+line+", col "+cha+")";
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!errorMessage) {
|
||||
errorMessage = err.toString();
|
||||
}
|
||||
this.error(errorMessage, msg);
|
||||
}
|
||||
});
|
||||
|
@ -31,7 +31,7 @@
|
||||
"nopt": "3.0.2",
|
||||
"mqtt": "0.3.x",
|
||||
"ws": "0.7.2",
|
||||
"fs-extra": "0.18.4",
|
||||
"fs-extra": "0.21.0",
|
||||
"clone": "1.0.2",
|
||||
"mustache": "2.1.1",
|
||||
"cron":"1.0.9",
|
||||
|
@ -23,7 +23,7 @@ var child_process = require('child_process');
|
||||
|
||||
describe('exec node', function() {
|
||||
|
||||
before(function(done) {
|
||||
beforeEach(function(done) {
|
||||
helper.startServer(done);
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user