testing-library / dom-testing-library

🐙 Simple and complete DOM testing utilities that encourage good testing practices.
https://testing-library.com/dom
MIT License
3.25k stars 463 forks source link

feat: update browserslist and remove overrides workaround #1257

Closed MatanBobi closed 3 months ago

MatanBobi commented 10 months ago

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:

codesandbox-ci[bot] commented 10 months ago

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[bot] commented 10 months ago

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

MatanBobi commented 10 months ago

Alternatively can we set the browserslist to defaults (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?

nickmccurdy commented 10 months ago

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.

nickmccurdy commented 9 months ago

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.

eps1lon commented 9 months ago

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.