swc/crates/swc_ecma_minifier/scripts
Donny/강동윤 39c680d814
fix(es/codegen): Fix codegen of unicode surrogates (#7985)
**Description:**


x-ref: https://vercel.slack.com/archives/C02HY34AKME/p1695334071194139


Reproduction: https://github.com/kdy1/repro-test-mdx-korean



Regression of next.js: `v13.4.11`(swc_core@v0.79.13) => `v13.5.2`
(swc_core@v0.83.12)


 - `next@v13.4.19` works (swc_core@v0.79.59)
 - `next@v13.4.20-canary.3` works (swc_core@v0.79.70)
 -  **`next@v13.4.20-canary.32` fails** (swc_core@v0.83.12)

Commit range:
662f236aa5...e67bf05f9d

- `swc_core@v0.79.70`:
662f236aa5
- `swc_core@v0.83.12`:
e67bf05f9d

Diff: https://gist.github.com/kdy1/047e7e5537c34180d446cb3d5b95fce8

---

I did more investigation by monkey-patching the `next` package.
`.minify()` resolved without an exception.
It means that `.minify()` is producing an invalid ES code.

So... candidates are

 - https://github.com/swc-project/swc/pull/7890
 - https://github.com/swc-project/swc/pull/7876
 - https://github.com/swc-project/swc/pull/7858
 - https://github.com/swc-project/swc/pull/7856
 - https://github.com/swc-project/swc/pull/7853
 - https://github.com/swc-project/swc/pull/7832
2023-09-25 23:36:05 +00:00
..
_ fix(es/minifier): Preserve more identifiers if eval or with exists (#4580) 2022-05-09 07:17:33 +00:00
instrument perf(es/minifier): Make postcompress pass parallel (#5374) 2022-08-03 06:20:04 +00:00
mangler fix(es/minifier): Fix calculation of character frequency (#5772) 2022-09-07 04:46:21 +00:00
next fix(es/codegen): Fix codegen of unicode surrogates (#7985) 2023-09-25 23:36:05 +00:00
reduce test(es/minifier): Organize tests (#4375) 2022-04-20 15:52:03 +09:00
x/terser test(es/minifier): Add tests for benchmark files (#5986) 2022-09-29 09:41:13 +09:00
exec.sh fix(es/minifier): Don't inline conditionally initialized vars (#6751) 2023-01-11 06:01:56 +00:00
ideal.sh refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
jsprops.js chore(repo): Configure prettier (#4523) 2022-05-04 14:25:28 +00:00
postpone.sh test(es/minifier): Categorize tests (#4410) 2022-04-24 12:11:02 +00:00
size.sh chore(es/minifier): Fix size calculator script (#5767) 2022-09-06 22:23:57 +09:00
test.sh fix(es/minifier): Fix a bug about eval of name mangler (#7615) 2023-07-18 01:09:00 +00:00
update-list.sh test(es/minifier): Add a test for a fixed issue (#5897) 2022-09-19 17:25:49 +09:00