Commit Graph

194 Commits

Author SHA1 Message Date
SWC Bot
555e08d4d6 chore: Publish crates 2022-05-24 09:27:11 +00:00
brightwu
f28d9c143b
fix(es/resolver): Fix more edge cases related to catch and var (#4773) 2022-05-24 09:24:42 +00:00
SWC Bot
26578c8c0a chore: Publish crates 2022-05-24 07:55:58 +00:00
brightwu
e2da3ddc03
fix(es/resolver): Handle var after catch with the same name (#4772) 2022-05-24 16:53:13 +09:00
SWC Bot
565fb38aec chore: Publish crates 2022-05-24 05:58:20 +00:00
Austaras
65b7c4b695
fix(es/fixer): Preserve the paren in a spread element (#4771) 2022-05-24 05:55:45 +00:00
Donny/강동윤
995e9661cc chore: Publish crates 2022-05-24 13:15:57 +09:00
Donny/강동윤
b8d2fb8546
feat(es/helpers): Import only used helpers (#4767) 2022-05-24 04:09:59 +00:00
Kevin Barabash
72fbf692a4
fix(es/codegen): Don't add a newline after an arrow body (#4711) 2022-05-19 07:12:37 +00:00
Donny/강동윤
98e4845fce
build(repo): Update rustc (#4667) 2022-05-15 09:03:54 +00:00
SWC Bot
ead25ee153 chore: Publish crates 2022-05-15 05:09:48 +00:00
Donny/강동윤
eb8508f88c
feat(es/codegen): Implement ascii-only (#4660) 2022-05-15 05:07:21 +00:00
Donny/강동윤
053f42b3aa
feat(es/minifier): Improve minifier (#4655)
swc_ecma_transforms_base:
 - Improved `fixer`.

swc_ecma_minifier:
 - `ignore_return_value`: Support computed access to array literals.
2022-05-14 07:06:03 +00:00
SWC Bot
0b06ab4022 chore: Publish crates 2022-05-13 06:34:22 +00:00
David Sherret
2745cb7949
fix(es/resolver): Ensure that a parameter type is resolved to parent (#4645) 2022-05-13 06:31:52 +00:00
Donny/강동윤
79f87e03db
test(es/minifier): Execute more tests (#4636) 2022-05-12 16:28:52 +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
6c425d3d0a chore: Publish crates 2022-05-10 04:19:24 +00:00
Donny/강동윤
d611d543ea
fix(es/fixer): Handle new yield (#4598) 2022-05-10 04:17:11 +00:00
Donny/강동윤
097ff1ddc1
fix(es/minifier): Fix with and NaN (#4596) 2022-05-10 03:21:43 +00:00
SWC Bot
2482c93449 chore: Publish crates 2022-05-09 20:20:17 +00:00
Donny/강동윤
6ac4a23aa2
feat(es/hygiene): Drop syntax context (#4594) 2022-05-09 20:15:15 +00:00
SWC Bot
df31bb1731 chore: Publish crates 2022-05-09 08:52:56 +00:00
Donny/강동윤
56c3010f6b
fix(es/resolver): Fix more try catch issues (#4582) 2022-05-09 17:50:30 +09:00
SWC Bot
d27b6e6dbe chore: Publish crates 2022-05-08 10:15:15 +00:00
Donny/강동윤
9e79f9ced6
fix(es/resolver): Fix handling of a complex try catch (#4574) 2022-05-08 10:12:50 +00:00
SWC Bot
2a1a0bbaf5 chore: Publish crates 2022-05-07 08:45:21 +00:00
Donny/강동윤
13cc228262
doc(es/resolver): Add docs for top-level mark (#4560) 2022-05-07 08:42:46 +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
SWC Bot
ceed408e3c chore: Publish crates 2022-05-02 04:37:58 +00:00
magic-akari
1e1d081805
fix(es/compat): Support updating a private field with bigint value (#4136) 2022-05-02 13:34:46 +09:00
SWC Bot
a36e6a6726 chore: Publish crates 2022-04-30 00:59:36 +00:00
RiESAEX
7d40208377
fix(es/helpers): Update _interopRequireWildcard (#4479) 2022-04-30 00:56:48 +00:00
SWC Bot
989ea98ed0 chore: Publish crates 2022-04-28 04:19:17 +00:00
Donny/강동윤
0bc0bae90d
fix(es/async-generator): Fix yield* in async generators (#4452) 2022-04-28 04:14:17 +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
e0f10f876f chore: Publish crates 2022-04-25 06:59:03 +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
OJ Kwon
8419b60430
fix(plugin): Align deps to fix build (#4377) 2022-04-20 08:05:02 +00:00
Donny/강동윤
a8ed5ba357
fix(es/minifier): Apply name mangler as much as we can (#4365) 2022-04-19 17:20:12 +09:00
Donny/강동윤
8309440008
chore(es): Rename benchmarks (#4355) 2022-04-17 18:36:15 +00:00
Dion
4c9973010a
fix(es/codegen): Fix codegen of arrow expressions (#4306)
Co-authored-by: Donny/강동윤 <kdy1997.dev@gmail.com>
2022-04-15 08:00:04 +00:00