chore(versioning): switch to standard-version for automated changelog generation
This change implements standard-version for versioning and changelog management: - Adds standard-version as a dev dependency - Updates package.json scripts to use standard-version - Creates .versionrc.json configuration file - Updates CHANGELOG.md with instructions for conventional commits - Removes obsolete manual changelog update script
This commit is contained in:
parent
c3c4ca31e1
commit
fda949aed2
4 changed files with 1824 additions and 23 deletions
22
.versionrc.json
Normal file
22
.versionrc.json
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"types": [
|
||||
{"type": "feat", "section": "Added", "hidden": false},
|
||||
{"type": "fix", "section": "Fixed", "hidden": false},
|
||||
{"type": "chore", "section": "Changed", "hidden": false},
|
||||
{"type": "docs", "section": "Documentation", "hidden": false},
|
||||
{"type": "style", "section": "Changed", "hidden": true},
|
||||
{"type": "refactor", "section": "Changed", "hidden": false},
|
||||
{"type": "perf", "section": "Changed", "hidden": false},
|
||||
{"type": "test", "section": "Tests", "hidden": true},
|
||||
{"type": "build", "section": "Build System", "hidden": true},
|
||||
{"type": "ci", "section": "Continuous Integration", "hidden": true}
|
||||
],
|
||||
"releaseCommitMessageFormat": "chore(release): {{currentTag}} [skip ci]",
|
||||
"commitUrlFormat": "https://github.com/soulcraft-research/brainy/commit/{{hash}}",
|
||||
"compareUrlFormat": "https://github.com/soulcraft-research/brainy/compare/{{previousTag}}...{{currentTag}}",
|
||||
"issueUrlFormat": "https://github.com/soulcraft-research/brainy/issues/{{id}}",
|
||||
"userUrlFormat": "https://github.com/{{user}}",
|
||||
"skip": {
|
||||
"tag": false
|
||||
}
|
||||
}
|
||||
56
CHANGELOG.md
56
CHANGELOG.md
|
|
@ -59,22 +59,46 @@ For detailed implementation notes and technical summaries of previous versions,
|
|||
|
||||
## How to Update This Changelog
|
||||
|
||||
When making changes to the project:
|
||||
This project now uses [standard-version](https://github.com/conventional-changelog/standard-version) to automatically generate the changelog from commit messages.
|
||||
|
||||
1. Add new entries under `[Unreleased]` section
|
||||
2. Use the following categories:
|
||||
- `Added` for new features
|
||||
- `Changed` for changes in existing functionality
|
||||
- `Deprecated` for soon-to-be removed features
|
||||
- `Removed` for now removed features
|
||||
- `Fixed` for any bug fixes
|
||||
- `Security` for vulnerability fixes
|
||||
### Commit Message Format
|
||||
|
||||
3. When releasing a new version:
|
||||
- Move unreleased changes to a new version section
|
||||
- Update the version number and date
|
||||
- Create a new empty `[Unreleased]` section
|
||||
Follow the [Conventional Commits](https://www.conventionalcommits.org/) specification for your commit messages:
|
||||
|
||||
4. Link to GitHub releases: `[0.26.0] - 2025-07-28` format
|
||||
5. Keep entries concise but informative for users
|
||||
6. Include technical details in a separate subsection if needed
|
||||
```
|
||||
<type>(<scope>): <description>
|
||||
|
||||
[optional body]
|
||||
|
||||
[optional footer(s)]
|
||||
```
|
||||
|
||||
Where `<type>` is one of:
|
||||
- `feat`: A new feature (maps to **Added** section)
|
||||
- `fix`: A bug fix (maps to **Fixed** section)
|
||||
- `chore`: Regular maintenance tasks (maps to **Changed** section)
|
||||
- `docs`: Documentation changes (maps to **Documentation** section)
|
||||
- `refactor`: Code changes that neither fix bugs nor add features (maps to **Changed** section)
|
||||
- `perf`: Performance improvements (maps to **Changed** section)
|
||||
|
||||
### Examples:
|
||||
|
||||
```
|
||||
feat(storage): add new file system adapter
|
||||
fix(hnsw): resolve index corruption on large datasets
|
||||
docs(readme): update installation instructions
|
||||
refactor(core): simplify graph traversal algorithm
|
||||
```
|
||||
|
||||
### Releasing a New Version
|
||||
|
||||
To release a new version:
|
||||
1. Ensure all changes are committed
|
||||
2. Run one of:
|
||||
- `npm run release` (for patch version)
|
||||
- `npm run release:patch` (same as above)
|
||||
- `npm run release:minor` (for minor version)
|
||||
- `npm run release:major` (for major version)
|
||||
3. Push changes with tags: `git push --follow-tags origin main`
|
||||
|
||||
The changelog will be automatically updated based on your commit messages.
|
||||
|
|
|
|||
1754
package-lock.json
generated
1754
package-lock.json
generated
File diff suppressed because it is too large
Load diff
15
package.json
15
package.json
|
|
@ -54,19 +54,19 @@
|
|||
"build:browser": "BUILD_TYPE=browser rollup -c rollup.config.js",
|
||||
"start": "node dist/unified.js",
|
||||
"demo": "npm run build && npm run build:browser && npx http-server -o /demo/index.html",
|
||||
"version": "echo 'Version updated in package.json'",
|
||||
"version:patch": "npm version patch && node scripts/update-changelog.js",
|
||||
"version:minor": "npm version minor && node scripts/update-changelog.js",
|
||||
"version:major": "npm version major && node scripts/update-changelog.js",
|
||||
"changelog:update": "node scripts/update-changelog.js",
|
||||
"changelog:check": "echo 'Please ensure CHANGELOG.md [Unreleased] section has your changes before releasing'",
|
||||
"release": "standard-version",
|
||||
"release:patch": "standard-version --release-as patch",
|
||||
"release:minor": "standard-version --release-as minor",
|
||||
"release:major": "standard-version --release-as major",
|
||||
"release:dry-run": "standard-version --dry-run",
|
||||
"changelog:check": "echo 'Changelog is now automatically generated from commit messages'",
|
||||
"lint": "eslint --ext .ts,.js src/",
|
||||
"lint:fix": "eslint --ext .ts,.js src/ --fix",
|
||||
"format": "prettier --write \"src/**/*.{ts,js}\"",
|
||||
"check:format": "prettier --check \"src/**/*.{ts,js}\"",
|
||||
"check:style": "node scripts/check-code-style.js",
|
||||
"prepare": "npm run build",
|
||||
"deploy": "npm run build && npm publish && node scripts/create-github-release.js",
|
||||
"deploy": "npm run build && npm run release && npm publish && node scripts/create-github-release.js",
|
||||
"dry-run": "npm pack --dry-run",
|
||||
"test": "vitest run",
|
||||
"test:watch": "vitest",
|
||||
|
|
@ -148,6 +148,7 @@
|
|||
"puppeteer": "^22.5.0",
|
||||
"rollup": "^4.13.0",
|
||||
"rollup-plugin-terser": "^7.0.2",
|
||||
"standard-version": "^9.5.0",
|
||||
"tslib": "^2.6.2",
|
||||
"typescript": "^5.4.5",
|
||||
"vitest": "^3.2.4"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue