Repository navigation
fix(@angular/build): preserve entry-point displayName casing and validate paths - #34419
Open
alan-agius4 wants to merge 2 commits into
Open
alan-agius4 wants to merge 2 commits into
alan-agius4 wants to merge 2 commits into
Conversation
…ten bundle names - Preserve original casing in entry point `displayName` so case-sensitive TypeScript `paths` mappings resolve camelCase secondary entry points while keeping `bundleName` lowercased and flattened. - Skip static `.d.ts` and `.d.mts` subpath exports in `normalizeEntryPoints` so they are preserved as non-compiled static exports in `package.json#exports`. - Validate that resolved entry point file paths stay within `projectRoot` using `isSubDirectory`.
alan-agius4
marked this pull request as ready for review
October 20, 2026 09:09
There was a problem hiding this comment.
Code Review
This pull request updates the library entry-point normalization process by preserving casing in displayName, ignoring static declaration files (.d.ts and .d.mts) from compilation, and ensuring entry-point file paths do not escape the project root. It also adds corresponding unit tests. A review comment points out a potential issue on Windows systems where path format mismatches between projectRoot and the normalized entryFilePath could cause the subdirectory check to fail, suggesting that projectRoot also be normalized to POSIX format.
…nd flatten bundle names
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.
Summary
NormalizedEntryPoint.displayNameso case-sensitive TypeScriptpathsmappings resolve camelCase secondary entry points while keepingbundleNamelowercased..d.tsand.d.mtssubpath exports innormalizeEntryPointsso they are preserved as non-compiled static exports inpackage.json#exports.projectRootusingisSubDirectory.