diff --git a/CHANGELOG.md b/CHANGELOG.md index 95925892d68..cf3711be0da 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,9 @@ - **(es/lints)** Implement `no-new-symbol` rule (#4076) ([b39e345](https://github.com/swc-project/swc/commit/b39e345d8e43c3e6c1491f7b75448e3b091d7b0d)) + +- **(es/module/cjs)** Support `import.meta.url` (#4087) ([d0f687b](https://github.com/swc-project/swc/commit/d0f687bf44862e737e189dc585e9f1b789291685)) + ### Testing diff --git a/Cargo.lock b/Cargo.lock index e3287588c42..c1f2163f22e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2952,7 +2952,7 @@ dependencies = [ [[package]] name = "swc" -version = "0.157.0" +version = "0.158.0" dependencies = [ "ahash", "anyhow", @@ -3009,7 +3009,7 @@ dependencies = [ [[package]] name = "swc_bundler" -version = "0.126.0" +version = "0.127.0" dependencies = [ "ahash", "anyhow", @@ -3066,7 +3066,7 @@ dependencies = [ [[package]] name = "swc_cli" -version = "0.31.0" +version = "0.32.0" dependencies = [ "anyhow", "atty", @@ -3352,7 +3352,7 @@ dependencies = [ [[package]] name = "swc_ecma_minifier" -version = "0.93.0" +version = "0.94.0" dependencies = [ "ahash", "ansi_term", @@ -3412,7 +3412,7 @@ dependencies = [ [[package]] name = "swc_ecma_preset_env" -version = "0.110.0" +version = "0.111.0" dependencies = [ "ahash", "anyhow", @@ -3467,7 +3467,7 @@ dependencies = [ [[package]] name = "swc_ecma_transforms" -version = "0.135.0" +version = "0.136.0" dependencies = [ "pretty_assertions", "sourcemap", @@ -3566,7 +3566,7 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_module" -version = "0.95.1" +version = "0.96.0" dependencies = [ "Inflector", "ahash", @@ -3591,7 +3591,7 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_optimization" -version = "0.105.0" +version = "0.106.0" dependencies = [ "ahash", "dashmap", @@ -3642,7 +3642,7 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_react" -version = "0.97.1" +version = "0.98.0" dependencies = [ "ahash", "base64 0.13.0", @@ -3691,7 +3691,7 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_typescript" -version = "0.100.0" +version = "0.101.0" dependencies = [ "serde", "swc_atoms", @@ -3738,7 +3738,7 @@ dependencies = [ [[package]] name = "swc_ecmascript" -version = "0.136.0" +version = "0.137.0" dependencies = [ "swc_ecma_ast", "swc_ecma_codegen", @@ -3782,7 +3782,7 @@ dependencies = [ [[package]] name = "swc_estree_compat" -version = "0.77.0" +version = "0.78.0" dependencies = [ "ahash", "anyhow", @@ -3984,7 +3984,7 @@ dependencies = [ [[package]] name = "swc_webpack_ast" -version = "0.75.0" +version = "0.76.0" dependencies = [ "anyhow", "rayon", diff --git a/crates/swc/Cargo.toml b/crates/swc/Cargo.toml index 0a9d0f6f2c5..6eeefcbf482 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.157.0" +version = "0.158.0" [lib] name = "swc" @@ -60,10 +60,10 @@ swc_ecma_loader = { version = "0.29.0", path = "../swc_ecma_loader", features = "node", "tsc", ] } -swc_ecma_minifier = { version = "0.93.0", path = "../swc_ecma_minifier" } +swc_ecma_minifier = { version = "0.94.0", path = "../swc_ecma_minifier" } swc_ecma_parser = { version = "0.95.0", path = "../swc_ecma_parser" } -swc_ecma_preset_env = { version = "0.110.0", path = "../swc_ecma_preset_env" } -swc_ecma_transforms = { version = "0.135.0", path = "../swc_ecma_transforms", features = [ +swc_ecma_preset_env = { version = "0.111.0", path = "../swc_ecma_preset_env" } +swc_ecma_transforms = { version = "0.136.0", path = "../swc_ecma_transforms", features = [ "compat", "module", "optimization", @@ -73,10 +73,10 @@ swc_ecma_transforms = { version = "0.135.0", path = "../swc_ecma_transforms", fe ] } swc_ecma_transforms_base = { version = "0.70.0", path = "../swc_ecma_transforms_base" } swc_ecma_transforms_compat = { version = "0.83.0", path = "../swc_ecma_transforms_compat" } -swc_ecma_transforms_optimization = { version = "0.105.0", path = "../swc_ecma_transforms_optimization" } +swc_ecma_transforms_optimization = { version = "0.106.0", path = "../swc_ecma_transforms_optimization" } swc_ecma_utils = { version = "0.74.0", path = "../swc_ecma_utils" } swc_ecma_visit = { version = "0.57.0", path = "../swc_ecma_visit" } -swc_ecmascript = { version = "0.136.0", path = "../swc_ecmascript" } +swc_ecmascript = { version = "0.137.0", path = "../swc_ecmascript" } swc_error_reporters = { version = "0.1.0", path = "../swc_error_reporters" } swc_node_comments = { version = "0.4.0", path = "../swc_node_comments" } swc_plugin_runner = { version = "0.45.0", path = "../swc_plugin_runner", optional = true, default-features = false } diff --git a/crates/swc_bundler/Cargo.toml b/crates/swc_bundler/Cargo.toml index aaf92969678..96ca790fba2 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.126.0" +version = "0.127.0" [package.metadata.docs.rs] all-features = true @@ -47,7 +47,7 @@ swc_ecma_codegen = { version = "0.98.0", path = "../swc_ecma_codegen" } swc_ecma_loader = { version = "0.29.0", path = "../swc_ecma_loader" } swc_ecma_parser = { version = "0.95.0", path = "../swc_ecma_parser" } swc_ecma_transforms_base = { version = "0.70.0", path = "../swc_ecma_transforms_base" } -swc_ecma_transforms_optimization = { version = "0.105.0", path = "../swc_ecma_transforms_optimization" } +swc_ecma_transforms_optimization = { version = "0.106.0", path = "../swc_ecma_transforms_optimization" } swc_ecma_utils = { version = "0.74.0", path = "../swc_ecma_utils" } swc_ecma_visit = { version = "0.57.0", path = "../swc_ecma_visit" } swc_fast_graph = { version = "0.5.0", path = "../swc_fast_graph/" } @@ -64,9 +64,9 @@ swc_ecma_loader = { version = "0.29.0", path = "../swc_ecma_loader", features = "node", "cache", ] } -swc_ecma_minifier = { version = "0.93.0", path = "../swc_ecma_minifier" } -swc_ecma_transforms_react = { version = "0.97.0", path = "../swc_ecma_transforms_react" } -swc_ecma_transforms_typescript = { version = "0.100.0", path = "../swc_ecma_transforms_typescript" } +swc_ecma_minifier = { version = "0.94.0", path = "../swc_ecma_minifier" } +swc_ecma_transforms_react = { version = "0.98.0", path = "../swc_ecma_transforms_react" } +swc_ecma_transforms_typescript = { version = "0.101.0", path = "../swc_ecma_transforms_typescript" } swc_node_base = { version = "0.5.0", path = "../swc_node_base" } tempfile = "3.1.0" testing = { version = "0.19.0", path = "../testing" } diff --git a/crates/swc_cli/Cargo.toml b/crates/swc_cli/Cargo.toml index b11c1b11897..d450278d110 100644 --- a/crates/swc_cli/Cargo.toml +++ b/crates/swc_cli/Cargo.toml @@ -6,7 +6,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_cli" repository = "https://github.com/swc-project/swc.git" -version = "0.31.0" +version = "0.32.0" [[bin]] name = "swc" @@ -24,7 +24,7 @@ rayon = "1" relative-path = "1.6.1" serde = { version = "1", features = ["derive"] } serde_json = { version = "1", features = ["unbounded_depth"] } -swc = { version = "0.157.0", path = "../swc" } +swc = { version = "0.158.0", path = "../swc" } swc_common = { version = "0.17.5", path = "../swc_common" } swc_trace_macro = { version = "0.1.0", path = "../swc_trace_macro" } tracing = "0.1.32" diff --git a/crates/swc_ecma_minifier/Cargo.toml b/crates/swc_ecma_minifier/Cargo.toml index 6a29a13da95..afba3ff3cef 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.93.0" +version = "0.94.0" [package.metadata.docs.rs] all-features = true @@ -35,7 +35,7 @@ swc_common = { version = "0.17.0", path = "../swc_common" } swc_ecma_ast = { version = "0.71.0", path = "../swc_ecma_ast" } swc_ecma_codegen = { version = "0.98.0", path = "../swc_ecma_codegen" } swc_ecma_parser = { version = "0.95.0", path = "../swc_ecma_parser" } -swc_ecma_transforms = { version = "0.135.0", path = "../swc_ecma_transforms/", features = [ +swc_ecma_transforms = { version = "0.136.0", path = "../swc_ecma_transforms/", features = [ "optimization", ] } swc_ecma_transforms_base = { version = "0.70.0", path = "../swc_ecma_transforms_base" } diff --git a/crates/swc_ecma_preset_env/Cargo.toml b/crates/swc_ecma_preset_env/Cargo.toml index 89534e7c8d6..c89ab3a169b 100644 --- a/crates/swc_ecma_preset_env/Cargo.toml +++ b/crates/swc_ecma_preset_env/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" include = ["Cargo.toml", "src/**/*.rs", "src/**/*.json", "data/**/*.json"] license = "Apache-2.0" name = "swc_ecma_preset_env" -version = "0.110.0" +version = "0.111.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -25,7 +25,7 @@ string_enum = { version = "0.3.1", path = "../string_enum" } swc_atoms = { version = "0.2", path = "../swc_atoms" } swc_common = { version = "0.17.0", path = "../swc_common" } swc_ecma_ast = { version = "0.71.0", path = "../swc_ecma_ast" } -swc_ecma_transforms = { version = "0.135.0", path = "../swc_ecma_transforms", features = [ +swc_ecma_transforms = { version = "0.136.0", path = "../swc_ecma_transforms", features = [ "compat", "proposal", ] } diff --git a/crates/swc_ecma_transforms/Cargo.toml b/crates/swc_ecma_transforms/Cargo.toml index 9cc8acfd31a..40af03d3fc6 100644 --- a/crates/swc_ecma_transforms/Cargo.toml +++ b/crates/swc_ecma_transforms/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_transforms" repository = "https://github.com/swc-project/swc.git" -version = "0.135.0" +version = "0.136.0" [package.metadata.docs.rs] all-features = true @@ -29,11 +29,11 @@ swc_common = { version = "0.17.0", path = "../swc_common" } swc_ecma_ast = { version = "0.71.0", path = "../swc_ecma_ast" } swc_ecma_transforms_base = { version = "0.70.0", path = "../swc_ecma_transforms_base" } swc_ecma_transforms_compat = { version = "0.83.0", path = "../swc_ecma_transforms_compat", optional = true } -swc_ecma_transforms_module = { version = "0.95.0", path = "../swc_ecma_transforms_module", optional = true } -swc_ecma_transforms_optimization = { version = "0.105.0", path = "../swc_ecma_transforms_optimization", optional = true } +swc_ecma_transforms_module = { version = "0.96.0", path = "../swc_ecma_transforms_module", optional = true } +swc_ecma_transforms_optimization = { version = "0.106.0", path = "../swc_ecma_transforms_optimization", optional = true } swc_ecma_transforms_proposal = { version = "0.91.0", path = "../swc_ecma_transforms_proposal", optional = true } -swc_ecma_transforms_react = { version = "0.97.0", path = "../swc_ecma_transforms_react", optional = true } -swc_ecma_transforms_typescript = { version = "0.100.0", path = "../swc_ecma_transforms_typescript", optional = true } +swc_ecma_transforms_react = { version = "0.98.0", path = "../swc_ecma_transforms_react", optional = true } +swc_ecma_transforms_typescript = { version = "0.101.0", path = "../swc_ecma_transforms_typescript", optional = true } swc_ecma_utils = { version = "0.74.0", path = "../swc_ecma_utils" } swc_ecma_visit = { version = "0.57.0", path = "../swc_ecma_visit" } diff --git a/crates/swc_ecma_transforms_module/Cargo.toml b/crates/swc_ecma_transforms_module/Cargo.toml index 2d31bccc401..ff6c894f225 100644 --- a/crates/swc_ecma_transforms_module/Cargo.toml +++ b/crates/swc_ecma_transforms_module/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_transforms_module" repository = "https://github.com/swc-project/swc.git" -version = "0.95.1" +version = "0.96.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] diff --git a/crates/swc_ecma_transforms_optimization/Cargo.toml b/crates/swc_ecma_transforms_optimization/Cargo.toml index ee4149586b6..9d20ab4d146 100644 --- a/crates/swc_ecma_transforms_optimization/Cargo.toml +++ b/crates/swc_ecma_transforms_optimization/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_transforms_optimization" repository = "https://github.com/swc-project/swc.git" -version = "0.105.0" +version = "0.106.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [features] @@ -38,9 +38,9 @@ tracing = "0.1.32" [dev-dependencies] swc_ecma_transforms_compat = { version = "0.83.0", path = "../swc_ecma_transforms_compat" } -swc_ecma_transforms_module = { version = "0.95.0", path = "../swc_ecma_transforms_module" } +swc_ecma_transforms_module = { version = "0.96.0", path = "../swc_ecma_transforms_module" } swc_ecma_transforms_proposal = { version = "0.91.0", path = "../swc_ecma_transforms_proposal" } -swc_ecma_transforms_react = { version = "0.97.0", path = "../swc_ecma_transforms_react" } +swc_ecma_transforms_react = { version = "0.98.0", path = "../swc_ecma_transforms_react" } swc_ecma_transforms_testing = { version = "0.72.0", path = "../swc_ecma_transforms_testing" } -swc_ecma_transforms_typescript = { version = "0.100.0", path = "../swc_ecma_transforms_typescript" } +swc_ecma_transforms_typescript = { version = "0.101.0", path = "../swc_ecma_transforms_typescript" } testing = { version = "0.19.0", path = "../testing" } diff --git a/crates/swc_ecma_transforms_react/Cargo.toml b/crates/swc_ecma_transforms_react/Cargo.toml index 9757cb1d007..11a3d07af60 100644 --- a/crates/swc_ecma_transforms_react/Cargo.toml +++ b/crates/swc_ecma_transforms_react/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_transforms_react" repository = "https://github.com/swc-project/swc.git" -version = "0.97.1" +version = "0.98.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] @@ -32,6 +32,6 @@ swc_ecma_visit = { version = "0.57.0", path = "../swc_ecma_visit" } [dev-dependencies] swc_ecma_codegen = { version = "0.98.0", path = "../swc_ecma_codegen/" } swc_ecma_transforms_compat = { version = "0.83.0", path = "../swc_ecma_transforms_compat/" } -swc_ecma_transforms_module = { version = "0.95.0", path = "../swc_ecma_transforms_module" } +swc_ecma_transforms_module = { version = "0.96.0", path = "../swc_ecma_transforms_module" } swc_ecma_transforms_testing = { version = "0.72.0", path = "../swc_ecma_transforms_testing" } testing = { version = "0.19.0", path = "../testing" } diff --git a/crates/swc_ecma_transforms_typescript/Cargo.toml b/crates/swc_ecma_transforms_typescript/Cargo.toml index e854e73a5a8..fdce7347d84 100644 --- a/crates/swc_ecma_transforms_typescript/Cargo.toml +++ b/crates/swc_ecma_transforms_typescript/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_transforms_typescript" repository = "https://github.com/swc-project/swc.git" -version = "0.100.0" +version = "0.101.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] @@ -16,7 +16,7 @@ swc_atoms = { version = "0.2", path = "../swc_atoms" } swc_common = { version = "0.17.0", path = "../swc_common" } swc_ecma_ast = { version = "0.71.0", path = "../swc_ecma_ast" } swc_ecma_transforms_base = { version = "0.70.0", path = "../swc_ecma_transforms_base" } -swc_ecma_transforms_react = { version = "0.97.0", path = "../swc_ecma_transforms_react" } +swc_ecma_transforms_react = { version = "0.98.0", path = "../swc_ecma_transforms_react" } swc_ecma_utils = { version = "0.74.0", path = "../swc_ecma_utils" } swc_ecma_visit = { version = "0.57.0", path = "../swc_ecma_visit" } diff --git a/crates/swc_ecmascript/Cargo.toml b/crates/swc_ecmascript/Cargo.toml index 9f65d9320de..4ea016b337b 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.136.0" +version = "0.137.0" [package.metadata.docs.rs] all-features = true @@ -36,10 +36,10 @@ typescript = ["typescript-parser", "swc_ecma_transforms/typescript"] swc_ecma_ast = { version = "0.71.0", path = "../swc_ecma_ast" } swc_ecma_codegen = { version = "0.98.0", path = "../swc_ecma_codegen", optional = true } swc_ecma_dep_graph = { version = "0.67.0", path = "../swc_ecma_dep_graph", optional = true } -swc_ecma_minifier = { version = "0.93.0", path = "../swc_ecma_minifier", optional = true } +swc_ecma_minifier = { version = "0.94.0", path = "../swc_ecma_minifier", optional = true } swc_ecma_parser = { version = "0.95.0", path = "../swc_ecma_parser", optional = true, default-features = false } -swc_ecma_preset_env = { version = "0.110.0", path = "../swc_ecma_preset_env", optional = true } -swc_ecma_transforms = { version = "0.135.0", path = "../swc_ecma_transforms", optional = true } +swc_ecma_preset_env = { version = "0.111.0", path = "../swc_ecma_preset_env", optional = true } +swc_ecma_transforms = { version = "0.136.0", path = "../swc_ecma_transforms", optional = true } swc_ecma_utils = { version = "0.74.0", path = "../swc_ecma_utils", optional = true } swc_ecma_visit = { version = "0.57.0", path = "../swc_ecma_visit", optional = true } diff --git a/crates/swc_estree_compat/Cargo.toml b/crates/swc_estree_compat/Cargo.toml index 8b8f467456a..bf7cb1b9d91 100644 --- a/crates/swc_estree_compat/Cargo.toml +++ b/crates/swc_estree_compat/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_estree_compat" repository = "https://github.com/swc-project/swc.git" -version = "0.77.0" +version = "0.78.0" [package.metadata.docs.rs] all-features = true @@ -33,9 +33,9 @@ swc_node_comments = { version = "0.4.0", path = "../swc_node_comments/" } [dev-dependencies] pretty_assertions = "1.1" -swc = { version = "0.157.0", path = "../swc" } +swc = { version = "0.158.0", path = "../swc" } swc_ecma_ast = { version = "0.71.0", path = "../swc_ecma_ast" } swc_ecma_parser = { version = "0.95.0", path = "../swc_ecma_parser" } -swc_ecma_transforms = { version = "0.135.0", path = "../swc_ecma_transforms/" } +swc_ecma_transforms = { version = "0.136.0", path = "../swc_ecma_transforms/" } testing = { version = "0.19.0", path = "../testing" } walkdir = "2" diff --git a/crates/swc_webpack_ast/Cargo.toml b/crates/swc_webpack_ast/Cargo.toml index 532eadcb2d4..353ca7102d9 100644 --- a/crates/swc_webpack_ast/Cargo.toml +++ b/crates/swc_webpack_ast/Cargo.toml @@ -5,7 +5,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_webpack_ast" repository = "https://github.com/swc-project/swc.git" -version = "0.75.0" +version = "0.76.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -22,7 +22,7 @@ swc_ecma_transforms_base = { version = "0.70.0", path = "../swc_ecma_transforms_ swc_ecma_utils = { version = "0.74.0", path = "../swc_ecma_utils" } swc_ecma_visit = { version = "0.57.0", path = "../swc_ecma_visit" } swc_estree_ast = { version = "0.7.0", path = "../swc_estree_ast" } -swc_estree_compat = { version = "0.77.0", path = "../swc_estree_compat" } +swc_estree_compat = { version = "0.78.0", path = "../swc_estree_compat" } swc_timer = { version = "0.5.0", path = "../swc_timer" } tracing = "0.1.32"