Commit Graph

102 Commits

Author SHA1 Message Date
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
04fc1cb429
fix(es/compat): Fix name conflict of Array (#5034) 2022-06-25 04:55:59 +00:00
Donny/강동윤
36d960c7e9
perf(es/hygiene): Make hygiene faster (#4952) 2022-06-15 14:36:57 +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/강동윤
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/강동윤
a6d404a8c2
chore(repo): Configure prettier (#4523) 2022-05-04 14:25:28 +00:00
RiESAEX
7d40208377
fix(es/helpers): Update _interopRequireWildcard (#4479) 2022-04-30 00:56:48 +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
Donny/강동윤
7599fe7431
fix(es/parser): Enable static blocks by default (#4334) 2022-04-15 07:31:41 +00:00
Austaras
720244fff9
fix(es/module): Support top-level await in dynamic imports (#4277) 2022-04-08 15:28:10 +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/강동윤
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 ExportAlls (#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
magic-akari
534fc52a72
fix(es/module): Make exported vars follow specification (#3906) 2022-03-08 09:23:40 +00:00
Guillaume Malette
f575b1bc48
fix(es/module/cjs): Allow re-exports to be lazy (#3856) 2022-03-07 20:39:45 +00:00
Donny/강동윤
8e30d83d14
fix(es/module): Revert fix for jest.spyOn 2022-03-07 18:21:14 +09:00
Austaras
9dd0105c5b
feat(es/fixer): Remove extra parens around iife in expression position (#3887) 2022-03-07 03:51:57 +00:00
Donny/강동윤
6a005fc15a
fix(es/module): Visit the value of class properties (#3877) 2022-03-06 14:03:08 +09:00
Guillaume Malette
1f70fa6e08
feat(es/module/cjs): Support regex-based patterns for lazy config (#3704) 2022-03-05 07:56:18 +00:00
Donny/강동윤
9546eefe72
fix(es/module): Fix jest.spyOn (#3845) 2022-03-04 07:04:56 +00:00
Donny/강동윤
8beaa202e2
fix(es/minifier): Fix optimizations of terminating expressions (#3794) 2022-03-01 09:55:45 +00:00
underfin
557a520a6d
feat(es/modules): Support system js (#3659) 2022-03-01 05:18:55 +00:00
magic-akari
ad0a8539e0
feat(es/module): Workaround stack overflow bug of JavaScriptCore related to too many exports (#3763) 2022-02-27 09:59:40 +00:00
Austaras
0f7a99787f
feat(es/compat): Add loose mode for classes (#3474) 2022-02-15 04:02:08 +00:00
Donny/강동윤
9b76783281
refactor(common): Cleanup & rustfmt (#3495)
swc_common:
 - Merge identical source codes.

swc_css_parser:
 - Deny `clippy::all`.
 - Fix lints.
2022-02-09 06:33:32 +00:00
magic-akari
fa0216d908
fix(es/modules): Hoist named exports (#3479) 2022-02-09 04:50:33 +00:00
RiESAEX
745604b26d
fix(es/modules): Allow using a dynamic import with an expression from another import (#3450) 2022-02-05 14:49:13 +09:00
RiESAEX
1dcc188dd8
fix(es/modules): Allow using dynamic import with a name from another import (#3390) 2022-01-28 06:36:20 +00:00
Guillaume Malette
9565149539
fix(es/modules): Fix lazy import handling (#3211)
swc_ecma_transforms_module:
 - `common_js`: Correctly track lazy imports. (Closes #3081)
2022-01-11 07:13:12 +00:00
Donny/강동윤
1ea965cecb
fix(es/parser): Drop outdated options (#2974)
swc_ecma_parser:
 - Drop flags in `EsConfig`.
 - Drop flags in `TsConfig`.
 - Drop unused variants from `SyntaxError`.
2021-12-05 17:33:34 +09:00
David Sherret
67280b6fb0
fix(es/typescript): Run resolver before typescript::strip (#2951)
swc_ecma_transforms_base:
 - `resolver`: Handle some typescript nodes.

swc_ecma_transforms_typescript:
 - `strip`: Use identifier span hygiene information for stripping types.
2021-12-04 02:35:16 +00:00
David Sherret
beb2c73c2c
fix(swc/hygiene): Prefer not renaming top level variables (#2940)
swc_ecma_transforms_base:
 - `hygiene`: Use concept of depth to prevent renaming top level nodes.
2021-12-04 01:55:27 +09:00
Austaras
1555ceb8a3
feat(es/transforms/compat): Add loose mode to parameters (#2911)
swc_ecma_utils:
 - Make `WrapperState` implement `Clone`.

swc_ecma_transforms_compat:
 - `paramters`: Fix handling of non-loose mode. (Closes #2800, Closes #2825)
2021-12-02 01:04:01 +00:00
Jeremy Grieshop
6f05c101f1
fix(es/transforms/module): Fix overriding of export * (#2883)
swc_ecma_transforms_module:
 - Emit correct value for `_exportNames`. (Closes #2101)
2021-11-28 09:08:02 +00:00
Austaras
dc58122283
feat(es/transforms/compat): Add more loose mode (#2611)
swc_ecma_transforms_compat:
- `computed_properties`: Add loose mode.
- `template_literals`: Add loose mode.
- `object_spread`: Add loose mode.
- `optional_chaining`: Add loose mode.
- `nullish_coalescing`: Add loose mode.
- `optional_chaining`: Fix #2734.
2021-11-15 14:31:21 +09:00
Donny/강동윤
2b2f6955f2
refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00