| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
chore: rn 0.86 compatibility (#3741) ## 🎯 Goal This PR adds RN `0.86`/Expo 57 compatibility to the SDK. Since the RN team [fixed `measureInWindow`](https://reactnative.dev/blog/2026/06/11/react-native-0.86#edge-to-edge-on-android) in the latest release, the `insets.top` correction that we applied before is no longer needed and is harming us on these versions. So that we retain backwards compatibility, we'll still keep this behaviour on older versions of React Native while keeping it for anything above `0.86`. Note: I'd like to shed some light on [this change](https://github.com/GetStream/stream-chat-react-native/pull/3741/changes/e8729a4a027cb081aca44102c833c5b28fbe7208), because I just spent the better part of the last 4 hours debugging why all of the offline tests were failing on CI and not locally. So why disable journaling/fsync in the offline-support DB mock? The offline support suite backs its mocked SQLite with a real file based `better-sqlite3` DB and each test does `~2,000 write` ops (the connection sync persists 10 channels' full state, so messages, members, reads, reactions). With `SQLite's` default `synchronous=FULL`, every write does an `fsync: ~1ms` on a local SSD but ~40ms on a CI runner's slower disk. That's `~2,000 × 40ms ≈ 80s` of DB work per test against a 5s Jest timeout, so the suite passed locally but timed out on CI. `journal_mode = MEMORY + synchronous = OFF` keeps writes off the disk (test DBs need no durability, we roll a new DB for each iteration anyway), cutting per write cost to sub millisecond and the suite back to `~1–2s`, comfortably under the timeout. And as to why this happened with this PR ? I have no clue. I assume it's something related to upgrading the testing ecosystem (the jest preset at least) to a higher react version or something else I'm missing triggering this. I've sort of seen it happen once or twice before as well, but it was generally treated as a fluke (whereas now I did about ~30 failed test runs, including reruns of course). Fun times. ## 🛠 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 | 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 个月前 |