You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Helper functions for JavaScript bundle static analysis are extracted from src/patches/index.ts into a new dedicated module src/patches/helpers.ts. The 11 utility functions—including findChalkVar, getReactVar, findBoxComponent, and others—are moved to the helpers module and re-exported from the index file, consolidating helper logic into a separate file without changing functionality.
New module created with 11 static analysis utility functions for JavaScript bundles: findChalkVar, getModuleLoaderFunction, getReactModuleNameNonBun, getReactModuleFunctionBun, getReactVar, clearReactVarCache, findRequireFunc, getRequireFuncName, clearRequireFuncNameCache, findTextComponent, findBoxComponent. Includes multi-regex parsing logic, environment-aware branching (Bun vs esbuild), and caching mechanisms (+343 lines).
Module Reorganization src/patches/index.ts
Removes inline exports of 11 helper functions and adds consolidated re-export statement from './helpers' module, centralizing helper function definitions (-342 lines, +13 lines).
Estimated code review effort
🎯 2 (Simple) | ⏱️ ~10 minutes
Possibly related PRs
PR #352: Overlapping changes to getModuleLoaderFunction with enhanced native vs NPM bundle detection logic.
Poem
🐰 Helpers hop into their brand new home, Extracted clean, no longer alone, Static patterns dance through the dedicated file, Organization blooms with newfound style! ✨
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
✅ Passed
The pull request title accurately describes the main change: moving patching helper functions from src/patches/index.ts to a new src/patches/helpers.ts module. The title is concise, clear, and directly reflects the refactoring work.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@coderabbitai ignore
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.