diff --git a/.github/workflows/mirror-private-scope.yml b/.github/workflows/mirror-private-scope.yml index 14f7e0f..d3f5311 100644 --- a/.github/workflows/mirror-private-scope.yml +++ b/.github/workflows/mirror-private-scope.yml @@ -6,6 +6,8 @@ name: Mirror released bytes into the private scope # exactly the released tarball, verified against the integrity every lock pins, and nothing else. # Written while this repository's owner was offline, under the operator's service-matrix alignment # instruction (platform Chief decision 08858c6a); the owner may keep, change or remove it. +# A package's first publication from this public repository is public on GitHub Packages whatever +# --access says: make it private before granting consumers Read. Later versions keep its settings. on: workflow_dispatch: @@ -127,7 +129,10 @@ jobs: const { EXPECTED_SHA512, MIRROR_SHA256, RUNNER_TEMP, PACKAGE, VERSION } = process.env; const fail = message => { console.error(message); process.exit(1); }; const directory = `${RUNNER_TEMP}/mirror/readback`; - const dist = JSON.parse(readFileSync(`${directory}/packument-dist.json`, 'utf8')); + // npm 12.2 prints `view dist --json` as a one-element array. + const viewed = JSON.parse(readFileSync(`${directory}/packument-dist.json`, 'utf8')); + if (Array.isArray(viewed) && viewed.length !== 1) fail('Expected one packument dist entry'); + const dist = Array.isArray(viewed) ? viewed[0] : viewed; const files = readdirSync(directory).filter(name => name.endsWith('.tgz')); if (files.length !== 1) fail('Expected exactly one tarball read back'); const bytes = readFileSync(`${directory}/${files[0]}`); diff --git a/RELEASING.md b/RELEASING.md index 5d69b40..9abd513 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -5,7 +5,7 @@ One root `vX.Y.Z` tag versions the Go module and TypeScript package together. bi - Go module: `github.com/Bitspark/bitruntime`, packages `core/go`, `websocket/go` and `hydrated/go`. - TypeScript package: `@bitspark/bitruntime`, subpaths `/core`, `/websocket` and `/hydrated`. - TypeScript distribution: GitHub release asset `bitspark-bitruntime-.tgz`, covered by `SHA256SUMS`. This is an npm-compatible tarball, not a registry publication. URL installs with npm 12 require `--allow-remote=root`. -- Private-scope mirror: the released asset is also mirrored, byte for byte, into the private `@bitspark` scope on GitHub Packages, for Bitspark's private consumers whose `@bitspark` scope resolves there (`.github/workflows/mirror-private-scope.yml`). The public distribution above is unchanged. +- Private-scope mirror: the released asset is also mirrored, byte for byte, into the private `@bitspark` scope on GitHub Packages, for Bitspark's private consumers whose `@bitspark` scope resolves there (`.github/workflows/mirror-private-scope.yml`). The public distribution above is unchanged. The mirror package is private: its first publication from this public repository was public on GitHub Packages despite `--access=restricted`, and was set private before any consumer was granted Read. Later versions keep the package's settings. Before tagging, land a reviewed green PR on main. CI requires Go formatting/vet/race tests, TypeScript checking/build/tests, bitwire conformance observations, a fresh installed package consumer, and Go/TypeScript WebSocket and hydrated interoperability. Run the same checks locally where supported. Confirm bitwire's exact dependency release is publicly installable, with no file dependencies, module replacements or private registries. Run `node scripts/go-smoke.mjs ` before tagging.