testing-library / jest-dom

:owl: Custom jest matchers to test the state of the DOM
https://testing-library.com/docs/ecosystem-jest-dom
MIT License
4.4k stars 391 forks source link

Drop an unused @babel/runtime dependency #614

Closed aleks-elkin closed 2 months ago

aleks-elkin commented 2 months ago

Describe the feature you'd like:

Recently, the Ecosystem Performance was formed to cleanup, speedup, levelup the JavaScript Ecosystem. Socket Security team wrote a blog post about it https://socket.dev/blog/javascript-community-launches-e18e-initiative-to-improve-ecosystem-performance

I noticed that there is a dependency @babel/runtime but I did not find any usage of it. I tried locally to remove it and all tests are passing and build command is working.

This dependency adds around 240kb to node_modules which sounds not that big, but considering that @testing-library/jest-dom has almost 11 million weekly downloads I believe this change will have an impact on the JS ecosystem.

pkg-size @testing-library:jest-dom

Screenshot is taken from the pkg-size.dev

Suggested implementation:

Remove the @babel/runtime as a dependency.

Describe alternatives you've considered:

As I understand from the docs of @babel/runtime, it should be used on a build stage, so it can be moved to a devDependency if it is actually needed, so end users will not load this to their node_modules on each install.

Teachability, Documentation, Adoption, Migration Strategy:

I'm willing to send a PR for this 😊

gnapse commented 2 months ago

I'm willing to send a PR for this 😊

Please do. Thanks!

github-actions[bot] commented 1 month ago

:tada: This issue has been resolved in version 6.5.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: