Repository navigation
Commit 04c6586
committed
fix(javascript): correct minifier output terser gets wrong
Add a `correct` printer phase wrapping the terser methods that write a
wrong program: `__proto__` shorthands and spreads, lost `this` bindings
for calls and tags, `arguments` aliasing, dropped parameter defaults and
patterns, classes moved out of reach, and `===` between two calls.
The corpora suite now runs every terser stdout case, accepts a byte
difference only where the phase makes it, and lists what it fixes.
Claude-Session: https://claude.ai/code/session_016Yz3eH1MRfYQJKa7x4wERK1 parent c9bdc2c commit 04c6586
9 files changed
Lines changed: 721 additions & 36 deletions
File tree
- .changeset
- lib/javascript
- test
- helpers
- specCases
- unitCases
| 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 | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
| 85 | + | |
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
| 67 | + | |
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
13 | | - | |
| 15 | + | |
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
| |||
6173 | 6175 | | |
6174 | 6176 | | |
6175 | 6177 | | |
6176 | | - | |
6177 | | - | |
| 6178 | + | |
| 6179 | + | |
6178 | 6180 | | |
6179 | 6181 | | |
6180 | 6182 | | |
| |||
6186 | 6188 | | |
6187 | 6189 | | |
6188 | 6190 | | |
6189 | | - | |
| 6191 | + | |
| 6192 | + | |
6190 | 6193 | | |
6191 | 6194 | | |
6192 | 6195 | | |
| |||
6270 | 6273 | | |
6271 | 6274 | | |
6272 | 6275 | | |
6273 | | - | |
| 6276 | + | |
| 6277 | + | |
| 6278 | + | |
| 6279 | + | |
| 6280 | + | |
6274 | 6281 | | |
6275 | 6282 | | |
6276 | 6283 | | |
| |||
0 commit comments