We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch json-diff@1.0.3 for the project I'm working on.
json-diff@1.0.3
Hello guys, I've make some changes to keep nice colourful output with previous value if outputNewOnly flag is true.
Here is the diff that solved my problem:
diff --git a/node_modules/json-diff/lib/index.js b/node_modules/json-diff/lib/index.js index f06a825..19250bd 100644 --- a/node_modules/json-diff/lib/index.js +++ b/node_modules/json-diff/lib/index.js @@ -312,12 +312,7 @@ class JsonDiff { } if (!equal) { score = 0 - - if (this.options.outputNewOnly) { - result = obj2 - } else { - result = { __old: obj1, __new: obj2 } - } + result = { __old: obj1, __new: obj2 } } else if (!this.options.full) { result = undefined }
The result will be
This issue body was partially generated by patch-package.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch
json-diff@1.0.3
for the project I'm working on.Hello guys, I've make some changes to keep nice colourful output with previous value if outputNewOnly flag is true.
Here is the diff that solved my problem:
The result will be
![image](https://user-images.githubusercontent.com/1098291/225822302-96b29f67-4d20-4346-9628-7ba8fb1ae3f8.png)
This issue body was partially generated by patch-package.
The text was updated successfully, but these errors were encountered: