magic-akari
d480ab9ae8
fix(es/resolver): Skip property in JSX member ( #8598 )
...
**Related issue:**
- Close #8528
2024-02-04 06:17:52 +00:00
Austaras
82bd8070cb
fix(es/resolver): Resolve top-level undefined
, NaN
, and Infinity
correctly ( #8471 )
...
**Description:**
For following code
```js
var NaN = 1
console.log(NaN)
```
Result would be
|Envirnoment|Result|
|-|-|
|Non strict script(browser, nodejs repl)|NaN|
|Non strict script(nodejs script)|1|
|Strict script(browser, nodejs repl)|runtime error|
|Strict script(nodejs script)|1|
|ESM|1|
So SWC choose to behave like browser in script mode and confirm to esm
standard.
**Related issue:**
- Closes #8465
2024-01-04 04:24:14 +00:00
David Sherret
a12eaae0e5
fix(es/codegen): Emit abstract keyword ( #8479 )
2024-01-03 04:43:45 +00:00
layton
f8ce31627b
fix(es/resolver): Handle TsInterfaceDecl
and UsingDecl
correctly ( #8403 )
...
**Related issue**:
- Closes #7967
2023-12-08 14:00:00 +00:00
Austaras
3dd73a3cd8
fix(es/renamer): Allow globalThis
to be shadowed ( #8327 )
...
**Related issue:**
- Closes #8317
2023-11-23 01:52:01 +00:00
David Sherret
2113bb3e19
fix(es/resolver): Ignore qualifiers of TsImportType
( #8299 )
2023-11-20 04:04:17 +00:00
Edward Faulkner
6f45b4693e
fix(es/codegen): Fix codegen of type-only imports ( #8070 )
2023-10-06 12:39:56 +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
Austaras
2db10e9fd1
fix(es/resolver): Correctly resolve global value ( #7893 )
...
**Related issue:**
- Closes #7685
2023-08-31 05:54:18 +00:00
Donny/강동윤
b34f1adbcc
build(cargo): Update rustc
to 2023-07-03
( #7623 )
2023-07-05 03:50:43 +00:00
Donny/강동윤
1d9f972fb4
fix(es/resolver): Resolve the super class before registering a class name ( #7550 )
...
**Related issue:**
- Closes #7546 .
2023-06-20 05:03:01 +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
Austaras
7a00f2e954
fix(es/resolver): Hoist parameter in arrow and constructor ( #7292 )
...
**Related issue:**
- Closes #7248 .
---
Co-authored-by: Donny/강동윤 <kdy1997.dev@gmail.com>
2023-04-19 11:25:02 +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
Austaras
c114f006b4
refactor(es/resolver): Make syntax context for unresolved and top-level stable ( #7096 )
2023-03-20 11:01:19 +09:00
Austaras
0f09e356c3
feat(es/resolver): Make scope context identical to the vars ( #7095 )
2023-03-19 11:57:14 +09: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/강동윤
e946c43f4e
fix(es/resolver): Use type context for export =
if it's unresolved ( #6963 )
...
**Related issue:**
- https://github.com/dudykr/stc/issues/717 .
2023-02-19 23:50:19 +09:00
Donny/강동윤
861d87cae6
fix(es/resolver): Resolve parameters correctly ( #6890 )
...
**Related issue:**
- Closes https://github.com/swc-project/swc/issues/5622 .
2023-02-01 15:49:08 +09:00
westhide
e9fdac216c
fix(es/codegen): Skip space if jsx attrs is empty ( #6823 )
2023-01-16 15:23:28 +00:00
HeYunfei
29ba05d137
fix(es/resolver): Reset in_type
flag correctly ( #6597 )
2022-12-08 08:40:40 +09:00
Donny/강동윤
0cee0e1af7
fix(es/visit): Visit TypeScript satisfies expressions ( #6511 )
2022-11-25 20:28:01 +09:00
Donny/강동윤
6b876c4c4f
fix(es/resolver): Resolve interfaces correctly ( #6387 )
...
**Related issue:**
- https://github.com/dudykr/stc/pull/245 .
2022-11-09 06:28:58 +00:00
Donny/강동윤
2737aea312
fix(es/resolver): Change order for switch cases ( #6317 )
...
**Related issue:**
- Closes https://github.com/swc-project/swc/issues/6310 .
2022-11-02 10:02:06 +00:00
IWANABETHATGUY
8003dc8563
feat(es/codegen): Remove the trailing comma of binding patterns ( #6078 )
2022-10-07 16:45:20 +09:00
Austaras
1a11cfd46f
feat(es/minifier): Improve fn-local analysis for better inlining ( #5955 )
2022-09-29 14:16:28 +09:00
Austaras
573418fc96
fix(es/resolver): Use a separate mark for the name of FnExpr
( #5959 )
2022-09-27 14:50:35 +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
magic-akari
3d485d2681
fix(es/fixer): Wrap expressions in the left of a binary expression ( #5586 )
2022-08-24 03:44:32 +00:00
magic-akari
42d8ad26ce
fix(es/codegen): Emit type parameters of class super expression ( #5338 )
2022-07-29 11:52:13 +00:00
Austaras
0f254d5ce5
feat(es/codegen): Remove extra space before a private method ( #5295 )
2022-07-26 03:35:49 +00:00
Austaras
9519e801ea
fix(es/resolver): Fix handling of block scoped functions ( #5092 )
2022-07-05 05:04:49 +00:00
Donny/강동윤
b3f6f20721
fix(es/resolver): Make catch parameter not disturb resolving ( #4976 )
2022-06-15 05:24:39 +00:00
Donny/강동윤
35c93be60f
perf(es/transforms): Make transforms parallel ( #4939 )
2022-06-11 07:42:43 +00:00
Donny/강동윤
0567f67664
fix(es/minifier): Apply name mangler for more cases ( #4840 )
2022-05-29 11:15:16 +00:00
Donny/강동윤
a487fc1d28
refactor(es/transforms): Remove concurrent
( #4808 )
2022-05-26 15:58:19 +00:00
brightwu
f28d9c143b
fix(es/resolver): Fix more edge cases related to catch
and var
( #4773 )
2022-05-24 09:24:42 +00:00
brightwu
e2da3ddc03
fix(es/resolver): Handle var
after catch with the same name ( #4772 )
2022-05-24 16:53:13 +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
David Sherret
2745cb7949
fix(es/resolver): Ensure that a parameter type is resolved to parent ( #4645 )
2022-05-13 06:31:52 +00:00
Donny/강동윤
79f87e03db
test(es/minifier): Execute more tests ( #4636 )
2022-05-12 16:28:52 +09:00
Donny/강동윤
097ff1ddc1
fix(es/minifier): Fix with
and NaN
( #4596 )
2022-05-10 03:21:43 +00:00
Donny/강동윤
56c3010f6b
fix(es/resolver): Fix more try catch issues ( #4582 )
2022-05-09 17:50:30 +09:00