Angular-cli: Add new script 'ng update'

Created on 13 Aug 2017  路  4Comments  路  Source: angular/angular-cli

Feature Request

- [X] feature request

Description

When update the version of angular/cli, use ng update to update the configuration files like tsling.json and tsconfig.json etc. or and postinstall hooks to auto update the configuration files.

RFC / discussion / question feature

Most helpful comment

This is something that we talk about every now and then... It's true that a lot of issues are due to bad upgrades. Configuration items like the ones listed by @BurningDog could be upgraded automatically. A health check would also be nice, like verifying incompatible options or packages aren't set.

All 4 comments

That would be great, but any of these things could have been manually changed. What if the author wants those changes preserved? Then any time angular-cli is upgraded their changes would be overwritten.

Currently when I upgrade angular-cli, I generate an entirely new project structure and then compare every file I can find against my own files, including:

  • versions in package.json
  • new packages in packages.json
  • .angular-cli.json
  • karma.conf.js
  • protractor.conf.js
  • tsconfig.json
  • tslint.json
  • src/polyfills.ts
  • src/test.ts
  • src/tsconfig.app.json
  • src/tsconfig.spec.json

It's some manual work but I'm not sure how this could be automatically done.

There are many issues created from developers that do not update their apps properly, probably because they think that just changing the version in package.json is enough. There is #7334 and many more issues because of this.

This is something that we talk about every now and then... It's true that a lot of issues are due to bad upgrades. Configuration items like the ones listed by @BurningDog could be upgraded automatically. A health check would also be nice, like verifying incompatible options or packages aren't set.

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._

Was this page helpful?
0 / 5 - 0 ratings

Related issues

donaldallen picture donaldallen  路  3Comments

jmurphzyo picture jmurphzyo  路  3Comments

gotschmarcel picture gotschmarcel  路  3Comments

IngvarKofoed picture IngvarKofoed  路  3Comments

brtnshrdr picture brtnshrdr  路  3Comments