Skip to content

fix(@schematics/angular): skip other projects when finding secondary entry points in use-library-builder - #34604

Closed
MeAkib wants to merge 1 commit into
angular:mainfrom
MeAkib:fix/use-library-builder-root-library
Closed

MeAkib wants to merge 1 commit into
angular:mainfrom
MeAkib:fix/use-library-builder-root-library

Conversation

@MeAkib

@MeAkib MeAkib commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

The migration discovers secondary entry points by walking the library's root directory. For a library at the workspace root, this includes the directories of the other projects, so their ng-packagr configurations are added to the root library's exports and deleted before those libraries are migrated.

Skip the root directories of other workspace projects while discovering secondary entry points. A new spec fails without this change.

…entry points in use-library-builder

The migration discovers secondary entry points by walking the library's root
directory. For a library at the workspace root, this includes the directories of
the other projects, so their ng-packagr configurations are added to the root
library's `exports` and deleted before those libraries are migrated.

Skip the root directories of other workspace projects while discovering
secondary entry points. A new spec fails without this change.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the use-library-builder migration schematic to prevent treating nested workspace projects (such as libraries of a workspace root library) as secondary entry points. It achieves this by collecting the normalized root directories of all workspace projects and skipping them during the secondary entry point discovery process. A corresponding unit test has been added to verify this behavior. I have no feedback to provide as there are no review comments and the implementation is correct and well-tested.

@alan-agius4

Copy link
Copy Markdown
Collaborator

Thank you for the pull request. Closing this as invalid because ngPackagr itself discovers secondary entry points by globbing from the primary configuration directory without awareness of angular.json project roots, so having a separate library project nested inside a root library is not a valid setup.

@MeAkib
MeAkib deleted the fix/use-library-builder-root-library branch October 30, 2026 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants