Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add missing peer deps #500

Merged
merged 4 commits into from
Sep 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions examples/lit-ts/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2627,10 +2627,19 @@ __metadata:
sveltedoc-parser: ^4.2.1
peerDependencies:
"@storybook/mdx2-csf": ^0.0.3
"@sveltejs/vite-plugin-svelte": ^1.0.0
"@vitejs/plugin-vue": ^3.0.0
vite: ">= 3.0.0"
vue-docgen-api: ^4.40.0
peerDependenciesMeta:
"@storybook/mdx2-csf":
optional: true
"@sveltejs/vite-plugin-svelte":
optional: true
"@vitejs/plugin-vue":
optional: true
vue-docgen-api:
optional: true
languageName: node
linkType: soft

Expand Down
9 changes: 9 additions & 0 deletions examples/preact/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2650,10 +2650,19 @@ __metadata:
sveltedoc-parser: ^4.2.1
peerDependencies:
"@storybook/mdx2-csf": ^0.0.3
"@sveltejs/vite-plugin-svelte": ^1.0.0
"@vitejs/plugin-vue": ^3.0.0
vite: ">= 3.0.0"
vue-docgen-api: ^4.40.0
peerDependenciesMeta:
"@storybook/mdx2-csf":
optional: true
"@sveltejs/vite-plugin-svelte":
optional: true
"@vitejs/plugin-vue":
optional: true
vue-docgen-api:
optional: true
languageName: node
linkType: soft

Expand Down
9 changes: 9 additions & 0 deletions examples/react-18/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2706,10 +2706,19 @@ __metadata:
sveltedoc-parser: ^4.2.1
peerDependencies:
"@storybook/mdx2-csf": ^0.0.3
"@sveltejs/vite-plugin-svelte": ^1.0.0
"@vitejs/plugin-vue": ^3.0.0
vite: ">= 3.0.0"
vue-docgen-api: ^4.40.0
peerDependenciesMeta:
"@storybook/mdx2-csf":
optional: true
"@sveltejs/vite-plugin-svelte":
optional: true
"@vitejs/plugin-vue":
optional: true
vue-docgen-api:
optional: true
languageName: node
linkType: soft

Expand Down
9 changes: 9 additions & 0 deletions examples/react-ts/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2725,10 +2725,19 @@ __metadata:
sveltedoc-parser: ^4.2.1
peerDependencies:
"@storybook/mdx2-csf": ^0.0.3
"@sveltejs/vite-plugin-svelte": ^1.0.0
"@vitejs/plugin-vue": ^3.0.0
vite: ">= 3.0.0"
vue-docgen-api: ^4.40.0
peerDependenciesMeta:
"@storybook/mdx2-csf":
optional: true
"@sveltejs/vite-plugin-svelte":
optional: true
"@vitejs/plugin-vue":
optional: true
vue-docgen-api:
optional: true
languageName: node
linkType: soft

Expand Down
9 changes: 9 additions & 0 deletions examples/react/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2731,10 +2731,19 @@ __metadata:
sveltedoc-parser: ^4.2.1
peerDependencies:
"@storybook/mdx2-csf": ^0.0.3
"@sveltejs/vite-plugin-svelte": ^1.0.0
"@vitejs/plugin-vue": ^3.0.0
vite: ">= 3.0.0"
vue-docgen-api: ^4.40.0
peerDependenciesMeta:
"@storybook/mdx2-csf":
optional: true
"@sveltejs/vite-plugin-svelte":
optional: true
"@vitejs/plugin-vue":
optional: true
vue-docgen-api:
optional: true
languageName: node
linkType: soft

Expand Down
9 changes: 9 additions & 0 deletions examples/svelte/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2636,10 +2636,19 @@ __metadata:
sveltedoc-parser: ^4.2.1
peerDependencies:
"@storybook/mdx2-csf": ^0.0.3
"@sveltejs/vite-plugin-svelte": ^1.0.0
"@vitejs/plugin-vue": ^3.0.0
vite: ">= 3.0.0"
vue-docgen-api: ^4.40.0
peerDependenciesMeta:
"@storybook/mdx2-csf":
optional: true
"@sveltejs/vite-plugin-svelte":
optional: true
"@vitejs/plugin-vue":
optional: true
vue-docgen-api:
optional: true
languageName: node
linkType: soft

Expand Down
9 changes: 9 additions & 0 deletions examples/vue2.6/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2724,10 +2724,19 @@ __metadata:
sveltedoc-parser: ^4.2.1
peerDependencies:
"@storybook/mdx2-csf": ^0.0.3
"@sveltejs/vite-plugin-svelte": ^1.0.0
"@vitejs/plugin-vue": ^3.0.0
vite: ">= 3.0.0"
vue-docgen-api: ^4.40.0
peerDependenciesMeta:
"@storybook/mdx2-csf":
optional: true
"@sveltejs/vite-plugin-svelte":
optional: true
"@vitejs/plugin-vue":
optional: true
vue-docgen-api:
optional: true
languageName: node
linkType: soft

Expand Down
9 changes: 9 additions & 0 deletions examples/vue2.7/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2724,10 +2724,19 @@ __metadata:
sveltedoc-parser: ^4.2.1
peerDependencies:
"@storybook/mdx2-csf": ^0.0.3
"@sveltejs/vite-plugin-svelte": ^1.0.0
"@vitejs/plugin-vue": ^3.0.0
vite: ">= 3.0.0"
vue-docgen-api: ^4.40.0
peerDependenciesMeta:
"@storybook/mdx2-csf":
optional: true
"@sveltejs/vite-plugin-svelte":
optional: true
"@vitejs/plugin-vue":
optional: true
vue-docgen-api:
optional: true
languageName: node
linkType: soft

