Skip to content

fix: version-gate conditionalCreate/conditionalBranchCreate for Angular 19 support#106

Merged
Brooooooklyn merged 1 commit intomainfrom
fix/angular-version-gating-conditional-create
Mar 13, 2026
Merged

fix: version-gate conditionalCreate/conditionalBranchCreate for Angular 19 support#106
Brooooooklyn merged 1 commit intomainfrom
fix/angular-version-gating-conditional-create

Conversation

@Brooooooklyn
Copy link
Member

@Brooooooklyn Brooooooklyn commented Mar 13, 2026

Angular 19 does not have ɵɵconditionalCreate/ɵɵconditionalBranchCreate
runtime instructions (introduced in Angular 20). When angularVersion < 20,
emit ɵɵtemplate instead for @if/@switch blocks. Also wire angularVersion
from PluginOptions through to the compiler pipeline.

Closes #105

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com


Note

Medium Risk
Changes codegen for @if/@switch create ops based on a new Angular-version flag; incorrect version propagation could generate runtime-incompatible instructions for a given target.

Overview
Adds Angular v20 feature detection for ɵɵconditionalCreate/ɵɵconditionalBranchCreate and version-gates control-flow create op emission: when targeting Angular < 20, @if/@switch blocks now emit ɵɵtemplate instead of the v20-only conditional create instructions.

Wires an optional angularVersion through the ingest/compilation pipeline (including the Vite plugin PluginOptionsTransformOptions) and adds integration tests + snapshots to verify Angular 19 vs default (latest) output.

Written by Cursor Bugbot for commit 408e8da. This will update automatically on new commits. Configure here.

@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

Copy link
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

…ar 19 support

Angular 19 does not have ɵɵconditionalCreate/ɵɵconditionalBranchCreate
runtime instructions (introduced in Angular 20). When angularVersion < 20,
emit ɵɵtemplate instead for @if/@switch blocks. Also wire angularVersion
from PluginOptions through to the compiler pipeline.

Closes #105

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Brooooooklyn Brooooooklyn force-pushed the fix/angular-version-gating-conditional-create branch from a5ebb8c to 408e8da Compare March 13, 2026 04:58
@Brooooooklyn Brooooooklyn merged commit 6277584 into main Mar 13, 2026
4 checks passed
@Brooooooklyn Brooooooklyn deleted the fix/angular-version-gating-conditional-create branch March 13, 2026 06:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

angular() plugin silently ignores angularVersion option and requires Angular 20 runtime (undocumented)

1 participant