Commit Graph

181 Commits

Author SHA1 Message Date
Donny/강동윤
4a27e6f84a
fix(es/helpers): Allow using external helpers with type: module (#4962) 2022-06-13 18:41:35 +00:00
Donny/강동윤
bfede71e6c chore: Publish crates 2022-06-11 16:47:29 +09:00
SWC Bot
0f094da77f chore: Publish crates 2022-06-11 07:45:15 +00:00
SWC Bot
7c9ab26256 chore: Publish crates 2022-06-08 07:24:11 +00:00
Donny/강동윤
36a82ccfc9
feat(es/modules/amd): Convert ts import equals to normal AMD import (#4906) 2022-06-08 07:21:17 +00:00
SWC Bot
73f5ca754e chore: Publish crates 2022-06-08 03:33:59 +00:00
Donny/강동윤
10f6849f7a
fix(es/modules/amd): Support export * as foo from 'foo' (#4904) 2022-06-08 03:30:54 +00:00
Donny/강동윤
eb0acc3859 chore: Publish crates 2022-06-06 04:54:19 +09:00
SWC Bot
424e62e663 chore: Publish crates 2022-05-26 16:01:22 +00:00
SWC Bot
2086e66eb3 chore: Publish crates 2022-05-26 13:09:21 +00:00
Donny/강동윤
f4c6a20654
fix(es/modules): Fix lazy option of common js (#4807) 2022-05-26 13:06:43 +00:00
SWC Bot
a163279c88 chore: Publish crates 2022-05-26 11:35:19 +00:00
SWC Bot
e9ce992250 chore: Publish crates 2022-05-25 18:11:42 +00:00
OJ Kwon
2b03047cb0
fix(es/modules): Fix local scoped amd require (#4800) 2022-05-25 18:08:49 +00:00
SWC Bot
85b1d35cc9 chore: Publish crates 2022-05-24 11:03:16 +00:00
Donny/강동윤
75bb8586cc
fix(es/modules): Adjust absolute path while rewriting imports (#4776) 2022-05-24 20:00:26 +09:00
Donny/강동윤
995e9661cc chore: Publish crates 2022-05-24 13:15:57 +09:00
SWC Bot
fa649d87be chore: Publish crates 2022-05-24 04:14:30 +00:00
Donny/강동윤
b8d2fb8546
feat(es/helpers): Import only used helpers (#4767) 2022-05-24 04:09:59 +00:00
Donny/강동윤
417b2182ce
fix(es/loader): Fix jsc.paths on windows (#4739) 2022-05-22 20:12:22 +00:00
SWC Bot
032d584265 chore: Publish crates 2022-05-21 19:58:14 +00:00
Donny/강동윤
d9bb59a8cb
fix(es/modules/cjs): FIx detection of exported names (#4737) 2022-05-21 19:55:35 +00:00
SWC Bot
73d049123c chore: Publish crates 2022-05-21 18:34:49 +00:00
OJ Kwon
886585b90e
feat(es/modules/amd): Support local-scoped amd requires (#4727) 2022-05-21 18:32:34 +00:00
SWC Bot
fc071d0ae7 chore: Publish crates 2022-05-17 11:08:15 +00:00
brightwu
7ce572b497
fix(es/modules): Fix reassignment of exported vars (#4688) 2022-05-17 11:06:03 +00:00
SWC Bot
e3ef5f8578 chore: Publish crates 2022-05-15 16:46:18 +00:00
Daniel Grant
49c40afb7e
fix(es/modules): Fix handling of import.meta.url (#4670) 2022-05-15 16:44:02 +00:00
SWC Bot
ead25ee153 chore: Publish crates 2022-05-15 05:09:48 +00:00
Donny/강동윤
20692cdff1
fix(es/modules): Fix jsc.paths (#4620) 2022-05-12 04:14:51 +00: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
RiESAEX
086840956d
fix(es): Use unresolved_mark (#4573) 2022-05-08 09:19:26 +00:00
SWC Bot
e4ce388632 chore: Publish crates 2022-05-06 04:10:39 +00:00
SWC Bot
b38f6ac3e3 chore: Publish crates 2022-05-04 15:10:39 +00:00
Donny/강동윤
f3b262e340
fix(es/modules): Preserve extensions (#4524) 2022-05-04 15:07:28 +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
RiESAEX
7d40208377
fix(es/helpers): Update _interopRequireWildcard (#4479) 2022-04-30 00:56:48 +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
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
SWC Bot
c769c95ac5 chore: Publish crates 2022-04-18 11:00:14 +00:00
Donny/강동윤
5c1ce0ba05
fix(es/modules/cjs): Fix order of statements (#4361) 2022-04-18 10:57:55 +00:00
SWC Bot
995b4367cc chore: Publish crates 2022-04-15 07:39:50 +00:00
Donny/강동윤
7599fe7431
fix(es/parser): Enable static blocks by default (#4334) 2022-04-15 07:31:41 +00:00
SWC Bot
fa880634bd chore: Publish crates 2022-04-11 20:05:28 +00:00