dev-bump-zudo-deps — Bump all `@takazudo/*` deps to latest
Discover every @takazudo/* dependency that resolves to the npm registry across all
package.json files in the project, bump each to the newest version on the channel it already
tracks, install, and verify the project still builds.
The fragile part — finding the deps, classifying each spec's channel, and computing the target
with correct prerelease semver — is done deterministically by scripts/resolve-bumps.mjs, so
it never depends on the model recomputing version math by hand.
Resolution rule (what "bump" means per dep)
The dep's current spec decides the channel, and only deps pinned to a concrete version get
rewritten — specs that float are reported but left alone, because rewriting them would silently
turn a deliberate choice into a hard pin:
| Current spec | Resolved to | Action |
| ---------------------------------------------- | -------------------------------------- | ---------- |
| 0.1.0-next.58 (a -next.* prerelease pin) | newest release on the next line | ✏ bump |
| ^1.2.0-beta.3 (any other prerelease line) | newest release on that line | ✏ bump |
| 1.2.3 / ^1.2.3 / ~1.2.3 (stable semver) | newest stable (dist-tags.latest) | ✏ bump |
| next / latest / beta (a dist-tag string) | reported (what the tag points at now) | tag |
| * / x / empty (floating) | — | skip |
| workspace: / file: / link: / git / url | — | skip |
Write-back preserves what was there: an exact pin stays exact, ^/~ operators are kept, and a
prerelease-pinned dep stays on its own line. A dep declared via a dist-tag string (next,
latest, …) is intentionally not rewritten — it already floats to that tag on install, so the
script just reports what the tag currently resolves to (with a stale-tag/graduation note) and
leaves the pinning decision to you. Non-registry specs (workspace:*, file:, link:,
portal:, catalog:, npm: aliases, git/url) are left untouched — bumping a workspace:* dep
would break the monorepo.
The one gotcha worth knowing: the `next` dist-tag can be stale
For prerelease lines, the npm next dist-tag sometimes points at an _older_ version than what's
actually published (or than latest). "Newest next" means the highest published -next.*
version, not whatever the next tag literally says. The script already resolves this by scanning
the full version list and flags two cases in its report:
- stale tag —
nextdist-tag < newest publishednextversion (script uses the newest). - graduation —
latestis higher than the newestnext(the line may have moved to stable); this is a human call, so surface it instead of silently switching channels.
Step 1 — Resolve the plan (dry-run)
From the project root (running without --write is a dry-run):
node "$HOME/.claude/skills/dev-bump-zudo-deps/scripts/resolve-bumps.mjs"
--dry-run is a top-level contract for the whole skill: resolve + assess + report only — no
package.json writes, no installs, no vendored-artifact copies, no ZUDO_DEPS_PINS.md updates.
It prints one row per @takazudo/* dep — bump / up-to-date / tag / skip / error — with
current → target and any stale-tag/graduation notes, plus a Scanned N package.json line. Pass
exact package names to limit scope (… resolve-bumps.mjs @takazudo/zfb @takazudo/zfb-runtime);
--json adds a machine-readable plan.
- If every dep is
up-to-date(or onlytag/skiprows remain), skip to Step 7 — a project can still have vendored artifacts to sync even with zero registry bumps. Only after that check report "already on latest" and stop. - An
errorrow can mean the package is genuinely unpublished or a registry/auth/offline issue — if every lookup errored the script says so; confirmnpm view @takazudo/<pkg>works from this shell before concluding a package is missing. tag/skiprows are deliberately not rewritten — surface them so the user can pin or update those manually if they want.- The scan does not follow symlinks, so a symlinked nested workspace won't be found; sanity-check the
Scanned Ncount against the project. - The scan skips nested checkouts — any directory below the root that itself has a
.gitentry (dir, file, or symlink), such as a linked worktree or a vendored clone — so--writenever touches another checkout'spackage.json.
Read the table before writing and act on any flagged note — a graduation warning means asking
the user whether to follow the line to stable rather than silently staying on the prerelease channel.
Step 2 — Assess upstream changes (changelog + code diff)
For each bump row, find out what actually changed upstream between the pinned and target
versions before touching the consumer project. Full procedure: