fix(sample-apps): resolve nested workspace deps in RN metro configs - #2443
Conversation
The RN sample apps restrict Metro to the app and root `node_modules` and keep `disableHierarchicalLookup` on, but bundle the workspace SDK from source. Dependencies yarn could not hoist to the root -- `@stream-io/i18n`'s `@stream-io/state-store`, `react-native-url-polyfill` -- were therefore unresolvable, breaking the dogfood release bundle since #2436 and the two Expo apps for longer. Add `packages/react-native-sdk/node_modules` as a last search path so those resolve while `react` and `react-native` keep coming from the app's own `node_modules` and stay single-copy.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review. 📝 WalkthroughWalkthroughThree React Native sample Metro configurations now append the SDK’s unhoisted ChangesReact Native Metro configuration
Priority: ⬇️ Low Estimated code review effort: 1 (Trivial) | ~5 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to This configuration-only change adds the SDK dependency search path while preserving existing resolution order; no concrete merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Bundle sizeBuilt package output. Sizes in KB; delta vs No significant package size increase vs |
💡 Overview
CI failed for RN sample apps as Metro only searched the app and repo root
node_modules, and yarn nests some deps in neither — so the bundle failed.Happened since #2436 on
@stream-io/state-store. The Expo apps have been broken longer onreact-native-url-polyfill.📝 Implementation notes
Added
packages/react-native-sdk/node_modulesas a third Metro search path in all three sample apps. Searched last, soreactandreact-nativestill come from the app's own folder and stay single-copy.🎫 Ticket: https://linear.app/stream/issue/XYZ-123
📑 Docs: https://github.com/GetStream/docs-content/pull/
Summary by CodeRabbit