fix: support both new and old ColorSchemeName in RN#331
Conversation
📝 WalkthroughWalkthroughAdds React Native version awareness and maps RN's 'unspecified' color scheme to Light. Replaces use of Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@packages/uniwind/src/core/config/config.common.ts`:
- Around line 7-8: The RN version check should safely read the numeric minor
version and compare it as an integer; change the logic around
RN_VERSION/UNSPECIFIED_THEME so it uses optional chaining to avoid
Platform.constants being undefined (e.g., read
Platform.constants?.reactNativeVersion?.minor ?? 0 into a RN_MINOR variable) and
compare RN_MINOR >= 82 (integer) to decide UNSPECIFIED_THEME ('unspecified' or
undefined). Update references to RN_VERSION and UNSPECIFIED_THEME in any
dependent code to use the new RN_MINOR-based check.
|
Could you please make a release with this fix, since it is now merged. |
Released in https://github.com/uni-stack/uniwind/releases/tag/v1.2.7 |
fix #323
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.