Spaces:
Sleeping
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 `MINOR` reaches 10, we increment `MAJOR` and reset `MINOR` to 0 | |
| - Example: 2.10.0 → 3.0.0 | |
| ## Current Version | |
| The current version is defined in `src/lib/version.ts` and is displayed in: | |
| 1. The sidebar footer | |
| 2. The landing page footer | |
| 3. Package.json | |
| ## How to Update the Version | |
| ### Automatic Updates During Build | |
| The patch version is automatically incremented every time you run: | |
| - `npm run build` | |
| - `npm 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 (`.mjs` extension) since the project has `"type": "module"` in `package.json`. | |
| If you need to build without incrementing the version (e.g., for rebuilding the same version after a small fix), use: | |
| ```bash | |
| 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: | |
| ```bash | |
| # 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: | |
| 1. Update the `APP_VERSION` object in `src/lib/version.ts` | |
| 2. Update the `version` field in `package.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` |