publishing-guide, npm, release-process
This guide explains how to publish new versions of @adi-family/http packages to npm.
Before publishing, ensure you have:
- npm account with access to @adi-family organization
- Logged in to npm:
npm login - Clean git state: All changes committed
- On main branch:
git checkout main
For a quick publish of the current version:
# Run pre-publish checks and publish all packages
bun run publish:allThis will:
- ✅ Verify you're on main branch
- ✅ Check for uncommitted changes
- ✅ Verify npm login
- ✅ Clean old builds
- ✅ Run type checking
- ✅ Build all packages
- ✅ Publish to npm in correct order
To test the publishing process without actually publishing:
bun run publish:dry-runThis shows exactly what would be published without making any changes to npm.
To bump the version of all packages:
# Patch version (1.0.0 -> 1.0.1)
bun run version:bump patch
# Minor version (1.0.0 -> 1.1.0)
bun run version:bump minor
# Major version (1.0.0 -> 2.0.0)
bun run version:bump majorOr use the script directly:
./scripts/version-bump.sh patch
./scripts/version-bump.sh minor
./scripts/version-bump.sh major-
Bump version
bun run version:bump patch
-
Review changes
git diff
-
Commit version bump
git add . git commit -m "🔖 Bump version to 1.0.1"
-
Create git tag
git tag v1.0.1
-
Push to GitHub
git push && git push --tags -
Publish to npm
bun run publish:all
To see what files will be included in each package:
bun run check:packagesThis shows:
- List of files to be published
- Package size (packed)
- Unpacked size
If you need to publish packages individually:
# 1. Run pre-publish checks
./scripts/pre-publish.sh
# 2. Publish core package first
cd packages/http
npm publish --access public
# 3. Publish Express adapter
cd ../http-express
npm publish --access public
# 4. Publish Native adapter
cd ../http-native
npm publish --access publicImportant: Always publish @adi-family/http first, as other packages depend on it.
| Script | Description |
|---|---|
bun run prepublish |
Run all pre-publish checks |
bun run publish:all |
Publish all packages to npm |
bun run publish:dry-run |
Test publish without uploading |
bun run version:bump [type] |
Bump version (patch/minor/major) |
bun run check:packages |
Check package contents |
bun run build |
Build all packages |
bun run typecheck |
Run TypeScript type checking |
bun run clean |
Remove all build artifacts |
npm login
# Follow the promptsgit status
git add .
git commit -m "Your message"git checkout mainIf you're trying to publish a version that already exists:
# Bump the version first
bun run version:bump patch
git add .
git commit -m "🔖 Bump version"
git push
bun run publish:all# Clean and rebuild
bun run clean
bun run buildThe packages must be published in this specific order:
- @adi-family/http - Core library (no dependencies)
- @adi-family/http-express - Depends on core
- @adi-family/http-native - Depends on core
The publish.sh script handles this automatically.
After publishing, verify the packages:
# Check package info
npm info @adi-family/http
npm info @adi-family/http-express
npm info @adi-family/http-native
# Test installation in a new directory
mkdir test-install && cd test-install
npm init -y
npm install @adi-family/http @adi-family/http-express @adi-family/http-nativeWe follow Semantic Versioning:
- Patch (x.x.X): Bug fixes, documentation updates
- Minor (x.X.0): New features, backward compatible
- Major (X.0.0): Breaking changes
For beta or alpha releases:
# Manually set version in package.json files
# Example: 1.1.0-beta.1
npm publish --tag betaAfter successful publishing:
- ✅ Verify packages on npm: https://www.npmjs.com/org/adi-family
- ✅ Test installation in a clean project
- ✅ Update GitHub release notes (optional)
- ✅ Announce release (optional)
- Never publish with
--force - Always use
--access publicfor public packages - Keep npm credentials secure
- Review package contents before publishing
For issues or questions:
- GitHub Issues: https://github.com/adi-family/http/issues
- npm packages: https://www.npmjs.com/org/adi-family