.cursor/commands/changeset.md
Create a changeset using the CLI. The goal of changesets is to use it for generating changelogs. Individual package changelogs will later be combined into a single changelog that is published with each release.
Run the CLI with the following command to create a changeset:
pnpm changeset -s -m "your changeset message" (--major | --minor | --patch) pkg-name
For each package that has changes, run the CLI once and specify the appropriate version bump type (--major, --minor, or --patch) and message for that package. This will create a separate changeset file for each package, which is important for generating accurate changelogs.
Arguments:
-s or --skipPrompt: Run non-interactively; requires at least one of --major, --minor, or --patch (required for automation)-m "message" or --message "message": The changeset message (required)--major pkg-name: Packages that should have a major version bump--minor pkg-name: Packages that should have a minor version bump--patch pkg-name: Packages that should have a patch version bumpNotes:
--major or --minor for non-patch bumps--minor @mastra/core --minor mastrapatch: Bugfixes with backward-compatible changesminor: New features with backward-compatible changesmajor: Breaking changes that are not backward-compatibleIf the changes span multiple packages (e.g. @mastra/core, @mastra/memory, mastra, so 3 packages) and each change is different from another, you MUST create multiple changeset files. Otherwise you'll mix different changes into changeset files where they don't belong. For this you must decide what logical groups exist. Example: The majority of the main feature was changed in @mastra/memory and only supporting changes were done in @mastra/core and mastra. Then @mastra/memory needs its own changeset separate from the others. You can achieve this by running the CLI multiple times and selecting the appropriate packages for each changeset.
Important: Very long changesets in one file (with multiple packages in the frontmatter) are an anti-pattern. This will lead to multiple packages having really large changelog entries. This must be avoided. If you have multiple packages likely there is one or two main packages where the majority of change lives.