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

Replace usages of global with globalThis #4489

Merged
merged 8 commits into from
Nov 1, 2024

Conversation

Half-Shot
Copy link
Contributor

Fixes #4450

This should solve the problem with various bundlers (Vite etc) not being happy about the usage of global, with globalThis. All modern environments support this https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis, so it's a safe change.

@Half-Shot Half-Shot requested a review from a team as a code owner October 31, 2024 10:54
@t3chguy
Copy link
Member

t3chguy commented Oct 31, 2024

Any chance of a linter to protect against regression here?

@Half-Shot
Copy link
Contributor Author

Any chance of a linter to protect against regression here?

Good idea! Let's have a look.

Copy link
Member

@richvdh richvdh left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link

@fkwp fkwp left a comment

Choose a reason for hiding this comment

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

lgtm

@Half-Shot Half-Shot added this pull request to the merge queue Nov 1, 2024
Merged via the queue into develop with commit f6a169b Nov 1, 2024
26 checks passed
@Half-Shot Half-Shot deleted the hs/replace-global-with-globalThis branch November 1, 2024 09:31
@Half-Shot Half-Shot restored the hs/replace-global-with-globalThis branch November 1, 2024 12:34
@Half-Shot
Copy link
Contributor Author

(N.B. leaving branch active for the moment as we're depending on it to unbreak some applications, once the next RC comes out this can be pruned)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-Task Tasks for the team like planning
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error: global is not defined - when creating a matrix client
4 participants