Update handling of non number floating point values#317
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2c6f422509
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| switch storage { | ||
| case let .double(value): | ||
| value.isInfinite | ||
| case .int: | ||
| true |
There was a problem hiding this comment.
Return false for integer isInfinite
JSON.Number.isInfinite currently returns true for .int storage, which makes every integer report as infinite. Any caller using isInfinite to filter out invalid numeric values (e.g., before serialization or validation) will incorrectly treat valid integers as invalid, changing behavior compared to previous versions. Integers are always finite, so this should return false for the .int case.
Useful? React with 👍 / 👎.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #317 +/- ##
==========================================
- Coverage 95.34% 94.81% -0.54%
==========================================
Files 35 35
Lines 2860 2874 +14
==========================================
- Hits 2727 2725 -2
- Misses 133 149 +16
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
2c6f422 to
8329c1f
Compare
No description provided.