dom-testing-library
dom-testing-library copied to clipboard
feat: update browserslist and remove overrides workaround
What: Resolves https://github.com/testing-library/dom-testing-library/issues/1242. This updates the browserslist entry in our package.json.
Why: As part of our major version, we're updating the browserslist support.
How: Ran npx browserslist defaults and updated the browserslist support in our package.json file. I've also removed the temporary workarounds introduced in https://github.com/testing-library/dom-testing-library/pull/1243.
Checklist:
- [ ] Documentation added to the docs site
- [ ] Tests
- [ ] TypeScript definitions updated
- [ ] Ready to be merged
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 f606268c91f4134c28a4a9472206af6ea6aeab8c:
| Sandbox | Source |
|---|---|
| react-testing-library-examples | Configuration |
| react-testing-library demo | Issue #1242 |
Codecov Report
Merging #1257 (f606268) into alpha (452097b) will not change coverage. The diff coverage is
n/a.
@@ Coverage Diff @@
## alpha #1257 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 24 24
Lines 1038 1038
Branches 349 349
=========================================
Hits 1038 1038
| Flag | Coverage Δ | |
|---|---|---|
| node-18 | 100.00% <ø> (ø) |
|
| node-20 | 100.00% <ø> (ø) |
Flags with carried forward coverage won't be shown. Click here to find out more.
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
Alternatively can we set the
browserslisttodefaults(or something including Node) and pin it to prevent breakage?
Doing that will require us to use overrides since browserslist is not our direct dependency, it's from kcd-scripts. This means we'll need to maintain that overrides, that's why I prefer having it hard-coded here.
Wdyt?
I don't think we should remove the overrides: The bug fix in this PR is unnecessary because it only targets npm versions installed by Node 16, which are no longer supported in the alpha branch as of #1255.
Can we merge this once we revert the overrides? Since we're already released alphas and this is also targeting the alpha branch, I'd prefer our CI to be passing sooner rather than later.
CI should be green with https://github.com/testing-library/dom-testing-library/pull/1262.
We'll continue to need the overrides otherwise we'll encounter this issue again.