diff --git a/.changeset/chilly-zoos-applaud.md b/.changeset/chilly-zoos-applaud.md deleted file mode 100644 index 3429ad20c411..000000000000 --- a/.changeset/chilly-zoos-applaud.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -swc_core: patch -swc_ecma_codegen: patch ---- - -fix(es/codegen): Emit semicolon after using declarations diff --git a/CHANGELOG.md b/CHANGELOG.md index b8973bb8a861..9fdd9c70d32c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,12 @@ # Changelog +## [unreleased] + +### Bug Fixes + + + +- **(es/codegen)** Emit semicolon after using declarations ([#9816](https://github.com/swc-project/swc/issues/9816)) ([556d924](https://github.com/swc-project/swc/commit/556d924cf53c2d3a7577bbfbb2b467d41834c23e)) + ## [1.10.2] - 2024-12-26 ### Bug Fixes @@ -1481,9 +1489,6 @@ - **(es/lints)** Avoid needless allocations in `no-dupe-args` ([#9041](https://github.com/swc-project/swc/issues/9041)) ([e560198](https://github.com/swc-project/swc/commit/e5601989a1fa699c3d4f7f120bd14f946eee01fa)) -- **(es/parser)** Do not track `raw` by hand ([#9047](https://github.com/swc-project/swc/issues/9047)) ([60fe5f0](https://github.com/swc-project/swc/commit/60fe5f0effdcc45f0cfd363fd0ff4e6f4dba5b33)) - - - **(es/parser)** Reduce allocations for `raw` while lexing numbers ([#9056](https://github.com/swc-project/swc/issues/9056)) ([bc8ec62](https://github.com/swc-project/swc/commit/bc8ec625ecee8a077fe84de371c490be14a1a033)) ### Refactor diff --git a/Cargo.lock b/Cargo.lock index 11ddd0d266bc..a3aca10f92f8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4595,7 +4595,7 @@ dependencies = [ [[package]] name = "swc_core" -version = "9.0.2" +version = "9.0.3" dependencies = [ "anyhow", "binding_macros", @@ -4861,7 +4861,7 @@ dependencies = [ [[package]] name = "swc_ecma_codegen" -version = "5.0.0" +version = "5.0.1" dependencies = [ "base64 0.21.7", "codspeed-criterion-compat", diff --git a/crates/dbg-swc/Cargo.toml b/crates/dbg-swc/Cargo.toml index 48959e880d15..6634984f9470 100644 --- a/crates/dbg-swc/Cargo.toml +++ b/crates/dbg-swc/Cargo.toml @@ -32,7 +32,7 @@ swc_common = { version = "5.0.0", features = [ "tty-emitter", ], path = "../swc_common" } swc_ecma_ast = { version = "5.0.0", path = "../swc_ecma_ast" } -swc_ecma_codegen = { version = "5.0.0", path = "../swc_ecma_codegen" } +swc_ecma_codegen = { version = "5.0.1", path = "../swc_ecma_codegen" } swc_ecma_minifier = { version = "6.0.1", path = "../swc_ecma_minifier", features = [ "concurrent", ] } diff --git a/crates/swc/Cargo.toml b/crates/swc/Cargo.toml index f18b547d703f..aba16bb29958 100644 --- a/crates/swc/Cargo.toml +++ b/crates/swc/Cargo.toml @@ -80,7 +80,7 @@ swc_common = { version = "5.0.0", path = "../swc_common", features = [ swc_compiler_base = { version = "7.0.0", path = "../swc_compiler_base" } swc_config = { version = "1.0.0", path = "../swc_config" } swc_ecma_ast = { version = "5.0.0", path = "../swc_ecma_ast" } -swc_ecma_codegen = { version = "5.0.0", path = "../swc_ecma_codegen" } +swc_ecma_codegen = { version = "5.0.1", path = "../swc_ecma_codegen" } swc_ecma_ext_transforms = { version = "6.0.0", path = "../swc_ecma_ext_transforms" } swc_ecma_lints = { version = "6.0.0", path = "../swc_ecma_lints" } swc_ecma_loader = { version = "5.0.0", path = "../swc_ecma_loader", features = [ diff --git a/crates/swc_bundler/Cargo.toml b/crates/swc_bundler/Cargo.toml index 1715f495e1c6..f0ede6fa8f4c 100644 --- a/crates/swc_bundler/Cargo.toml +++ b/crates/swc_bundler/Cargo.toml @@ -40,7 +40,7 @@ tracing = { workspace = true } swc_atoms = { version = "3.0.0", path = "../swc_atoms" } swc_common = { version = "5.0.0", path = "../swc_common" } swc_ecma_ast = { version = "5.0.0", path = "../swc_ecma_ast" } -swc_ecma_codegen = { version = "5.0.0", path = "../swc_ecma_codegen" } +swc_ecma_codegen = { version = "5.0.1", path = "../swc_ecma_codegen" } swc_ecma_loader = { version = "5.0.0", path = "../swc_ecma_loader" } swc_ecma_parser = { version = "6.0.1", path = "../swc_ecma_parser" } swc_ecma_transforms_base = { version = "6.0.2", path = "../swc_ecma_transforms_base" } diff --git a/crates/swc_cli_impl/Cargo.toml b/crates/swc_cli_impl/Cargo.toml index a58189a369d3..41b24fe59e57 100644 --- a/crates/swc_cli_impl/Cargo.toml +++ b/crates/swc_cli_impl/Cargo.toml @@ -39,7 +39,7 @@ tracing-futures = { workspace = true } tracing-subscriber = { workspace = true, features = ["env-filter"] } walkdir = { workspace = true } -swc_core = { version = "9.0.2", features = [ +swc_core = { version = "9.0.3", features = [ "trace_macro", "common_concurrent", "base_concurrent", diff --git a/crates/swc_compiler_base/Cargo.toml b/crates/swc_compiler_base/Cargo.toml index 3c75e2e85282..81cb7dedc69f 100644 --- a/crates/swc_compiler_base/Cargo.toml +++ b/crates/swc_compiler_base/Cargo.toml @@ -29,7 +29,7 @@ swc_common = { version = "5.0.0", path = "../swc_common", features = [ ] } swc_config = { version = "1.0.0", path = "../swc_config" } swc_ecma_ast = { version = "5.0.0", path = "../swc_ecma_ast" } -swc_ecma_codegen = { version = "5.0.0", path = "../swc_ecma_codegen" } +swc_ecma_codegen = { version = "5.0.1", path = "../swc_ecma_codegen" } swc_ecma_minifier = { version = "6.0.1", path = "../swc_ecma_minifier" } swc_ecma_parser = { version = "6.0.1", path = "../swc_ecma_parser" } swc_ecma_visit = { version = "5.0.0", path = "../swc_ecma_visit" } diff --git a/crates/swc_core/Cargo.toml b/crates/swc_core/Cargo.toml index 75b43c6c7d80..485b7ad611b9 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 = "9.0.2" +version = "9.0.3" [package.metadata.docs.rs] features = [ "allocator_node", @@ -354,7 +354,7 @@ swc_css_prefixer = { optional = true, version = "5.0.0", path = swc_css_utils = { optional = true, version = "5.0.0", path = "../swc_css_utils/" } swc_css_visit = { optional = true, version = "5.0.0", path = "../swc_css_visit" } swc_ecma_ast = { optional = true, version = "5.0.0", path = "../swc_ecma_ast" } -swc_ecma_codegen = { optional = true, version = "5.0.0", path = "../swc_ecma_codegen" } +swc_ecma_codegen = { optional = true, version = "5.0.1", path = "../swc_ecma_codegen" } swc_ecma_lints = { optional = true, version = "6.0.0", path = "../swc_ecma_lints" } swc_ecma_loader = { optional = true, version = "5.0.0", path = "../swc_ecma_loader" } swc_ecma_minifier = { optional = true, version = "6.0.1", path = "../swc_ecma_minifier" } diff --git a/crates/swc_ecma_codegen/Cargo.toml b/crates/swc_ecma_codegen/Cargo.toml index cd3ef81ba6d9..59f830f3ec0f 100644 --- a/crates/swc_ecma_codegen/Cargo.toml +++ b/crates/swc_ecma_codegen/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_codegen" repository = "https://github.com/swc-project/swc.git" -version = "5.0.0" +version = "5.0.1" [features] # This does not enable serde for ast nodes. diff --git a/crates/swc_ecma_lints/Cargo.toml b/crates/swc_ecma_lints/Cargo.toml index d2796b8876c2..811e86acbb5f 100644 --- a/crates/swc_ecma_lints/Cargo.toml +++ b/crates/swc_ecma_lints/Cargo.toml @@ -32,7 +32,7 @@ swc_ecma_utils = { version = "6.0.0", path = "../swc_ecma_utils" } swc_ecma_visit = { version = "5.0.0", path = "../swc_ecma_visit" } [dev-dependencies] -swc_ecma_codegen = { version = "5.0.0", path = "../swc_ecma_codegen" } +swc_ecma_codegen = { version = "5.0.1", path = "../swc_ecma_codegen" } swc_ecma_parser = { version = "6.0.1", path = "../swc_ecma_parser" } swc_ecma_transforms_base = { version = "6.0.2", path = "../swc_ecma_transforms_base" } testing = { version = "5.0.0", path = "../testing" } diff --git a/crates/swc_ecma_minifier/Cargo.toml b/crates/swc_ecma_minifier/Cargo.toml index b8946f1076d5..fe51c0359007 100644 --- a/crates/swc_ecma_minifier/Cargo.toml +++ b/crates/swc_ecma_minifier/Cargo.toml @@ -61,7 +61,7 @@ swc_config = { version = "1.0.0", path = "../swc_config", features = [ swc_ecma_ast = { version = "5.0.0", path = "../swc_ecma_ast", features = [ "serde", ] } -swc_ecma_codegen = { version = "5.0.0", path = "../swc_ecma_codegen" } +swc_ecma_codegen = { version = "5.0.1", path = "../swc_ecma_codegen" } swc_ecma_parser = { version = "6.0.1", path = "../swc_ecma_parser" } swc_ecma_transforms_base = { version = "6.0.2", path = "../swc_ecma_transforms_base" } swc_ecma_transforms_optimization = { version = "6.0.0", path = "../swc_ecma_transforms_optimization" } diff --git a/crates/swc_ecma_preset_env/Cargo.toml b/crates/swc_ecma_preset_env/Cargo.toml index f7d4aa4777c0..4b73c512537b 100644 --- a/crates/swc_ecma_preset_env/Cargo.toml +++ b/crates/swc_ecma_preset_env/Cargo.toml @@ -44,7 +44,7 @@ codspeed-criterion-compat = { workspace = true } criterion = { workspace = true } pretty_assertions = { workspace = true } -swc_ecma_codegen = { version = "5.0.0", path = "../swc_ecma_codegen" } +swc_ecma_codegen = { version = "5.0.1", path = "../swc_ecma_codegen" } swc_ecma_parser = { version = "6.0.1", path = "../swc_ecma_parser" } testing = { version = "5.0.0", path = "../testing" } diff --git a/crates/swc_ecma_transforms/Cargo.toml b/crates/swc_ecma_transforms/Cargo.toml index 292d01821f51..7afade9a7eb2 100644 --- a/crates/swc_ecma_transforms/Cargo.toml +++ b/crates/swc_ecma_transforms/Cargo.toml @@ -50,7 +50,7 @@ pretty_assertions = { workspace = true } sourcemap = { workspace = true } tempfile = { workspace = true } -swc_ecma_codegen = { version = "5.0.0", path = "../swc_ecma_codegen" } +swc_ecma_codegen = { version = "5.0.1", path = "../swc_ecma_codegen" } swc_ecma_parser = { version = "6.0.1", path = "../swc_ecma_parser" } swc_ecma_transforms_testing = { version = "6.0.0", path = "../swc_ecma_transforms_testing" } testing = { version = "5.0.0", path = "../testing" } diff --git a/crates/swc_ecma_transforms_base/Cargo.toml b/crates/swc_ecma_transforms_base/Cargo.toml index ffb3f7b93f67..ea34ec36c000 100644 --- a/crates/swc_ecma_transforms_base/Cargo.toml +++ b/crates/swc_ecma_transforms_base/Cargo.toml @@ -40,7 +40,7 @@ codspeed-criterion-compat = { workspace = true } criterion = { workspace = true } rayon = { workspace = true } -swc_ecma_codegen = { version = "5.0.0", path = "../swc_ecma_codegen" } +swc_ecma_codegen = { version = "5.0.1", path = "../swc_ecma_codegen" } swc_ecma_transforms_macros = { version = "1.0.0", path = "../swc_ecma_transforms_macros" } swc_malloc = { version = "1.0.0", path = "../swc_malloc" } testing = { version = "5.0.0", path = "../testing" } diff --git a/crates/swc_ecma_transforms_proposal/Cargo.toml b/crates/swc_ecma_transforms_proposal/Cargo.toml index 49b55c89eec5..51d9c60301ac 100644 --- a/crates/swc_ecma_transforms_proposal/Cargo.toml +++ b/crates/swc_ecma_transforms_proposal/Cargo.toml @@ -35,7 +35,7 @@ swc_ecma_visit = { version = "5.0.0", path = "../swc_ecma_visit" } [dev-dependencies] serde_json = { workspace = true } -swc_ecma_codegen = { version = "5.0.0", path = "../swc_ecma_codegen" } +swc_ecma_codegen = { version = "5.0.1", path = "../swc_ecma_codegen" } swc_ecma_parser = { version = "6.0.1", path = "../swc_ecma_parser" } swc_ecma_transforms_compat = { version = "7.0.0", path = "../swc_ecma_transforms_compat" } swc_ecma_transforms_testing = { version = "6.0.0", path = "../swc_ecma_transforms_testing" } diff --git a/crates/swc_ecma_transforms_react/Cargo.toml b/crates/swc_ecma_transforms_react/Cargo.toml index 832c587e22b7..929773d1339c 100644 --- a/crates/swc_ecma_transforms_react/Cargo.toml +++ b/crates/swc_ecma_transforms_react/Cargo.toml @@ -39,7 +39,7 @@ swc_ecma_utils = { version = "6.0.0", path = "../swc_ecma_utils" } swc_ecma_visit = { version = "5.0.0", path = "../swc_ecma_visit" } [dev-dependencies] -swc_ecma_codegen = { version = "5.0.0", path = "../swc_ecma_codegen/" } +swc_ecma_codegen = { version = "5.0.1", path = "../swc_ecma_codegen/" } swc_ecma_transforms_compat = { version = "7.0.0", path = "../swc_ecma_transforms_compat/" } swc_ecma_transforms_testing = { version = "6.0.0", path = "../swc_ecma_transforms_testing" } testing = { version = "5.0.0", path = "../testing" } diff --git a/crates/swc_ecma_transforms_testing/Cargo.toml b/crates/swc_ecma_transforms_testing/Cargo.toml index adc191254895..ac4e1a4621e3 100644 --- a/crates/swc_ecma_transforms_testing/Cargo.toml +++ b/crates/swc_ecma_transforms_testing/Cargo.toml @@ -26,7 +26,7 @@ swc_common = { version = "5.0.0", path = "../swc_common", features = [ "sourcemap", ] } swc_ecma_ast = { version = "5.0.0", path = "../swc_ecma_ast" } -swc_ecma_codegen = { version = "5.0.0", path = "../swc_ecma_codegen" } +swc_ecma_codegen = { version = "5.0.1", path = "../swc_ecma_codegen" } swc_ecma_parser = { version = "6.0.1", path = "../swc_ecma_parser" } swc_ecma_testing = { version = "5.0.0", path = "../swc_ecma_testing" } swc_ecma_transforms_base = { version = "6.0.2", path = "../swc_ecma_transforms_base" } diff --git a/crates/swc_ecma_transforms_typescript/Cargo.toml b/crates/swc_ecma_transforms_typescript/Cargo.toml index 4c75dd9e276f..6b881789b982 100644 --- a/crates/swc_ecma_transforms_typescript/Cargo.toml +++ b/crates/swc_ecma_transforms_typescript/Cargo.toml @@ -28,7 +28,7 @@ swc_ecma_visit = { version = "5.0.0", path = "../swc_ecma_visit" } codspeed-criterion-compat = { workspace = true } criterion = { workspace = true } -swc_ecma_codegen = { version = "5.0.0", path = "../swc_ecma_codegen" } +swc_ecma_codegen = { version = "5.0.1", path = "../swc_ecma_codegen" } swc_ecma_parser = { version = "6.0.1", path = "../swc_ecma_parser" } swc_ecma_transforms_compat = { version = "7.0.0", path = "../swc_ecma_transforms_compat" } swc_ecma_transforms_proposal = { version = "6.0.0", path = "../swc_ecma_transforms_proposal" } diff --git a/crates/swc_ecmascript/Cargo.toml b/crates/swc_ecmascript/Cargo.toml index b6b040448cb9..2e164f2b39ef 100644 --- a/crates/swc_ecmascript/Cargo.toml +++ b/crates/swc_ecmascript/Cargo.toml @@ -39,7 +39,7 @@ typescript = ["typescript-parser", "swc_ecma_transforms/typescript"] [dependencies] swc_ecma_ast = { version = "5.0.0", path = "../swc_ecma_ast" } -swc_ecma_codegen = { version = "5.0.0", path = "../swc_ecma_codegen", optional = true } +swc_ecma_codegen = { version = "5.0.1", path = "../swc_ecma_codegen", optional = true } swc_ecma_minifier = { version = "6.0.1", path = "../swc_ecma_minifier", optional = true } swc_ecma_parser = { version = "6.0.1", path = "../swc_ecma_parser", optional = true, default-features = false } swc_ecma_preset_env = { version = "8.0.0", path = "../swc_ecma_preset_env", optional = true } diff --git a/crates/swc_fast_ts_strip/Cargo.toml b/crates/swc_fast_ts_strip/Cargo.toml index 7df702d7bd12..e61af14174dd 100644 --- a/crates/swc_fast_ts_strip/Cargo.toml +++ b/crates/swc_fast_ts_strip/Cargo.toml @@ -21,7 +21,7 @@ swc_common = { version = "5.0.0", path = "../swc_common", features = [ "sourcemap", ] } swc_ecma_ast = { version = "5.0.0", path = "../swc_ecma_ast" } -swc_ecma_codegen = { version = "5.0.0", path = "../swc_ecma_codegen" } +swc_ecma_codegen = { version = "5.0.1", path = "../swc_ecma_codegen" } swc_ecma_parser = { version = "6.0.1", path = "../swc_ecma_parser" } swc_ecma_transforms_base = { version = "6.0.2", path = "../swc_ecma_transforms_base" } swc_ecma_transforms_typescript = { version = "6.0.0", path = "../swc_ecma_transforms_typescript" } diff --git a/crates/swc_html_minifier/Cargo.toml b/crates/swc_html_minifier/Cargo.toml index c29cfeca2f70..eb82b20906fa 100644 --- a/crates/swc_html_minifier/Cargo.toml +++ b/crates/swc_html_minifier/Cargo.toml @@ -33,7 +33,7 @@ swc_css_codegen = { version = "5.0.0", path = "../swc_css_codegen", optional = t swc_css_minifier = { version = "5.0.0", path = "../swc_css_minifier", optional = true } swc_css_parser = { version = "5.0.0", path = "../swc_css_parser", optional = true } swc_ecma_ast = { version = "5.0.0", path = "../swc_ecma_ast" } -swc_ecma_codegen = { version = "5.0.0", path = "../swc_ecma_codegen", features = [ +swc_ecma_codegen = { version = "5.0.1", path = "../swc_ecma_codegen", features = [ "serde-impl", ] } swc_ecma_minifier = { version = "6.0.1", path = "../swc_ecma_minifier", features = [ diff --git a/crates/swc_node_bundler/Cargo.toml b/crates/swc_node_bundler/Cargo.toml index c9898fc79198..6f62b677b6e6 100644 --- a/crates/swc_node_bundler/Cargo.toml +++ b/crates/swc_node_bundler/Cargo.toml @@ -38,7 +38,7 @@ swc_common = { version = "5.0.0", path = "../swc_common", features = [ "concurrent", ] } swc_ecma_ast = { version = "5.0.0", path = "../swc_ecma_ast" } -swc_ecma_codegen = { version = "5.0.0", path = "../swc_ecma_codegen" } +swc_ecma_codegen = { version = "5.0.1", path = "../swc_ecma_codegen" } swc_ecma_loader = { version = "5.0.0", path = "../swc_ecma_loader" } swc_ecma_parser = { version = "6.0.1", path = "../swc_ecma_parser" } swc_ecma_transforms = { version = "8.0.0", path = "../swc_ecma_transforms" } diff --git a/crates/swc_typescript/Cargo.toml b/crates/swc_typescript/Cargo.toml index 990c71079d93..b1558543e641 100644 --- a/crates/swc_typescript/Cargo.toml +++ b/crates/swc_typescript/Cargo.toml @@ -21,7 +21,7 @@ swc_ecma_visit = { version = "5.0.0", path = "../swc_ecma_visit" } [dev-dependencies] -swc_ecma_codegen = { version = "5.0.0", path = "../swc_ecma_codegen" } +swc_ecma_codegen = { version = "5.0.1", path = "../swc_ecma_codegen" } swc_ecma_parser = { version = "6.0.1", path = "../swc_ecma_parser" } swc_ecma_transforms_base = { version = "6.0.2", path = "../swc_ecma_transforms_base" } testing = { version = "5.0.0", path = "../testing" }