CapabilityKit publishes two public npm packages:
@capabilitykit/core@capabilitykit/cli
Publish @capabilitykit/core first because @capabilitykit/cli depends on it.
Confirm you are logged in as an npm user with publish access to the @capabilitykit org:
npm whoami
npm access list packages @capabilitykitIf needed, log in:
npm loginUse semantic versioning:
- Patch: bug fixes, docs/package metadata fixes, internal cleanup with no new API.
- Minor: new backwards-compatible features.
- Major: breaking changes.
Both packages can usually move together while the project is small.
From the repo root, update both workspace package versions:
npm version patch --workspace @capabilitykit/core --no-git-tag-version
npm version patch --workspace @capabilitykit/cli --no-git-tag-version
npm installReplace patch with minor or major when appropriate.
If @capabilitykit/cli depends on the exact new core range, update packages/cli/package.json before running npm install.
Example:
"@capabilitykit/core": "^0.1.1"Run the full verification loop:
npm run verifyInspect the files that npm will publish:
npm pack --workspace @capabilitykit/core --dry-run
npm pack --workspace @capabilitykit/cli --dry-runThe package contents should be limited to dist/ and package.json.
Publish core first:
npm publish --workspace @capabilitykit/core --access publicThen publish the CLI:
npm publish --workspace @capabilitykit/cli --access publicIf npm asks for two-factor authentication, rerun the command with the current one-time password:
npm publish --workspace @capabilitykit/core --access public --otp 123456
npm publish --workspace @capabilitykit/cli --access public --otp 123456Registry metadata can lag for a few minutes. After publishing, check:
npm view @capabilitykit/core version
npm view @capabilitykit/cli version
npx @capabilitykit/cli --versionIf npm view returns 404 immediately after a successful publish, wait and retry. Also confirm npm sees the packages under the org:
npm access list packages @capabilitykit
npm dist-tag ls @capabilitykit/core
npm dist-tag ls @capabilitykit/cliCommit the version and lockfile changes:
git status
git add package.json package-lock.json packages/core/package.json packages/cli/package.json
git commit -m "Release 0.1.1"Adjust the version in the commit message.
Published npm versions are immutable. If a package version has already been published, fixes require a new version number.
Do not publish the root package. The root package.json is private and only coordinates the workspace.