This project uses Changesets for version management and publishing.
Changesets decouple "recording what changed" from "releasing the change":
After making changes, create a changeset:
pnpm changeset
You'll be prompted to:
patch, minor, or major for each packageThis creates a markdown file in .changeset/:
.changeset/
└── cool-dogs-dance.md
Example changeset file:
---
"@gradientedge/cdk-utils-aws": minor
"@gradientedge/cdk-utils": minor
---
Added EKS Fargate profile support to EksManager
| Type | When to Use |
|---|---|
patch |
Bug fixes, dependency updates, documentation changes |
minor |
New features, new service manager methods, new construct patterns |
major |
Breaking changes — removed methods, changed interfaces, renamed exports |
@gradientedge/cdk-utils) should be bumped alongside the sub-package it re-exportsWhen changesets are merged to main, the CI pipeline handles everything:
PR with changeset merged to main
│
▼
┌─────────────────────────┐
│ CI detects changesets │
│ in .changeset/ directory │
└─────────┬───────────────┘
│
▼
┌─────────────────────────┐
│ Creates "Version │
│ Packages" PR │
│ - Bumps package.json │
│ - Updates CHANGELOGs │
│ - Removes changeset files│
└─────────┬───────────────┘
│
(when merged)
│
▼
┌─────────────────────────┐
│ Publishes to npm │
│ - pnpm release │
│ - changeset publish │
└─────────┬───────────────┘
│
▼
┌─────────────────────────┐
│ Deploys documentation │
│ to GitHub Pages │
└─────────────────────────┘
mainpackage.json versions are bumped in affected packagesCHANGELOG.md files are updated with the changeset summaries.changeset/ are deletedpnpm release which calls changeset publishThe changeset configuration lives in .changeset/config.json:
| Option | Value | Description |
|---|---|---|
changelog |
@changesets/changelog-github |
Generates changelog entries with GitHub PR links |
commit |
false |
Don't auto-commit version bumps |
access |
public |
Publish packages with public access |
baseBranch |
main |
Target branch for releases |
updateInternalDependencies |
patch |
Bump internal workspace deps as patch |
If you need to publish manually (e.g., CI failure):
# 1. Consume changesets and bump versions
pnpm changeset version
# 2. Review the changes
git diff
# 3. Commit the version bumps
git add .
git commit -m "chore: version packages"
# 4. Build for production
pnpm build:production
# 5. Publish to npm
pnpm release
For pre-release (beta/alpha) versions:
# Enter pre-release mode
pnpm changeset pre enter beta
# Create changesets as normal
pnpm changeset
# Version (creates beta versions like 1.1.0-beta.0)
pnpm changeset version
# Exit pre-release mode when ready
pnpm changeset pre exit
If the Version Packages PR isn't created, ensure:
.changeset/ (not just the config.json)mainFirst-time publish for a new package requires:
"access": "public" in the package's publishConfigNPM_TOKEN)If internal dependency versions are out of sync:
pnpm changeset version
This recalculates all versions based on pending changesets and the updateInternalDependencies config.