Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ng update @angular/cli for custom builders #24741

Closed
1 task
wszydlak opened this issue Feb 17, 2023 · 3 comments
Closed
1 task

ng update @angular/cli for custom builders #24741

wszydlak opened this issue Feb 17, 2023 · 3 comments

Comments

@wszydlak
Copy link

wszydlak commented Feb 17, 2023

Command

update

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

No response

Description

Currently if I use custom builders (such as @angular-builders/custom-webpack) doing ng update @angular/cli skips some updates (for version 15 it doesn't update main karma file). This is due to migration step which checks if builder target is @angular-devkit/build-angular:karma. There should be a way to do migrations also for custom builders (which are using @angular-devkit/build-angular with webpack and index.html customizations under the hood).

At least i expect Angular migrations to work with community well known custom builders (such as @angular-builders/custom-webpack or ngx-build-plus), ideally it should work for any custom builders. Maybe migrations should not be checking only @angular-devkit/build-angular builders?

Minimal Reproduction

  1. Set "builder": "@angular-builders/custom-webpack:karma", for "test" architect in angular.json file
  2. Run ng update @angular/cli

Exception or Error

Main karma file is not updated, but it should be updated.

Your Environment

Angular CLI: 14.2.10
Node: 16.19.0
Package Manager: npm 8.19.3 
OS: darwin arm64

Angular: 14.2.12
... animations, common, compiler, compiler-cli, core, forms
... language-service, localize, platform-browser
... platform-browser-dynamic, router, service-worker

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.1402.10
@angular-devkit/core         14.2.10
@angular-devkit/schematics   14.2.10
@angular/cli                 14.2.10
@schematics/angular          14.2.10
rxjs                         7.5.7
typescript                   4.7.4

Anything else relevant?

No response

@alan-agius4
Copy link
Collaborator

Hi, this is behaviour is intended by design.

These 3rd party builders are not supported by the Angular team. Therefore it is the responsibility of the custom builder author to provide a migration as the Angular CLI does not know which options these builders provide, how they are used internally and how they interact together.

If needed the migrations can be extended by the 3rd party author, this is already being done by other 3rd parties like NX.

@wszydlak
Copy link
Author

Hi @alan-agius4, thanks for clarification, i already reported this problem in just-jeb/angular-builders#1342

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Mar 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants