Releasing oneringai
This document describes how to release new versions of the package to npm.
Prerequisites
- npm account with access to the
@everworkerorganization - npm token configured (stored in
~/.npmrc):npm config set //registry.npmjs.org/:_authToken=YOUR_TOKEN - Clean git state - no uncommitted changes
Release Process
1. Update CHANGELOG.md
Before releasing, document changes in CHANGELOG.md:
## [Unreleased]
## [X.Y.Z] - YYYY-MM-DD
### Added
- New feature description
### Changed
- Modified behavior description
### Fixed
- Bug fix description
### Removed
- Removed feature description
2. Choose Version Type
Follow Semantic Versioning:
| Change Type | Version Bump | Example |
|---|---|---|
| Bug fixes, patches | patch |
0.1.0 → 0.1.1 |
| New features (backward compatible) | minor |
0.1.0 → 0.2.0 |
| Breaking changes | major |
0.1.0 → 1.0.0 |
3. Run Release Script
# Patch release (bug fixes)
npm run release:patch
# Minor release (new features)
npm run release:minor
# Major release (breaking changes)
npm run release:major
This will:
- Run build and typecheck
- Bump version in
package.json - Create git commit with message "Release vX.Y.Z"
- Create git tag
vX.Y.Z - Push commit and tag to GitHub
4. Publish to npm
npm publish
This runs prepublishOnly which:
- Builds the package (
npm run build) - Runs typecheck (
npm run typecheck) - Runs unit tests (
npm run test:unit)
Then publishes to npm registry.
5. Verify
# Check npm
npm view oneringai
# Check install works
npm install oneringai
Quick Reference
# Full release flow (example: patch)
# 1. Edit CHANGELOG.md
# 2. Run:
npm run release:patch
npm publish
# Verify
npm view oneringai version
Package Info
| Field | Value |
|---|---|
| Package | oneringai |
| npm | https://www.npmjs.com/package/oneringai |
| GitHub | https://github.com/aantich/oneringai |
| Registry | https://registry.npmjs.org/ |
Troubleshooting
"Two-factor authentication required"
Use a granular access token with "Bypass 2FA for automation" enabled:
- Go to https://www.npmjs.com/settings/USERNAME/tokens
- Generate new token with automation bypass
- Configure:
npm config set //registry.npmjs.org/:_authToken=TOKEN
"Scope not found"
The @everworker organization must exist on npm. Create at https://www.npmjs.com/org/create
Forgot to update CHANGELOG
You can amend after the fact:
# Edit CHANGELOG.md
git add CHANGELOG.md
git commit --amend --no-edit
git push --force origin main
Files Published
The files field in package.json controls what's published:
dist/- Built JavaScript and TypeScript declarationsREADME.md- Package documentation (shown on npm)LICENSE- MIT license
Run npm pack --dry-run to preview what will be included.