How to version and publish wolfcola-devtools packages
Release Process
The wolfcola-devtools monorepo uses Changesets for versioning and publishing packages to npm.
Overview
The release workflow is:
- Contributors add changesets to their pull requests
- A "Version Packages" PR is automatically maintained by the Changesets GitHub Action
- When the Version Packages PR is merged, packages are published to npm
Adding a Changeset
Every pull request that modifies a publishable package must include a changeset. Run:
pnpm changeset
The interactive prompt will ask you to:
- Select packages — choose which packages are affected by your change
- Select bump type —
patchfor bug fixes,minorfor new features,majorfor breaking changes - Write a summary — describe what changed and why
This creates a Markdown file in .changeset/ with the change metadata:
---
'@wolfcola/treeshake-check': patch
---
Fixed false positive when checking packages with conditional exports.
Multiple Packages
If your change affects multiple packages, select all of them in the prompt. Each can have a different bump level:
---
'@wolfcola/devtools-types': minor
'@wolfcola/devtools-bridge': patch
---
Added new FlowError type to devtools-types. Updated devtools-bridge to use it.
Changeset Guidelines
- Write in imperative mood ("Add feature" not "Added feature")
- Include context about why the change was made, not just what
- If the change is a breaking change, describe the migration path
- One changeset per logical change — split unrelated changes into separate PRs
Version Packages PR
The Changesets GitHub Action runs on every push to main. It:
- Collects all changeset files in
.changeset/ - Calculates the new version for each affected package
- Updates
package.jsonversions andCHANGELOG.mdfiles - Opens (or updates) a "Version Packages" pull request
The Version Packages PR shows all pending changes and the resulting version bumps. Review it to make sure the versions look correct.
Publishing
When the Version Packages PR is merged:
- The CI workflow detects the version bump commits
- It runs the full test suite
- It builds all affected packages
- It publishes updated packages to npm with
pnpm publish -r
Manual Publishing
In rare cases, you may need to publish manually:
pnpm changeset version # Apply version bumps
pnpm install # Update lockfile
pnpm -r build # Build all packages
pnpm changeset publish # Publish to npm
Manual publishing should be a last resort. Always prefer the automated workflow via the Version Packages PR.
Pre-releases
For testing unreleased versions:
pnpm changeset pre enter next
pnpm changeset version
pnpm changeset publish
This publishes packages with a next dist-tag (e.g. 1.2.0-next.0) so they do not affect the latest tag.
To exit pre-release mode:
pnpm changeset pre exit
Version Policy
- Patch (
0.0.x) — Bug fixes, documentation updates, internal refactors - Minor (
0.x.0) — New features, new exports, new optional fields in schemas - Major (
x.0.0) — Breaking changes to public APIs, removed exports, changed schema shapes