Skip to content

docs: update CONTRIBUTING.md and README.md with npm provenance details and additional badges#15

Merged
Coderrob merged 1 commit intomainfrom
badges
Apr 2, 2026
Merged

docs: update CONTRIBUTING.md and README.md with npm provenance details and additional badges#15
Coderrob merged 1 commit intomainfrom
badges

Conversation

@Coderrob
Copy link
Copy Markdown
Owner

@Coderrob Coderrob commented Apr 2, 2026

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:

  • Updated the CONTRIBUTING.md and README.md files 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]
  • Modified the publish:package script in package.json to remove the --provenance flag, ensuring local publishes do not fail due to unsupported provenance generation outside CI.

Project metadata and visibility:

  • Added several badges to the top of the README.md, including npm version, downloads, CI status, coverage, license, and supported Node.js versions, to improve project transparency and discoverability.

Copilot AI review requested due to automatic review settings April 2, 2026 23:42
@Coderrob Coderrob merged commit 069d235 into main Apr 2, 2026
4 checks passed
@Coderrob Coderrob deleted the badges branch April 2, 2026 23:44
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.md and clarify that provenance is applied when releasing from GitHub Actions.
  • Update CONTRIBUTING.md to document that provenance is enabled in the GitHub release workflow but not forced for local publishing.
  • Remove the --provenance flag from the local publish:package script 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%" />
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
<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" />

Copilot uses AI. Check for mistakes.
<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" />
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
<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" />

Copilot uses AI. Check for mistakes.
<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">
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
<a href="LICENSE">
<a href="https://github.com/Coderrob/typescript-type-guards/blob/main/LICENSE">

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants