|
| 1 | +# Changesets |
| 2 | + |
| 3 | +This directory contains changeset files that document changes for upcoming releases. |
| 4 | + |
| 5 | +## Why Changesets? |
| 6 | + |
| 7 | +Using individual changeset files instead of editing `CHANGELOG.md` directly: |
| 8 | +- **Avoids merge conflicts** when multiple PRs are open |
| 9 | +- **Associates changes with PRs** for better traceability |
| 10 | +- **Enforces documentation** of all changes |
| 11 | +- **Determines version bump type** automatically from the changesets |
| 12 | + |
| 13 | +## Creating a Changeset |
| 14 | + |
| 15 | +### Using the Script |
| 16 | + |
| 17 | +```bash |
| 18 | +# Create a new changeset |
| 19 | +bun scripts/create-manual-changeset.mjs --bump-type patch --description "Fix a bug" |
| 20 | +bun scripts/create-manual-changeset.mjs --bump-type minor --description "Add new feature" |
| 21 | +bun scripts/create-manual-changeset.mjs --bump-type major --description "Breaking change" |
| 22 | +``` |
| 23 | + |
| 24 | +### Manually |
| 25 | + |
| 26 | +Create a file with a random name (e.g., `happy-cats-dance.md`) in this directory with the following format: |
| 27 | + |
| 28 | +```markdown |
| 29 | +--- |
| 30 | +'java-ai-driven-development-pipeline-template': patch |
| 31 | +--- |
| 32 | + |
| 33 | +Description of the changes made. |
| 34 | +``` |
| 35 | + |
| 36 | +## Changeset Format |
| 37 | + |
| 38 | +Each changeset file has two parts: |
| 39 | + |
| 40 | +1. **Frontmatter** (between `---` markers): |
| 41 | + - Package name and version bump type (major, minor, or patch) |
| 42 | +2. **Description**: |
| 43 | + - Clear description of what changed |
| 44 | + - Use present tense ("Add feature" not "Added feature") |
| 45 | + - Reference issue numbers when applicable: "Fix login bug (#123)" |
| 46 | + |
| 47 | +### Version Bump Types |
| 48 | + |
| 49 | +- **patch**: Bug fixes, documentation updates, internal changes |
| 50 | +- **minor**: New features, non-breaking enhancements |
| 51 | +- **major**: Breaking changes, API changes |
| 52 | + |
| 53 | +## Example Changeset |
| 54 | + |
| 55 | +```markdown |
| 56 | +--- |
| 57 | +'java-ai-driven-development-pipeline-template': minor |
| 58 | +--- |
| 59 | + |
| 60 | +Add async delay function with CompletableFuture support for non-blocking operations. |
| 61 | +``` |
| 62 | + |
| 63 | +## What Happens During Release |
| 64 | + |
| 65 | +1. The release workflow detects pending changesets |
| 66 | +2. Multiple changesets are merged (highest bump type wins) |
| 67 | +3. Version is bumped according to the determined bump type |
| 68 | +4. A new version entry is added to `CHANGELOG.md` |
| 69 | +5. Changeset files are deleted |
| 70 | +6. Changes are committed and pushed to main |
| 71 | + |
| 72 | +## Tips |
| 73 | + |
| 74 | +- One changeset per PR is typical |
| 75 | +- Be concise but descriptive in your descriptions |
| 76 | +- The bump type determines the version number change |
| 77 | +- Multiple changesets are automatically merged during release |
| 78 | + |
0 commit comments