Changesets
This repository uses Changesets to version packages and keep changelogs up to date.
Important
Changeset content becomes the release notes presented to consumers. Write summaries as if they will be read by end users of your packages.
TL;DR
- Create a changeset for consumer-affecting changes: New APIs, bug fixes, breaking changes β
patch/minor/major - Skip for internal-only work: Refactors, tests, tooling β no changeset unless repo-wide impact
- ALL markdown changes need changesets: Any changes to
.mdfiles β create changeset for@equinor/fusion-framework-docs(docs are linked/referenced) - One package per changeset preferred: Group only identical changes across packages
- Directory:
.changeset/(singular) with package-prefixed filename - Use
pnpm changesetfor guided creation; bot validates on PRs - Summary: What changed, why it matters, migration notes if breaking
When to create a changeset
Decision Tree:
- Are you on a feature/fix branch? β Check
.changeset/for existing changesets first - Is this a workspace root change? (monorepo config, tooling, CI) β Skip changeset entirely
- Are you changing any
.mdfiles? β Create changeset for@equinor/fusion-framework-docs - All other package changes β Create changeset (
patch/minor/major)- Even internal refactoring requires a changeset for proper versioning
- Internal changes use
patchwith clear "internal only" notes
Version bump guidance:
patch: Backward-compatible bug fixes, internal changes, or minimal updatesminor: Backward-compatible new features or enhancementsmajor: Breaking changes requiring consumer updates
Special cases:
- Workspace root only (cannot be released): Skip changeset entirely
- Multi-package identical changes (e.g., same dependency bump): Group in one changeset
Directory and file naming
- Directory:
.changeset/(singular, not.changesets/) - Naming convention:
{package-name}_{short-description}.md- Prefix with package name (exclude
@equinor/scope) - Use kebab-case for multi-word descriptions
- Keep total filename under 50 characters
- Examples:
framework_add-invalidate-flag.mdreact-module_http-client-fix.mdquery_cache-improvements.md
- Prefix with package name (exclude
Frontmatter format
Each file must start with YAML frontmatter listing affected packages and the bump type:
---
"@equinor/fusion-framework": patch
---
Short, clear summary of the change and its impact.Multi-package changes are allowed. Prefer one package per changeset, unless the change and the message are identical across packages (e.g., bumping the same dependency version in several packages). In that case, group them in one changeset by listing all packages in the frontmatter.
Choosing the version type
major: breaking API or behavior changesminor: new, backward-compatible functionalitypatch: backward-compatible bug fixes or internal-only changes
Writing effective summaries
Changeset summaries become the release notes that consumers read. Structure each summary to answer:
- What changed - Brief description of the modification
- Why it changed - Rationale and benefits
- How to migrate (if applicable) - For breaking changes or major updates
Guidelines:
- Be specific and consumer-focused - write as if consumers will read this directly
- Keep under 3-4 lines for readability
- Include code examples only for complex new features
- Reference issues:
Fixes https://github.com/equinor/fusion-framework/issues/123,Closes https://github.com/equinor/fusion-framework/issues/123 - Credit contributors:
Thanks @username for the report
Migration notes for breaking changes:
- One-line migration instruction
- Include before/after code snippets if complex
- Link to migration guide if extensive
Best Practices
- Single package per changeset: Keep changes focused and releases manageable
- Scope narrowly: Multiple small changesets > one large changeset for better traceability
- Update during review: Modify changesets if PR scope changes
- Check existing files: Always scan
.changeset/on feature branches first - Group identical changes: Only combine packages with identical changes/messages
Quality Assurance Checklist
Before committing a changeset:
Examples
New feature (minor):
---
"@equinor/fusion-query": minor
---
Add optional `invalidate` argument to `Query.query` for pre-execution cache invalidation.
```typescript
// Before
await query('data');
// After
await query('data', { invalidate: true });
```
Fixes: https://github.com/equinor/fusion-framework/issues/123 β thanks @username for the suggestionBug fix (patch):
---
"@equinor/fusion-framework-react": patch
---
Fix useFramework hook memory leak when component unmounts during async operations.
Prevents stale closure access in cleanup functions.Breaking change (major):
---
"@equinor/fusion-framework": major
---
Remove deprecated `createApp` function in favor of `initializeFramework`.
**Migration:** Replace `createApp(config)` with `initializeFramework(config)`.Multi-package dependency bump:
---
"@equinor/fusion-framework": patch
"@equinor/fusion-framework-react": patch
"@equinor/fusion-framework-module-http": patch
---
Bump `axios` to 1.6.0 across packages to address security advisory; no public API changes.Internal refactor (patch):
---
"@equinor/fusion-framework": patch
---
Internal: refactor module loading to simplify dependency graph; no public API changes.Git context for changeset generation
Priority order for determining changes:
- Staged changes - Analyze only staged files if present
- Unstaged changes - Analyze unstaged files if no staged changes
- Branch comparison - Compare against
origin/${BRANCH}if remote tracking exists - Fallback - Compare against
origin/mainif no remote branch found
Useful commands:
# Check for staged changes
git diff --cached --name-only
# Check for unstaged changes
git diff --name-only
# Check current branch and remote tracking
git branch -vv
# Compare against remote branch
git diff --name-only origin/${BRANCH}...HEADCLI workflow
Use the guided changeset creation:
pnpm changesetThe Changesets bot validates on PRs and can help create changesets from the GitHub UI.
AI Agent Guidelines
When automating changeset creation:
- Analyze git state in priority order: staged β unstaged β branch diff
- Create changesets for ALL package changes (internal refactoring still needs versioning)
- Prefer single package per changeset unless changes are identical
- Use package name (without scope) as filename prefix
- Follow the decision tree: workspace root β skip, package changes β create
- Mark internal changes clearly with "Internal:" prefix in summary
- Include migration notes for breaking changes
Reviewer checklist
Common mistakes to avoid
- β Using
.changesets/instead of.changeset/ - β Grouping unrelated changes in one changeset
- β Missing affected packages in frontmatter
- β Vague summaries or incorrect version bump types
- β Skipping changesets for package changes (even internal ones)
- β Skipping changesets for consumer-impacting changes
- β Grouping packages with different changes/messages
- β Omitting migration notes for breaking changes
- β Not checking existing changesets on feature branches
- β Incorrect filename prefixes or overly long names