oxc/crates/oxc_minifier/src
Don Isaac 027a67d94c
feat(minifier): constant addition expression folding (#882)
Fold constant addition expressions. Handles string concatenation and
addition, both with implicit casting.

For example,
```ts
let x = 1 + 1
let y = "hello " + "world"
```
now becomes
```ts
let x = 2
let y = "hello world"
```

## Extra Goodies
- test(minifier): add `test_snapshot` helper to perform snapshot tests
with `insta`
- up(hir): implement `std::ops::Add` for `NumericValue`
- up(span): impl `TryFrom<Cow<'_, &str>>` for `Atom`
2023-09-11 10:38:35 +08:00
..
compressor feat(minifier): constant addition expression folding (#882) 2023-09-11 10:38:35 +08:00
mangler feat(semantic): add node_id to Reference (#689) 2023-08-05 12:45:22 +08:00
printer refactor(ast): use atom for Directive and Hashbang (#701) 2023-08-09 13:52:56 +08:00
lib.rs chore: stable Rust 2023-07-27 13:11:46 +08:00