Skip to content

build(publish): set up npm publishing (OIDC provenance, tag-gated)#12

Merged
bdelanghe merged 1 commit into
mainfrom
conformance/publish-setup
Jun 29, 2026
Merged

build(publish): set up npm publishing (OIDC provenance, tag-gated)#12
bdelanghe merged 1 commit into
mainfrom
conformance/publish-setup

Conversation

@bdelanghe

Copy link
Copy Markdown
Contributor

The "use it everywhere" unlock (prx-47qm): makes the kit installable beyond bounded-systems — npm i @bounded-systems/conformance-kit — so consumers can install it, not just git-vendor it.

Setting up the pipeline does NOT publish anything. The release fires only on a deliberate v* tag push (merging this PR never publishes), exactly like lone's tag-gated publish.

What

  • package.json: files allowlist (gates / generators / integrity / emitters / lib + README/LICENSE/provenance — excludes test+fixtures), wildcard exports for deep imports (e.g. @bounded-systems/conformance-kit/gates/conformance-report.mjs), publishConfig (public + provenance). Version 0.1.0 → 0.2.0 (0.1.0 was the vendored-only stub).
  • .github/workflows/publish.yml: on a v* tag → npm ci → npm test → npm publish --provenance via Trusted Publishing (OIDC)id-token: write, no stored NPM_TOKEN.

Verification

npm pack --dry-run35 files, 70.4 kB, v0.2.0 (the right allowlist). npm test → 17/0.

Registry-side (owner only — gates the actual release)

  1. Configure the npm Trusted Publisher for @bounded-systems/conformance-kit on npmjs.com (this repo + publish.yml). A brand-new package name may need one manual npm publish to claim it first, then OIDC handles subsequent tags.
  2. Then git tag v0.2.0 && git push origin v0.2.0 triggers the release. I won't push that tag without your explicit go.

Architecture note

lone stays the JSR-published standard (pure Deno/Zod model). npm is the right home for this CLI/vendoring toolkit (bins + npm deps) — JSR doesn't fit a Node CLI package. That's the honest npm-vs-JSR split, rather than forcing the kit onto JSR.

🤖 Generated with Claude Code

…prx-47qm

Makes the kit installable beyond bounded-systems — `npm i @bounded-systems/conformance-kit`
— so it's reusable everywhere, not just git-vendored. Setting up the pipeline does
NOT publish: the release only fires on a `v*` tag push (merging to main never does).

- package.json: add `files` allowlist (gates/generators/integrity/emitters/lib +
  README/LICENSE/provenance — excludes test/fixtures), wildcard `exports` for deep
  imports (e.g. `@bounded-systems/conformance-kit/gates/conformance-report.mjs`),
  and `publishConfig` (public + provenance). Version 0.1.0 (vendored-only stub) → 0.2.0.
- .github/workflows/publish.yml: on a `v*` tag, npm ci → npm test → `npm publish
  --provenance` via Trusted Publishing (OIDC, id-token:write — no stored NPM_TOKEN),
  mirroring lone's tag-gated publish.

npm pack --dry-run: 35 files, 70.4 kB. Tests 17/0.

NOTE — registry-side, owner only: configure the package's npm Trusted Publisher
(repo + publish.yml) on npmjs.com (a brand-new name may need one manual `npm publish`
to claim it first, then OIDC for subsequent tags). lone stays the JSR-published
STANDARD; npm is the right home for this CLI/vendoring toolkit.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@bdelanghe bdelanghe merged commit 79faef8 into main Jun 29, 2026
1 check passed
@bdelanghe bdelanghe deleted the conformance/publish-setup branch June 29, 2026 01:21
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.

1 participant