| ๆไปถ | ๆๅๆไบค่ฎฐๅฝ | ๆๅๆดๆฐๆถ้ด |
|---|---|---|
chore(yarn): migrate to Yarn 4 + native workspaces (#3594) ## ๐ฏ Goal Move us onto Yarn 4 with native workspaces and drop Lerna. The `.yarnrc.yml` was already half-migrated, but `yarnPath` still pointed at the v1 binary โ this finishes that off. ## ๐ Implementation details Tooling only; nothing in `package/src` changes. Roughly: - `.yarn/releases/` swapped to 4.14.1, and all seven `yarn.lock` files migrated v1 โ v8 in place โ resolutions preserved, no drift. - Single root `workspaces` array now covers `package/`, both native wrapper packages, and all three example apps. `link:../../package/*` becomes `workspace:^`, nested lockfiles are gone, and the install-and-build-sdk composite action collapses to one `yarn install --immutable`. - Shared-native sync + husky setup run from the core SDK workspace's `postinstall` (Yarn 4 doesn't run root-workspace lifecycle scripts on install). - Lerna removed: `release/release.config.js` no longer reads `lerna.json`, and `release` / `release-next` / `extract-changelog` use `yarn workspaces foreach`. - Husky 6 โ 9 (the v6 hook boilerplate is on the deprecation path). - `.yarnrc.yml` picks up the conservative hardening tier: `enableHardenedMode`, `npmMinimalAgeGate: 3d`, `enableScripts: false` with a small `dependenciesMeta` allowlist for the packages that genuinely need to build (`@swc/core`, `better-sqlite3`, `react-native-nitro-modules`, `unrs-resolver`). - CI workflows cache `.yarn/` via setup-node; drive-by fix for the deprecated `::set-output` calls in `changelog-preview.yml`. ## ๐จ UI Changes N/A. ## ๐งช Testing Locally: `yarn install --immutable` is clean, `yarn lint` + `yarn build` pass, husky hooks fired on every commit in this PR. Can't verify locally: example apps on real devices, and the release flow itself. The Lerna โ `yarn workspaces foreach` rewrite is the riskiest single change โ worth a dry-run on a throwaway branch before merging. ## โ๏ธ Checklist - [x] I have signed the [Stream CLA](https://docs.google.com/forms/d/e/1FAIpQLScFKsKkAJI7mhCr7K9rEIOpqIDThrWxuvxnwUq2XkHyG154vQ/viewform) (required) - [x] PR targets the `develop` branch - [x] Documentation is updated - [ ] New code is tested in main example apps, including all possible scenarios - [ ] SampleApp iOS and Android - [ ] Expo iOS and Android --------- Co-authored-by: Ivan Sekovanikj <ivan.sekovanikj@getstream.io> | 3 ไธชๆๅ | |
refactor: channel details cleanup (#3669) ## ๐ฏ Goal A cleanup for channel details, the main focus is to make it easier for integrators to reuse the specific building blocks, the implementation details describes all changes in detail. This PR also implements the new role label UI from Figma. Docs: https://github.com/GetStream/docs-content/pull/1389 ## ๐ Implementation details UI changes - New member-role UI (feat: implement new member role UI) โ Replaced the old single text role label on member items with a dedicated, reusable RoleList / RoleItem component pair (components/roles/). Roles now render as styled chips/badges with distinct owner vs. regular-role colors. - New theme tokens added under messageMenu: roleList.container and roleItem (container, text, ownerBackgroundColor, ownerColor, roleBackgroundColor, roleColor). The old memberItem.role token was removed. - Logic moved from useMemberRoleLabel (single label string) โ useMemberRoles (returns a list of roles). - Padding / spacing fixes โ Several visual fixes: missing modal padding on Android in edge-to-edge mode, general padding fixes, and edit-button sizing in the Expo sample app. Component / architecture restructures - Add-members flow split into composable parts โ ChannelAddMembersModal (deleted) โ ChannelAddMembersButton, ChannelAddMembersForm, ChannelAddMembersFormContent, ChannelAddMembersFormHeader. The add-members button is now its own component, and a proper HOC was created for it. - Edit-details flow split the same way โ ChannelEditDetailsModal (deleted) โ ChannelEditDetailsForm, ChannelEditDetailsFormContent, ChannelEditDetailsFormHeader. Form submission was simplified. - ChannelDetails context split up โ The monolithic ChannelDetails context was broken into focused contexts: channelDetailsContext, ChannelAddMembersContext, ChannelEditDetailsContext, plus per-list contexts (ChannelMemberListContext, ChannelMediaListContext, ChannelFileAttachmentListContext, ChannelPinnedMessageListContext). channel was moved into the context, the value wrapper was removed, and channel was dropped from contexts used under channel details. ChannelDetails.tsx itself shrank from ~171 lines of orchestration to a thin shell. - Hooks promoted to the SDK's shared src/hooks/ โ useCanEdit/useCanAddMembers were moved, renamed, and split into useCanEditChannel and useCanAddMembersToChannel (with tests); useIsDirectChat updated. - New signal store (state-store/signal-store.ts) โ A small signal store to imperatively close any open channel-details modal; related store hooks exported. The edit-channel-details-store was also reworked. - Public API changes โ useSelectedChannelState is now exported from the SDK; ChannelAllMembersModal is no longer exposed (component deleted); custom searchSource can be passed to channel-details components. - Sample apps updated โ Both SampleApp and ExpoMessaging (details/index.tsx, screens) were migrated to the new component/context structure; Expo sample app fixes. - Removed the experimental warnings ## ๐จ UI Changes No UI changes ## ๐งช Testing <!-- Explain how this change can be tested (or why it can't be tested) --> ## โ๏ธ Checklist - [ ] I have signed the [Stream CLA](https://docs.google.com/forms/d/e/1FAIpQLScFKsKkAJI7mhCr7K9rEIOpqIDThrWxuvxnwUq2XkHyG154vQ/viewform) (required) - [ ] 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 ไธชๆๅ | |
refactor: channel details cleanup (#3669) ## ๐ฏ Goal A cleanup for channel details, the main focus is to make it easier for integrators to reuse the specific building blocks, the implementation details describes all changes in detail. This PR also implements the new role label UI from Figma. Docs: https://github.com/GetStream/docs-content/pull/1389 ## ๐ Implementation details UI changes - New member-role UI (feat: implement new member role UI) โ Replaced the old single text role label on member items with a dedicated, reusable RoleList / RoleItem component pair (components/roles/). Roles now render as styled chips/badges with distinct owner vs. regular-role colors. - New theme tokens added under messageMenu: roleList.container and roleItem (container, text, ownerBackgroundColor, ownerColor, roleBackgroundColor, roleColor). The old memberItem.role token was removed. - Logic moved from useMemberRoleLabel (single label string) โ useMemberRoles (returns a list of roles). - Padding / spacing fixes โ Several visual fixes: missing modal padding on Android in edge-to-edge mode, general padding fixes, and edit-button sizing in the Expo sample app. Component / architecture restructures - Add-members flow split into composable parts โ ChannelAddMembersModal (deleted) โ ChannelAddMembersButton, ChannelAddMembersForm, ChannelAddMembersFormContent, ChannelAddMembersFormHeader. The add-members button is now its own component, and a proper HOC was created for it. - Edit-details flow split the same way โ ChannelEditDetailsModal (deleted) โ ChannelEditDetailsForm, ChannelEditDetailsFormContent, ChannelEditDetailsFormHeader. Form submission was simplified. - ChannelDetails context split up โ The monolithic ChannelDetails context was broken into focused contexts: channelDetailsContext, ChannelAddMembersContext, ChannelEditDetailsContext, plus per-list contexts (ChannelMemberListContext, ChannelMediaListContext, ChannelFileAttachmentListContext, ChannelPinnedMessageListContext). channel was moved into the context, the value wrapper was removed, and channel was dropped from contexts used under channel details. ChannelDetails.tsx itself shrank from ~171 lines of orchestration to a thin shell. - Hooks promoted to the SDK's shared src/hooks/ โ useCanEdit/useCanAddMembers were moved, renamed, and split into useCanEditChannel and useCanAddMembersToChannel (with tests); useIsDirectChat updated. - New signal store (state-store/signal-store.ts) โ A small signal store to imperatively close any open channel-details modal; related store hooks exported. The edit-channel-details-store was also reworked. - Public API changes โ useSelectedChannelState is now exported from the SDK; ChannelAllMembersModal is no longer exposed (component deleted); custom searchSource can be passed to channel-details components. - Sample apps updated โ Both SampleApp and ExpoMessaging (details/index.tsx, screens) were migrated to the new component/context structure; Expo sample app fixes. - Removed the experimental warnings ## ๐จ UI Changes No UI changes ## ๐งช Testing <!-- Explain how this change can be tested (or why it can't be tested) --> ## โ๏ธ Checklist - [ ] I have signed the [Stream CLA](https://docs.google.com/forms/d/e/1FAIpQLScFKsKkAJI7mhCr7K9rEIOpqIDThrWxuvxnwUq2XkHyG154vQ/viewform) (required) - [ ] 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 ไธชๆๅ | |
refactor: channel details cleanup (#3669) ## ๐ฏ Goal A cleanup for channel details, the main focus is to make it easier for integrators to reuse the specific building blocks, the implementation details describes all changes in detail. This PR also implements the new role label UI from Figma. Docs: https://github.com/GetStream/docs-content/pull/1389 ## ๐ Implementation details UI changes - New member-role UI (feat: implement new member role UI) โ Replaced the old single text role label on member items with a dedicated, reusable RoleList / RoleItem component pair (components/roles/). Roles now render as styled chips/badges with distinct owner vs. regular-role colors. - New theme tokens added under messageMenu: roleList.container and roleItem (container, text, ownerBackgroundColor, ownerColor, roleBackgroundColor, roleColor). The old memberItem.role token was removed. - Logic moved from useMemberRoleLabel (single label string) โ useMemberRoles (returns a list of roles). - Padding / spacing fixes โ Several visual fixes: missing modal padding on Android in edge-to-edge mode, general padding fixes, and edit-button sizing in the Expo sample app. Component / architecture restructures - Add-members flow split into composable parts โ ChannelAddMembersModal (deleted) โ ChannelAddMembersButton, ChannelAddMembersForm, ChannelAddMembersFormContent, ChannelAddMembersFormHeader. The add-members button is now its own component, and a proper HOC was created for it. - Edit-details flow split the same way โ ChannelEditDetailsModal (deleted) โ ChannelEditDetailsForm, ChannelEditDetailsFormContent, ChannelEditDetailsFormHeader. Form submission was simplified. - ChannelDetails context split up โ The monolithic ChannelDetails context was broken into focused contexts: channelDetailsContext, ChannelAddMembersContext, ChannelEditDetailsContext, plus per-list contexts (ChannelMemberListContext, ChannelMediaListContext, ChannelFileAttachmentListContext, ChannelPinnedMessageListContext). channel was moved into the context, the value wrapper was removed, and channel was dropped from contexts used under channel details. ChannelDetails.tsx itself shrank from ~171 lines of orchestration to a thin shell. - Hooks promoted to the SDK's shared src/hooks/ โ useCanEdit/useCanAddMembers were moved, renamed, and split into useCanEditChannel and useCanAddMembersToChannel (with tests); useIsDirectChat updated. - New signal store (state-store/signal-store.ts) โ A small signal store to imperatively close any open channel-details modal; related store hooks exported. The edit-channel-details-store was also reworked. - Public API changes โ useSelectedChannelState is now exported from the SDK; ChannelAllMembersModal is no longer exposed (component deleted); custom searchSource can be passed to channel-details components. - Sample apps updated โ Both SampleApp and ExpoMessaging (details/index.tsx, screens) were migrated to the new component/context structure; Expo sample app fixes. - Removed the experimental warnings ## ๐จ UI Changes No UI changes ## ๐งช Testing <!-- Explain how this change can be tested (or why it can't be tested) --> ## โ๏ธ Checklist - [ ] I have signed the [Stream CLA](https://docs.google.com/forms/d/e/1FAIpQLScFKsKkAJI7mhCr7K9rEIOpqIDThrWxuvxnwUq2XkHyG154vQ/viewform) (required) - [ ] 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 ไธชๆๅ | |
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 ไธชๆๅ | |
refactor: channel details cleanup (#3669) ## ๐ฏ Goal A cleanup for channel details, the main focus is to make it easier for integrators to reuse the specific building blocks, the implementation details describes all changes in detail. This PR also implements the new role label UI from Figma. Docs: https://github.com/GetStream/docs-content/pull/1389 ## ๐ Implementation details UI changes - New member-role UI (feat: implement new member role UI) โ Replaced the old single text role label on member items with a dedicated, reusable RoleList / RoleItem component pair (components/roles/). Roles now render as styled chips/badges with distinct owner vs. regular-role colors. - New theme tokens added under messageMenu: roleList.container and roleItem (container, text, ownerBackgroundColor, ownerColor, roleBackgroundColor, roleColor). The old memberItem.role token was removed. - Logic moved from useMemberRoleLabel (single label string) โ useMemberRoles (returns a list of roles). - Padding / spacing fixes โ Several visual fixes: missing modal padding on Android in edge-to-edge mode, general padding fixes, and edit-button sizing in the Expo sample app. Component / architecture restructures - Add-members flow split into composable parts โ ChannelAddMembersModal (deleted) โ ChannelAddMembersButton, ChannelAddMembersForm, ChannelAddMembersFormContent, ChannelAddMembersFormHeader. The add-members button is now its own component, and a proper HOC was created for it. - Edit-details flow split the same way โ ChannelEditDetailsModal (deleted) โ ChannelEditDetailsForm, ChannelEditDetailsFormContent, ChannelEditDetailsFormHeader. Form submission was simplified. - ChannelDetails context split up โ The monolithic ChannelDetails context was broken into focused contexts: channelDetailsContext, ChannelAddMembersContext, ChannelEditDetailsContext, plus per-list contexts (ChannelMemberListContext, ChannelMediaListContext, ChannelFileAttachmentListContext, ChannelPinnedMessageListContext). channel was moved into the context, the value wrapper was removed, and channel was dropped from contexts used under channel details. ChannelDetails.tsx itself shrank from ~171 lines of orchestration to a thin shell. - Hooks promoted to the SDK's shared src/hooks/ โ useCanEdit/useCanAddMembers were moved, renamed, and split into useCanEditChannel and useCanAddMembersToChannel (with tests); useIsDirectChat updated. - New signal store (state-store/signal-store.ts) โ A small signal store to imperatively close any open channel-details modal; related store hooks exported. The edit-channel-details-store was also reworked. - Public API changes โ useSelectedChannelState is now exported from the SDK; ChannelAllMembersModal is no longer exposed (component deleted); custom searchSource can be passed to channel-details components. - Sample apps updated โ Both SampleApp and ExpoMessaging (details/index.tsx, screens) were migrated to the new component/context structure; Expo sample app fixes. - Removed the experimental warnings ## ๐จ UI Changes No UI changes ## ๐งช Testing <!-- Explain how this change can be tested (or why it can't be tested) --> ## โ๏ธ Checklist - [ ] I have signed the [Stream CLA](https://docs.google.com/forms/d/e/1FAIpQLScFKsKkAJI7mhCr7K9rEIOpqIDThrWxuvxnwUq2XkHyG154vQ/viewform) (required) - [ ] 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 ไธชๆๅ | |
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(yarn): migrate to Yarn 4 + native workspaces (#3594) ## ๐ฏ Goal Move us onto Yarn 4 with native workspaces and drop Lerna. The `.yarnrc.yml` was already half-migrated, but `yarnPath` still pointed at the v1 binary โ this finishes that off. ## ๐ Implementation details Tooling only; nothing in `package/src` changes. Roughly: - `.yarn/releases/` swapped to 4.14.1, and all seven `yarn.lock` files migrated v1 โ v8 in place โ resolutions preserved, no drift. - Single root `workspaces` array now covers `package/`, both native wrapper packages, and all three example apps. `link:../../package/*` becomes `workspace:^`, nested lockfiles are gone, and the install-and-build-sdk composite action collapses to one `yarn install --immutable`. - Shared-native sync + husky setup run from the core SDK workspace's `postinstall` (Yarn 4 doesn't run root-workspace lifecycle scripts on install). - Lerna removed: `release/release.config.js` no longer reads `lerna.json`, and `release` / `release-next` / `extract-changelog` use `yarn workspaces foreach`. - Husky 6 โ 9 (the v6 hook boilerplate is on the deprecation path). - `.yarnrc.yml` picks up the conservative hardening tier: `enableHardenedMode`, `npmMinimalAgeGate: 3d`, `enableScripts: false` with a small `dependenciesMeta` allowlist for the packages that genuinely need to build (`@swc/core`, `better-sqlite3`, `react-native-nitro-modules`, `unrs-resolver`). - CI workflows cache `.yarn/` via setup-node; drive-by fix for the deprecated `::set-output` calls in `changelog-preview.yml`. ## ๐จ UI Changes N/A. ## ๐งช Testing Locally: `yarn install --immutable` is clean, `yarn lint` + `yarn build` pass, husky hooks fired on every commit in this PR. Can't verify locally: example apps on real devices, and the release flow itself. The Lerna โ `yarn workspaces foreach` rewrite is the riskiest single change โ worth a dry-run on a throwaway branch before merging. ## โ๏ธ Checklist - [x] I have signed the [Stream CLA](https://docs.google.com/forms/d/e/1FAIpQLScFKsKkAJI7mhCr7K9rEIOpqIDThrWxuvxnwUq2XkHyG154vQ/viewform) (required) - [x] PR targets the `develop` branch - [x] Documentation is updated - [ ] New code is tested in main example apps, including all possible scenarios - [ ] SampleApp iOS and Android - [ ] Expo iOS and Android --------- Co-authored-by: Ivan Sekovanikj <ivan.sekovanikj@getstream.io> | 3 ไธชๆๅ | |
chore(yarn): migrate to Yarn 4 + native workspaces (#3594) ## ๐ฏ Goal Move us onto Yarn 4 with native workspaces and drop Lerna. The `.yarnrc.yml` was already half-migrated, but `yarnPath` still pointed at the v1 binary โ this finishes that off. ## ๐ Implementation details Tooling only; nothing in `package/src` changes. Roughly: - `.yarn/releases/` swapped to 4.14.1, and all seven `yarn.lock` files migrated v1 โ v8 in place โ resolutions preserved, no drift. - Single root `workspaces` array now covers `package/`, both native wrapper packages, and all three example apps. `link:../../package/*` becomes `workspace:^`, nested lockfiles are gone, and the install-and-build-sdk composite action collapses to one `yarn install --immutable`. - Shared-native sync + husky setup run from the core SDK workspace's `postinstall` (Yarn 4 doesn't run root-workspace lifecycle scripts on install). - Lerna removed: `release/release.config.js` no longer reads `lerna.json`, and `release` / `release-next` / `extract-changelog` use `yarn workspaces foreach`. - Husky 6 โ 9 (the v6 hook boilerplate is on the deprecation path). - `.yarnrc.yml` picks up the conservative hardening tier: `enableHardenedMode`, `npmMinimalAgeGate: 3d`, `enableScripts: false` with a small `dependenciesMeta` allowlist for the packages that genuinely need to build (`@swc/core`, `better-sqlite3`, `react-native-nitro-modules`, `unrs-resolver`). - CI workflows cache `.yarn/` via setup-node; drive-by fix for the deprecated `::set-output` calls in `changelog-preview.yml`. ## ๐จ UI Changes N/A. ## ๐งช Testing Locally: `yarn install --immutable` is clean, `yarn lint` + `yarn build` pass, husky hooks fired on every commit in this PR. Can't verify locally: example apps on real devices, and the release flow itself. The Lerna โ `yarn workspaces foreach` rewrite is the riskiest single change โ worth a dry-run on a throwaway branch before merging. ## โ๏ธ Checklist - [x] I have signed the [Stream CLA](https://docs.google.com/forms/d/e/1FAIpQLScFKsKkAJI7mhCr7K9rEIOpqIDThrWxuvxnwUq2XkHyG154vQ/viewform) (required) - [x] PR targets the `develop` branch - [x] Documentation is updated - [ ] New code is tested in main example apps, including all possible scenarios - [ ] SampleApp iOS and Android - [ ] Expo iOS and Android --------- Co-authored-by: Ivan Sekovanikj <ivan.sekovanikj@getstream.io> | 3 ไธชๆๅ | |
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: 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(yarn): migrate to Yarn 4 + native workspaces (#3594) ## ๐ฏ Goal Move us onto Yarn 4 with native workspaces and drop Lerna. The `.yarnrc.yml` was already half-migrated, but `yarnPath` still pointed at the v1 binary โ this finishes that off. ## ๐ Implementation details Tooling only; nothing in `package/src` changes. Roughly: - `.yarn/releases/` swapped to 4.14.1, and all seven `yarn.lock` files migrated v1 โ v8 in place โ resolutions preserved, no drift. - Single root `workspaces` array now covers `package/`, both native wrapper packages, and all three example apps. `link:../../package/*` becomes `workspace:^`, nested lockfiles are gone, and the install-and-build-sdk composite action collapses to one `yarn install --immutable`. - Shared-native sync + husky setup run from the core SDK workspace's `postinstall` (Yarn 4 doesn't run root-workspace lifecycle scripts on install). - Lerna removed: `release/release.config.js` no longer reads `lerna.json`, and `release` / `release-next` / `extract-changelog` use `yarn workspaces foreach`. - Husky 6 โ 9 (the v6 hook boilerplate is on the deprecation path). - `.yarnrc.yml` picks up the conservative hardening tier: `enableHardenedMode`, `npmMinimalAgeGate: 3d`, `enableScripts: false` with a small `dependenciesMeta` allowlist for the packages that genuinely need to build (`@swc/core`, `better-sqlite3`, `react-native-nitro-modules`, `unrs-resolver`). - CI workflows cache `.yarn/` via setup-node; drive-by fix for the deprecated `::set-output` calls in `changelog-preview.yml`. ## ๐จ UI Changes N/A. ## ๐งช Testing Locally: `yarn install --immutable` is clean, `yarn lint` + `yarn build` pass, husky hooks fired on every commit in this PR. Can't verify locally: example apps on real devices, and the release flow itself. The Lerna โ `yarn workspaces foreach` rewrite is the riskiest single change โ worth a dry-run on a throwaway branch before merging. ## โ๏ธ Checklist - [x] I have signed the [Stream CLA](https://docs.google.com/forms/d/e/1FAIpQLScFKsKkAJI7mhCr7K9rEIOpqIDThrWxuvxnwUq2XkHyG154vQ/viewform) (required) - [x] PR targets the `develop` branch - [x] Documentation is updated - [ ] New code is tested in main example apps, including all possible scenarios - [ ] SampleApp iOS and Android - [ ] Expo iOS and Android --------- Co-authored-by: Ivan Sekovanikj <ivan.sekovanikj@getstream.io> | 3 ไธชๆๅ | |
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(yarn): migrate to Yarn 4 + native workspaces (#3594) ## ๐ฏ Goal Move us onto Yarn 4 with native workspaces and drop Lerna. The `.yarnrc.yml` was already half-migrated, but `yarnPath` still pointed at the v1 binary โ this finishes that off. ## ๐ Implementation details Tooling only; nothing in `package/src` changes. Roughly: - `.yarn/releases/` swapped to 4.14.1, and all seven `yarn.lock` files migrated v1 โ v8 in place โ resolutions preserved, no drift. - Single root `workspaces` array now covers `package/`, both native wrapper packages, and all three example apps. `link:../../package/*` becomes `workspace:^`, nested lockfiles are gone, and the install-and-build-sdk composite action collapses to one `yarn install --immutable`. - Shared-native sync + husky setup run from the core SDK workspace's `postinstall` (Yarn 4 doesn't run root-workspace lifecycle scripts on install). - Lerna removed: `release/release.config.js` no longer reads `lerna.json`, and `release` / `release-next` / `extract-changelog` use `yarn workspaces foreach`. - Husky 6 โ 9 (the v6 hook boilerplate is on the deprecation path). - `.yarnrc.yml` picks up the conservative hardening tier: `enableHardenedMode`, `npmMinimalAgeGate: 3d`, `enableScripts: false` with a small `dependenciesMeta` allowlist for the packages that genuinely need to build (`@swc/core`, `better-sqlite3`, `react-native-nitro-modules`, `unrs-resolver`). - CI workflows cache `.yarn/` via setup-node; drive-by fix for the deprecated `::set-output` calls in `changelog-preview.yml`. ## ๐จ UI Changes N/A. ## ๐งช Testing Locally: `yarn install --immutable` is clean, `yarn lint` + `yarn build` pass, husky hooks fired on every commit in this PR. Can't verify locally: example apps on real devices, and the release flow itself. The Lerna โ `yarn workspaces foreach` rewrite is the riskiest single change โ worth a dry-run on a throwaway branch before merging. ## โ๏ธ Checklist - [x] I have signed the [Stream CLA](https://docs.google.com/forms/d/e/1FAIpQLScFKsKkAJI7mhCr7K9rEIOpqIDThrWxuvxnwUq2XkHyG154vQ/viewform) (required) - [x] PR targets the `develop` branch - [x] Documentation is updated - [ ] New code is tested in main example apps, including all possible scenarios - [ ] SampleApp iOS and Android - [ ] Expo iOS and Android --------- Co-authored-by: Ivan Sekovanikj <ivan.sekovanikj@getstream.io> | 3 ไธชๆๅ | |
chore(yarn): migrate to Yarn 4 + native workspaces (#3594) ## ๐ฏ Goal Move us onto Yarn 4 with native workspaces and drop Lerna. The `.yarnrc.yml` was already half-migrated, but `yarnPath` still pointed at the v1 binary โ this finishes that off. ## ๐ Implementation details Tooling only; nothing in `package/src` changes. Roughly: - `.yarn/releases/` swapped to 4.14.1, and all seven `yarn.lock` files migrated v1 โ v8 in place โ resolutions preserved, no drift. - Single root `workspaces` array now covers `package/`, both native wrapper packages, and all three example apps. `link:../../package/*` becomes `workspace:^`, nested lockfiles are gone, and the install-and-build-sdk composite action collapses to one `yarn install --immutable`. - Shared-native sync + husky setup run from the core SDK workspace's `postinstall` (Yarn 4 doesn't run root-workspace lifecycle scripts on install). - Lerna removed: `release/release.config.js` no longer reads `lerna.json`, and `release` / `release-next` / `extract-changelog` use `yarn workspaces foreach`. - Husky 6 โ 9 (the v6 hook boilerplate is on the deprecation path). - `.yarnrc.yml` picks up the conservative hardening tier: `enableHardenedMode`, `npmMinimalAgeGate: 3d`, `enableScripts: false` with a small `dependenciesMeta` allowlist for the packages that genuinely need to build (`@swc/core`, `better-sqlite3`, `react-native-nitro-modules`, `unrs-resolver`). - CI workflows cache `.yarn/` via setup-node; drive-by fix for the deprecated `::set-output` calls in `changelog-preview.yml`. ## ๐จ UI Changes N/A. ## ๐งช Testing Locally: `yarn install --immutable` is clean, `yarn lint` + `yarn build` pass, husky hooks fired on every commit in this PR. Can't verify locally: example apps on real devices, and the release flow itself. The Lerna โ `yarn workspaces foreach` rewrite is the riskiest single change โ worth a dry-run on a throwaway branch before merging. ## โ๏ธ Checklist - [x] I have signed the [Stream CLA](https://docs.google.com/forms/d/e/1FAIpQLScFKsKkAJI7mhCr7K9rEIOpqIDThrWxuvxnwUq2XkHyG154vQ/viewform) (required) - [x] PR targets the `develop` branch - [x] Documentation is updated - [ ] New code is tested in main example apps, including all possible scenarios - [ ] SampleApp iOS and Android - [ ] Expo iOS and Android --------- Co-authored-by: Ivan Sekovanikj <ivan.sekovanikj@getstream.io> | 3 ไธชๆๅ | |
chore(yarn): migrate to Yarn 4 + native workspaces (#3594) ## ๐ฏ Goal Move us onto Yarn 4 with native workspaces and drop Lerna. The `.yarnrc.yml` was already half-migrated, but `yarnPath` still pointed at the v1 binary โ this finishes that off. ## ๐ Implementation details Tooling only; nothing in `package/src` changes. Roughly: - `.yarn/releases/` swapped to 4.14.1, and all seven `yarn.lock` files migrated v1 โ v8 in place โ resolutions preserved, no drift. - Single root `workspaces` array now covers `package/`, both native wrapper packages, and all three example apps. `link:../../package/*` becomes `workspace:^`, nested lockfiles are gone, and the install-and-build-sdk composite action collapses to one `yarn install --immutable`. - Shared-native sync + husky setup run from the core SDK workspace's `postinstall` (Yarn 4 doesn't run root-workspace lifecycle scripts on install). - Lerna removed: `release/release.config.js` no longer reads `lerna.json`, and `release` / `release-next` / `extract-changelog` use `yarn workspaces foreach`. - Husky 6 โ 9 (the v6 hook boilerplate is on the deprecation path). - `.yarnrc.yml` picks up the conservative hardening tier: `enableHardenedMode`, `npmMinimalAgeGate: 3d`, `enableScripts: false` with a small `dependenciesMeta` allowlist for the packages that genuinely need to build (`@swc/core`, `better-sqlite3`, `react-native-nitro-modules`, `unrs-resolver`). - CI workflows cache `.yarn/` via setup-node; drive-by fix for the deprecated `::set-output` calls in `changelog-preview.yml`. ## ๐จ UI Changes N/A. ## ๐งช Testing Locally: `yarn install --immutable` is clean, `yarn lint` + `yarn build` pass, husky hooks fired on every commit in this PR. Can't verify locally: example apps on real devices, and the release flow itself. The Lerna โ `yarn workspaces foreach` rewrite is the riskiest single change โ worth a dry-run on a throwaway branch before merging. ## โ๏ธ Checklist - [x] I have signed the [Stream CLA](https://docs.google.com/forms/d/e/1FAIpQLScFKsKkAJI7mhCr7K9rEIOpqIDThrWxuvxnwUq2XkHyG154vQ/viewform) (required) - [x] PR targets the `develop` branch - [x] Documentation is updated - [ ] New code is tested in main example apps, including all possible scenarios - [ ] SampleApp iOS and Android - [ ] Expo iOS and Android --------- Co-authored-by: Ivan Sekovanikj <ivan.sekovanikj@getstream.io> | 3 ไธชๆๅ | |
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 ไธชๆๅ | |
fix(a11y): focus inputs on enter and page transitions (#3671) ## ๐ฏ Goal When a screen-reader user opens a channel or thread, VoiceOver/TalkBack focus previously landed on an arbitrary stop (the back button, or a message mid-list). This moves the entry point to where the user acts โ the message composer โ while keeping the header/back reachable via standard OS gestures. - Add `useSetAccessibilityFocus()` - a public, generic primitive that moves the screen reader cursor onto a ref/node (SR-gated, RAF deferred). It only moves accessibility focus; it never opens the keyboard or activates the field. - Add `useScreenReaderMountFocus(ref)` - built on the primitive; focuses on mount (and once the SR state resolves). `MessageComposer` uses it on `inputBoxRef`, so the composer is focused on entry. This is the path that lands Android forward navigation as well (but not always on iOS, which is why we need the actual transitional effect as well) `SampleApp` reference implementation: - `useScreenReaderComposerFocusEffect` - wires React Navigation's `transitionEnd` to `useSetAccessibilityFocus`, covering back navigation (both platforms) and iOS forward navigation (where firing on mount loses a race with the OS focus pass). Returns a stable `setInputRef` for `<Channel>`. - Header reachability is done by adding `accessibilityRole='header'` on the screen header title (reachable via iOS Headings rotor / jump to top and Android Headings reading control swipe up) and `onAccessibilityEscape` -> `goBack` on the screen root for the iOS back scrub (Android uses the system Back gesture). Note: `onAccessibilityEscape` is inert on a layout only `View` under `Fabric` - it gets flattened and never receives the gesture. The view hosting it needs `collapsable={false}` if it does not apply any `layout` relevant props itself. ## ๐ Implementation details <!-- Provide a description of the implementation --> ## ๐จ UI Changes <!-- Add relevant screenshots --> <details> <summary>iOS</summary> <table> <thead> <tr> <td>Before</td> <td>After</td> </tr> </thead> <tbody> <tr> <td> <!--<img src="" /> --> </td> <td> <!--<img src="" /> --> </td> </tr> </tbody> </table> </details> <details> <summary>Android</summary> <table> <thead> <tr> <td>Before</td> <td>After</td> </tr> </thead> <tbody> <tr> <td> <!--<img src="" /> --> </td> <td> <!--<img src="" /> --> </td> </tr> </tbody> </table> </details> ## ๐งช Testing <!-- Explain how this change can be tested (or why it can't be tested) --> ## โ๏ธ Checklist - [ ] I have signed the [Stream CLA](https://docs.google.com/forms/d/e/1FAIpQLScFKsKkAJI7mhCr7K9rEIOpqIDThrWxuvxnwUq2XkHyG154vQ/viewform) (required) - [ ] 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 ไธชๆๅ | |
chore(yarn): migrate to Yarn 4 + native workspaces (#3594) ## ๐ฏ Goal Move us onto Yarn 4 with native workspaces and drop Lerna. The `.yarnrc.yml` was already half-migrated, but `yarnPath` still pointed at the v1 binary โ this finishes that off. ## ๐ Implementation details Tooling only; nothing in `package/src` changes. Roughly: - `.yarn/releases/` swapped to 4.14.1, and all seven `yarn.lock` files migrated v1 โ v8 in place โ resolutions preserved, no drift. - Single root `workspaces` array now covers `package/`, both native wrapper packages, and all three example apps. `link:../../package/*` becomes `workspace:^`, nested lockfiles are gone, and the install-and-build-sdk composite action collapses to one `yarn install --immutable`. - Shared-native sync + husky setup run from the core SDK workspace's `postinstall` (Yarn 4 doesn't run root-workspace lifecycle scripts on install). - Lerna removed: `release/release.config.js` no longer reads `lerna.json`, and `release` / `release-next` / `extract-changelog` use `yarn workspaces foreach`. - Husky 6 โ 9 (the v6 hook boilerplate is on the deprecation path). - `.yarnrc.yml` picks up the conservative hardening tier: `enableHardenedMode`, `npmMinimalAgeGate: 3d`, `enableScripts: false` with a small `dependenciesMeta` allowlist for the packages that genuinely need to build (`@swc/core`, `better-sqlite3`, `react-native-nitro-modules`, `unrs-resolver`). - CI workflows cache `.yarn/` via setup-node; drive-by fix for the deprecated `::set-output` calls in `changelog-preview.yml`. ## ๐จ UI Changes N/A. ## ๐งช Testing Locally: `yarn install --immutable` is clean, `yarn lint` + `yarn build` pass, husky hooks fired on every commit in this PR. Can't verify locally: example apps on real devices, and the release flow itself. The Lerna โ `yarn workspaces foreach` rewrite is the riskiest single change โ worth a dry-run on a throwaway branch before merging. ## โ๏ธ Checklist - [x] I have signed the [Stream CLA](https://docs.google.com/forms/d/e/1FAIpQLScFKsKkAJI7mhCr7K9rEIOpqIDThrWxuvxnwUq2XkHyG154vQ/viewform) (required) - [x] PR targets the `develop` branch - [x] Documentation is updated - [ ] New code is tested in main example apps, including all possible scenarios - [ ] SampleApp iOS and Android - [ ] Expo iOS and Android --------- Co-authored-by: Ivan Sekovanikj <ivan.sekovanikj@getstream.io> | 3 ไธชๆๅ |
G
| ๆไปถ | ๆๅๆไบค่ฎฐๅฝ | ๆๅๆดๆฐๆถ้ด |
|---|---|---|
| 3 ไธชๆๅ | ||
| 2 ไธชๆๅ | ||
| 2 ไธชๆๅ | ||
| 2 ไธชๆๅ | ||
| 1 ไธชๆๅ | ||
| 2 ไธชๆๅ | ||
| 1 ไธชๆๅ | ||
| 3 ไธชๆๅ | ||
| 3 ไธชๆๅ | ||
| 1 ไธชๆๅ | ||
| 1 ไธชๆๅ | ||
| 3 ไธชๆๅ | ||
| 1 ไธชๆๅ | ||
| 3 ไธชๆๅ | ||
| 3 ไธชๆๅ | ||
| 3 ไธชๆๅ | ||
| 1 ไธชๆๅ | ||
| 2 ไธชๆๅ | ||
| 3 ไธชๆๅ |