Conversation
WalkthroughUpdates the main-file matching in src/index.ts from a single glob pattern to an explicit array of two paths for transform-time detection. The call to registerKuApp remains triggered when the new filter matches. No other logic or exported APIs are changed. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing touches
🧪 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 |
There was a problem hiding this comment.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/index.ts (1)
49-49: Fix platform-specific path construction.The hardcoded backslash in
\\srccreates platform-specific paths that fail on Unix-based systems. While the main fix addresses parentheses in paths, this line represents another root cause mentioned in the PR objectives: "Non-normalized Windows paths and inconsistent path separators."Apply this diff to ensure cross-platform compatibility:
- const rootPath = process.env.UNI_INPUT_DIR || (`${process.env.INIT_CWD}\\src`) + const rootPath = process.env.UNI_INPUT_DIR || resolve(process.env.INIT_CWD || process.cwd(), 'src')This ensures consistent path separator handling across all platforms.
🧹 Nitpick comments (1)
src/index.ts (1)
76-79: The explicit paths fix the parentheses issue. Consider usingresolve()for full normalization.The change from a glob pattern to explicit paths successfully avoids regex interpretation of parentheses in the path, which was the core issue. However, for consistency with lines 50 and 52, and to fully address the "normalize root path" recommendation in the PR objectives, consider using
resolve()to ensure proper cross-platform path handling.Apply this diff for complete path normalization:
- const filterMain = createFilter([ - `${rootPath}/main.ts`, - `${rootPath}/main.js`, - ]) + const filterMain = createFilter([ + resolve(rootPath, 'main.ts'), + resolve(rootPath, 'main.js'), + ])
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (1)
src/index.ts(1 hunks)
resolve: #29
Summary by CodeRabbit