Skip to content

Conversation

@JeanMeche
Copy link
Member

@JeanMeche JeanMeche commented Apr 28, 2023

use globalThis for global

globalThis is now available on every runtime supported by Angular

See individual commits for the 3 impacted packages.

PR Type

What kind of change does this PR introduce?

  • Refactoring (no functional changes, no api changes)

Does this PR introduce a breaking change?

  • No

Other information

@JeanMeche JeanMeche marked this pull request as ready for review April 28, 2023 12:21
@pkozlowski-opensource pkozlowski-opensource added area: core Issues related to the framework runtime area: compiler Issues related to `ngc`, Angular's template compiler labels Apr 28, 2023
@ngbot ngbot bot modified the milestone: Backlog Apr 28, 2023
@pkozlowski-opensource pkozlowski-opensource added the action: review The PR is still awaiting reviews from at least one requested reviewer label Apr 28, 2023
@dylhunn
Copy link
Contributor

dylhunn commented Jun 10, 2023

I have no idea whether this is correct, and I'm honest not sure who to ask. Maybe @devversion?

@alfaproject
Copy link
Contributor

Isn't globalThis supported by all the browsers that Angular supports now?

@JeanMeche
Copy link
Member Author

@alfaproject You're making a goodpoint, the global definitions could be simplified now that IE has been dropped.

@JeanMeche JeanMeche changed the title Remove the WorkerGlobalScope from global Use globalThis for global Jun 11, 2023
@JeanMeche
Copy link
Member Author

@dylhunn Following @alfaproject's comment, I change the scope of the PR to actually generalize the behaviour !

@JeanMeche JeanMeche force-pushed the worker-scope branch 5 times, most recently from 9582071 to e7ce29a Compare June 11, 2023 18:05
Copy link
Member

@devversion devversion left a comment

Choose a reason for hiding this comment

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

Seems reasonable to me. I think the current logic is mostly a historic artifact

@AndrewKushnir
Copy link
Contributor

@alan-agius4 do you see any risks from SSR standpoint?

Copy link
Contributor

@alan-agius4 alan-agius4 left a comment

Choose a reason for hiding this comment

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

LGTM

`globalThis` is now available on every runtime supported by Angular
`globalThis` is now available on every runtime supported by Angular
`globalThis` is now available on every runtime supported by Angular
`globalThis` is now available on every runtime supported by Angular
jessicajaniuk pushed a commit that referenced this pull request Jul 14, 2023
`globalThis` is now available on every runtime supported by Angular

PR Close #50063
jessicajaniuk pushed a commit that referenced this pull request Jul 14, 2023
`globalThis` is now available on every runtime supported by Angular

PR Close #50063
jessicajaniuk pushed a commit that referenced this pull request Jul 14, 2023
`globalThis` is now available on every runtime supported by Angular

PR Close #50063
sunilbaba pushed a commit to sunilbaba/angular that referenced this pull request Jul 26, 2023
`globalThis` is now available on every runtime supported by Angular

PR Close angular#50063
sunilbaba pushed a commit to sunilbaba/angular that referenced this pull request Jul 26, 2023
`globalThis` is now available on every runtime supported by Angular

PR Close angular#50063
sunilbaba pushed a commit to sunilbaba/angular that referenced this pull request Jul 26, 2023
`globalThis` is now available on every runtime supported by Angular

PR Close angular#50063
sunilbaba pushed a commit to sunilbaba/angular that referenced this pull request Jul 26, 2023
`globalThis` is now available on every runtime supported by Angular

PR Close angular#50063
@JeanMeche JeanMeche deleted the worker-scope branch August 3, 2023 13:37
JeanMeche added a commit to JeanMeche/angular that referenced this pull request Aug 16, 2023
This commit fixes a regression introduced in angular#50063

Fixes angular#51382
AndrewKushnir pushed a commit that referenced this pull request Aug 21, 2023
This commit fixes a regression introduced in #50063

Fixes #51382

PR Close #51394
AndrewKushnir pushed a commit that referenced this pull request Aug 21, 2023
This commit fixes a regression introduced in #50063

Fixes #51382

PR Close #51394
@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 Sep 3, 2023
ChellappanRajan pushed a commit to ChellappanRajan/angular that referenced this pull request Jan 23, 2024
`globalThis` is now available on every runtime supported by Angular

PR Close angular#50063
ChellappanRajan pushed a commit to ChellappanRajan/angular that referenced this pull request Jan 23, 2024
`globalThis` is now available on every runtime supported by Angular

PR Close angular#50063
ChellappanRajan pushed a commit to ChellappanRajan/angular that referenced this pull request Jan 23, 2024
`globalThis` is now available on every runtime supported by Angular

PR Close angular#50063
ChellappanRajan pushed a commit to ChellappanRajan/angular that referenced this pull request Jan 23, 2024
`globalThis` is now available on every runtime supported by Angular

PR Close angular#50063
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: compiler Issues related to `ngc`, Angular's template compiler area: core Issues related to the framework runtime merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note target: minor This PR is targeted for the next minor release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants