mirror of
https://github.com/vercel/chat.git
synced 2026-09-14 18:32:29 +08:00
c84c4e6218
Create 'CONTRIBUTING.md' and update 'CLAUDE.md' and 'SKILL.md' with changeset info Slack-Thread: https://vercel.slack.com/archives/C06QB6ZPEQ6/p1771942250604959?thread_ts=1771942250.604959&cid=C06QB6ZPEQ6 Co-authored-by: v0 <v0[bot]@users.noreply.github.com>
2.0 KiB
2.0 KiB
Contributing to Chat SDK
Setup
pnpm install
pnpm build
Development
pnpm dev # Watch mode
pnpm test # Run tests
pnpm validate # Full validation (lint, typecheck, test, build)
Always run pnpm validate before declaring a task done.
Changesets (Release Flow)
This monorepo uses Changesets to manage versioning and changelogs. Every PR that changes a package's behavior must include a changeset.
Creating a changeset
pnpm changeset
You'll be prompted to:
- Select the affected package(s) — choose which packages your change touches (e.g.,
@chat-adapter/slack,chat) - Choose the semver bump —
patchfor fixes,minorfor new features,majorfor breaking changes - Write a summary — a short description of the change (this goes into the CHANGELOG)
This creates a markdown file in .changeset/ — commit it with your PR.
When to use which bump
| Bump | Use for | Example |
|---|---|---|
patch |
Bug fixes, internal refactors with no API change | Fix race condition in thread locking |
minor |
New features, new exports, new options | Add custom installation prefix support |
major |
Breaking changes (removed exports, changed signatures) | Rename createAdapter to createSlackAdapter |
Example
pnpm changeset
# → select: @chat-adapter/slack
# → bump: minor
# → summary: Add custom installation prefix support for preview deployments
Publishing (maintainers)
When changesets are merged to main, the Changesets GitHub Action opens a "Version Packages" PR that bumps versions and updates CHANGELOGs. Merging that PR triggers publishing to npm.
Code Style
This project uses Ultracite for linting and formatting:
pnpm check # Check for issues
pnpm fix # Auto-fix issues
See CLAUDE.md for full code style guidelines.