source-map-support
Advanced tools
Comparing version 0.4.11 to 0.4.12
{ | ||
"name": "source-map-support", | ||
"description": "Fixes stack traces for files with source maps", | ||
"version": "0.4.11", | ||
"version": "0.4.12", | ||
"main": "./source-map-support.js", | ||
@@ -13,3 +13,3 @@ "scripts": { | ||
"dependencies": { | ||
"source-map": "^0.5.3" | ||
"source-map": "^0.5.6" | ||
}, | ||
@@ -16,0 +16,0 @@ "devDependencies": { |
100
test.js
@@ -95,3 +95,3 @@ require('./source-map-support').install({ | ||
} catch (e) { | ||
compareLines(e.stack.split('\n'), expected); | ||
compareLines(e.stack.split(/\r\n|\n/), expected); | ||
} | ||
@@ -109,3 +109,3 @@ fs.unlinkSync('.generated.js'); | ||
} catch (e) { | ||
compareLines(e.stack.split('\n'), expected); | ||
compareLines(e.stack.split(/\r\n|\n/), expected); | ||
} | ||
@@ -125,3 +125,3 @@ fs.unlinkSync('.generated.js'); | ||
.trim() | ||
.split('\n') | ||
.split(/\r\n|\n/) | ||
.filter(function (line) { return line !== '' }), // Empty lines are not relevant. | ||
@@ -145,3 +145,3 @@ expected | ||
'Error: test', | ||
/^ at Object\.exports\.test \((?:.*\/)?line1\.js:1001:101\)$/ | ||
/^ at Object\.exports\.test \((?:.*[/\\])?line1\.js:1001:101\)$/ | ||
]); | ||
@@ -158,4 +158,4 @@ }); | ||
'Error: test', | ||
/^ at foo \((?:.*\/)?line2\.js:1002:102\)$/, | ||
/^ at Object\.exports\.test \((?:.*\/)?line4\.js:1004:104\)$/ | ||
/^ at foo \((?:.*[/\\])?line2\.js:1002:102\)$/, | ||
/^ at Object\.exports\.test \((?:.*[/\\])?line4\.js:1004:104\)$/ | ||
]); | ||
@@ -175,5 +175,5 @@ }); | ||
'Error: test', | ||
/^ at bar \((?:.*\/)?line3\.js:1003:103\)$/, | ||
/^ at foo \((?:.*\/)?line5\.js:1005:105\)$/, | ||
/^ at Object\.exports\.test \((?:.*\/)?line7\.js:1007:107\)$/ | ||
/^ at bar \((?:.*[/\\])?line3\.js:1003:103\)$/, | ||
/^ at foo \((?:.*[/\\])?line5\.js:1005:105\)$/, | ||
/^ at Object\.exports\.test \((?:.*[/\\])?line7\.js:1007:107\)$/ | ||
]); | ||
@@ -189,5 +189,5 @@ }); | ||
// Before Node 4, `Object.eval`, after just `eval`. | ||
/^ at (?:Object\.)?eval \(eval at (<anonymous>|exports.test) \((?:.*\/)?line1\.js:1001:101\)/, | ||
/^ at (?:Object\.)?eval \(eval at (<anonymous>|exports.test) \((?:.*[/\\])?line1\.js:1001:101\)/, | ||
/^ at Object\.exports\.test \((?:.*\/)?line1\.js:1001:101\)$/ | ||
/^ at Object\.exports\.test \((?:.*[/\\])?line1\.js:1001:101\)$/ | ||
]); | ||
@@ -201,5 +201,5 @@ }); | ||
'Error: test', | ||
/^ at (?:Object\.)?eval \(eval at (<anonymous>|exports.test) \(eval at (<anonymous>|exports.test) \((?:.*\/)?line1\.js:1001:101\)/, | ||
/^ at (?:Object\.)?eval \(eval at (<anonymous>|exports.test) \((?:.*\/)?line1\.js:1001:101\)/, | ||
/^ at Object\.exports\.test \((?:.*\/)?line1\.js:1001:101\)$/ | ||
/^ at (?:Object\.)?eval \(eval at (<anonymous>|exports.test) \(eval at (<anonymous>|exports.test) \((?:.*[/\\])?line1\.js:1001:101\)/, | ||
/^ at (?:Object\.)?eval \(eval at (<anonymous>|exports.test) \((?:.*[/\\])?line1\.js:1001:101\)/, | ||
/^ at Object\.exports\.test \((?:.*[/\\])?line1\.js:1001:101\)$/ | ||
]); | ||
@@ -216,5 +216,5 @@ }); | ||
'Error: test', | ||
/^ at eval \(eval at foo \((?:.*\/)?line2\.js:1002:102\)/, | ||
/^ at foo \((?:.*\/)?line2\.js:1002:102\)/, | ||
/^ at Object\.exports\.test \((?:.*\/)?line4\.js:1004:104\)$/ | ||
/^ at eval \(eval at foo \((?:.*[/\\])?line2\.js:1002:102\)/, | ||
/^ at foo \((?:.*[/\\])?line2\.js:1002:102\)/, | ||
/^ at Object\.exports\.test \((?:.*[/\\])?line4\.js:1004:104\)$/ | ||
]); | ||
@@ -229,3 +229,3 @@ }); | ||
/^ at (?:Object\.)?eval \(sourceURL\.js:1:7\)$/, | ||
/^ at Object\.exports\.test \((?:.*\/)?line1\.js:1001:101\)$/ | ||
/^ at Object\.exports\.test \((?:.*[/\\])?line1\.js:1001:101\)$/ | ||
]); | ||
@@ -240,4 +240,4 @@ }); | ||
/^ at (?:Object\.)?eval \(sourceURL\.js:1:7\)$/, | ||
/^ at (?:Object\.)?eval \(eval at (<anonymous>|exports.test) \((?:.*\/)?line1\.js:1001:101\)/, | ||
/^ at Object\.exports\.test \((?:.*\/)?line1\.js:1001:101\)$/ | ||
/^ at (?:Object\.)?eval \(eval at (<anonymous>|exports.test) \((?:.*[/\\])?line1\.js:1001:101\)/, | ||
/^ at Object\.exports\.test \((?:.*[/\\])?line1\.js:1001:101\)$/ | ||
]); | ||
@@ -251,3 +251,3 @@ }); | ||
'Error: 1', | ||
/\/.original\.js/, | ||
/[/\\].original\.js/, | ||
/at Array\.map \(native\)/ | ||
@@ -270,3 +270,3 @@ ]); | ||
'Error: test', | ||
/^ at Object\.exports\.test \((?:.*\/)?.generated.js:1:34\)$/ | ||
/^ at Object\.exports\.test \((?:.*[/\\])?.generated.js:1:34\)$/ | ||
]); | ||
@@ -282,7 +282,7 @@ }); | ||
], [ | ||
/\/.generated.js:3$/, | ||
/[/\\].generated.js:3$/, | ||
' throw new Error("this is the error")', | ||
/^ \^$/, | ||
'Error: this is the error', | ||
/^ at ((null)|(Timeout))\._onTimeout \((?:.*\/)?.generated.js:3:11\)$/ | ||
/^ at ((null)|(Timeout))\._onTimeout \((?:.*[/\\])?.generated.js:3:11\)$/ | ||
]); | ||
@@ -296,3 +296,3 @@ }); | ||
'Error: test', | ||
/^ at Object\.exports\.test \((?:.*\/)?.generated.js:1:34\)$/ | ||
/^ at Object\.exports\.test \((?:.*[/\\])?.generated.js:1:34\)$/ | ||
]); | ||
@@ -306,3 +306,3 @@ }); | ||
'Error: test', | ||
/^ at Object\.exports\.test \((?:.*\/)?original.js:1001:5\)$/ | ||
/^ at Object\.exports\.test \((?:.*[/\\])?original.js:1001:5\)$/ | ||
]); | ||
@@ -317,3 +317,3 @@ }); | ||
'Error: test', | ||
/^ at Object\.exports\.test \((?:.*\/)?original.js:1002:5\)$/ | ||
/^ at Object\.exports\.test \((?:.*[/\\])?original.js:1002:5\)$/ | ||
]); | ||
@@ -330,7 +330,7 @@ }); | ||
], [ | ||
/\/.original\.js:1$/, | ||
/[/\\].original\.js:1$/, | ||
'this is the original code', | ||
'^', | ||
'Error: this is the error', | ||
/^ at foo \((?:.*\/)?.original\.js:1:1\)$/ | ||
/^ at foo \((?:.*[/\\])?.original\.js:1:1\)$/ | ||
]); | ||
@@ -346,7 +346,7 @@ }); | ||
], [ | ||
/\/.original\.js:1$/, | ||
/[/\\].original\.js:1$/, | ||
'this is the original code', | ||
'^', | ||
'Error: this is the error', | ||
/^ at foo \((?:.*\/)?.original\.js:1:1\)$/ | ||
/^ at foo \((?:.*[/\\])?.original\.js:1:1\)$/ | ||
]); | ||
@@ -362,3 +362,3 @@ }); | ||
], [ | ||
/\/.generated.js:2$/, | ||
/[/\\].generated.js:2$/, | ||
'function foo() { throw new Error("this is the error"); }', | ||
@@ -371,3 +371,3 @@ | ||
'Error: this is the error', | ||
/^ at foo \((?:.*\/)?.original\.js:1:1\)$/ | ||
/^ at foo \((?:.*[/\\])?.original\.js:1:1\)$/ | ||
]); | ||
@@ -383,7 +383,7 @@ }); | ||
], [ | ||
/\/.generated.js:2$/, | ||
/[/\\].generated.js:2$/, | ||
'function foo() { throw new Error("this is the error"); }', | ||
/^ (?: )?\^$/, | ||
'Error: this is the error', | ||
/^ at foo \((?:.*\/)?.generated.js:2:24\)$/ | ||
/^ at foo \((?:.*[/\\])?.generated.js:2:24\)$/ | ||
]); | ||
@@ -399,7 +399,7 @@ }); | ||
], [ | ||
/\/.generated.js:2$/, | ||
/[/\\].generated.js:2$/, | ||
'function foo() { throw new Error("this is the error"); }', | ||
/^ (?: )?\^$/, | ||
'Error: this is the error', | ||
/^ at foo \((?:.*\/)?.generated.js:2:24\)$/ | ||
/^ at foo \((?:.*[/\\])?.generated.js:2:24\)$/ | ||
]); | ||
@@ -417,3 +417,3 @@ }); | ||
], [ | ||
/^SRC:.*\/.original.js:1$/, | ||
/^SRC:.*[/\\].original.js:1$/, | ||
'this is the original code', | ||
@@ -432,7 +432,7 @@ '^' | ||
], [ | ||
/\/original\.js:1002$/, | ||
/[/\\]original\.js:1002$/, | ||
' line 2', | ||
' ^', | ||
'Error: this is the error', | ||
/^ at foo \((?:.*\/)?original\.js:1002:5\)$/ | ||
/^ at foo \((?:.*[/\\])?original\.js:1002:5\)$/ | ||
]); | ||
@@ -460,5 +460,5 @@ }); | ||
'Error: this is the error', | ||
/^ at foo \((?:.*\/)?.generated.js:4:15\)$/, | ||
/^ at foo \((?:.*[/\\])?.generated.js:4:15\)$/, | ||
'Error: this is the error', | ||
/^ at foo \((?:.*\/)?.generated.js:4:15\)$/, | ||
/^ at foo \((?:.*[/\\])?.generated.js:4:15\)$/, | ||
'1', // The retrieval should only be attempted once | ||
@@ -494,5 +494,5 @@ ]); | ||
'Error: this is the error', | ||
/^ at foo \((?:.*\/)?original.js:1004:5\)$/, | ||
/^ at foo \((?:.*[/\\])?original.js:1004:5\)$/, | ||
'Error: this is the error', | ||
/^ at foo \((?:.*\/)?original.js:1004:5\)$/, | ||
/^ at foo \((?:.*[/\\])?original.js:1004:5\)$/, | ||
'1', // The retrieval should only be attempted once | ||
@@ -532,5 +532,5 @@ ]); | ||
'Error: this is the error', | ||
/^ at foo \(.*\/original.js:1004:5\)$/, | ||
/^ at foo \(.*[/\\]original.js:1004:5\)$/, | ||
'Error: this is the error', | ||
/^ at foo \(.*\/original.js:1004:5\)$/, | ||
/^ at foo \(.*[/\\]original.js:1004:5\)$/, | ||
'0', // The retrieval should only be attempted once | ||
@@ -549,3 +549,3 @@ ]); | ||
'Error: test', | ||
/^ at Object\.exports\.test \((?:.*\/)?line1\.js:1001:101\)$/ | ||
/^ at Object\.exports\.test \((?:.*[/\\])?line1\.js:1001:101\)$/ | ||
]; | ||
@@ -560,3 +560,3 @@ | ||
} catch (e) { | ||
compareLines(e.stack.split('\n'), expected); | ||
compareLines(e.stack.split(/\r\n|\n/), expected); | ||
} | ||
@@ -575,3 +575,3 @@ fs.unlinkSync('.generated.js'); | ||
'Error: test', | ||
/^ at Object\.exports\.test \((?:.*\/)?line1\.js:1001:101\)$/ | ||
/^ at Object\.exports\.test \((?:.*[/\\])?line1\.js:1001:101\)$/ | ||
]; | ||
@@ -587,3 +587,3 @@ | ||
} catch (e) { | ||
compareLines(e.stack.split('\n'), expected); | ||
compareLines(e.stack.split(/\r\n|\n/), expected); | ||
} | ||
@@ -590,0 +590,0 @@ fs.unlinkSync('.generated.js'); |
577896
Updatedsource-map@^0.5.6