Skip to content

Commit 90591bc

Browse files
Brooooooklynclaude
andcommitted
Angular compiler: 100% material-angular match rate (625/625)
Key fixes: - Fix variable optimization for Statement ops in two-way bindings - Added transform_expressions_in_output_statement/expression helpers - Properly inline ALWAYS_INLINE alias variables into TwoWayBindingSetExpr - Resolves $index handling in @for loops with two-way bindings - Make HTML parser lenient for unclosed elements (Angular compatibility) - Remove error reporting for unclosed elements at EOF - Parser still recovers correctly by creating AST nodes - Matches Angular TypeScript compiler's lenient behavior 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 399c894 commit 90591bc

File tree

119 files changed

+7419
-1488
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

119 files changed

+7419
-1488
lines changed

crates/oxc_angular_compiler/src/component/decorator.rs

Lines changed: 761 additions & 1 deletion
Large diffs are not rendered by default.

crates/oxc_angular_compiler/src/component/transform.rs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,24 @@ pub struct TransformOptions {
7474
///
7575
/// When `None`, assumes latest Angular version (v19+ behavior).
7676
pub angular_version: Option<AngularVersion>,
77+
78+
// Component metadata overrides for template-only compilation.
79+
// These allow the build tool to pass component metadata when compiling
80+
// templates in isolation (e.g., for testing or compare tool).
81+
/// Override the CSS selector for the component.
82+
pub selector: Option<String>,
83+
84+
/// Override the standalone flag for the component.
85+
pub standalone: Option<bool>,
86+
87+
/// Override the view encapsulation mode.
88+
pub encapsulation: Option<super::metadata::ViewEncapsulation>,
89+
90+
/// Override the change detection strategy.
91+
pub change_detection: Option<super::metadata::ChangeDetectionStrategy>,
92+
93+
/// Override the preserve whitespaces setting.
94+
pub preserve_whitespaces: Option<bool>,
7795
}
7896

7997
impl Default for TransformOptions {
@@ -86,6 +104,12 @@ impl Default for TransformOptions {
86104
use_dom_only_mode: false,
87105
i18n_use_external_ids: true, // Angular's JIT default
88106
angular_version: None, // None means assume latest (v19+ behavior)
107+
// Metadata overrides default to None (use extracted/default values)
108+
selector: None,
109+
standalone: None,
110+
encapsulation: None,
111+
change_detection: None,
112+
preserve_whitespaces: None,
89113
}
90114
}
91115
}

0 commit comments

Comments
 (0)