Skip to content

Commit 1651ef2

Browse files
committed
Merge branch 'main' into ring-individual-members
2 parents 04b6a9b + 0ee1a30 commit 1651ef2

File tree

396 files changed

+21603
-9602
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

396 files changed

+21603
-9602
lines changed

.github/actions/rn-bootstrap/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ runs:
99
- uses: actions/setup-node@v4
1010
if: ${{ env.INSTALL_NODE == 'true' }}
1111
with:
12-
node-version: 20.x
12+
node-version: 22.x
1313
cache: 'yarn'
1414

1515
- name: Install Yarn Dependencies

.github/workflows/deploy-react-sample-apps.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ jobs:
5151
- name: react-dogfood - https://getstream.io/video/demos
5252
project-id: prj_tTLn3XMVal4D1Nnel9nPJ0hoI9wA
5353
base-path: /video/demos
54+
- name: pronto-sales - https://hello.getstream.io
55+
project-id: prj_iviLZfey1DBTO2wKCiBCXzCOMpm0
56+
manual-only: true
5457

5558
env:
5659
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
@@ -88,7 +91,7 @@ jobs:
8891

8992
### Vercel deployment (Preview) ###
9093
- name: Vercel Pull/Build/Deploy (Preview)
91-
if: ${{ github.ref_name != 'main' }}
94+
if: ${{ github.ref_name != 'main' && matrix.application.manual-only != true }}
9295
env:
9396
NEXT_PUBLIC_BASE_PATH: ${{ matrix.application.base-path || '' }}
9497
run: >
@@ -98,7 +101,7 @@ jobs:
98101
99102
### Vercel deployment (Production) ###
100103
- name: Vercel Pull/Build/Deploy (Production)
101-
if: ${{ github.ref_name == 'main' }}
104+
if: ${{ github.ref_name == 'main' && (matrix.application.manual-only != true || github.event_name == 'workflow_dispatch') }}
102105
env:
103106
NEXT_PUBLIC_BASE_PATH: ${{ matrix.application.base-path || '' }}
104107
run: >

.github/workflows/egress-composite-e2e.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@ env:
1818
jobs:
1919
test:
2020
timeout-minutes: 20
21-
# Playwright doesn't work on 24.04.
22-
# We need to revisit this and switch to ubuntu-latest when it's supported.
23-
runs-on: ubuntu-22.04
21+
runs-on: ubuntu-latest
2422

2523
steps:
2624
- uses: actions/checkout@v4

.github/workflows/react-native-workflow.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ on:
3333
- 'packages/client/**'
3434
- 'packages/react-bindings/**'
3535
- 'packages/react-native-sdk/**'
36+
- 'packages/noise-cancellation-react-native/**'
3637
- 'packages/video-filters-react-native/**'
3738
- '!**.md'
3839
workflow_dispatch:
@@ -70,6 +71,9 @@ jobs:
7071
steps:
7172
- uses: actions/checkout@v4
7273

74+
- name: Select XCode version
75+
run: sudo xcode-select --switch /Applications/Xcode_26.0.1.app
76+
7377
- uses: ./.github/actions/rn-bootstrap
7478
timeout-minutes: 20
7579
env:
@@ -94,10 +98,13 @@ jobs:
9498
needs: build_ios
9599
timeout-minutes: 60
96100
if: ${{ github.ref == 'refs/heads/main' }}
97-
runs-on: macos-latest
101+
runs-on: macos-15
98102
steps:
99103
- uses: actions/checkout@v4
100104

105+
- name: Select XCode version
106+
run: sudo xcode-select --switch /Applications/Xcode_26.0.1.app
107+
101108
- uses: ./.github/actions/rn-bootstrap
102109
timeout-minutes: 15
103110

.husky/pre-commit

Lines changed: 0 additions & 4 deletions
This file was deleted.

.yarn/releases/yarn-4.10.3.cjs

Lines changed: 942 additions & 0 deletions
Large diffs are not rendered by default.

.yarn/releases/yarn-4.9.1.cjs

Lines changed: 0 additions & 948 deletions
This file was deleted.

.yarnrc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ initScope: stream-io
88

99
nodeLinker: node-modules
1010

11-
yarnPath: .yarn/releases/yarn-4.9.1.cjs
11+
yarnPath: .yarn/releases/yarn-4.10.3.cjs

