| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
ci: grant write permissions for changelog preview workflow semantic-release dry-run verifies git push to develop; sticky PR comments need pull-requests write. Job-level scopes avoid widening other workflows. Co-authored-by: Cursor <cursoragent@cursor.com> | 2 个月前 | |
chore: upgrade to TypeScript 6.0.3, ES2022 target, and shared ts-config presets (#3663) ## What & why Upgrades every workspace to **TypeScript 6.0.3** with **`target: ES2022`**, and removes tsconfig duplication via a new shared preset package. Enabling type-checking across the previously-unchecked packages also surfaced (and this PR fixes) a pre-existing bug in the core package's published type resolution plus a batch of latent type errors. ## Changes ### Shared config - New **private** `@stream-io/typescript-config` workspace (`configs/typescript-config/`): - `base.json` — cross-cutting policy (ES2022 target, strict, interop, …) - `library.json` — full React Native library config (extends `base`) - Core, the native/expo wrappers, and all 3 example apps extend these instead of duplicating compiler options. Example apps array-extend `["<framework base>", "@stream-io/typescript-config/base.json"]`. ### TypeScript 6.0.3 / ES2022 - TS `6.0.3` in all 7 manifests; `target: ES2022` everywhere. - `lib` kept at `ESNext` — the SDK uses the ES2023 `Array.prototype.toReversed()`. - TS 6.0 no longer auto-includes `@types/jest`, so it's referenced explicitly from a test-only `package/src/__tests__/jest-globals.d.ts` (excluded from the published build). ### Core publishing fix (consumer-facing) - `react-native-builder-bob` emitted declarations under `lib/typescript/src/` while `package.json#types` pointed at `lib/typescript/index.d.ts` — so TS consumers couldn't resolve the SDK's types via `types`. Added `rootDir: "./src"` so declarations emit flat to match `types`. This was also the root cause that blocked the wrappers/examples from resolving core's types. - Exported `PickImageOptions` from the core entrypoint (defined+exported in `native.ts` but never surfaced from `index`). ### Wrappers (`stream-chat-react-native`, `stream-chat-expo`) - Added a `typecheck` script + tsconfig (they had neither). The dynamic optional-`require` shims relax `noImplicitAny`/`strictNullChecks`/unused checks (kept `noImplicitReturns`). - Fixed real bugs: missing `return`s in `shareImage`, missing `resizeMode`/`rate` on the video shim, an inconsistent `startRecording` return shape. ### Example apps - Fixed ~60 pre-existing latent type errors unmasked by enabling typecheck: theme palette typing (the legacy flat `colors` palette, read via a local `AppTheme` cast — behavior-preserving), null-safety guards, and several SDK-API-drift fixes. ### CI - `check-pr.yml` now runs `yarn typecheck` across the whole workspace (core + 2 wrappers + 3 examples) instead of only the core package; the root `typecheck` aggregate includes the wrappers. ## Verification - `yarn build` ✅ - `yarn typecheck` (core + 2 wrappers + 3 examples) ✅ **0 errors** - `yarn lint` ✅ ## Notes for reviewers - **Commit type**: filed as `chore:` (release-neutral). The core changes (flat `types` path + `PickImageOptions` export) are genuinely consumer-facing — if you want them shipped, retype as `fix:` to cut a patch. - **Wrapper strictness**: `strictNullChecks`/`noImplicitAny` are relaxed **only** for the two wrapper packages (dynamic optional-dep shims), not for core. - **Example theming**: the apps' custom `colors` palette was already inert for SDK theming (the SDK reads semantics/primitives, not `theme.colors`); this PR preserves that behavior. Migrating the palette to the token model to restore custom branding would be a separate enhancement. - Did not run the full unit suite locally (the only core source change is the additive `PickImageOptions` export); CI runs `test:coverage`. --------- Co-authored-by: Ivan Sekovanikj <ivan.sekovanikj@getstream.io> | 1 个月前 | |
chore: update github actions to latest versions (#3579) ## Summary - Bumps all GitHub Actions to their latest major versions across every workflow. - Standardizes Node 24 setup across CI (already in place; confirmed and consistent now). - Replaces the abandoned `deepakputhraya/action-pr-title` (no release since Mar 2021) with the actively maintained `amannn/action-semantic-pull-request@v6` for PR-title linting. ## Action version changes | Action | Before | After | |---|---|---| | `actions/checkout` | `v2`, `v3`, `v3.1.0` (mixed) | `v6` | | `actions/setup-node` | `v4` | `v6` | | `actions/cache` | `v4` | `v5` | | `actions/setup-java` | `v3` | `v5` | | `webfactory/ssh-agent` | `v0.7.0` | `v0.10.0` | | `marocchino/sticky-pull-request-comment` | `v2` | `v3` | | `deepakputhraya/action-pr-title@v1.0.2` | abandoned | `amannn/action-semantic-pull-request@v6` | ## Behavior change worth noting The new PR-title linter enforces a strict allowlist of conventional-commit types (`feat`, `fix`, `docs`, `refactor`, `chore`, `test`, `perf`, `ci`, `build`, `style`, `revert`). The old regex (`^(\w*)(?:\((.*)\))?: (.*)$`) accepted *any* word as a type, so PRs that previously slipped through with non-standard types (e.g. `wip:`) will now fail the title check. This aligns with what `commitlint` enforces on commits anyway. ## Test plan - [ ] CI runs green on this PR (exercises `check-pr.yml`, `changelog-preview.yml`, `lint-pr-title.yml`, `sdk-size-metrics.yml`). - [ ] Verify the new PR title check triggers and accepts the `chore:` prefix on this PR. - [ ] Sanity check the changelog preview comment appears on a PR targeting `main`. - [ ] On merge to `develop`, verify `release.yml` and `sample-distribution.yml` still run successfully end-to-end. | 4 个月前 | |
fix: restore release automation token and backfill missing changelog (#3717) ## 🎯 Goal `package/CHANGELOG.md` and the SDK's `package.json` version stopped updating after v8.1.0 (2025-07-09), even though npm has been receiving real releases all the way up to v9.6.0. The releases were publishing successfully but never getting committed back to the repo. ## 🛠 Implementation details Root cause: https://github.com/GetStream/stream-chat-react-native/pull/3163 ("fix: remove docusaurus folder") removed the `DOCUSAURUS_GH_TOKEN` secret reference from `.github/workflows/release.yml`, thinking it was docusaurus-only. In reality `release/prod.js` gates its git-commit-back logic (`@semantic-release/git`, the changelog/package.json commit+push, and `@semantic-release/github`) behind `process.env.GH_TOKEN || process.env.GITHUB_TOKEN` — once that env var disappeared, semantic-release kept tagging and publishing to npm (tags aren't covered by `main`'s branch protection), but silently stopped committing the version bump back to `main`. Fixes: - Restore a token in `release.yml`: `STREAM_CI_GITHUB_BOT_TOKEN`, which has been sitting unused since it was renamed to `DOCUSAURUS_GH_TOKEN` back in 2023 and that secret was later deleted. Set on both: - the `actions/checkout` `token:` input — needed because the custom `@semantic-release/exec` prepare step runs a raw `git push origin main`, which authenticates via whatever checkout persisted, not via `GH_TOKEN`. - the `Publish Release (main)` step's `GH_TOKEN` env var — needed for semantic-release's own token-gated logic (the plugin config in `release/prod.js`). - Backfill `package/CHANGELOG.md` with the 39 releases (v8.1.1 → v9.6.0) that were missing entries, reconstructed from each GitHub Release's notes (v8.13.x tags on the separate `V8-release` branch were excluded, matching prior changelog scope). - Bump `package/package.json`, `package/native-package/package.json`, and `package/expo-package/package.json` versions to `9.6.0` to match what's actually published on npm. ## 🎨 UI Changes N/A — CI/release tooling and changelog only. ## ☑️ Checklist - [x] I have signed the [Stream CLA](https://docs.google.com/forms/d/e/1FAIpQLScFKsKkAJI7mhCr7K9rEIOpqIDThrWxuvxnwUq2XkHyG154vQ/viewform) (required) - [x] PR targets the `develop` branch - [ ] Documentation is updated - [ ] New code is tested in main example apps, including all possible scenarios - [ ] SampleApp iOS and Android - [ ] Expo iOS and Android | 2 个月前 | |
ci: install AWS CLI on self-hosted runner for S3 upload (#3726) ## 🎯 Goal Follow-up to #3725 (merged), which restored the SampleApp Android APK upload to S3 that powers `https://getstream.io/downloads/rn-sample-app.apk`. That upload fails on the self-hosted `public` runner because the AWS CLI is not installed there (the original S3 job ran on GitHub-hosted `ubuntu-latest`, where `aws` is preinstalled). This PR makes the job install the AWS CLI when it is missing so the upload can succeed. ## 🛠 Implementation details Adds an `Ensure AWS CLI is available` step to the `build_and_deploy_android_firebase` job in [`sample-distribution.yml`](.github/workflows/sample-distribution.yml), before the AWS credentials/upload steps: - No-op when `aws` is already on `PATH` (so it costs nothing if the runner image gains the CLI later). - Otherwise installs AWS CLI v2 from the official bundle, architecture-aware (`x86_64` / `aarch64`). - Installs to a user-writable location (`$HOME/.local/...`) with no `sudo`, then appends the bin dir to `$GITHUB_PATH` so the subsequent `Upload APK to S3` step picks it up. - Runs on `develop` only, matching the rest of the S3 flow. ## 🎨 UI Changes N/A — CI/workflow-only change, no UI impact. ## 🧪 Testing CI-only change; verified by the `develop` pipeline rather than the example apps: 1. On merge to `develop`, the `build_and_deploy_android_firebase` job runs the new install step and logs the resolved `aws --version`. 2. Confirm the `Upload APK to S3` step now succeeds in the Actions logs. 3. Confirm `https://getstream.io/downloads/rn-sample-app.apk` serves the latest build. ## ☑️ Checklist - [ ] I have signed the [Stream CLA](https://docs.google.com/forms/d/e/1FAIpQLScFKsKkAJI7mhCr7K9rEIOpqIDThrWxuvxnwUq2XkHyG154vQ/viewform) (required) - [x] PR targets the `develop` branch - [ ] Documentation is updated - [ ] New code is tested in main example apps, including all possible scenarios - [ ] SampleApp iOS and Android - [ ] Expo iOS and Android | 2 个月前 | |
CI: add least-privilege permissions to GitHub Actions workflows Add explicit workflow-level permissions blocks to resolve CodeQL actions/missing-workflow-permissions alerts. Scopes are derived from workflow operations (git push, artifact upload, Danger, release lanes). Refs: APPSEC-164 | 2 个月前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 2 个月前 | ||
| 1 个月前 | ||
| 4 个月前 | ||
| 2 个月前 | ||
| 2 个月前 | ||
| 2 个月前 |