Skip to content

fix(javascript-npm-packages): use npm CLI for the token bootstrap publish#19

Merged
ob-aion merged 1 commit into
mainfrom
fix/npm-cli-token-publish
May 20, 2026
Merged

fix(javascript-npm-packages): use npm CLI for the token bootstrap publish#19
ob-aion merged 1 commit into
mainfrom
fix/npm-cli-token-publish

Conversation

@ob-aion
Copy link
Copy Markdown
Contributor

@ob-aion ob-aion commented May 20, 2026

Summary

v0.1.5 → v0.1.9 chased pnpm-side workarounds for the token bootstrap path. Each one hit a different pnpm dead-end:

Attempt Mechanism Outcome
v0.1.5 env -u ACTIONS_ID_TOKEN_REQUEST_* pnpm 11.x emits ERR_PNPM_ID_TOKEN_GITHUB_WORKFLOW_INCORRECT_PERMISSIONS, drops .npmrc token, PUT 404
v0.1.6 NPM_CONFIG_PROVENANCE=false pnpm 11.x ignores it, same ERR_PNPM_AUTH_TOKEN_EXCHANGE + PUT 404
v0.1.7 npx -y pnpm@10.33.0 corepack intercepts every pnpm invocation, runs consumer's 11.x anyway
v0.1.8 Standalone pnpm-linux-x64@10.33.0 + SHA verify pnpm 10.33.0 self-switches on packageManager: pnpm@11.x, pnpm add @pnpm/exe@11.x crashes against the snapshot
v0.1.9 --config.manage-package-manager-versions=false Flag absent or ineffective in 10.33.0 — same self-switch crash

Use npm publish for the token bootstrap path:

  • npm is not managed by corepack — no shim interception.
  • npm 10.x does not auto-attempt OIDC--provenance is opt-in.
  • npm publish reads _authToken from .npmrc directly and PUTs.
  • The tarball is identical to pnpm publish's (same files, same prepublishOnly execution).
  • OIDC branch unchangedpnpm publish --provenance --no-git-checks still runs once a Trusted Publisher is bound for 1.0.1+.

Revert to a single pnpm publish once pnpm 11.x's bootstrap-via-token regression is upstream-fixed.

Test plan

  • After merge: roll v0 to this commit.
  • On coroboros/uri: delete 1.0.0 local + remote, re-tag, re-push. Token branch logs npm --version printing the CI runner's npm 10.x and npm publish succeeding. npm view @coroboros/uri version returns 1.0.0. uri's package.json packageManager stays pnpm@11.1.3.
  • OIDC branch unchanged: on a package whose ci.yml does not forward NPM_PACKAGE_REGISTRY_TOKEN, pnpm publish --provenance --no-git-checks runs via the corepack-pinned pnpm 11.x and emits provenance.

…lish

v0.1.5 through v0.1.9 chased pnpm-side workarounds and each one hit
a dead-end: pnpm 11 auto-attempts OIDC without .npmrc fallback;
pnpm 10.33.0 via npx is intercepted by corepack; the standalone
10.33.0 binary self-switches on packageManager pnpm@11.x and crashes
against its own snapshot.

npm publish is not managed by corepack, does not auto-attempt OIDC,
reads _authToken from .npmrc directly, and produces an identical
tarball (same files, same prepublishOnly). The OIDC branch is
unchanged.

Bumps 0.1.9 to 0.1.10 and prepends the changelog entry.
@ob-aion ob-aion merged commit 2e8b919 into main May 20, 2026
6 checks passed
@ob-aion ob-aion deleted the fix/npm-cli-token-publish branch May 20, 2026 06:46
ob-aion added a commit to coroboros/sparkline that referenced this pull request May 20, 2026
Aligns sparkline with uri / clone / location-timezone on pnpm 11.1.3.
The pnpm 10.33.0 pin originated alongside the OIDC-blocked exception
documented in OPTIM_PLAYBOOK, but the OIDC binding break is independent
of the pnpm version — the token-bootstrap CI shape stays as-is, and
the reusable workflow's token branch already uses npm CLI for publish
(coroboros/ci#19) so pnpm 11.x auto-OIDC behavior on publish is moot.

Unblocks CI: the new `package-lock=false` line in coroboros/ci's
recommended NPM_CONFIG_FILE (2026-05-20) is interpreted by pnpm 10 as
"disable pnpm-lock.yaml entirely", colliding with the workflow's
`pnpm install --frozen-lockfile`. pnpm 11 scopes that line to npm's
lockfile only, so install works as expected.
ob-aion added a commit to coroboros/sparkline that referenced this pull request May 20, 2026
)

* docs(readme): align API blocks to <details> pattern with Types group

Reshape the API section to match the Coroboros canonical per-method
block format (uri-style). SparklineOptions, SparklineError, and
SparklineErrorCode now live in a `### Types` group as
`<details><summary><code>Name</code></summary>` blocks. The per-option
table moves into SparklineOptions; the `sparkline()` block carries only
`values` and `options?` referencing the type.

The `sparkline(values, options?)` function moves to
`<details><summary><code>...</code></summary>`. Summary carries the
signature only — Returns / Throws / Examples / Notes sit below the
parameter table. The Notes block links to `bench/baseline.md` for
SVG-render timings.

Other tweaks:
- `### Examples` renamed `### Gallery` (the rendered SVG embeds are
  visual references; code examples live inside the function `<details>`).
- `### Errors` keeps the codes table only; the SparklineError class
  documentation moves into Types.

Pure docs. No source change; SparklineOptions and SparklineError are
already exported from src/index.ts.

* chore(deps): bump packageManager to pnpm 11.1.3, regenerate lockfile

Aligns sparkline with uri / clone / location-timezone on pnpm 11.1.3.
The pnpm 10.33.0 pin originated alongside the OIDC-blocked exception
documented in OPTIM_PLAYBOOK, but the OIDC binding break is independent
of the pnpm version — the token-bootstrap CI shape stays as-is, and
the reusable workflow's token branch already uses npm CLI for publish
(coroboros/ci#19) so pnpm 11.x auto-OIDC behavior on publish is moot.

Unblocks CI: the new `package-lock=false` line in coroboros/ci's
recommended NPM_CONFIG_FILE (2026-05-20) is interpreted by pnpm 10 as
"disable pnpm-lock.yaml entirely", colliding with the workflow's
`pnpm install --frozen-lockfile`. pnpm 11 scopes that line to npm's
lockfile only, so install works as expected.
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