This document outlines the process for releasing the @saigontechnology/react-firebase-chat package to npm.
- Ensure you're logged in to npm:
npm whoami - If not logged in:
npm login - Ensure you have the necessary permissions to publish to the
@saigontechnologyscope
The package.json includes several convenient release scripts:
Before publishing, always run a dry-run to see what will be published:
npm run dry-runThis will show you exactly what files and content will be included in the npm package.
For bug fixes and small updates:
npm run release:patchFor new features that don't break existing functionality:
npm run release:minorFor breaking changes:
npm run release:majorFor pre-release versions:
npm run release:betaIf you prefer to control each step manually:
-
Update the version:
npm version patch # or minor/major -
Build the package:
npm run build
-
Test the build:
npm run dry-run
-
Publish to npm:
npm publish
Before releasing, ensure:
- All changes are documented in CHANGELOG.md
- Version number follows semantic versioning
- Package builds successfully (
npm run build) - All TypeScript files compile without errors
- README.md is up to date
- License file exists and is correct
After publishing:
- Create a GitHub release with the same version tag
- Update the README if needed
- Notify team members of the new release
- Update dependent projects that use this package
If you get permission errors, ensure:
- You're logged in to the correct npm account
- Your account has access to the
@saigontechnologyorganization - The package name is correct in package.json
If the build fails:
- Check TypeScript compilation errors
- Ensure all dependencies are installed
- Verify PostCSS configuration is working
- Double-check the package name and version
- Ensure you're not trying to republish the same version
- Check npm registry status
- Package Name:
@saigontechnology/react-firebase-chat - Registry: https://registry.npmjs.org/
- Scope: @saigontechnology
- Access: Public