Commit Graph

576 Commits

Author SHA1 Message Date
Donny
cea7d21ca4 chore: Publish crates 2022-01-18 12:52:37 +09:00
Donny/강동윤
18a11d7c8f
fix(es/minifier): Remove more side-effect-free expressions. (#3301)
swc_ecam_minifier:
- `pure`: Drop more binary expressions.
- `pure`: Drop more literals.
2022-01-18 12:51:31 +09:00
Donny
3d7d96588e chore: Publish crates 2022-01-18 12:26:37 +09:00
OJ Kwon
c6ffdc8717
feat(plugin): Add PluginError (#3300) 2022-01-18 12:26:04 +09:00
Donny
5a08327784 chore: Publish crates 2022-01-18 11:30:19 +09:00
asquared31415
641265b147
fix(common): Use siphasher directly and upgrade transitive dependencies to avoid UB (#3299) 2022-01-18 11:29:53 +09:00
Donny
d7964dd547 chore: Publish crates 2022-01-17 22:42:52 +09:00
Donny
ba4083959f chore: Publish crates 2022-01-17 22:41:25 +09:00
Austaras
89235b8294
fix(es/compat): Apply static_blocks before class_properties (#3292) 2022-01-17 13:20:02 +00:00
Donny
be33d20baf chore: Publish crates 2022-01-17 16:18:53 +09:00
Donny/강동윤
9a898951bc
fix(es/resolver): Ignore names of jsx attributes (#3289)
swc_ecma_transforms_base:
 - Ignore names of jsx attributes. (Closes #2854)
2022-01-17 16:18:07 +09: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
a424ac30ed chore: Publish crates 2022-01-17 15:17:30 +09:00
Donny/강동윤
fa5c063144
fix(es/minifier): Inline into interpolations in tagged template literals (#3287)
swc_ecma_minifier:
 - Inline into tagged template literals. (Closes #2923)
2022-01-17 15:17:01 +09:00
Donny
023fc956ae chore: Publish crates 2022-01-17 14:30:25 +09:00
Donny/강동윤
b55ae4b312
fix(es/minifier): Fix analysis of unary expressions (#3286)
swc_ecma_minifier:
 - Mark update as usage and assignment. (Closes #3265)
2022-01-17 14:28:35 +09:00
Donny
a282146f7f chore: Publish v1.2.130 2022-01-17 13:38:10 +09: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
7ff5f0f9f2 chore: Publish crates 2022-01-17 00:22:39 +09:00
RiESAEX
b76d1da699
fix(es/transforms): Handle template literals within jsonify pass (#3282) 2022-01-16 14:57:12 +00:00
Donny
0955c3646b chore: Publish crates 2022-01-16 23:32:02 +09:00
Niklas Mischkulnig
162c1fe047
fix(es/transforms): Remove unsafe new String("...") optimization (#3284) 2022-01-16 23:31:08 +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
2ec540da35 chore: Publish crates 2022-01-16 04:22:00 +09:00
RiESAEX
6406b49df2
fix(es/parser): Throw an error when function body has use strict and paramaters is not simple (#3278) 2022-01-16 04:21:02 +09:00
Donny
d396c32fe5 chore: Publish crates 2022-01-15 21:56:36 +09:00
Donny/강동윤
88a258a5fb
fix(es/react): Fix createElement (#3277)
swc_ecma_transforms_react:
 - Fix arguments passed to `_createElement`. (https://github.com/vercel/next.js/issues/33291)
2022-01-15 21:55:58 +09:00
Donny
a4e93eb2df chore: Publish crates 2022-01-15 17:20:51 +09:00
magic-akari
f4b3cb714a
fix(es/resolver): Treat a switch statement as a block scope (#3275) 2022-01-15 17:20:17 +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
9b98ada0d2 chore: Publish crates 2022-01-15 14:11:49 +09:00
OJ Kwon
66d1a92635
feat(plugin/runner): Free allocated memory on errors (#3270) 2022-01-15 05:10:19 +00:00
OJ Kwon
a4c497464d
feat(plugin/runnner): Support wasm32-wasi targets (#3271) 2022-01-15 04:40:00 +00: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
8753f8cfc7 chore: Publish crates 2022-01-14 20:24:12 +09:00
Alexander Akait
c195335012
feat(css): Support @layer at-rule (#3258) 2022-01-14 11:21:41 +00:00
Donny
235a849485 chore: Publish crates 2022-01-14 16:38:01 +09:00
Donny/강동윤
efd86715c9
fix(es/minifier): Preserve side effects in correct position (#3263)
swc_ecma_minifier:
 - Add `fake_block` mark.
 - Inject statements for side effects from `visit_mut_stmt` instead of `visit_mut_stmt_likes`. (Closes #2926)
2022-01-14 16:36:48 +09: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
1f49793ac9 chore: Publish crates 2022-01-14 10:41:07 +09:00
Alexander Akait
ade8ab8c35
fix(css/lexer): Resolve a TODO (#3260) 2022-01-13 23:59:52 +00:00
Donny
c114e1b6a9 chore: Publish crates 2022-01-14 08:34:08 +09:00
mrauhu
69978518c9
fix(es/ast): Update EsVersion::latest() (#3261) 2022-01-14 08:33:38 +09:00
Donny/강동윤
15b604b6d6
refactor(*): Fix some clippy warnings (#3257) 2022-01-14 07:20:45 +09:00
Donny/강동윤
978de5943e
chore(ci): Configure clippy (#3250) 2022-01-13 23:06:11 +09:00
Donny
dc111bbcac chore: Publish crates 2022-01-13 18:42:02 +09:00
Donny/강동윤
0843f742c5
fix(swc): Remove wrong-target (#3251)
swc:
 - Remove the cargo feature `wrong-target`. (Closes #1108)
2022-01-13 18:41:34 +09:00
Donny
59651a1ff1 chore: Publish v1.2.129 2022-01-13 13:46:11 +09:00
Donny
311758572d chore: Publish crates 2022-01-13 13:42:06 +09:00
David Sherret
282232c995
fix(es/typescript): Remove rogue println (#3244) 2022-01-13 13:41:34 +09:00
Donny
c13bba8401 chore: Publish crates 2022-01-12 18:39:56 +09:00
OJ Kwon
432d5d3fb7
feat(plugin/macro): Add safe API for plugins based on a proc-macro (#3240) 2022-01-12 09:32:52 +00:00
Donny
db952ecf01 chore: Publish crates 2022-01-12 16:58:23 +09:00
Donny/강동윤
74fd353053
fix(es/minifier): Fix bugs (#3238)
swc_ecma_minifier:
 - `collapse_vars`: Respect `mutated`. (Closes #2679)
 - Add a test for https://github.com/vercel/next.js/issues/31084.
2022-01-12 16:57:54 +09:00
Donny
dc99778808 chore: Publish crates 2022-01-12 08:28:25 +09:00
Donny/강동윤
12dd0a6c1f
fix(es/minifier): Fix optimization of assignment expressions (#3231)
swc_ecma_minifier:
 - Check if the operator is `=` before optimizing assignment with a binary expression.
2022-01-12 08:26:56 +09:00
Donny
a2445e743b chore: Publish crates 2022-01-12 04:46:21 +09:00
David Sherret
105cbc2017
fix(es/parser): Fix span of ComputedPropName (#3234) 2022-01-12 04:45:52 +09:00
Donny
acfce35d77 chore: Publish crates 2022-01-11 19:37:43 +09:00
Donny/강동윤
78720c4c91
fix(es/minifier): Fix handling of inlined call to a hoisted function (#3223) 2022-01-11 19:37:06 +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
OJ Kwon
a2f2b5ac89
feat(plugin): Don't serialize/deserialize needlessly (#3227)
swc_common:
 - Add `Serialized`.

swc_plugin_runner:
 - Accept `Serialized` instead of `Program`.
 - Pass `Serialized` from previous plugin instead of deserializing it.
2022-01-11 10:11:04 +00:00
Donny
540bc09888 chore: Publish v1.2.128 2022-01-11 16:53:04 +09: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
7fbe8f644e chore: Publish crates 2022-01-11 16:15:11 +09: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
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
54a0f51876 chore: Publish crates 2022-01-10 23:48:35 +09:00
Sosuke Suzuki
3fb76f64c4
feat(es/parser): Accept strings for import/exports (#3190) 2022-01-10 23:48:04 +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
OJ Kwon
7e7421ea52
feat(plugin): Perform actual transforms in plugins (#3220) 2022-01-10 21:34:16 +09:00
Donny/강동윤
057fca4196
chore(es/minifier): Add scripts to extract tests automatically (#3212) 2022-01-10 16:59:21 +09:00
Donny
db71f7a42d chore: Publish crates 2022-01-10 15:16:55 +09:00
Donny
0d4b671052 chore: Publish crates 2022-01-10 15:05:26 +09:00
Donny
5cd352e5dd chore: Publish crates 2022-01-09 15:42:56 +09:00
Austaras
cdb46cfb91
fix(es/hygiene): Visit computed properties in usage analyzer (#3217) 2022-01-09 15:42:19 +09:00
OJ Kwon
c9ded9b720
feat(plugin): Allow multi-value for the plugin signature (#3216) 2022-01-09 15:02:56 +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
1ca49a56b3 chore: Publish crates 2022-01-08 23:29:33 +09:00
Donny/강동윤
42f726873e
feat(es/transforms): Add Assumptions (#3215)
swc_ecma_transforms_base:
 - Add `Assumptions`. (Closes #2057)

swc_ecma_transforms:
 - Reexport `Assumptions`.

swc:
 - Add `jsc.assumptions`.
2022-01-08 23:26:09 +09:00
Donny/강동윤
70c2f3b3a5
security(repo): Fix crev integration (#3210) 2022-01-07 20:03:03 +09:00
Donny
56d1f03556 chore: Publish crates 2022-01-07 15:18:26 +09:00
OJ Kwon
92de2c7884
feat(plugin): Pass serialized ast to a wasm file (#3199)
swc_common:
 - Use correct cargo feature for plugin apis.

swc_plugin:
 - Add hidden functions required for memory operations from host.

swc_plugin_runner:
 - Pass serialized AST to a wasm file.
2022-01-07 15:13:46 +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
80bf7f25ff chore: Publish crates 2022-01-06 21:25:35 +09:00
Donny/강동윤
0105939426
fix(es/minifier): Drop unreachable statements eagerly (#3204)
swc_ecma_minifier:
 - `pure`: Drop unreachable statements. (Closes #3173)
2022-01-06 21:25:06 +09:00
Donny
7c59765b2f chore: Publish crates 2022-01-06 20:51:06 +09:00