diff --git a/code/frameworks/svelte-vite/package.json b/code/frameworks/svelte-vite/package.json index 58349131dd9c..7ea9af5e2f79 100644 --- a/code/frameworks/svelte-vite/package.json +++ b/code/frameworks/svelte-vite/package.json @@ -64,7 +64,7 @@ "vite": "^4.0.0" }, "peerDependencies": { - "@sveltejs/vite-plugin-svelte": "^2.0.0 || ^3.0.0 || ^4.0.0", + "@sveltejs/vite-plugin-svelte": "^2.0.0 || ^3.0.0 || ^4.0.0 || ^5.0.0", "storybook": "workspace:^", "svelte": "^4.0.0 || ^5.0.0", "vite": "^4.0.0 || ^5.0.0 || ^6.0.0" diff --git a/code/yarn.lock b/code/yarn.lock index 12d9bf6dcc86..ac6a40441400 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -7430,7 +7430,7 @@ __metadata: typescript: "npm:^5.3.2" vite: "npm:^4.0.0" peerDependencies: - "@sveltejs/vite-plugin-svelte": ^2.0.0 || ^3.0.0 || ^4.0.0 + "@sveltejs/vite-plugin-svelte": ^2.0.0 || ^3.0.0 || ^4.0.0 || ^5.0.0 storybook: "workspace:^" svelte: ^4.0.0 || ^5.0.0 vite: ^4.0.0 || ^5.0.0 || ^6.0.0 diff --git a/scripts/tasks/sandbox-parts.ts b/scripts/tasks/sandbox-parts.ts index 72a362c86f12..5f4991644cdf 100644 --- a/scripts/tasks/sandbox-parts.ts +++ b/scripts/tasks/sandbox-parts.ts @@ -89,7 +89,7 @@ export const install: Task['run'] = async ({ sandboxDir, key }, { link, dryRun, dryRun, debug, }); - await addWorkaroundResolutions({ cwd, dryRun, debug }); + await addWorkaroundResolutions({ cwd, dryRun, debug, key }); } else { // We need to add package resolutions to ensure that we only ever install the latest version // of any storybook packages as verdaccio is not able to both proxy to npm and publish over diff --git a/scripts/utils/yarn.ts b/scripts/utils/yarn.ts index 505ddf3a78b4..142432fa6354 100644 --- a/scripts/utils/yarn.ts +++ b/scripts/utils/yarn.ts @@ -94,7 +94,7 @@ export const addWorkaroundResolutions = async ({ '@testing-library/user-event': '^14.5.2', }; - if (key.includes('svelte-kit')) { + if (key?.includes('svelte-kit')) { packageJson.resolutions['@sveltejs/vite-plugin-svelte'] = '^3.0.0'; }