Last 12 weeks · 3 commits
5 of 6 standards met
When running the precommit hook in @testing-library/jest-dom, I noticed this warning: That configuration option is set here: https://github.com/kentcdodds/kcd-scripts/blob/530b9ea2055af62721831605a3616cbe722bf3fb/src/config/jest.config.js#L43-L46 Honestly I'm puzzled by this warning. returns , and the docs for that version show as a valid configuration option: https://jestjs.io/docs/29.7/configuration#watchplugins-arraystring--string-object Additionally, I only see the warning when runs in the precommit hook. If I run , there's no such warning.
What: Updated the job in to support npm trusted publishers. Why: To enable publishing packages with provenance information using OIDC, enhancing security by removing the reliance on long-lived secrets. This aligns with modern best practices for npm publishing. How: Added to the job, including for OIDC. Set in the job's environment. Removed from the step's environment. Checklist: [N/A] Documentation [N/A] Tests [x] Ready to be merged [!NOTE] Medium Risk Changes the release pipeline’s auth mechanism and permissions; misconfiguration could break publishing or broaden GitHub token capabilities, but scope is limited to CI. Overview Updates the GitHub Actions job to publish via npm Trusted Publishers/OIDC by granting and enabling npm provenance (). Removes use of the long-lived secret from the step, relying on workflow permissions for release/publishing-related actions instead. Written by Cursor Bugbot for commit 522854ae576852f2a22d43f1ef8aa7710e525598. This will update automatically on new commits. Configure here. Summary by CodeRabbit Chores** Enhanced release workflow security by updating GitHub Actions permissions for contents, identity tokens, issues, and pull requests. Improved package verification by enabling NPM package provenance configuration during the release process.
Repository: kentcdodds/kcd-scripts. Description: CLI toolbox for common scripts for my projects Stars: 886, Forks: 204. Primary language: JavaScript. Languages: JavaScript (100%). License: MIT. Homepage: http://npm.im/kcd-scripts Latest release: v17.0.0 (3w ago). Open PRs: 2, open issues: 12. Last activity: 3w ago. Community health: 71%. Top contributors: kentcdodds, MichaelDeBoey, allcontributors[bot], Andarist, alexandernanberg, sudo-suhas, eps1lon, weyert, macklinu, marcosvega91 and others.
JavaScript
I ran into this issue when trying to contribute to : https://github.com/testing-library/jest-dom/issues/696 As of this writing, if you e.g. try to commit a change to that project's , git will fail with this output: It seems quite strange that a commit would be rejected because there are no related tests. The obvious fix would be to add the flag. There's a deeper problem, though. At one point, I observed the same precommit hook failure as described above even when making changes to modules that _do_ have tests. I suspect that this is because Jest's has known compatibility issues with (https://github.com/jestjs/jest/issues/11527), which is a Jest configuration option that kcd-scripts uses. For that reason, my recommendation would be to do away with the flag entirely. I've already submitted a PR to jest-dom to make that change there: https://github.com/testing-library/jest-dom/pull/709
What: With the breaking change of v16, the cjs and esm file extensions changed from .js to .cjs and .mjs. The script also needs to be updated. Why: Downshift uses kcd-scripts, and we keep supporting preact. How: Change the strings. Checklist: [ ] Documentation [ ] Tests [ ] Ready to be merged Summary by CodeRabbit Chores** Updated rollup build configuration file extensions for Preact entry resolution to ensure correct artifacts are selected during the build process.
What: Set build output file extension by target format. Why: https://github.com/testing-library/react-testing-library/issues/1338 I looking for a solution to this issue. First of all, the issue was different from , which is referred to in , and , which is referred to in . So I solved this problem by changing the extension of the esm file to . was using that library as a build tool, and found out that within that library they were building extensions as fixed as and are trying to fix it. Screenshot Before change extension !Screenshot 2024-07-11 at 11 29 48 PM After configure in , but in is default function. After change extension !Screenshot 2024-07-11 at 11 52 11 PM After configure in , so in is configured function. How: Set file extension string using format parameter. Checklist: [ ] Documentation [x] Tests [ ] Ready to be merged