next.js
edd08d08 - Switch `TotalOrderF64` to `f64` in `ConstantNumber` to correctly handle `NaN === NaN` and `0 === -0` inside the Turbopack analyzer (#94172)

Commit
140 days ago
Switch `TotalOrderF64` to `f64` in `ConstantNumber` to correctly handle `NaN === NaN` and `0 === -0` inside the Turbopack analyzer (#94172) This is how JavaScript handles them: <img width="112" height="78" alt="Screenshot 2026-05-27 at 2 08 08 PM" src="https://github.com/user-attachments/assets/21313410-7600-489a-a8bb-4e76d8052d23" /> However, we were using `TotalOrderF64` which did not follow this. This PR switches to us to using `f64` in `ConstantNumber`. This PR also adds execution tests that were previously failing but now pass. A large amount of changes in this PR are changes in snapshot tests, eg: ```diff Constant( Num( ConstantNumber( - TotalOrderF64( - 1.0, - ), + 1.0, ), ), ), ``` The other use of `TotalOrderF64` was in `CompileTimeDefineValue` which has now been switched to `serde_json::Number` in a stacked PR: https://github.com/vercel/next.js/pull/94177.
Author
Parents
Loading