Skip to content

Conversation

@jpudysz
Copy link
Collaborator

@jpudysz jpudysz commented Jan 20, 2026

Summary by CodeRabbit

  • Refactor
    • Optimized internal component resolution and path handling mechanisms for improved maintainability and performance.

✏️ Tip: You can customize this high-level summary in your review settings.

@jpudysz jpudysz requested a review from Brentlok January 20, 2026 13:22
@coderabbitai
Copy link

coderabbitai bot commented Jan 20, 2026

📝 Walkthrough

Walkthrough

Metro resolver in resolvers.ts now uses a cached base path to determine internal component modules. Module resolution routing hardcodes uniwind/components paths and routes react-native core requests through this path instead of using dynamic package name variables.

Changes

Cohort / File(s) Summary
Metro Resolver Enhancement
packages/uniwind/src/metro/resolvers.ts
Introduced lazy-initialized cachedComponentsBasePath helper to replace origin-path checks. Replaced dynamic ${name}/components paths with hardcoded uniwind/components. Updated both nativeResolver and webResolver to populate cache on first load. Refactored internal component detection from module path inspection to cached base-path comparison. Route react-native core requests to uniwind/components path.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • Brentlok

Poem

🐰 Paths are cached, no more delay,
Hardcoded routes guide the way,
Metro resolves with newfound grace,
Uniwind components in their place!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main fix: preventing a maximum call stack size exceeded error in metro by refactoring the module resolution logic to use cached base paths instead of recursive origin-path checks.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@jpudysz jpudysz merged commit 3b76964 into main Jan 21, 2026
2 checks passed
@jpudysz jpudysz deleted the feature/metro branch January 21, 2026 04:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants