fix(angular): fix 4 compiler bugs and add regression tests#23
Merged
Conversation
Fix directive factory namespace resolution to always use namespace-prefixed DI tokens (i1.Store instead of bare Store), ensuring correctness after TypeScript import elision. Fix i18n ɵɵi18nPostprocess to emit with namespace prefix. Fix view/content query chaining to emit separate statements per query instead of chaining calls. Add Angular linker Vite plugin and clean up unused sourcemap/jit parameters. Includes 6 Rust integration tests and 7 NAPI compare fixtures covering all regressions. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
b5ebf09 to
b479471
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Fix directive factory namespace resolution to always use namespace-prefixed
DI tokens (i1.Store instead of bare Store), ensuring correctness after
TypeScript import elision. Fix i18n ɵɵi18nPostprocess to emit with namespace
prefix. Fix view/content query chaining to emit separate statements per query
instead of chaining calls. Add Angular linker Vite plugin and clean up unused
sourcemap/jit parameters.
Includes 6 Rust integration tests and 7 NAPI compare fixtures covering all
regressions.
Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com
Note
Medium Risk
Touches core codegen paths for DI factories, queries, and NgModule injector imports and adds a new linker that rewrites library JS, so regressions could impact runtime behavior across many apps despite added test coverage.
Overview
Fixes several Angular runtime correctness issues and adds a new package linking capability.
DI factory generation now consistently emits namespace-prefixed tokens (including
@Inject(...)and directive ctor deps) by introducing aresolve_factory_dep_namespacespass and adjusting directive token extraction, preventing failures after TypeScript import elision. Query generation is updated to emit one statement per view/content query (no chained calls) for Angular 20’s void-returning query APIs, andɵɵi18nPostprocessis now emitted asi0.ɵɵi18nPostprocessto avoid runtimeReferenceError.NgModule injector
importsnow preserve raw import expressions (e.g.StoreModule.forRoot(...), spreads) for correctModuleWithProvidersresolution. Adds an Angular partial-declaration linker (ɵɵngDeclare*→ɵɵdefine*, excluding components) exposed via NAPI, plus a Vite plugin that runs it overnode_modules, and expands regression coverage with new Rust integration tests and NAPI compare fixtures.Written by Cursor Bugbot for commit b479471. This will update automatically on new commits. Configure here.