Repository navigation
Commit 0220e4e
authored
fix(javascript): keep minified code running as written where terser diverged (#22726)
* fix(javascript): keep minified code running as written where terser diverged
Differential runs over the corpora against oxc and swc, plus terser's
ufuzz programs, found seven programs terser's output changes: a `let`
assigned in a later initializer, `undefined` as a pattern target, a
negative BigInt base, a global accessor merged across a conditional, a
block's function in a loop test (Annex B), an async function's thenable
and a `RegExp` holding a NUL.
Also inline a block's `const` and a boolean read more than once, fold
comparisons of a fresh object, and stop counting an alias as a call in
`keepsConstantCall` (terser#1637).
Claude-Session: https://claude.ai/code/session_01ViD41i2KdwwGxrDk7yrjeD
* chore(changeset): fold the minifier equivalence entry into the pending one
Claude-Session: https://claude.ai/code/session_01ViD41i2KdwwGxrDk7yrjeD
* fix(javascript): keep a block's const where eval or with pins its function
The JavaScript fuzzer (seeds 6 and 7) found a block const function copied
into its call with its body dropped, its declaration kept by `with`. Also
retire minify-corpora entries CI no longer reports.
Claude-Session: https://claude.ai/code/session_01ViD41i2KdwwGxrDk7yrjeD
* test(javascript): settle the async thenable test without microtaskMode
vm's microtaskMode needs Node 14.6; the Node 10 baseline drains the
shared microtask queue before the next macrotask instead.
Claude-Session: https://claude.ai/code/session_01ViD41i2KdwwGxrDk7yrjeD1 parent 67578f0 commit 0220e4e
7 files changed
Lines changed: 381 additions & 52 deletions
File tree
- .changeset
- lib/javascript
- test
- helpers
- specCases
- unitCases
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1682 | 1682 | | |
1683 | 1683 | | |
1684 | 1684 | | |
| 1685 | + | |
| 1686 | + | |
1685 | 1687 | | |
1686 | 1688 | | |
1687 | 1689 | | |
| |||
0 commit comments