-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
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
Add readJson fallback #51
Conversation
@JakeSidSmith Nice work! Looks good to me, are you ready to merge this? |
@jonaskello yes, I think it's in a good state. 🙂 Is it okay that my test has made it into the "example"? I noticed there was a |
Hmm, yes that's a bit strange :-). I guess that script can be cleaned up and re-added if someone gets the time to introduce unit tests. For now I think the example you made is a good way to test it. |
Released in 3.3.0. @JakeSidSmith It would be helpful if you can verify that the new version works as expected both with normal and custom fs :-) |
My project is currently in a half broken state, so I can't really do a thorough test at the moment, but I can confirm that where previously I was receiving the error below when using I will report back when I have further tested this. 🙂
|
I hope this is acceptable. Re-enabled strict null checks to ensure optional
readJson
types would not break anything, but this meant updating a few existing bits of code.Fixes #50
typeof fs
for base file system typesreadFile
andJSON.parse
ifreadJson
is unavailablereadJson
fallback