Commit ff5bf7a
fix: version-gate Angular 19 runtime instructions (#107)
Angular 19.2 runtime uses different instructions than Angular 20+:
- Combined `propertyInterpolate*`/`attributeInterpolate*`/`stylePropInterpolate*`/
`styleMapInterpolate*`/`classMapInterpolate*` instead of nested
`property(interpolate*())` calls
- `hostProperty` instead of `domProperty`
This adds `supports_value_interpolation()` (>= 20) and `supports_dom_property()`
(>= 20) version gates so the compiler emits the correct instructions based on
the target Angular version.
Also refactors the chaining phase's CHAIN_COMPATIBILITY from LazyLock<FxHashMap>
to a const fn match lookup, and fixes `reify_interpolation` to preserve trailing
empty strings when extra positional args (sanitizer, namespace, unit) follow.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent c04418c commit ff5bf7a
File tree
18 files changed
+1344
-108
lines changed- crates/oxc_angular_compiler
- src
- component
- pipeline
- phases
- reify
- statements
- r3
- tests
- snapshots
18 files changed
+1344
-108
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
48 | 65 | | |
49 | 66 | | |
50 | 67 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
| 66 | + | |
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| |||
2423 | 2423 | | |
2424 | 2424 | | |
2425 | 2425 | | |
2426 | | - | |
2427 | | - | |
| 2426 | + | |
| 2427 | + | |
| 2428 | + | |
| 2429 | + | |
| 2430 | + | |
| 2431 | + | |
2428 | 2432 | | |
2429 | 2433 | | |
2430 | 2434 | | |
| |||
3111 | 3115 | | |
3112 | 3116 | | |
3113 | 3117 | | |
| 3118 | + | |
3114 | 3119 | | |
3115 | 3120 | | |
3116 | 3121 | | |
| |||
3134 | 3139 | | |
3135 | 3140 | | |
3136 | 3141 | | |
3137 | | - | |
| 3142 | + | |
| 3143 | + | |
3138 | 3144 | | |
3139 | 3145 | | |
3140 | 3146 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
261 | 261 | | |
262 | 262 | | |
263 | 263 | | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
264 | 281 | | |
265 | 282 | | |
266 | 283 | | |
| |||
601 | 618 | | |
602 | 619 | | |
603 | 620 | | |
| 621 | + | |
| 622 | + | |
604 | 623 | | |
605 | 624 | | |
606 | 625 | | |
| |||
646 | 665 | | |
647 | 666 | | |
648 | 667 | | |
| 668 | + | |
649 | 669 | | |
650 | 670 | | |
651 | 671 | | |
| |||
654 | 674 | | |
655 | 675 | | |
656 | 676 | | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
657 | 687 | | |
658 | 688 | | |
659 | 689 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3941 | 3941 | | |
3942 | 3942 | | |
3943 | 3943 | | |
| 3944 | + | |
| 3945 | + | |
| 3946 | + | |
| 3947 | + | |
| 3948 | + | |
| 3949 | + | |
| 3950 | + | |
| 3951 | + | |
| 3952 | + | |
| 3953 | + | |
3944 | 3954 | | |
3945 | 3955 | | |
3946 | 3956 | | |
3947 | 3957 | | |
3948 | 3958 | | |
3949 | 3959 | | |
3950 | 3960 | | |
| 3961 | + | |
3951 | 3962 | | |
3952 | 3963 | | |
3953 | 3964 | | |
| |||
0 commit comments