This document outlines the complete release process for publishing react-native-ble-nitro to npm.
- All tests pass:
npm test - Linting passes:
npm run lint - TypeScript compilation successful:
npm run typecheck - Nitro code generation works:
npx nitro-codegen - Plugin builds successfully:
npm run build:plugin
- README.md is up-to-date with latest features
- API_DIFFERENCES.md reflects current implementation
- CONTRIBUTING.md has correct setup instructions
- All code examples in docs are tested and working
- Update version in
package.json - Update version in iOS podspec if needed
- Create changelog entry (see Changelog Format)
- Tag release appropriately
- Verify
package.jsonfiles array includes all necessary files - Check
.npmignoreexcludes development files - Ensure peer dependencies are correct
- Validate keywords and metadata
npm run cleannpx nitro-codegennpm run buildThis will:
- Clean previous builds
- Build the Expo plugin (
plugin/build/) - Compile TypeScript (
lib/)
Check that these directories exist and contain expected files:
lib/- Compiled TypeScriptplugin/build/- Compiled Expo plugin- Native code should be included as source
The npm package will include:
src/- TypeScript source codeios/- iOS native implementation (Swift)android/- Android native implementation (Kotlin)
lib/- Compiled JavaScript/TypeScript definitionsplugin/build/- Compiled Expo plugin
nitro.json- Nitro module configurationreact-native.config.js- React Native configurationpackage.json- Package metadataREADME.md- DocumentationLICENSE- MIT license
nitrogen/generated/- Generated code (users will regenerate)src/__tests__/- Test filesnode_modules/- Dependencies- Development configuration files
# 1. Ensure clean working directory
git status
# 2. Run full build and tests
npm run prepublishOnly
# 3. Update version (patch/minor/major)
npm version patch # or minor/major
# 4. Publish to npm
npm publish
# 5. Push tags to GitHub
git push && git push --tagsThe package includes automated scripts:
# Version bump automatically builds and pushes tags
npm version patch
npm publishCreate entries in this format for each release:
## [1.0.0] - 2025-01-XX
### Added
- Nitro Modules integration for high performance
- iOS Swift and Android Kotlin native implementations
- Expo config plugin with platform-specific functions
- Comprehensive test suite
### Technical Details
- Built on Nitro Modules 0.26.4
- Supports React Native 0.76.0+
- Compatible with Expo SDK 52+
- Full TypeScript definitions# Create test project
npx create-expo-app --template blank-typescript TestBleNitro
cd TestBleNitro
# Install local package
npm install ../react-native-ble-nitro
# Add plugin to app.json
{
"expo": {
"plugins": ["react-native-ble-nitro"]
}
}
# Test basic functionality
# Add BLE usage code to App.tsx- Test on iOS simulator
- Test on iOS physical device
- Test on Android emulator
- Test on Android physical device
- Fresh React Native CLI project
- Fresh Expo managed project
- Expo bare workflow project
- No API keys or secrets in source code
- No internal URLs or development endpoints
- All dependencies are from trusted sources
- License headers are correct
- Use npm two-factor authentication
- Publish from trusted environment
- Verify package contents after publishing
# Check package on npm
npm view react-native-ble-nitro
# Test installation
npm install react-native-ble-nitro- Update GitHub release notes
- Update any external documentation
- Announce release in relevant communities
- Watch for immediate issues
- Monitor GitHub issues
- Check npm download stats
For critical bug fixes:
- Create hotfix branch from main/master
- Make minimal fix - only fix the critical issue
- Test thoroughly - ensure fix doesn't break anything
- Patch version bump - increment patch version
- Fast-track release - skip some non-critical checks if needed
- Immediate publish - get fix to users quickly
git checkout -b hotfix/critical-fix-v1.0.1
# Make fix
npm version patch
npm publish
git push && git push --tagsTrack these metrics for each release:
- Download counts - npm download statistics
- GitHub stats - stars, forks, issues
- Community feedback - reviews, discussions
- Performance impact - compared to previous versions
- Maintainer: Final approval and npm publish
- QA Lead: Testing and quality assurance
- Documentation: README and docs updates
- Community: Communication and support
- Monitor GitHub issues for bug reports
- Answer questions in discussions
- Collect feedback for next release
If a critical issue is found after release:
- Assess severity - breaking changes vs. minor issues
- Quick fix - implement minimal viable fix
- Hotfix release - follow hotfix process above
- Communication - notify users of issue and fix
- Patch (1.0.x): Bug fixes, security updates
- Minor (1.x.0): New features, non-breaking changes
- Major (x.0.0): Breaking changes, major rewrites
- Regular releases: Monthly minor releases
- Hotfixes: As needed for critical issues
- Major releases: Quarterly or as needed
# Full release preparation
npm run prepublishOnly
# Check what will be published
npm pack --dry-run
# Publish with tag
npm publish --tag beta
# Check package info
npm info react-native-ble-nitro
# View published files
npm view react-native-ble-nitro filesReady to release? Follow the checklist above and make React Native BLE development faster for everyone! 🚀