Skip to content

Commit 8357448

Browse files
committed
fix: limit inertia to v2 temporarily
1 parent 3e5c96d commit 8357448

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/ViewInstallCommand.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ protected function installReact()
150150

151151
$this->writeln("📦 <info>Installing react...</info>\n");
152152

153-
if (!sprout()->npm($this->option('pm'))->install('@leafphp/vite-plugin @vitejs/plugin-react@^5.0 @inertiajs/react react@18 react-dom@18')->isSuccessful()) {
153+
if (!sprout()->npm($this->option('pm'))->install('@leafphp/vite-plugin @vitejs/plugin-react@^5.0 @inertiajs/react@^2.0 react@18 react-dom@18')->isSuccessful()) {
154154
$this->writeln('❌ <error>Failed to install react</error>');
155155

156156
return 1;
@@ -214,7 +214,7 @@ protected function installSvelte()
214214

215215
$this->writeln("📦 <info>Installing svelte...</info>\n");
216216

217-
if (!sprout()->npm($this->option('pm'))->install('@leafphp/vite-plugin svelte @sveltejs/vite-plugin-svelte@^6.0 @inertiajs/svelte')->isSuccessful()) {
217+
if (!sprout()->npm($this->option('pm'))->install('@leafphp/vite-plugin svelte @sveltejs/vite-plugin-svelte@^6.0 @inertiajs/svelte@^2.0')->isSuccessful()) {
218218
$this->writeln('❌ <error>Failed to install svelte</error>');
219219

220220
return 1;
@@ -392,7 +392,7 @@ protected function installVue()
392392

393393
$this->writeln("📦 <info>Installing Vue...</info>\n");
394394

395-
if (!sprout()->npm($this->option('pm'))->install('@leafphp/vite-plugin @vitejs/plugin-vue@^6.0 @inertiajs/vue3@^1.0 vue')->isSuccessful()) {
395+
if (!sprout()->npm($this->option('pm'))->install('@leafphp/vite-plugin @vitejs/plugin-vue@^6.0 @inertiajs/vue3@^2.0 vue')->isSuccessful()) {
396396
$this->writeln('❌ <error>Failed to install Vue</error>');
397397

398398
return 1;

tests/commands.test.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@
120120

121121
foreach ($matches[1] as $packageList) {
122122
foreach (explode(' ', $packageList) as $package) {
123-
if (preg_match('/^(@vitejs\/|@sveltejs\/|vite$)/', $package)) {
123+
if (preg_match('/^(@vitejs\/|@sveltejs\/|@inertiajs\/|vite$)/', $package)) {
124124
expect($package)->toContain('@^');
125125
}
126126
}

0 commit comments

Comments
 (0)