diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e26bd975f0e..319527af6c74 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -49,6 +49,12 @@ - **(common)** Fix perf bug of sourcemap for inputs with multi-byte chars (#6523) ([47908a4](https://github.com/swc-project/swc/commit/47908a49d3d773b7ffacf6ffa6e38c7e091101cb)) +### Refactor + + + +- **(css/parser)** Canonicalize only if required (#6532) ([251e98c](https://github.com/swc-project/swc/commit/251e98c05576d0495647e93ae0fe179da7435db9)) + ### Testing diff --git a/Cargo.lock b/Cargo.lock index 7ff6df8c0fbb..80f3726372e2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3165,7 +3165,7 @@ dependencies = [ [[package]] name = "swc_core" -version = "0.43.39" +version = "0.43.40" dependencies = [ "anyhow", "binding_macros", @@ -3216,7 +3216,7 @@ dependencies = [ [[package]] name = "swc_css" -version = "0.140.5" +version = "0.140.6" dependencies = [ "swc_css_ast", "swc_css_codegen", @@ -3244,7 +3244,7 @@ dependencies = [ [[package]] name = "swc_css_codegen" -version = "0.137.5" +version = "0.137.6" dependencies = [ "auto_impl", "bitflags", @@ -3273,7 +3273,7 @@ dependencies = [ [[package]] name = "swc_css_compat" -version = "0.12.5" +version = "0.12.6" dependencies = [ "once_cell", "serde", @@ -3290,7 +3290,7 @@ dependencies = [ [[package]] name = "swc_css_lints" -version = "0.46.5" +version = "0.46.6" dependencies = [ "auto_impl", "parking_lot", @@ -3309,7 +3309,7 @@ dependencies = [ [[package]] name = "swc_css_minifier" -version = "0.102.5" +version = "0.102.6" dependencies = [ "criterion", "serde", @@ -3326,7 +3326,7 @@ dependencies = [ [[package]] name = "swc_css_modules" -version = "0.13.5" +version = "0.13.6" dependencies = [ "rustc-hash", "serde", @@ -3343,7 +3343,7 @@ dependencies = [ [[package]] name = "swc_css_parser" -version = "0.136.5" +version = "0.136.6" dependencies = [ "bitflags", "criterion", @@ -3360,7 +3360,7 @@ dependencies = [ [[package]] name = "swc_css_prefixer" -version = "0.138.5" +version = "0.138.6" dependencies = [ "once_cell", "preset_env_base", @@ -4045,7 +4045,7 @@ dependencies = [ [[package]] name = "swc_html" -version = "0.96.36" +version = "0.96.37" dependencies = [ "swc_html_ast", "swc_html_codegen", @@ -4097,7 +4097,7 @@ dependencies = [ [[package]] name = "swc_html_minifier" -version = "0.93.36" +version = "0.93.37" dependencies = [ "criterion", "once_cell", diff --git a/crates/swc_core/Cargo.toml b/crates/swc_core/Cargo.toml index d2d2913b2823..f2508f16d65a 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.43.39" +version = "0.43.40" [package.metadata.docs.rs] features = [ "common_perf", @@ -325,11 +325,11 @@ swc_bundler = { optional = true, version = "0.192.104", pat swc_cached = { optional = true, version = "0.3.15", path = "../swc_cached" } swc_common = { optional = true, version = "0.29.16", path = "../swc_common" } swc_css_ast = { optional = true, version = "0.127.3", path = "../swc_css_ast" } -swc_css_codegen = { optional = true, version = "0.137.5", path = "../swc_css_codegen" } -swc_css_minifier = { optional = true, version = "0.102.5", path = "../swc_css_minifier" } -swc_css_modules = { optional = true, version = "0.13.5", path = "../swc_css_modules" } -swc_css_parser = { optional = true, version = "0.136.5", path = "../swc_css_parser" } -swc_css_prefixer = { optional = true, version = "0.138.5", path = "../swc_css_prefixer" } +swc_css_codegen = { optional = true, version = "0.137.6", path = "../swc_css_codegen" } +swc_css_minifier = { optional = true, version = "0.102.6", path = "../swc_css_minifier" } +swc_css_modules = { optional = true, version = "0.13.6", path = "../swc_css_modules" } +swc_css_parser = { optional = true, version = "0.136.6", path = "../swc_css_parser" } +swc_css_prefixer = { optional = true, version = "0.138.6", path = "../swc_css_prefixer" } swc_css_utils = { optional = true, version = "0.124.3", path = "../swc_css_utils/" } swc_css_visit = { optional = true, version = "0.126.3", path = "../swc_css_visit" } swc_ecma_ast = { optional = true, version = "0.94.21", path = "../swc_ecma_ast" } @@ -357,7 +357,7 @@ swc_plugin_proxy = { optional = true, version = "0.22.23", path swc_trace_macro = { optional = true, version = "0.1.2", path = "../swc_trace_macro" } testing = { optional = true, version = "0.31.17", path = "../testing" } # TODO: eventually swc_plugin_runner needs to remove default features -swc_css_compat = { version = "0.12.5", path = "../swc_css_compat", optional = true } +swc_css_compat = { version = "0.12.6", path = "../swc_css_compat", optional = true } swc_plugin_runner = { optional = true, version = "0.77.39", path = "../swc_plugin_runner", default-features = false } [build-dependencies] diff --git a/crates/swc_css/Cargo.toml b/crates/swc_css/Cargo.toml index d13917097ddc..e7c0556f2ed4 100644 --- a/crates/swc_css/Cargo.toml +++ b/crates/swc_css/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_css" repository = "https://github.com/swc-project/swc.git" -version = "0.140.5" +version = "0.140.6" [package.metadata.docs.rs] all-features = true @@ -23,11 +23,11 @@ prefixer = ["swc_css_prefixer"] [dependencies] swc_css_ast = {version = "0.127.3", path = "../swc_css_ast"} -swc_css_codegen = {version = "0.137.5", path = "../swc_css_codegen"} -swc_css_compat = {version = "0.12.5", path = "../swc_css_compat", optional = true} -swc_css_minifier = {version = "0.102.5", path = "../swc_css_minifier", optional = true} -swc_css_modules = {version = "0.13.5", path = "../swc_css_modules", optional = true} -swc_css_parser = {version = "0.136.5", path = "../swc_css_parser"} -swc_css_prefixer = {version = "0.138.5", path = "../swc_css_prefixer", optional = true} +swc_css_codegen = {version = "0.137.6", path = "../swc_css_codegen"} +swc_css_compat = {version = "0.12.6", path = "../swc_css_compat", optional = true} +swc_css_minifier = {version = "0.102.6", path = "../swc_css_minifier", optional = true} +swc_css_modules = {version = "0.13.6", path = "../swc_css_modules", optional = true} +swc_css_parser = {version = "0.136.6", path = "../swc_css_parser"} +swc_css_prefixer = {version = "0.138.6", path = "../swc_css_prefixer", optional = true} swc_css_utils = {version = "0.124.3", path = "../swc_css_utils/"} swc_css_visit = {version = "0.126.3", path = "../swc_css_visit"} diff --git a/crates/swc_css_codegen/Cargo.toml b/crates/swc_css_codegen/Cargo.toml index 8baf44f84241..275cad4d22a0 100644 --- a/crates/swc_css_codegen/Cargo.toml +++ b/crates/swc_css_codegen/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_css_codegen" repository = "https://github.com/swc-project/swc.git" -version = "0.137.5" +version = "0.137.6" [lib] bench = false @@ -27,6 +27,6 @@ swc_css_utils = { version = "0.124.3", path = "../swc_css_utils" } swc_common = { version = "0.29.16", path = "../swc_common", features = [ "sourcemap", ] } -swc_css_parser = { version = "0.136.5", path = "../swc_css_parser" } +swc_css_parser = { version = "0.136.6", path = "../swc_css_parser" } swc_css_visit = { version = "0.126.3", path = "../swc_css_visit" } testing = { version = "0.31.17", path = "../testing" } diff --git a/crates/swc_css_compat/Cargo.toml b/crates/swc_css_compat/Cargo.toml index fcd7da935e77..5ae479931a2f 100644 --- a/crates/swc_css_compat/Cargo.toml +++ b/crates/swc_css_compat/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs", "src/**/*.json", "data/**/*.json"] license = "Apache-2.0" name = "swc_css_compat" repository = "https://github.com/swc-project/swc.git" -version = "0.12.5" +version = "0.12.6" [lib] bench = false @@ -23,6 +23,6 @@ swc_css_utils = {version = "0.124.3", path = "../swc_css_utils/"} swc_css_visit = {version = "0.126.3", path = "../swc_css_visit"} [dev-dependencies] -swc_css_codegen = {version = "0.137.5", path = "../swc_css_codegen"} -swc_css_parser = {version = "0.136.5", path = "../swc_css_parser"} +swc_css_codegen = {version = "0.137.6", path = "../swc_css_codegen"} +swc_css_parser = {version = "0.136.6", path = "../swc_css_parser"} testing = {version = "0.31.17", path = "../testing"} diff --git a/crates/swc_css_lints/Cargo.toml b/crates/swc_css_lints/Cargo.toml index 26ec8548b028..4084ae5aa561 100644 --- a/crates/swc_css_lints/Cargo.toml +++ b/crates/swc_css_lints/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_css_lints" repository = "https://github.com/swc-project/swc.git" -version = "0.46.5" +version = "0.46.6" [lib] bench = false @@ -26,5 +26,5 @@ thiserror = "1.0.30" [dev-dependencies] serde_json = "1.0.79" -swc_css_parser = { version = "0.136.5", path = "../swc_css_parser" } +swc_css_parser = { version = "0.136.6", path = "../swc_css_parser" } testing = { version = "0.31.17", path = "../testing" } diff --git a/crates/swc_css_minifier/Cargo.toml b/crates/swc_css_minifier/Cargo.toml index de89c690ad28..74d474335393 100644 --- a/crates/swc_css_minifier/Cargo.toml +++ b/crates/swc_css_minifier/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_css_minifier" repository = "https://github.com/swc-project/swc.git" -version = "0.102.5" +version = "0.102.6" [lib] bench = false @@ -22,8 +22,8 @@ swc_css_visit = { version = "0.126.3", path = "../swc_css_visit" } [dev-dependencies] criterion = "0.3" -swc_css_codegen = { version = "0.137.5", path = "../swc_css_codegen" } -swc_css_parser = { version = "0.136.5", path = "../swc_css_parser" } +swc_css_codegen = { version = "0.137.6", path = "../swc_css_codegen" } +swc_css_parser = { version = "0.136.6", path = "../swc_css_parser" } swc_node_base = { version = "0.5.8", path = "../swc_node_base" } testing = { version = "0.31.17", path = "../testing" } diff --git a/crates/swc_css_modules/Cargo.toml b/crates/swc_css_modules/Cargo.toml index 1f07bf9ba6d3..79c383ca6c75 100644 --- a/crates/swc_css_modules/Cargo.toml +++ b/crates/swc_css_modules/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_css_modules" repository = "https://github.com/swc-project/swc.git" -version = "0.13.5" +version = "0.13.6" [lib] bench = false @@ -20,11 +20,11 @@ serde = {version = "1", features = ["derive"]} swc_atoms = {version = "0.4.25", path = "../swc_atoms"} swc_common = {version = "0.29.16", path = "../swc_common"} swc_css_ast = {version = "0.127.3", path = "../swc_css_ast"} -swc_css_codegen = {version = "0.137.5", path = "../swc_css_codegen"} -swc_css_parser = {version = "0.136.5", path = "../swc_css_parser"} +swc_css_codegen = {version = "0.137.6", path = "../swc_css_codegen"} +swc_css_parser = {version = "0.136.6", path = "../swc_css_parser"} swc_css_visit = {version = "0.126.3", path = "../swc_css_visit"} [dev-dependencies] serde_json = "1" -swc_css_compat = {version = "0.12.5", path = "../swc_css_compat"} +swc_css_compat = {version = "0.12.6", path = "../swc_css_compat"} testing = {version = "0.31.17", path = "../testing"} diff --git a/crates/swc_css_parser/Cargo.toml b/crates/swc_css_parser/Cargo.toml index 7401592e53bf..083af253b187 100644 --- a/crates/swc_css_parser/Cargo.toml +++ b/crates/swc_css_parser/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_css_parser" repository = "https://github.com/swc-project/swc.git" -version = "0.136.5" +version = "0.136.6" [lib] bench = false diff --git a/crates/swc_css_prefixer/Cargo.toml b/crates/swc_css_prefixer/Cargo.toml index 43d88a859d97..dfde60b9dbd6 100644 --- a/crates/swc_css_prefixer/Cargo.toml +++ b/crates/swc_css_prefixer/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs", "src/**/*.json", "data/**/*.json"] license = "Apache-2.0" name = "swc_css_prefixer" repository = "https://github.com/swc-project/swc.git" -version = "0.138.5" +version = "0.138.6" [lib] bench = false @@ -24,6 +24,6 @@ swc_css_utils = {version = "0.124.3", path = "../swc_css_utils/"} swc_css_visit = {version = "0.126.3", path = "../swc_css_visit"} [dev-dependencies] -swc_css_codegen = {version = "0.137.5", path = "../swc_css_codegen"} -swc_css_parser = {version = "0.136.5", path = "../swc_css_parser"} +swc_css_codegen = {version = "0.137.6", path = "../swc_css_codegen"} +swc_css_parser = {version = "0.136.6", path = "../swc_css_parser"} testing = {version = "0.31.17", path = "../testing"} diff --git a/crates/swc_html/Cargo.toml b/crates/swc_html/Cargo.toml index 5d1fe8884e95..80e7f7c59204 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.96.36" +version = "0.96.37" [package.metadata.docs.rs] all-features = true @@ -21,6 +21,6 @@ minifier = ["swc_html_minifier"] [dependencies] swc_html_ast = {version = "0.28.7", path = "../swc_html_ast"} swc_html_codegen = {version = "0.37.15", path = "../swc_html_codegen"} -swc_html_minifier = {version = "0.93.36", path = "../swc_html_minifier", optional = true} +swc_html_minifier = {version = "0.93.37", path = "../swc_html_minifier", optional = true} swc_html_parser = {version = "0.34.15", path = "../swc_html_parser"} swc_html_visit = {version = "0.28.7", path = "../swc_html_visit"} diff --git a/crates/swc_html_minifier/Cargo.toml b/crates/swc_html_minifier/Cargo.toml index 4758240e5f61..12c35c5d363b 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.93.36" +version = "0.93.37" [lib] bench = false @@ -23,9 +23,9 @@ swc_atoms = { version = "0.4.25", path = "../swc_atoms" } swc_cached = { version = "0.3.15", path = "../swc_cached" } swc_common = { version = "0.29.16", path = "../swc_common" } swc_css_ast = { version = "0.127.3", path = "../swc_css_ast" } -swc_css_codegen = { version = "0.137.5", path = "../swc_css_codegen" } -swc_css_minifier = { version = "0.102.5", path = "../swc_css_minifier" } -swc_css_parser = { version = "0.136.5", path = "../swc_css_parser" } +swc_css_codegen = { version = "0.137.6", path = "../swc_css_codegen" } +swc_css_minifier = { version = "0.102.6", path = "../swc_css_minifier" } +swc_css_parser = { version = "0.136.6", path = "../swc_css_parser" } swc_ecma_ast = { version = "0.94.21", path = "../swc_ecma_ast" } swc_ecma_codegen = { version = "0.127.39", path = "../swc_ecma_codegen" } swc_ecma_minifier = { version = "0.159.104", path = "../swc_ecma_minifier" }