Repository navigation
fix(@angular/build): preserve entry-point displayName casing and validate paths - #34419
alan-agius4 merged 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`.
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 PR was merged into the repository. The changes were merged into the following branches:
|
|
This pull request has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
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.