Skip to content

Commit

Permalink
feat(es): Add es2023 and es2024 to EsVersion (#9700)
Browse files Browse the repository at this point in the history
  • Loading branch information
kdy1 authored Nov 1, 2024
1 parent cbfd3dd commit 5a6f0e6
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 428 deletions.
5 changes: 5 additions & 0 deletions .changeset/three-clocks-punch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
swc_ecma_ast: major
---

feat(es): Add `es2023` and `es2024` to `EsVersion`
4 changes: 4 additions & 0 deletions crates/swc_ecma_ast/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,8 @@ pub enum EsVersion {
Es2020,
Es2021,
Es2022,
Es2023,
Es2024,
EsNext,
}

Expand All @@ -381,6 +383,8 @@ impl<'de> Deserialize<'de> for EsVersion {
"es2020" => Ok(EsVersion::Es2020),
"es2021" => Ok(EsVersion::Es2021),
"es2022" => Ok(EsVersion::Es2022),
"es2023" => Ok(EsVersion::Es2023),
"es2024" => Ok(EsVersion::Es2024),
"esnext" => Ok(EsVersion::EsNext),
_ => Err(D::Error::custom(format!("Unknown ES version: {}", s))),
}
Expand Down
Loading

0 comments on commit 5a6f0e6

Please sign in to comment.