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: use globalThis instead of global for browser support #928

Merged

Conversation

yannbf
Copy link
Contributor

@yannbf yannbf commented Apr 14, 2022

What:

This PR fixes a regression introduced here

Why:

At Storybook we have a package @storybook/testing-library which we use user-event and we'd love to upgrade to v14, but until browser support is sorted we have to hold off.

How:

This PR changes a reference from global to globalThis to enable browser support.

Checklist:

  • Documentation
  • Tests (tested this fix in a project + ran tests in this repo)
  • Ready to be merged

@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 35cb049:

Sandbox Source
userEvent-dom Configuration
userEvent-react Configuration

@codecov
Copy link

codecov bot commented Apr 14, 2022

Codecov Report

Merging #928 (35cb049) into main (ef826a4) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##              main      #928   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           85        85           
  Lines         1785      1785           
  Branches       641       641           
=========================================
  Hits          1785      1785           
Impacted Files Coverage Δ
src/options.ts 100.00% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ef826a4...35cb049. Read the comment docs.

Copy link
Member

@ph-fritsche ph-fritsche left a comment

Choose a reason for hiding this comment

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

Thanks for contributing to this library ❤️

@yannbf
Copy link
Contributor Author

yannbf commented Apr 15, 2022

Thanks for contributing to this library ❤️

Thanks for your amazing work in this library ❤️

@ph-fritsche ph-fritsche changed the base branch from main to globals-merge April 16, 2022 10:02
@ph-fritsche ph-fritsche merged commit 497c14d into testing-library:globals-merge Apr 16, 2022
@ph-fritsche
Copy link
Member

@all-contributors add @yannbf code

@allcontributors
Copy link
Contributor

@ph-fritsche

I've put up a pull request to add @yannbf! 🎉

@github-actions
Copy link

🎉 This PR is included in version 14.1.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

None yet

2 participants