Comparing version 0.7.4 to 0.8.0
@@ -1,3 +0,1 @@ | ||
{ | ||
"services": [] | ||
} | ||
{ "a" : { "b" : [ 1, 2, 3], "c": "d" } } |
@@ -1,3 +0,1 @@ | ||
{ | ||
"services": [{ "service_code": "123" }] | ||
} | ||
{ "a" : { "b" : [ 1, 3, 4], "c": "d"} } |
@@ -16,3 +16,3 @@ Steps to a new release | ||
* npm version <next.version.number> | ||
* git push --tags | ||
* git push --tags; git push | ||
* npm publish |
@@ -22,2 +22,3 @@ const fs = require('fs') | ||
' -k, --keys-only Compare only the keys, ignore the differences in values #var(keysOnly)', | ||
' -K, --keep-unchanged-values Instead of omitting values that are equal, output them as they are #var(keepUnchangedValues)', | ||
' -p, --precision DECIMALS Round all floating point numbers to this number of decimal places prior to comparison' | ||
@@ -24,0 +25,0 @@ ], |
@@ -117,3 +117,3 @@ const { SequenceMatcher } = require('difflib') | ||
const key = fuzzyMatches[index] || '__$!SCALAR' + originals.__next++ | ||
originals[key] = { item, index }; | ||
originals[key] = { item, index } | ||
result.push(key) | ||
@@ -187,3 +187,3 @@ } | ||
} else { | ||
if (this.options.full) { | ||
if (this.options.full || this.options.keepUnchangedValues) { | ||
result.push([' ', item1]) | ||
@@ -195,3 +195,3 @@ } else { | ||
} else { | ||
if (this.options.full) { | ||
if (this.options.full || this.options.keepUnchangedValues) { | ||
result.push([' ', item]) | ||
@@ -198,0 +198,0 @@ } else { |
@@ -9,3 +9,3 @@ { | ||
"description": "JSON diff", | ||
"version": "0.7.4", | ||
"version": "0.8.0", | ||
"homepage": "https://github.com/andreyvit/json-diff", | ||
@@ -12,0 +12,0 @@ "license": "MIT", |
@@ -276,2 +276,3 @@ JSON structural diff | ||
---------- | ||
* 0.8.0 Add --keep-unchanged-values option | ||
* 0.7.4 Fix bug #76 | ||
@@ -278,0 +279,0 @@ * 0.7.3 Revert use of ?? operator in 0.7.2 (which caused a breaking change) |
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
35974
293
546