From f1792708b46d9c434806a26ac19e1811d8b171a6 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Sun, 4 Apr 2021 07:12:02 -0400 Subject: [PATCH] fix(es/ast): Remove TsSignatureDecl (#1531) --- Cargo.toml | 18 ++++++------ bundler/Cargo.toml | 16 +++++------ ecmascript/Cargo.toml | 16 +++++------ ecmascript/ast/Cargo.toml | 2 +- ecmascript/ast/src/lib.rs | 9 +++--- ecmascript/ast/src/typescript.rs | 20 ------------- ecmascript/codegen/Cargo.toml | 6 ++-- ecmascript/codegen/src/typescript.rs | 23 --------------- ecmascript/dep-graph/Cargo.toml | 8 +++--- ecmascript/ext-transforms/Cargo.toml | 10 +++---- ecmascript/jsdoc/Cargo.toml | 6 ++-- ecmascript/loader/Cargo.toml | 6 ++-- ecmascript/parser/Cargo.toml | 6 ++-- ecmascript/parser/tests/span.rs | 4 --- ecmascript/preset_env/Cargo.toml | 14 +++++----- ecmascript/transforms/Cargo.toml | 28 +++++++++---------- ecmascript/transforms/base/Cargo.toml | 12 ++++---- .../transforms/base/src/resolver/mod.rs | 1 - ecmascript/transforms/compat/Cargo.toml | 14 +++++----- ecmascript/transforms/module/Cargo.toml | 16 +++++------ ecmascript/transforms/optimization/Cargo.toml | 24 ++++++++-------- ecmascript/transforms/proposal/Cargo.toml | 20 ++++++------- ecmascript/transforms/react/Cargo.toml | 18 ++++++------ ecmascript/transforms/testing/Cargo.toml | 14 +++++----- ecmascript/transforms/typescript/Cargo.toml | 22 +++++++-------- ecmascript/utils/Cargo.toml | 6 ++-- ecmascript/visit/Cargo.toml | 4 +-- ecmascript/visit/src/lib.rs | 10 ------- node-swc/src/types.ts | 7 ----- 29 files changed, 147 insertions(+), 213 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index b41b2af8cce..99aaa89b137 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ edition = "2018" license = "Apache-2.0/MIT" name = "swc" repository = "https://github.com/swc-project/swc.git" -version = "0.13.0" +version = "0.14.0" [lib] name = "swc" @@ -29,12 +29,12 @@ serde_json = "1" 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.42.0", path = "./ecmascript/ast"} -swc_ecma_codegen = {version = "0.50.0", path = "./ecmascript/codegen"} -swc_ecma_ext_transforms = {version = "0.10.0", path = "./ecmascript/ext-transforms"} -swc_ecma_parser = {version = "0.52.0", path = "./ecmascript/parser"} -swc_ecma_preset_env = {version = "0.13.0", path = "./ecmascript/preset_env"} -swc_ecma_transforms = {version = "0.43.0", path = "./ecmascript/transforms", features = [ +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 = [ "compat", "module", "optimization", @@ -42,8 +42,8 @@ swc_ecma_transforms = {version = "0.43.0", path = "./ecmascript/transforms", fea "react", "typescript", ]} -swc_ecma_utils = {version = "0.33.0", path = "./ecmascript/utils"} -swc_ecma_visit = {version = "0.28.0", path = "./ecmascript/visit"} +swc_ecma_utils = {version = "0.34.0", path = "./ecmascript/utils"} +swc_ecma_visit = {version = "0.29.0", path = "./ecmascript/visit"} swc_visit = {version = "0.2.3", path = "./visit"} [dev-dependencies] diff --git a/bundler/Cargo.toml b/bundler/Cargo.toml index 6da224f5e9b..61c4be7b37f 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.30.0" +version = "0.31.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [features] @@ -32,19 +32,19 @@ relative-path = "1.2" 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.42.0", path = "../ecmascript/ast"} -swc_ecma_codegen = {version = "0.50.0", path = "../ecmascript/codegen"} -swc_ecma_parser = {version = "0.52.0", path = "../ecmascript/parser"} -swc_ecma_transforms = {version = "0.43.0", path = "../ecmascript/transforms", features = ["optimization"]} -swc_ecma_utils = {version = "0.33.0", path = "../ecmascript/utils"} -swc_ecma_visit = {version = "0.28.0", path = "../ecmascript/visit"} +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_utils = {version = "0.34.0", path = "../ecmascript/utils"} +swc_ecma_visit = {version = "0.29.0", path = "../ecmascript/visit"} [dev-dependencies] hex = "0.4" ntest = "0.7.2" reqwest = {version = "0.10.8", features = ["blocking"]} sha-1 = "0.9" -swc_ecma_transforms = {version = "0.43.0", path = "../ecmascript/transforms", features = ["react", "typescript"]} +swc_ecma_transforms = {version = "0.44.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 51b6f1c8b2b..ac6c3907e61 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.29.1" +version = "0.30.0" [package.metadata.docs.rs] all-features = true @@ -27,12 +27,12 @@ react = ["swc_ecma_transforms/react"] typescript = ["swc_ecma_transforms/typescript"] [dependencies] -swc_ecma_ast = {version = "0.42.0", path = "./ast"} -swc_ecma_codegen = {version = "0.50.0", path = "./codegen", optional = true} -swc_ecma_dep_graph = {version = "0.20.0", path = "./dep-graph", optional = true} -swc_ecma_parser = {version = "0.52.1", path = "./parser", optional = true} -swc_ecma_transforms = {version = "0.43.0", path = "./transforms", optional = true} -swc_ecma_utils = {version = "0.33.0", path = "./utils", optional = true} -swc_ecma_visit = {version = "0.28.0", path = "./visit", optional = true} +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_utils = {version = "0.34.0", path = "./utils", optional = true} +swc_ecma_visit = {version = "0.29.0", path = "./visit", optional = true} [dev-dependencies] diff --git a/ecmascript/ast/Cargo.toml b/ecmascript/ast/Cargo.toml index 6f1b80b4041..d5fcbd718cd 100644 --- a/ecmascript/ast/Cargo.toml +++ b/ecmascript/ast/Cargo.toml @@ -6,7 +6,7 @@ edition = "2018" license = "Apache-2.0/MIT" name = "swc_ecma_ast" repository = "https://github.com/swc-project/swc.git" -version = "0.42.0" +version = "0.43.0" [features] default = [] diff --git a/ecmascript/ast/src/lib.rs b/ecmascript/ast/src/lib.rs index d6bc0d917f3..bd1687c3d5c 100644 --- a/ecmascript/ast/src/lib.rs +++ b/ecmascript/ast/src/lib.rs @@ -58,11 +58,10 @@ pub use self::{ TsModuleDecl, TsModuleName, TsModuleRef, TsNamespaceBody, TsNamespaceDecl, TsNamespaceExportDecl, TsNonNullExpr, TsOptionalType, TsParamProp, TsParamPropParam, TsParenthesizedType, TsPropertySignature, TsQualifiedName, TsRestType, TsSetterSignature, - TsSignatureDecl, TsThisType, TsThisTypeOrIdent, TsTplLitType, TsTupleElement, TsTupleType, - TsType, TsTypeAliasDecl, TsTypeAnn, TsTypeAssertion, TsTypeElement, TsTypeLit, - TsTypeOperator, TsTypeOperatorOp, TsTypeParam, TsTypeParamDecl, TsTypeParamInstantiation, - TsTypePredicate, TsTypeQuery, TsTypeQueryExpr, TsTypeRef, TsUnionOrIntersectionType, - TsUnionType, + TsThisType, TsThisTypeOrIdent, TsTplLitType, TsTupleElement, TsTupleType, TsType, + TsTypeAliasDecl, TsTypeAnn, TsTypeAssertion, TsTypeElement, TsTypeLit, TsTypeOperator, + TsTypeOperatorOp, TsTypeParam, TsTypeParamDecl, TsTypeParamInstantiation, TsTypePredicate, + TsTypeQuery, TsTypeQueryExpr, TsTypeRef, TsUnionOrIntersectionType, TsUnionType, }, }; use serde::Deserialize; diff --git a/ecmascript/ast/src/typescript.rs b/ecmascript/ast/src/typescript.rs index 31dc3d1c299..4bc1a9b08fd 100644 --- a/ecmascript/ast/src/typescript.rs +++ b/ecmascript/ast/src/typescript.rs @@ -107,26 +107,6 @@ pub enum TsEntityName { Ident(Ident), } -#[ast_node] -#[derive(Eq, Hash, Is, EqIgnoreSpan)] -#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] -pub enum TsSignatureDecl { - #[tag("TsCallSignatureDeclaration")] - TsCallSignatureDecl(TsCallSignatureDecl), - - #[tag("TsConstructSignatureDeclaration")] - TsConstructSignatureDecl(TsConstructSignatureDecl), - - #[tag("TsMethodSignature")] - TsMethodSignature(TsMethodSignature), - - #[tag("TsFunctionType")] - TsFnType(TsFnType), - - #[tag("TsConstructorType")] - TsConstructorType(TsConstructorType), -} - // ================ // TypeScript type members (for type literal / interface / class) // ================ diff --git a/ecmascript/codegen/Cargo.toml b/ecmascript/codegen/Cargo.toml index 713284b8358..9933cc2fd1d 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.50.3" +version = "0.51.0" [dependencies] bitflags = "1" @@ -15,9 +15,9 @@ num-bigint = {version = "0.2", features = ["serde"]} sourcemap = "6" swc_atoms = {version = "0.2", path = "../../atoms"} swc_common = {version = "0.10.10", path = "../../common"} -swc_ecma_ast = {version = "0.42.0", path = "../ast"} +swc_ecma_ast = {version = "0.43.0", path = "../ast"} swc_ecma_codegen_macros = {version = "0.5.2", path = "./macros"} -swc_ecma_parser = {version = "0.52.0", path = "../parser"} +swc_ecma_parser = {version = "0.53.0", path = "../parser"} [dev-dependencies] swc_common = {version = "0.10.10", path = "../../common", features = ["sourcemap"]} diff --git a/ecmascript/codegen/src/typescript.rs b/ecmascript/codegen/src/typescript.rs index c536bae7b4b..600b24d834f 100644 --- a/ecmascript/codegen/src/typescript.rs +++ b/ecmascript/codegen/src/typescript.rs @@ -697,29 +697,6 @@ impl<'a> Emitter<'a> { emit!(n.type_ann); } - #[emitter] - fn emit_ts_signature_decl(&mut self, n: &TsSignatureDecl) -> Result { - self.emit_leading_comments_of_pos(n.span().lo(), false)?; - - match n { - TsSignatureDecl::TsCallSignatureDecl(n) => { - emit!(n); - } - TsSignatureDecl::TsConstructSignatureDecl(n) => { - emit!(n); - } - TsSignatureDecl::TsMethodSignature(n) => { - emit!(n); - } - TsSignatureDecl::TsFnType(n) => { - emit!(n); - } - TsSignatureDecl::TsConstructorType(n) => { - emit!(n); - } - } - } - #[emitter] fn emit_ts_this_type(&mut self, n: &TsThisType) -> Result { self.emit_leading_comments_of_pos(n.span().lo(), false)?; diff --git a/ecmascript/dep-graph/Cargo.toml b/ecmascript/dep-graph/Cargo.toml index 2861f8b97c1..bf1f9a091dc 100644 --- a/ecmascript/dep-graph/Cargo.toml +++ b/ecmascript/dep-graph/Cargo.toml @@ -6,14 +6,14 @@ edition = "2018" license = "Apache-2.0/MIT" name = "swc_ecma_dep_graph" repository = "https://github.com/swc-project/swc.git" -version = "0.20.0" +version = "0.21.0" [dependencies] swc_atoms = {version = "0.2", path = "../../atoms"} swc_common = {version = "0.10.10", path = "../../common"} -swc_ecma_ast = {version = "0.42.0", path = "../ast"} -swc_ecma_visit = {version = "0.28.0", path = "../visit"} +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.52.0", path = "../parser"} +swc_ecma_parser = {version = "0.53.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 717715cf8ca..9f7b90b7962 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.10.0" +version = "0.11.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -13,7 +13,7 @@ version = "0.10.0" 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.42.0", path = "../ast"} -swc_ecma_parser = {version = "0.52.0", path = "../parser"} -swc_ecma_utils = {version = "0.33.0", path = "../utils"} -swc_ecma_visit = {version = "0.28.0", path = "../visit"} +swc_ecma_ast = {version = "0.43.0", path = "../ast"} +swc_ecma_parser = {version = "0.53.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 ed7bff7f317..c7ee70b9a98 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.20.0" +version = "0.21.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -18,7 +18,7 @@ swc_common = {version = "0.10.10", path = "../../common"} [dev-dependencies] anyhow = "1" dashmap = "3" -swc_ecma_ast = {version = "0.42.0", path = "../ast"} -swc_ecma_parser = {version = "0.52.0", path = "../parser"} +swc_ecma_ast = {version = "0.43.0", path = "../ast"} +swc_ecma_parser = {version = "0.53.0", path = "../parser"} testing = {version = "0.10.3", path = "../../testing"} walkdir = "2" diff --git a/ecmascript/loader/Cargo.toml b/ecmascript/loader/Cargo.toml index 11fe0680c5e..57bc0e44e31 100644 --- a/ecmascript/loader/Cargo.toml +++ b/ecmascript/loader/Cargo.toml @@ -6,15 +6,15 @@ edition = "2018" license = "Apache-2.0/MIT" name = "swc_ecma_loader" repository = "https://github.com/swc-project/swc.git" -version = "0.3.0" +version = "0.4.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] swc_atoms = {version = "0.2.3", path = "../../atoms"} swc_common = {version = "0.10.10", path = "../../common"} -swc_ecma_ast = {version = "0.42.0", path = "../ast"} -swc_ecma_visit = {version = "0.28.0", path = "../visit"} +swc_ecma_ast = {version = "0.43.0", path = "../ast"} +swc_ecma_visit = {version = "0.29.0", path = "../visit"} [dev-dependencies] testing = {version = "0.10.3", path = "../../testing"} diff --git a/ecmascript/parser/Cargo.toml b/ecmascript/parser/Cargo.toml index a0afd453d30..dd4d1269bc0 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.52.2" +version = "0.53.0" [features] default = [] @@ -22,8 +22,8 @@ serde = {version = "1", features = ["derive"]} smallvec = "1" swc_atoms = {version = "0.2.3", path = "../../atoms"} swc_common = {version = "0.10.10", path = "../../common"} -swc_ecma_ast = {version = "0.42.0", path = "../ast"} -swc_ecma_visit = {version = "0.28.0", path = "../visit"} +swc_ecma_ast = {version = "0.43.0", path = "../ast"} +swc_ecma_visit = {version = "0.29.0", path = "../visit"} unicode-xid = "0.2" [dev-dependencies] diff --git a/ecmascript/parser/tests/span.rs b/ecmascript/parser/tests/span.rs index 6b324b11ba9..1873a9c6896 100644 --- a/ecmascript/parser/tests/span.rs +++ b/ecmascript/parser/tests/span.rs @@ -821,10 +821,6 @@ impl Visit for Shower<'_> { self.show("TsRestType", n); n.visit_children_with(self) } - fn visit_ts_signature_decl(&mut self, n: &TsSignatureDecl, _parent: &dyn Node) { - self.show("TsSignatureDecl", n); - n.visit_children_with(self) - } fn visit_ts_this_type(&mut self, n: &TsThisType, _parent: &dyn Node) { self.show("TsThisType", n); n.visit_children_with(self) diff --git a/ecmascript/preset_env/Cargo.toml b/ecmascript/preset_env/Cargo.toml index 192e1ffede3..313d44e3ecb 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.13.0" +version = "0.14.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -20,14 +20,14 @@ st-map = "0.1.2" 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.42.0", path = "../ast"} -swc_ecma_transforms = {version = "0.43.0", path = "../transforms", features = ["compat", "proposal"]} -swc_ecma_utils = {version = "0.33.0", path = "../utils"} -swc_ecma_visit = {version = "0.28.0", path = "../visit"} +swc_ecma_ast = {version = "0.43.0", path = "../ast"} +swc_ecma_transforms = {version = "0.44.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.50.0", path = "../codegen"} -swc_ecma_parser = {version = "0.52.0", path = "../parser"} +swc_ecma_codegen = {version = "0.51.0", path = "../codegen"} +swc_ecma_parser = {version = "0.53.0", path = "../parser"} testing = {version = "0.10.3", path = "../../testing"} diff --git a/ecmascript/transforms/Cargo.toml b/ecmascript/transforms/Cargo.toml index b02e5519364..e86cd624580 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.43.0" +version = "0.44.0" [package.metadata.docs.rs] all-features = true @@ -23,24 +23,24 @@ typescript = ["swc_ecma_transforms_typescript"] [dependencies] swc_atoms = {version = "0.2.0", path = "../../atoms"} swc_common = {version = "0.10.10", path = "../../common"} -swc_ecma_ast = {version = "0.42.0", path = "../ast"} -swc_ecma_parser = {version = "0.52.0", path = "../parser"} -swc_ecma_transforms_base = {version = "0.10.0", path = "./base"} -swc_ecma_transforms_compat = {version = "0.11.0", path = "./compat", optional = true} -swc_ecma_transforms_module = {version = "0.11.0", path = "./module", optional = true} -swc_ecma_transforms_optimization = {version = "0.13.0", path = "./optimization", optional = true} -swc_ecma_transforms_proposal = {version = "0.11.0", path = "./proposal", optional = true} -swc_ecma_transforms_react = {version = "0.12.0", path = "./react", optional = true} -swc_ecma_transforms_typescript = {version = "0.12.0", path = "./typescript", optional = true} -swc_ecma_utils = {version = "0.33.0", path = "../utils"} -swc_ecma_visit = {version = "0.28.0", path = "../visit"} +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_utils = {version = "0.34.0", path = "../utils"} +swc_ecma_visit = {version = "0.29.0", path = "../visit"} unicode-xid = "0.2" [dev-dependencies] pretty_assertions = "0.6" sourcemap = "6" -swc_ecma_codegen = {version = "0.50.0", path = "../codegen"} -swc_ecma_transforms_testing = {version = "0.10.0", path = "./testing"} +swc_ecma_codegen = {version = "0.51.0", path = "../codegen"} +swc_ecma_transforms_testing = {version = "0.11.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 eee28ee2698..cfafc34b219 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.10.1" +version = "0.11.0" [dependencies] fxhash = "0.2.1" @@ -16,11 +16,11 @@ scoped-tls = "1.0.0" smallvec = "1.6.0" swc_atoms = {version = "0.2", path = "../../../atoms"} swc_common = {version = "0.10.10", path = "../../../common"} -swc_ecma_ast = {version = "0.42.0", path = "../../ast"} -swc_ecma_parser = {version = "0.52.0", path = "../../parser"} -swc_ecma_utils = {version = "0.33.0", path = "../../utils"} -swc_ecma_visit = {version = "0.28.0", path = "../../visit"} +swc_ecma_ast = {version = "0.43.0", path = "../../ast"} +swc_ecma_parser = {version = "0.53.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.50.0", path = "../../codegen"} +swc_ecma_codegen = {version = "0.51.0", path = "../../codegen"} testing = {version = "0.10.3", path = "../../../testing"} diff --git a/ecmascript/transforms/base/src/resolver/mod.rs b/ecmascript/transforms/base/src/resolver/mod.rs index 10d8b6cb935..d5efba99b6d 100644 --- a/ecmascript/transforms/base/src/resolver/mod.rs +++ b/ecmascript/transforms/base/src/resolver/mod.rs @@ -421,7 +421,6 @@ impl<'a> VisitMut for Resolver<'a> { typed!(visit_mut_ts_parenthesized_type, TsParenthesizedType); typed!(visit_mut_ts_type_lit, TsTypeLit); typed!(visit_mut_ts_type_element, TsTypeElement); - typed!(visit_mut_ts_signature_decl, TsSignatureDecl); typed!(visit_mut_ts_module_block, TsModuleBlock); typed!(visit_mut_ts_namespace_body, TsNamespaceBody); typed!(visit_mut_ts_optional_type, TsOptionalType); diff --git a/ecmascript/transforms/compat/Cargo.toml b/ecmascript/transforms/compat/Cargo.toml index 7133f127f0d..4b273ee82ae 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.11.0" +version = "0.12.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] @@ -20,13 +20,13 @@ serde = {version = "1.0.118", features = ["derive"]} 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.42.0", path = "../../ast"} -swc_ecma_transforms_base = {version = "0.10.0", path = "../base"} +swc_ecma_ast = {version = "0.43.0", path = "../../ast"} +swc_ecma_transforms_base = {version = "0.11.0", path = "../base"} swc_ecma_transforms_macros = {version = "0.2.1", path = "../macros"} -swc_ecma_utils = {version = "0.33.0", path = "../../utils"} -swc_ecma_visit = {version = "0.28.0", path = "../../visit"} +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.52.0", path = "../../parser"} -swc_ecma_transforms_testing = {version = "0.10.0", path = "../testing"} +swc_ecma_parser = {version = "0.53.0", path = "../../parser"} +swc_ecma_transforms_testing = {version = "0.11.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 325ec18d958..b3a7ca7f22a 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.11.0" +version = "0.12.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] @@ -16,13 +16,13 @@ indexmap = "1.6.1" 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.42.0", path = "../../ast"} -swc_ecma_parser = {version = "0.52.0", path = "../../parser"} -swc_ecma_transforms_base = {version = "0.10.0", path = "../base"} -swc_ecma_utils = {version = "0.33.0", path = "../../utils"} -swc_ecma_visit = {version = "0.28.0", path = "../../visit"} +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_utils = {version = "0.34.0", path = "../../utils"} +swc_ecma_visit = {version = "0.29.0", path = "../../visit"} [dev-dependencies] -swc_ecma_transforms_compat = {version = "0.11.0", path = "../compat"} -swc_ecma_transforms_testing = {version = "0.10.0", path = "../testing/"} +swc_ecma_transforms_compat = {version = "0.12.0", path = "../compat"} +swc_ecma_transforms_testing = {version = "0.11.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 c7d0a89c1c8..14974088121 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.13.0" +version = "0.14.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] @@ -19,17 +19,17 @@ retain_mut = "0.1.2" 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.42.0", path = "../../ast"} -swc_ecma_parser = {version = "0.52.0", path = "../../parser"} -swc_ecma_transforms_base = {version = "0.10.0", path = "../base"} -swc_ecma_utils = {version = "0.33.0", path = "../../utils"} -swc_ecma_visit = {version = "0.28.0", path = "../../visit"} +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_utils = {version = "0.34.0", path = "../../utils"} +swc_ecma_visit = {version = "0.29.0", path = "../../visit"} [dev-dependencies] -swc_ecma_transforms_compat = {version = "0.11.0", path = "../compat"} -swc_ecma_transforms_module = {version = "0.11.0", path = "../module"} -swc_ecma_transforms_proposal = {version = "0.11.0", path = "../proposal"} -swc_ecma_transforms_react = {version = "0.12.0", path = "../react"} -swc_ecma_transforms_testing = {version = "0.10.0", path = "../testing"} -swc_ecma_transforms_typescript = {version = "0.12.0", path = "../typescript"} +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"} testing = {version = "0.10.0", path = "../../../testing"} diff --git a/ecmascript/transforms/proposal/Cargo.toml b/ecmascript/transforms/proposal/Cargo.toml index 19002f47ec1..ee9d9a9e869 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.11.0" +version = "0.12.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -21,14 +21,14 @@ serde = {version = "1.0.118", features = ["derive"]} smallvec = "1.6.0" swc_atoms = {version = "0.2", path = "../../../atoms"} swc_common = {version = "0.10.10", path = "../../../common"} -swc_ecma_ast = {version = "0.42.0", path = "../../ast"} -swc_ecma_loader = {version = "0.3.0", path = "../../loader", optional = true} -swc_ecma_parser = {version = "0.52.0", path = "../../parser"} -swc_ecma_transforms_base = {version = "0.10.0", path = "../base"} -swc_ecma_utils = {version = "0.33.0", path = "../../utils"} -swc_ecma_visit = {version = "0.28.0", path = "../../visit"} +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_utils = {version = "0.34.0", path = "../../utils"} +swc_ecma_visit = {version = "0.29.0", path = "../../visit"} [dev-dependencies] -swc_ecma_transforms_compat = {version = "0.11.0", path = "../compat"} -swc_ecma_transforms_module = {version = "0.11.0", path = "../module"} -swc_ecma_transforms_testing = {version = "0.10.0", path = "../testing"} +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"} diff --git a/ecmascript/transforms/react/Cargo.toml b/ecmascript/transforms/react/Cargo.toml index 85fe5cf2633..7b1cb18bdc3 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.12.1" +version = "0.13.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] @@ -21,14 +21,14 @@ sha-1 = "0.9.4" 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.42.0", path = "../../ast"} -swc_ecma_parser = {version = "0.52.0", path = "../../parser"} -swc_ecma_transforms_base = {version = "0.10.0", path = "../base"} -swc_ecma_utils = {version = "0.33.0", path = "../../utils"} -swc_ecma_visit = {version = "0.28.0", path = "../../visit"} +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_utils = {version = "0.34.0", path = "../../utils"} +swc_ecma_visit = {version = "0.29.0", path = "../../visit"} [dev-dependencies] -swc_ecma_transforms_compat = {version = "0.11.0", path = "../compat/"} -swc_ecma_transforms_module = {version = "0.11.0", path = "../module"} -swc_ecma_transforms_testing = {version = "0.10.0", path = "../testing/"} +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/"} testing = {version = "0.10.3", path = "../../../testing"} diff --git a/ecmascript/transforms/testing/Cargo.toml b/ecmascript/transforms/testing/Cargo.toml index 525fa923fc9..cea37e40ee5 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.10.0" +version = "0.11.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -15,11 +15,11 @@ ansi_term = "0.12.1" serde = "1" serde_json = "1" swc_common = {version = "0.10.10", path = "../../../common"} -swc_ecma_ast = {version = "0.42.0", path = "../../ast"} -swc_ecma_codegen = {version = "0.50.0", path = "../../codegen"} -swc_ecma_parser = {version = "0.52.0", path = "../../parser"} -swc_ecma_transforms_base = {version = "0.10.0", path = "../base"} -swc_ecma_utils = {version = "0.33.0", path = "../../utils"} -swc_ecma_visit = {version = "0.28.0", path = "../../visit"} +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_utils = {version = "0.34.0", path = "../../utils"} +swc_ecma_visit = {version = "0.29.0", path = "../../visit"} tempfile = "3.1.0" testing = {version = "0.10.3", path = "../../../testing"} diff --git a/ecmascript/transforms/typescript/Cargo.toml b/ecmascript/transforms/typescript/Cargo.toml index 1bf95ff9009..0f0c552ea19 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.12.1" +version = "0.13.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] @@ -14,17 +14,17 @@ fxhash = "0.2.1" 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.42.0", path = "../../ast"} -swc_ecma_parser = {version = "0.52.0", path = "../../parser"} -swc_ecma_transforms_base = {version = "0.10.0", path = "../base"} -swc_ecma_utils = {version = "0.33.0", path = "../../utils"} -swc_ecma_visit = {version = "0.28.0", path = "../../visit"} +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_utils = {version = "0.34.0", path = "../../utils"} +swc_ecma_visit = {version = "0.29.0", path = "../../visit"} [dev-dependencies] -swc_ecma_codegen = {version = "0.50.0", path = "../../codegen"} -swc_ecma_transforms_compat = {version = "0.11.0", path = "../compat"} -swc_ecma_transforms_module = {version = "0.11.0", path = "../module"} -swc_ecma_transforms_proposal = {version = "0.11.0", path = "../proposal/"} -swc_ecma_transforms_testing = {version = "0.10.0", path = "../testing"} +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"} testing = {version = "0.10.3", path = "../../../testing"} walkdir = "2.3.1" diff --git a/ecmascript/utils/Cargo.toml b/ecmascript/utils/Cargo.toml index d46b6cbc0c2..5e21e461dab 100644 --- a/ecmascript/utils/Cargo.toml +++ b/ecmascript/utils/Cargo.toml @@ -6,7 +6,7 @@ edition = "2018" license = "Apache-2.0/MIT" name = "swc_ecma_utils" repository = "https://github.com/swc-project/swc.git" -version = "0.33.0" +version = "0.34.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -15,8 +15,8 @@ once_cell = "1" scoped-tls = "1" swc_atoms = {version = "0.2.0", path = "../../atoms"} swc_common = {version = "0.10.10", path = "../../common"} -swc_ecma_ast = {version = "0.42.0", path = "../ast"} -swc_ecma_visit = {version = "0.28.0", path = "../visit"} +swc_ecma_ast = {version = "0.43.0", path = "../ast"} +swc_ecma_visit = {version = "0.29.0", path = "../visit"} unicode-xid = "0.2" [dev-dependencies] diff --git a/ecmascript/visit/Cargo.toml b/ecmascript/visit/Cargo.toml index a52be120927..be740fa0b3d 100644 --- a/ecmascript/visit/Cargo.toml +++ b/ecmascript/visit/Cargo.toml @@ -6,11 +6,11 @@ edition = "2018" license = "Apache-2.0/MIT" name = "swc_ecma_visit" repository = "https://github.com/swc-project/swc.git" -version = "0.28.0" +version = "0.29.0" [dependencies] num-bigint = {version = "0.2", features = ["serde"]} swc_atoms = {version = "0.2", path = "../../atoms"} swc_common = {version = "0.10.10", path = "../../common"} -swc_ecma_ast = {version = "0.42.0", path = "../ast"} +swc_ecma_ast = {version = "0.43.0", path = "../ast"} swc_visit = {version = "0.2.3", path = "../../visit"} diff --git a/ecmascript/visit/src/lib.rs b/ecmascript/visit/src/lib.rs index 13614cf8a2b..52e51131491 100644 --- a/ecmascript/visit/src/lib.rs +++ b/ecmascript/visit/src/lib.rs @@ -229,7 +229,6 @@ macro_rules! noop_fold_type { noop_fold_type!(fold_ts_property_signature, TsPropertySignature); noop_fold_type!(fold_ts_qualified_name, TsQualifiedName); noop_fold_type!(fold_ts_rest_type, TsRestType); - noop_fold_type!(fold_ts_signature_decl, TsSignatureDecl); noop_fold_type!(fold_ts_this_type, TsThisType); noop_fold_type!(fold_ts_this_type_or_ident, TsThisTypeOrIdent); noop_fold_type!(fold_ts_tuple_type, TsTupleType); @@ -305,7 +304,6 @@ macro_rules! noop_visit_type { noop_visit_type!(visit_ts_property_signature, TsPropertySignature); noop_visit_type!(visit_ts_qualified_name, TsQualifiedName); noop_visit_type!(visit_ts_rest_type, TsRestType); - noop_visit_type!(visit_ts_signature_decl, TsSignatureDecl); noop_visit_type!(visit_ts_this_type, TsThisType); noop_visit_type!(visit_ts_this_type_or_ident, TsThisTypeOrIdent); noop_visit_type!(visit_ts_tuple_type, TsTupleType); @@ -384,7 +382,6 @@ macro_rules! noop_visit_mut_type { noop_visit_mut_type!(visit_mut_ts_property_signature, TsPropertySignature); noop_visit_mut_type!(visit_mut_ts_qualified_name, TsQualifiedName); noop_visit_mut_type!(visit_mut_ts_rest_type, TsRestType); - noop_visit_mut_type!(visit_mut_ts_signature_decl, TsSignatureDecl); noop_visit_mut_type!(visit_mut_ts_this_type, TsThisType); noop_visit_mut_type!(visit_mut_ts_this_type_or_ident, TsThisTypeOrIdent); noop_visit_mut_type!(visit_mut_ts_tuple_type, TsTupleType); @@ -1298,13 +1295,6 @@ define!({ TsQualifiedName(Box), Ident(Ident), } - pub enum TsSignatureDecl { - TsCallSignatureDecl(TsCallSignatureDecl), - TsConstructSignatureDecl(TsConstructSignatureDecl), - TsMethodSignature(TsMethodSignature), - TsFnType(TsFnType), - TsConstructorType(TsConstructorType), - } pub enum TsTypeElement { TsCallSignatureDecl(TsCallSignatureDecl), TsConstructSignatureDecl(TsConstructSignatureDecl), diff --git a/node-swc/src/types.ts b/node-swc/src/types.ts index dfd1e90d1c1..0850f7334a5 100644 --- a/node-swc/src/types.ts +++ b/node-swc/src/types.ts @@ -1709,13 +1709,6 @@ export interface TsQualifiedName extends Node { export type TsEntityName = TsQualifiedName | Identifier; -export type TsSignatureDeclaration = - | TsCallSignatureDeclaration - | TsConstructSignatureDeclaration - | TsMethodSignature - | TsFunctionType - | TsConstructorType; - export type TsTypeElement = | TsCallSignatureDeclaration | TsConstructSignatureDeclaration