-
Notifications
You must be signed in to change notification settings - Fork 10
chore: dependencies updates #456
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThis pull request updates project dependencies and refactors storage initialization patterns. The 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In @src/app/Storybook.tsx:
- Line 1: The .rnstorybook export was re-exported directly which removed lazy
loading, Suspense, ErrorBoundary and loading UI; revert by importing the
Storybook UI lazily (React.lazy(() => import('../../.rnstorybook'))) and export
a wrapper component that renders the lazy-loaded Storybook inside React.Suspense
with your Loader as fallback and an ErrorBoundary around it (or reintroduce the
previous ErrorBoundary component), or if you intentionally removed them,
document in preview.tsx why Suspense/Loader/ErrorBoundary are not needed and
ensure the preview decorator still provides equivalent error/loading handling.
🧹 Nitpick comments (1)
metro.config.cjs (1)
6-8: Optional: Remove trailing comma in destructuring.The trailing comma after
withStorybookis unnecessary since only one export is being destructured. While not incorrect, it's typically used when multiple items are being destructured.♻️ Proposed cleanup
-const { - withStorybook, -} = require('@storybook/react-native/metro/withStorybook'); +const { withStorybook } = require('@storybook/react-native/metro/withStorybook');
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
⛔ Files ignored due to path filters (1)
yarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (10)
.claude/settings.local.json__mocks__/react-native-mmkv.tsmetro.config.cjspackage.jsonsrc/app/Storybook.tsxsrc/domain/testing/setup.tssrc/infra/storage/appStorage.tssrc/infra/storage/productTrackingStorage.tssrc/infra/storage/queryClientStorage.tssrc/infra/storage/storeStorage.ts
🧰 Additional context used
📓 Path-based instructions (2)
src/**/*.{ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
src/**/*.{ts,tsx}: Always use TypeScript for code files
Use ES modules withimportstatements instead ofrequire
Always wrap arrow function arguments in parentheses
Prefer async/await for promises and always handle error cases
Always fix ESLint warnings and errors before finishing a task
Runyarn lint,yarn lint:ts, andyarn prettifyand fix potential errors before finishing a task
Files:
src/infra/storage/storeStorage.tssrc/infra/storage/appStorage.tssrc/infra/storage/queryClientStorage.tssrc/domain/testing/setup.tssrc/app/Storybook.tsxsrc/infra/storage/productTrackingStorage.ts
src/**/*.{tsx,ts}
📄 CodeRabbit inference engine (CLAUDE.md)
src/**/*.{tsx,ts}: Always use arrow functions with extracted Props interfaces for React components
Don't useReact.FCtype for components; prefer interfaces to types for Props
UseComponentProps<typeof MyComponent>to extract Props type instead of manually defining them
Never define inline styles; always use Unistyles's StyleSheet API for styling
Maintain theme consistency using Unistyles theme file located atsrc/domain/theme/unistyles.ts
Files:
src/infra/storage/storeStorage.tssrc/infra/storage/appStorage.tssrc/infra/storage/queryClientStorage.tssrc/domain/testing/setup.tssrc/app/Storybook.tsxsrc/infra/storage/productTrackingStorage.ts
🧠 Learnings (3)
📚 Learning: 2026-01-07T07:41:02.477Z
Learnt from: CR
Repo: tsyirvo/react-native-starter PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-07T07:41:02.477Z
Learning: Applies to src/**/*.{ts,tsx} : Use ES modules with `import` statements instead of `require`
Applied to files:
metro.config.cjs
📚 Learning: 2026-01-07T07:41:02.477Z
Learnt from: CR
Repo: tsyirvo/react-native-starter PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-07T07:41:02.477Z
Learning: Applies to src/**/*.{ts,tsx} : Run `yarn lint`, `yarn lint:ts`, and `yarn prettify` and fix potential errors before finishing a task
Applied to files:
package.json
📚 Learning: 2026-01-07T07:41:02.477Z
Learnt from: CR
Repo: tsyirvo/react-native-starter PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-07T07:41:02.477Z
Learning: Applies to src/**/*.{ios,android}.tsx : Support platform-specific files using extensions like `.ios.tsx` and `.android.tsx`
Applied to files:
package.json
🧬 Code graph analysis (4)
src/infra/storage/storeStorage.ts (1)
__mocks__/react-native-mmkv.ts (3)
MMKV(31-31)Configuration(33-36)createMMKV(27-29)
src/infra/storage/appStorage.ts (1)
__mocks__/react-native-mmkv.ts (1)
createMMKV(27-29)
src/infra/storage/queryClientStorage.ts (1)
__mocks__/react-native-mmkv.ts (3)
MMKV(31-31)Configuration(33-36)createMMKV(27-29)
src/infra/storage/productTrackingStorage.ts (1)
__mocks__/react-native-mmkv.ts (1)
createMMKV(27-29)
🔇 Additional comments (14)
package.json (5)
55-55: LGTM! APP_ENV added for consistency.Adding
APP_ENV=developmentto the storybook script ensures consistency with the development environment setup across scripts.
206-206: LGTM! Storybook patterns added to transform ignore list.The addition of
storybook|@storybook/.*totransformIgnorePatternsis correct and necessary for Jest to properly handle the Storybook 10 upgrade.
108-113: React 19 is already properly integrated into this codebase.The project uses React 19.1.0 and follows modern React patterns throughout. Code examination confirms:
- No deprecated React APIs (ReactDOM.render, findDOMNode) in use
- No React.FC patterns; components use modern functional declarations
- All useRef instances are properly typed for TypeScript
- All ref callbacks follow correct patterns with no problematic return values
- ReactNode and ReactElement types are imported and used correctly
No React 19 compatibility updates are needed.
Likely an incorrect or invalid review comment.
131-131: No action required—the codebase is already using Zod 4 compatible patterns. The validators use the new{ error: ... }syntax for messages (loginForm.validators.ts, env.js), and error handling correctly usesz.treeifyError()instead of the deprecated.format()or.flatten()methods.
113-113: Remove this comment — React Native 0.81.5 is the correct version for React 19 and Expo 54.The version 0.81.5 is a valid patch release (published Oct 21, 2025) and follows the standard React Native versioning pattern. It is specifically paired with React 19.1 and is the version targeted by Expo SDK 54, making it the appropriate choice for these dependencies. This is not a typo or unusual version.
Likely an incorrect or invalid review comment.
.claude/settings.local.json (1)
24-25: LGTM! MCP permission added for documentation queries.The addition of
mcp__context7__query-docspermission follows the established MCP permission pattern and enables documentation querying capabilities.src/domain/testing/setup.ts (1)
15-15: Mock path for @gorhom/bottom-sheet is correct.The mock setup is valid. @gorhom/bottom-sheet@5.2.8 includes mock.js at the package root, and the pattern
jest.mock('@gorhom/bottom-sheet', () => require('@gorhom/bottom-sheet/mock'))is the documented approach for this package version.src/infra/storage/queryClientStorage.ts (1)
2-2: Consistent migration to factory pattern.The refactoring is consistent with the changes in
storeStorage.ts, properly updating tocreateMMKV()factory andremove()method.Also applies to: 10-10, 24-24
src/infra/storage/appStorage.ts (1)
1-7: Clean and simplified storage initialization.The direct use of
createMMKV()without a wrapper class is appropriate for this simple storage instance. The refactoring is well-executed.src/infra/storage/productTrackingStorage.ts (1)
1-7: Consistent factory pattern implementation.The migration to
createMMKV()is consistent with other storage modules. The helper functions inCustomProductTrackingStoragewill work correctly with the factory-created instance.__mocks__/react-native-mmkv.ts (2)
1-25: Excellent type safety improvements in the mock.The factory-based mock implementation significantly improves type safety by:
- Checking types before returning values from getters (lines 5-10)
- Providing explicit return types for all methods
- Supporting isolated storage instances via the factory pattern
The mock API is complete and correctly implements the expected MMKV interface.
27-36: Well-structured factory mock and type exports.The export pattern is clean:
createMMKVas a jest mock function that returns storage instancesMMKVas a type (not a value), enabling proper type inferenceConfigurationinterface matching the library's signatureThis structure supports testing multiple storage instances with different configurations.
src/infra/storage/storeStorage.ts (2)
2-2: Factory pattern migration correctly implemented.The refactoring from
new MMKV(config)tocreateMMKV(config)is valid. ThecreateMMKVfactory function is supported in react-native-mmkv and maintains type safety.
24-24: API change verified as correct for react-native-mmkv 4.1.0. The methodremove()is the correct API in v4 (the olddelete()method was renamed per the v4 release notes due todeletebeing a C++ keyword).
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.