fix(@schematics/angular): preserve the workspace build version during migration#32875
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Sorry, something went wrong.
There was a problem hiding this comment.
Code Review
This pull request updates the use-application-builder migration to reuse the existing version of the builder when migrating to @angular/build. It introduces logic to check for the current version of @angular-devkit/build-angular or @angular/build in the package.json and uses that version for the new @angular/build dependency, falling back to a default version if neither is found. A new test case has been added to verify this version preservation. I have no feedback to provide.
Sorry, something went wrong.
alan-agius4
left a comment
There was a problem hiding this comment.
See comment
Sorry, something went wrong.
alan-agius4
left a comment
There was a problem hiding this comment.
Please sign the CLA and squash the commits. Thanks
Sorry, something went wrong.
Summary
@angular-devkit/build-angularwhen theuse-application-buildermigration adds@angular/build@angular/buildversion if it is already present, and only then fall back to the repo default18.2.xworkspace so the migration no longer upgrades the package to an incompatible20.xreleaseTesting
corepack pnpm exec prettier --check packages/schematics/angular/migrations/use-application-builder/migration.ts packages/schematics/angular/migrations/use-application-builder/migration_spec.tscorepack pnpm exec eslint packages/schematics/angular/migrations/use-application-builder/migration.ts packages/schematics/angular/migrations/use-application-builder/migration_spec.tsgit diff --checkcorepack pnpm -s ng-dev format stagedcorepack pnpm bazel test //packages/schematics/angular:test --lockfile_mode=update --test_output=errors --verbose_failuresunder portable Nodev24.13.1withBAZEL_SHpointed at Git Bash; the target analyzed successfully but the Windows host then failed in Bazel's TypeScript toolchain before the schematic suite ran because the expectedaspect_rules_jsTypeScript entry point was missing from the generated execrootFixes #30696