diff --git a/CHANGELOG.md b/CHANGELOG.md index 26b84c744c72..06e2c76985a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ +- **(es/minifier)** Don't drop assignments to unused top-level variables (#7581) ([a685c88](https://github.com/swc-project/swc/commit/a685c88c61248e5bff98fb339a71b40b8fd4e528)) + + - **(es/parser)** Adjust context while parsing type arguments of TypeScript type queries (#7582) ([9d5dda1](https://github.com/swc-project/swc/commit/9d5dda12991dac031064b139eb61d2d03dcd8571)) diff --git a/Cargo.lock b/Cargo.lock index 8c9b5bb3780c..62d9f0a4d176 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -235,7 +235,7 @@ dependencies = [ [[package]] name = "binding_macros" -version = "0.52.25" +version = "0.52.26" dependencies = [ "anyhow", "console_error_panic_hook", @@ -964,7 +964,7 @@ checksum = "23d8666cb01533c39dde32bcbab8e227b4ed6679b2c925eba05feabea39508fb" [[package]] name = "dbg-swc" -version = "0.83.30" +version = "0.83.31" dependencies = [ "anyhow", "clap 3.1.0", @@ -3525,7 +3525,7 @@ dependencies = [ [[package]] name = "swc" -version = "0.263.25" +version = "0.263.26" dependencies = [ "ahash 0.8.3", "ansi_term", @@ -3596,7 +3596,7 @@ dependencies = [ [[package]] name = "swc_bundler" -version = "0.216.22" +version = "0.216.23" dependencies = [ "ahash 0.8.3", "anyhow", @@ -3709,7 +3709,7 @@ dependencies = [ [[package]] name = "swc_core" -version = "0.78.25" +version = "0.78.26" dependencies = [ "anyhow", "binding_macros", @@ -4068,7 +4068,7 @@ dependencies = [ [[package]] name = "swc_ecma_minifier" -version = "0.183.22" +version = "0.183.23" dependencies = [ "ahash 0.8.3", "ansi_term", @@ -4465,7 +4465,7 @@ dependencies = [ [[package]] name = "swc_ecma_usage_analyzer" -version = "0.15.12" +version = "0.15.13" dependencies = [ "ahash 0.8.3", "indexmap", @@ -4513,7 +4513,7 @@ dependencies = [ [[package]] name = "swc_ecmascript" -version = "0.230.23" +version = "0.230.24" dependencies = [ "swc_ecma_ast", "swc_ecma_codegen", @@ -4561,7 +4561,7 @@ dependencies = [ [[package]] name = "swc_estree_compat" -version = "0.186.26" +version = "0.186.27" dependencies = [ "ahash 0.8.3", "anyhow", @@ -4609,7 +4609,7 @@ dependencies = [ [[package]] name = "swc_html" -version = "0.126.22" +version = "0.126.23" dependencies = [ "swc_html_ast", "swc_html_codegen", @@ -4660,7 +4660,7 @@ dependencies = [ [[package]] name = "swc_html_minifier" -version = "0.123.22" +version = "0.123.23" dependencies = [ "criterion", "once_cell", @@ -4746,7 +4746,7 @@ dependencies = [ [[package]] name = "swc_node_bundler" -version = "0.50.25" +version = "0.50.26" dependencies = [ "anyhow", "dashmap", diff --git a/crates/binding_macros/Cargo.toml b/crates/binding_macros/Cargo.toml index 99fcf3834418..a8cdf33529b4 100644 --- a/crates/binding_macros/Cargo.toml +++ b/crates/binding_macros/Cargo.toml @@ -5,7 +5,7 @@ edition = "2021" license = "Apache-2.0" name = "binding_macros" repository = "https://github.com/swc-project/swc.git" -version = "0.52.25" +version = "0.52.26" [lib] bench = false @@ -33,7 +33,7 @@ binding_wasm = [ [dependencies] # Common deps for the SWC imports -swc = { optional = true, version = "0.263.25", path = "../swc" } +swc = { optional = true, version = "0.263.26", path = "../swc" } swc_common = { optional = true, version = "0.31.16", path = "../swc_common" } swc_ecma_ast = { optional = true, version = "0.106.6", path = "../swc_ecma_ast" } swc_ecma_transforms = { optional = true, version = "0.220.19", path = "../swc_ecma_transforms" } diff --git a/crates/dbg-swc/Cargo.toml b/crates/dbg-swc/Cargo.toml index acaa6f5875ec..f3c9e2c5f1db 100644 --- a/crates/dbg-swc/Cargo.toml +++ b/crates/dbg-swc/Cargo.toml @@ -5,7 +5,7 @@ edition = "2021" license = "Apache-2.0" name = "dbg-swc" repository = "https://github.com/kdy1/dbg-swc.git" -version = "0.83.30" +version = "0.83.31" [[bin]] bench = false @@ -32,7 +32,7 @@ swc_common = { version = "0.31.16", features = [ ], path = "../swc_common" } swc_ecma_ast = { version = "0.106.6", path = "../swc_ecma_ast" } swc_ecma_codegen = { version = "0.141.11", path = "../swc_ecma_codegen" } -swc_ecma_minifier = { version = "0.183.22", path = "../swc_ecma_minifier", features = [ +swc_ecma_minifier = { version = "0.183.23", path = "../swc_ecma_minifier", features = [ "concurrent", ] } swc_ecma_parser = { version = "0.136.8", path = "../swc_ecma_parser" } diff --git a/crates/swc/Cargo.toml b/crates/swc/Cargo.toml index 4dc1cac9f6b6..49ea032a2b43 100644 --- a/crates/swc/Cargo.toml +++ b/crates/swc/Cargo.toml @@ -9,7 +9,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc" repository = "https://github.com/swc-project/swc.git" -version = "0.263.25" +version = "0.263.26" [lib] bench = false @@ -83,7 +83,7 @@ swc_ecma_loader = { version = "0.43.18", path = "../swc_ecma_loader", features = "node", "tsc", ] } -swc_ecma_minifier = { version = "0.183.22", path = "../swc_ecma_minifier" } +swc_ecma_minifier = { version = "0.183.23", path = "../swc_ecma_minifier" } swc_ecma_parser = { version = "0.136.8", path = "../swc_ecma_parser" } swc_ecma_preset_env = { version = "0.197.20", path = "../swc_ecma_preset_env" } swc_ecma_transforms = { version = "0.220.19", path = "../swc_ecma_transforms", features = [ diff --git a/crates/swc_bundler/Cargo.toml b/crates/swc_bundler/Cargo.toml index 345f12d02918..ed59f6afeb1a 100644 --- a/crates/swc_bundler/Cargo.toml +++ b/crates/swc_bundler/Cargo.toml @@ -9,7 +9,7 @@ include = ["Cargo.toml", "build.rs", "src/**/*.rs", "src/**/*.js"] license = "Apache-2.0" name = "swc_bundler" repository = "https://github.com/swc-project/swc.git" -version = "0.216.22" +version = "0.216.23" [package.metadata.docs.rs] all-features = true @@ -64,7 +64,7 @@ swc_ecma_loader = { version = "0.43.18", path = "../swc_ecma_loader", features = "node", "cache", ] } -swc_ecma_minifier = { version = "0.183.22", path = "../swc_ecma_minifier", features = [ +swc_ecma_minifier = { version = "0.183.23", path = "../swc_ecma_minifier", features = [ "concurrent", ] } swc_ecma_transforms_proposal = { version = "0.163.17", path = "../swc_ecma_transforms_proposal" } diff --git a/crates/swc_core/Cargo.toml b/crates/swc_core/Cargo.toml index d9ae20541793..3b54c20f46e9 100644 --- a/crates/swc_core/Cargo.toml +++ b/crates/swc_core/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_core" repository = "https://github.com/swc-project/swc.git" -version = "0.78.25" +version = "0.78.26" [package.metadata.docs.rs] features = [ "common_perf", @@ -325,10 +325,10 @@ __visit = ["__ecma", "swc_ecma_visit"] once_cell = { optional = true, version = "1.18.0" } # swc_* dependencies -binding_macros = { optional = true, version = "0.52.25", path = "../binding_macros" } -swc = { optional = true, version = "0.263.25", path = "../swc" } +binding_macros = { optional = true, version = "0.52.26", path = "../binding_macros" } +swc = { optional = true, version = "0.263.26", path = "../swc" } swc_atoms = { optional = true, version = "0.5.6", path = "../swc_atoms" } -swc_bundler = { optional = true, version = "0.216.22", path = "../swc_bundler" } +swc_bundler = { optional = true, version = "0.216.23", path = "../swc_bundler" } swc_cached = { optional = true, version = "0.3.17", path = "../swc_cached" } swc_common = { optional = true, version = "0.31.16", path = "../swc_common" } swc_css_ast = { optional = true, version = "0.137.16", path = "../swc_css_ast" } @@ -343,7 +343,7 @@ swc_css_visit = { optional = true, version = "0.136.16", path swc_ecma_ast = { optional = true, version = "0.106.6", path = "../swc_ecma_ast" } swc_ecma_codegen = { optional = true, version = "0.141.11", path = "../swc_ecma_codegen" } swc_ecma_loader = { optional = true, version = "0.43.18", path = "../swc_ecma_loader" } -swc_ecma_minifier = { optional = true, version = "0.183.22", path = "../swc_ecma_minifier" } +swc_ecma_minifier = { optional = true, version = "0.183.23", path = "../swc_ecma_minifier" } swc_ecma_parser = { optional = true, version = "0.136.8", path = "../swc_ecma_parser" } swc_ecma_preset_env = { optional = true, version = "0.197.20", path = "../swc_ecma_preset_env" } swc_ecma_quote_macros = { optional = true, version = "0.47.8", path = "../swc_ecma_quote_macros" } @@ -355,11 +355,11 @@ swc_ecma_transforms_proposal = { optional = true, version = "0.163.17", path swc_ecma_transforms_react = { optional = true, version = "0.175.18", path = "../swc_ecma_transforms_react" } swc_ecma_transforms_testing = { optional = true, version = "0.132.14", path = "../swc_ecma_transforms_testing" } swc_ecma_transforms_typescript = { optional = true, version = "0.179.19", path = "../swc_ecma_transforms_typescript" } -swc_ecma_usage_analyzer = { optional = true, version = "0.15.12", path = "../swc_ecma_usage_analyzer" } +swc_ecma_usage_analyzer = { optional = true, version = "0.15.13", path = "../swc_ecma_usage_analyzer" } swc_ecma_utils = { optional = true, version = "0.119.10", path = "../swc_ecma_utils" } swc_ecma_visit = { optional = true, version = "0.92.5", path = "../swc_ecma_visit" } swc_node_base = { optional = true, version = "0.5.8", path = "../swc_node_base" } -swc_node_bundler = { optional = true, version = "0.50.25", path = "../swc_node_bundler" } +swc_node_bundler = { optional = true, version = "0.50.26", path = "../swc_node_bundler" } swc_nodejs_common = { optional = true, version = "0.0.8", path = "../swc_nodejs_common" } swc_plugin = { optional = true, version = "0.90.0", path = "../swc_plugin" } swc_plugin_macro = { optional = true, version = "0.9.15", path = "../swc_plugin_macro" } diff --git a/crates/swc_ecma_minifier/Cargo.toml b/crates/swc_ecma_minifier/Cargo.toml index 143dc8d5f077..6ebcb5dec4e2 100644 --- a/crates/swc_ecma_minifier/Cargo.toml +++ b/crates/swc_ecma_minifier/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs", "src/lists/*.json"] license = "Apache-2.0" name = "swc_ecma_minifier" repository = "https://github.com/swc-project/swc.git" -version = "0.183.22" +version = "0.183.23" [package.metadata.docs.rs] all-features = true @@ -62,7 +62,7 @@ swc_ecma_codegen = { version = "0.141.11", path = "../swc_ecma_codegen" } swc_ecma_parser = { version = "0.136.8", path = "../swc_ecma_parser" } swc_ecma_transforms_base = { version = "0.129.14", path = "../swc_ecma_transforms_base" } swc_ecma_transforms_optimization = { version = "0.189.19", path = "../swc_ecma_transforms_optimization" } -swc_ecma_usage_analyzer = { version = "0.15.12", path = "../swc_ecma_usage_analyzer" } +swc_ecma_usage_analyzer = { version = "0.15.13", path = "../swc_ecma_usage_analyzer" } swc_ecma_utils = { version = "0.119.10", path = "../swc_ecma_utils" } swc_ecma_visit = { version = "0.92.5", path = "../swc_ecma_visit" } swc_timer = { version = "0.19.19", path = "../swc_timer" } diff --git a/crates/swc_ecma_usage_analyzer/Cargo.toml b/crates/swc_ecma_usage_analyzer/Cargo.toml index 330ded8984d9..b224a97f54c4 100644 --- a/crates/swc_ecma_usage_analyzer/Cargo.toml +++ b/crates/swc_ecma_usage_analyzer/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_usage_analyzer" repository = "https://github.com/swc-project/swc.git" -version = "0.15.12" +version = "0.15.13" [package.metadata.docs.rs] all-features = true diff --git a/crates/swc_ecmascript/Cargo.toml b/crates/swc_ecmascript/Cargo.toml index 81bb42cea386..fbe2b95b3656 100644 --- a/crates/swc_ecmascript/Cargo.toml +++ b/crates/swc_ecmascript/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_ecmascript" repository = "https://github.com/swc-project/swc.git" -version = "0.230.23" +version = "0.230.24" [package.metadata.docs.rs] all-features = true @@ -42,7 +42,7 @@ typescript = ["typescript-parser", "swc_ecma_transforms/typescript"] swc_ecma_ast = { version = "0.106.6", path = "../swc_ecma_ast" } swc_ecma_codegen = { version = "0.141.11", path = "../swc_ecma_codegen", optional = true } swc_ecma_dep_graph = { version = "0.108.8", path = "../swc_ecma_dep_graph", optional = true } -swc_ecma_minifier = { version = "0.183.22", path = "../swc_ecma_minifier", optional = true } +swc_ecma_minifier = { version = "0.183.23", path = "../swc_ecma_minifier", optional = true } swc_ecma_parser = { version = "0.136.8", path = "../swc_ecma_parser", optional = true, default-features = false } swc_ecma_preset_env = { version = "0.197.20", path = "../swc_ecma_preset_env", optional = true } swc_ecma_quote = { version = "0.52.8", path = "../swc_ecma_quote", optional = true } diff --git a/crates/swc_estree_compat/Cargo.toml b/crates/swc_estree_compat/Cargo.toml index 7bacab9f5d1f..ffde4d7fee4d 100644 --- a/crates/swc_estree_compat/Cargo.toml +++ b/crates/swc_estree_compat/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_estree_compat" repository = "https://github.com/swc-project/swc.git" -version = "0.186.26" +version = "0.186.27" [package.metadata.docs.rs] all-features = true @@ -40,7 +40,7 @@ swc_node_comments = { version = "0.18.16", path = "../swc_node_comments/" } criterion = "0.5" pretty_assertions = "1.3" -swc = { version = "0.263.25", path = "../swc" } +swc = { version = "0.263.26", path = "../swc" } swc_ecma_ast = { version = "0.106.6", path = "../swc_ecma_ast" } swc_ecma_parser = { version = "0.136.8", path = "../swc_ecma_parser" } swc_ecma_transforms = { version = "0.220.19", path = "../swc_ecma_transforms/" } diff --git a/crates/swc_html/Cargo.toml b/crates/swc_html/Cargo.toml index 2cb4a0519d02..0b4c2055414a 100644 --- a/crates/swc_html/Cargo.toml +++ b/crates/swc_html/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_html" repository = "https://github.com/swc-project/swc.git" -version = "0.126.22" +version = "0.126.23" [package.metadata.docs.rs] all-features = true @@ -21,6 +21,6 @@ minifier = ["swc_html_minifier"] [dependencies] swc_html_ast = {version = "0.31.16", path = "../swc_html_ast"} swc_html_codegen = {version = "0.40.19", path = "../swc_html_codegen"} -swc_html_minifier = {version = "0.123.22", path = "../swc_html_minifier", optional = true} +swc_html_minifier = {version = "0.123.23", path = "../swc_html_minifier", optional = true} swc_html_parser = {version = "0.37.19", path = "../swc_html_parser"} swc_html_visit = {version = "0.31.16", path = "../swc_html_visit"} diff --git a/crates/swc_html_minifier/Cargo.toml b/crates/swc_html_minifier/Cargo.toml index d559ca892c81..b983a795f9db 100644 --- a/crates/swc_html_minifier/Cargo.toml +++ b/crates/swc_html_minifier/Cargo.toml @@ -10,7 +10,7 @@ include = ["Cargo.toml", "src/**/*.rs", "data/**/*.json"] license = "Apache-2.0" name = "swc_html_minifier" repository = "https://github.com/swc-project/swc.git" -version = "0.123.22" +version = "0.123.23" [lib] bench = false @@ -31,7 +31,7 @@ swc_ecma_ast = { version = "0.106.6", path = "../swc_ecma_ast" } swc_ecma_codegen = { version = "0.141.11", path = "../swc_ecma_codegen", features = [ "serde-impl", ] } -swc_ecma_minifier = { version = "0.183.22", path = "../swc_ecma_minifier", features = [ +swc_ecma_minifier = { version = "0.183.23", path = "../swc_ecma_minifier", features = [ "extra-serde", ] } swc_ecma_parser = { version = "0.136.8", path = "../swc_ecma_parser" } diff --git a/crates/swc_node_bundler/Cargo.toml b/crates/swc_node_bundler/Cargo.toml index 1cec7b24d601..6421f1b214bd 100644 --- a/crates/swc_node_bundler/Cargo.toml +++ b/crates/swc_node_bundler/Cargo.toml @@ -7,7 +7,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_node_bundler" repository = "https://github.com/swc-project/swc.git" -version = "0.50.25" +version = "0.50.26" [lib] bench = false @@ -29,9 +29,9 @@ serde_json = "1" tracing = "0.1.37" string_enum = { version = "0.4.1", path = "../string_enum" } -swc = { version = "0.263.25", path = "../swc" } +swc = { version = "0.263.26", path = "../swc" } swc_atoms = { version = "0.5.6", path = "../swc_atoms" } -swc_bundler = { version = "0.216.22", path = "../swc_bundler", features = [ +swc_bundler = { version = "0.216.23", path = "../swc_bundler", features = [ "concurrent", ] } swc_common = { version = "0.31.16", path = "../swc_common", features = [