Commit Graph

8058 Commits

Author SHA1 Message Date
SWC Bot
9e8fe38d31 chore: Publish crates 2023-11-16 02:03:19 +00:00
David Sherret
369fb21e22
fix(es/codegen): Fix codegen of type args of an import type and a type query (#8296) 2023-11-16 02:01:15 +00:00
SWC Bot
c566b73bfb chore: Publish crates 2023-11-16 00:20:22 +00:00
Donny/강동윤
7985e02fc8
fix(es/minifier): Remove hack for built-in class names (#8293)
**Description:**

Regarding https://github.com/vercel/next.js/issues/55682, I made a mistake while investigating. I assumed it's `swcMinify`-only but it seems like `node-fetch` is fundamentally incompatible with our minification options.

I thought `node-fetch` works with terser, but it did not, and it **should not**. But as I thought `terser` works, I assumed that `terser` has a hack for `AbortSignal`. And that's how I fixed `swcMinify: true`. The correct fix is `keep_classnames: true` but it will result in +~10% bundle size bloat.
At first, I used the correct way (`keep_classnames: true`), but it resulted in the bundle size bloat, so I mimicked the hack of terser with https://github.com/vercel/next.js/pull/57904.

While working on other minification issues, I found that there's no such hack in `terser` and I need to remove the hack in the SWC minifier.
The repro in https://github.com/vercel/next.js/issues/55682 does not work with `swcMinify: false`, even with next@14. The problem of minifier and node-fetch was not exploited before `serverMinification: true`.


**Related issue:**

 - https://github.com/brix/crypto-js/issues/415
2023-11-16 09:17:42 +09:00
SWC Bot
f88d6f3c8d chore: Publish 1.3.98-nightly-20231116.1 2023-11-16 00:06:58 +00:00
SWC Bot
666c843e7e chore: Publish crates 2023-11-15 23:38:46 +00:00
David Sherret
25ac679bd3
build(es): Remove duplicate phf dependency (#8294) 2023-11-15 23:36:38 +00:00
SWC Bot
c03f84e54e chore: Publish crates 2023-11-15 22:45:18 +00:00
David Sherret
66a4d37031
build(common): Remove dependency on string-cache (#8291) 2023-11-15 22:43:22 +00:00
SWC Bot
99617848ef chore: Publish crates 2023-11-15 22:04:42 +00:00
Zak
7d1836de3f
perf(es/minifier): Improve format.inline_script (#8292) 2023-11-15 22:02:29 +00:00
SWC Bot
36fdb179e4 chore: Publish crates 2023-11-15 17:49:24 +00:00
David Sherret
7bbe5e67d9
refactor: Remove swc_ecma_dep_graph (#8290) 2023-11-15 17:47:16 +00:00
SWC Bot
3bbd340205 chore: Publish crates 2023-11-15 01:09:49 +00:00
Austaras
73fec945b5
fix(es/minifier): Make Finalizer inline literals (#8285)
**Related issue:**

 - Closes #8284
2023-11-15 01:07:37 +00:00
SWC Bot
b8c887f8ce chore: Publish 1.3.98-nightly-20231115.1 2023-11-15 00:07:00 +00:00
SWC Bot
f86c12b0b4 chore: Publish crates 2023-11-14 21:39:03 +00:00
bohan
f059270348
feat(es/minifier): Support format.inline_script (#8252) 2023-11-14 21:37:05 +00:00
SWC Bot
5fed604276 chore: Publish crates 2023-11-14 20:02:17 +00:00
Donny/강동윤
1ccfc0762c
fix(es/minifier): Respect pure_funcs for tagged tpls (#8280)
**Related issue:**

 - Closes #8275.
2023-11-14 19:59:15 +00:00
SWC Bot
2f6af92232 chore: Publish crates 2023-11-14 16:47:24 +00:00
Austaras
65c3d0e3f4
feat(es/minifier): Swap bin expr to save paren (#8277) 2023-11-14 16:45:24 +00:00
SWC Bot
aa36a53c42 chore: Publish crates 2023-11-14 16:01:17 +00:00
Austaras
20fb5bab32
fix(es/minifier): Keep class with a static block (#8283)
**Related issue:**

 - Closes #8271.
2023-11-15 00:59:14 +09:00
SWC Bot
0c05f6e76e chore: Publish 1.3.98-nightly-20231114.1 2023-11-14 00:06:45 +00:00
강동윤 (Donny)
13014cc7fb chore: Do not auto-approve PRs by @kdy1 2023-11-14 08:06:53 +09:00
강동윤 (Donny)
73caae9068 chore: Update CODEOWNERS 2023-11-14 08:01:42 +09:00
SWC Bot
656e13143c chore: Publish crates 2023-11-13 22:55:08 +00:00
Donny/강동윤
dd4129d1ca
chore: Add CODEOWNERS (#8281) 2023-11-14 07:53:14 +09:00
SWC Bot
9c438692c6 chore: Publish crates 2023-11-13 10:03:57 +00:00
magic-akari
c1281534b6
fix(es/parser): Fix ASI hazard of static (#8262)
**Related issue:**

 - Closes #8253
2023-11-13 10:02:02 +00:00
SWC Bot
35b95ae430 chore: Publish crates 2023-11-13 03:50:20 +00:00
Austaras
ebcd825225
fix(es/minifier): Enable seq inliner for const declarations (#8255) 2023-11-13 03:47:49 +00:00
SWC Bot
001fe85bd5 chore: Publish 1.3.98-nightly-20231113.1 2023-11-13 00:06:52 +00:00
SWC Bot
d0e6bab9b1 chore: Publish 1.3.98-nightly-20231112.1 2023-11-12 00:07:42 +00:00
SWC Bot
ca73387c47 chore: Publish 1.3.98-nightly-20231111.2 2023-11-11 22:14:24 +00:00
SWC Bot
07cc635489 chore: Publish crates 2023-11-11 19:12:50 +00:00
Donny/강동윤
9a0572b968
refactor(swc_node_base): Rename to swc_malloc (#8272)
**Description:**

This is quite convinient.
2023-11-11 19:10:56 +00:00
SWC Bot
14a6bf0747 chore: Publish crates 2023-11-11 17:27:26 +00:00
Donny/강동윤
ee0c12e4e7
chore(ci): Fix CI (#8267) 2023-11-12 02:25:36 +09:00
SWC Bot
c8379c27a0 chore: Publish 1.3.98-nightly-20231111.1 2023-11-11 00:07:33 +00:00
SWC Bot
2ef3de0021 chore: Publish crates 2023-11-10 13:10:36 +00:00
Donny/강동윤
0678c3c55f
fix(es/parser): Adjust the context for cond expr while parsing JSX (#8261)
**Related issue:**

 - Closes #8243.
2023-11-10 13:07:53 +00:00
SWC Bot
6383ac443d chore: Publish crates 2023-11-10 12:34:31 +00:00
Donny/강동윤
e58912622d
fix(es/parser): Consider ASI while parsing TypeScript type aliases (#8263)
**Related issue:**

 - Closes #8073.
2023-11-10 12:31:55 +00:00
SWC Bot
e0525b595e chore: Publish crates 2023-11-10 02:30:21 +00:00
magic-akari
6992d83d09
fix(es/decorators): Minimize class declarations transformation (#8245) 2023-11-10 02:27:01 +00:00
SWC Bot
ac80d7a93c chore: Publish crates 2023-11-10 00:33:30 +00:00
Donny/강동윤
0faa2c4a01
fix(es/codegen): Check for trailing comments while emitting an arrow (#8257)
**Description:**

This PR also **fixes** the `Default` implementation of `JsMinifyFormatOptions`. It didn't matched the default value when it's used with `serde::Deserialize`.


**Related issue:**

 - Closes #8251
2023-11-10 00:30:28 +00:00
SWC Bot
981ab771af chore: Publish 1.3.98-nightly-20231110.1 2023-11-10 00:07:08 +00:00