Commit 7c8590e
chore(deps): update oxc to ^0.129.0 (#261)
* chore(deps): update oxc to ^0.129.0
* fix: Handle oxc 0.129.0 parameter property field declarations in JIT mode
In oxc 0.129.0, the TypeScript transform now generates field declarations
for constructor parameter properties (e.g., `constructor(private foo: Bar)`
generates `foo;` field declaration). This breaks JIT mode because we need
decorated fields preserved but parameter property fields removed.
Solution:
1. Before oxc transform: collect parameter property names from constructor
parameters that have accessibility modifiers, readonly, or override
2. After oxc transform: remove ONLY the field declarations that match
parameter property names AND have no decorators AND have no initializers
This approach correctly distinguishes between:
- Parameter property fields (remove): `foo;` from `constructor(private foo)`
- Decorated fields (keep): `@Input() myField;`
- Initialized fields (keep): `myField = value;`
The key insight is that JIT classes can be class expressions assigned to
variables (e.g., `let Component = class Component {...}`), not just class
declarations, so we must handle both Statement::ClassDeclaration and
Statement::VariableDeclaration with ClassExpression.
All 319 integration tests now pass.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-authored-by: Brooooooklyn <3468483+Brooooooklyn@users.noreply.github.com>
* chore: Format code with cargo fmt
Agent-Logs-Url: https://github.com/voidzero-dev/oxc-angular-compiler/sessions/8b548384-6766-4e5b-b356-b185029cf373
Co-authored-by: Brooooooklyn <3468483+Brooooooklyn@users.noreply.github.com>
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: anthropic-code-agent[bot] <242468646+Claude@users.noreply.github.com>
Co-authored-by: Brooooooklyn <3468483+Brooooooklyn@users.noreply.github.com>1 parent 34a4669 commit 7c8590e
6 files changed
Lines changed: 365 additions & 227 deletions
File tree
- crates/oxc_angular_compiler/src
- component
- output
- napi/angular-compiler/e2e/compare
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
98 | 98 | | |
99 | | - | |
100 | | - | |
101 | | - | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
| |||
0 commit comments