-
Notifications
You must be signed in to change notification settings - Fork 26.6k
refactor: remove support for TypeScript 3.8 #37129
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
Conversation
Blocking until a release that supports both 3.8 and 3.9 is cut, since this is required to move CLI off TS 3.8 and Components land their TS 3.9 changes |
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.
Couple of suggestions.
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.
LGTM! Thank you! @alan-agius4 you rock!
Reviewed-for: global-approvers
@alan-agius4 Can you look at the CI failure? |
This comment has been minimized.
This comment has been minimized.
A Googler has manually verified that the CLAs look good. (Googler, please make sure the reason for overriding the CLA status is clearly documented in these comments.) ℹ️ Googlers: Go here for more info. |
A Googler has manually verified that the CLAs look good. (Googler, please make sure the reason for overriding the CLA status is clearly documented in these comments.) ℹ️ Googlers: Go here for more info. |
I rebased this PR and tried to use the latest green master SHA from the components repo. If that doesn't help, then we are likely dealing with some real incompatibility which will need to be investigated. |
The failure is related to the emit helpers typescript bug microsoft/TypeScript#38501 In components TS 3.9 PR, they get around this by using |
@alan-agius4 what would the cherry-pick look like? what is this |
The importHelpers change is this one: angular/components#19336 (comment), Ie: setting The emitted helpers causes a runtime error in UMDs. I don’t see any reason why this could impact the Angular eco system for a couple of reasons.
Side note: this issue will be solved in TS 3.9.3 via microsoft/TypeScript#38502 |
Awesome. Thank you @alan-agius4! However I'm still confused about why is the CI job failing and what do we need to do to make it green? Waiting for 3.9.3 is one option, but is there another option that would allow us to merge this PR sooner? |
@IgorMinar, the CI is failing because we are cloning the material repo and run a number of tests. But their testing setup in master doesn’t yet work with TS3.9 and exposes the TS helper bug, which was worked-around by using The components team seem to be holding off their TS 3.9 PR (angular/components#19336) because there is no Angular versions that supports TS 3.9 on NPM yet. Following a convo with @kara, she mentioned that a release that supports both TS3.8 and TS 3.9 will be cut on Monday. Fortunately, there are a number of options that we can go with to merged without a TS release. Option 1:
Option 2:
Option 3
Option 4
Option 5
Note: whichever option we go for we always need this to land after the release on Monday, because to finish TS 3.9 support in the CLI we need a release a version that supports both because the current version of NGCC on NPM doesn't work with TS 3.9, thus the CLI TS 3.9 CI is red. In a nutshell the problem here is, FW release is blocking CLI and Components from updating to TS 3.9. And FW is blocked from removing TS 3.8 support because the components repo doesn't yet work on TS 3.9. Moving everything into one repo is the ultimate goal, and would resolve issues like this. |
Aha! I see. I made in incorrect assumption that components repo was already on 3.9 because I saw them merge the PR but I see that that PR didn't work so we are fixing that but now that is blocked on FW. I suggest we:
|
Some properties in the DOM lib interface `CSSStyleDeclaration` are not assignable such as `getPropertyPriority` and `getPropertyValue`. With this change we filter out properties which type is not `string` to fix the below error; ```ts ERROR in src/app/layout/doc-viewer/doc-viewer.component.ts:202:43 - error TS2322: Type 'string' is not assignable to type 'string & ((property: string) => string) & ((property: string) => string) & ((index: number) => string) & ((property: string) => string) & ((property: string, value: string | null, priority?: string | undefined) => void)'. Type 'string' is not assignable to type '(property: string) => string'. 202 ? this.void$.pipe(tap(() => elem.style[prop] = to)) ~~~~~~~~~~~~~~~~ ```
Some tests currently fail with a TS error ``` TS2783: 'id' is specified more than once, so this usage will be overwritten. ``` This changes fixes that.
'components-repo-unit-tests' CI job has been temporary disabled until the Components team support building and testing their repo with TypeScript 3.9. The TS 3.9 update is being done in angular/components#19336. Once this gets merged we should re-enable this CI job. More context on why this had to be disabled can be found: #37129 (comment)
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
Some properties in the DOM lib interface `CSSStyleDeclaration` are not assignable such as `getPropertyPriority` and `getPropertyValue`. With this change we filter out properties which type is not `string` to fix the below error; ```ts ERROR in src/app/layout/doc-viewer/doc-viewer.component.ts:202:43 - error TS2322: Type 'string' is not assignable to type 'string & ((property: string) => string) & ((property: string) => string) & ((index: number) => string) & ((property: string) => string) & ((property: string, value: string | null, priority?: string | undefined) => void)'. Type 'string' is not assignable to type '(property: string) => string'. 202 ? this.void$.pipe(tap(() => elem.style[prop] = to)) ~~~~~~~~~~~~~~~~ ``` PR Close #37129
Some tests currently fail with a TS error ``` TS2783: 'id' is specified more than once, so this usage will be overwritten. ``` This changes fixes that. PR Close #37129
'components-repo-unit-tests' CI job has been temporary disabled until the Components team support building and testing their repo with TypeScript 3.9. The TS 3.9 update is being done in angular/components#19336. Once this gets merged we should re-enable this CI job. More context on why this had to be disabled can be found: #37129 (comment) PR Close #37129
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. |
With this change we drop support for TypeScript 3.8 and remove all related tests. BREAKING CHANGE: TypeScript 3.8 is no longer supported, please update to TypeScript 3.9. PR Close angular#37129
Some properties in the DOM lib interface `CSSStyleDeclaration` are not assignable such as `getPropertyPriority` and `getPropertyValue`. With this change we filter out properties which type is not `string` to fix the below error; ```ts ERROR in src/app/layout/doc-viewer/doc-viewer.component.ts:202:43 - error TS2322: Type 'string' is not assignable to type 'string & ((property: string) => string) & ((property: string) => string) & ((index: number) => string) & ((property: string) => string) & ((property: string, value: string | null, priority?: string | undefined) => void)'. Type 'string' is not assignable to type '(property: string) => string'. 202 ? this.void$.pipe(tap(() => elem.style[prop] = to)) ~~~~~~~~~~~~~~~~ ``` PR Close angular#37129
Some tests currently fail with a TS error ``` TS2783: 'id' is specified more than once, so this usage will be overwritten. ``` This changes fixes that. PR Close angular#37129
'components-repo-unit-tests' CI job has been temporary disabled until the Components team support building and testing their repo with TypeScript 3.9. The TS 3.9 update is being done in angular/components#19336. Once this gets merged we should re-enable this CI job. More context on why this had to be disabled can be found: angular#37129 (comment) PR Close angular#37129
With this change we drop support for TypeScript 3.8 and remove all related tests.
BREAKING CHANGE:
TypeScript 3.8 is no longer supported, please update to TypeScript 3.9