Commit Graph

150 Commits

Author SHA1 Message Date
SWC Bot
2096a1da4f chore: Publish crates 2022-05-17 10:45:02 +00:00
Donny/강동윤
07356a5bba
fix(es/ast): Fix EqIgnoreSpan of Ident (#4689) 2022-05-17 10:21:01 +00:00
SWC Bot
ead25ee153 chore: Publish crates 2022-05-15 05:09:48 +00:00
SWC Bot
073ca87012 chore: Publish crates 2022-05-12 09:23:46 +00:00
Donny/강동윤
9c190f0a8e
fix(es/minifier): Fix optimization of spread (#4639) 2022-05-12 09:20:44 +00:00
Donny/강동윤
56a227ad9d fix(es/minifier): Don't create direct eval (#4634)
- `expr_simplifier`: Preserve `this`.
 - `ExprReplacer`: Inject `0` after inlining eval.
 - `MultiReplacer`: Inject `0` after inlining eval.
2022-05-12 15:14:18 +09:00
SWC Bot
97808349a2 chore: Publish crates 2022-05-11 16:17:07 +00:00
SWC Bot
90569d4673 chore: Publish crates 2022-05-11 04:38:52 +00:00
Donny/강동윤
6a97c7bef8
fix(es/utils): Fix wrong apis (#4604)
# API Changes

## `swc_ecma_utils`

### Renames

 - `find_ids` => `find_pat_ids`
 - `prepend` => `prepend_stmt`
 - `as_bool` => `cast_to_bool`
 - `as_number` => `as_pure_number`
 - `as_string` => `cast_to_string`
 - (`as_pure_bool`, `cast_to_number` is not renamed)
 - `UsageFinder` => `IdentUsageFinder`.
 - `IdentFinder` => `IdentRefFinder`.

## Changes

 - Re-export of `HANDLER` from `swc_common::errors` is removed. Use `swc_common::error::HANDLER` instead.
 - Re-export of `Id` from `swc_ecma_ast` is removed. Use `swc_ecma_ast::Id` instead.
 - `ExprCtx` is used for apis related to `Expr`.
 - `preserve_effects` is now a method of `ExprCtx`. It was a top-level function.
 - `extract_side_effects_to` is now a method of `ExprCtx`. It was a top-level function.
 - `IdentUsageFinder` (previously `UsageFinder`) now takes `Id` instead of `Ident`.
 - `IdentRefFinder` (previously `IdentFinder`) now takes `Id` instead of `Ident`.
 - `ExprExt::is_ident_ref_to` is removed.
 - `Expr::is_global_ref_to` is added.
 - `:🆔:id` is removed. Use `Ident::to_id()` instead.
2022-05-11 04:36:22 +00:00
Donny/강동윤
2c861bd9e5
feat(es/ast): Improve Id APIs (#4614)
# API Changes

 - `Ident` now has `to_id()`. This method is added to allow removing an import.
2022-05-11 12:02:14 +09:00
SWC Bot
563602142c chore: Publish crates 2022-05-10 05:23:18 +00:00
Donny/강동윤
859dc440b4
fix(es/minifier): Preserve more this (#4599) 2022-05-10 05:20:36 +00:00
Donny/강동윤
097ff1ddc1
fix(es/minifier): Fix with and NaN (#4596) 2022-05-10 03:21:43 +00:00
SWC Bot
bf2d5ff909 chore: Publish crates 2022-05-09 21:38:24 +00:00
Donny/강동윤
2ab7594b4a
fix(es/minifier): Fix switches (#4595) 2022-05-09 21:36:09 +00:00
SWC Bot
cc712c7084 chore: Publish crates 2022-05-09 19:10:45 +00:00
Donny/강동윤
dd09cdf8b1
fix(es/minifier): Fix handling of NaN (#4593) 2022-05-09 19:08:28 +00:00
SWC Bot
c070b43e5d chore: Publish crates 2022-05-09 05:45:55 +00:00
Donny/강동윤
7fc9bbccd9
feat(config): Make all configuration overridable (#4575) 2022-05-09 05:38:27 +00:00
SWC Bot
e4ce388632 chore: Publish crates 2022-05-06 04:10:39 +00:00
Donny/강동윤
a6d404a8c2
chore(repo): Configure prettier (#4523) 2022-05-04 14:25:28 +00:00
SWC Bot
00695f4b23 chore: Publish crates 2022-05-03 07:50:35 +00:00
Donny/강동윤
f30ffdf200
fix(es/decorators): Make legacy decorator identical to tsc (#4496) 2022-05-03 07:48:09 +00:00
Donny/강동윤
27f9b30ef2 chore: Publish crates 2022-04-26 19:30:11 +09:00
Donny/강동윤
53610fdafc
feat(es/resolver): Use different syntax context for unresolved refs (#4436)
- We don't need a list of bindings to check if an identifier is unresolved.
 - Checking if an identifier is unresolved is now one CPU instruction.
   - Previously it was one hashmap operation.
 - This PR also improves performance, by removing the hashmaps mentioned above.
2022-04-26 07:38:50 +00:00
SWC Bot
7cbf30d5ac chore: Publish crates 2022-04-25 15:34:29 +00:00
Donny/강동윤
8048597c9e
feat(es/optimization): Accept top level mark from simplifiers (#4434) 2022-04-25 15:31:59 +00:00
Donny/강동윤
8ab12fd97b
fix(es/minifier): Preserve more side effects (#4420) 2022-04-25 06:56:19 +00:00
SWC Bot
7d23492b16 chore: Publish crates 2022-04-21 10:02:50 +00:00
Donny/강동윤
922299a490
fix(es/minifier): Don't drop labels if required (#4370) 2022-04-20 13:34:21 +00:00
OJ Kwon
8419b60430
fix(plugin): Align deps to fix build (#4377) 2022-04-20 08:05:02 +00:00
Donny/강동윤
da6fa60231
perf(es): Disable wrong parallelization (#4354) 2022-04-17 16:24:00 +00:00
SWC Bot
995b4367cc chore: Publish crates 2022-04-15 07:39:50 +00:00
Donny/강동윤
7e8f613272
feat(es/minifier): Enable conditionals by default (#4301) 2022-04-12 02:12:10 +00:00
SWC Bot
fa880634bd chore: Publish crates 2022-04-11 20:05:28 +00:00
SWC Bot
4a097adbf7 chore: Publish crates 2022-04-11 18:48:43 +00:00
那里好脏不可以
37a8c90750
chore(*): Typo + fomatting (#4304) 2022-04-11 18:45:58 +00:00
SWC Bot
431f70d563 chore: Publish crates 2022-04-08 18:11:07 +00:00
Donny/강동윤
4868c73d5b
fix(es/optimization): Don't create invalid sequence expressions (#4285) 2022-04-08 18:08:31 +00:00
OJ Kwon
fad652f879
chore(plugin): Align version of swc_common to include dummy comment api (#4270) 2022-04-07 07:21:37 +00:00
SWC Bot
5eb3d8315a chore: Publish crates 2022-04-05 12:49:22 +00:00
Alexander Akait
f39d3aca4d
feat(es/ast): Add raw to Num (#4245) 2022-04-05 12:46:35 +00:00
OJ Kwon
4093814895
chore(build): Dedup swc_common (#4247) 2022-04-05 14:28:07 +09:00
Donny/강동윤
1f466e1d2f
chore(ci): Fix benchmark action (#4242) 2022-04-04 20:12:03 +09:00
SWC Bot
abc412cdbd chore: Publish crates 2022-04-04 03:25:37 +00:00
Austaras
b1645f606d
fix(es/optimizer/simplifier): Collect idents in init first (#4239) 2022-04-04 12:23:15 +09:00
SWC Bot
3337777f8c chore: Publish crates 2022-04-02 06:06:39 +00:00
SWC Bot
1068561800 chore: Publish crates 2022-04-01 04:29:08 +00:00
SWC Bot
24ce355d77 chore: Publish crates 2022-03-31 00:56:42 +00:00
overlookmotel
073751f70d
fix(es/optimization): Support jsx in dce (#4203) 2022-03-31 00:54:20 +00:00