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

fix(auth0): avoid use of undefined global in browser environment #11531

Merged
merged 3 commits into from
Sep 11, 2024

Conversation

Josh-Walker-GM
Copy link
Collaborator

@Josh-Walker-GM Josh-Walker-GM commented Sep 11, 2024

As part of migrating the build tool we likely removed some transpiliation that was allowing global in the browser. Switching to globalThis is a small change which fixes the issue.

I have tested this locally and confirmed the bug before and the fix after.

We could also directly use window instead but I don't really think there's anything more or less correct about that vs globalThis. I didn't really want to go down the road to adding configuration to esbuild to start adding back build time changes to support this.

@Josh-Walker-GM Josh-Walker-GM added the release:fix This PR is a fix label Sep 11, 2024
@Josh-Walker-GM Josh-Walker-GM added this to the next-release-patch milestone Sep 11, 2024
@Josh-Walker-GM Josh-Walker-GM self-assigned this Sep 11, 2024
@Josh-Walker-GM Josh-Walker-GM merged commit 1b4c558 into main Sep 11, 2024
50 checks passed
@Josh-Walker-GM Josh-Walker-GM deleted the jgmw/fix-auth0-global branch September 11, 2024 21:53
Josh-Walker-GM added a commit that referenced this pull request Sep 11, 2024
)

As part of migrating the build tool we likely removed some
transpiliation that was allowing `global` in the browser. Switching to
`globalThis` is a small change which fixes the issue.

I have tested this locally and confirmed the bug before and the fix
after.

We could also directly use `window` instead but I don't really think
there's anything more or less correct about that vs `globalThis`. I
didn't really want to go down the road to adding configuration to
esbuild to start adding back build time changes to support this.
Josh-Walker-GM added a commit that referenced this pull request Sep 12, 2024
)

As part of migrating the build tool we likely removed some
transpiliation that was allowing `global` in the browser. Switching to
`globalThis` is a small change which fixes the issue.

I have tested this locally and confirmed the bug before and the fix
after.

We could also directly use `window` instead but I don't really think
there's anything more or less correct about that vs `globalThis`. I
didn't really want to go down the road to adding configuration to
esbuild to start adding back build time changes to support this.
Josh-Walker-GM added a commit that referenced this pull request Sep 12, 2024
)

As part of migrating the build tool we likely removed some
transpiliation that was allowing `global` in the browser. Switching to
`globalThis` is a small change which fixes the issue.

I have tested this locally and confirmed the bug before and the fix
after.

We could also directly use `window` instead but I don't really think
there's anything more or less correct about that vs `globalThis`. I
didn't really want to go down the road to adding configuration to
esbuild to start adding back build time changes to support this.
Josh-Walker-GM added a commit that referenced this pull request Sep 12, 2024
)

As part of migrating the build tool we likely removed some
transpiliation that was allowing `global` in the browser. Switching to
`globalThis` is a small change which fixes the issue.

I have tested this locally and confirmed the bug before and the fix
after.

We could also directly use `window` instead but I don't really think
there's anything more or less correct about that vs `globalThis`. I
didn't really want to go down the road to adding configuration to
esbuild to start adding back build time changes to support this.
Josh-Walker-GM added a commit that referenced this pull request Sep 12, 2024
)

As part of migrating the build tool we likely removed some
transpiliation that was allowing `global` in the browser. Switching to
`globalThis` is a small change which fixes the issue.

I have tested this locally and confirmed the bug before and the fix
after.

We could also directly use `window` instead but I don't really think
there's anything more or less correct about that vs `globalThis`. I
didn't really want to go down the road to adding configuration to
esbuild to start adding back build time changes to support this.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:fix This PR is a fix
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants