magic-akari
56ad09afb2
fix(es/modules): Keep TDZ for export default
if possible ( #5164 )
2022-07-11 08:57:50 +00:00
magic-akari
997240cfe6
fix(es/modules): Add the missing span for export default
( #5170 )
2022-07-11 02:18:01 +00:00
magic-akari
2555d71a60
fix(es/modules): Handle top level this, really ( #5160 )
2022-07-09 05:33:14 +00:00
magic-akari
451f346af0
fix(es/modules): Handle top level this ( #5159 )
2022-07-09 02:30:01 +00:00
magic-akari
f952a6161c
feat(es/typescript): Follow TypeScript error report ( #5114 )
2022-07-05 22:08:55 +00:00
magic-akari
c531e67a30
fix(es/modules): Support lazy for export from
( #5103 )
2022-07-05 05:38:34 +00:00
magic-akari
ddb31d1fd7
feat(es/modules): Support AMD triple slash directives ( #5091 )
2022-07-04 04:17:34 +00:00
magic-akari
4d5783d9cd
feat(es/modules): Add pure annotations to interop functions ( #5087 )
2022-07-03 05:54:07 +00:00
magic-akari
0a7ca2f4bb
fix(es/modules): Create an indirect call for a lazy require ( #5089 )
2022-07-03 03:44:56 +00:00
magic-akari
9addef6fc8
feat(es/modules): Support allowTopLevelThis
( #5086 )
2022-07-02 04:17:44 +00:00
magic-akari
de66b64aed
fix(es/compat): Preserve spans in object_rest_spread
( #5082 )
2022-07-02 03:50:30 +00:00
magic-akari
2f2039c693
fix(es/modules): Preserve orders of exports ( #5081 )
2022-07-01 13:17:43 +00:00
magic-akari
9e162dcbae
fix(es/modules): Improve compatibility with cjs lexer ( #5080 )
2022-07-01 08:37:04 +00:00
magic-akari
1e33dbab24
feat(es/modules): Support node interop ( #5069 )
2022-07-01 03:28:03 +00:00
magic-akari
ef543b1b22
fix(es/modules): Handle this
in class methods ( #5065 )
2022-06-29 11:27:06 +00:00
magic-akari
e13364f976
fix(es/modules): Handle module references in binding idents ( #5055 )
2022-06-28 10:47:46 +00:00
magic-akari
2cc229e6fb
feat(es/modules): Optimize a dynamic import with a literal path ( #5049 )
2022-06-28 06:31:24 +00:00
magic-akari
fa68cbd74a
refactor(es/module): Implement new module transformer ( #4758 )
2022-06-27 12:32:06 +00:00
magic-akari
d736b31e08
fix(es/typescript): Preserve export =
for AMD ( #4995 )
2022-06-18 09:31:08 +00:00
LongYinan
db9f7a5ad4
chore(ci): Fix publish build on Windows ( #4970 )
2022-06-14 15:58:10 +00:00
Donny/강동윤
4a27e6f84a
fix(es/helpers): Allow using external helpers with type: module
( #4962 )
2022-06-13 18:41:35 +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
Donny/강동윤
10f6849f7a
fix(es/modules/amd): Support export * as foo from 'foo'
( #4904 )
2022-06-08 03:30:54 +00:00
Donny/강동윤
f4c6a20654
fix(es/modules): Fix lazy option of common js ( #4807 )
2022-05-26 13:06:43 +00:00
OJ Kwon
2b03047cb0
fix(es/modules): Fix local scoped amd require ( #4800 )
2022-05-25 18:08:49 +00:00
Donny/강동윤
75bb8586cc
fix(es/modules): Adjust absolute path while rewriting imports ( #4776 )
2022-05-24 20:00:26 +09: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
Donny/강동윤
d9bb59a8cb
fix(es/modules/cjs): FIx detection of exported names ( #4737 )
2022-05-21 19:55:35 +00:00
OJ Kwon
886585b90e
feat(es/modules/amd): Support local-scoped amd requires ( #4727 )
2022-05-21 18:32:34 +00:00
brightwu
7ce572b497
fix(es/modules): Fix reassignment of exported vars ( #4688 )
2022-05-17 11:06:03 +00:00
Daniel Grant
49c40afb7e
fix(es/modules): Fix handling of import.meta.url
( #4670 )
2022-05-15 16:44:02 +00:00
Donny/강동윤
20692cdff1
fix(es/modules): Fix jsc.paths
( #4620 )
2022-05-12 04:14:51 +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
Donny/강동윤
f3b262e340
fix(es/modules): Preserve extensions ( #4524 )
2022-05-04 15:07:28 +00: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
Donny/강동윤
5c1ce0ba05
fix(es/modules/cjs): Fix order of statements ( #4361 )
2022-04-18 10:57:55 +00:00
那里好脏不可以
37a8c90750
chore(*): Typo + fomatting ( #4304 )
2022-04-11 18:45:58 +00:00
Austaras
720244fff9
fix(es/module): Support top-level await in dynamic imports ( #4277 )
2022-04-08 15:28:10 +09:00
RiESAEX
ea0de90137
fix(es/codegen): Emit sourcemap of key-value properties correctly ( #4166 )
2022-03-27 14:26:53 +09:00
Alexander Akait
634d732803
feat(es/ast): Add raw
to Str
( #4071 )
2022-03-22 07:54:08 +00:00
meskill
6ac7934017
fix(es/module/cjs): Fix conflict of a local export and exports-alls ( #4089 )
2022-03-19 09:56:14 +00:00
Donny/강동윤
d0f687bf44
feat(es/module/cjs): Support import.meta.url
( #4087 )
2022-03-19 07:05:11 +00:00
Donny/강동윤
22d005e224
fix(es/modules): Fix sourcemap, really ( #4074 )
2022-03-18 08:26:58 +00:00
Donny/강동윤
9458f08092
feat(es/modules): Support namespaced reexports ( #4073 )
2022-03-18 03:03:02 +00:00
Donny/강동윤
834cd4f7b6
fix(es/modules): Use correct span for ExportAll
s ( #4038 )
2022-03-16 17:10:47 +09:00
magic-akari
dc457b4883
fix(es/module): Use correct return values for suffix update expressions ( #3927 )
2022-03-09 23:14:06 +09:00
magic-akari
8559fc9623
fix(es/module): Fix exported vars with bigint values ( #3909 )
2022-03-09 06:30:28 +00:00