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: move QUEUE to globalThis scope; #76

Merged
merged 2 commits into from
Nov 30, 2020
Merged

fix: move QUEUE to globalThis scope; #76

merged 2 commits into from
Nov 30, 2020

Conversation

lukeed
Copy link
Owner

@lukeed lukeed commented Nov 30, 2020

Moves QUEUE to the globalThis scope.

This guarantees that "both halves" of uvu are using the same internal value, as described in #69

With the linked reproduction, applying this PR required no other changes in order for the reproduction to work. Additionally, these combinations all worked out of the box:

  • uvu -r esm tests on Node 14 (default)
  • ^^^ + "type": "module" on Node 14
  • uvu tests on Node 14 + "type": "module"
  • node -r esm tests/test.js on Node 14
  • ^^^ + "type": "module" on Node 14
  • node tests/test.js on Node 14 + "type": "module"

The approach still works within browsers.


Closes #69

@lukeed lukeed merged commit e419ff9 into master Nov 30, 2020
@lukeed lukeed deleted the fix/queue branch November 30, 2020 17:22
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.

TypeError: Cannot read property 'push' of undefined
1 participant