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
Donny/강동윤
ee7575695d
feat(es/codegen): Add an option to print assert
for import attributes ( #7914 )
...
**Description:**
- `jsc.experimental.keepImportAssertions` is renamed to `jsc.experimental.keepImportAttributes`.
- `jsc.experimental.emitAssertForImportAttributes` is added.
**Related issue:**
- Closes #7908
2023-09-05 21:24:25 +09:00
Donny/강동윤
4d3fcb86e4
feat(es/ast): Support import attributes proposal ( #7868 )
...
**Related issue:**
- Closes #7179
2023-08-28 00:29:45 +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
廖应龙
a0da02d0ff
fix(es/codegen): Emit type arguments of jsx element names ( #7522 )
2023-06-13 03:37:39 +00:00
David Sherret
064bcf4854
fix(es/codegen): Remove extra spaces in AssignPatProp
and KeyValuePatProp
( #7488 )
...
Co-authored-by: Donny/강동윤 <kdy1997.dev@gmail.com>
2023-06-07 05:08:35 +00:00
David Sherret
3935d02e36
fix(es/codegen): Emit ;
for TsImportEqualsDecl
( #7464 )
2023-05-30 03:22:07 +00:00
Donny/강동윤
40ba242076
fix(es/codegen): Do not create duplicate source map entry ( #7309 )
2023-05-16 04:12:46 +00:00
David Sherret
0ca05d8b69
fix(es/codegen): Fix codegen of TsModuleDecl
( #7319 )
2023-04-24 04:15:08 +00:00
Donny/강동윤
0259a7465f
build(cargo): Update rustc
to nightly-2023-03-20
( #7170 )
...
**Description:**
This PR also updates `rkyv` to `=0.7.40`.
**Related issue:**
- Closes https://github.com/swc-project/swc/issues/6807 .
2023-03-30 08:06:02 +00:00
Donny/강동윤
12546c853a
build(cargo): Revert rustc upgrade ( #7162 )
...
**Description:**
The `rkyv` bug is not fixed.
2023-03-29 17:48:45 +09:00
Donny/강동윤
e445502072
build(cargo): Update rustc
to nightly-2023-03-28
( #7154 )
...
**Description:**
This PR also updates `rkyv` to `=0.7.40`.
**Related issue:**
- Closes https://github.com/swc-project/swc/issues/6807 .
2023-03-29 06:24:19 +00:00
magic-akari
8353accb13
fix(es/codegen): Emit type_params
for TsConstructSignatureDecl
( #7080 )
...
**Related issue:**
- Closes https://github.com/swc-project/swc/issues/7079 .
2023-03-17 02:38:45 +00:00
Donny/강동윤
367ac825f6
refactor(es/parser): Make lexer not generic over Input
( #6993 )
...
**Description:**
Currently, it uses `StringInput` as the input type, but I'll refactor it to use `String` or `Vec<u8>` directly to optimize it further.
**Related issue:**
- https://github.com/swc-project/swc/discussions/6991
2023-02-28 08:20:29 +00:00
Donny/강동윤
df702614e1
fix(es/codegen): Fix codegen of string literals with \x000
( #6838 )
...
**Related issue:**
- Closes https://github.com/swc-project/swc/issues/6836 .
2023-01-20 08:08:58 +00:00
westhide
e9fdac216c
fix(es/codegen): Skip space if jsx attrs is empty ( #6823 )
2023-01-16 15:23:28 +00:00
Kevin Barabash
5c53a74f55
fix(es/codegen): Fix codegen of TypeScript mapped types ( #6621 )
2022-12-12 01:58:08 +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
Donny/강동윤
0967e8f06d
chore(ci): Enforce clippy for all targets ( #6299 )
2022-10-31 16:59:29 +09:00
Kevin Barabash
083924c0e1
fix(es/codegen): Emit readonly
for TsIndexSignature
( #6172 )
2022-10-16 08:56:56 +09:00
IWANABETHATGUY
8003dc8563
feat(es/codegen): Remove the trailing comma of binding patterns ( #6078 )
2022-10-07 16:45:20 +09:00
Donny/강동윤
bc2c0f4133
fix(es/codegen): Fix codegen of a negative number ( #5980 )
...
**Related issue:**
- Closes https://github.com/swc-project/swc/issues/5912 .
2022-09-28 13:40:07 +00:00
Donny/강동윤
2ba88154fc
fix(es/codegen): Align sourcemap with terser ( #5657 )
2022-09-26 18:12:42 +09:00
Donny/강동윤
1a182ef8d9
perf(es): Optimize memory layout of AST ( #5829 )
2022-09-20 12:47:21 +09:00
IWANABETHATGUY
7d6d04b421
fix(es/codegen): Drop the last comma in an array literal ( #5877 )
...
**Description:**
Drop the last comma in an array literal.
**Related issue:**
- Closes https://github.com/swc-project/swc/issues/5692 .
2022-09-16 15:48:28 +09:00
Donny/강동윤
dfb01bde71
refactor: Refactor code using clippy ( #5863 )
...
**Description:**
I temporarily updated rustc to use newer version of `cargo clippy`.
2022-09-14 15:05:59 +00:00
magic-akari
2b2464271a
fix(es/codegen): Remove redundant ;
after export default decl ( #5851 )
2022-09-14 06:07:15 +00:00
RiESAEX
8adbe1675e
fix(es/parser): Keep comments of the RHS of a binary expression ( #5812 )
2022-09-11 02:58:06 +00:00
Donny/강동윤
537449e53b
fix(es/codegen): Emit trailing semicolon ( #5659 )
2022-08-29 10:10:55 +00:00
Austaras
e37b7e8caa
feat(es/codegen): Remove more whitespaces from BinExpr
( #5380 )
2022-08-04 16:52:06 +09:00
magic-akari
42d8ad26ce
fix(es/codegen): Emit type parameters of class super expression ( #5338 )
2022-07-29 11:52:13 +00:00
Donny/강동윤
14894ed4c9
fix(atoms): Workaround a bug of rkyv
( #5323 )
2022-07-28 11:41:15 +09:00
magic-akari
daac26bcfb
fix(es/codegen): Add ;
for a generator function ( #5292 )
2022-07-26 03:05:42 +00:00
Austaras
3f0856db2e
feat(es/codegen): Optimize number and bigint literal ( #5223 )
2022-07-18 03:27:03 +00:00
Donny/강동윤
b76b4999cc
fix(es/codegen): Fix codegen of some non-ascii characters ( #5108 )
2022-07-05 10:22:25 +00:00
magic-akari
8df6e047cc
fix(es/codegen): Emit numeric value for Binary and Octal literals ( #5083 )
2022-07-04 03:49:52 +00:00
magic-akari
ea46eb41e0
fix(es/codegen): Fix numeric literals ( #4733 )
2022-05-21 14:14:33 +00:00
Donny/강동윤
f1baff4114
fix(es/codegen): Fix numeric literals ( #4731 )
2022-05-21 20:31:19 +09:00
Kevin Barabash
72fbf692a4
fix(es/codegen): Don't add a newline after an arrow body ( #4711 )
2022-05-19 07:12:37 +00:00
Donny/강동윤
eb8508f88c
feat(es/codegen): Implement ascii-only ( #4660 )
2022-05-15 05:07:21 +00:00
Donny/강동윤
67942d5731
feat(common): Reserve BytePos(0)
for dummy spans ( #4616 )
2022-05-11 16:14:42 +00:00
Donny/강동윤
139ac24c46
fix(es/codegen): Allow non-ascii character in more places ( #4394 )
2022-04-21 13:09:05 +00:00
Donny/강동윤
4953ce466f
fix(es/codegen): Emit decorators before export ( #4349 )
2022-04-17 12:05:47 +00:00
Donny/강동윤
0245e26af5
fix(es/codegen): Fix overflow of numeric literals ( #4321 )
2022-04-13 10:16:51 +00:00
那里好脏不可以
37a8c90750
chore(*): Typo + fomatting ( #4304 )
2022-04-11 18:45:58 +00:00
Alexander Akait
1f0039f2c3
test(es/parser): Add a test for a fixed issue ( #4255 )
2022-04-06 00:21:13 +09:00
Alexander Akait
f39d3aca4d
feat(es/ast): Add raw
to Num
( #4245 )
2022-04-05 12:46:35 +00:00
Donny/강동윤
8cd903b3b0
fix(es/codegen): Commit ;
before a template literal ( #4252 )
2022-04-05 09:12:23 +00:00
Alexander Akait
e91f271873
feat(es/ast): Add raw
to BigInt
( #4218 )
2022-04-02 06:04:14 +00:00
Alexander Akait
fcf67c4570
fix(es): Consume surrogate pairs ( #4115 )
2022-03-28 12:18:06 +00:00