diff --git a/src/lib.rs b/src/lib.rs index 7e6bdf9..5cc99c8 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -472,10 +472,10 @@ pub struct CompilerOptions { #[derive(Deserialize, Debug, PartialEq, Copy, Clone, Default)] #[serde(rename_all = "lowercase")] pub enum ModuleDetectionMode { - #[default] - Auto, - Legacy, - Force, + #[default] + Auto, + Legacy, + Force, } /// Module resolution mode @@ -581,6 +581,9 @@ pub enum Target { Es2018, Es2019, Es2020, + Es2021, + Es2022, + Es2023, EsNext, Other(String), } @@ -602,6 +605,9 @@ impl<'de> Deserialize<'de> for Target { "ES2018" => Target::Es2018, "ES2019" => Target::Es2019, "ES2020" => Target::Es2020, + "ES2021" => Target::Es2021, + "ES2022" => Target::Es2022, + "ES2023" => Target::Es2023, "ESNEXT" => Target::EsNext, other => Target::Other(other.to_string()), }; @@ -631,6 +637,9 @@ pub enum Lib { Es2018, Es2019, Es2020, + Es2021, + Es2022, + Es2023, EsNext, Dom, WebWorker, @@ -684,6 +693,9 @@ impl<'de> Deserialize<'de> for Lib { "ES2018" => Lib::Es2018, "ES2019" => Lib::Es2019, "ES2020" => Lib::Es2020, + "ES2021" => Lib::Es2021, + "ES2022" => Lib::Es2022, + "ES2023" => Lib::Es2023, "ESNext" => Lib::EsNext, "DOM" => Lib::Dom, "WEBWORKER" => Lib::WebWorker,