Repository navigation
Conversation
The adapter for the 0.7 line is not on npm. The latest published version is 0.600.0-rc.0, which is the 0.6 line and speaks @holochain/client ^0.20, so nothing on the registry can talk to a 0.7 conductor and happ-0.5.0-beta.1 has no usable client. Publishing has been a manual act on a maintainer's machine, which is why it has not happened. Adds publish-adapter.yml, on npm-modules-* tags and workflow_dispatch. It does not ride the happ-* tag: the adapter versions independently of the hApp, and the release build spends the better part of an hour producing artifacts this job does not need. Before publishing it checks that a tag-supplied version matches package.json, runs scripts/verify-purpose-schema.mjs against the freshly built schema, and refuses a version that already exists on the registry, since npm answers that case with a 403 that reads like an auth failure. Adds the repository, homepage and bugs fields to the adapter package.json. npm refuses provenance attestation for a package that does not declare where its source lives. Requires one repository secret, NPM_TOKEN, a granular npm access token with write access to the package. Only a package owner can mint it.
@LeosPrograms two asks here, one urgent and one structural. They are independent: the first unblocks people today, the second stops us needing the first. 1. Please publish
|
The workflow now authenticates with the job's GitHub OIDC token, so the NPM_TOKEN secret is no longer required. A token is still used when the secret exists, and is only written to .npmrc when non-empty so an empty value cannot shadow the OIDC credential. A new step refuses npm older than 11.5.1, the first release that supports trusted publishing. docs/contributing.md documents the one-time trusted-publisher entry on npmjs.com and its two-day expiry before a first publish.
Back to draft after a new push (
|
Context
happ-0.5.0-beta.1requires Holochain 0.7 and@holochain/client ^0.21.0. The adapter that talks to it,0.700.0-rc.0, exists only in this repository. The latest version on npm is0.600.0-rc.0, published 2025-12-05, which is the 0.6 line and depends on@holochain/client ^0.20.So there is currently no install line an integrator can follow against the release we published. Publishing has been a manual act from a maintainer's own credentials (
yarn run publish:graphql:adapter), and that is a large part of why it has not happened.What this adds
.github/workflows/publish-adapter.yml, triggered by tags matchingnpm-modules-*(the prefix this repo already used fornpm-modules-0.0.2-alpha.1) and byworkflow_dispatchfor a publish without a tag.It deliberately does not ride the
happ-*tag. The adapter versions independently of the hApp, andrelease.ymlspends the better part of an hour building WASM artifacts this job has no use for.Three gates before anything reaches the registry:
npm-modules-<v>must matchmodules/vf-graphql-holochain/package.json, or the run fails naming both values.scripts/verify-purpose-schema.mjsruns against the freshly built adapter, so a build that silently lost a ValueFlows 1.0 field cannot be published.npm view <name>@<version>is checked first. npm answers a duplicate version with a 403, which reads like an auth failure and costs an hour of looking in the wrong place.The workflow uses the same Nix and Cachix setup as
test.ymlandrelease.yml, so node stays pinned inflake.nixrather than being declared a second time in workflow YAML.dist_tagis an input, defaulting tolatest. npm marks a publishlatestwhether or not the version is a prerelease, which is how0.600.0-rc.0became the latest version while the 0.7 line was the one being recommended. Passingnextis now a deliberate choice rather than something you remember after the fact.Hardened in review (2026-10-09). Dependencies install with
--frozen-lockfile, so a publish can never resolve a different tree from the oneyarn.lockrecords (checked locally: exit 0, lockfile byte-identical). Thedist_taginput reaches the shell throughenvrather than${{ }}interpolation, and anything outside[A-Za-z0-9._-]is refused before it reachesnpm publish.package.jsongainsrepository,homepageandbugs. npm refuses to attest provenance for a package that does not declare where its source lives, and the publish step passes--provenance.What it needs from a maintainer
No secret. Since
47d608eethe workflow authenticates through npm trusted publishing: the registry exchanges the job's GitHub OIDC token (id-token: write, already granted) for a short-lived publish credential, and provenance is attached automatically. Soushi888 now has access to the@valueflowsnpm organisation, so the one-time setup is ours to do.On npmjs.com,
@valueflows/vf-graphql-holochain, Settings, Trusted Publisher, GitHub Actions:h-REAhREApublish-adapter.ymlnpm publishenablednpm does not validate the entry on save, and an entry that has not completed a publish within two days expires, so it goes in right before the first run. The order is: merge, add the trusted publisher, run once with
dry_run: true, then pushnpm-modules-0.700.0-rc.0.An
NPM_TOKENsecret, if one is ever added, is used instead; it is only written to.npmrcwhen non-empty, so an empty value cannot shadow the OIDC credential. A new step refuses npm older than 11.5.1, the first release with trusted publishing.Verification
The parts that can be verified without the secret were:
npm-modules-0.700.0-rc.0against0.700.0-rc.0proceeds,npm-modules-0.699.0is rejected naming both values.0.700.0-rc.0is absent so a publish proceeds,0.600.0-rc.0exists so a republish is blocked.package.jsonstill parses as JSON after the metadata addition.The publish step itself cannot be proven until the token exists. The
dry_runinput is there for exactly that first run.Documentation
docs/contributing.mdupdated in the same commit:publish-adapter.ymlchecks and the secret it needs.yarn run publish:graphql:adapteras the documented fallback, and states thelatestdist-tag behaviour that caught us on0.600.0-rc.0.One follow-up, deliberately left out
finish-build.jshas its README copy commented out, so the published package shows no README on npm. Uncommenting it is one line, but it is not this PR's job.Review, 2026-10-09
sprout, no conflict.c33f7708(--no-frozen-lockfilein a publish job;inputs.dist_taginterpolated straight into arun:script).docs/contributing.mdcovers the workflow and the secret.dist_tagguard was run onlatest,next, empty andx;rm -rf(the last refused).47d608ee: trusted publishing replacesNPM_TOKEN.