Boshen
14e1dacd0a
feat(minifier): reenable minifier tests ( #969 )
2023-10-09 11:25:29 +08:00
Boshen
55b2f031df
feat(minifier): partially re-enable minifier ( #963 )
...
closes #949
closes #950
closes #951
All minifier tests are disable from this PR.
We are going to fix the compilation errors first, then the behavioral
errors.
2023-10-08 11:06:42 +08:00
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
Matthew "strager" Glazar
ad00720d75
refactor: avoid unstable let_chains
...
The let_chains Rust feature is unstable, preventing Oxc from using a
stable Rust compiler. Refactor the code to avoid let_chains.
2023-07-27 09:44:57 +08:00
Don Isaac
2591194dba
feat(minifier): drop console statements and exprs ( #552 )
2023-07-16 14:41:51 +08:00
阿良仔
26c3ece37c
feat: handle UnaryOpsWithBigInt ( #475 )
2023-06-25 22:37:36 +08:00
Boshen
f8125af850
feat(minimizer): print parentheses
2023-06-01 22:45:26 +08:00
Boshen
b22c62de4f
refactor(minifier): rename expect to test
2023-05-27 13:54:46 +08:00
Boshen
1f96a05d47
chore(minifier): port printer test from closure compiler
...
closes #372
2023-05-23 14:16:28 +08:00
Boshen
1e27903243
chore(minifier): port tests from tdewolff/minify
...
closes #374
2023-05-23 13:37:46 +08:00
Boshen
dee09da60b
feat(minifier): implement peephole reorder constant expression from closure compiler ( #376 )
2023-05-23 12:29:29 +08:00
Boshen
70a713126f
feat(minifier): setup minifier tests
2023-05-21 14:33:06 +08:00
Boshen
61f0483891
feat(minifier): move terser tests do its directory
2023-05-21 14:19:50 +08:00
Boshen
0607b1493f
feat(minifier): remove whitespace printing from minifier
...
This should make the minifier even faster.
Use the formatter for debugging instead.
2023-05-16 23:22:43 +08:00
Boshen
af95b59a0e
feat(ast): split Property into ObjectProperty and BindingProperty ( #361 )
2023-05-16 15:51:50 +08:00
Boshen
6e8d342403
feat(minifier): add mangle option
2023-05-13 16:03:43 +08:00
Boshen
14720e7c69
refactor: move SourceType from oxc_ast to oxc_span ( #351 )
...
related #350
2023-05-12 23:16:14 +08:00
Boshen
86c01c7fb8
feat(minifier): use hir ( #335 )
2023-05-07 17:23:00 +08:00
Boshen
aa478c585c
chore(minifier): add test fixture ( #287 )
2023-04-17 11:24:58 +08:00
Boshen
a35d08ea23
Minifier Prototype ( #215 )
...
feat(minifier): minifier prototype
2023-03-29 06:51:50 -07:00