Repository navigation
Closed
0 / 20 of 2 issues completedClosed
0 / 20 of 2 issues completed
Copy link
Labels
Description
Parent spike: #1769. Research the 2026 best practice for publishing npm packages and decide what devkit manages. devkit has nothing for npm today — no template, stub or recipe (#988 only called it "a small per-repo hook").
Motivation / why
vig-os has JS/TS consumers (e.g. commit-action, frontends per #1523). The npm ecosystem went through major supply-chain incidents in 2025 (self-propagating token-stealing worms), after which npm shipped Trusted Publishing (OIDC) and tightened token policy. A hand-rolled npm publish with an NPM_TOKEN secret is now the anti-pattern.
Proposed approach (strawman)
- npm Trusted Publishing (OIDC, requires a recent npm CLI) with automatic provenance; no
NPM_TOKEN. - RCs →
nextdist-tag, finals →latest; never let a prerelease takelatest. - Package-manager agnostic build (
just dist-npm), publish with the npm CLI (or pnpm/yarn equivalents if they support OIDC). - Monorepos/workspaces: decide scope (changesets-style multi-package is likely out of scope for the train).
What already exists
Nothing npm-specific. node capability module contributes nodejs to the shell. Publish seam on dev.
Scope / questions
- Trusted Publishing status 2026: minimum npm CLI, reusable-workflow support, required
environment, scoped vs unscoped packages. - Current token policy (granular token lifetimes, classic token removal, 2FA) — what breaks for repos still on tokens?
- Provenance: automatic with OIDC? verification story (
npm audit signatures)? - GitHub Actions published as actions (commit-action): is the marketplace/
dist/model a separate channel? (seedocs/DOWNSTREAM_RELEASE.mddist example) - JSR as a secondary target — relevant or noise?
Pitfalls
npm publishof a prerelease without--tagmoveslatest.npm unpublish72-hour window; versions can never be reused.private: truepackages and workspace roots must be excluded by evidence, not guesswork.
Acceptance criteria
- Dated verdict (verified-on / verified-how) on the 2026 best practice for this channel, with primary sources (registry docs, official actions)
- Gap table: best practice vs. what devkit ships today
- Concrete split: devkit owns (managed) / devkit seeds (template) / repo owns (build recipe, registry registration)
- Prerelease policy for this channel decided
- Implementation issue(s) filed, or an explicit "won't do" with reason
References
Parent: #1769 · #1746 · #1748 · #1523 · #1519 · docs/DOWNSTREAM_RELEASE.md (on dev)
Sub-issues
Collapse Sub-issuesSub-issues
Loading 2 sub-issues
Activity
gerchowl commentedon Sep 29, 2026
Verdict
The token era is over. Classic tokens were permanently revoked on 2025-12-09. Granular write tokens last at most 90 days and require 2FA, and "bypass-2FA" tokens lose publish rights around Jan 2027. devkit must never seed an
NPM_TOKEN.Facts
environment:is optional.Policy
--tag next(derived automatically from the SemVer suffix); finals go tolatest.dist/plus moving major tags. Seed that lane separately.Split
npm viewidempotency precheck, next/latest routing,npm audit signatures).just dist-npmrecipe and.npmrc.privateflags. Workspaces need one registration per child package.Sources: npm trusted publishers · TP GA · classic tokens revoked · bypass-2FA restriction · npm/cli#8544 · publishing actions
c-vigo commentedon Sep 30, 2026
Spike complete. The dated verdict is in the review above; the cross-cutting decision is recorded in
docs/rfcs/ADR-publish-lanes.md(PR #1785, merged todevas 36e74cc), per #1769's rule that the channel spikes close when the ADR lands.Implementation continues in: #1781 (npm lane) (lane foundation: #1778).