atscott's Description of Work
Extract the TypeScript-free symbol validation (validateAndRewriteCoreSymbol) and HMR output AST dependency helpers (extractHmrDependenciesFromOutput and PotentialTopLevelReadsVisitor) into src/ngtsc/imports/src/core_symbols.ts and src/ngtsc/hmr/src/extract_dependencies_output.ts, exposed via a dedicated @angular/compiler-cli/private/hybrid_preprocessor entry point with no dependency on :compiler-cli or typescript.
PR Checklist
Please check if your PR fulfills the following requirements:
- [x] The commit message follows our guidelines: https://github.com/angular/angular/blob/main/contributing-docs/commit-message-guidelines.md
- [ ] Tests for the changes have been added (for bug fixes / features)
- [ ] Docs have been added / updated (for bug fixes / features)
PR Type
What kind of change does this PR introduce?
- [ ] Bugfix
- [ ] Feature
- [ ] Code style update (formatting, local variables)
- [x] Refactoring (no functional changes, no api changes)
- [x] Build related changes
- [ ] CI related changes
- [ ] Documentation content changes
- [ ] angular.dev application / infrastructure changes
- [ ] Other... Please describe:
What is the current behavior?
validateAndRewriteCoreSymbol, extractHmrDependenciesFromOutput, and PotentialTopLevelReadsVisitor live inside modules (src/ngtsc/imports/src/core.ts and src/ngtsc/hmr/src/extract_dependencies.ts) that depend on TypeScript and ngtsc internals, even though these helpers themselves only operate on strings and @angular/compiler output AST nodes.
Issue Number: N/A
What is the new behavior?
Those TypeScript-free helpers are extracted into standalone modules (src/ngtsc/imports/src/core_symbols.ts and src/ngtsc/hmr/src/extract_dependencies_output.ts) and re-exported from their original locations as well as a dedicated @angular/compiler-cli/private/hybrid_preprocessor entry point that depends only on @angular/compiler.
Does this PR introduce a breaking change?
- [ ] Yes
- [x] No