This repository has been archived on 2026-06-01. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
nerve/docs/skill-publish.md
T

2.3 KiB

Skill: Publish @uncaged/nerve packages to npm

When to use

When releasing a new version of any @uncaged/nerve-* package to npm.

Prerequisites

  • npm login with an account that has owner access to the @uncaged org
  • All tests pass: pnpm -r run test
  • Clean working tree (no uncommitted changes)

Packages

Package Path npm
@uncaged/nerve-core packages/core link
@uncaged/nerve-daemon packages/daemon link
@uncaged/nerve-cli packages/cli link

Dependency order

coredaemoncli

Always publish in this order. If core has changes, bump and publish it first, then update dependents.

Steps

1. Ensure clean state

git checkout main && git pull origin main
pnpm install
pnpm -r run build
pnpm -r run test

2. Bump versions

Manually update version in each changed package's package.json.

Follow semver:

  • patch (0.1.x): bug fixes, refactors
  • minor (0.x.0): new features, non-breaking API additions
  • major (x.0.0): breaking changes

If bumping core, also update the @uncaged/nerve-core dependency version in daemon and cli package.json. Same for daemoncli.

3. Build

pnpm -r run build

4. Publish (in order)

# Only publish packages that have version bumps
cd packages/core && npm publish --access public
cd packages/daemon && npm publish --access public
cd packages/cli && npm publish --access public

5. Commit & tag

git add -A
git commit -m "release: @uncaged/nerve-core@X.Y.Z, @uncaged/nerve-daemon@X.Y.Z, @uncaged/nerve-cli@X.Y.Z"
git tag -a vX.Y.Z -m "Release vX.Y.Z"
git push origin main --tags

Pitfalls

  • Don't publish without building firsttsup output in dist/ is what npm ships
  • Dependency order matters — if you publish daemon before core, npm may resolve the old core version
  • --access public is required for scoped packages on first publish; safe to always include
  • Check npm whoami to confirm you're logged in as the right account
  • No changeset tool — this project uses manual version bumps (no changesets/lerna)