Spaces:
Sleeping
Version Management
This document explains how versioning works in the Synthesys PM Tool application.
Version Format
We follow a modified semantic versioning format: MAJOR.MINOR.PATCH
- MAJOR: Incremented for incompatible API changes or significant new features that change the application structure
- MINOR: Incremented for new features that maintain backward compatibility
- PATCH: Incremented for bug fixes and minor changes
Special Rule
We use a special rule for transitioning between version ranges:
- When
MINORreaches 10, we incrementMAJORand resetMINORto 0 - Example: 2.10.0 → 3.0.0
Current Version
The current version is defined in src/lib/version.ts and is displayed in:
- The sidebar footer
- The landing page footer
- Package.json
How to Update the Version
Automatic Updates During Build
The patch version is automatically incremented every time you run:
npm run buildnpm run build:dev
This happens through a pre-build script that increases the patch number by 1 before each build.
Note: The increment script uses ES modules format (
.mjsextension) since the project has"type": "module"inpackage.json.
If you need to build without incrementing the version (e.g., for rebuilding the same version after a small fix), use:
npm run build:no-version-bump
Using the Version Update Script
For manual version updates (especially for minor and major versions), we've provided a script:
# Install ts-node if not already installed
npm install -g ts-node
# Update the patch version (for bug fixes)
npx ts-node src/scripts/update-version.ts patch
# Update the minor version (for new features)
npx ts-node src/scripts/update-version.ts minor
# Update the major version (for breaking changes)
npx ts-node src/scripts/update-version.ts major
The script will automatically:
- Update the version in
src/lib/version.ts - Update the version in
package.json
Manual Update
If you need to manually update the version:
- Update the
APP_VERSIONobject insrc/lib/version.ts - Update the
versionfield inpackage.json
Version History
- 2.3.0: Current version
- [Earlier version history not available]
Best Practices
- Remember that builds automatically increment the patch version
- For significant changes, manually update the minor or major version before building
- Use patch versions for bug fixes and minor improvements
- Use minor versions for new features
- Use major versions for significant changes or redesigns
- Remember the rule: 2.10.0 → 3.0.0 (not 2.10.0 → 2.11.0)
- If you want to build without incrementing the version, use
npm run build:no-version-bump