Commit Graph

237 Commits

Author SHA1 Message Date
SWC Bot
415c495505 chore: Publish crates 2022-08-12 13:42:01 +00:00
Donny/강동윤
3eb1f4b2b1
chore(ci): Fix lints (#5462) 2022-08-12 13:13:35 +00:00
Donny/강동윤
033e05677a chore: Publish crates 2022-08-12 15:18:06 +09:00
OJ Kwon
072eb13bf1
build(es): Bump up packages (#5451) 2022-08-11 23:58:00 +00:00
OJ Kwon
e25b37d579
build(atoms): Bump swc_atoms (#5442) 2022-08-11 18:52:44 +09:00
SWC Bot
cdb9bbd707 chore: Publish crates 2022-08-08 03:00:13 +00:00
OJ Kwon
5c9ea16b2a
build(cargo): Update packages (#5331) 2022-07-29 08:30:41 +09:00
SWC Bot
129a886e13 chore: Publish crates 2022-07-27 04:18:47 +00:00
Donny/강동윤
a37fdca969 chore: Publish crates 2022-07-22 21:06:43 +09:00
SWC Bot
0dc240fbd9 chore: Publish crates 2022-07-21 05:02:55 +00:00
Donny/강동윤
d9877e305a
fix(es/decorators): Use decorated consturctors (#5263) 2022-07-21 05:00:51 +00:00
magic-akari
2010409bac
fix(es/compat): Preserve orders of imports and exports (#5249) 2022-07-20 06:57:43 +00:00
SWC Bot
fe74b7067c chore: Publish crates 2022-07-20 04:10:58 +00:00
OJ Kwon
0d91741eb9
build(cargo): Align dependency versions (#5248) 2022-07-20 03:42:04 +00:00
Donny/강동윤
54982d4d72 chore: Publish crates 2022-07-19 11:38:23 +09:00
Donny/강동윤
d3b0996617 chore: Publish crates 2022-07-16 23:30:15 +09:00
magic-akari
ec9378370d
fix(es/parser): Fix parsing of export specifiers (#5190) 2022-07-13 10:55:55 +00:00
Donny/강동윤
b433b69263 chore: Publish crates 2022-07-12 23:58:30 +09:00
SWC Bot
2bd5b4413a chore: Publish crates 2022-07-09 10:17:04 +00:00
SWC Bot
297228a690 chore: Publish crates 2022-07-07 07:48:49 +00:00
SWC Bot
40dabaddfd chore: Publish crates 2022-07-07 04:38:01 +00:00
SWC Bot
9385103649 chore: Publish crates 2022-07-06 04:44:10 +00:00
SWC Bot
f5447cd1b1 chore: Publish crates 2022-07-02 03:53:10 +00:00
Donny/강동윤
c2c923e205 chore: Publish crates 2022-07-01 11:50:45 +09:00
SWC Bot
73874486b2 chore: Publish crates 2022-06-29 11:05:08 +00:00
SWC Bot
5576c3c601 chore: Publish crates 2022-06-29 03:37:57 +00:00
Donny/강동윤
8b042745c6 chore: Publish crates 2022-06-27 21:36:54 +09:00
SWC Bot
4883fe8011 chore: Publish crates 2022-06-25 05:06:17 +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
Donny/강동윤
814f72f224
fix(es/decorators): Fix syntax context of decorated classes (#4905) 2022-06-08 05:00:22 +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
a163279c88 chore: Publish crates 2022-05-26 11:35:19 +00:00
SWC Bot
ead25ee153 chore: Publish crates 2022-05-15 05:09:48 +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
SWC Bot
e4ce388632 chore: Publish crates 2022-05-06 04:10:39 +00:00
William Tetlow
e2fde1a9a7
fix(es/parser): Revert #4287 (#4542) 2022-05-06 04:07:00 +00:00
SWC Bot
00695f4b23 chore: Publish crates 2022-05-03 07:50:35 +00:00
Donny/강동윤
f30ffdf200
fix(es/decorators): Make legacy decorator identical to tsc (#4496) 2022-05-03 07:48:09 +00:00
Donny/강동윤
27f9b30ef2 chore: Publish crates 2022-04-26 19:30:11 +09: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
995b4367cc chore: Publish crates 2022-04-15 07:39:50 +00:00
SWC Bot
fa880634bd chore: Publish crates 2022-04-11 20:05:28 +00:00
magic-akari
d0de5a63a0
feat(es): Support typeof with private fields (#4302) 2022-04-11 20:02:51 +00:00
SWC Bot
4a097adbf7 chore: Publish crates 2022-04-11 18:48:43 +00:00
OJ Kwon
fad652f879
chore(plugin): Align version of swc_common to include dummy comment api (#4270) 2022-04-07 07:21:37 +00:00
SWC Bot
5eb3d8315a chore: Publish crates 2022-04-05 12:49:22 +00:00
Alexander Akait
f39d3aca4d
feat(es/ast): Add raw to Num (#4245) 2022-04-05 12:46:35 +00:00
OJ Kwon
4093814895
chore(build): Dedup swc_common (#4247) 2022-04-05 14:28:07 +09:00
Donny/강동윤
1f466e1d2f
chore(ci): Fix benchmark action (#4242) 2022-04-04 20:12:03 +09:00
SWC Bot
3337777f8c chore: Publish crates 2022-04-02 06:06:39 +00:00
SWC Bot
1068561800 chore: Publish crates 2022-04-01 04:29:08 +00:00
SWC Bot
6125de9808 chore: Publish crates 2022-03-28 12:20:51 +00:00
Donny/강동윤
e6088408bf chore: Publish crates 2022-03-24 12:05:47 +09:00
SWC Bot
77722c4943 chore: Publish crates 2022-03-22 08:03:01 +00:00
Alexander Akait
634d732803
feat(es/ast): Add raw to Str (#4071) 2022-03-22 07:54:08 +00:00
SWC Bot
a74d4ca679 chore: Publish crates 2022-03-17 10:29:25 +00:00
SWC Bot
4d6d766cf8 chore: Publish crates 2022-03-17 05:36:01 +00:00
LongYinan
db9b988845
feat(node-swc): Add libc field in Linux platform packages (#4046) 2022-03-16 18:58:24 +09:00
SWC Bot
5e89d18370 chore: Publish crates 2022-03-15 12:23:49 +00:00
Austaras
0c76696ed2
fix(es/decorator): Insert initializer to constructor with body (#4028) 2022-03-15 12:21:17 +00:00
SWC Bot
2f6f829405 chore: Publish crates 2022-03-15 09:17:09 +00:00
Donny/강동윤
0c8c3d7d51
fix(es/decorator): Remove noop_fold_type (#4022) 2022-03-15 09:14:47 +00:00
Donny/강동윤
dac84b98e3
doc(api/rust): Add examples (#4002) 2022-03-13 22:07:34 +00:00
Donny/강동윤
38c0c0faa6 chore: Publish crates 2022-03-14 04:11:07 +09:00
Donny/강동윤
ddfa490899 chore: Publish crates 2022-03-12 10:00:23 +09:00
LongYinan
1206c84e19
feat(*): Update dependencies (#3964) 2022-03-11 23:00:55 +09:00
SWC Bot
666f55e01c chore: Publish crates 2022-03-10 07:48:19 +00:00
SWC Bot
fd453b9170 chore: Publish crates 2022-03-05 19:34:45 +00:00
SWC Bot
2fdc5f625d chore: Publish crates 2022-03-05 14:52:49 +00:00
SWC Bot
add86a7e6a chore: Publish crates 2022-03-05 06:48:00 +00:00
SWC Bot
5f8f114b62 chore: Publish crates 2022-03-04 05:26:32 +09:00
SWC Bot
4fe874dd77 chore: Publish crates 2022-02-26 15:11:21 +00:00
Donny/강동윤
47ccff8a7c
feat(es/parser): Provide more api for reducing binary size (#3747) 2022-02-26 09:29:05 +09:00
Donny/강동윤
fd223793e8
refactor(es/transforms): Use recommended ast apis (#3735) 2022-02-25 06:50:19 +00:00
SWC Bot
8f1aef47d4 chore: Publish crates 2022-02-25 06:10:45 +00:00
SWC Bot
e4c674b9cb chore: Publish crates 2022-02-21 13:10:43 +00:00
SWC Bot
e08a2c2c17 chore: Publish crates 2022-02-21 07:15:09 +00:00
SWC Bot
264f1cf8d6 chore: Publish crates 2022-02-20 15:53:48 +00:00
SWC Bot
7351ec2477 chore: Publish crates 2022-02-15 13:22:16 +09: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
Donny/강동윤
42918397cb chore: Publish crates 2022-02-08 01:20:34 +09:00
William Tetlow
4f5e87b66b
fix(es/compat): Fix legacy decorator pass (#3459) 2022-02-07 16:11:41 +00:00
Donny/강동윤
19e7c70bd7 chore: Publish crates 2022-02-04 13:21:41 +09:00
Donny
930a1c2405 chore: Publish crates 2022-01-29 13:37:17 +09:00
Donny/강동윤
cebc5dc148
fix(swc): Run resolver before everything (#3400)
swc:
 - Use `ts_resolver` for typescript. This is required to handle decorators properly.
 - Apply `resolver` before creating custom passes.
2022-01-29 13:36:34 +09:00
Donny
ad860c9a1c chore: Publish crates 2022-01-25 06:22:21 +09: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
Donny
681de03e4b chore: Publish crates 2022-01-17 13:36:00 +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/강동윤
357a350390
refactor(*): Cleanup (#3274) 2022-01-15 16:43:34 +09:00
Donny/강동윤
2690742db0
refactor(es/transforms): Cleanup (#3273) 2022-01-15 15:36:40 +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
9a62ef21b7 chore: Publish crates 2022-01-11 16:48:26 +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
6892f27ad7 chore: Publish crates 2022-01-06 20:19:36 +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
Donny/강동윤
194b3e9b67
refactor(*): Use 2021 edition (#3151) 2021-12-30 18:59:18 +09:00
Donny
0cf8265f02 chore: Publish crates 2021-12-29 21:04:30 +09:00
OJ Kwon
72c963662d
refactor(*): Drop unused dependencies (#3138) 2021-12-29 15:27:51 +09:00
Andreu Botella
2f3ca22ecf
fix(es/parser): Support import assertions in specifier-less imports (#3134) 2021-12-28 14:00:00 +00:00
Donny
ba187c3c6a chore: Publish crates 2021-12-28 20:23:21 +09:00
Andreu Botella
c9adf03338
fix(es): Handle import assertions correctly (#3113)
swc_ecma_codegen:
 - Implement codegen for static import assertions.

swc_ecma_transforms_proposal:
  - `import_assertions`: Support `export`s.

swc:
 - Add `jsc.experimental.keep_import_assertions`.

node-swc:
 - Fix typo.
2021-12-28 11:18:33 +00:00
Donny/강동윤
f66c2cd375
fix(es/helpers): Fix decorators (#3105)
swc_ecma_transforms_base:
 - Fix `_applyDecoratedDescriptor`. (Closes #2127)
2021-12-23 19:03:53 +09:00
Donny
3808101ca8 chore: Publish crates 2021-12-20 14:38:28 +09:00
James Newell
938e544ac5
fix(es/compat): Fix handling of union of the legacy decorator pass (#3057)
swc_ecma_transforms_proposal:
 - Use `Object` for `null`/`undefined`.
 - Fix the type for union types. (Closes #2461)
2021-12-20 05:30:52 +00: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
f86c077a37 chore: Publish crates 2021-12-13 06:46:14 +09:00
RiESAEX
d3ffc6719b
perf(es/compat): Migrate class helper to VisitMut (#3020) 2021-12-12 21:18:48 +00:00
Donny
a04b4082a4 Bump version 2021-12-11 17:01:12 +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
67dc0d3b94 chore: Publish crates 2021-12-02 10:08:22 +09:00
Donny
86d2cebd37 chore: Publish v1.2.115 2021-12-01 14:20:52 +09:00
Donny
d4ffce13b5 chore: Publish crates 2021-11-24 10:08:01 +09: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
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