oxc/tasks/minsize
翠 / green 8c8b5fa9be
fix(minifier): avoid minifing String(a) into "" + a for symbols (#8612)
We shouldn't change `String(a)` into `"" + a` if `a` can be a Symbol.
`String(Symbol())` does not throw an error, but `"" + Symbol()` does.

**References**
- [Spec of `ToString` (called for `"" +
variable`)](https://tc39.es/ecma262/multipage/abstract-operations.html#sec-tostring)
- [Spec of
`String(a)`](https://tc39.es/ecma262/multipage/text-processing.html#sec-string-constructor-string-value)

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-01-20 13:34:46 +08:00
..
src chore(tasks/minsize): enable test coverage 2025-01-19 12:00:40 +08:00
Cargo.toml chore(tasks): print diff for minify idempotency assertion (#8161) 2024-12-29 00:55:45 +08:00
minsize.snap fix(minifier): avoid minifing String(a) into "" + a for symbols (#8612) 2025-01-20 13:34:46 +08:00
README.md feat: add cargo minsize task for tracking minification size (#276) 2023-04-14 13:07:37 +08:00

Track Minification size

See minification-benchmarks for baseline.