-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
build: update to TypeScript 4.8 #25505
Conversation
5f2b966
to
987462f
Compare
@@ -44,7 +44,7 @@ | |||
"karma-jasmine-html-reporter": "~1.7.0", | |||
"selenium-webdriver": "3.6.0", | |||
"ts-node": "~10.7.0", | |||
"typescript": "file:../../node_modules/typescript", | |||
"typescript": "~4.7.2", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to lock down the TS version of all of these integration tests, because the CLI hasn't been updated to handle 4.8 yet.
Updates the repo to TypeScript 4.8 and resolves some of the breaking changes. I've only kept the schematics code backwards-compatible since the rest of the changes are to our own tooling.
@@ -26,7 +26,7 @@ import {MatDatepickerBase, MatDatepickerControl} from './datepicker-base'; | |||
host: {'(click)': '_applySelection()'}, | |||
}) | |||
export class MatDatepickerApply { | |||
constructor(private _datepicker: MatDatepickerBase<MatDatepickerControl<unknown>, unknown>) {} | |||
constructor(private _datepicker: MatDatepickerBase<MatDatepickerControl<any>, unknown>) {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had to go for any
here, because 4.7 infers it as unknown
while 4.8 infers it as {}
and we need to support both.
@@ -730,7 +736,7 @@ export class HammerGesturesMigration extends DevkitMigration<null> { | |||
|
|||
const sourceFile = rootModuleSymbol.valueDeclaration.getSourceFile(); | |||
const metadata = getDecoratorMetadata( | |||
sourceFile, | |||
sourceFile as Ts48MigrationAny, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These were causing a type mismatch so I had to temporarily cast to any
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 — can likely remove this code at some point anyway
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also this is actually why we wanted to keep to the schematic/angular utilities as part of our sources 🤷
@@ -730,7 +736,7 @@ export class HammerGesturesMigration extends DevkitMigration<null> { | |||
|
|||
const sourceFile = rootModuleSymbol.valueDeclaration.getSourceFile(); | |||
const metadata = getDecoratorMetadata( | |||
sourceFile, | |||
sourceFile as Ts48MigrationAny, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 — can likely remove this code at some point anyway
@@ -730,7 +736,7 @@ export class HammerGesturesMigration extends DevkitMigration<null> { | |||
|
|||
const sourceFile = rootModuleSymbol.valueDeclaration.getSourceFile(); | |||
const metadata = getDecoratorMetadata( | |||
sourceFile, | |||
sourceFile as Ts48MigrationAny, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also this is actually why we wanted to keep to the schematic/angular utilities as part of our sources 🤷
@@ -218,17 +218,17 @@ | |||
"tsickle": "0.39.1", | |||
"tslint": "^6.1.3", | |||
"tsutils": "^3.21.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is tsutils still used somewhere now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only thing we're using it for now is to iterate over the comments of a node which we may be able to refactor as well, but the tsutils
implementation seemed a bit more involved to me so I decided to leave it.
Updates the repo to TypeScript 4.8 and resolves some of the breaking changes. I've only kept the schematics code backwards-compatible since the rest of the changes are to our own tooling. (cherry picked from commit e2a1216)
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Updates the repo to TypeScript 4.8 and resolves some of the breaking changes. I've only kept the schematics code backwards-compatible since the rest of the changes are to our own tooling.