diff --git a/Cargo.lock b/Cargo.lock index 8dd5c669cbe..5da8ac1233c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2342,9 +2342,9 @@ checksum = "11000e6ba5020e53e7cc26f73b91ae7d5496b4977851479edb66b694c0675c21" [[package]] name = "rkyv" -version = "0.7.39" +version = "0.7.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cec2b3485b07d96ddfd3134767b8a447b45ea4eb91448d0a35180ec0ffd5ed15" +checksum = "517a3034eb2b1499714e9d1e49b2367ad567e07639b69776d35e259d9c27cca6" dependencies = [ "bytecheck", "hashbrown 0.12.0", @@ -2357,9 +2357,9 @@ dependencies = [ [[package]] name = "rkyv_derive" -version = "0.7.39" +version = "0.7.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6eaedadc88b53e36dd32d940ed21ae4d850d5916f2581526921f553a72ac34c4" +checksum = "505c209ee04111a006431abf39696e640838364d67a107c559ababaf6fd8c9dd" dependencies = [ "proc-macro2", "quote", @@ -2815,7 +2815,7 @@ dependencies = [ [[package]] name = "swc" -version = "0.214.7" +version = "0.214.8" dependencies = [ "ahash", "ansi_term", @@ -2871,7 +2871,7 @@ dependencies = [ [[package]] name = "swc_atoms" -version = "0.4.6" +version = "0.4.7" dependencies = [ "bytecheck", "once_cell", @@ -2942,7 +2942,7 @@ dependencies = [ [[package]] name = "swc_common" -version = "0.27.9" +version = "0.27.10" dependencies = [ "ahash", "anyhow", @@ -3000,7 +3000,7 @@ dependencies = [ [[package]] name = "swc_core" -version = "0.7.16" +version = "0.7.18" dependencies = [ "binding_macros", "once_cell", @@ -3043,7 +3043,7 @@ dependencies = [ [[package]] name = "swc_css_ast" -version = "0.107.1" +version = "0.107.2" dependencies = [ "bytecheck", "is-macro", @@ -3177,7 +3177,7 @@ dependencies = [ [[package]] name = "swc_ecma_ast" -version = "0.90.8" +version = "0.90.9" dependencies = [ "arbitrary", "bitflags", @@ -3829,7 +3829,7 @@ dependencies = [ [[package]] name = "swc_html_ast" -version = "0.24.5" +version = "0.24.6" dependencies = [ "bytecheck", "is-macro", @@ -4021,7 +4021,7 @@ dependencies = [ [[package]] name = "swc_plugin_proxy" -version = "0.18.10" +version = "0.18.11" dependencies = [ "better_scoped_tls", "bytecheck", @@ -4034,7 +4034,7 @@ dependencies = [ [[package]] name = "swc_plugin_runner" -version = "0.71.12" +version = "0.71.13" dependencies = [ "anyhow", "criterion", diff --git a/crates/swc/Cargo.toml b/crates/swc/Cargo.toml index e00759d0b5f..07a7f9527bc 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.214.7" +version = "0.214.8" [lib] bench = false @@ -90,7 +90,7 @@ swc_ecma_visit = { version = "0.76.5", path = "../swc_ecma_visit" } swc_error_reporters = { version = "0.11.4", path = "../swc_error_reporters" } swc_node_comments = { version = "0.14.4", path = "../swc_node_comments" } swc_plugin_proxy = { version = "0.18.7", path = "../swc_plugin_proxy", optional = true } -swc_plugin_runner = { version = "0.71.7", path = "../swc_plugin_runner", optional = true, default-features = false } +swc_plugin_runner = { version = "0.71.13", path = "../swc_plugin_runner", optional = true, default-features = false } swc_timer = { version = "0.15.4", path = "../swc_timer" } swc_visit = { version = "0.5.2", path = "../swc_visit" } tracing = "0.1.32" diff --git a/crates/swc_atoms/Cargo.toml b/crates/swc_atoms/Cargo.toml index 1aacd4962ca..4c9435faecb 100644 --- a/crates/swc_atoms/Cargo.toml +++ b/crates/swc_atoms/Cargo.toml @@ -7,7 +7,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_atoms" repository = "https://github.com/swc-project/swc.git" -version = "0.4.6" +version = "0.4.7" [lib] bench = false @@ -18,7 +18,7 @@ rkyv-impl = ["rkyv", "bytecheck"] [dependencies] bytecheck = { version = "0.6.9", optional = true } once_cell = "1" -rkyv = { version = "0.7.39", optional = true } +rkyv = { version = "=0.7.38", optional = true } rustc-hash = "1.1.0" serde = "1" string_cache = "0.8.4" diff --git a/crates/swc_common/Cargo.toml b/crates/swc_common/Cargo.toml index a8ffe1a2ef3..9baf8a2819f 100644 --- a/crates/swc_common/Cargo.toml +++ b/crates/swc_common/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_common" repository = "https://github.com/swc-project/swc.git" -version = "0.27.9" +version = "0.27.10" [package.metadata.docs.rs] all-features = true @@ -44,13 +44,13 @@ from_variant = { version = "0.1.3", path = "../from_variant" } num-bigint = "0.4" once_cell = "1.10.0" parking_lot = { version = "0.12.0", optional = true } -rkyv = { version = "0.7.39", optional = true } +rkyv = { version = "=0.7.38", optional = true } rustc-hash = "1.1.0" serde = { version = "1.0.119", features = ["derive"] } siphasher = "0.3.9" sourcemap = { version = "6", optional = true } string_cache = "0.8.4" -swc_atoms = { version = "0.4.5", path = "../swc_atoms" } +swc_atoms = { version = "0.4.6", path = "../swc_atoms" } swc_eq_ignore_macros = { version = "0.1.1", path = "../swc_eq_ignore_macros" } swc_visit = { version = "0.5.2", path = "../swc_visit" } termcolor = { version = "1.0", optional = true } diff --git a/crates/swc_core/Cargo.toml b/crates/swc_core/Cargo.toml index 04ea58a771c..e3deb6f8843 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.7.16" +version = "0.7.18" [package.metadata.docs.rs] features = [ "common_perf", @@ -225,10 +225,10 @@ wasmer-wasi = { optional = true, version = "3.0.0-beta", default-features = fals # swc_* dependencies binding_macros = { optional = true, version = "0.2.3", path = "../binding_macros" } -swc = { optional = true, version = "0.214.7", path = "../swc" } -swc_atoms = { optional = true, version = "0.4.6", path = "../swc_atoms" } +swc = { optional = true, version = "0.214.8", path = "../swc" } +swc_atoms = { optional = true, version = "0.4.7", path = "../swc_atoms" } swc_bundler = { optional = true, version = "0.177.3", path = "../swc_bundler" } -swc_common = { optional = true, version = "0.27.9", path = "../swc_common" } +swc_common = { optional = true, version = "0.27.10", path = "../swc_common" } swc_ecma_ast = { optional = true, version = "0.90.8", path = "../swc_ecma_ast" } swc_ecma_loader = { optional = true, version = "0.39.4", path = "../swc_ecma_loader" } swc_ecma_parser = { optional = true, version = "0.117.4", path = "../swc_ecma_parser" } @@ -242,10 +242,10 @@ swc_node_bundler = { optional = true, version = "0.0.2", path = "../s swc_nodejs_common = { optional = true, version = "0.0.1", path = "../swc_nodejs_common" } swc_plugin = { optional = true, version = "0.89.1", path = "../swc_plugin" } swc_plugin_macro = { optional = true, version = "0.9.7", path = "../swc_plugin_macro" } -swc_plugin_proxy = { optional = true, version = "0.18.10", path = "../swc_plugin_proxy" } +swc_plugin_proxy = { optional = true, version = "0.18.11", path = "../swc_plugin_proxy" } swc_trace_macro = { optional = true, version = "0.1.2", path = "../swc_trace_macro" } # TODO: eventually swc_plugin_runner needs to remove default features -swc_plugin_runner = { optional = true, version = "0.71.12", path = "../swc_plugin_runner", default-features = false } +swc_plugin_runner = { optional = true, version = "0.71.13", path = "../swc_plugin_runner", default-features = false } [dev-dependencies] testing = { version = "0.29.4", path = "../testing" } diff --git a/crates/swc_css_ast/Cargo.toml b/crates/swc_css_ast/Cargo.toml index 61774bf5b83..13b96edd22f 100644 --- a/crates/swc_css_ast/Cargo.toml +++ b/crates/swc_css_ast/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_css_ast" repository = "https://github.com/swc-project/swc.git" -version = "0.107.1" +version = "0.107.2" [lib] bench = false @@ -19,7 +19,7 @@ rkyv-impl = ["rkyv", "bytecheck", "swc_atoms/rkyv-impl", "swc_common/rkyv-impl"] [dependencies] bytecheck = { version = "0.6.9", optional = true } is-macro = "0.2.0" -rkyv = { version = "0.7.39", optional = true } +rkyv = { version = "=0.7.38", optional = true } serde = { version = "1.0.127", features = ["derive"] } string_enum = { version = "0.3.1", path = "../string_enum/" } swc_atoms = { version = "0.4.5", path = "../swc_atoms" } diff --git a/crates/swc_ecma_ast/Cargo.toml b/crates/swc_ecma_ast/Cargo.toml index 0e378ce9ac4..91575c27028 100644 --- a/crates/swc_ecma_ast/Cargo.toml +++ b/crates/swc_ecma_ast/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_ecma_ast" repository = "https://github.com/swc-project/swc.git" -version = "0.90.8" +version = "0.90.9" [package.metadata.docs.rs] all-features = true @@ -26,7 +26,7 @@ bitflags = "1" bytecheck = { version = "0.6.9", optional = true } is-macro = "0.2.0" num-bigint = { version = "0.4", features = ["serde"] } -rkyv = { version = "0.7.39", optional = true } +rkyv = { version = "=0.7.38", optional = true } scoped-tls = "1.0.0" serde = { version = "1.0.133", features = ["derive"] } string_enum = { version = "0.3.1", path = "../string_enum" } diff --git a/crates/swc_html_ast/Cargo.toml b/crates/swc_html_ast/Cargo.toml index bd213cc5968..bde641d4ea3 100644 --- a/crates/swc_html_ast/Cargo.toml +++ b/crates/swc_html_ast/Cargo.toml @@ -9,7 +9,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_html_ast" repository = "https://github.com/swc-project/swc.git" -version = "0.24.5" +version = "0.24.6" [lib] bench = false @@ -20,7 +20,7 @@ rkyv-impl = ["rkyv", "bytecheck", "swc_atoms/rkyv-impl", "swc_common/rkyv-impl"] [dependencies] bytecheck = { version = "0.6.9", optional = true } is-macro = "0.2.0" -rkyv = { version = "0.7.39", optional = true } +rkyv = { version = "=0.7.38", optional = true } serde = { version = "1.0.127", features = ["derive"] } string_enum = { version = "0.3.1", path = "../string_enum/" } swc_atoms = { version = "0.4.5", path = "../swc_atoms" } diff --git a/crates/swc_plugin_proxy/Cargo.toml b/crates/swc_plugin_proxy/Cargo.toml index 714cf4b11f9..da50e9a297d 100644 --- a/crates/swc_plugin_proxy/Cargo.toml +++ b/crates/swc_plugin_proxy/Cargo.toml @@ -5,7 +5,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_plugin_proxy" repository = "https://github.com/swc-project/swc.git" -version = "0.18.10" +version = "0.18.11" [lib] bench = false @@ -19,7 +19,7 @@ plugin-mode = [] [dependencies] better_scoped_tls = { version = "0.1.0", path = "../better_scoped_tls" } bytecheck = "0.6.9" -rkyv = "0.7.39" +rkyv = "=0.7.38" swc_common = { version = "0.27.7", path = "../swc_common", features = [ "plugin-base", ] } diff --git a/crates/swc_plugin_runner/Cargo.toml b/crates/swc_plugin_runner/Cargo.toml index 5dbb33181c5..76f8491c648 100644 --- a/crates/swc_plugin_runner/Cargo.toml +++ b/crates/swc_plugin_runner/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_plugin_runner" repository = "https://github.com/swc-project/swc.git" -version = "0.71.12" +version = "0.71.13" [lib] bench = false diff --git a/crates/swc_plugin_runner/src/imported_fn/source_map.rs b/crates/swc_plugin_runner/src/imported_fn/source_map.rs index 83a3b51e0d9..a52cb84bcc5 100644 --- a/crates/swc_plugin_runner/src/imported_fn/source_map.rs +++ b/crates/swc_plugin_runner/src/imported_fn/source_map.rs @@ -17,7 +17,7 @@ pub struct SourceMapHostEnvironment { pub memory: Option, /// Attached imported fn `__alloc` to the hostenvironment to allow any other /// imported fn can allocate guest's memory space from host runtime. - pub allocate_guest_memory: Option>, + pub alloc_guest_memory: Option>, pub source_map: Arc>>, /// A buffer to non-determined size of return value from the host. pub mutable_source_map_buffer: Arc>>, @@ -30,7 +30,7 @@ impl SourceMapHostEnvironment { ) -> SourceMapHostEnvironment { SourceMapHostEnvironment { memory: None, - allocate_guest_memory: None, + alloc_guest_memory: None, source_map: source_map.clone(), mutable_source_map_buffer: mutable_source_map_buffer.clone(), } @@ -40,9 +40,6 @@ impl SourceMapHostEnvironment { /// Returns `Loc` form given bytepos to the guest. /// Returned `Loc` is partial, which excludes `SourceFile` from original struct /// to avoid unnecessary data copying. -/// -/// PluginSourceMapProxy::lookup_char_pos internally request separately if -/// `SourceFile` is needed. #[tracing::instrument(level = "info", skip_all)] pub fn lookup_char_pos_proxy( mut env: FunctionEnvMut, @@ -66,7 +63,7 @@ pub fn lookup_char_pos_proxy( let serialized_loc_bytes = PluginSerializedBytes::try_serialize(&ret).expect("Should be serializable"); - if let Some(alloc_guest_memory) = env.data().allocate_guest_memory.clone().as_ref() { + if let Some(alloc_guest_memory) = env.data().alloc_guest_memory.clone().as_ref() { allocate_return_values_into_guest( memory, &mut env.as_store_mut(), @@ -162,7 +159,7 @@ pub fn span_to_lines_proxy( let serialized_loc_bytes = PluginSerializedBytes::try_serialize(&ret).expect("Should be serializable"); - if let Some(alloc_guest_memory) = env.data().allocate_guest_memory.clone().as_ref() { + if let Some(alloc_guest_memory) = env.data().alloc_guest_memory.clone().as_ref() { allocate_return_values_into_guest( memory, &mut env.as_store_mut(), @@ -192,7 +189,7 @@ pub fn lookup_byte_offset_proxy( let serialized_loc_bytes = PluginSerializedBytes::try_serialize(&ret).expect("Should be serializable"); - if let Some(alloc_guest_memory) = env.data().allocate_guest_memory.clone().as_ref() { + if let Some(alloc_guest_memory) = env.data().alloc_guest_memory.clone().as_ref() { allocate_return_values_into_guest( memory, &mut env.as_store_mut(), @@ -227,7 +224,7 @@ pub fn span_to_string_proxy( let serialized_loc_bytes = PluginSerializedBytes::try_serialize(&ret).expect("Should be serializable"); - if let Some(alloc_guest_memory) = env.data().allocate_guest_memory.clone().as_ref() { + if let Some(alloc_guest_memory) = env.data().alloc_guest_memory.clone().as_ref() { allocate_return_values_into_guest( memory, &mut env.as_store_mut(), @@ -262,7 +259,7 @@ pub fn span_to_filename_proxy( let serialized_loc_bytes = PluginSerializedBytes::try_serialize(&ret).expect("Should be serializable"); - if let Some(alloc_guest_memory) = env.data().allocate_guest_memory.clone().as_ref() { + if let Some(alloc_guest_memory) = env.data().alloc_guest_memory.clone().as_ref() { allocate_return_values_into_guest( memory, &mut env.as_store_mut(), diff --git a/crates/swc_plugin_runner/src/load_plugin.rs b/crates/swc_plugin_runner/src/load_plugin.rs index 556f10eea62..f222f8db58f 100644 --- a/crates/swc_plugin_runner/src/load_plugin.rs +++ b/crates/swc_plugin_runner/src/load_plugin.rs @@ -119,9 +119,10 @@ pub fn load_plugin( base_env.as_mut(store).memory = Some(memory.clone()); comments_env.as_mut(store).memory = Some(memory.clone()); - comments_env.as_mut(store).alloc_guest_memory = Some(alloc); + comments_env.as_mut(store).alloc_guest_memory = Some(alloc.clone()); source_map_host_env.as_mut(store).memory = Some(memory.clone()); + source_map_host_env.as_mut(store).alloc_guest_memory = Some(alloc); Ok(instance) } else {