Skip to content

fix(create): add vp create e2e tests and fix yarn/bun migration bugs#1317

Merged
graphite-app[bot] merged 1 commit intomainfrom
add-vp-create-e2e
Apr 7, 2026
Merged

fix(create): add vp create e2e tests and fix yarn/bun migration bugs#1317
graphite-app[bot] merged 1 commit intomainfrom
add-vp-create-e2e

Conversation

@fengmk2
Copy link
Copy Markdown
Member

@fengmk2 fengmk2 commented Apr 6, 2026

Summary

Motivated by #1297 the .yarnrc template fix revealed that vp create had no e2e test coverage, making it easy for template bugs to ship undetected.

  • Add a new GitHub Actions workflow (test-vp-create.yml) that e2e tests vp create across all 3 built-in templates (monorepo, application, library) and all 4 package managers (pnpm, npm, yarn, bun) — 12 test combinations
  • Fix bun monorepo migration writing empty catalog with dangling catalog: references when using file: protocol
  • Fix yarn standalone projects missing .yarnrc.yml with nodeLinker: node-modules
  • Pass --no-frozen-lockfile from vp create in CI so yarn Berry can create fresh lockfiles

Changes

New: vp create e2e test workflow

  • Uses the same tgz-packaging approach as ecosystem-ci: build → pack → install vp from tgz → run vp create with VP_OVERRIDE_PACKAGES/VP_VERSION pointing to local packages
  • Each test verifies: project structure, correct lockfile, vite-plus@0.0.0 installed, vp check, and build/test commands
  • Monorepo tests run vp run ready twice and assert 100% cache hit on the second run
  • Triggered on push to main (path-filtered), PRs with test: create-e2e label, or create-related file changes

Fix: bun monorepo catalog with file: protocol

  • rewriteBunCatalog() unconditionally set all overrides to catalog: but skipped file: entries from the catalog, leaving unresolvable references
  • Now uses file: paths directly in overrides when the value starts with file:

Fix: yarn standalone projects

  • rewriteYarnrcYml() now sets nodeLinker: node-modules when absent (yarn 4 defaults to PnP)
  • rewriteStandaloneProject() now calls rewriteYarnrcYml() for yarn projects (previously only called for monorepos)
  • vp create passes --no-frozen-lockfile to vp install in CI environments

Test plan

  • All 12 matrix jobs pass in CI (3 templates × 4 package managers)
  • Existing migration tests pass (vp test run packages/cli/src/migration/)
  • New bun-catalog-file-protocol.spec.ts test verifies the bun override fix

🤖 Generated with Claude Code

@netlify
Copy link
Copy Markdown

netlify bot commented Apr 6, 2026

Deploy Preview for viteplus-preview canceled.

Name Link
🔨 Latest commit f47d2a4
🔍 Latest deploy log https://app.netlify.com/projects/viteplus-preview/deploys/69d4b4b03845720008766e4a

Copy link
Copy Markdown
Member Author

fengmk2 commented Apr 6, 2026


How to use the Graphite Merge Queue

Add the label auto-merge to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@fengmk2 fengmk2 force-pushed the add-vp-create-e2e branch from b6bb893 to fe223c7 Compare April 6, 2026 08:25
@fengmk2 fengmk2 self-assigned this Apr 6, 2026
@fengmk2 fengmk2 force-pushed the add-vp-create-e2e branch from 79206b2 to a938cf5 Compare April 6, 2026 09:19
@fengmk2 fengmk2 changed the title ci: add e2e tests for vp create across all templates and package managers feat(ci): add vp create e2e tests and fix yarn/bun migration bugs Apr 6, 2026
@fengmk2 fengmk2 added the test: e2e Auto run e2e tests label Apr 6, 2026 — with Graphite App
@fengmk2 fengmk2 force-pushed the add-vp-create-e2e branch from 7de2e6c to 174331e Compare April 7, 2026 02:08
@fengmk2 fengmk2 changed the title feat(ci): add vp create e2e tests and fix yarn/bun migration bugs fix(ci): add vp create e2e tests and fix yarn/bun migration bugs Apr 7, 2026
@fengmk2 fengmk2 changed the title fix(ci): add vp create e2e tests and fix yarn/bun migration bugs fix(create): add vp create e2e tests and fix yarn/bun migration bugs Apr 7, 2026
@fengmk2 fengmk2 marked this pull request as ready for review April 7, 2026 02:43
@fengmk2 fengmk2 requested review from branchseer and cpojer April 7, 2026 02:43
@graphite-app
Copy link
Copy Markdown

graphite-app bot commented Apr 7, 2026

Merge activity

…1317)

## Summary

Motivated by #1297 the `.yarnrc` template fix revealed that `vp create` had no e2e test coverage, making it easy for template bugs to ship undetected.

- Add a new GitHub Actions workflow (`test-vp-create.yml`) that e2e tests `vp create` across all 3 built-in templates (monorepo, application, library) and all 4 package managers (pnpm, npm, yarn, bun) — 12 test combinations
- Fix bun monorepo migration writing empty `catalog` with dangling `catalog:` references when using `file:` protocol
- Fix yarn standalone projects missing `.yarnrc.yml` with `nodeLinker: node-modules`
- Pass `--no-frozen-lockfile` from `vp create` in CI so yarn Berry can create fresh lockfiles

## Changes

### New: `vp create` e2e test workflow

- Uses the same tgz-packaging approach as ecosystem-ci: build → pack → install vp from tgz → run `vp create` with `VP_OVERRIDE_PACKAGES`/`VP_VERSION` pointing to local packages
- Each test verifies: project structure, correct lockfile, `vite-plus@0.0.0` installed, `vp check`, and build/test commands
- Monorepo tests run `vp run ready` twice and assert 100% cache hit on the second run
- Triggered on push to main (path-filtered), PRs with `test: create-e2e` label, or create-related file changes

### Fix: bun monorepo catalog with `file:` protocol

- `rewriteBunCatalog()` unconditionally set all overrides to `catalog:` but skipped `file:` entries from the catalog, leaving unresolvable references
- Now uses `file:` paths directly in overrides when the value starts with `file:`

### Fix: yarn standalone projects

- `rewriteYarnrcYml()` now sets `nodeLinker: node-modules` when absent (yarn 4 defaults to PnP)
- `rewriteStandaloneProject()` now calls `rewriteYarnrcYml()` for yarn projects (previously only called for monorepos)
- `vp create` passes `--no-frozen-lockfile` to `vp install` in CI environments

## Test plan

- [x] All 12 matrix jobs pass in CI (3 templates × 4 package managers)
- [x] Existing migration tests pass (`vp test run packages/cli/src/migration/`)
- [x] New `bun-catalog-file-protocol.spec.ts` test verifies the bun override fix

🤖 Generated with [Claude Code](https://claude.com/claude-code)
@graphite-app graphite-app bot force-pushed the add-vp-create-e2e branch from 365569e to f47d2a4 Compare April 7, 2026 07:39
@graphite-app graphite-app bot merged commit f47d2a4 into main Apr 7, 2026
84 checks passed
@graphite-app graphite-app bot deleted the add-vp-create-e2e branch April 7, 2026 07:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test: e2e Auto run e2e tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants