Donny/강동윤
c0beba7708
test(es): Update tsc
conformance test suite ( #8615 )
2024-02-07 07:23:54 +00:00
yannkaiser
9e6dad9baf
fix(es/parser): Rescan <<
as <
when parsing type args ( #8607 )
...
**Description:**
The related issue is a product to the fact that the lexer sees a `<<`
token in `fun<<T>...` and therefore parses the type args as an arrow
function.
This PR adds the handling of the "split" of `<<` when beginning to parse
type args.
I am open for suggestions, I still find this a bit odd (in
`parse_ts_type_args()`):
```rs
if is!(p, "<<") {
p.input.cut_lshift();
} else {
expect!(p, '<');
}
```
**Related issue:**
- Closes #7187
- Closes #8209
- Closes #8581
2024-02-06 14:31:14 +00:00
David Sherret
7d724d8ea3
fix(es/parser): Fix parsing of dynamic source phase imports ( #8611 )
2024-02-06 03:20:30 +00:00
David Sherret
5a773061db
fix(es/parser): Set class property to abstract
or override
even in error states ( #8610 )
...
**Description:**
Ensures that a class property with `abstract` or `override` is marked as such in the AST, even in error states.
2024-02-06 02:46:21 +00:00
Donny/강동윤
7f2a2c1e40
refactor(es/ast): Improve type definitions of patterns ( #8532 )
...
**Description:**
- Copy `AssignmentTarget` from `oxc`.
- Use `BindingIdentifier` in more places.
**Related issue:**
- Closes #8026
2024-02-05 15:32:52 +09:00
yannkaiser
8413a6c48e
fix(es/lexer): Fix typo in package
keyword ( #8589 )
...
**Description:**
There is a typo in the ES lexer for the keyword `package`.
**Related issue:**
- Closes #8588
2024-02-02 10:17:48 +09:00
magic-akari
72048ae1ce
feat(es/ast): Support import phase ( #8279 )
...
**Description:**
- https://github.com/tc39/proposal-source-phase-imports
2024-01-21 12:05:46 +09:00
Donny/강동윤
bc38ac906c
fix(es/ast): Fix definition of SetterProp
( #8314 )
...
**Related issue:**
- Closes #8157
- Closes #8377
2024-01-21 12:05:46 +09:00
David Sherret
572bcaefc1
fix(es/ast): Add definite
and is_override
to AutoAccessor
( #8436 )
...
**Description:**
Adds a `definite` and `is_override` property to `AutoAccessor` as they were missing.
It also fixes codegen for `AutoAccessor` when emitting TypeScript (which is the main reason I need this PR).
**BREAKING CHANGE:**
Adds a `definite` and `is_override` property.
**Related issue:**
- Closes #8344
2024-01-21 12:05:46 +09:00
Donny/강동윤
3741448b1b
chore: Update dependencies ( #8514 )
2024-01-18 14:04:09 +00:00
magic-akari
740e6f390a
fix(es/parser): Correctly parse the keyword ( #8483 )
...
**Related issue:**
- Closes #8482 .
2024-01-04 12:26:25 +00:00
David Sherret
0dd96f85e2
fix(es/codegen): Emit override
keyword ( #8449 )
...
**Description:**
Emits the `override` keyword.
2023-12-24 10:30:46 +09:00
magic-akari
8af6ffb1dd
fix(es/parser): Wrap with OptChain
across TsNonNull
( #8332 )
...
**Related issue:**
- Closes #8326 .
2023-11-23 08:23:30 +09:00
Zzzen
51042e090d
fix(es/parsing): Fix parsing of type satisfies = 0;
( #8305 )
...
**Related issue:**
- Closes #8121
2023-11-20 22:49:15 +00:00
magic-akari
feb8a6dad9
fix(es/parser): Report error for exported reserved name ( #8313 )
...
**Related issue:**
- Closes #8268 .
2023-11-20 21:57:51 +00:00
magic-akari
00b88399a0
fix(es/parser): Fix parsing of import type from from
( #8309 )
...
**Related issue:**
- Closes #8308 .
2023-11-20 06:20:06 +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
Donny/강동윤
7530e9051d
perf(es/minifier): Add has_flag
to Comments
( #8182 )
2023-10-25 22:59:03 +00:00
Donny/강동윤
5be8e74ee0
chore(es/module): Remove serde(deny_unknown_fields)
( #8163 )
...
**Related issue:**
- Closes #7979
2023-10-20 21:32:34 +00:00
Donny/강동윤
4d3fcb86e4
feat(es/ast): Support import attributes proposal ( #7868 )
...
**Related issue:**
- Closes #7179
2023-08-28 00:29:45 +00:00
David Sherret
e527c12a82
fix(es/parser): Revert lexer fix for <<
( #7807 )
...
This temporarily reverts commit 68503726a7
until https://github.com/swc-project/swc/issues/7621 can be fixed.
Re-opens #7187 .
2023-08-14 15:45:51 +00:00
Fy
5f97f8656f
refactor(es/parser): Do not validate top-level await with target ( #7774 )
2023-08-07 21:30:04 +00:00
Donny/강동윤
b34f1adbcc
build(cargo): Update rustc
to 2023-07-03
( #7623 )
2023-07-05 03:50:43 +00:00
Donny/강동윤
68503726a7
fix(es/parser): Re-lex <<
as two <
-s if required ( #7439 )
...
**Related issue:**
- Closes #7187 .
2023-06-30 07:41:19 +00:00
Donny/강동윤
bcd5a1d666
feat(es/compat): Implement transform for explicit resource management ( #7376 )
...
**Related issue:**
- Closes #7316 .
- Closes #7369 .
2023-06-29 14:13:43 +00:00
Donny/강동윤
9d5dda1299
fix(es/parser): Adjust context while parsing type arguments of TypeScript type queries ( #7582 )
...
**Related issue:**
- Closes #7580 .
2023-06-26 04:00:00 +00:00
Donny/강동윤
3958f1792c
refactor(es/ast): Remove unused fields ( #7518 )
...
**Related issue:**
- Closes #7347 .
- Closes #7487 .
2023-06-12 08:02:34 +00:00
Donny/강동윤
aa83584634
refactor(es/ast): Reimplement optional chaining ( #7441 )
...
**Related issue:**
- Closes #7003 .
- Closes #7156 .
2023-06-12 06:47:40 +00:00
Pig Fang
6c00a2422a
feat(es/parser): Disallow tagged tpl in optional chaining ( #7515 )
2023-06-12 01:37:39 +00:00
Donny/강동윤
8274cce9a7
test(es/parser): Add a test for a fixed issue ( #7467 )
...
**Related issue:**
- Closes #7456 .
2023-05-30 04:35:07 +00:00
Donny/강동윤
77850dd8f0
fix(es/parser): Fix parsing of generic jsx element name ( #7449 )
...
**Related issue:**
- Closes #7444 .
2023-05-25 13:52:14 +09:00
Donny/강동윤
a37d59a134
fix(es/parser): Fix parsing of tsx with a type annotation in a conditional expression ( #7440 )
...
**Related issue:**
- Closes #7224 .
2023-05-24 15:57:50 +09:00
Donny/강동윤
33a922b6f8
fix(es/parser): Allow using package
as a parameter name in interface ( #7438 )
...
**Related issue:**
- Closes #7186 .
2023-05-24 06:25:39 +00:00
Donny/강동윤
1cab43f17d
fix(es/parser): Reset class context ( #7433 )
...
**Related issue:**
- Closes #7428 .
2023-05-23 05:28:56 +00:00
Donny/강동윤
57ad722d06
fix(es/parser): Fix parsing of >
in typescript mode ( #7407 )
...
**Related issue:**
- Closes #7403 .
2023-05-18 08:18:27 +00:00
Donny/강동윤
1d3f32056c
fix(es/parser): Fix parsing of module
identifier ( #7400 )
...
**Related issue:**
- Closes #4176 .
- Closes #7372 .
2023-05-17 04:51:57 +00:00
Donny/강동윤
eaba323581
test(es/parser): Add a test for a fixed issue ( #7398 )
...
**Related issue:**
- Closes #6976 .
2023-05-16 12:31:05 +00:00
Austaras
fa7a3521f5
fix(es/parser): Fix >=
with type instantiate ( #7388 )
2023-05-14 05:21:13 +00:00
Donny/강동윤
041b491466
feat(es/parser): Implement explicit resource management ( #7322 )
...
**Description:**
- Add `UsingDecl`.
- Add `UsingDecl` to `Decl`.
- Rename `VarDeclOrPat` to `ForHead`.
- Add `UsingDecl` to `ForHead`.
- Implement parser for using declarations.
**Related issue:**
- #7316 .
2023-05-10 04:16:44 +00:00
magic-akari
985f0cad06
fix(es/parser): Parse decorators after export
( #7340 )
2023-04-29 22:26:13 +09:00
Donny/강동윤
603f22de76
test(es): Update tsc test suite ( #7323 )
2023-04-24 14:59:19 +00:00
Donny/강동윤
6f81cb9c32
fix(es/parser): Fix handling of in
and out
of typescript ( #7308 )
...
**Related issue:**
- Closes #7305 .
2023-04-21 15:11:18 +09:00
David Sherret
6614886192
fix(es/parser): Parse const
type parameters in arrow function expressions ( #7242 )
2023-04-11 02:11:04 +00:00
Donny/강동윤
01db30f91e
fix(es/parser): Reset ctx for cond while parsing a stmt ( #7232 )
2023-04-10 10:45:49 +00:00
Yukang
b1c40a411f
fix(es/parser): Use a hard error for missing r-paren in an if stmt ( #7223 )
...
**Related issue:**
- Closes https://github.com/swc-project/swc/issues/7104 .
2023-04-10 08:46:01 +00:00
Marvin Hagemeister
414e66910d
fix(es/parser): Fix infinite loop on jsx in js ( #7191 )
2023-04-02 22:14:29 +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
Crayon
dd2b16db9e
fix(es/parser): Fix parsing of static accessors ( #7108 )
...
**Related issue:**
- Closes https://github.com/swc-project/swc/issues/7107 .
2023-03-21 07:19:45 +00:00