docs: update CONTRIBUTING.md and README.md with npm provenance details and additional badges#15
Conversation
…s and additional badges
There was a problem hiding this comment.
Pull request overview
Updates project documentation and the local publish script to clarify how npm provenance is handled (CI-only) and to improve README metadata visibility via badges.
Changes:
- Add npm/CI/coverage/license/node badges to
README.mdand clarify that provenance is applied when releasing from GitHub Actions. - Update
CONTRIBUTING.mdto document that provenance is enabled in the GitHub release workflow but not forced for local publishing. - Remove the
--provenanceflag from the localpublish:packagescript to avoid failing outside supported CI providers.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| README.md | Adds badges and updates release documentation to mention CI-only provenance publishing. |
| package.json | Removes --provenance from the local publish script. |
| CONTRIBUTING.md | Documents provenance behavior differences between CI releases and local publishing. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| <a href="https://github.com/Coderrob/typescript-type-guards/actions/workflows/ci.yml"> | ||
| <img src="https://img.shields.io/github/actions/workflow/status/Coderrob/typescript-type-guards/ci.yml?branch=main&label=ci" alt="CI status" /> | ||
| </a> | ||
| <img src="https://img.shields.io/badge/coverage-100%25-brightgreen" alt="Coverage 100%" /> |
There was a problem hiding this comment.
The coverage badge is hard-coded to "100%", but the repo enforces a 95% per-file threshold (see scripts/check-file-coverage.mjs). A static value is likely to become inaccurate; consider switching to a dynamically generated coverage badge (e.g., from a coverage reporting service) or removing the percentage if it isn't sourced from CI output.
| <img src="https://img.shields.io/badge/coverage-100%25-brightgreen" alt="Coverage 100%" /> | |
| <img src="https://img.shields.io/badge/coverage-documented-lightgrey" alt="Coverage" /> |
| <a href="LICENSE"> | ||
| <img src="https://img.shields.io/badge/license-Apache%202.0-blue.svg" alt="Apache 2.0 license" /> | ||
| </a> | ||
| <img src="https://img.shields.io/badge/node-20%20%7C%2022%20%7C%2024-339933?logo=node.js&logoColor=white" alt="Node.js 20, 22, and 24" /> |
There was a problem hiding this comment.
The Node.js support badge lists 20/22/24, but the CI workflow currently only tests Node 20 and 22 (.github/workflows/ci.yml matrix). Either add Node 24 to the CI matrix or adjust the badge to match what is actually exercised in CI to avoid misleading consumers.
| <img src="https://img.shields.io/badge/node-20%20%7C%2022%20%7C%2024-339933?logo=node.js&logoColor=white" alt="Node.js 20, 22, and 24" /> | |
| <img src="https://img.shields.io/badge/node-20%20%7C%2022-339933?logo=node.js&logoColor=white" alt="Node.js 20 and 22" /> |
| <img src="https://img.shields.io/github/actions/workflow/status/Coderrob/typescript-type-guards/ci.yml?branch=main&label=ci" alt="CI status" /> | ||
| </a> | ||
| <img src="https://img.shields.io/badge/coverage-100%25-brightgreen" alt="Coverage 100%" /> | ||
| <a href="LICENSE"> |
There was a problem hiding this comment.
The license badge links to a relative "LICENSE" path. This works on GitHub, but it typically resolves to a non-existent URL when the README is rendered on npm. Consider linking to the canonical GitHub URL for the license file (or the npm package metadata license page) so the badge is reliable outside GitHub.
| <a href="LICENSE"> | |
| <a href="https://github.com/Coderrob/typescript-type-guards/blob/main/LICENSE"> |
This pull request updates documentation and publishing scripts to clarify and improve the handling of npm provenance during package publishing. It also enhances the project README with additional badges for better visibility of project status and metadata.
Documentation and publishing process improvements:
CONTRIBUTING.mdandREADME.mdfiles to clarify that provenance is only enforced when publishing via GitHub Actions, not during local publishing, due to npm's CI provider requirements. [1] [2]publish:packagescript inpackage.jsonto remove the--provenanceflag, ensuring local publishes do not fail due to unsupported provenance generation outside CI.Project metadata and visibility:
README.md, including npm version, downloads, CI status, coverage, license, and supported Node.js versions, to improve project transparency and discoverability.