Skip to content

[6.x] Update setup-cp-vite to install Vite 8#14559

Merged
jasonvarga merged 1 commit into6.xfrom
setup-cp-vite-8
Apr 27, 2026
Merged

[6.x] Update setup-cp-vite to install Vite 8#14559
jasonvarga merged 1 commit into6.xfrom
setup-cp-vite-8

Conversation

@jasonvarga
Copy link
Copy Markdown
Member

Fixes #14558.

A fresh install of Statamic uses Vite 8, but running statamic:setup-cp-vite was regressing the version back to Vite 7.

Changes

  • Bumped the version installed by statamic:setup-cp-vite from ^7.0.4 to ^8.0.0 so it matches what the starter kit ships with.
  • Fixed the existing-dependency detection. The check used Collection::contains('vite'), which inspects values, not keys. Since dependencies/devDependencies are keyed by package name with version strings as values (e.g. "vite": "^8.0.0"), the check always evaluated to false and the command always overwrote whatever version was already installed. Switched to Collection::has() so an existing vite (or @statamic/cms) dependency is left alone. This is what was causing the silent regression on fresh installs.
  • Added a regression test covering the case where both packages are already present.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@jasonvarga jasonvarga merged commit d7e863b into 6.x Apr 27, 2026
18 checks passed
@jasonvarga jasonvarga deleted the setup-cp-vite-8 branch April 27, 2026 21:33
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.

Vite version regression with setup-cp-vite

1 participant