Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
288 changes: 288 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,288 @@
# Changesets Guide

We use [Changesets](https://github.com/changesets/changesets) for version management and changelog generation.

## Quick Start

When you make changes to published packages, create a changeset:

```bash
yarn changeset
```

This interactive command will:

1. Ask which packages changed
2. Ask what type of change (major/minor/patch)
3. Ask for a summary of changes

The changeset file will be committed with your PR.

## When to Create Changesets

**Always create a changeset when:**

- Changing any published package (`@stream-io/video-*` packages)
- Adding features, fixing bugs, or making breaking changes
- Updating dependencies that affect users

**Never create a changeset for:**

- Sample apps (they're not published to npm)
- Documentation-only changes
- Internal tooling changes

Comment on lines +21 to +34
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Clarify “changeset required” vs “No changesets found” being acceptable.

Right now the guide reads like “missing changeset” is always an error, but later implies the “No changesets found” situation may be expected. If CI enforces changesets only when published packages change, it’d help to state that explicitly in both places.

Also applies to: 248-261

🤖 Prompt for AI Agents
In @.changeset/README.md around lines 21 - 34, Clarify that a missing changeset
is only an error when published packages are changed by updating the "When to
Create Changesets" section and the related block that mentions "changeset
required" vs "No changesets found": explicitly state that CI should only require
a changeset when changes touch published packages (e.g., any @stream-io/video-*
packages), and that "No changesets found" is acceptable for doc-only, sample
app, or internal tooling changes; apply the same clarification to the duplicated
guidance around lines 248-261 so both places convey the conditional CI
enforcement.

## Version Bump Guidelines

Choose the appropriate version bump type:

### Major (Breaking Changes)

- API changes that require users to update their code
- Removing features or methods
- Changing function signatures
- Renaming public APIs

**Example:**

```typescript
// Before: call.join()
// After: call.connect() ← Breaking change!
```

### Minor (New Features)

- Adding new features
- Adding new methods or properties
- Backwards compatible enhancements

Comment on lines +53 to +58
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Fix the compound modifier: “backwards-compatible”.

“Backwards compatible enhancements” should be “backwards-compatible enhancements” to avoid ambiguity.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~57-~57: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...es - Adding new methods or properties - Backwards compatible enhancements Example: ```typescri...

(EN_COMPOUND_ADJECTIVE_INTERNAL)

🤖 Prompt for AI Agents
In @.changeset/README.md around lines 53 - 58, Update the compound modifier in
the "Minor (New Features)" bullet list by changing the phrase "Backwards
compatible enhancements" to "backwards-compatible enhancements" (preserve
capitalization of the list item as needed) so the entry reads with the
hyphenated compound modifier under the "Minor (New Features)" heading.

**Example:**

```typescript
// Adding a new method
call.setMaxVideoBitrate(1000); // ← New feature, backwards compatible
```

### Patch (Bug Fixes)

- Bug fixes
- Performance improvements
- No new features or breaking changes

**Example:**

```typescript
// Fixed: Connection timeout now properly handled
```

## Common Scenarios

### Single Package Change

If you only changed one package:

```bash
yarn changeset

? Which packages would you like to include?
❯ ◉ @stream-io/video-client
◯ @stream-io/video-react-sdk

? What kind of change is this for @stream-io/video-client?
◯ major (breaking)
◉ minor (feature)
◯ patch (bugfix)

? Please enter a summary:
Add setMaxVideoBitrate method for bandwidth control
```

### Multiple Package Changes

If your change affects multiple packages (e.g., adding a hook in react-bindings and using it in react-sdk):

```bash
yarn changeset

? Which packages would you like to include?
◉ @stream-io/video-react-bindings
◉ @stream-io/video-react-sdk

? What kind of change is this for @stream-io/video-react-bindings?
◉ minor (new hook)

? What kind of change is this for @stream-io/video-react-sdk?
◉ minor (new component)

? Please enter a summary:
Add useScreenShare hook and ScreenShareButton component

The new useScreenShare hook provides access to screen sharing state
and controls. The ScreenShareButton component uses this hook to
provide a pre-built screen sharing button.
```

### Dependency-Only Change

If you only updated dependencies (no code changes):

```bash
yarn changeset

? Which packages would you like to include?
◉ @stream-io/video-client

? What kind of change is this?
◉ patch

? Please enter a summary:
Update dependencies to latest versions
```

### Cross-Package Dependencies

If you change `client` or `react-bindings`, their dependent packages (`react-sdk`, `react-native-sdk`) will automatically get bumped by Changesets. You don't need to manually create changesets for them.

**Example:**

```bash
# You only need to create changeset for client
yarn changeset
# Select: @stream-io/video-client
# Type: minor

# When versioning happens:
# - client bumps to 1.40.0
# - react-sdk automatically bumps to 1.30.1 (patch) with dependency update
# - react-native-sdk automatically bumps to 1.26.6 (patch) with dependency update
```

## Changeset File Format

Changesets are markdown files in `.changeset/` directory:

**.changeset/cool-feature.md:**

```markdown
---
'@stream-io/video-client': minor
---

Add support for custom video layouts

This allows developers to create custom participant layouts
by providing a layout configuration object.
```

## Multiple Changesets Per PR

You can create multiple changesets in one PR if needed:

```bash
# First change
yarn changeset
# Summary: "Add feature X"

# Second unrelated change
yarn changeset
# Summary: "Fix bug Y"
```

Both changeset files will be included in the PR.

## Reviewing Changesets

When reviewing PRs:

1. **Check the changeset exists** - CI will fail if missing
2. **Verify version bump type** - Is major/minor/patch correct?
3. **Read the summary** - Will this make sense in the changelog?
4. **Check packages selected** - Are all affected packages included?

## Release Workflow

Releases are handled by a single GitHub Actions workflow (`.github/workflows/release.yml`) that supports both stable and pre-release versions.

### Publishing Stable Releases

**Workflow:** `.github/workflows/release.yml` (runs automatically on push to `main`)

The release workflow runs automatically on every push to `main`:

1. Automatically exits pre-release mode if currently in one
2. Creates or updates a "Version Packages" PR with all pending changesets
3. Review the PR to verify versions and changelogs
4. Merge the PR to publish to npm with `latest` tag and trigger sample app deployment

### Publishing Pre-releases (Beta/Alpha/RC)

**Workflow:** `.github/workflows/release.yml` (manual trigger)

**Important:** Pre-releases can only be published from non-main branches (feature or release branches).

To publish pre-releases:

1. Switch to a feature or release branch (not `main`)
2. Go to **Actions** → **Release**
3. Click **Run workflow**
4. Select the current branch
5. Select release type: `prerelease`
6. Select pre-release tag: `rc` (default), `beta`, or `alpha`
7. Click **Run workflow**

The workflow will:

- On first run: Automatically enter pre-release mode
- Version packages with pre-release tag (e.g., `1.40.0-beta.0`)
- Publish directly to npm with selected tag (not `latest`)
- For subsequent releases, just run the workflow again - it stays in pre-release mode

Users can install pre-releases with:

```bash
yarn add @stream-io/video-client@beta
```

**Note:** You don't need to do anything special when creating changesets. The same changesets work for both pre-releases and stable releases.

## Troubleshooting

### "No changesets found" warning

If CI fails with "No changesets found", you need to create one:

```bash
yarn changeset
```

Then commit the generated `.changeset/*.md` file.

Keep in mind that not every PR needs a changeset, so this warning might be expected.

### Forgot to create changeset before pushing

No problem! Create the changeset and push another commit:

```bash
yarn changeset
git add .changeset/*.md
git commit -m "Add missing changeset for PR #XYZ"
git push
```

### Created changeset with wrong version type

Modify the content of the existing changeset file directly.

### Need to change changeset summary

Edit the `.changeset/*.md` file directly and commit the change.

Comment thread
oliverlaz marked this conversation as resolved.
### Tips

- If you're not sure what packages your changeset/s might affect, run `yarn changeset version` in the root of the monorepo and check all the affected packages. If you're satisfied, revert the changes (_DO NOT PUSH THESE_, the changeset bot will take care of them). Adjust changesets accordingly if not satisfied.

## Learn More

- [Changesets Documentation](https://github.com/changesets/changesets)
- [Semantic Versioning](https://semver.org/)
16 changes: 16 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"$schema": "https://unpkg.com/@changesets/config@3/schema.json",
"changelog": [
"@changesets/changelog-github",
{ "repo": "GetStream/stream-video-js" }
],
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "main",
"prettier": true,
"bumpVersionsWithWorkspaceProtocolOnly": false,
"updateInternalDependencies": "patch",
"ignore": []
}
10 changes: 5 additions & 5 deletions .github/actions/rn-bootstrap/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ runs:
- run: echo "IMAGE=${ImageOS}-${ImageVersion}" >> $GITHUB_ENV
shell: bash

- uses: actions/setup-node@v4
- uses: actions/setup-node@v6
if: ${{ env.INSTALL_NODE == 'true' }}
with:
node-version: 24.x
Expand All @@ -23,7 +23,7 @@ runs:
shell: bash

- name: Cache pods
uses: actions/cache@v4
uses: actions/cache@v5
if: ${{ env.INSTALL_PODS == 'true' }}
with:
path: sample-apps/react-native/dogfood/ios/Pods
Expand All @@ -39,7 +39,7 @@ runs:

- name: Cache Gradle
if: ${{ env.INSTALL_JAVA == 'true' }}
uses: actions/cache@v3
uses: actions/cache@v5
with:
path: |
~/.gradle/caches
Expand All @@ -48,7 +48,7 @@ runs:
restore-keys: |
${{ runner.os }}-gradle-

- uses: actions/setup-java@v4
- uses: actions/setup-java@v5
if: ${{ env.INSTALL_JAVA == 'true' }}
with:
distribution: 'zulu'
Expand All @@ -62,7 +62,7 @@ runs:
shell: bash

# Retrieve the cached emulator snapshot
- uses: actions/cache@v4
- uses: actions/cache@v5
if: ${{ env.INSTALL_ANDROID_EMULATOR == 'true' }}
id: avd-cache
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy-react-sample-apps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@ jobs:
MODE: ${{ github.ref_name == 'main' && 'production' || 'preview' }}

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Setup Node
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version: 24.x
cache: 'yarn'
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/egress-composite-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
fetch-depth: 1

- name: Setup Node
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version: 24.x
cache: 'yarn'
Expand All @@ -41,7 +41,7 @@ jobs:
run: yarn build:react:deps

- name: Cache Playwright browsers
uses: actions/cache@v4
uses: actions/cache@v5
id: playwright-cache
with:
path: ~/.cache/ms-playwright
Expand All @@ -58,7 +58,7 @@ jobs:
run: yarn workspace @stream-io/egress-composite test:e2e

- name: Upload test results
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
if: always()
with:
name: test-results
Expand Down
Loading
Loading