From 39e1e54ee4a44980f592b7e053b8c187f6efba12 Mon Sep 17 00:00:00 2001 From: Pig Fang Date: Wed, 7 Apr 2021 23:38:24 +0800 Subject: [PATCH] fix(es/parser): Disallow `override` in non-subclass (#1552) swc_ecma_parser: - Disallow `override` in classes without super class. --- Cargo.toml | 10 ++++----- bundler/Cargo.toml | 10 ++++----- ecmascript/Cargo.toml | 10 ++++----- ecmascript/codegen/Cargo.toml | 4 ++-- ecmascript/dep-graph/Cargo.toml | 4 ++-- ecmascript/ext-transforms/Cargo.toml | 4 ++-- ecmascript/jsdoc/Cargo.toml | 4 ++-- ecmascript/parser/Cargo.toml | 2 +- ecmascript/parser/src/error.rs | 4 ++++ ecmascript/parser/src/lib.rs | 1 + ecmascript/parser/src/parser/class_and_fn.rs | 9 +++++++- .../class/duplicated-modifiers/input.ts | 2 +- .../class/override-in-non-subclass/input.ts | 11 ++++++++++ .../override-in-non-subclass/input.ts.stderr | 12 ++++++++++ .../class/override-on-constructor/input.ts | 2 +- .../class/override-with-static/input.ts | 2 +- ecmascript/preset_env/Cargo.toml | 8 +++---- ecmascript/transforms/Cargo.toml | 22 +++++++++---------- ecmascript/transforms/base/Cargo.toml | 6 ++--- ecmascript/transforms/compat/Cargo.toml | 8 +++---- ecmascript/transforms/module/Cargo.toml | 10 ++++----- ecmascript/transforms/optimization/Cargo.toml | 18 +++++++-------- ecmascript/transforms/proposal/Cargo.toml | 12 +++++----- ecmascript/transforms/react/Cargo.toml | 12 +++++----- ecmascript/transforms/testing/Cargo.toml | 8 +++---- ecmascript/transforms/typescript/Cargo.toml | 16 +++++++------- 26 files changed, 123 insertions(+), 88 deletions(-) create mode 100644 ecmascript/parser/tests/typescript-errors/class/override-in-non-subclass/input.ts create mode 100644 ecmascript/parser/tests/typescript-errors/class/override-in-non-subclass/input.ts.stderr diff --git a/Cargo.toml b/Cargo.toml index 99aaa89b137..71fd6c8474c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -30,11 +30,11 @@ sourcemap = "6" swc_atoms = {version = "0.2", path = "./atoms"} swc_common = {version = "0.10.10", path = "./common", features = ["sourcemap", "concurrent"]} swc_ecma_ast = {version = "0.43.0", path = "./ecmascript/ast"} -swc_ecma_codegen = {version = "0.51.0", path = "./ecmascript/codegen"} -swc_ecma_ext_transforms = {version = "0.11.0", path = "./ecmascript/ext-transforms"} -swc_ecma_parser = {version = "0.53.0", path = "./ecmascript/parser"} -swc_ecma_preset_env = {version = "0.14.0", path = "./ecmascript/preset_env"} -swc_ecma_transforms = {version = "0.44.0", path = "./ecmascript/transforms", features = [ +swc_ecma_codegen = {version = "0.52.0", path = "./ecmascript/codegen"} +swc_ecma_ext_transforms = {version = "0.12.0", path = "./ecmascript/ext-transforms"} +swc_ecma_parser = {version = "0.54.0", path = "./ecmascript/parser"} +swc_ecma_preset_env = {version = "0.15.0", path = "./ecmascript/preset_env"} +swc_ecma_transforms = {version = "0.45.0", path = "./ecmascript/transforms", features = [ "compat", "module", "optimization", diff --git a/bundler/Cargo.toml b/bundler/Cargo.toml index 61c4be7b37f..6c30f2e7463 100644 --- a/bundler/Cargo.toml +++ b/bundler/Cargo.toml @@ -9,7 +9,7 @@ include = ["Cargo.toml", "build.rs", "src/**/*.rs", "src/**/*.js"] license = "Apache-2.0/MIT" name = "swc_bundler" repository = "https://github.com/swc-project/swc.git" -version = "0.31.0" +version = "0.32.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [features] @@ -33,9 +33,9 @@ retain_mut = "0.1.2" swc_atoms = {version = "0.2.4", path = "../atoms"} swc_common = {version = "0.10.10", path = "../common"} swc_ecma_ast = {version = "0.43.0", path = "../ecmascript/ast"} -swc_ecma_codegen = {version = "0.51.0", path = "../ecmascript/codegen"} -swc_ecma_parser = {version = "0.53.0", path = "../ecmascript/parser"} -swc_ecma_transforms = {version = "0.44.0", path = "../ecmascript/transforms", features = ["optimization"]} +swc_ecma_codegen = {version = "0.52.0", path = "../ecmascript/codegen"} +swc_ecma_parser = {version = "0.54.0", path = "../ecmascript/parser"} +swc_ecma_transforms = {version = "0.45.0", path = "../ecmascript/transforms", features = ["optimization"]} swc_ecma_utils = {version = "0.34.0", path = "../ecmascript/utils"} swc_ecma_visit = {version = "0.29.0", path = "../ecmascript/visit"} @@ -44,7 +44,7 @@ hex = "0.4" ntest = "0.7.2" reqwest = {version = "0.10.8", features = ["blocking"]} sha-1 = "0.9" -swc_ecma_transforms = {version = "0.44.0", path = "../ecmascript/transforms", features = ["react", "typescript"]} +swc_ecma_transforms = {version = "0.45.0", path = "../ecmascript/transforms", features = ["react", "typescript"]} tempfile = "3.1.0" testing = {version = "0.10.3", path = "../testing"} url = "2.1.1" diff --git a/ecmascript/Cargo.toml b/ecmascript/Cargo.toml index ac6c3907e61..01b04303fb6 100644 --- a/ecmascript/Cargo.toml +++ b/ecmascript/Cargo.toml @@ -6,7 +6,7 @@ edition = "2018" license = "Apache-2.0/MIT" name = "swc_ecmascript" repository = "https://github.com/swc-project/swc.git" -version = "0.30.0" +version = "0.31.0" [package.metadata.docs.rs] all-features = true @@ -28,10 +28,10 @@ typescript = ["swc_ecma_transforms/typescript"] [dependencies] swc_ecma_ast = {version = "0.43.0", path = "./ast"} -swc_ecma_codegen = {version = "0.51.0", path = "./codegen", optional = true} -swc_ecma_dep_graph = {version = "0.21.0", path = "./dep-graph", optional = true} -swc_ecma_parser = {version = "0.53.0", path = "./parser", optional = true} -swc_ecma_transforms = {version = "0.44.0", path = "./transforms", optional = true} +swc_ecma_codegen = {version = "0.52.0", path = "./codegen", optional = true} +swc_ecma_dep_graph = {version = "0.22.0", path = "./dep-graph", optional = true} +swc_ecma_parser = {version = "0.54.0", path = "./parser", optional = true} +swc_ecma_transforms = {version = "0.45.0", path = "./transforms", optional = true} swc_ecma_utils = {version = "0.34.0", path = "./utils", optional = true} swc_ecma_visit = {version = "0.29.0", path = "./visit", optional = true} diff --git a/ecmascript/codegen/Cargo.toml b/ecmascript/codegen/Cargo.toml index 9933cc2fd1d..c2a43535654 100644 --- a/ecmascript/codegen/Cargo.toml +++ b/ecmascript/codegen/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0/MIT" name = "swc_ecma_codegen" repository = "https://github.com/swc-project/swc.git" -version = "0.51.0" +version = "0.52.0" [dependencies] bitflags = "1" @@ -17,7 +17,7 @@ swc_atoms = {version = "0.2", path = "../../atoms"} swc_common = {version = "0.10.10", path = "../../common"} swc_ecma_ast = {version = "0.43.0", path = "../ast"} swc_ecma_codegen_macros = {version = "0.5.2", path = "./macros"} -swc_ecma_parser = {version = "0.53.0", path = "../parser"} +swc_ecma_parser = {version = "0.54.0", path = "../parser"} [dev-dependencies] swc_common = {version = "0.10.10", path = "../../common", features = ["sourcemap"]} diff --git a/ecmascript/dep-graph/Cargo.toml b/ecmascript/dep-graph/Cargo.toml index bf1f9a091dc..2b4d00e568d 100644 --- a/ecmascript/dep-graph/Cargo.toml +++ b/ecmascript/dep-graph/Cargo.toml @@ -6,7 +6,7 @@ edition = "2018" license = "Apache-2.0/MIT" name = "swc_ecma_dep_graph" repository = "https://github.com/swc-project/swc.git" -version = "0.21.0" +version = "0.22.0" [dependencies] swc_atoms = {version = "0.2", path = "../../atoms"} @@ -15,5 +15,5 @@ swc_ecma_ast = {version = "0.43.0", path = "../ast"} swc_ecma_visit = {version = "0.29.0", path = "../visit"} [dev-dependencies] -swc_ecma_parser = {version = "0.53.0", path = "../parser"} +swc_ecma_parser = {version = "0.54.0", path = "../parser"} testing = {version = "0.10.3", path = "../../testing"} diff --git a/ecmascript/ext-transforms/Cargo.toml b/ecmascript/ext-transforms/Cargo.toml index 9f7b90b7962..2defc744689 100644 --- a/ecmascript/ext-transforms/Cargo.toml +++ b/ecmascript/ext-transforms/Cargo.toml @@ -5,7 +5,7 @@ documentation = "https://rustdoc.swc.rs/swc_ecma_ext_transforms/" edition = "2018" license = "Apache-2.0/MIT" name = "swc_ecma_ext_transforms" -version = "0.11.0" +version = "0.12.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -14,6 +14,6 @@ phf = {version = "0.8.0", features = ["macros"]} swc_atoms = {version = "0.2", path = "../../atoms"} swc_common = {version = "0.10.10", path = "../../common"} swc_ecma_ast = {version = "0.43.0", path = "../ast"} -swc_ecma_parser = {version = "0.53.0", path = "../parser"} +swc_ecma_parser = {version = "0.54.0", path = "../parser"} swc_ecma_utils = {version = "0.34.0", path = "../utils"} swc_ecma_visit = {version = "0.29.0", path = "../visit"} diff --git a/ecmascript/jsdoc/Cargo.toml b/ecmascript/jsdoc/Cargo.toml index c7ee70b9a98..ac62f397d05 100644 --- a/ecmascript/jsdoc/Cargo.toml +++ b/ecmascript/jsdoc/Cargo.toml @@ -5,7 +5,7 @@ documentation = "https://rustdoc.swc.rs/jsdoc/" edition = "2018" license = "Apache-2.0/MIT" name = "jsdoc" -version = "0.21.0" +version = "0.22.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -19,6 +19,6 @@ swc_common = {version = "0.10.10", path = "../../common"} anyhow = "1" dashmap = "3" swc_ecma_ast = {version = "0.43.0", path = "../ast"} -swc_ecma_parser = {version = "0.53.0", path = "../parser"} +swc_ecma_parser = {version = "0.54.0", path = "../parser"} testing = {version = "0.10.3", path = "../../testing"} walkdir = "2" diff --git a/ecmascript/parser/Cargo.toml b/ecmascript/parser/Cargo.toml index dd4d1269bc0..b09a3edf63a 100644 --- a/ecmascript/parser/Cargo.toml +++ b/ecmascript/parser/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs", "examples/**/*.rs"] license = "Apache-2.0/MIT" name = "swc_ecma_parser" repository = "https://github.com/swc-project/swc.git" -version = "0.53.0" +version = "0.54.0" [features] default = [] diff --git a/ecmascript/parser/src/error.rs b/ecmascript/parser/src/error.rs index 2809745cf35..54f467e34f9 100644 --- a/ecmascript/parser/src/error.rs +++ b/ecmascript/parser/src/error.rs @@ -221,6 +221,7 @@ pub enum SyntaxError { TS2483, TS2491, TS2703, + TS4112, TSTypeAnnotationAfterAssign, } @@ -538,6 +539,9 @@ impl SyntaxError { SyntaxError::TS2491 => "The left-hand side of a 'for...in' statement cannot be a \ destructuring pattern" .into(), + SyntaxError::TS4112 => "This member cannot have an 'override' modifier because its \ + containing class does not extend another class." + .into(), SyntaxError::TSTypeAnnotationAfterAssign => { "Type annotations must come before default assignments".into() } diff --git a/ecmascript/parser/src/lib.rs b/ecmascript/parser/src/lib.rs index e2a007c8b55..d2a935ecd60 100644 --- a/ecmascript/parser/src/lib.rs +++ b/ecmascript/parser/src/lib.rs @@ -402,6 +402,7 @@ pub struct Context { in_parameters: bool, + has_super_class: bool, in_method: bool, in_class_prop: bool, diff --git a/ecmascript/parser/src/parser/class_and_fn.rs b/ecmascript/parser/src/parser/class_and_fn.rs index 287b7324c0b..d52ea9f7e51 100644 --- a/ecmascript/parser/src/parser/class_and_fn.rs +++ b/ecmascript/parser/src/parser/class_and_fn.rs @@ -159,7 +159,12 @@ impl<'a, I: Tokens> Parser { } expect!(p, '{'); - let body = p.parse_class_body()?; + let body = p + .with_ctx(Context { + has_super_class: super_class.is_some(), + ..p.ctx() + }) + .parse_class_body()?; expect!(p, '}'); let end = last_pos!(p); Ok(T::finish_class( @@ -470,6 +475,8 @@ impl<'a, I: Tokens> Parser { self.input.prev_span(), SyntaxError::TS1243(js_word!("override"), js_word!("declare")), ); + } else if !self.ctx().has_super_class { + self.emit_err(self.input.prev_span(), SyntaxError::TS4112); } else { is_override = true; } diff --git a/ecmascript/parser/tests/typescript-errors/class/duplicated-modifiers/input.ts b/ecmascript/parser/tests/typescript-errors/class/duplicated-modifiers/input.ts index e1563c5128c..4e5763034ef 100644 --- a/ecmascript/parser/tests/typescript-errors/class/duplicated-modifiers/input.ts +++ b/ecmascript/parser/tests/typescript-errors/class/duplicated-modifiers/input.ts @@ -1,4 +1,4 @@ -class C { +class C extends B { readonly readonly size = 0; abstract abstract t() {} override override e() {} diff --git a/ecmascript/parser/tests/typescript-errors/class/override-in-non-subclass/input.ts b/ecmascript/parser/tests/typescript-errors/class/override-in-non-subclass/input.ts new file mode 100644 index 00000000000..409c2f96174 --- /dev/null +++ b/ecmascript/parser/tests/typescript-errors/class/override-in-non-subclass/input.ts @@ -0,0 +1,11 @@ +class A { + override t() {} +} + +class B extends C { + m() { + class D { + override k() {} + } + } +} diff --git a/ecmascript/parser/tests/typescript-errors/class/override-in-non-subclass/input.ts.stderr b/ecmascript/parser/tests/typescript-errors/class/override-in-non-subclass/input.ts.stderr new file mode 100644 index 00000000000..879d75e4a40 --- /dev/null +++ b/ecmascript/parser/tests/typescript-errors/class/override-in-non-subclass/input.ts.stderr @@ -0,0 +1,12 @@ +error: This member cannot have an 'override' modifier because its containing class does not extend another class. + --> $DIR/tests/typescript-errors/class/override-in-non-subclass/input.ts:2:3 + | +2 | override t() {} + | ^^^^^^^^ + +error: This member cannot have an 'override' modifier because its containing class does not extend another class. + --> $DIR/tests/typescript-errors/class/override-in-non-subclass/input.ts:8:7 + | +8 | override k() {} + | ^^^^^^^^ + diff --git a/ecmascript/parser/tests/typescript-errors/class/override-on-constructor/input.ts b/ecmascript/parser/tests/typescript-errors/class/override-on-constructor/input.ts index 166bc2054d3..48425073948 100644 --- a/ecmascript/parser/tests/typescript-errors/class/override-on-constructor/input.ts +++ b/ecmascript/parser/tests/typescript-errors/class/override-on-constructor/input.ts @@ -1,3 +1,3 @@ -class C { +class C extends B { override constructor() {} } diff --git a/ecmascript/parser/tests/typescript-errors/class/override-with-static/input.ts b/ecmascript/parser/tests/typescript-errors/class/override-with-static/input.ts index 112cefa6248..181d382c6cd 100644 --- a/ecmascript/parser/tests/typescript-errors/class/override-with-static/input.ts +++ b/ecmascript/parser/tests/typescript-errors/class/override-with-static/input.ts @@ -1,3 +1,3 @@ -class C { +class C extends B { static override t() {} } diff --git a/ecmascript/preset_env/Cargo.toml b/ecmascript/preset_env/Cargo.toml index 313d44e3ecb..5f7761183b4 100644 --- a/ecmascript/preset_env/Cargo.toml +++ b/ecmascript/preset_env/Cargo.toml @@ -5,7 +5,7 @@ documentation = "https://rustdoc.swc.rs/swc_ecma_preset_env/" edition = "2018" license = "Apache-2.0/MIT" name = "swc_ecma_preset_env" -version = "0.14.0" +version = "0.15.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -21,13 +21,13 @@ string_enum = {version = "0.3.1", path = "../../macros/string_enum"} swc_atoms = {version = "0.2", path = "../../atoms"} swc_common = {version = "0.10.10", path = "../../common"} swc_ecma_ast = {version = "0.43.0", path = "../ast"} -swc_ecma_transforms = {version = "0.44.0", path = "../transforms", features = ["compat", "proposal"]} +swc_ecma_transforms = {version = "0.45.0", path = "../transforms", features = ["compat", "proposal"]} swc_ecma_utils = {version = "0.34.0", path = "../utils"} swc_ecma_visit = {version = "0.29.0", path = "../visit"} walkdir = "2" [dev-dependencies] pretty_assertions = "0.6" -swc_ecma_codegen = {version = "0.51.0", path = "../codegen"} -swc_ecma_parser = {version = "0.53.0", path = "../parser"} +swc_ecma_codegen = {version = "0.52.0", path = "../codegen"} +swc_ecma_parser = {version = "0.54.0", path = "../parser"} testing = {version = "0.10.3", path = "../../testing"} diff --git a/ecmascript/transforms/Cargo.toml b/ecmascript/transforms/Cargo.toml index e86cd624580..e94e00daca3 100644 --- a/ecmascript/transforms/Cargo.toml +++ b/ecmascript/transforms/Cargo.toml @@ -6,7 +6,7 @@ edition = "2018" license = "Apache-2.0/MIT" name = "swc_ecma_transforms" repository = "https://github.com/swc-project/swc.git" -version = "0.44.0" +version = "0.45.0" [package.metadata.docs.rs] all-features = true @@ -24,14 +24,14 @@ typescript = ["swc_ecma_transforms_typescript"] swc_atoms = {version = "0.2.0", path = "../../atoms"} swc_common = {version = "0.10.10", path = "../../common"} swc_ecma_ast = {version = "0.43.0", path = "../ast"} -swc_ecma_parser = {version = "0.53.0", path = "../parser"} -swc_ecma_transforms_base = {version = "0.11.0", path = "./base"} -swc_ecma_transforms_compat = {version = "0.12.0", path = "./compat", optional = true} -swc_ecma_transforms_module = {version = "0.12.0", path = "./module", optional = true} -swc_ecma_transforms_optimization = {version = "0.14.0", path = "./optimization", optional = true} -swc_ecma_transforms_proposal = {version = "0.12.0", path = "./proposal", optional = true} -swc_ecma_transforms_react = {version = "0.13.0", path = "./react", optional = true} -swc_ecma_transforms_typescript = {version = "0.13.0", path = "./typescript", optional = true} +swc_ecma_parser = {version = "0.54.0", path = "../parser"} +swc_ecma_transforms_base = {version = "0.12.0", path = "./base"} +swc_ecma_transforms_compat = {version = "0.13.0", path = "./compat", optional = true} +swc_ecma_transforms_module = {version = "0.13.0", path = "./module", optional = true} +swc_ecma_transforms_optimization = {version = "0.15.0", path = "./optimization", optional = true} +swc_ecma_transforms_proposal = {version = "0.13.0", path = "./proposal", optional = true} +swc_ecma_transforms_react = {version = "0.14.0", path = "./react", optional = true} +swc_ecma_transforms_typescript = {version = "0.14.0", path = "./typescript", optional = true} swc_ecma_utils = {version = "0.34.0", path = "../utils"} swc_ecma_visit = {version = "0.29.0", path = "../visit"} unicode-xid = "0.2" @@ -39,8 +39,8 @@ unicode-xid = "0.2" [dev-dependencies] pretty_assertions = "0.6" sourcemap = "6" -swc_ecma_codegen = {version = "0.51.0", path = "../codegen"} -swc_ecma_transforms_testing = {version = "0.11.0", path = "./testing"} +swc_ecma_codegen = {version = "0.52.0", path = "../codegen"} +swc_ecma_transforms_testing = {version = "0.12.0", path = "./testing"} tempfile = "3" testing = {version = "0.10.3", path = "../../testing"} walkdir = "2" diff --git a/ecmascript/transforms/base/Cargo.toml b/ecmascript/transforms/base/Cargo.toml index cfafc34b219..2d8c1889dc4 100644 --- a/ecmascript/transforms/base/Cargo.toml +++ b/ecmascript/transforms/base/Cargo.toml @@ -6,7 +6,7 @@ edition = "2018" license = "Apache-2.0/MIT" name = "swc_ecma_transforms_base" repository = "https://github.com/swc-project/swc.git" -version = "0.11.0" +version = "0.12.0" [dependencies] fxhash = "0.2.1" @@ -17,10 +17,10 @@ smallvec = "1.6.0" swc_atoms = {version = "0.2", path = "../../../atoms"} swc_common = {version = "0.10.10", path = "../../../common"} swc_ecma_ast = {version = "0.43.0", path = "../../ast"} -swc_ecma_parser = {version = "0.53.0", path = "../../parser"} +swc_ecma_parser = {version = "0.54.0", path = "../../parser"} swc_ecma_utils = {version = "0.34.0", path = "../../utils"} swc_ecma_visit = {version = "0.29.0", path = "../../visit"} [dev-dependencies] -swc_ecma_codegen = {version = "0.51.0", path = "../../codegen"} +swc_ecma_codegen = {version = "0.52.0", path = "../../codegen"} testing = {version = "0.10.3", path = "../../../testing"} diff --git a/ecmascript/transforms/compat/Cargo.toml b/ecmascript/transforms/compat/Cargo.toml index 4b273ee82ae..6038d416370 100644 --- a/ecmascript/transforms/compat/Cargo.toml +++ b/ecmascript/transforms/compat/Cargo.toml @@ -6,7 +6,7 @@ edition = "2018" license = "Apache-2.0/MIT" name = "swc_ecma_transforms_compat" repository = "https://github.com/swc-project/swc.git" -version = "0.12.0" +version = "0.13.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] @@ -21,12 +21,12 @@ smallvec = "1.6.0" swc_atoms = {version = "0.2.5", path = "../../../atoms"} swc_common = {version = "0.10.10", path = "../../../common"} swc_ecma_ast = {version = "0.43.0", path = "../../ast"} -swc_ecma_transforms_base = {version = "0.11.0", path = "../base"} +swc_ecma_transforms_base = {version = "0.12.0", path = "../base"} swc_ecma_transforms_macros = {version = "0.2.1", path = "../macros"} swc_ecma_utils = {version = "0.34.0", path = "../../utils"} swc_ecma_visit = {version = "0.29.0", path = "../../visit"} [dev-dependencies] -swc_ecma_parser = {version = "0.53.0", path = "../../parser"} -swc_ecma_transforms_testing = {version = "0.11.0", path = "../testing"} +swc_ecma_parser = {version = "0.54.0", path = "../../parser"} +swc_ecma_transforms_testing = {version = "0.12.0", path = "../testing"} testing = {version = "0.10.3", path = "../../../testing"} diff --git a/ecmascript/transforms/module/Cargo.toml b/ecmascript/transforms/module/Cargo.toml index b3a7ca7f22a..4f54beb5375 100644 --- a/ecmascript/transforms/module/Cargo.toml +++ b/ecmascript/transforms/module/Cargo.toml @@ -6,7 +6,7 @@ edition = "2018" license = "Apache-2.0/MIT" name = "swc_ecma_transforms_module" repository = "https://github.com/swc-project/swc.git" -version = "0.12.0" +version = "0.13.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] @@ -17,12 +17,12 @@ serde = {version = "1.0.118", features = ["derive"]} swc_atoms = {version = "0.2", path = "../../../atoms"} swc_common = {version = "0.10.10", path = "../../../common"} swc_ecma_ast = {version = "0.43.0", path = "../../ast"} -swc_ecma_parser = {version = "0.53.0", path = "../../parser"} -swc_ecma_transforms_base = {version = "0.11.0", path = "../base"} +swc_ecma_parser = {version = "0.54.0", path = "../../parser"} +swc_ecma_transforms_base = {version = "0.12.0", path = "../base"} swc_ecma_utils = {version = "0.34.0", path = "../../utils"} swc_ecma_visit = {version = "0.29.0", path = "../../visit"} [dev-dependencies] -swc_ecma_transforms_compat = {version = "0.12.0", path = "../compat"} -swc_ecma_transforms_testing = {version = "0.11.0", path = "../testing/"} +swc_ecma_transforms_compat = {version = "0.13.0", path = "../compat"} +swc_ecma_transforms_testing = {version = "0.12.0", path = "../testing/"} testing = {version = "0.10.3", path = "../../../testing/"} diff --git a/ecmascript/transforms/optimization/Cargo.toml b/ecmascript/transforms/optimization/Cargo.toml index 14974088121..8edb03ab575 100644 --- a/ecmascript/transforms/optimization/Cargo.toml +++ b/ecmascript/transforms/optimization/Cargo.toml @@ -6,7 +6,7 @@ edition = "2018" license = "Apache-2.0/MIT" name = "swc_ecma_transforms_optimization" repository = "https://github.com/swc-project/swc.git" -version = "0.14.0" +version = "0.15.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] @@ -20,16 +20,16 @@ serde_json = "1.0.61" swc_atoms = {version = "0.2", path = "../../../atoms"} swc_common = {version = "0.10.10", path = "../../../common"} swc_ecma_ast = {version = "0.43.0", path = "../../ast"} -swc_ecma_parser = {version = "0.53.0", path = "../../parser"} -swc_ecma_transforms_base = {version = "0.11.0", path = "../base"} +swc_ecma_parser = {version = "0.54.0", path = "../../parser"} +swc_ecma_transforms_base = {version = "0.12.0", path = "../base"} swc_ecma_utils = {version = "0.34.0", path = "../../utils"} swc_ecma_visit = {version = "0.29.0", path = "../../visit"} [dev-dependencies] -swc_ecma_transforms_compat = {version = "0.12.0", path = "../compat"} -swc_ecma_transforms_module = {version = "0.12.0", path = "../module"} -swc_ecma_transforms_proposal = {version = "0.12.0", path = "../proposal"} -swc_ecma_transforms_react = {version = "0.13.0", path = "../react"} -swc_ecma_transforms_testing = {version = "0.11.0", path = "../testing"} -swc_ecma_transforms_typescript = {version = "0.13.0", path = "../typescript"} +swc_ecma_transforms_compat = {version = "0.13.0", path = "../compat"} +swc_ecma_transforms_module = {version = "0.13.0", path = "../module"} +swc_ecma_transforms_proposal = {version = "0.13.0", path = "../proposal"} +swc_ecma_transforms_react = {version = "0.14.0", path = "../react"} +swc_ecma_transforms_testing = {version = "0.12.0", path = "../testing"} +swc_ecma_transforms_typescript = {version = "0.14.0", path = "../typescript"} testing = {version = "0.10.0", path = "../../../testing"} diff --git a/ecmascript/transforms/proposal/Cargo.toml b/ecmascript/transforms/proposal/Cargo.toml index ee9d9a9e869..5468942a2ab 100644 --- a/ecmascript/transforms/proposal/Cargo.toml +++ b/ecmascript/transforms/proposal/Cargo.toml @@ -6,7 +6,7 @@ edition = "2018" license = "Apache-2.0/MIT" name = "swc_ecma_transforms_proposal" repository = "https://github.com/swc-project/swc.git" -version = "0.12.0" +version = "0.13.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -23,12 +23,12 @@ swc_atoms = {version = "0.2", path = "../../../atoms"} swc_common = {version = "0.10.10", path = "../../../common"} swc_ecma_ast = {version = "0.43.0", path = "../../ast"} swc_ecma_loader = {version = "0.4.0", path = "../../loader", optional = true} -swc_ecma_parser = {version = "0.53.0", path = "../../parser"} -swc_ecma_transforms_base = {version = "0.11.0", path = "../base"} +swc_ecma_parser = {version = "0.54.0", path = "../../parser"} +swc_ecma_transforms_base = {version = "0.12.0", path = "../base"} swc_ecma_utils = {version = "0.34.0", path = "../../utils"} swc_ecma_visit = {version = "0.29.0", path = "../../visit"} [dev-dependencies] -swc_ecma_transforms_compat = {version = "0.12.0", path = "../compat"} -swc_ecma_transforms_module = {version = "0.12.0", path = "../module"} -swc_ecma_transforms_testing = {version = "0.11.0", path = "../testing"} +swc_ecma_transforms_compat = {version = "0.13.0", path = "../compat"} +swc_ecma_transforms_module = {version = "0.13.0", path = "../module"} +swc_ecma_transforms_testing = {version = "0.12.0", path = "../testing"} diff --git a/ecmascript/transforms/react/Cargo.toml b/ecmascript/transforms/react/Cargo.toml index 7b1cb18bdc3..211ef2a2dca 100644 --- a/ecmascript/transforms/react/Cargo.toml +++ b/ecmascript/transforms/react/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0/MIT" name = "swc_ecma_transforms_react" repository = "https://github.com/swc-project/swc.git" -version = "0.13.0" +version = "0.14.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] @@ -22,13 +22,13 @@ string_enum = {version = "0.3.1", path = "../../../macros/string_enum"} swc_atoms = {version = "0.2", path = "../../../atoms"} swc_common = {version = "0.10.10", path = "../../../common"} swc_ecma_ast = {version = "0.43.0", path = "../../ast"} -swc_ecma_parser = {version = "0.53.0", path = "../../parser"} -swc_ecma_transforms_base = {version = "0.11.0", path = "../base"} +swc_ecma_parser = {version = "0.54.0", path = "../../parser"} +swc_ecma_transforms_base = {version = "0.12.0", path = "../base"} swc_ecma_utils = {version = "0.34.0", path = "../../utils"} swc_ecma_visit = {version = "0.29.0", path = "../../visit"} [dev-dependencies] -swc_ecma_transforms_compat = {version = "0.12.0", path = "../compat/"} -swc_ecma_transforms_module = {version = "0.12.0", path = "../module"} -swc_ecma_transforms_testing = {version = "0.11.0", path = "../testing/"} +swc_ecma_transforms_compat = {version = "0.13.0", path = "../compat/"} +swc_ecma_transforms_module = {version = "0.13.0", path = "../module"} +swc_ecma_transforms_testing = {version = "0.12.0", path = "../testing/"} testing = {version = "0.10.3", path = "../../../testing"} diff --git a/ecmascript/transforms/testing/Cargo.toml b/ecmascript/transforms/testing/Cargo.toml index cea37e40ee5..44ffdb9b3f8 100644 --- a/ecmascript/transforms/testing/Cargo.toml +++ b/ecmascript/transforms/testing/Cargo.toml @@ -6,7 +6,7 @@ edition = "2018" license = "Apache-2.0/MIT" name = "swc_ecma_transforms_testing" repository = "https://github.com/swc-project/swc.git" -version = "0.11.0" +version = "0.12.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -16,9 +16,9 @@ serde = "1" serde_json = "1" swc_common = {version = "0.10.10", path = "../../../common"} swc_ecma_ast = {version = "0.43.0", path = "../../ast"} -swc_ecma_codegen = {version = "0.51.0", path = "../../codegen"} -swc_ecma_parser = {version = "0.53.0", path = "../../parser"} -swc_ecma_transforms_base = {version = "0.11.0", path = "../base"} +swc_ecma_codegen = {version = "0.52.0", path = "../../codegen"} +swc_ecma_parser = {version = "0.54.0", path = "../../parser"} +swc_ecma_transforms_base = {version = "0.12.0", path = "../base"} swc_ecma_utils = {version = "0.34.0", path = "../../utils"} swc_ecma_visit = {version = "0.29.0", path = "../../visit"} tempfile = "3.1.0" diff --git a/ecmascript/transforms/typescript/Cargo.toml b/ecmascript/transforms/typescript/Cargo.toml index 0f0c552ea19..e51dc02f2b3 100644 --- a/ecmascript/transforms/typescript/Cargo.toml +++ b/ecmascript/transforms/typescript/Cargo.toml @@ -6,7 +6,7 @@ edition = "2018" license = "Apache-2.0/MIT" name = "swc_ecma_transforms_typescript" repository = "https://github.com/swc-project/swc.git" -version = "0.13.0" +version = "0.14.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] @@ -15,16 +15,16 @@ serde = {version = "1.0.118", features = ["derive"]} swc_atoms = {version = "0.2", path = "../../../atoms"} swc_common = {version = "0.10.10", path = "../../../common"} swc_ecma_ast = {version = "0.43.0", path = "../../ast"} -swc_ecma_parser = {version = "0.53.0", path = "../../parser"} -swc_ecma_transforms_base = {version = "0.11.0", path = "../base"} +swc_ecma_parser = {version = "0.54.0", path = "../../parser"} +swc_ecma_transforms_base = {version = "0.12.0", path = "../base"} swc_ecma_utils = {version = "0.34.0", path = "../../utils"} swc_ecma_visit = {version = "0.29.0", path = "../../visit"} [dev-dependencies] -swc_ecma_codegen = {version = "0.51.0", path = "../../codegen"} -swc_ecma_transforms_compat = {version = "0.12.0", path = "../compat"} -swc_ecma_transforms_module = {version = "0.12.0", path = "../module"} -swc_ecma_transforms_proposal = {version = "0.12.0", path = "../proposal/"} -swc_ecma_transforms_testing = {version = "0.11.0", path = "../testing"} +swc_ecma_codegen = {version = "0.52.0", path = "../../codegen"} +swc_ecma_transforms_compat = {version = "0.13.0", path = "../compat"} +swc_ecma_transforms_module = {version = "0.13.0", path = "../module"} +swc_ecma_transforms_proposal = {version = "0.13.0", path = "../proposal/"} +swc_ecma_transforms_testing = {version = "0.12.0", path = "../testing"} testing = {version = "0.10.3", path = "../../../testing"} walkdir = "2.3.1"