@testing-library/react version 12.1.5 introduces key updates and refinements compared to its predecessor, 12.1.4, particularly concerning React version compatibility. A significant change lies in the dependency specifications for @types/react-dom, react, and react-dom. Version 12.1.4 broadly allowed any version of @types/react-dom, react and react-dom with the wildcard *, in peer dependencies and dependencies. In contrast, 12.1.5 explicitly constrains both react and react-dom in peerDependencies to versions below 18.0.0 (<18.0.0) and @types/react-dom in dependencies. This adjustment is crucial for developers targeting React 17 and earlier, ensuring compatibility and preventing potential issues arising from React 18's new features and API changes.
While functionality remains largely consistent between the two versions, this targeted update in 12.1.5 provides better control over version compatibility. The package size saw a slight increase, with unpacked size going from 4442303 to 4480597. Developers should carefully consider their React version when upgrading. If targeting React 18, ensure thorough testing. If sticking with earlier versions, upgrading to 12.1.5 is recommended to enforce stricter compatibility and avoid potential conflicts, improving the stability and predictability of your React testing environment. This targeted version management makes @testing-library/react continue to be a reliable choice for React DOM testing.
The are not vulnerabilities for the version 12.1.5 of the package @testing-library/react