Skip to content

feat(typecheck): add Golar support#1362

Merged
danielroe merged 7 commits into
nuxt:mainfrom
OskarLebuda:feat/golar
Jul 14, 2026
Merged

feat(typecheck): add Golar support#1362
danielroe merged 7 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: e25af30

@codecov-commenter

codecov-commenter commented Jul 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@8963490). 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 not alter performance

✅ 2 untouched benchmarks


Comparing OskarLebuda:feat/golar (e25af30) with main (8963490)

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: c1239e80-255b-4086-b1b0-4fbf8b1021df

📥 Commits

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

📒 Files selected for processing (1)
  • packages/nuxi/src/commands/typecheck.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 summarizes the main change: adding Golar support to typecheck.
Description check ✅ Passed The description is directly related to the changes and accurately describes the new checker support and behavior.
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

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install timed out. The project may have too many dependencies for the sandbox.


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

@danielroe danielroe left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nice work - thank you! ❤️

@danielroe danielroe merged commit c05ea94 into nuxt:main Jul 14, 2026
15 checks passed
@github-actions github-actions Bot mentioned this pull request Jul 14, 2026
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