Expand Down
9 changes: 9 additions & 0 deletions examples/vue3/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2889,10 +2889,19 @@ __metadata:
sveltedoc-parser: ^4.2.1
peerDependencies:
"@storybook/mdx2-csf": ^0.0.3
"@sveltejs/vite-plugin-svelte": ^1.0.0
"@vitejs/plugin-vue": ^3.0.0
vite: ">= 3.0.0"
vue-docgen-api: ^4.40.0
peerDependenciesMeta:
"@storybook/mdx2-csf":
optional: true
"@sveltejs/vite-plugin-svelte":
optional: true
"@vitejs/plugin-vue":
optional: true
vue-docgen-api:
optional: true
languageName: node
linkType: soft

Expand Down
9 changes: 9 additions & 0 deletions examples/workspaces/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2706,10 +2706,19 @@ __metadata:
sveltedoc-parser: ^4.2.1
peerDependencies:
"@storybook/mdx2-csf": ^0.0.3
"@sveltejs/vite-plugin-svelte": ^1.0.0
"@vitejs/plugin-vue": ^3.0.0
vite: ">= 3.0.0"
vue-docgen-api: ^4.40.0
peerDependenciesMeta:
"@storybook/mdx2-csf":
optional: true
"@sveltejs/vite-plugin-svelte":
optional: true
"@vitejs/plugin-vue":
optional: true
vue-docgen-api:
optional: true
languageName: node
linkType: soft

Expand Down
14 changes: 13 additions & 1 deletion packages/builder-vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,23 @@
},
"peerDependencies": {
"@storybook/mdx2-csf": "^0.0.3",
"vite": ">= 3.0.0"
"@sveltejs/vite-plugin-svelte": "^1.0.0",
"@vitejs/plugin-vue": "^3.0.0",
"vite": ">= 3.0.0",
"vue-docgen-api": "^4.40.0"
},
"peerDependenciesMeta": {
"@storybook/mdx2-csf": {
"optional": true
},
"@sveltejs/vite-plugin-svelte": {
"optional": true
},
"@vitejs/plugin-vue": {
"optional": true
},
"vue-docgen-api": {
"optional": true
}
},
"publishConfig": {
Expand Down
31 changes: 27 additions & 4 deletions packages/builder-vite/vite-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,6 @@ export async function pluginConfig(options: ExtendedOptions, _type: PluginConfig
try {
const vuePlugin = is27 ? require('@vitejs/plugin-vue2') : require('vite-plugin-vue2').createVuePlugin;
plugins.push(vuePlugin());
const { vueDocgen } = await import('./plugins/vue-docgen');
plugins.push(vueDocgen(2));
} catch (err) {
if ((err as NodeJS.ErrnoException).code === 'MODULE_NOT_FOUND') {
throw new Error(`
Expand All @@ -104,14 +102,25 @@ export async function pluginConfig(options: ExtendedOptions, _type: PluginConfig
}
throw err;
}
try {
const { vueDocgen } = await import('./plugins/vue-docgen');
plugins.push(vueDocgen(2));
} catch (err) {
if ((err as NodeJS.ErrnoException).code === 'MODULE_NOT_FOUND') {
throw new Error(
'@storybook/builder-vite requires vue-docgen-api to be installed ' +
'when using @storybook/vue.' +
' Please install it and start storybook again.'
);
}
throw err;
}
}

if (framework === 'vue3') {
try {
const vuePlugin = require('@vitejs/plugin-vue');
plugins.push(vuePlugin());
const { vueDocgen } = await import('./plugins/vue-docgen');
plugins.push(vueDocgen(3));
} catch (err) {
if ((err as NodeJS.ErrnoException).code === 'MODULE_NOT_FOUND') {
throw new Error(`
Expand All @@ -121,6 +130,20 @@ export async function pluginConfig(options: ExtendedOptions, _type: PluginConfig
}
throw err;
}

try {
const { vueDocgen } = await import('./plugins/vue-docgen');
plugins.push(vueDocgen(3));
} catch (err) {
if ((err as NodeJS.ErrnoException).code === 'MODULE_NOT_FOUND') {
throw new Error(
'@storybook/builder-vite requires vue-docgen-api to be installed ' +
'when using @storybook/vue3.' +
' Please install it and start storybook again.'
);
}
throw err;
}
}

if (framework === 'svelte') {
Expand Down
9 changes: 9 additions & 0 deletions packages/builder-vite/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1982,10 +1982,19 @@ __metadata:
vue-template-compiler: ^2.7.10
peerDependencies:
"@storybook/mdx2-csf": ^0.0.3
"@sveltejs/vite-plugin-svelte": ^1.0.0
"@vitejs/plugin-vue": ^3.0.0
vite: ">= 3.0.0"
vue-docgen-api: ^4.40.0
peerDependenciesMeta:
"@storybook/mdx2-csf":
optional: true
"@sveltejs/vite-plugin-svelte":
optional: true
"@vitejs/plugin-vue":
optional: true
vue-docgen-api:
optional: true
languageName: unknown
linkType: soft

Expand Down