From e4d16ec4ec6035f0043c15444f5d5765d1214a63 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 26 May 2026 15:15:29 +0000 Subject: [PATCH 1/3] chore(deps): update rust crate oxc_sourcemap to v7 --- Cargo.lock | 17 +++++++++++++++-- Cargo.toml | 2 +- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index de09633c3..f2a5a9214 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1092,7 +1092,7 @@ dependencies = [ "oxc_parser", "oxc_resolver", "oxc_semantic", - "oxc_sourcemap", + "oxc_sourcemap 7.0.0", "oxc_span", "oxc_str", "oxc_transformer", @@ -1194,7 +1194,7 @@ dependencies = [ "oxc_data_structures", "oxc_index", "oxc_semantic", - "oxc_sourcemap", + "oxc_sourcemap 6.1.1", "oxc_span", "oxc_str", "oxc_syntax", @@ -1390,6 +1390,19 @@ dependencies = [ "serde_json", ] +[[package]] +name = "oxc_sourcemap" +version = "7.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db3866f9075027840e0711b52e15d2e1ba076fc5f5f01c96eeedd26375410641" +dependencies = [ + "base64-simd 0.8.0", + "json-escape-simd", + "rustc-hash", + "serde", + "serde_json", +] + [[package]] name = "oxc_span" version = "0.133.0" diff --git a/Cargo.toml b/Cargo.toml index 469ca9986..7372a2313 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -95,7 +95,7 @@ oxc_napi = "0.133" oxc_parser = "0.133" oxc_semantic = "0.133" oxc_span = "0.133" -oxc_sourcemap = "6.0.1" +oxc_sourcemap = "7.0.0" oxc_str = "0.133" oxc_transformer = "0.133" oxc_codegen = "0.133" From 2b2626c2c8c6face44b279d9697d043096388058 Mon Sep 17 00:00:00 2001 From: "anthropic-code-agent[bot]" <242468646+Claude@users.noreply.github.com> Date: Tue, 26 May 2026 15:28:18 +0000 Subject: [PATCH 2/3] fix(deps): adapt to oxc_sourcemap v7 breaking changes - Use OwnedSourceMap instead of SourceMap for owned fields - Update SourceMapBuilder to use into_owned_sourcemap() - Fix test to work with new API that returns &str directly Agent-Logs-Url: https://github.com/voidzero-dev/oxc-angular-compiler/sessions/2c790426-d826-449a-b32e-b3336d7fc754 Co-authored-by: Brooooooklyn <3468483+Brooooooklyn@users.noreply.github.com> --- .../oxc_angular_compiler/src/component/transform.rs | 4 ++-- crates/oxc_angular_compiler/src/output/emitter.rs | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/crates/oxc_angular_compiler/src/component/transform.rs b/crates/oxc_angular_compiler/src/component/transform.rs index dc548416b..fb460b9fd 100644 --- a/crates/oxc_angular_compiler/src/component/transform.rs +++ b/crates/oxc_angular_compiler/src/component/transform.rs @@ -334,7 +334,7 @@ pub struct TemplateCompileOutput { pub code: String, /// Source map (if sourcemap option was enabled). - pub map: Option, + pub map: Option, } impl TemplateCompileOutput { @@ -344,7 +344,7 @@ impl TemplateCompileOutput { } /// Create a new template compile output with code and source map. - pub fn with_source_map(code: String, map: Option) -> Self { + pub fn with_source_map(code: String, map: Option) -> Self { Self { code, map } } } diff --git a/crates/oxc_angular_compiler/src/output/emitter.rs b/crates/oxc_angular_compiler/src/output/emitter.rs index 2b0df6f95..2cc682730 100644 --- a/crates/oxc_angular_compiler/src/output/emitter.rs +++ b/crates/oxc_angular_compiler/src/output/emitter.rs @@ -229,7 +229,7 @@ impl EmitterContext { /// Returns `None` if no source file information was provided or no mappings exist. /// /// See: `packages/compiler/src/output/abstract_emitter.ts:126-184` - pub fn to_source_map(&self, generated_file: Option<&str>) -> Option { + pub fn to_source_map(&self, generated_file: Option<&str>) -> Option { // Need source file to generate a source map let source_file = self.source_file.as_ref()?; let source_url = &source_file.url; @@ -297,7 +297,7 @@ impl EmitterContext { } } - if has_mappings { Some(builder.into_sourcemap()) } else { None } + if has_mappings { Some(builder.into_owned_sourcemap()) } else { None } } /// Generate source and source map together. @@ -307,7 +307,7 @@ impl EmitterContext { pub fn to_source_with_map( &self, generated_file: Option<&str>, - ) -> (String, Option) { + ) -> (String, Option) { (self.to_source(), self.to_source_map(generated_file)) } } @@ -408,7 +408,7 @@ impl JsEmitter { expr: &OutputExpression<'a>, source_file: Arc, generated_file: Option<&str>, - ) -> (String, Option) { + ) -> (String, Option) { let mut ctx = EmitterContext::with_source_file(source_file); self.visit_expression(expr, &mut ctx); ctx.to_source_with_map(generated_file) @@ -423,7 +423,7 @@ impl JsEmitter { stmts: &[OutputStatement<'a>], source_file: Arc, generated_file: Option<&str>, - ) -> (String, Option) { + ) -> (String, Option) { let mut ctx = EmitterContext::with_source_file(source_file); self.visit_all_statements(stmts, &mut ctx); ctx.to_source_with_map(generated_file) @@ -1640,7 +1640,7 @@ mod tests { let map = ctx.to_source_map(Some("test.js")).expect("should generate source map"); // Verify the source map has the expected structure - assert!(map.get_sources().any(|s| s.as_ref() == "test.ts")); + assert!(map.get_sources().any(|s| s == "test.ts")); assert!(map.get_tokens().count() > 0); } From 6d795e323547529bf6b31ef069a0e9d145eb3f2e Mon Sep 17 00:00:00 2001 From: "anthropic-code-agent[bot]" <242468646+Claude@users.noreply.github.com> Date: Wed, 27 May 2026 09:19:05 +0000 Subject: [PATCH 3/3] chore: fix cargo fmt formatting Agent-Logs-Url: https://github.com/voidzero-dev/oxc-angular-compiler/sessions/9e752941-64ee-4f13-b3a3-525aa256eb24 Co-authored-by: Brooooooklyn <3468483+Brooooooklyn@users.noreply.github.com> --- crates/oxc_angular_compiler/src/output/emitter.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/oxc_angular_compiler/src/output/emitter.rs b/crates/oxc_angular_compiler/src/output/emitter.rs index 2cc682730..908152a5b 100644 --- a/crates/oxc_angular_compiler/src/output/emitter.rs +++ b/crates/oxc_angular_compiler/src/output/emitter.rs @@ -229,7 +229,10 @@ impl EmitterContext { /// Returns `None` if no source file information was provided or no mappings exist. /// /// See: `packages/compiler/src/output/abstract_emitter.ts:126-184` - pub fn to_source_map(&self, generated_file: Option<&str>) -> Option { + pub fn to_source_map( + &self, + generated_file: Option<&str>, + ) -> Option { // Need source file to generate a source map let source_file = self.source_file.as_ref()?; let source_url = &source_file.url;