Commit Graph

4535 Commits

Author SHA1 Message Date
SWC Bot
267d256b5b chore: Publish crates 2023-01-11 06:04:36 +00:00
Donny/강동윤
336b1d8b4d
fix(es/minifier): Don't inline conditionally initialized vars (#6751)
**Related issue:**

 - Closes https://github.com/swc-project/swc/issues/6750.
 - Closes https://github.com/swc-project/swc/issues/6780.
2023-01-11 06:01:56 +00:00
SWC Bot
c695249b2a chore: Publish crates 2023-01-11 05:09:17 +00:00
Donny/강동윤
0ef84e1c00
test(es/module): Add a test for invalid issue (#6785)
**Related issue:**

 - Closes https://github.com/swc-project/swc/issues/6779.
2023-01-11 05:06:45 +00:00
SWC Bot
cd06479a43 chore: Publish crates 2023-01-11 03:00:59 +00:00
HeYunfei
ff8facef64
fix(es/parser): Allow parsing import.meta as an expression (#6783) 2023-01-11 02:58:25 +00:00
SWC Bot
70c3126771 chore: Publish crates 2023-01-10 10:21:15 +00:00
Donny/강동윤
ae3cfa7d2d
fix(es): Remove useless context (#6777) 2023-01-10 10:19:01 +00:00
SWC Bot
6f1e08fa3c chore: Publish crates 2023-01-10 06:45:17 +00:00
Donny/강동윤
ec7e913815
fix(es/minifier): Make name mangler respect toplevel (#6774)
**Related issue:**

 - Closes https://github.com/swc-project/swc/issues/6418.
2023-01-10 06:42:49 +00:00
SWC Bot
52dada97ff chore: Publish crates 2023-01-10 06:03:34 +00:00
Donny/강동윤
3f0f664c48
fix(es/codegen): Skip lo of a program if body is not empty (#6773)
**Related issue:**

 - Closes https://github.com/swc-project/swc/issues/6767.
2023-01-10 06:01:14 +00:00
SWC Bot
478b1fe458 chore: Publish crates 2023-01-10 05:10:48 +00:00
magic-akari
019cf37199
feat(es/typescript): Support const modifier on type parameters (#6672)
**Related issue:**

 - https://github.com/microsoft/TypeScript/pull/51865.
2023-01-10 05:08:29 +00:00
SWC Bot
b102504eb9 chore: Publish crates 2023-01-10 03:30:52 +00:00
Donny/강동윤
6d365de9e2
chore(ci): Fix CI action (#6772) 2023-01-10 03:28:07 +00:00
SWC Bot
ca64ab0906 chore: Publish crates 2023-01-09 11:00:40 +00:00
magic-akari
1d147602c0
fix(es/helpers): Make _classPrivateFieldLooseBase return receiver (#6770) 2023-01-09 10:58:29 +00:00
SWC Bot
a145bb5776 chore: Publish crates 2023-01-09 06:27:08 +00:00
Donny/강동윤
6c126da1d4
test(es): Add a test for a fixed source map issue (#6768)
**Related issue:**

 - Closes https://github.com/swc-project/swc/issues/6244.
2023-01-09 06:25:03 +00:00
SWC Bot
a225efe363 chore: Publish crates 2023-01-08 04:59:27 +00:00
Justin Ridgewell
2b503c16d5
fix(es/codegen): Fix LineCol calculation of printed files (#6763)
**Description:**

There were several issues with the way we updated the current `LineCol` position during the printing of the generated file:

- We used `chars` and `char_indices` (UTF-32) instead of `encode_utf16` (UTF-16) chars.
- JS uses UCS-2 (basically UTF-16) for its strings, and source maps default to that implicitly.
- `\r` was incorrectly handled
  - it didn't add a `line_start`; only `\n` did
- `\r\n` was incorrectly handled
- It was trying to let the `\n` path handle the `line_start`, but it called
`chars.next()` which ate the `\n` char.

I also took the opportunity to avoid the `Vec` allocations and reduced some code duplication.

See the
[before](https://evanw.github.io/source-map-visualization/#ODEzAC8qKgogKiBmb28KICogQHBhcmFtIGRhdGEgZm9vCiAqIEByZXR1cm5zIGZvbwogKi8gZXhwb3J0IGNvbnN0IGZpeHVwUmlza0NvbmZpZ0RhdGEgPSAoZGF0YSk9PnsKICAgIGlmICh4KSB7CiAgICAgICAgcmV0dXJuIDEyMzsKICAgIH0gZWxzZSB7CiAgICAgICAgcmV0dXJuIDQ1NjsKICAgIH0KfTsKCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWRhdGE6YXBwbGljYXRpb24vanNvbjtiYXNlNjQsZXlKMlpYSnphVzl1SWpvekxDSnpiM1Z5WTJWeklqcGJJbWx1Y0hWMExuUnpJbDBzSW5OdmRYSmpaWE5EYjI1MFpXNTBJanBiSWk4cUtseHlYRzRnS2lCbWIyOWNjbHh1SUNvZ1FIQmhjbUZ0SUdS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GNIQnBibWR6SWpvaVFVRkJRVHM3T3p0RFFVbERMRWRCUTBRc1QwRkJUeXhKUVVGTlFTeHpRa0ZCYzBJc1UwRkJRME1zVFVGQmIwTTdTVUZEZEVVc1NVRkJTVU1zUjBGQlJ6dFJRVU5NTEU5QlFVODdTVUZEVkN4UFFVRlBPMUZCUTB3c1QwRkJUenRKUVVOVUxFTkJRVU03UVVGRFNDeEZRVUZGSW4wPTQ0NgB7InZlcnNpb24iOjMsInNvdXJjZXMiOlsiLi9hcHAuanMiXSwic291cmNlc0NvbnRlbnQiOlsiLyoqXHJcbiAqIGZvb1xyXG4gKiBAcGFyYW0gZGF0YSBmb29cclxuICogQHJldHVybnMgZm9vXHJcbiAqL1xyXG5leHBvcnQgY29uc3QgZml4dXBSaXNrQ29uZmlnRGF0YSA9IChkYXRhOiBhbnkpOiB0eXBlcy5SaXNrQ29uZmlnVHlwZSA9PiB7XHJcbiAgaWYgKHgpIHtcclxuICAgIHJldHVybiAxMjM7XHJcbiAgfSBlbHNlIHtcclxuICAgIHJldHVybiA0NTY7XHJcbiAgfVxyXG59OyJdLCJuYW1lcyI6WyJmaXh1cFJpc2tDb25maWdEYXRhIiwiZGF0YSIsIngiXSwibWFwcGluZ3MiOiJBQUFBOzs7O0NBSUMsR0FDRCxPQUFPLElBQU1BLHNCQUFzQixTQUFDQyxNQUFvQztJQUN0RSxJQUFJQyxHQUFHO1FBQ0wsT0FBTztJQUNULE9BQU87UUFDTCxPQUFPO0lBQ1QsQ0FBQztBQUNILEVBQUUifQ==)


**Related issue:**

 - Closes https://github.com/swc-project/swc/issues/6694.
2023-01-08 13:57:26 +09:00
SWC Bot
fb6770f649 chore: Publish crates 2023-01-06 08:17:26 +00:00
HeYunfei
8a6a1cbcf1
feat(es/minifier): Handle boolean in Evaluator (#6756)
**Related issue:**

 - Closes https://github.com/swc-project/swc/issues/5953.
2023-01-06 08:15:07 +00:00
Donny/강동윤
48902b60d3 chore: Publish crates 2023-01-06 16:41:16 +09:00
SWC Bot
1161360d54 chore: Publish crates 2023-01-06 03:49:20 +00:00
Donny/강동윤
26a0c13589
fix(common): Mark \r as a line ending (#6752)
**Related issue:**

 - Closes https://github.com/swc-project/swc/issues/6694.
2023-01-06 03:47:16 +00:00
SWC Bot
ec8497b42c chore: Publish crates 2023-01-06 03:16:51 +00:00
HeYunfei
a1ccc8afdf
feat(es/minifier): Make name mangler understand block scoping (#6670)
**Related issue:**

 - Closes https://github.com/swc-project/swc/issues/5090.
 - Closes https://github.com/swc-project/swc/issues/5766.
2023-01-06 03:14:10 +00:00
Donny/강동윤
e9f99c4fe7 chore: Publish crates 2023-01-06 10:41:41 +09:00
SWC Bot
e5ea18b62b chore: Publish crates 2023-01-05 23:46:00 +00:00
Donny/강동윤
f299101820 chore: Publish crates 2023-01-05 19:55:20 +09:00
SWC Bot
1f5c44ea70 chore: Publish crates 2023-01-05 10:09:49 +00:00
Donny/강동윤
b46815a684
fix(es): Fix wasm (#6755) 2023-01-05 10:07:45 +00:00
SWC Bot
3b034d597b chore: Publish crates 2023-01-05 05:18:09 +00:00
SWC Bot
918a01bf5c chore: Publish crates 2023-01-04 14:19:54 +00:00
HeYunfei
36b26d3496
fix(es/react): Force refresh if code contains @refresh reset (#6749) 2023-01-04 14:17:01 +00:00
SWC Bot
790c478a7a chore: Publish crates 2023-01-04 07:29:33 +00:00
Donny/강동윤
65a0d3a310
fix(es/parser): Fix priority of >>> (#6748)
**Related issue:**

 - Closes https://github.com/swc-project/swc/issues/6739.
2023-01-04 07:27:08 +00:00
SWC Bot
d7081cc8a6 chore: Publish crates 2023-01-04 05:17:53 +00:00
Donny/강동윤
72fb606eb2
feat(es/jest): Support chaining of jest function calls (#6747)
**Related issue:**

 - Closes https://github.com/swc-project/swc/issues/6540.
2023-01-04 05:15:21 +00:00
SWC Bot
1638105865 chore: Publish crates 2023-01-04 04:33:32 +00:00
Donny/강동윤
88d40e8ab8
fix(es/minifier): Fix usage counter to fix infinite loop (#6744)
**Description:**

We skip non-computed property names while checking if we can inline an expression.

**Related issue:**

 - Closes https://github.com/swc-project/swc/issues/6729.
2023-01-04 04:31:12 +00:00
Donny/강동윤
62c0d7291a chore: Publish crates 2023-01-04 12:13:55 +09:00
SWC Bot
9bdbe9dc9b chore: Publish crates 2023-01-03 10:24:43 +00:00
RiESAEX
79afcb5d81
doc(es): Fix example (#6743) 2023-01-03 10:22:44 +00:00
SWC Bot
30471796c9 chore: Publish crates 2023-01-03 09:47:06 +00:00
Donny/강동윤
206c0dbebe
fix(es/compat): Fix syntax context of async-to-generator (#6741)
**Description:**

Previously, the `async-to-generator` produced invalid AST, in the aspect of span hygiene.

[Playground](https://play.swc.rs/?version=1.3.24&code=H4sIAAAAAAAAAz1MbQqAIBT77yn2UyG6gNQJuoSZRCAa7xkk4d1TicZgH7C5%2B4yUYGPgBE7ZuyWazREmSIVpxiMAcumi0C3ANZxyvQ6%2Fqa8CehxjaGNpOAcLaWjn%2F6KhKN1dGaoULSpfHPTdxn8AAAA%3D&config=H4sIAAAAAAAAA0WOSwrDMAxE76K1F22hXfgE3fQQxlWCi39ICsQY3z12cMlOjObNTIUfW9AVsiFGGheXKGYHDVIysiWXBRQId2kxnrEpwF2QovFv9BmJQQtt2D2GVpROIj9u92enfEqMk1MQXHRLGR02hUzIfL1MXP3f2XpFSN9tCPWccWa%2BoF0Zk3P8mcYxoR3Kj7IYzwAAAA%3D%3D).
It generate two bindings for `args` so it's invalid.


**Related issue:**

 - Closes https://github.com/swc-project/swc/issues/6730.
2023-01-03 09:45:03 +00:00
SWC Bot
1602f66fe6 chore: Publish crates 2023-01-03 03:47:48 +00:00
RiESAEX
98da6444b6
perf(es/preset-env): Use VisitMut instead of Fold for polyfill (#6734) 2023-01-03 03:45:25 +00:00
SWC Bot
2e32faaa3c chore: Publish crates 2023-01-03 03:14:24 +00:00
HeYunfei
b5d31cc2da
fix(es/utils): Fix detection of hoisting (#6738) 2023-01-03 03:12:01 +00:00
SWC Bot
0a1e30a4f8 chore: Publish crates 2022-12-30 06:34:07 +00:00
SWC Bot
0a652096ae chore: Publish crates 2022-12-27 12:57:51 +00:00
Alexander Akait
1722428909
feat(css/prefixer): Support clamp (#6695) 2022-12-27 12:55:46 +00:00
SWC Bot
d72a31f990 chore: Publish crates 2022-12-27 12:24:41 +00:00
Alexander Akait
8af627d5c4
feat(css/parser): Normalize urange (#6704) 2022-12-27 12:22:46 +00:00
SWC Bot
35b72b59c8 chore: Publish crates 2022-12-27 07:43:30 +00:00
SWC Bot
bfb2ffee0c chore: Publish crates 2022-12-27 01:02:01 +00:00
realtimetodie
b451fa9e88
fix(es): Remove import statement canonicalization (#6716) 2022-12-27 00:59:54 +00:00
Donny/강동윤
d506c96805
fix(preset-env): Update data (#6719) 2022-12-26 04:46:08 +00:00
SWC Bot
22973cbbf2 chore: Publish crates 2022-12-23 05:07:21 +00:00
SWC Bot
7fcc978748 chore: Publish crates 2022-12-22 01:39:10 +00:00
Alexander Akait
ebebd60875
refactor(css/codegen): Do not use raw (#6674) 2022-12-22 01:36:36 +00:00
SWC Bot
ef1d966b57 chore: Publish crates 2022-12-21 14:03:20 +00:00
Alexander Akait
27a8b7e50b
feat(css/prefixer): Support page break (#6693) 2022-12-21 14:00:59 +00:00
SWC Bot
e89f7856f7 chore: Publish crates 2022-12-21 09:37:10 +00:00
Donny/강동윤
58700f2bec
fix(es): Preserve license comments by default (#6703)
**Related issue:**

 - Closes https://github.com/swc-project/swc/issues/6677.
2022-12-21 09:34:40 +00:00
SWC Bot
af8a3a6b9d chore: Publish crates 2022-12-21 07:40:45 +00:00
SWC Bot
61245739ea chore: Publish crates 2022-12-21 03:03:05 +00:00
Alexander Akait
1c7f003779
feat(css/prefixer): Support overflow (#6678) 2022-12-21 03:00:53 +00:00
SWC Bot
3922ef5539 chore: Publish crates 2022-12-20 12:46:10 +00:00
Alexander Akait
2571070148
feat(css/parser): Normalize and improve function name (#6667) 2022-12-20 12:43:58 +00:00
SWC Bot
65c2ab32ab chore: Publish crates 2022-12-20 12:12:05 +00:00
SWC Bot
e49d9437bb chore: Publish crates 2022-12-20 11:34:40 +00:00
Alexander Akait
d8df1b53d1
feat(css/prefixer): Support place-* properties (#6685) 2022-12-20 11:32:31 +00:00
SWC Bot
0ae2866334 chore: Publish crates 2022-12-20 10:53:36 +00:00
Alexander Akait
1840e748af
refactor(css/compat): Merge nesting into the compiler (#6686) 2022-12-20 10:51:27 +00:00
SWC Bot
4a56d025cb chore: Publish crates 2022-12-20 10:13:29 +00:00
Donny/강동윤
5016ebed8f
fix(es/helpers): Fix loose mode (#6691)
**Related issue:**

 - Closes https://github.com/swc-project/swc/issues/6581.
2022-12-20 10:11:12 +00:00
SWC Bot
923e4ff840 chore: Publish crates 2022-12-20 09:37:22 +00:00
Donny/강동윤
707b1e3cd2
feat(es/minifier): Improve simplification of ?. (#6681)
**Related issue:**

 - Closes https://github.com/swc-project/swc/issues/6492.
2022-12-20 09:34:50 +00:00
SWC Bot
6109a4c188 chore: Publish crates 2022-12-20 08:25:03 +00:00
Alexander Akait
b23cf50f4f
feat(css/compat): Support hwb color (#6687) 2022-12-20 08:22:28 +00:00
SWC Bot
417278f79e chore: Publish crates 2022-12-20 07:47:43 +00:00
Donny/강동윤
7e6ec8d587
fix(es/minifier): Don't inline invalid LHS into an update argument (#6680)
**Related issue:**

 - Closes https://github.com/swc-project/swc/issues/6641.
2022-12-20 07:45:29 +00:00
SWC Bot
2d729fc437 chore: Publish crates 2022-12-20 07:06:08 +00:00
SWC Bot
913230d02a chore: Publish crates 2022-12-20 06:11:34 +00:00
Alexander Akait
d27a270fec
perf(css/prefixer): Use JsWord instead of &str (#6658) 2022-12-20 06:09:02 +00:00
SWC Bot
35caad3c4d chore: Publish crates 2022-12-20 04:38:08 +00:00
Alexander Akait
d7a0524fb6
feat(css/parser): Normalize keyframe selectors (#6688) 2022-12-20 04:35:14 +00:00
SWC Bot
10491d15be chore: Publish crates 2022-12-19 08:34:05 +00:00
Alexander Akait
7f8ba9c22c
feat(css/parser): Normalize at-rule names (#6676) 2022-12-19 08:30:06 +00:00
SWC Bot
a115907fbd chore: Publish crates 2022-12-19 07:56:54 +00:00
Alexander Akait
c01464e452
feat(css/parser): Normalize URL functions (#6675) 2022-12-19 07:53:29 +00:00
SWC Bot
bbeb7c9dbb chore: Publish crates 2022-12-19 06:45:28 +00:00
Fy
5fed222829
fix(es/preset-env): Align polyfills with @babel/plugin-polyfill-corejs3 (#6673) 2022-12-19 06:41:37 +00:00
SWC Bot
285880583f chore: Publish crates 2022-12-19 05:55:53 +00:00
Alexander Akait
46241b4e55
feat(css/prefixer): Support word-wrap (#6679) 2022-12-19 14:51:56 +09:00
SWC Bot
ca815650db chore: Publish crates 2022-12-19 04:55:42 +00:00
Alexander Akait
352896f4cb
feat(css/compat): Support not with multiple arguments (#6668) 2022-12-19 04:51:56 +00:00
SWC Bot
8008d863cb chore: Publish crates 2022-12-19 04:19:38 +00:00
Alexander Akait
1d3e06aa88
fix(css/minifier): Fix a bug with a modern hash (#6664) 2022-12-19 13:15:23 +09:00
Donny/강동윤
23e27a9b28 chore: Publish crates 2022-12-18 16:41:37 +09:00
SWC Bot
fead4797b3 chore: Publish crates 2022-12-16 04:43:13 +00:00
Alexander Akait
2fd3ced40c
feat(css/minifier): Improve compression of media at-rules (#6665) 2022-12-16 04:39:48 +00:00
SWC Bot
b9b35899ad chore: Publish crates 2022-12-16 04:07:27 +00:00
Alexander Akait
3d3863dc1f
feat(css/parser): Normalize dimension (#6654) 2022-12-16 04:04:07 +00:00
SWC Bot
779383ad4a chore: Publish crates 2022-12-16 03:20:44 +00:00
Alexander Akait
39afc4627e
feat(css/compat): Support function notation (#6651) 2022-12-16 03:16:53 +00:00
SWC Bot
78f08bb1ec chore: Publish crates 2022-12-16 02:38:02 +00:00
Alexander Akait
1fc97a7cea
feat(css/parser): Normalize declaration and important (#6663) 2022-12-16 02:34:18 +00:00
SWC Bot
3330f3ac70 chore: Publish crates 2022-12-16 00:34:51 +00:00
Alexander Akait
f6292e63b5
feat(css/minifier): Compress alpha in a hex (#6653) 2022-12-16 00:30:47 +00:00
SWC Bot
8ed88a766a chore: Publish crates 2022-12-15 23:58:39 +00:00
Alexander Akait
87e1efd98c
test(css/parser): Add a test (#6666) 2022-12-16 08:55:05 +09:00
SWC Bot
fc6ed6b0c0 chore: Publish crates 2022-12-15 09:35:01 +00:00
Donny/강동윤
cb4173aa73
perf(es/minifier): Use rope-like structure for the name mangler (#6661) 2022-12-15 09:31:09 +00:00
SWC Bot
8e929ce6bd chore: Publish crates 2022-12-15 08:35:11 +00:00
Alexander Akait
dd7280d5bd
fix(css/minifier): Don't remove custom variables with different case (#6655)
Co-authored-by: Donny/강동윤 <kdy1997.dev@gmail.com>
2022-12-15 08:31:43 +00:00
SWC Bot
139e35666c chore: Publish crates 2022-12-15 07:53:24 +00:00
Donny/강동윤
bb9fab8d03
fix(es/minifier): Abort IIFE invoker completely on eval (#6659)
**Related issue:**

 - Closes https://github.com/swc-project/swc/issues/6628.
2022-12-15 07:49:58 +00:00
SWC Bot
327bd4fc98 chore: Publish crates 2022-12-15 06:58:32 +00:00
Alexander Akait
649438b76a
feat(css/parser): Normalize selector AST (#6657) 2022-12-15 06:55:22 +00:00
SWC Bot
3cefa62f64 chore: Publish crates 2022-12-15 05:24:21 +00:00
Alexander Akait
d4660a4673
refactor(css/prefixer): Use eq_ignore_span (#6656) 2022-12-15 05:20:59 +00:00
SWC Bot
d48f4ba7f6 chore: Publish crates 2022-12-15 04:37:28 +00:00
Alexander Akait
b257d5d591
feat(css/parser): Normalize hex colors (#6652) 2022-12-15 04:34:07 +00:00
SWC Bot
4db1d04082 chore: Publish crates 2022-12-14 15:09:10 +00:00
Alexander Akait
199ac74618
feat(css/prefixer): Support font-face format (#6644) 2022-12-14 15:05:35 +00:00
SWC Bot
863f9f8424 chore: Publish crates 2022-12-14 12:33:35 +00:00
SWC Bot
fa1b02bbd2 chore: Publish crates 2022-12-14 09:23:16 +00:00
Donny/강동윤
7f3e6983e5
test(es/minifier): Enable size tests created from creduce (#6646) 2022-12-14 09:19:51 +00:00
SWC Bot
b569cee03b chore: Publish crates 2022-12-14 08:44:48 +00:00
Donny/강동윤
b13a079481
refactor(dbg-swc): Cleanup and document reducer (#6647) 2022-12-14 08:41:21 +00:00
SWC Bot
56ab0b032c chore: Publish crates 2022-12-14 06:03:55 +00:00
Alexander Akait
5d0dc6e731
feat(css/prefixer): Support nested calc (#6645) 2022-12-14 06:00:06 +00:00
SWC Bot
db26f33304 chore: Publish crates 2022-12-14 05:25:20 +00:00
Alexander Akait
fe06b8061c
feat(css/compat): Support color with hex alpha (#6643) 2022-12-14 05:21:17 +00:00
SWC Bot
d831fb3cdd chore: Publish crates 2022-12-14 04:49:13 +00:00
Donny/강동윤
e4e4d6cf6b
fix(es/minifier): Abort sequential inliner on optional chaining (#6637)
**Related issue:**

 - Closes https://github.com/swc-project/swc/issues/6636.
2022-12-14 04:45:47 +00:00
SWC Bot
4986694d4c chore: Publish crates 2022-12-14 04:07:34 +00:00
HeYunfei
be5ea7fe17
fix(es/fixer): Add correct parens to OptChainExpr in MemberExpr (#6639) 2022-12-14 04:03:36 +00:00
SWC Bot
30692bc26c chore: Publish crates 2022-12-13 15:48:32 +00:00
Alexander Akait
c8b724f14d
feat(css/prefixer): Support display (#6640) 2022-12-13 15:44:57 +00:00
SWC Bot
4f39d82cd0 chore: Publish crates 2022-12-13 13:01:07 +00:00
Alexander Akait
2fee4d167a
feat(css/prefixer): Prefix percentage with opacity (#6638) 2022-12-13 12:57:32 +00:00
SWC Bot
292c3388b5 chore: Publish crates 2022-12-13 07:31:37 +00:00
Alexander Akait
704b3ceb9c
feat(css/compat): Implement compat pass for media ranges (#6631)
Co-authored-by: Donny/강동윤 <kdy1997.dev@gmail.com>
2022-12-13 07:28:02 +00:00
SWC Bot
d33fb7e98c chore: Publish crates 2022-12-13 06:53:51 +00:00
HeYunfei
08ccb8384c
chore(es/minifier): Expose globals_defs pass (#6633) 2022-12-13 06:50:11 +00:00
SWC Bot
afe174d9f7 chore: Publish crates 2022-12-13 06:15:46 +00:00
Alexander Akait
d3fbfffb32
fix(css/minifier): Fix minification of @supports at-rule (#6632) 2022-12-13 06:12:27 +00:00
SWC Bot
754c484eeb chore: Publish crates 2022-12-13 05:02:07 +00:00
Donny/강동윤
a5f7b4b8aa
feat(css/compat): Support custom media queries (#6625)
Co-authored-by: alexander.akait <sheo13666q@gmail.com>
2022-12-13 04:58:34 +00:00
SWC Bot
c4ab41eca4 chore: Publish crates 2022-12-13 04:22:30 +00:00
Donny/강동윤
8b2e1d17e5
fix(es/minifier): Abort IIFE invoker on eval (#6478)
**Related issue:**

 - https://github.com/vercel/next.js/issues/43052.
2022-12-13 04:18:57 +00:00
SWC Bot
581d9ce769 chore: Publish crates 2022-12-13 03:38:21 +00:00
Alexander Akait
7d3aa66bb8
perf(html/minifier): Reduce allocations (#6623) 2022-12-13 12:34:55 +09:00
SWC Bot
b976551065 chore: Publish crates 2022-12-12 13:54:27 +00:00
Donny/강동윤
3f469fff0b
chore(atoms): Make sort.sh cross-platform (#6629) 2022-12-12 13:50:36 +00:00
SWC Bot
3d943c8f16 chore: Publish crates 2022-12-12 13:15:09 +00:00
Alexander Akait
fb94694cf3
feat(css/minifier): Remove adjacent identical declarations (#6619) 2022-12-12 13:11:33 +00:00
SWC Bot
13fe17040c chore: Publish crates 2022-12-12 06:30:21 +00:00
Donny/강동윤
b3bbd742bf
feat(css/compat): Add Compiler (#6626)
**Description:**

Visitor patterns are inherently slow, so I decided to merge all compatibility passes into a single pass.
2022-12-12 15:27:05 +09:00
SWC Bot
f6cd0dcb5c chore: Publish crates 2022-12-12 05:55:23 +00:00
Alexander Akait
bfdafdbb89
perf(html/codegen): Reduce allocations (#6622) 2022-12-12 05:52:12 +00:00
SWC Bot
2a4b4a3792 chore: Publish crates 2022-12-12 05:09:19 +00:00
Alexander Akait
19c2ee593d
fix(html/parser): Fix parsing of CDATA in the svg context (#6620) 2022-12-12 05:05:40 +00:00
SWC Bot
c74ca2f23f chore: Publish crates 2022-12-12 04:31:14 +00:00
Alexander Akait
59e8bf4976
fix(css/minifier): Fix compression of timing functions (#6618) 2022-12-12 04:27:13 +00:00
SWC Bot
bae04f54cf chore: Publish crates 2022-12-12 03:53:42 +00:00
SWC Bot
74b853ab63 chore: Publish crates 2022-12-12 03:16:21 +00:00
Alexander Akait
208fd559ba
fix(css/minifier): Fix compressions of transform functions (#6617) 2022-12-12 03:13:01 +00:00
SWC Bot
4d4406d5b3 chore: Publish crates 2022-12-12 02:40:19 +00:00
Alexander Akait
cb49fa6f1d
feat(css/minifier): Support to and from with initial (#6613) 2022-12-12 02:36:48 +00:00
SWC Bot
2e50dd54e8 chore: Publish crates 2022-12-12 02:01:40 +00:00
Kevin Barabash
5c53a74f55
fix(es/codegen): Fix codegen of TypeScript mapped types (#6621) 2022-12-12 01:58:08 +00:00
SWC Bot
cacd0d1105 chore: Publish crates 2022-12-11 09:04:55 +00:00
SWC Bot
a5efa8af50 chore: Publish crates 2022-12-10 15:41:27 +00:00
Donny/강동윤
2bf7805980
feat(dbg-swc): Kill creduce on drop (#6614) 2022-12-10 15:38:11 +00:00
SWC Bot
3d80fa4c25 chore: Publish crates 2022-12-10 00:55:14 +00:00
Alexander Akait
68d76afe5d
fix(es/codegen): Don't print trailing coma for a rest argument (#6610)
**Related issue:**

 - Closes https://github.com/swc-project/swc/issues/6589.
2022-12-10 00:51:11 +00:00
SWC Bot
fc21895bce chore: Publish crates 2022-12-10 00:09:46 +00:00
Alexander Akait
c44f1d0a7f
fix(es/parser): Parse types in CallExpression inside templates (#6611)
**Related issue:**

 - Closes https://github.com/swc-project/swc/issues/6601.
2022-12-10 00:05:25 +00:00
SWC Bot
66b52824e5 chore: Publish crates 2022-12-09 04:03:15 +00:00
SWC Bot
5d9cff21b5 chore: Publish crates 2022-12-09 02:30:36 +00:00
Donny/강동윤
b4eef53680
feat(css/ast): Make AST intuitive (#6606) 2022-12-09 02:27:19 +00:00
SWC Bot
fef8fc99a0 chore: Publish crates 2022-12-09 01:52:11 +00:00
HeYunfei
4c2d42261e
fix(es/compat): Prepend generated _loop to the correct scope (#6604) 2022-12-09 01:48:29 +00:00
SWC Bot
394141bdc0 chore: Publish crates 2022-12-09 00:18:50 +00:00
SWC Bot
fbf83db0e7 chore: Publish crates 2022-12-08 05:51:07 +00:00
Donny/강동윤
538d63eb80
perf(css/codegen): Reduce allocations (#6599) 2022-12-08 05:47:35 +00:00
SWC Bot
6fadb48a52 chore: Publish crates 2022-12-08 05:15:03 +00:00
HeYunfei
fe0c65195d
fix(es/typescript): Strip inline type declarations (#6600) 2022-12-08 14:11:45 +09:00
SWC Bot
30d0d98405 chore: Publish crates 2022-12-08 02:15:57 +00:00
SWC Bot
96f9858639 chore: Publish crates 2022-12-07 23:43:51 +00:00
HeYunfei
29ba05d137
fix(es/resolver): Reset in_type flag correctly (#6597) 2022-12-08 08:40:40 +09:00
SWC Bot
9cc5b928a6 chore: Publish crates 2022-12-07 11:57:23 +00:00
Alex Kirszenberg
e1d01d8b7a
feat(es/analyzer): Extract the analyzer from the minifier to a separate crate (#6586) 2022-12-07 11:53:49 +00:00