-
-
Notifications
You must be signed in to change notification settings - Fork 18
fix: support for Infinity
&& NaN
#26
fix: support for Infinity
&& NaN
#26
Conversation
Why? - If the JSON5 file contains Infinity or NaN they will be converted to null by JSON5.stringify, making the required JSON5 file unusable. How? - Use util.inspect instead of JSON5.stringify, preserving types not allowed in native JSON such as Infinity and NaN.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need tests
Infinity
& NaN
- Output is formatted with spaces instead of tabs, without new lines, and with single quotes.
Codecov Report
@@ Coverage Diff @@
## master #26 +/- ##
=======================================
Coverage 83.33% 83.33%
=======================================
Files 2 2
Lines 6 6
=======================================
Hits 5 5
Misses 1 1
Continue to review full report at Codecov.
|
Hi @evilebottnawi I've added some tests |
@richard-livingston seems cla buggy, just close and reopen PR |
@michael-ciniawsky You marked this pull request as a feature, but I'm not sure it is, this is functionality already supported by JSON5 but not by this loader. This is the core functionality. |
@evilebottnawi ahh, I've been trying to figure that cla out for the last 30 mins. You're very fast :) |
Infinity
& NaN
Infinity
& NaN
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Richard Livingston seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
😛 You need to sync the email used by Git with Github or vice versa && fix the commit author
Thanks Michael, will do as soon as I can |
Hi @michael-ciniawsky It seems to have fixed itself now:
|
Infinity
& NaN
Infinity
&& NaN
Why?
How?