Skip to content

ci: add e2e tests for vp create across all templates and package managers#1317

Draft
fengmk2 wants to merge 8 commits intomainfrom
add-vp-create-e2e
Draft

ci: add e2e tests for vp create across all templates and package managers#1317
fengmk2 wants to merge 8 commits intomainfrom
add-vp-create-e2e

Conversation

@fengmk2
Copy link
Copy Markdown
Member

@fengmk2 fengmk2 commented Apr 6, 2026

Test all 3 built-in templates (monorepo, application, library) with all
4 package managers (pnpm, npm, yarn, bun) using the same tgz-packaging
approach as ecosystem-ci. Each test verifies project structure, lockfiles,
local package installation, and successful builds.

@netlify
Copy link
Copy Markdown

netlify bot commented Apr 6, 2026

Deploy Preview for viteplus-preview canceled.

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

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.

outputs:
related-files-changed: ${{ steps.filter.outputs.related-files }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
@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 added 6 commits April 6, 2026 17:19
…nagers

Test all 3 built-in templates (monorepo, application, library) with all
4 package managers (pnpm, npm, yarn, bun) using the same tgz-packaging
approach as ecosystem-ci. Each test verifies project structure, lockfiles,
local package installation, and successful builds.
Split template-args from create-args so --package-manager is placed
before the -- separator. Move VP_OVERRIDE_PACKAGES/VP_VERSION to
job-level env. Add ls -la for debugging lockfile issues.
- Add VP_FORCE_MIGRATE=1 so the library template's existing vite-plus
  dep gets overridden with the local tgz (fixes all 4 library tests)
- Exclude yarn (all templates): yarn install fails with absolute file:
  paths to tgz files
- Exclude bun monorepo: migration writes empty catalog with catalog:
  references when using file: protocol
…empty catalog

When VP_OVERRIDE_PACKAGES uses file: protocol paths (e.g., in CI with
local tgz packages), rewriteBunCatalog() was unconditionally setting all
overrides to 'catalog:' while skipping file: entries from the catalog
itself, resulting in unresolvable 'catalog:' references pointing to an
empty catalog.

Now file: paths are used directly in overrides, matching npm behavior.
Two issues caused yarn install to fail in CI for newly created projects:

1. In CI (CI=true), yarn Berry defaults to enableImmutableInstalls which
   prevents creating a new lockfile. Pass --no-frozen-lockfile to
   vp install since vp create always needs to generate a fresh lockfile.

2. Standalone yarn projects had no .yarnrc.yml created during migration.
   Without nodeLinker: node-modules, yarn 4 defaults to PnP which
   doesn't work with vite-plus. Now rewriteYarnrcYml() ensures
   nodeLinker is set and is called for standalone projects too.

Also removes all yarn exclusions from the create e2e test workflow
(full 12-job matrix now enabled).
@fengmk2 fengmk2 force-pushed the add-vp-create-e2e branch from 79206b2 to a938cf5 Compare April 6, 2026 09:19
fengmk2 added 2 commits April 6, 2026 17:23
… .yarnrc.yml

Revert passing --no-frozen-lockfile to vp install from vp create.
Instead, set enableImmutableInstalls: false in .yarnrc.yml so yarn
Berry can create/update lockfiles in CI where it defaults to immutable.
Let yarn Berry use its default behavior to see what errors occur in CI
with immutable installs enabled.
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