Skip to content

fix: Add support for globalThis (ES2020) when injecting debug IDs to JavaScript #2271

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

Closed
wants to merge 1 commit into from

Conversation

JakeShirley
Copy link

This PR adds an additional global object to look for when injecting debug IDs into JS files.

We are using the QuickJS JavaScript engine which conforms to the ES2023 standard, and thus does not have global, self, or window, but it does have globalThis.

@szokeasaurusrex
Copy link
Member

szokeasaurusrex commented Nov 26, 2024

@JakeShirley Thanks for the PR. However, it looks like this might be a duplicate of #2162. Could you please double check, and close your PR in favor of #2162 if that is the case?

If your PR is different, please explain how it differs from the existing PR.

@JakeShirley
Copy link
Author

@szokeasaurusrex that looks like it'd fit my use case just fine, I didn't see that PR! I'll close this now.

That PR would be very useful to me :)

@gid-sentry
Copy link

gid-sentry commented Nov 27, 2024

Adding a comment here that this PR seems to be easier to push through compared to #2162 because it doesn't seem to be a breaking change. (unlike #2162) - globalThis is appended here instead of replacing the existing implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants