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

chore: pin browserslist deps #1243

Closed jlp-craigmorten closed 1 year ago

jlp-craigmorten commented 1 year ago

What:

Pin browserslist and caniuse-lite development dependencies.

Fixes #1242

Why:

There has been minor release of browserslist packages that remove support of op_mob 64 which this library currently makes use of. Updates to the support matrix are considered a breaking change, so by pinning dependencies we can unblock minor and patch changes while pending a major release to update these dependencies and the version support for opera mobile.

How:

Added browsers@4.21.8 and caniuse-lite@1.0.30001502 to the package.json overrides object (for Node >=16) and devDependencies (for Node 14).

Versions chosen to align with those used in the last commit to main on 14 June 2023.

Checklist:

~- [ ] Documentation added to the~ ~docs site~ ~- [ ] Tests~ ~- [ ] TypeScript definitions updated~

jlp-craigmorten commented 1 year ago

Hmm, it seems overrides was introduced in Node 16 so isn't enough for Node 14.

Short of introducing a lockfile of sorts, best can try is define an explicit dev dependency... this I suspect will work because we don't have a lockfile and so long as no transient dependencies require a range higher than what we set npm will use our defined version. But this is fragile to breaking if any sub dependencies do rev their package.json range for either of the two packages. Node 16+ is fine.

codesandbox-ci[bot] commented 1 year 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 d5c17a8e09abf2cfc1dd1c7921cc5f1294a546ad:

Sandbox Source
react-testing-library-examples Configuration
react-testing-library demo Issue #1242
codecov[bot] commented 1 year ago

Codecov Report

Merging #1243 (d5c17a8) into main (491e930) will not change coverage. The diff coverage is n/a.

@@            Coverage Diff            @@
##              main     #1243   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           24        24           
  Lines         1038      1038           
  Branches       349       346    -3     
=========================================
  Hits          1038      1038           
Flag Coverage Ξ”
node-14 100.00% <ΓΈ> (ΓΈ)
node-16 100.00% <ΓΈ> (ΓΈ)
node-18 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 1 year ago

@all-contributors please add @jlp-craigmorten for code :)

allcontributors[bot] commented 1 year ago

@MatanBobi

I've put up a pull request to add @jlp-craigmorten! :tada: