Donny/강동윤
e48263b2f3
refactor(visit): Remove &dyn Node
from Visit
( #2984 )
...
swc_visit_macros:
- Remove `&dyn Node` from `Visit`.
- Implement `VisitWith<V>` for `[T]`.
2021-12-07 14:34:16 +09:00
Donny/강동윤
f052a65bf3
fix(es/compat): Preserve constructor parameters ( #2975 )
...
swc_ecma_visit:
- Add cargo feature `debug`.
- Add more context for `tracing` when `debug` is enabled.
swc_ecma_utils:
- Add some logging.
swc_ecma_transforms_compat:
- Add some logging.
- `destructuring`: Don't drop patterns. (Closes #2139 )
testing:
- Enable logging by default.
- Configure logging for `Tester`.
2021-12-06 20:08:50 +09:00
Donny
acc45e7c36
chore: Publish crates
2021-12-05 17:34:04 +09: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
Donny
529f980693
chore: Publish crates
2021-12-05 15:44:50 +09:00
Donny
fd2a788282
chore: Publish crates
2021-12-04 21:03:13 +09:00
OJ Kwon
89af8ab9a2
perf(es/compat): Migrate class_properties
to VisitMut
partially ( #2966 )
2021-12-04 11:57:52 +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
Donny
348b6cf6f0
chore: Publish crates
2021-12-03 18:36:10 +09:00
OJ Kwon
084eebec84
refactor(es/compat): Migrate destructuring
to VisitMut
( #2947 )
2021-12-03 09:27:58 +00:00
Donny
ef3ea6b467
chore: Publish crates
2021-12-03 17:25:44 +09:00
RiESAEX
99da4221ae
fix:(es/compat): Change order of passes ( #2949 )
...
swc_ecma_transforms_compat:
- Run `shorthand` before `function_name` so we can infer name for method properties. (Closes #2150 )
2021-12-03 17:20:35 +09:00
David Sherret
4d993c26b6
fix(es/hygiene): Reduce renaming ( #2938 )
...
swc_ecma_transforms_base:
- `hygiene`: Treat class methods and constructors as a scope.
2021-12-02 07:28:09 +00:00
Donny
36db1ed359
chore: Publish crates
2021-12-02 15:55:03 +09:00
RiESAEX
d8c8641e59
fix(es/parser, es/compat): transform tagged template with invalid escape sequence ( #2939 )
...
swc_ecma_parser:
- Preserve more data for invalid escapes in template literals.
swc_ecma_transforms_compat:
- Fix handling of template literals. (Closes #2674 )
2021-12-02 15:49:45 +09:00
Donny/강동윤
0304c550a4
chore: Break cycles ( #2941 )
2021-12-02 10:44:27 +09:00
Donny
67dc0d3b94
chore: Publish crates
2021-12-02 10:08:22 +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
Donny
86d2cebd37
chore: Publish v1.2.115
2021-12-01 14:20:52 +09:00
Donny
e6957ce400
chore: Publish crates
2021-11-30 19:40:27 +09:00
OJ Kwon
4075ff8029
perf(es/transform/compat): Migrate optional_chaining
to VisitMut
( #2891 )
2021-11-30 10:00:56 +00:00
Donny
12d31c997b
chore: Publish crates
2021-11-30 13:53:41 +09:00
RiESAEX
0c1f2ebdde
fix(es/transforms/compat): Fix destructuring
( #2904 )
...
swc_ecma_transforms_compat:
- `desturcturing`: Fix non-loose mode. (Closes #2841 , Closes #2863 )
2021-11-30 04:49:54 +00:00
Donny
073c3787f1
chore: Publish crates
2021-11-30 13:11:36 +09:00
Donny/강동윤
028d0ce2c6
fix(es/transforms/compat): Fix block scoping ( #2916 )
...
swc_ecma_transforms_compat:
- `block_scoping`: Track if we are in nested loops.
- `block_scoping`: Don't treat `break` nor `continue` in nested loops as leaper. (https://github.com/vercel/next.js/issues/31757 , Closes #2799 , Closes #2915 )
- `block_scoping`: Don't recurse into nested loops while looking for functions. (Closes #2622 )
2021-11-30 13:11:09 +09:00
Donny
0d39521b91
chore: Publish crates
2021-11-27 17:51:10 +09:00
OJ Kwon
283074c86e
perf(es/transforms/compat): Migrate spread
to VisitMut
( #2888 )
2021-11-27 08:49:37 +00:00
Donny
01d4139e42
chore: Publish crates
2021-11-27 15:53:05 +09:00
Austaras
803787ab9e
fix(es/transforms/compat): Fix arrow
( #2882 )
...
swc_ecma_transforms_compat:
- Handle arrow expressions in constructors of classes with a super class. (Closes #2811 )
2021-11-27 06:46:02 +00:00
Donny
72e892ec12
chore: Publish crates
2021-11-26 23:29:33 +09:00
OJ Kwon
a350d86c57
refactor(es/transforms/compat): Improve async_to_generator
( #2876 )
...
swc_ecma_transforms_compat:
- `async_to_generator`: Remove explicit bindings for object properties.
2021-11-26 12:26:20 +00:00
Donny
730e138925
chore: Publish crates
2021-11-25 16:17:34 +09:00
RiESAEX
a6398e9f26
fix(es/transforms/compat): Fix destructuring
( #2866 )
...
swc_ecma_transforms_compat:
- Check length correctly. (Closes #2819 , Closes #2821 , Closes #2843 )
2021-11-25 06:51:59 +00:00
Donny
a8bda3bb9c
chore: Publish crates
2021-11-24 13:54:33 +09:00
OJ Kwon
1609580a4e
perf(es/transforms/compat): Migrate computed_props
to VisitMut
( #2857 )
2021-11-24 04:49:45 +00:00
Donny
d4ffce13b5
chore: Publish crates
2021-11-24 10:08:01 +09:00
Austaras
fbcbeb4892
refactor(es/transforms/compat): Lift this replacer out of arrow ( #2812 )
...
swc_ecma_utils:
- Add `FunctionWrapper`, which tracks `this` and `arguments`.
swc_ecma_transforms_compat:
- `arrow`: Use `FunctionWrapper` instead of tracking `this` by itself.
- `async_to_generator`: Use `FunctionWrapper` instead of tracking `this` by itself.
2021-11-24 00:59:06 +00:00
Donny
96d8ee522c
chore: Publish crates
2021-11-21 16:30:42 +09:00
OJ Kwon
a9a9833be8
perf(es/transforms/compat): Migrate block_scoping
to VisitMut
( #2817 )
2021-11-21 07:30:11 +00:00
Donny/강동윤
6a7775b5da
fix(es/transforms/compat): Fix this
in constructor ( #2818 )
...
swc_ecma_transforms_classes:
- Don't modify `this` in constructors.
swc_ecma_transforms_compat:
- Fix handling of `this` in constructors.
2021-11-20 19:07:42 +09:00
Donny
5a037876dd
chore: Publish crates
2021-11-20 17:05:17 +09:00
OJ Kwon
26734d44eb
fix(es/transforms/compat): Reduce .bind(this)
( #2806 )
...
swc_ecma_transforms_compat:
- `async_to_generator`: Reduce explicit `.bind(this)`.
2021-11-20 08:04:27 +00:00
OJ Kwon
372f5bf1e0
perf(es/transforms/compat): Migrate parameters
to VisitMut
( #2804 )
2021-11-19 09:27:16 +00:00
Donny
ca55539938
chore: Publish crates
2021-11-19 00:12:37 +09:00
OJ Kwon
5261df52d2
fix(es/transforms/compat): Remove .bind(this)
( #2776 )
...
swc_ecma_transforms_compat:
- `async_to_generator`: Create `_this` instead of using `.bind(this)`.
2021-11-18 14:39:12 +00:00
Donny
a2f7bade39
chore: Publish crates
2021-11-18 17:25:19 +09:00
Austaras
29da148b3e
fix(es/transforms/compat): Fix optional_chaining
( #2791 )
...
swc_ecma_transforms_compat:
- `optional_chaining`: Preserve arguments of a call in an optional chaining expression.
2021-11-18 08:00:46 +00:00
Donny
225af14b52
chore: Publish crates
2021-11-18 01:07:46 +09:00
Donny/강동윤
06e02d8375
fix(es/transforms/compat): Revert #2740 ( #2784 )
2021-11-18 01:06:42 +09:00
Donny
8c04d396e4
chore: Publish crates
2021-11-17 16:06:57 +09:00
Donny/강동윤
95e7f4d4e9
fix: Revert #2766 ( #2774 )
2021-11-17 14:53:46 +09:00
Donny
e03af45c09
chore: Publish crates
2021-11-17 14:00:33 +09:00
Yuma Suzuki
ddfc7e6e91
fix(es/transform/compat): Preserve more span ( #2766 )
...
swc_ecma_transforms_compat:
- `async_to_generator`: Use correct span for async methods. (Closes #2701 )
2021-11-17 14:00:11 +09:00
Donny
3e4fbe7667
chore: Publish crates
2021-11-16 21:57:24 +09:00
OJ Kwon
2fb4e5a60c
fix(es/transforms/compat): Preserve more span ( #2762 )
...
swc_ecma_transforms_compat:
- `async_to_generator`: Preserve more span. (Closes #2758 )
2021-11-16 12:50:51 +00:00
Donny
c15116de07
chore: Publish crates
2021-11-15 17:45:19 +09:00
OJ Kwon
e7cbe3df20
refactor(es/transforms/compat): Migrate to VisitMut
( #2751 )
...
swc_ecma_transforms_compat:
- `export_namespace_from`: Migrate to `VisitMut`.
2021-11-15 08:22:44 +00:00
Donny/강동윤
2462b9941f
refactor: Cleanup ( #2749 )
2021-11-15 15:24:25 +09:00
Donny
2cd565bfc0
chore: Publish crates
2021-11-15 14:31:44 +09: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
8df860e16c
chore: Publish crates
2021-11-14 06:21:28 +09:00
Hiroshi Ogawa
bb646cc31c
fix(es/transforms/compat): Apply block_scoping
before regenerator
( #2740 )
2021-11-13 21:14:17 +00:00
Donny
898ed7015c
chore: Publish crates
2021-11-14 05:35:02 +09:00
Bojan Đurđević
571c5e3123
fix(es/transforms/compat): Fix new_target
( #2736 )
2021-11-13 20:34:28 +00:00
Donny
90b7074556
chore: Publish crates
2021-11-12 16:26:08 +09:00
OJ Kwon
6148d0c3da
refactor(es/transforms/compat): Migrate to VisitMut
( #2709 )
...
swc_ecma_transforms_compat:
- `async_to_generator`: Migrate to `VisitMut`.
2021-11-12 07:25:32 +00:00
Donny/강동윤
665c8e05fc
fix(es): Move TargetEnv
to loader from ast ( #2719 )
...
swc_ecma_ast:
- Move `TargetEnv` to `swc_ecma_loader`.
swc_ecma_loader:
- Drop unused dependencies.
2021-11-11 20:00:46 +09:00
Donny/강동윤
2b2f6955f2
refactor: Flatten ecmascript
( #2708 )
2021-11-10 19:00:54 +09:00