Skip to content

feat(typecheck): add Golar support#1362

Open
OskarLebuda wants to merge 3 commits into
nuxt:mainfrom
OskarLebuda:feat/golar
Open

feat(typecheck): add Golar support#1362
OskarLebuda wants to merge 3 commits into
nuxt:mainfrom
OskarLebuda:feat/golar

Conversation

@OskarLebuda

Copy link
Copy Markdown
Contributor

🔗 Linked issue

Related #1316

📚 Description

nuxi typecheck can now use Golar as an alternative to vue-tsc. If Golar is installed in the project (or a golar.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 minimal golar.config is 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

golar

golar.mov

@OskarLebuda OskarLebuda requested a review from danielroe as a code owner July 7, 2026 21:44
@pkg-pr-new

pkg-pr-new Bot commented Jul 7, 2026

Copy link
Copy Markdown
  • nuxt-cli-playground

    npm i https://pkg.pr.new/create-nuxt@1362
    
    npm i https://pkg.pr.new/nuxi@1362
    
    npm i https://pkg.pr.new/@nuxt/cli@1362
    

commit: 6f17a4c

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@49dd7f7). Learn more about missing BASE report.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@codspeed-hq

codspeed-hq Bot commented Jul 7, 2026

Copy link
Copy Markdown

Merging this PR will degrade performance by 46.43%

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

❌ 1 regressed benchmark
✅ 1 untouched benchmark

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

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)

Open in CodSpeed

@coderabbitai

coderabbitai Bot commented Jul 7, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 3d1a1868-5dfb-4c5a-ae1c-a5928db41b6f

📥 Commits

Reviewing files that changed from the base of the PR and between 3a63e57 and 6f17a4c.

📒 Files selected for processing (2)
  • packages/nuxi/src/commands/typecheck.ts
  • packages/nuxi/src/utils/paths.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/nuxi/src/commands/typecheck.ts

📝 Walkthrough

Walkthrough

This PR updates the nuxi typecheck command to support vue-tsc or Golar, including checker selection, resolution, installation prompts, Golar config creation, and checker-specific argument handling. It also changes README help text for the command and updates withNodePath() to split NODE_PATH with Node’s platform delimiter.

Estimated code review effort: 4 (Complex) | ~45 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: adding Golar support to the typecheck command.
Description check ✅ Passed The description accurately describes the Golar typecheck support, automatic detection, prompt flow, and checker flag.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 49dd7f7 and 3a63e57.

📒 Files selected for processing (2)
  • README.md
  • packages/nuxi/src/commands/typecheck.ts

Comment thread packages/nuxi/src/commands/typecheck.ts Outdated
Comment thread packages/nuxi/src/commands/typecheck.ts Outdated
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.

2 participants