Repository navigation
Make async readJson match sync throws: false behavior - #1089
Closed
vhinayindia wants to merge 1 commit into
Closed
vhinayindia wants to merge 1 commit into
vhinayindia wants to merge 1 commit into
Conversation
Collaborator
|
If this change is to be made, it should be made directly in https://github.com/jprichardson/node-jsonfile (which I also maintain), not done as a wrapper here in fs-extra. Sorry to have to close this. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #542. When
throwsisfalse, asyncreadJsonnow returnsnullfor file-read errors as well as invalid JSON, matchingreadJsonSync. Default error behavior is unchanged. Callback and Promise cases are covered.Validation: focused JSON tests (15 passing),
node test.mjs, Standard on the changed JavaScript files, andgit diff --check. In a CommonJS suite comparison with two Windows root-target tests omitted because they write outside the workspace, the pristine base had 536 passing / 7 pending / 120 failing; this patch had 539 passing / 7 pending / 120 failing. Both runs had the same 115 symlink-creationEPERMfailures and 5 cleanup double-callback failures after symlink setup failed. The patch adds three passing regression tests. Those two omitted tests were not included in the baseline comparison.