Repository navigation
feat(@schematics/angular): add use-library-builder migration to migrate from ng-packagr - #34232
Conversation
f08895d to
8a5e256
Compare
dd4e9fb to
c6c9faf
Compare
There was a problem hiding this comment.
Code Review
This pull request introduces a new migration schematic, use-library-builder, designed to transition Angular library projects from the legacy ng-packagr builder to the new @angular/build:library builder. The migration handles transferring target options, discovering and mapping secondary entry points to package.json exports, and cleaning up obsolete configuration files and dependencies. Feedback on the implementation suggests refactoring a while loop in the directory traversal logic to avoid assignment within the loop condition, which improves code readability and prevents potential linter warnings.
8ac844b to
0788bdb
Compare
…te from ng-packagr Adds an optional migration for v22.3.0 to migrate library projects from ng-packagr to the @angular/build:library builder. The migration: - Discovers and converts primary and secondary entry points into the library package.json exports map. - Migrates assets and style preprocessor options from ng-package.json. - Configures compilationMode: 'full' for the development configuration unless already configured in tsconfig. - Deletes ng-package.json files and removes ngPackage from package.json. - Removes ng-packagr dependency and ensures @angular/build is present when no other ng-packagr targets remain.
0788bdb to
178b3d1
Compare
…o migrate from ng-packagr
|
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. |
Adds an optional migration for v22.3.0 to migrate library projects from
ng-packagrto the@angular/build:librarybuilder.The migration:
package.jsonexportsmap.ng-package.json.compilationMode: 'full'for thedevelopmentconfiguration unless already configured intsconfig.ng-package.jsonfiles and removesngPackagefrompackage.json.ng-packagrdependency and ensures@angular/buildis present when no otherng-packagrtargets remain.