fix(vite-plugin-angular): discover files from tsconfig path directories and wildcards#2291
fix(vite-plugin-angular): discover files from tsconfig path directories and wildcards#2291benpsnyder wants to merge 26 commits intoanalogjs:alphafrom
Conversation
…e test coverage for Angular plugin
…tive inspection
…es for local and GitHub paths
… file overrides for Analog packages
…SR handling in Angular and Nitro plugins
…align Angular runtime/compiler patch set
…oning user config and environments
…o plugins by clarifying HMR behavior and config handling
…d comments do not interfere with directive detection
…SS comment handling for directive detection
… for Tailwind reference detection and improving test case timeout
…mentHostWithResources, enhancing error management in CSS processing
…urn message for better error visibility
…ancing experimental options and test coverage
…th handling and emit affected files support
…and test coverage - Enhanced documentation for the selectorless compilation option in the Angular plugin. - Added tests to ensure top-level selectorless configuration takes precedence over legacy settings. - Updated logic to maintain consistency between top-level and legacy experimental configurations. - Improved handling of selectorless support detection in the live reload plugin.
✅ Deploy Preview for analog-blog ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for analog-app ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
📝 WalkthroughWalkthroughThis pull request extends the Vite Angular plugin with enhanced debug telemetry for emit operations and improves TypeScript configuration handling for project references. The changes introduce tsconfig wrapping logic that computes expanded root sets from direct roots, compiler option paths, and recursive references, along with normalization of Angular virtual file request IDs (specifically Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Key observations
🚥 Pre-merge checks | ✅ 1 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
packages/vite-plugin-angular/src/lib/angular-vite-plugin-live-reload.spec.ts (1)
576-613: Windows/@fs/resolution test validates the normalization fix.The test confirms that Angular emit output is correctly resolved when Vite transforms pass
/@fs/C:/...style ids, which occurs during SSR or cross-environment builds on Windows.Consider adding a follow-up test (or inline assertion) for lowercase drive letters (
/@fs/c:/...) to document the case-insensitivity guarantee, though the regex[A-Za-z]does handle it.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/vite-plugin-angular/src/lib/angular-vite-plugin-live-reload.spec.ts` around lines 576 - 613, Add an extra assertion to the existing test "resolves Angular emit output for Windows /@fs/ transform ids" to also exercise a lowercase drive-letter path: duplicate or reuse windowsComponentId but with a lowercase drive letter (e.g., `/@fs/c:/project/src/app/demo.component.ts`) and call plugin.transform.handler the same way (using setupLiveReloadPlugin emitAffectedFiles entry and the transform handler invocation) then assert the transformed result still equals { code: emittedCode, map: null } to document case-insensitivity of the resolution.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In
`@packages/vite-plugin-angular/src/lib/angular-vite-plugin-live-reload.spec.ts`:
- Around line 576-613: Add an extra assertion to the existing test "resolves
Angular emit output for Windows /@fs/ transform ids" to also exercise a
lowercase drive-letter path: duplicate or reuse windowsComponentId but with a
lowercase drive letter (e.g., `/@fs/c:/project/src/app/demo.component.ts`) and
call plugin.transform.handler the same way (using setupLiveReloadPlugin
emitAffectedFiles entry and the transform handler invocation) then assert the
transformed result still equals { code: emittedCode, map: null } to document
case-insensitivity of the resolution.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 180f2114-cd7d-4789-8626-51245429c5d3
⛔ Files ignored due to path filters (1)
docs/debugging.mdis excluded by none and included by none
📒 Files selected for processing (3)
packages/vite-plugin-angular/src/lib/angular-vite-plugin-live-reload.spec.tspackages/vite-plugin-angular/src/lib/angular-vite-plugin.tspackages/vite-plugin-angular/src/lib/utils/debug.ts
…directory and wildcard support - Added new directories and files to the live reload test setup for improved coverage. - Updated path mappings to include newly created directories and wildcard patterns. - Enhanced assertions to ensure proper exclusion of certain paths in generated configurations.
PR Checklist
Closes none
Affected scope
Recommended merge strategy for maintainer [optional]
Commit preservation note [optional]
What is the new behavior?
angular-vite-plugin-live-reloadcoverage for directory-based and wildcard-based path mappings.link:-based local package wiring, and consumer validation steps for debugging local or GitHub-based Analog builds.Test plan
nx format:checkpnpm buildpnpm nx test vite-plugin-angularDoes this PR introduce a breaking change?
Other information
alphabranch.