Skip to content

build: update to latest Angular version and TypeScript 4.1 #21238

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

Merged
merged 1 commit into from
Dec 14, 2020

Conversation

crisbeto
Copy link
Member

@crisbeto crisbeto commented Dec 7, 2020

Updates to the latest versions of Angular and TypeScript.

Note: I'm assuming that this is merge safe, because the framework is on TS 4.1 already.

@google-cla google-cla bot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Dec 7, 2020
@crisbeto crisbeto changed the title build: update to TypeScript 4.1 build: update to latest Angular version and TypeScript 4.1 Dec 7, 2020
@crisbeto crisbeto marked this pull request as ready for review December 7, 2020 16:48
@crisbeto crisbeto requested review from devversion, jelbourn, mmalerba and a team as code owners December 7, 2020 16:48
@crisbeto crisbeto added merge safe P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent target: minor This PR is targeted for the next minor release labels Dec 7, 2020
Copy link
Member

@jelbourn jelbourn left a comment

Choose a reason for hiding this comment

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

LGTM

@jelbourn jelbourn added the action: merge The PR is ready for merge by the caretaker label Dec 7, 2020
@crisbeto crisbeto removed the action: merge The PR is ready for merge by the caretaker label Dec 7, 2020
@crisbeto crisbeto marked this pull request as draft December 8, 2020 21:01
@IgorMinar
Copy link
Contributor

These tests are failing due to:

TypeError: fn.bind is not a function
	    at newTrustedFunctionForJIT (node_modules/@angular/compiler/bundles/compiler.umd.js:7406:19)
	    at JitEvaluator.evaluateCode (node_modules/@angular/compiler/bundles/compiler.umd.js:7464:56)
	    at JitEvaluator.evaluateStatements (node_modules/@angular/compiler/bundles/compiler.umd.js:7438:25)
	    at CompilerFacadeImpl.jitExpression (node_modules/@angular/compiler/bundles/compiler.umd.js:21200:41)

Which seems to be coming from https://github.com/angular/angular/blob/b08fd0c18c131917577fc4c952c3d9f42b1e54fa/packages/compiler/src/output/output_jit_trusted_types.ts#L131

And the test fail when executing on Chrome 83.

I wonder if this version of Chrome has an incomplete implementation of trusted types or something. @bjarkler can you please weigh in?

@crisbeto you could also try to update the chrome version to 87.

@bjarkler
Copy link
Contributor

This is indeed due to a browser bug. Specifically, calling eval with a TrustedScript just returns its value as a string instead of evaluating it as a script, resulting in fn.bind being undefined. This bug was introduced in Chrome 83 and fixed in Chrome 84. Upgrading should fix the test failure. (With Chrome 87 already hitting stable, Chrome 83's userbase should have dropped down to a negligible size by now.)

@crisbeto crisbeto force-pushed the ts-4.1-update branch 3 times, most recently from a9e9f54 to 5c53619 Compare December 11, 2020 06:13
@crisbeto
Copy link
Member Author

crisbeto commented Dec 11, 2020

Thank you for looking into it @IgorMinar @bjarkler. It looks like what was happening was that Browserstack was identifying the Chromium-based Edge 83 as Chrome 83 which threw me off, because my assumption was that we were always testing against the latest version of Chrome. Bumping it up to 87 resolved the issue. Unblocking the PR now.

@crisbeto crisbeto marked this pull request as ready for review December 11, 2020 06:14
@crisbeto crisbeto added the action: merge The PR is ready for merge by the caretaker label Dec 11, 2020
Updates to the latest versions of Angular and TypeScript.
@mmalerba mmalerba merged commit 07bb027 into angular:master Dec 14, 2020
@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 14, 2021
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 cla: yes PR author has agreed to Google's Contributor License Agreement P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent target: minor This PR is targeted for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants