Comparing version 2.11.1 to 2.11.2
@@ -23,3 +23,13 @@ var readdir = require("fs-readdir-recursive"); | ||
var result = to5.transform(code, opts); | ||
var result; | ||
try { | ||
result = to5.transform(code, opts); | ||
} catch (e) { | ||
if (e instanceof SyntaxError) { | ||
console.error("SyntaxError:", e.message); | ||
process.exit(1); | ||
} else { | ||
throw e; | ||
} | ||
} | ||
result.filename = filename; | ||
@@ -26,0 +36,0 @@ result.actual = code; |
@@ -110,3 +110,12 @@ var util = require("../../util"); | ||
this.space(); | ||
print(node.handler); | ||
// Esprima bug puts the catch clause in a `handlers` array. | ||
// see https://code.google.com/p/esprima/issues/detail?id=433 | ||
// We run into this from regenerator generated ast. | ||
if (node.handlers) { | ||
print(node.handlers[0]); | ||
} else { | ||
print(node.handler); | ||
} | ||
if (node.finalizer) { | ||
@@ -113,0 +122,0 @@ this.space(); |
{ | ||
"name": "6to5-core", | ||
"description": "Turn ES6 code into readable vanilla ES5 with source maps", | ||
"version": "2.11.1", | ||
"version": "2.11.2", | ||
"author": "Sebastian McKenzie <sebmck@gmail.com>", | ||
@@ -6,0 +6,0 @@ "homepage": "https://github.com/6to5/6to5", |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4205661
17988