Skip to content

Commit 069d235

Browse files
authored
docs: update CONTRIBUTING.md and README.md with npm provenance details and additional badges (#15)
1 parent 191a51f commit 069d235

3 files changed

Lines changed: 23 additions & 2 deletions

File tree

CONTRIBUTING.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,10 @@ Changesets can be published with:
7373
npm run release:changesets
7474
```
7575

76+
The GitHub release workflow publishes with npm provenance enabled. The local
77+
`npm run publish:package` command does not force provenance, because npm only
78+
supports automatic provenance generation in supported CI providers.
79+
7680
## Packaging Notes
7781

7882
- The package publishes built files from `dist/`.

README.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,23 @@
44
<img src="public/img/typescript-type-guard-logo.png" alt="typescript-type-guards logo" />
55
</p>
66

7+
<p align="center">
8+
<a href="https://www.npmjs.com/package/@coderrob/typescript-type-guards">
9+
<img src="https://img.shields.io/npm/v/%40coderrob%2Ftypescript-type-guards?logo=npm&logoColor=white" alt="npm version" />
10+
</a>
11+
<a href="https://www.npmjs.com/package/@coderrob/typescript-type-guards">
12+
<img src="https://img.shields.io/npm/dm/%40coderrob%2Ftypescript-type-guards?logo=npm&logoColor=white" alt="npm downloads" />
13+
</a>
14+
<a href="https://github.com/Coderrob/typescript-type-guards/actions/workflows/ci.yml">
15+
<img src="https://img.shields.io/github/actions/workflow/status/Coderrob/typescript-type-guards/ci.yml?branch=main&label=ci" alt="CI status" />
16+
</a>
17+
<img src="https://img.shields.io/badge/coverage-100%25-brightgreen" alt="Coverage 100%" />
18+
<a href="LICENSE">
19+
<img src="https://img.shields.io/badge/license-Apache%202.0-blue.svg" alt="Apache 2.0 license" />
20+
</a>
21+
<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" />
22+
</p>
23+
724
Reusable TypeScript type guards for narrowing `unknown` values in application and library code.
825

926
## Installation
@@ -157,6 +174,6 @@ npm run test:coverage
157174

158175
- `npm run changeset` creates a release note entry for a package change.
159176
- `npm run release:version` applies pending changesets and updates the changelog.
160-
- `npm run release:changesets` runs the full verification stack, coverage, and then publishes through Changesets.
177+
- `npm run release:changesets` runs the full verification stack, coverage, and then publishes through Changesets. In GitHub Actions, this release path also publishes with provenance.
161178
- `npm run publish:package` performs a direct npm publish with a dry-run pack check first.
162179
- `.github/workflows/release.yml` is a manual `workflow_dispatch` workflow for optional release publishing.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
"package:quality": "npm run check:publint && npm run check:types:package",
8383
"prepack": "npm run clean && npm run build && npm run test:package && npm run typecheck",
8484
"prepublishOnly": "npm run verify && npm run test:coverage",
85-
"publish:package": "npm pack --dry-run && npm publish --access public --provenance",
85+
"publish:package": "npm pack --dry-run && npm publish --access public",
8686
"release:changesets": "npm run verify && npm run test:coverage && changeset publish",
8787
"release:version": "changeset version",
8888
"test": "vitest run --root . src/__tests__/runtime.test.ts --pool=threads --fileParallelism=false",

0 commit comments

Comments
 (0)