This document describes how to manage releases of the AdCP specification using Changesets.
We use Changesets to manage versions and releases. Changesets automatically:
- Updates
package.jsonversion - Updates all schema
adcp_versiondefaults - Updates documentation examples
- Generates CHANGELOG entries
- Creates git tags
When you make changes to the protocol (adding features, fixing bugs, etc.):
npm run changesetThis will prompt you to:
- Select the type of change (patch/minor/major)
- Write a description of the change
A changeset file will be created in .changeset/ directory. Commit this with your changes.
When ready to release:
npm run versionThis will:
- Apply all pending changesets
- Update
package.jsonversion - Run
scripts/update-schema-versions.jsto sync all schemas and docs - Update CHANGELOG.md
Review the changes, then commit:
git add -A
git commit -m "Version packages"
git pushOr use the convenience script:
npm run releaseAfter the version commit is merged to main:
git tag -a v0.5.0 -m "Release v0.5.0"
git push origin v0.5.0Then create a GitHub release from the tag.
We follow Semantic Versioning:
-
Patch (0.5.x): Bug fixes, documentation clarifications, schema fixes
- Fix typos in schemas or docs
- Correct validation patterns
- Fix broken references
-
Minor (0.x.0): New features, backward-compatible changes
- Add new optional fields
- Add new tasks
- Add new enum values
- Add new standard formats
-
Major (x.0.0): Breaking changes
- Remove or rename fields
- Change field types
- Make optional fields required
- Remove enum values
When you run npm run version, these files are automatically updated:
- package.json: The main version number
- Schema Registry (
static/schemas/source/index.json):adcp_versionfield andlastUpdateddate
That's it! Version is maintained in only two places:
- The npm package version
- The schema registry (single source of truth for protocol version)
Individual request/response schemas and documentation do not contain version fields. Version is indicated by the schema path (/schemas/latest/) and the schema registry.
If you need to manually update versions (avoid this - use Changesets instead):
# Update package.json version
npm version 0.6.0 --no-git-tag-version
# Run the sync script
npm run update-schema-versions
# Commit changes
git add -A
git commit -m "Bump version to 0.6.0"- Check current version: Look at
package.json - Review pending changesets: Check
.changeset/directory - Consider impact: Will this be patch, minor, or major?
- Make your changes to code/docs/schemas
- Run
npm run changesetto create changeset - Select "minor" for new features
- Write clear description of what was added
- Commit both your changes and the changeset file
- Fix the bug
- Run
npm run changeset - Select "patch" for bug fixes
- Describe what was fixed
- Commit both the fix and the changeset
- Carefully consider if the breaking change is necessary
- Make your changes
- Run
npm run changeset - Select "major" for breaking changes
- Write detailed description including migration path
- Update migration documentation
- Commit changes and changeset
Before releasing:
- All tests pass (
npm test) - Documentation is up to date
- CHANGELOG.md entries are accurate
- All changesets describe changes clearly
- Breaking changes have migration guides
- Schema validation works with new changes
After releasing:
- Version commit is pushed to main
- Git tag is created and pushed
- GitHub release is created with notes
- Documentation site is updated
- Community is notified (if major/minor)
Our version management is automated through npm scripts:
{
"changeset": "changeset",
"version": "changeset version && npm run update-schema-versions",
"update-schema-versions": "node scripts/update-schema-versions.js",
"release": "npm run version && npm test && git add -A && git commit -m 'Version packages' && git push"
}The scripts/update-schema-versions.js script updates the schema registry version to match package.json.
Install dependencies:
npm installRun the sync script:
npm run update-schema-versionsThe version script runs tests automatically. If they fail:
- Check what broke
- Fix the issue
- Commit the fix
- Re-run
npm run version
For questions about the release process, open an issue on GitHub or reach out to the maintainers.