Repository navigation
Commit 8cff139
fix(babel-plugin): keep evaluated negative/non-finite numbers static (#4321)
* fix(babel-plugin): keep evaluated negative/non-finite numbers static
#4309 switched evaluateAndInline to t.valueToNode for numbers, which builds
-1 / 0/0 expressions; the SSR and universal transforms then treated them
as dynamic, diverging from the oxc compiler (parity-probes "exotic literal
holes"). Build NumericLiteral nodes directly where @babel/types 8 rejects
the value.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_0117BoWMdD4K7882vob4J9vq
* babel-plugin: keep -0 and prop: numbers as plain literals
Export numberLiteral and use it for evaluated prop: numbers, keep -0's
sign, and test the static attribute paths.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_018LY7F9czoRqdMEvk2QwPr1
---------
Co-authored-by: Claude <[email protected]>1 parent 0090fe3 commit 8cff139
4 files changed
Lines changed: 49 additions & 2 deletions
File tree
- .changeset
- packages/babel-plugin
- src
- dom
- test
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
997 | 998 | | |
998 | 999 | | |
999 | 1000 | | |
1000 | | - | |
| 1001 | + | |
1001 | 1002 | | |
1002 | 1003 | | |
1003 | 1004 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
759 | 759 | | |
760 | 760 | | |
761 | 761 | | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
762 | 774 | | |
763 | 775 | | |
764 | 776 | | |
| |||
786 | 798 | | |
787 | 799 | | |
788 | 800 | | |
789 | | - | |
| 801 | + | |
790 | 802 | | |
791 | 803 | | |
792 | 804 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
0 commit comments