feat(typecheck): add Golar support#1362
Conversation
commit: |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1362 +/- ##
=======================================
Coverage ? 46.36%
=======================================
Files ? 52
Lines ? 1719
Branches ? 500
=======================================
Hits ? 797
Misses ? 739
Partials ? 183 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Merging this PR will degrade performance by 46.43%
|
| Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|
| ❌ | makes requests to dev server |
56 ms | 104.5 ms | -46.43% |
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing OskarLebuda:feat/golar (3a63e57) with main (49dd7f7)
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThis PR updates the nuxi Estimated code review effort: 4 (Complex) | ~45 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/nuxi/src/commands/typecheck.ts`:
- Around line 91-95: The checker validation in typecheck.ts is too loose because
`checkerArg in TYPE_CHECKERS` accepts inherited properties like toString and
constructor. Update the guard in the `checkerArg` validation block to check only
the explicit keys of `TYPE_CHECKERS` (using its own-property/key set) before the
`TypeChecker` cast, so invalid CLI values are rejected consistently with the
existing error path.
- Around line 200-205: The NODE_PATH parsing in the typecheck command and shared
path utilities is hardcoded to split on “:”, which breaks on Windows and
drive-letter paths. Update the NODE_PATH iteration in the typecheck logic and
the corresponding split in the paths utility to use path.delimiter instead,
keeping the existing resolve/existsSync flow unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 0c89457a-bb57-45b0-a967-f0ffb90f0599
📒 Files selected for processing (2)
README.mdpackages/nuxi/src/commands/typecheck.ts
🔗 Linked issue
Related #1316
📚 Description
nuxi typecheckcan now use Golar as an alternative tovue-tsc. If Golar is installed in the project (or agolar.config.*file exists), it gets picked up automatically - otherwise the behavior stays the same as before. When no type checker is found, the interactive prompt now lets you choose which one to install, and a minimalgolar.configis generated if needed.You can also force a specific checker with
--checker=vue-tsc|golar. This is helpful for noTTY.DEMO:
vue-tsc:vue-tsc.mov
golargolar.mov