Create changesets for package changes in pull requests. Use whenever you modify code in any package (packages/*). Required before committing changes to packages...
This skill creates the changeset file that tells the release pipeline what changed and how to version it. Every change to a package needs one — even small fixes — because changesets are how versions get bumped and changelogs get generated automatically.
Fix validation error in text field when value is null
Use for: New features, enhancements, non-breaking API changes
Format: Explain the new feature and any steps required to implement it
Example:
Add support for custom field validation functions
You can now pass a custom validation function to field configs:
fields: {
email: text({
validation: {
custom: async (value) => {
if (!value.endsWith('@company.com')) {
throw new Error('Must use company email')
}
}
}
})
}
Use for: Breaking API changes, removed features, changed behavior
ONLY when user explicitly requests a major version bump
Format: Detailed explanation of breaking changes and migration steps
Example:
BREAKING: Remove deprecated `useAuth` hook
The `useAuth` hook has been removed. Use `useSession` instead:
// Before
const { user } = useAuth()
// After
const { data: session } = useSession()
const user = session?.user
git status or git diff to see which packages were modifiedpackages/*/src/ or packages/*/package.jsonFor each changed package, ask yourself:
patchminormajor if user explicitly requested it, otherwise ask userChangesets are stored in .changeset/ directory with random names. Use this format:
File name: .changeset/[random-words].md
brave-lions-smile.md, quiet-trees-dance.md.mdFile format:
---
'@opensaas/package-name': patch
---
Brief description of the change
For multiple packages:
---
'@opensaas/stack-core': minor
'@opensaas/stack-ui': patch
---
Description of changes affecting both packages
For patch versions (bug fixes):
For minor versions (features):
For major versions (breaking changes):
Use this template when creating changeset files:
---
'@opensaas/stack-[package]': patch
---
[One line describing the bug fix]
---
'@opensaas/stack-[package]': minor
---
[Feature description]
[Usage example with code]
---
'@opensaas/stack-[package]': major
---
BREAKING: [What changed]
[Detailed explanation of the breaking change]
Migration guide:
// Before
[old code]
// After
[new code]
[Any additional steps required]
File: .changeset/calm-eagles-rest.md
---
'@opensaas/stack-core': patch
---
Fix validation error in text field when value is null
File: .changeset/brave-lions-smile.md
---
'@opensaas/stack-ui': minor
---
Add dark mode support to AdminUI component
You can now enable dark mode by passing the `theme` prop:
<AdminUI
context={context}
config={config}
theme="dark"
/>
Or use system preference:
<AdminUI
context={context}
config={config}
theme="system"
/>
File: .changeset/quiet-trees-dance.md
---
'@opensaas/stack-core': minor
'@opensaas/stack-auth': minor
---
Add support for custom session fields in access control
You can now access custom session fields in access control functions:
// In authConfig
authConfig({
sessionFields: ['userId', 'email', 'role', 'tenantId']
})
// In access control
access: {
operation: {
query: ({ session }) => {
return { tenantId: session.tenantId }
}
}
}
File: .changeset/ancient-stars-fall.md
---
'@opensaas/stack-core': major
---
BREAKING: Remove `getContext()` synchronous variant
The synchronous `getContext()` function has been removed. All context creation is now async.
Migration guide:
// Before
const context = getContext({ userId })
// After
const context = await getContext({ userId })
Make sure to add `async` to any functions that call `getContext()`:
// Before
function myAction() {
const context = getContext({ userId })
}
// After
async function myAction() {
const context = await getContext({ userId })
}
Don't use major unless explicitly requested
Don't make patch descriptions too long
Don't forget to include code examples for minor changes
Don't create changesets for examples or non-package changes
packages/*examples/* don't need changesetsDon't use vague descriptions
Don't forget to list all affected packages
When working on a PR:
.changeset/Q: Should I create one changeset per package or one for all changes? A: Create one changeset that lists all affected packages. Only create multiple changesets if you have unrelated changes.
Q: What if I'm not sure if it's patch or minor? A: Ask yourself: "Does this add new functionality or just fix existing functionality?" New = minor, fix = patch.
Q: What if the change is both a feature and a bug fix? A: Use minor (the higher version bump). Mention both aspects in the description.
Q: Do I need a changeset for documentation changes in packages?
A: Yes, if the docs are in packages/*/src/ or affect the package. Use patch. Changes to example documentation don't need changesets.
.changeset/*.md filespackage.json