magic-akari
342c320bfa
fix(es/compat): Fix destructing of const
( #3545 )
2022-02-13 04:34:06 +09:00
SWC Bot
b3a55dbb4e
chore: Publish crates
2022-02-12 21:45:18 +09:00
magic-akari
5802b62e34
fix(es/compat): Allow destructuring assignment to an object property ( #3544 )
2022-02-12 21:43:51 +09: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
Donny/강동윤
8bf5cf4d03
chore(es): Fix clippy warnings ( #3482 )
2022-02-08 19:50:22 +09:00
Donny/강동윤
19e7c70bd7
chore: Publish crates
2022-02-04 13:21:41 +09:00
RiESAEX
cc185f01cb
feat(es/parser): Add an option to allow super
outside of class methods ( #3427 )
2022-02-04 13:21:16 +09:00
Donny/강동윤
51f2202e9e
chore: Publish crates
2022-02-04 12:34:05 +09:00
magic-akari
3bb2a6ccca
fix(es/compat): Handle initializer hole in array patterns ( #3442 )
2022-02-04 12:33:19 +09:00
Donny/강동윤
283486dcd7
chore: Publish crates
2022-02-03 17:56:51 +09:00
Austaras
01500a54e0
fix(es/compat): Handle private fields in nested classes ( #3431 )
2022-02-03 08:54:30 +00:00
Donny
3eaebdf479
chore: Publish crates
2022-01-28 01:14:47 +09:00
magic-akari
9eb77738fd
fix(es/compat): Add the missing span in optional_chaining
( #3384 )
2022-01-28 01:14:09 +09:00
Donny
4a4cb731be
chore: Publish crates
2022-01-25 17:24:18 +09:00
Donny/강동윤
b1a8db6194
fix(es/block-scoping): Pop scope correctly on early returns ( #3360 )
...
swc_ecma_transforms_compat:
- `block_scoping`: Pop scope even on fast-path.
2022-01-25 17:22:58 +09:00
Donny
29f3446df1
chore: Publish crates
2022-01-25 05:57:14 +09:00
Austaras
29aaac1f15
fix(es/compat): Handle nested functions in private_field
( #3355 )
2022-01-24 20:55:43 +00:00
Donny
2d26041d1d
chore: Publish crates
2022-01-24 15:11:53 +09:00
Sosuke Suzuki
d1c90a4e5f
feat(es/bugfix): Add bugfix-safari-id-destructuring-collision-in-function-expression
( #3109 )
2022-01-24 05:48:52 +00:00
Donny
af53b9487f
chore: Publish crates
2022-01-20 23:57:38 +09:00
magic-akari
6d1ad368ac
fix(es/compat): Fix regression of destructuring
( #3326 )
2022-01-20 14:46:58 +00:00
LongYinan
9608605772
build(node-swc): Fix GLIBC < 2.18 compatible issues and android arm binary loading issue ( #3314 )
2022-01-20 02:21:24 +00:00
Austaras
9e636c7e58
refactor(es): Add visit_obj_and_computed
macro ( #3304 )
2022-01-19 23:11:52 +09:00
Donny
d7964dd547
chore: Publish crates
2022-01-17 22:42:52 +09:00
Austaras
89235b8294
fix(es/compat): Apply static_blocks
before class_properties
( #3292 )
2022-01-17 13:20:02 +00:00
Donny
d696c324fb
chore: Publish crates
2022-01-17 16:05:12 +09:00
Satish Srinivasan
2352920889
feat(es/compat): Use remove useless source map entries generated by classes
( #3242 )
2022-01-17 06:48:31 +00:00
Donny
681de03e4b
chore: Publish crates
2022-01-17 13:36:00 +09:00
Austaras
90a62bb215
refactor(es/utils): Merge the super field visitor with FnEnvHoister
( #3279 )
2022-01-17 13:35:32 +09:00
Donny
7ec6e94cb0
chore: Publish crates
2022-01-16 16:58:21 +09:00
Donny/강동윤
9dd0647e3a
feat(es/ast): Improve AST api for plugin authors ( #3281 )
...
swc_ecma_ast:
- Improve API for AST creation.
2022-01-16 16:56:41 +09:00
Donny/강동윤
e8670b3383
refactor(es): More fix for clippy ( #3280 )
2022-01-16 14:33:06 +09:00
Donny/강동윤
357a350390
refactor(*): Cleanup ( #3274 )
2022-01-15 16:43:34 +09:00
Donny
6ad418339e
chore: Publish crates
2022-01-14 23:14:37 +09:00
RiESAEX
d3cc488ac1
feat(es/compat): Use var
for _len
and args
in rest parameters ( #3267 )
2022-01-14 14:13:42 +00:00
Donny
d03824b13d
chore: Publish crates
2022-01-14 12:45:45 +09:00
Donny/강동윤
7c19e26d0f
fix(es/transforms): Fix this
in async arrow class properties ( #3252 )
...
swc_ecma_transforms_compat:
- `async_to_generator`: Fix `this` in async class properties. (https://github.com/vercel/next.js/issues/33283 )
- Add a test for #3228 (Closes #3228 ).
2022-01-14 12:44:34 +09:00
Donny/강동윤
978de5943e
chore(ci): Configure clippy
( #3250 )
2022-01-13 23:06:11 +09:00
Donny
c13bba8401
chore: Publish crates
2022-01-12 18:39:56 +09:00
Donny
c5f2feaf58
chore: Publish crates
2022-01-11 19:35:28 +09:00
magic-akari
2e5150d2b7
fix(es/compat): Transform &&=
operator ( #3225 )
2022-01-11 10:33:57 +00:00
Donny
9a62ef21b7
chore: Publish crates
2022-01-11 16:48:26 +09:00
RiESAEX
b649d23bac
feat(es/compat): Implement object super ( #3127 )
...
swc_ecma_transforms_compat:
- Implement object super. (Closes #2684 )
2022-01-11 07:45:01 +00:00
Donny
d51904b93e
chore: Publish crates
2022-01-11 14:42:17 +09:00
Donny/강동윤
1edbf1a37a
feat(es/ast): Update is-macro
( #3226 )
...
swc_ecma_ast:
- Add `as_*` for ast enums.
2022-01-11 14:41:34 +09:00
Donny
852ec783f3
chore: Publish crates
2022-01-10 22:57:17 +09:00
Austaras
f58b50bea7
refactor(es/ast): Change types of member-like expressions ( #3178 )
...
swc_ecma_ast:
- Split `MemberExpr` into `MemberExpr` and `SuperPropExpr`.
- Use `Box<Expr>` for `MemberExpr.obj`.
- Use ad-hoc type for `MemberExpr.prop`.
- Use ad-hoc type for `SuperPropExpr.prop`.
- Use `Callee` instead of `ExprOrSpread` for `CallExpr`.
- Simplify types for meta property expressions.
2022-01-10 13:54:42 +00:00
Donny
0d4b671052
chore: Publish crates
2022-01-10 15:05:26 +09:00
Donny
9e0f6958a3
chore: Publish crates
2022-01-09 01:05:51 +09:00
magic-akari
5bee4e4902
refactor(es/compat): Preserve length of functions in async_generator
( #3202 )
2022-01-08 15:19:41 +00:00
Donny/강동윤
70c2f3b3a5
security(repo): Fix crev integration ( #3210 )
2022-01-07 20:03:03 +09:00
Donny
fa212be6ae
chore: Publish crates
2022-01-07 14:49:46 +09:00
Donny/강동윤
54353a6fb5
fix(es/helpers): Don't transpile _typeof
helper ( #3208 )
...
swc_ecma_transforms_base:
- Add a directive to `_typeof` helper.
swc_ecma_transforms_compat:
- Don't transpile `_typeof` helper. (Closes #3201 )
swc_ecma_minifier:
- Drop swc/babel directives.
2022-01-07 14:48:08 +09:00
Donny
6892f27ad7
chore: Publish crates
2022-01-06 20:19:36 +09:00
Sosuke Suzuki
432f877790
feat(es/ast): Use ModuleExportName
for ExportNamespaceSpecifier
( #3195 )
2022-01-06 20:19:11 +09:00
Donny
781aa79b82
chore: Publish crates
2022-01-04 19:29:50 +09:00
Donny
1e5bc88cd3
chore: Publish crates
2022-01-03 17:45:09 +09:00
Sosuke Suzuki
07c0489575
feat(es/ast): Add ModuleExportName
( #3048 )
...
swc_ecma_ast:
- Allow using string as import/export specifiers.
2022-01-03 08:44:11 +00:00
magic-akari
52961804d1
feat(es/codegen): Make the output for empty objects and empty statements pretty ( #3171 )
2022-01-03 05:54:58 +09:00
Donny
b52240d8e5
chore: Publish crates
2021-12-31 04:02:07 +09:00
magic-akari
e11210309c
fix(es/compat): Fix new.target
in class properties ( #3156 )
2021-12-31 04:01:28 +09:00
Donny
097e1e310c
chore: Publish crates
2021-12-30 19:48:39 +09:00
magic-akari
f78d005a95
fix(es/compat): Fix length of async functions ( #3136 )
...
swc_ecma_transforms_compat:
- `async_to_generator`: Preserve function length. (Closes #3135 )
2021-12-30 10:26:26 +00:00
Donny/강동윤
194b3e9b67
refactor(*): Use 2021 edition ( #3151 )
2021-12-30 18:59:18 +09:00
Donny
b9c3fba904
chore: Publish crates
2021-12-30 17:22:27 +09:00
magic-akari
35b64613bb
fix(es/compat): Visit all private class methods ( #3150 )
2021-12-30 17:21:54 +09:00
Donny
0cf8265f02
chore: Publish crates
2021-12-29 21:04:30 +09:00
Austaras
356082ad84
fix(es/utils): Fix handling of new.target
( #3145 )
2021-12-29 11:38:32 +00:00
Donny
a0d31f5ce4
chore: Publish crates
2021-12-28 17:12:28 +09:00
magic-akari
27d3fd93b0
fix(es/compat): Fix computed_properties
( #3120 )
...
swc_ecma_transforms_compat:
- `computed_properties`: Fix handling of getter/setter properties. (Closes #2680 )
2021-12-28 08:07:30 +00:00
Donny
4ab82fb4a7
chore: Publish crates
2021-12-27 04:38:36 +09:00
magic-akari
1b6ac25d5c
fix(es/compat): Fix private methods of a class ( #3123 )
...
swc_ecma_transforms_compat:
- `class_properties`: Handle private method calls properly. (Closes #3055 )
2021-12-26 19:37:46 +00:00
Donny
836cbd63a8
chore: Publish crates
2021-12-26 23:38:59 +09:00
magic-akari
ac78a527eb
fix(es/compat): Fix handling of hoisted functions in regenerator ( #3119 )
...
swc_ecma_ast:
- Implement `Take` for `FnDecl`.
swc_ecma_transforms_compat:
- `regenerator`: Handle hoisted function declarations properly. (Closes #2556 )
- `regenerator`: Fix handling of class properties with an async function as the initializer. (Closes #2620 )
2021-12-26 14:36:21 +00:00
Donny
4ddc01e219
chore: Publish crates
2021-12-26 00:35:28 +09:00
magic-akari
a1cb4a4aa5
fix(es/compat): Fix handling of class methods with a big int as a key ( #3118 )
2021-12-25 14:46:56 +00:00
Donny
cb603cc1ff
chore: Publish crates
2021-12-24 13:40:54 +09:00
magic-akari
e5971f77d5
fix(es/ast): Fix Ident::verify_symbol
( #3108 )
2021-12-24 04:29:49 +00:00
Donny
5e6f6e5122
chore: Publish crates
2021-12-24 12:23:46 +09:00
magic-akari
9f5a8f728a
fix(es/compat): Fix destructuring
( #3104 )
...
swc_ecma_transforms_compat:
- `destructuring`: Handle assignment expressions in rhs of variable declarators correctly. (Closes #2850 )
2021-12-24 03:19:45 +00:00
Donny
4bb264d480
chore: Publish crates
2021-12-24 10:47:59 +09:00
Donny/강동윤
d923f89db1
fix(es/compat): Fix classes
pass ( #3107 )
...
swc_ecma_ast:
- Add `Ident::verify_symbol`.
swc_ecma_transforms_compat:
- Don't generate invalid identifiers. (Closes #3106 )
2021-12-24 10:46:55 +09:00
Donny
08c4589da7
chore: Publish crates
2021-12-22 17:06:54 +09:00
magic-akari
df87c2b302
fix(es/transforms): Fix descturcturing
( #3098 )
...
swc_ecma_transforms_compat:
- `destructuring`: Handle exports of bindings with object pattern properties correctly. (Closes #2858 )
2021-12-22 08:03:41 +00:00
Donny
967f30d7d4
chore: Publish crates
2021-12-19 12:45:44 +09:00
magic-akari
ff1aab710c
fix(es/compat): Transform an optional eval call as an indirect eval call ( #3068 )
...
swc_ecma_transforms_compat:
- `optional_chaining`: Handle optional `eval` calls properly. (Closes #2735 )
2021-12-19 03:42:46 +00:00
Donny
8c16c2b77d
chore: Publish crates
2021-12-17 15:09:02 +09:00
OJ Kwon
a381fb8bce
fix(es/compat): Fix block_scoping
( #3058 )
...
swc_ecma_transforms_compat:
- `block_scoping`: Consider the location of variable declarations. (Closes #2998 )
2021-12-17 15:08:22 +09:00
Donny
9b36abbe75
chore: Publish crates
2021-12-15 16:22:00 +09:00
Austaras
38955c0c8d
refactor(es/ast): Change type or the key
of ClassProp
to PropName
( #3038 )
2021-12-15 16:21:30 +09:00
Donny
83e1635a04
chore: Publish crates
2021-12-14 19:48:17 +09:00
OJ Kwon
29eb71aaf9
perf(es/compat): Migrate regenerator
to VisitMut
( #3037 )
2021-12-14 09:24:57 +00:00
Donny
f86c077a37
chore: Publish crates
2021-12-13 06:46:14 +09:00
Donny
28f3c4fb52
chore: Publish crates
2021-12-13 06:45:43 +09:00
RiESAEX
d3ffc6719b
perf(es/compat): Migrate class helper to VisitMut
( #3020 )
2021-12-12 21:18:48 +00:00
Donny
da4111a022
chore: Publish crates
2021-12-11 20:54:21 +09:00
RiESAEX
333b52c646
perf(es/compat): Migrate classes
to VisitMut
partially ( #2995 )
2021-12-11 08:24:57 +00:00
Donny
a04b4082a4
Bump version
2021-12-11 17:01:12 +09:00
OJ Kwon
00d22b8fde
build: Use mocha
for exec_ test
instead of jest
( #3009 )
2021-12-11 07:59:21 +00:00
Donny
f87df958d5
chore: Publish crates
2021-12-11 16:21:44 +09:00
OJ Kwon
91d6343d7f
perf(es/compat): Migrate regenerator
to VisitMut
partially ( #3007 )
2021-12-11 05:30:56 +00:00
Donny
68861007d9
chore: Publish crates
2021-12-10 18:56:37 +09:00
OJ Kwon
7ca1e174b7
perf(es/compat): Migrate object_rest
to VisitMut
( #2997 )
2021-12-10 18:56:24 +09:00
Donny
c5b943f588
chore: Publish crates
2021-12-10 18:55:41 +09:00
OJ Kwon
a1756062c5
perf(es/compat): Migrate class_properties
to VisitMut
( #2993 )
2021-12-10 09:54:14 +00:00
Donny/강동윤
6a7ad9239e
fix(es/compat): Fix for synthesized template literals ( #2994 )
2021-12-08 19:47:11 +09:00
Donny
7d4c372e8a
chore: Publish crates
2021-12-07 15:19:11 +09:00
OJ Kwon
32f9369958
perf(es/compat): Migrate static_blocks
to VisitMut
( #2973 )
2021-12-07 15:18:53 +09:00
Donny
82ece9d0ca
chore: Publish crates
2021-12-07 15:15:08 +09:00
Donny
b1a47ee971
chore: Publish crates
2021-12-07 14:34:44 +09:00
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