swc/crates/swc_ecma_minifier/tests
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
..
benches-full fix(es/minifier): Don't inline properties if the var is not fn-local (#7839) 2023-08-22 11:04:15 +09:00
fixture fix(es/minifier): Do not inline into a template literal with sequential inliner (#7971) 2023-09-20 06:57:03 +00:00
full fix(es/codegen): Fix codegen of unicode surrogates (#7985) 2023-09-25 23:36:05 +00:00
mangle fix(es/codegen): Remove extra spaces in AssignPatProp and KeyValuePatProp (#7488) 2023-06-07 05:08:35 +00:00
pass-1 refactor(es/minifier): Respect toplevel and module options (#7671) 2023-07-20 11:35:08 +09:00
pass-default feat(es/minifier): Implement trivial optimizations (#6256) 2022-11-02 01:21:32 +00:00
projects fix(es/minifier): Abort seq inliner if var is not fn_local or reassigned (#7804) 2023-08-17 05:15:59 +00:00
terser/compress fix(es/resolver): Correctly resolve global value (#7893) 2023-08-31 05:54:18 +00:00
compress.rs feat(es/codegen): Add an option to print assert for import attributes (#7914) 2023-09-05 21:24:25 +09:00
eval.rs perf(es/ast): Shrink size of Expr (#7041) 2023-03-09 13:34:11 +00:00
exec.rs feat(es/codegen): Add an option to print assert for import attributes (#7914) 2023-09-05 21:24:25 +09:00
mangle.rs feat(es/codegen): Add an option to print assert for import attributes (#7914) 2023-09-05 21:24:25 +09:00
passing.txt fix(es/minifier): Mark args of news as references (#7743) 2023-08-03 07:02:15 +09:00
postponed.txt fix(es/minifier): Mark args of news as references (#7743) 2023-08-03 07:02:15 +09:00
terser_exec_base.js refactor(es/minifier): Make rust-analyzer fast, really (#4746) 2022-05-23 16:16:05 +09:00
terser_exec.rs feat(es/codegen): Add an option to print assert for import attributes (#7914) 2023-09-05 21:24:25 +09:00
TODO.txt fix(es/minifier): Mark args of news as references (#7743) 2023-08-03 07:02:15 +09:00