react-testing-library
react-testing-library copied to clipboard
Address the dependency malicious issue.
What:
Replaced the usage of the chalk package with colorette in tests/failOnUnexpectedConsoleCalls.js to address a security issue with the previous dependency.
Why:
The chalk package version in use was flagged as malicious (MAL-2025-46969, Score: 10). Replacing it with colorette removes the security risk and maintains colored output functionality.
How:
- Uninstalled chalk from the project.
- Updated imports and color/style function calls in tests/failOnUnexpectedConsoleCalls.js to use colorette as equivalent.
- Ensured all references to chalk were removed.
Used colorette: "^2.0.20"
- [x] Documentation added to the docs site
- [x] Tests
- [x] TypeScript definitions updated
- [x] 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 77e42cc99e5a3bc799de36d6f1fb06b93c35ae0f:
| Sandbox | Source |
|---|---|
| react-testing-library-examples | Configuration |