power-assert-formatter
Advanced tools
Comparing version 0.7.0 to 0.7.1
{ | ||
"name": "power-assert-formatter", | ||
"version": "0.7.0", | ||
"version": "0.7.1", | ||
"main": "lib/power-assert-formatter.js", | ||
@@ -5,0 +5,0 @@ "ignore": [ |
@@ -30,3 +30,3 @@ /** | ||
var syntax = estraverse.Syntax; | ||
var syntax, dmp; | ||
@@ -524,4 +524,2 @@ function defaultOptions () { | ||
function defaultComparator(config) { | ||
var dmp = new DiffMatchPatch(); | ||
function compare(pair, lines) { | ||
@@ -541,6 +539,6 @@ if (isStringDiffTarget(pair)) { | ||
lines.push(''); | ||
lines.push('$$$ [' + typeNameOf(pair.right.value) + '] ' + pair.right.code); | ||
lines.push('### [' + typeNameOf(pair.left.value) + '] ' + pair.left.code); | ||
lines.push('$=> ' + config.stringify(pair.right.value)); | ||
lines.push('#=> ' + config.stringify(pair.left.value)); | ||
lines.push('[' + typeNameOf(pair.right.value) + '] ' + pair.right.code); | ||
lines.push('=> ' + config.stringify(pair.right.value)); | ||
lines.push('[' + typeNameOf(pair.left.value) + '] ' + pair.left.code); | ||
lines.push('=> ' + config.stringify(pair.left.value)); | ||
} | ||
@@ -597,2 +595,15 @@ | ||
return function (context) { | ||
if (!DiffMatchPatch) { | ||
throw new Error('power-assert requires google\'s `diff_match_patch` library since 0.7.0. Please check your dependencies.'); | ||
} | ||
if (!estraverse) { | ||
throw new Error('power-assert requires `estraverse` library since 0.6.0. Please check your dependencies.'); | ||
} else { | ||
} | ||
if (!esprima) { | ||
throw new Error('power-assert requires `esprima` library since 0.7.0. Please check your dependencies.'); | ||
} | ||
dmp = new DiffMatchPatch(); | ||
syntax = estraverse.Syntax; | ||
var renderer = new PowerAssertContextRenderer(config); | ||
@@ -599,0 +610,0 @@ renderer.init(context); |
{ | ||
"name": "power-assert-formatter", | ||
"description": "Power Assert output formatter", | ||
"version": "0.7.0", | ||
"version": "0.7.1", | ||
"keywords": [ | ||
@@ -6,0 +6,0 @@ "power-assert", |
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
110731
2642