Skip to content

fix(cli): warn for bare dev at monorepo root#1870

Open
leno23 wants to merge 4 commits into
voidzero-dev:mainfrom
leno23:codex/dev-monorepo-root-hint-770
Open

fix(cli): warn for bare dev at monorepo root#1870
leno23 wants to merge 4 commits into
voidzero-dev:mainfrom
leno23:codex/dev-monorepo-root-hint-770

Conversation

@leno23

@leno23 leno23 commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • warns when vp dev is run bare from a monorepo root
  • suggests vp run dev or an explicit package directory like vp dev apps/website
  • leaves the existing Vite dev behavior unchanged while reducing the confusing 404/no-app case

Refs #770.

Verification

  • git diff --check
  • pnpm exec tsgo --noEmit -p packages/cli/tsconfig.json

Blocked

  • pnpm -F vite-plus test src/__tests__/monorepo-root-hint.spec.ts fails at Vitest startup because the local Vite dist file is missing: vite/dist/vite/node/index.js.

@netlify

netlify Bot commented Jun 18, 2026

Copy link
Copy Markdown

Deploy Preview for viteplus-preview canceled.

Name Link
🔨 Latest commit ef62411
🔍 Latest deploy log https://app.netlify.com/projects/viteplus-preview/deploys/6a33b618cab3c80008778077

@leno23 leno23 marked this pull request as ready for review June 18, 2026 04:57

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8726d35a09

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/cli/src/bin.ts Outdated
@leno23

leno23 commented Jun 18, 2026

Copy link
Copy Markdown
Contributor Author

Pushed a targeted TypeScript fix for packages/cli/src/tests/monorepo-root-hint.spec.ts by removing fixture fields that are not part of WorkspacePackage. Targeted oxfmt check and git diff --check pass locally.

@leno23

leno23 commented Jun 18, 2026

Copy link
Copy Markdown
Contributor Author

Follow-up pushed: formatted the CLI entry import order reported by the failing vp check step. Local verification: oxfmt --check packages/cli/src/bin.ts and git diff --check.

@leno23

leno23 commented Jun 18, 2026

Copy link
Copy Markdown
Contributor Author

Addressed the Codex dev preflight finding in ef62411: the monorepo-root dev hint now treats detectWorkspace() as best-effort and falls through to the Rust core command runner if workspace/package-manager detection fails. That keeps vp dev from being blocked by warning-only hint logic for package manager specs such as pnpm@latest.

Local validation:

  • git diff --check passed

I intentionally did not keep the default oxfmt rewrite because, without this repo's formatting config, it changed unrelated file-wide quote style; CI should run the configured formatter/checks.

@naokihaba

Copy link
Copy Markdown
Collaborator

I think this is an issue that still needs further discussion and confirmation.

Since it is still being discussed in #770, I believe it would be best to get a consensus from the stakeholders regarding your proposed solution.

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