Commit Graph

7271 Commits

Author SHA1 Message Date
SWC Bot
8b765e6763 chore: Publish crates 2023-06-20 05:37:57 +00:00
Donny/강동윤
6e5d8b3cf1
feat(es/codegen): Support preamble (#7551)
**Related issue:**

 - Closes #7475.
2023-06-20 14:35:46 +09:00
SWC Bot
f27d6ea58c chore: Publish crates 2023-06-20 05:05:01 +00:00
Donny/강동윤
1d9f972fb4
fix(es/resolver): Resolve the super class before registering a class name (#7550)
**Related issue:**

 - Closes #7546.
2023-06-20 05:03:01 +00:00
SWC Bot
69b034931e chore: Publish crates 2023-06-20 04:14:44 +00:00
Donny/강동윤
bc6e95052e
fix(es/compat): Visit arrow body from optional chaining pass (#7549)
**Related issue:**

 - Closes #7547.
2023-06-20 04:12:31 +00:00
SWC Bot
fec056f5db chore: Publish crates 2023-06-20 03:21:20 +00:00
Donny/강동윤
862f095e65
test(es): Add one more test for a wrong issue (#7545)
**Related issue:**

 - Closes #7513.
2023-06-20 03:19:20 +00:00
SWC Bot
17e339fc26 chore: Publish crates 2023-06-20 01:54:14 +00:00
Curtis Wilson
8cfc4f9e9a
fix(es/preset-env): Don't log Yield to the console (#7548)
**Description:**

When a `yield` token is encountered by the parser, the word "Yield" is unnecessarily logged to the console. This PR removes the extra logging.
2023-06-20 01:52:24 +00:00
SWC Bot
8f1c8ea9fa chore: Publish crates 2023-06-19 06:36:31 +00:00
Donny/강동윤
1d84e952fe
fix(es): Accept parse option for minify() (#7543)
**Description:**

We don't support them. but this is to make API more compatible with `terser`.

**Related issue:**

 - Closes #7455.
2023-06-19 06:34:44 +00:00
SWC Bot
44aac8fe27 chore: Publish crates 2023-06-19 05:51:51 +00:00
Donny/강동윤
aa82e5fff3
test(plugin/runner): Share target directory (#7544)
**Description:**

This will reduce CI time greatly.
2023-06-19 05:49:45 +00:00
SWC Bot
2f2a15f3df chore: Publish crates 2023-06-19 05:01:43 +00:00
Donny/강동윤
70bc605c67
test(es): Add a test for a wrong issue (#7542)
**Related issue:**

 - Closes #7513.
2023-06-19 04:59:28 +00:00
Donny/강동윤
0129ad080b chore: Publish v1.3.65 with swc_core v0.78.8 2023-06-19 12:37:22 +09:00
Donny/강동윤
d1430c00b4 chore: Publish crates 2023-06-19 12:36:16 +09:00
Donny/강동윤
fe1a545e65 chore: Publish crates 2023-06-19 12:26:07 +09:00
Donny/강동윤
4585ed99db
chore: Publish v1.3.65 with swc_core v0.78.8 (#7541) 2023-06-19 12:24:49 +09:00
SWC Bot
2669fc214a chore: Publish crates 2023-06-19 03:20:19 +00:00
Donny/강동윤
76aa91f83c
fix(es/typescript): Don't panic of @jsxFrag null (#7540)
**Related issue:**

 - Closes #7539.
2023-06-19 12:18:19 +09:00
SWC Bot
d38c40914e chore: Publish crates 2023-06-19 03:02:08 +00:00
Justin Ridgewell
990e48e0e8
fix(es/compat): Fix optional chaining (#7530)
**Description:**

This fixes a few bugs with optional chaining:

-
[`a?.c()`](https://play.swc.rs/?version=1.3.64&code=H4sIAAAAAAAAA9PXVwjOyC%2FNSVFISrXi0tdXSFSwtVXIK83JUbBXKM1LSU3LzEtNUbBSSNRL1tC05kq0h9AAouc%2F7DgAAAA%3D&config=H4sIAAAAAAAAA2VSu27DMAzc8xUC5wAZii7ZWnRJgXTKDxAKkyrQwyDpNEbgf69kxI4jexAk3olH3fm%2BMgYoXsFszT3vywchHQm2pa7cwXos28T0LRl4m0qnxJY%2BvD8wRsmHUGDllibGsYsYnN2FJrHWoCKfScudUbsv2LDARewEgI4CM24uezqj7b4oj4aauOpf5EdoT4pHVFxSmNDqS1tjNhvDbVQXKNuAraaA6iysC5DYWI8izs4uwIMOC%2F6cpL%2Bc%2FnanHwwkDVpaDJM5rdBn67y6WHv5eNCVfGpCzibDJ%2FQyw%2Fv1qtqAT0lqHWiQhfjVSumi4m2I3QYUy65RmNl0kdtS8OlvPWxfhTw0lnd45pv%2FstbTLOKuGeyzKYQULwIT08l%2B5BaJVf8PfP2zz7YCAAA%3D)
-
[`a?.b.c()`](https://play.swc.rs/?version=1.3.64&code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hTw0lnd45pv%2FstbTLOKuGeyzKYQULwIT08l%2B5BaJVf8PfP2zz7YCAAA%3D)
-
[`a.b.c?.()`](https://play.swc.rs/?version=1.3.64&code=H4sIAAAAAAAAAyWLsQ3AIAwEe6b4Ehq7J0IMkQEQ2ESJZJGK%2FYNCdVfcMeO832mK1qNjhi%2B1tCJI2xYrtUASkBLGNEPGHNqvZ3RFxM5Jqtk%2FhMOtgSSTX%2FoBjF6UKV8AAAA%3D&config=H4sIAAAAAAAAA2VSu27DMAzc8xUC5wAZii7ZWnRJgXTKDxAKkyrQwyDpNEbgf69kxI4jexAk3olH3fm%2BMgYoXsFszT3vywchHQm2pa7cwXos28T0LRl4m0qnxJY%2BvD8wRsmHUGDllibGsYsYnN2FJrHWoCKfScudUbsv2LDARewEgI4CM24uezqj7b4oj4aauOpf5EdoT4pHVFxSmNDqS1tjNhvDbVQXKNuAraaA6iysC5DYWI8izs4uwIMOC%2F6cpL%2Bc%2FnanHwwkDVpaDJM5rdBn67y6WHv5eNCVfGpCzibDJ%2FQyw%2Fv1qtqAT0lqHWiQhfjVSumi4m2I3QYUy65RmNl0kdtS8OlvPWxfhTw0lnd45pv%2FstbTLOKuGeyzKYQULwIT08l%2B5BaJVf8PfP2zz7YCAAA%3D)
-
[`a?.b[c?.d]`](https://play.swc.rs/?version=1.3.64&code=H4sIAAAAAAAAA9PXVwjOyC%2FNSVFISrXi0tdX0IhPVLBVSNRUsLVVyCvNyVGwVyjLz0xRMFCwUohP1EuK1ohPBipIxq4gWS8l1por0R6oLtkezAYAJs%2FWxmEAAAA%3D&config=H4sIAAAAAAAAA2VSu27DMAzc8xUC5wAZii7ZWnRJgXTKDxAKkyrQwyDpNEbgf69kxI4jexAk3olH3fm%2BMgYoXsFszT3vywchHQm2pa7cwXos28T0LRl4m0qnxJY%2BvD8wRsmHUGDllibGsYsYnN2FJrHWoCKfScudUbsv2LDARewEgI4CM24uezqj7b4oj4aauOpf5EdoT4pHVFxSmNDqS1tjNhvDbVQXKNuAraaA6iysC5DYWI8izs4uwIMOC%2F6cpL%2Bc%2FnanHwwkDVpaDJM5rdBn67y6WHv5eNCVfGpCzibDJ%2FQyw%2Fv1qtqAT0lqHWiQhfjVSumi4m2I3QYUy65RmNl0kdtS8OlvPWxfhTw0lnd45pv%2FstbTLOKuGeyzKYQULwIT08l%2B5BaJVf8PfP2zz7YCAAA%3D)
- [`delete
foo?.bar`](https://play.swc.rs/?version=1.3.64&code=H4sIAAAAAAAAA9PXVwjOyC%2FNSVFISrXi0tdXSMvPV7C1VcgrzclRsFcoKSpNVbBSSEnNSS1JBcnpJSUWcSG49iA%2BAGcLTstEAAAA&config=H4sIAAAAAAAAA1WPSw7CMAxE9zlF5DULYIEEd%2BAQVnCrVPkpTiWqqncnTZMAO3vG42evQkqYWMFDrrnMTcDIFHufFV5cwndWgJRFVlGHBKfmTrxbAxqmIm2HAwnjSKmk%2BHq%2B3GsCjPdMWU5xpipZ7fSw%2FCKVtyESc9vcaRbdaOgfKCoUrH%2FNxayvpCXQccANvkMN1heD5mdL7leJ7QOQNa2NFgEAAA%3D%3D)
- [`function foo(a, b = a?.b)
{}`](https://play.swc.rs/?version=1.3.64&code=H4sIAAAAAAAAA9PXVwjOyC%2FNSVFISrXi0tdXSCvNSy7JzM9TSMvP10jUUUhSsFXQ0NBUsLVTqFYoSyxSiE%2B0VnjUsEyhVlNDU1OhupYLm45Ee70kkCQAp8DQOl8AAAA%3D&config=H4sIAAAAAAAAA22Rz07DMAzG73uKyOdJAw5I7Ii4cBjvYKXuyJQ%2Fle3AqmnvTltIm63cHH%2B%2F%2BPtkXzbGwEks7M1lKIeHMkZpE4e5NbU9HdH2b2QToyYeROVM2wVoinQgxQYV1wgTWr0Za8xuZzhHdYH2BjBrCqjOwnYUEhvrUcTZ6gP84bDia0g%2FOX2%2Ftx8YSDq0tAozMFnoNTuvLsp%2FckNf5FMXKI6ZW%2FRS6ddSzgX4lOTeBzpkIb5dpfRR8TzmJxtQLLtOoVrTSc5rw2W%2F92GXBIp8JJ0Gy9PD48s0dJIhpCZ7qq7cd%2FQLPsMMOTkUrBhAcNG1fcmzuf4AkV7gUzECAAA%3D)

It also optimizes the AST for runtime evaluation. Before, we constructed
a leftwards conditional tree (`(_a_b = (_a = a) == null ? void 0 : _a.b)
== null ? void 0 : _a_b.c`) instead of a rightward tree (`(_a = a) ==
null ? void 0 : (_a_b = _a.b) == null ? void 0 : _a_b.c`), which
required multiple `== null` checks after the first nullish is found.

**Related issue:**

 - Closes #7531.
2023-06-19 12:00:11 +09:00
SWC Bot
0859b76ed0 chore: Publish crates 2023-06-16 06:46:25 +00:00
Donny/강동윤
f42fdd21af
fix(es/module): Add "use strict" while preserving directives (#7537)
**Related issue:**

 - Closes #7536.
2023-06-16 06:44:28 +00:00
SWC Bot
b9acc83fa7 chore: Publish crates 2023-06-16 02:59:35 +00:00
Donny/강동윤
3e9dd88e37 feat(es/module): Preserve custom use directives (#7528)
**Related issue:**

 - Closes #7315.
2023-06-16 11:50:52 +09:00
Donny/강동윤
37c7296913 chore: Publish crates 2023-06-14 14:08:15 +09:00
Donny/강동윤
5b0ee541b4
chore: Publish v1.3.64 with swc_core v0.78.3 (#7529) 2023-06-14 14:07:00 +09:00
SWC Bot
39276402bf chore: Publish crates 2023-06-14 05:01:49 +00:00
Donny/강동윤
4644d005d2
fix(es/compat): Fix handling of this of optional chaining pass (#7527)
**Related issue:**

 - Closes #7526.
2023-06-14 13:59:35 +09:00
SWC Bot
db85bf3ee2 chore: Publish crates 2023-06-13 16:14:41 +00:00
Donny/강동윤
f27838dedc
fix(es/codegen): Fix regression of source maps (#7523)
**Related issue:**

 - Closes #7506.
2023-06-13 16:12:45 +00:00
SWC Bot
275db1baec chore: Publish crates 2023-06-13 03:39:28 +00:00
廖应龙
a0da02d0ff
fix(es/codegen): Emit type arguments of jsx element names (#7522) 2023-06-13 03:37:39 +00:00
Donny/강동윤
983d2e8eb4 chore: Publish v1.3.63 2023-06-13 11:06:58 +09:00
Donny/강동윤
e773efc3a8 chore: Publish crates 2023-06-12 21:33:11 +09:00
Donny/강동윤
178abee03e
chore: Publish v1.3.63 with swc_core v0.78.0 (#7520) 2023-06-12 21:32:15 +09:00
SWC Bot
08574e690b chore: Publish crates 2023-06-12 08:04:50 +00:00
Donny/강동윤
3958f1792c
refactor(es/ast): Remove unused fields (#7518)
**Related issue:**

 - Closes #7347.
 - Closes #7487.
2023-06-12 08:02:34 +00:00
SWC Bot
96895b1f3f chore: Publish crates 2023-06-12 06:49:35 +00:00
Donny/강동윤
aa83584634
refactor(es/ast): Reimplement optional chaining (#7441)
**Related issue:**

 - Closes #7003.
 - Closes #7156.
2023-06-12 06:47:40 +00:00
SWC Bot
d8f5158963 chore: Publish crates 2023-06-12 02:24:36 +00:00
Austaras
8e933c8a9f
fix(es/react): Default to empty string when emitting refresh signature (#7514)
**Related issue:**

 - Closes #7471.
2023-06-12 02:22:31 +00:00
SWC Bot
cea1237c5e chore: Publish crates 2023-06-12 01:39:32 +00:00
Pig Fang
6c00a2422a
feat(es/parser): Disallow tagged tpl in optional chaining (#7515) 2023-06-12 01:37:39 +00:00
SWC Bot
b46bcf3f50 chore: Publish crates 2023-06-08 05:08:56 +00:00
Donny/강동윤
cc4146c9d3
fix(es/compat): Make stage 3 decorator pass use correct state for inner classes (#7508)
**Related issue:**

 - Closes #7499.
2023-06-08 05:06:51 +00:00
SWC Bot
37634a758d chore: Publish crates 2023-06-08 04:15:29 +00:00