Angular-cli: Migration to Angular 10.1 doesn't update TypeScript version to 4

Created on 4 Sep 2020  路  2Comments  路  Source: angular/angular-cli

馃悶 Bug report

Command (mark with an x)


  • [ ] new
  • [ ] build
  • [ ] serve
  • [ ] test
  • [ ] e2e
  • [ ] generate
  • [ ] add
  • [x] update
  • [ ] lint
  • [ ] xi18n
  • [ ] run
  • [ ] config
  • [ ] help
  • [ ] version
  • [ ] doc

Is this a regression?


Not sure if this is a regression or not.

Description

When you update to 10.1 version, your TypeScript version won't be updated. It retains as ~3.9.5". As I know, Angular 10.1 supports TypeScript@4, due to https://github.com/angular/angular-cli/pull/18319

馃敩 Minimal Reproduction

  1. clone it https://github.com/destus90/angular-ts-update-issue
  2. run npm ci
  3. run ng update @angular/core @angular/cli

    馃敟 Exception or Error

    
    
    
    
    

    馃實 Your Environment

    
    
    
    
    

    Anything else relevant?

Most helpful comment

Hi @destus90,

This is working as intended.

Angular 10.1 still supports TypeScript 3.9.x, and therefore TypeScript 3.9.x is still within the supported range, therefore ng update @angular/core will not update the TypeScript version automatically. If you want to use TypeScript 4.0 in an existing application you'll need to opt-in manually by either running ng update typescript or updating the package.json.

The main reason for this is that TypeScript minor versions are breaking and it's likely that updating the TypeScript 4.0.2 will cause compilation errors, which is not ideal when updating between minor.

All 2 comments

Hi @destus90,

This is working as intended.

Angular 10.1 still supports TypeScript 3.9.x, and therefore TypeScript 3.9.x is still within the supported range, therefore ng update @angular/core will not update the TypeScript version automatically. If you want to use TypeScript 4.0 in an existing application you'll need to opt-in manually by either running ng update typescript or updating the package.json.

The main reason for this is that TypeScript minor versions are breaking and it's likely that updating the TypeScript 4.0.2 will cause compilation errors, which is not ideal when updating between minor.

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