Skip to content

fix(create): run nested app templates from parent dir#1869

Open
leno23 wants to merge 7 commits into
voidzero-dev:mainfrom
leno23:codex/create-app-parent-dir-820
Open

fix(create): run nested app templates from parent dir#1869
leno23 wants to merge 7 commits into
voidzero-dev:mainfrom
leno23:codex/create-app-parent-dir-820

Conversation

@leno23

@leno23 leno23 commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • fixes vite:application creation for nested monorepo targets like apps/temperature-symbol
  • runs create-vite from the target parent directory and passes only the leaf project name
  • preserves the full targetDir for later package-name rewriting and monorepo integration

Fixes #820.

Verification

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

Blocked

  • pnpm -F vite-plus test src/create/__tests__/builtin.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 9531db7
🔍 Latest deploy log https://app.netlify.com/projects/viteplus-preview/deploys/6a3398356b44970008657ac0

@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: 211971f218

ℹ️ 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/create/templates/builtin.ts Outdated
@leno23

leno23 commented Jun 18, 2026

Copy link
Copy Markdown
Contributor Author

Formatted the nested-app create changes that were failing vp check in CI.\n\nLocal checks:\n- git diff --check\n- pnpm exec oxfmt --check packages/cli/src/create/templates/builtin.ts packages/cli/src/create/tests/builtin.spec.ts\n- pnpm exec oxlint packages/cli/src/create/templates/builtin.ts packages/cli/src/create/tests/builtin.spec.ts\n- pnpm exec tsc -p packages/cli/tsconfig.json --noEmit

@leno23

leno23 commented Jun 18, 2026

Copy link
Copy Markdown
Contributor Author

Follow-up pushed: formatted the builtin template files reported by the failing vp check step. Local verification: oxfmt --check packages/cli/src/create/__tests__/builtin.spec.ts packages/cli/src/create/templates/builtin.ts and git diff --check.

@leno23

leno23 commented Jun 18, 2026

Copy link
Copy Markdown
Contributor Author

Pushed a Windows CI fix in 9779adb: the nested-template test now builds expected paths with node:path, so Windows expects backslash-normalized paths while POSIX keeps the existing value. Local git diff --check passes; the targeted vitest command could not start in this checkout because the local node_modules is missing Vite under Vitest, so CI is the active validation.

@leno23

leno23 commented Jun 18, 2026

Copy link
Copy Markdown
Contributor Author

Pushed 6a16a36 to address the Codex inline review: now preserves as the create-vite project argument instead of passing an empty basename, with a regression test for the current-directory target. Local checks: . The targeted Vitest command still cannot start in this checkout because Vitest cannot resolve the local Vite dependency, so CI remains the active validation.

@leno23

leno23 commented Jun 18, 2026

Copy link
Copy Markdown
Contributor Author

Pushed 6a16a36 to address the Codex inline review: vite:application --directory . now preserves . as the create-vite project argument instead of passing an empty basename, with a regression test for the current-directory target.

Local checks:

  • git diff --check

The targeted Vitest command still cannot start in this checkout because Vitest cannot resolve the local Vite dependency, so CI remains the active validation.

@leno23

leno23 commented Jun 18, 2026

Copy link
Copy Markdown
Contributor Author

Follow-up pushed in 80fd266: the two application-template unit tests now pass independent args: [] arrays, avoiding shared mutation from executeBuiltinTemplate between test cases. Local git diff --check passes.

@leno23

leno23 commented Jun 18, 2026

Copy link
Copy Markdown
Contributor Author

Follow-up for the Windows E2E failure: pushed 9531db7 to normalize the current-directory setPackageName assertion with path.join("/tmp/workspace"), so the expected path matches platform separators. git diff --check passes locally. The targeted Vitest command is still blocked in this checkout by a local startup error resolving Vitest/Vite (ERR_MODULE_NOT_FOUND for vite/dist/vite/node/index.js), so I am leaving the matrix rerun to validate this path-specific fix.

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.

vp create fails when creating application within monorepo

1 participant