AGENTS.md

Lines changed: 197 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,197 @@
1+
# Guidance for AI coding agents
2+
3+
File purpose: operational rules for automated or assisted code changes. Human-facing conceptual docs belong in `README.md` or the docs site.
4+
5+
## Repository purpose
6+
7+
Stream Video SDKs for:
8+
9+
- React
10+
- React Native
11+
- Plain JavaScript (core client)
12+
13+
Goals: API stability, backward compatibility, predictable releases, strong test coverage, accessibility, and performance discipline.
14+
15+
## Tech & toolchain
16+
17+
- Languages: TypeScript, React (web + native)
18+
- Runtime: Node (use `nvm use` with `.nvmrc`)
19+
- Package manager: Yarn (workspaces)
20+
- Testing: Vitest (unit/integration), Playwright (E2E)
21+
- Lint/Format: ESLint + Prettier
22+
- Build: Package-local build scripts (composed via root)
23+
- Release: Conventional Commits -> automated versioning/publishing
24+
- Platforms:
25+
- React: Web
26+
- React Native: iOS and Android
27+
28+
## Environment setup
29+
30+
1. `nvm use`
31+
2. `yarn install`
32+
3. (Optional) Verify: `node -v` matches `.nvmrc`
33+
4. Run initial full build: `yarn build:all`
34+
5. Run tests: `yarn test:ci:all`
35+
36+
## Project layout (high-level)
37+
38+
- `packages/`
39+
- `react-sdk/`
40+
- `react-native-sdk/`
41+
- `client/` (core, no UI)
42+
- `sample-apps/`
43+
- `react/`
44+
- `react-native/`
45+
- `client/`
46+
- Config roots: linting, tsconfig, playwright, babel
47+
- Do not edit generated output (`dist/`, build artifacts)
48+
49+
## Core commands (Runbook)
50+
51+
| Action | Command |
52+
| ----------------------------------- | ------------------------------------------ |
53+
| Install deps | `yarn install` |
54+
| Full build | `yarn build:all` |
55+
| Watch (if available) | `yarn dev` or `yarn start` (add if absent) |
56+
| Lint | `yarn lint:all` |
57+
| Fix lint (if separate) | `yarn lint:all --fix` |
58+
| Unit/Integration tests (CI profile) | `yarn test:ci:all` |
59+
| Local fast tests | `yarn test` |
60+
| E2E (Playwright) | `yarn test:e2e` |
61+
| Coverage | `yarn test:coverage` |
62+
| Clean | `yarn clean:all` |
63+
64+
## API design principles
65+
66+
- Semantic versioning
67+
- Use `@deprecated` JSDoc with replacement guidance
68+
- Provide migration docs for breaking changes
69+
- Avoid breaking changes; prefer additive evolution
70+
- Public surfaces: explicit TypeScript types/interfaces
71+
- Consistent naming: `camelCase` for functions/properties, `PascalCase` for components/types
72+
73+
### Deprecation lifecycle
74+
75+
1. Mark with `@deprecated` + rationale + alternative.
76+
2. Maintain for at least one minor release unless security-critical.
77+
3. Add to migration documentation.
78+
4. Remove only in next major.
79+
80+
## Performance guidelines
81+
82+
- Minimize re-renders (memoization, stable refs)
83+
- Use `React.memo` / `useCallback` / `useMemo` when profiling justifies
84+
- Clean up side effects (`AbortController` for network calls)
85+
- Monitor bundle size; justify increases > 2% per package
86+
- Prefer lazy loading for optional heavy modules
87+
- Avoid unnecessary large dependency additions
88+
89+
## Accessibility (a11y)
90+
91+
- All interactive elements keyboard accessible
92+
- Provide ARIA roles/labels where semantic tags insufficient
93+
- Maintain color contrast (WCAG AA)
94+
- Do not convey state by color alone
95+
- Announce dynamic content changes (ARIA live regions if needed)
96+
97+
## Error & logging policy
98+
99+
- Public API: throw descriptive errors or return typed error results (consistent with existing patterns)
100+
- No console noise in production builds
101+
- Internal debug logging gated behind env flag (if present)
102+
- Never leak credentials/user data in errors
103+
104+
## Concurrency & async
105+
106+
- Cancel stale async operations (media, network) when components unmount
107+
- Use `AbortController` for fetch-like APIs
108+
- Avoid race conditions: check instance IDs / timestamps before state updates
109+
110+
## Testing strategy
111+
112+
- Unit: pure functions, small components
113+
- Integration: component-tree interactions, state flows
114+
- React Native: target minimal smoke + platform logic (avoid flakiness)
115+
- E2E: critical user journeys (Playwright)
116+
- Mocks/fakes: prefer shared test helpers
117+
- Coverage target: maintain or improve existing percentage (fail PR if global coverage drops)
118+
- File naming: `*.test.ts` / `*.spec.ts(x)`
119+
- Add tests for: new public API, bug fixes (regression test), performance-sensitive utilities
120+
121+
## CI expectations
122+
123+
- Mandatory: build, lint, type check, unit/integration tests, (optionally) E2E smoke
124+
- Node versions: those listed in matrix (see workflow YAML)
125+
- Failing or flaky tests: fix or quarantine with justification PR comment (temporary)
126+
- Zero new warnings
127+
128+
## Release workflow (high-level)
129+
130+
1. Conventional Commit messages on PR merge
131+
2. Release automation aggregates commits
132+
3. Version bump + changelog + tag
133+
4. Publish to registry
134+
5. Deprecations noted in CHANGELOG
135+
6. Ensure docs updated prior to publishing breaking changes
136+
137+
## Dependency policy
138+
139+
- Avoid adding large deps without justification (size, maintenance)
140+
- Prefer existing utility packages
141+
- Run `yarn audit` (or equivalent) if adding security-impacting deps
142+
- Keep upgrades separate from feature changes when possible
143+
144+
## Samples & docs
145+
146+
- New public feature: update at least one sample app
147+
- Breaking changes: provide migration snippet
148+
- Keep code snippets compilable
149+
- Use placeholder keys (`YOUR_STREAM_KEY`)
150+
151+
## React Native specifics
152+
153+
- Clear Metro cache if module resolution issues: `yarn react-native start --reset-cache`
154+
- Test on iOS + Android for native module or platform-specific UI changes
155+
- Avoid unguarded web-only APIs in shared code
156+
157+
## Linting & formatting
158+
159+
- Run `yarn lint:all` before commit
160+
- Narrowly scope `eslint-disable` with inline comments and rationale
161+
- No broad rule disabling
162+
163+
## Commit / PR conventions
164+
165+
- Small, focused PRs
166+
- Include tests for changes
167+
- Screenshot or video for UI changes (before/after)
168+
- Label breaking changes clearly in description
169+
- Document public API changes
170+
171+
## Security
172+
173+
- No credentials or real user data
174+
- Use placeholders in examples
175+
- Scripts must error on missing critical env vars
176+
- Avoid introducing unmaintained dependencies
177+
178+
## Prohibited edits
179+
180+
- Do not edit build artifacts (`dist/`, generated types)
181+
- Do not bypass lint/type errors with force merges
182+
183+
## Quick agent checklist (per commit)
184+
185+
- Build succeeds
186+
- Lint clean
187+
- Type check clean
188+
- Tests (unit/integration) green
189+
- Coverage not reduced
190+
- Public API docs updated if changed
191+
- Samples updated if feature surfaced
192+
- No new warnings
193+
- No generated files modified
194+
195+
---
196+
197+
Refine this file iteratively for agent clarity; keep human-facing explanations in docs site / `README.md`.

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:20-alpine as packager
1+
FROM node:22-alpine AS packager
22
WORKDIR /e2e
33

44
COPY sample-apps/ sample-apps/
@@ -7,11 +7,11 @@ RUN find sample-apps \! -name "package.json" -mindepth 3 -maxdepth 3 -print | xa
77
COPY packages/ packages/
88
RUN find packages \! -name "package.json" -mindepth 2 -maxdepth 2 -print | xargs rm -rf
99

10-
FROM node:20-bullseye as runner
10+
FROM node:22-bullseye AS runner
1111
WORKDIR /e2e
1212

1313
COPY .yarn/ ./.yarn/
14-
COPY yarn.lock package.json .yarnrc.yml tsconfig.json ./
14+
COPY yarn.lock package.json .yarnrc.yml ./
1515
COPY --from=packager /e2e/packages ./packages
1616
COPY --from=packager /e2e/sample-apps ./sample-apps
1717

0 commit comments

Comments
 (0)