diff --git a/CHANGELOG.md b/CHANGELOG.md index 0a1521d946ee..236146df2219 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,12 @@ - **(es/minifier)** Add `has_flag` to `Comments` ([#8182](https://github.com/swc-project/swc/issues/8182)) ([7530e90](https://github.com/swc-project/swc/commit/7530e9051d67d8721126e48c39f0a8ac27d980a5)) +### Refactor + + + +- **(es/minifier)** Simplify analyzer context ([#8164](https://github.com/swc-project/swc/issues/8164)) ([bb02cdd](https://github.com/swc-project/swc/commit/bb02cdd26ed863649c6ec8ef9c5cbdaece743b9b)) + ## [1.3.95] - 2023-10-24 ### Bug Fixes @@ -1743,7 +1749,4 @@ Full refactor of the "calc" simplification to be more compliant with the spec. ( - **(es)** Respect the value of assumptions ([#7065](https://github.com/swc-project/swc/issues/7065)) ([11d4874](https://github.com/swc-project/swc/commit/11d4874a2ea173a43e0a1fcdf8a1390d4320b7ee)) - -- **(es/compat)** Insert the variable declaration nearest to the available statements ([#7067](https://github.com/swc-project/swc/issues/7067)) ([ae348e3](https://github.com/swc-project/swc/commit/ae348e32e18e07c277c358746e3ba3a78b9251c4)) - diff --git a/Cargo.lock b/Cargo.lock index f7044ff95856..0016ba64d815 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -284,7 +284,7 @@ dependencies = [ [[package]] name = "binding_macros" -version = "0.60.18" +version = "0.60.19" dependencies = [ "anyhow", "console_error_panic_hook", @@ -1056,7 +1056,7 @@ checksum = "23d8666cb01533c39dde32bcbab8e227b4ed6679b2c925eba05feabea39508fb" [[package]] name = "dbg-swc" -version = "0.89.20" +version = "0.89.21" dependencies = [ "anyhow", "clap 3.2.25", @@ -3669,7 +3669,7 @@ dependencies = [ [[package]] name = "swc" -version = "0.269.17" +version = "0.269.18" dependencies = [ "ansi_term", "anyhow", @@ -3740,7 +3740,7 @@ dependencies = [ [[package]] name = "swc_bundler" -version = "0.222.16" +version = "0.222.17" dependencies = [ "anyhow", "crc", @@ -3795,7 +3795,7 @@ dependencies = [ [[package]] name = "swc_cli_impl" -version = "0.4.17" +version = "0.4.18" dependencies = [ "anyhow", "atty", @@ -3853,7 +3853,7 @@ dependencies = [ [[package]] name = "swc_compiler_base" -version = "0.3.17" +version = "0.3.18" dependencies = [ "anyhow", "base64 0.13.1", @@ -3896,7 +3896,7 @@ dependencies = [ [[package]] name = "swc_core" -version = "0.86.17" +version = "0.86.18" dependencies = [ "anyhow", "binding_macros", @@ -4440,7 +4440,7 @@ dependencies = [ [[package]] name = "swc_ecma_minifier" -version = "0.189.16" +version = "0.189.17" dependencies = [ "ansi_term", "anyhow", @@ -4891,7 +4891,7 @@ dependencies = [ [[package]] name = "swc_ecmascript" -version = "0.236.17" +version = "0.236.18" dependencies = [ "swc_ecma_ast", "swc_ecma_codegen", @@ -4939,7 +4939,7 @@ dependencies = [ [[package]] name = "swc_estree_compat" -version = "0.194.16" +version = "0.194.17" dependencies = [ "ahash 0.8.5", "anyhow", @@ -4987,7 +4987,7 @@ dependencies = [ [[package]] name = "swc_html" -version = "0.134.17" +version = "0.134.18" dependencies = [ "swc_html_ast", "swc_html_codegen", @@ -5038,7 +5038,7 @@ dependencies = [ [[package]] name = "swc_html_minifier" -version = "0.131.17" +version = "0.131.18" dependencies = [ "criterion", "once_cell", @@ -5124,7 +5124,7 @@ dependencies = [ [[package]] name = "swc_node_bundler" -version = "0.58.17" +version = "0.58.18" dependencies = [ "anyhow", "dashmap", diff --git a/crates/binding_macros/Cargo.toml b/crates/binding_macros/Cargo.toml index 1ff0f7cb7cb9..dd9d5d3f8b97 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.60.18" +version = "0.60.19" [lib] bench = false @@ -33,7 +33,7 @@ binding_wasm = [ [dependencies] # Common deps for the SWC imports -swc = { optional = true, version = "0.269.17", path = "../swc" } +swc = { optional = true, version = "0.269.18", path = "../swc" } swc_common = { optional = true, version = "0.33.2", path = "../swc_common" } swc_ecma_ast = { optional = true, version = "0.110.2", path = "../swc_ecma_ast" } swc_ecma_transforms = { optional = true, version = "0.226.11", path = "../swc_ecma_transforms" } diff --git a/crates/dbg-swc/Cargo.toml b/crates/dbg-swc/Cargo.toml index 2e0c322ca31a..9339384ff2a2 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.89.20" +version = "0.89.21" [[bin]] bench = false @@ -32,7 +32,7 @@ swc_common = { version = "0.33.2", features = [ ], path = "../swc_common" } swc_ecma_ast = { version = "0.110.2", path = "../swc_ecma_ast" } swc_ecma_codegen = { version = "0.146.5", path = "../swc_ecma_codegen" } -swc_ecma_minifier = { version = "0.189.16", path = "../swc_ecma_minifier", features = [ +swc_ecma_minifier = { version = "0.189.17", path = "../swc_ecma_minifier", features = [ "concurrent", ] } swc_ecma_parser = { version = "0.141.5", path = "../swc_ecma_parser" } diff --git a/crates/swc/Cargo.toml b/crates/swc/Cargo.toml index fcb18745b65d..ad6e313a086d 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.269.17" +version = "0.269.18" [lib] bench = false @@ -73,7 +73,7 @@ swc_common = { version = "0.33.2", path = "../swc_common", features = [ "sourcemap", "parking_lot", ] } -swc_compiler_base = { version = "0.3.17", path = "../swc_compiler_base" } +swc_compiler_base = { version = "0.3.18", path = "../swc_compiler_base" } swc_config = { version = "0.1.7", path = "../swc_config" } swc_ecma_ast = { version = "0.110.2", path = "../swc_ecma_ast" } swc_ecma_codegen = { version = "0.146.5", path = "../swc_ecma_codegen" } @@ -84,7 +84,7 @@ swc_ecma_loader = { version = "0.45.3", path = "../swc_ecma_loader", features = "node", "tsc", ] } -swc_ecma_minifier = { version = "0.189.16", path = "../swc_ecma_minifier" } +swc_ecma_minifier = { version = "0.189.17", path = "../swc_ecma_minifier" } swc_ecma_parser = { version = "0.141.5", path = "../swc_ecma_parser" } swc_ecma_preset_env = { version = "0.203.11", path = "../swc_ecma_preset_env" } swc_ecma_transforms = { version = "0.226.11", path = "../swc_ecma_transforms", features = [ diff --git a/crates/swc_bundler/Cargo.toml b/crates/swc_bundler/Cargo.toml index e2e51d313226..f143ab1ec176 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.222.16" +version = "0.222.17" [package.metadata.docs.rs] all-features = true @@ -63,7 +63,7 @@ swc_ecma_loader = { version = "0.45.3", path = "../swc_ecma_loader", features = "node", "cache", ] } -swc_ecma_minifier = { version = "0.189.16", path = "../swc_ecma_minifier", features = [ +swc_ecma_minifier = { version = "0.189.17", path = "../swc_ecma_minifier", features = [ "concurrent", ] } swc_ecma_transforms_proposal = { version = "0.168.15", path = "../swc_ecma_transforms_proposal" } diff --git a/crates/swc_cli_impl/Cargo.toml b/crates/swc_cli_impl/Cargo.toml index 2f3fb81b4725..ac36a60220a0 100644 --- a/crates/swc_cli_impl/Cargo.toml +++ b/crates/swc_cli_impl/Cargo.toml @@ -6,7 +6,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_cli_impl" repository = "https://github.com/swc-project/swc.git" -version = "0.4.17" +version = "0.4.18" [features] default = [] @@ -32,7 +32,7 @@ tracing-futures = "0.2.5" tracing-subscriber = { version = "0.3.9", features = ["env-filter"] } walkdir = "2" -swc_core = { version = "0.86.17", features = [ +swc_core = { version = "0.86.18", features = [ "trace_macro", "common_concurrent", "base_concurrent", diff --git a/crates/swc_compiler_base/Cargo.toml b/crates/swc_compiler_base/Cargo.toml index 9f8a21f70f42..77e45f820a16 100644 --- a/crates/swc_compiler_base/Cargo.toml +++ b/crates/swc_compiler_base/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_compiler_base" repository = "https://github.com/swc-project/swc.git" -version = "0.3.17" +version = "0.3.18" [features] node = ["napi", "napi-derive"] @@ -25,7 +25,7 @@ swc_common = { version = "0.33.2", path = "../swc_common", features = [ swc_config = { version = "0.1.7", path = "../swc_config" } swc_ecma_ast = { version = "0.110.2", path = "../swc_ecma_ast" } swc_ecma_codegen = { version = "0.146.5", path = "../swc_ecma_codegen" } -swc_ecma_minifier = { version = "0.189.16", path = "../swc_ecma_minifier" } +swc_ecma_minifier = { version = "0.189.17", path = "../swc_ecma_minifier" } swc_ecma_parser = { version = "0.141.5", path = "../swc_ecma_parser" } swc_ecma_visit = { version = "0.96.2", path = "../swc_ecma_visit" } swc_timer = { version = "0.21.2", path = "../swc_timer" } diff --git a/crates/swc_core/Cargo.toml b/crates/swc_core/Cargo.toml index c09febc391a0..7aae306dde26 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.86.17" +version = "0.86.18" [package.metadata.docs.rs] features = [ "allocator_node", @@ -324,10 +324,10 @@ __visit = ["__ecma", "swc_ecma_visit"] once_cell = { optional = true, version = "1.18.0" } # swc_* dependencies -binding_macros = { optional = true, version = "0.60.18", path = "../binding_macros" } -swc = { optional = true, version = "0.269.17", path = "../swc" } +binding_macros = { optional = true, version = "0.60.19", path = "../binding_macros" } +swc = { optional = true, version = "0.269.18", path = "../swc" } swc_atoms = { optional = true, version = "0.6.0", path = "../swc_atoms" } -swc_bundler = { optional = true, version = "0.222.16", path = "../swc_bundler" } +swc_bundler = { optional = true, version = "0.222.17", path = "../swc_bundler" } swc_cached = { optional = true, version = "0.3.18", path = "../swc_cached" } swc_common = { optional = true, version = "0.33.2", path = "../swc_common" } swc_css_ast = { optional = true, version = "0.140.3", path = "../swc_css_ast" } @@ -342,7 +342,7 @@ swc_css_visit = { optional = true, version = "0.139.3", path swc_ecma_ast = { optional = true, version = "0.110.2", path = "../swc_ecma_ast" } swc_ecma_codegen = { optional = true, version = "0.146.5", path = "../swc_ecma_codegen" } swc_ecma_loader = { optional = true, version = "0.45.3", path = "../swc_ecma_loader" } -swc_ecma_minifier = { optional = true, version = "0.189.16", path = "../swc_ecma_minifier" } +swc_ecma_minifier = { optional = true, version = "0.189.17", path = "../swc_ecma_minifier" } swc_ecma_parser = { optional = true, version = "0.141.5", path = "../swc_ecma_parser" } swc_ecma_preset_env = { optional = true, version = "0.203.11", path = "../swc_ecma_preset_env" } swc_ecma_quote_macros = { optional = true, version = "0.52.5", path = "../swc_ecma_quote_macros" } @@ -358,7 +358,7 @@ swc_ecma_usage_analyzer = { optional = true, version = "0.20.10", path swc_ecma_utils = { optional = true, version = "0.124.9", path = "../swc_ecma_utils" } swc_ecma_visit = { optional = true, version = "0.96.2", path = "../swc_ecma_visit" } swc_node_base = { optional = true, version = "0.5.8", path = "../swc_node_base" } -swc_node_bundler = { optional = true, version = "0.58.17", path = "../swc_node_bundler" } +swc_node_bundler = { optional = true, version = "0.58.18", 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 b14fd6527494..fc5f488a5157 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.189.16" +version = "0.189.17" [package.metadata.docs.rs] all-features = true diff --git a/crates/swc_ecmascript/Cargo.toml b/crates/swc_ecmascript/Cargo.toml index 01d2f20ad9a9..a190e09207a8 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.236.17" +version = "0.236.18" [package.metadata.docs.rs] all-features = true @@ -42,7 +42,7 @@ typescript = ["typescript-parser", "swc_ecma_transforms/typescript"] swc_ecma_ast = { version = "0.110.2", path = "../swc_ecma_ast" } swc_ecma_codegen = { version = "0.146.5", path = "../swc_ecma_codegen", optional = true } swc_ecma_dep_graph = { version = "0.113.5", path = "../swc_ecma_dep_graph", optional = true } -swc_ecma_minifier = { version = "0.189.16", path = "../swc_ecma_minifier", optional = true } +swc_ecma_minifier = { version = "0.189.17", path = "../swc_ecma_minifier", optional = true } swc_ecma_parser = { version = "0.141.5", path = "../swc_ecma_parser", optional = true, default-features = false } swc_ecma_preset_env = { version = "0.203.11", path = "../swc_ecma_preset_env", optional = true } swc_ecma_quote = { version = "0.57.5", path = "../swc_ecma_quote", optional = true } diff --git a/crates/swc_estree_compat/Cargo.toml b/crates/swc_estree_compat/Cargo.toml index 54a51e645401..3edf5a397993 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.194.16" +version = "0.194.17" [package.metadata.docs.rs] all-features = true @@ -40,7 +40,7 @@ swc_node_comments = { version = "0.20.2", path = "../swc_node_comments/" } criterion = "0.5" pretty_assertions = "1.3" -swc = { version = "0.269.17", path = "../swc" } +swc = { version = "0.269.18", path = "../swc" } swc_ecma_ast = { version = "0.110.2", path = "../swc_ecma_ast" } swc_ecma_parser = { version = "0.141.5", path = "../swc_ecma_parser" } swc_ecma_transforms = { version = "0.226.11", path = "../swc_ecma_transforms/" } diff --git a/crates/swc_html/Cargo.toml b/crates/swc_html/Cargo.toml index c84ff0fac282..d4304153f1a5 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.134.17" +version = "0.134.18" [package.metadata.docs.rs] all-features = true @@ -21,6 +21,6 @@ minifier = ["swc_html_minifier"] [dependencies] swc_html_ast = {version = "0.33.2", path = "../swc_html_ast"} swc_html_codegen = {version = "0.42.2", path = "../swc_html_codegen"} -swc_html_minifier = {version = "0.131.17", path = "../swc_html_minifier", optional = true} +swc_html_minifier = {version = "0.131.18", path = "../swc_html_minifier", optional = true} swc_html_parser = {version = "0.39.2", path = "../swc_html_parser"} swc_html_visit = {version = "0.33.2", path = "../swc_html_visit"} diff --git a/crates/swc_html_minifier/Cargo.toml b/crates/swc_html_minifier/Cargo.toml index 6491671b0f4a..7b0c1744491c 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.131.17" +version = "0.131.18" [lib] bench = false @@ -31,7 +31,7 @@ swc_ecma_ast = { version = "0.110.2", path = "../swc_ecma_ast" } swc_ecma_codegen = { version = "0.146.5", path = "../swc_ecma_codegen", features = [ "serde-impl", ] } -swc_ecma_minifier = { version = "0.189.16", path = "../swc_ecma_minifier", features = [ +swc_ecma_minifier = { version = "0.189.17", path = "../swc_ecma_minifier", features = [ "extra-serde", ] } swc_ecma_parser = { version = "0.141.5", path = "../swc_ecma_parser" } diff --git a/crates/swc_node_bundler/Cargo.toml b/crates/swc_node_bundler/Cargo.toml index 053e6bbf2e1d..e2d26cb22107 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.58.17" +version = "0.58.18" [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.269.17", path = "../swc" } +swc = { version = "0.269.18", path = "../swc" } swc_atoms = { version = "0.6.0", path = "../swc_atoms" } -swc_bundler = { version = "0.222.16", path = "../swc_bundler", features = [ +swc_bundler = { version = "0.222.17", path = "../swc_bundler", features = [ "concurrent", ] } swc_common = { version = "0.33.2", path = "../swc_common", features = [