Repository navigation
Conversation
|
|
sxzz
approved these changes
Nov 12, 2026
Author
|
Closing this. It was made with an AI coding agent, and the contributing guide asks for PR text in a person's own words. Sorry for the noise. The issue and the test case above still show the bug, if it helps. |
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.
Closes #183
stringifyValuefell back toJSON.stringifyfor numbers, which turnsNaN,Infinityand-Infinityintonulland-0into0. The build passed but the bundle used the wrong value, also inside arrays and objects.Now
-0is written as-0and non-finite numbers asNaN/Infinity/-Infinity, next to the existing special cases for bigint, RegExp and Date.Added a
number.jsfixture (top-level values, an array and an object). On main its snapshot showsnull/0; with this change it shows the real values.vitest run(46 tests),eslint .andtsc --noEmitpass.Note: a negative value can still need parens where it is inlined: at the start of a line it can join the previous line by ASI, and
x-macro()or-macro()givesx--0/--Infinity. That already happens for any negative number today (x--1) and is part of #182, so I left it out here.