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

feat(core): support TypeScript 4.9 #48005

Closed
wants to merge 1 commit into from
Closed

Conversation

crisbeto
Copy link
Member

@crisbeto crisbeto commented Nov 9, 2022

Updates to TypeScript 4.9 and resolves some of the errors and deprecation warnings that showed up as a result.

@angular-robot angular-robot bot added the detected: feature PR contains a feature commit label Nov 9, 2022
@crisbeto crisbeto force-pushed the ts-4.9 branch 6 times, most recently from 34baaab to 98d9d6f Compare November 9, 2022 21:01
@@ -275,6 +278,78 @@ export const getDecorators: (node: ts.Node) => readonly ts.Decorator[] | undefin
export const getModifiers: (node: ts.Node) => readonly ts.Modifier[] | undefined =
IS_AFTER_TS_48 ? (ts as any).getModifiers : node => node.modifiers;

/** Type of `ts.factory.CreateParameterDeclaration` in TS 4.9+. */
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All these backwards-compatible versions are here to avoid deprecation warnings, rather than compilation errors like during the 4.8 update.

@crisbeto crisbeto added action: review The PR is still awaiting reviews from at least one requested reviewer area: core Issues related to the framework runtime target: minor This PR is targeted for the next minor release labels Nov 9, 2022
@ngbot ngbot bot modified the milestone: Backlog Nov 9, 2022
@crisbeto crisbeto marked this pull request as ready for review November 9, 2022 21:26
@ngbot ngbot bot added this to the Backlog milestone Nov 9, 2022
@crisbeto crisbeto force-pushed the ts-4.9 branch 2 times, most recently from 39acefc to 0483be5 Compare November 11, 2022 10:03
* TODO(crisbeto): this is a backwards-compatibility layer for versions of TypeScript less than 4.9.
* We should remove it once we have dropped support for the older versions.
*/
function createImportDeclaration(
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kind of annoying to have to duplicate this function, but I didn't want the schematics code to do deep imports into the compiler.

@@ -98,7 +98,7 @@
"@types/jasmine-ajax": "^3.3.1",
"@types/jasminewd2": "^2.0.8",
"@types/multimatch": "^4.0.0",
"@types/node": "^14.15.0",
"@types/node": "^16.11.7",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just noting here that we do still support Node 14, so we'll have to be careful with using the Node 16 types in the repo.

Copy link
Contributor

@JiaLiPassion JiaLiPassion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

package.json Outdated Show resolved Hide resolved
Updates to TypeScript 4.9 and resolves some of the errors and deprecation warnings that showed up as a result.
@crisbeto
Copy link
Member Author

crisbeto commented Dec 5, 2022

Pushed another change to bump to the 4.9 stable version.

Copy link
Member

@josephperrott josephperrott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@crisbeto crisbeto added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Dec 6, 2022
@AndrewKushnir
Copy link
Contributor

This PR was merged into the repository by commit dd42974.

@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 Jan 6, 2023
trekladyone pushed a commit to trekladyone/angular that referenced this pull request Feb 1, 2023
Updates to TypeScript 4.9 and resolves some of the errors and deprecation warnings that showed up as a result.

PR Close angular#48005
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker area: core Issues related to the framework runtime detected: feature PR contains a feature commit target: minor This PR is targeted for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants