diff --git a/.circleci/config.yml b/.circleci/config.yml index 6709cc29daf3..726de8a63c20 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -459,6 +459,11 @@ jobs: template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task bench) workflows: + docs: + when: + equal: [docs, << pipeline.parameters.workflow >>] + jobs: + - pretty-docs normal: when: equal: [normal, << pipeline.parameters.workflow >>] diff --git a/.github/workflows/trigger-circle-ci-workflow.yml b/.github/workflows/trigger-circle-ci-workflow.yml index 2547a08218a3..c8c8a4c0af9c 100644 --- a/.github/workflows/trigger-circle-ci-workflow.yml +++ b/.github/workflows/trigger-circle-ci-workflow.yml @@ -55,6 +55,25 @@ jobs: env: CIRCLE_CI_TOKEN: ${{ secrets.CIRCLE_CI_TOKEN }} BRANCH: ${{ needs.get-branch.outputs.branch }} + trigger-docs-tests: + runs-on: ubuntu-latest + needs: get-branch + if: github.event_name == 'pull_request_target' && contains(github.event.pull_request.labels.*.name, 'ci:docs') + steps: + - name: Trigger docs tests + run: > + curl -X POST --location "https://circleci.com/api/v2/project/gh/storybookjs/storybook/pipeline" \ + -H "Content-Type: application/json" \ + -H "Circle-Token: $CIRCLE_CI_TOKEN" \ + -d '{ + "branch": "'"$BRANCH"'", + "parameters": { + "workflow": "docs" + } + }' + env: + CIRCLE_CI_TOKEN: ${{ secrets.CIRCLE_CI_TOKEN }} + BRANCH: ${{ needs.get-branch.outputs.branch }} trigger-merged-tests: runs-on: ubuntu-latest needs: get-branch diff --git a/code/addons/interactions/package.json b/code/addons/interactions/package.json index d8757d87f486..7c908a9fa483 100644 --- a/code/addons/interactions/package.json +++ b/code/addons/interactions/package.json @@ -82,7 +82,7 @@ "@storybook/preview-api": "7.2.0-alpha.0", "@storybook/theming": "7.2.0-alpha.0", "@storybook/types": "7.2.0-alpha.0", - "jest-mock": "^29.5.0", + "jest-mock": "^27.0.6", "polished": "^4.2.2", "ts-dedent": "^2.2.0" }, diff --git a/code/frameworks/vue3-vite/src/preset.ts b/code/frameworks/vue3-vite/src/preset.ts index faa7ecc49a1a..b987f0381c0b 100644 --- a/code/frameworks/vue3-vite/src/preset.ts +++ b/code/frameworks/vue3-vite/src/preset.ts @@ -17,7 +17,7 @@ export const viteFinal: StorybookConfig['viteFinal'] = async (config, { presets const plugins: PluginOption[] = []; // Add vue plugin if not present - if (!(await hasVitePlugins(config.plugins, ['vite:vue']))) { + if (!(config.plugins && (await hasVitePlugins(config.plugins, ['vite:vue'])))) { const { default: vue } = await import('@vitejs/plugin-vue'); plugins.push(vue()); } diff --git a/code/frameworks/vue3-vite/tsconfig.json b/code/frameworks/vue3-vite/tsconfig.json index 5a2a397f2eb4..bbd5d9a38f99 100644 --- a/code/frameworks/vue3-vite/tsconfig.json +++ b/code/frameworks/vue3-vite/tsconfig.json @@ -5,7 +5,7 @@ "types": ["node"], "skipLibCheck": true, "resolveJsonModule": true, - "strict": false + "strict": true }, "include": ["src/**/*"] } diff --git a/code/lib/cli/package.json b/code/lib/cli/package.json index 15bf5281ef0c..45efe474e41e 100644 --- a/code/lib/cli/package.json +++ b/code/lib/cli/package.json @@ -89,7 +89,7 @@ "puppeteer-core": "^2.1.1", "read-pkg-up": "^7.0.1", "semver": "^7.3.7", - "simple-update-notifier": "^1.0.0", + "simple-update-notifier": "^2.0.0", "strip-json-comments": "^3.0.1", "tempy": "^1.0.1", "ts-dedent": "^2.0.0", diff --git a/code/lib/types/src/modules/core-common.ts b/code/lib/types/src/modules/core-common.ts index 24f4d8c8f9ce..7467b1bfd1f7 100644 --- a/code/lib/types/src/modules/core-common.ts +++ b/code/lib/types/src/modules/core-common.ts @@ -235,7 +235,7 @@ export type Entry = string; type CoreCommon_StorybookRefs = Record< string, - { title: string; url: string } | { disable: boolean } + { title: string; url: string } | { disable: boolean; expanded?: boolean } >; export type DocsOptions = { diff --git a/code/yarn.lock b/code/yarn.lock index 37878ba61ee4..33778d0884ec 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -5761,7 +5761,7 @@ __metadata: "@storybook/types": 7.2.0-alpha.0 "@types/node": ^16.0.0 formik: ^2.2.9 - jest-mock: ^29.5.0 + jest-mock: ^27.0.6 polished: ^4.2.2 ts-dedent: ^2.2.0 typescript: ~4.9.3 @@ -6459,7 +6459,7 @@ __metadata: puppeteer-core: ^2.1.1 read-pkg-up: ^7.0.1 semver: ^7.3.7 - simple-update-notifier: ^1.0.0 + simple-update-notifier: ^2.0.0 slash: ^5.0.0 strip-json-comments: ^3.1.1 tempy: ^1.0.1 @@ -19787,7 +19787,7 @@ __metadata: languageName: node linkType: hard -"jest-mock@npm:^27.3.0": +"jest-mock@npm:^27.0.6, jest-mock@npm:^27.3.0": version: 27.5.1 resolution: "jest-mock@npm:27.5.1" dependencies: @@ -19797,7 +19797,7 @@ __metadata: languageName: node linkType: hard -"jest-mock@npm:^29.5.0, jest-mock@npm:^29.6.1": +"jest-mock@npm:^29.6.1": version: 29.6.1 resolution: "jest-mock@npm:29.6.1" dependencies: @@ -27883,15 +27883,6 @@ __metadata: languageName: node linkType: hard -"semver@npm:~7.0.0": - version: 7.0.0 - resolution: "semver@npm:7.0.0" - bin: - semver: bin/semver.js - checksum: 7fd341680a967a0abfd66f3a7d36ba44e52ff5d3e799e9a6cdb01a68160b64ef09be82b4af05459effeecdd836f002c2462555d2821cd890dfdfe36a0d9f56a5 - languageName: node - linkType: hard - "send@npm:0.18.0": version: 0.18.0 resolution: "send@npm:0.18.0" @@ -28116,12 +28107,12 @@ __metadata: languageName: node linkType: hard -"simple-update-notifier@npm:^1.0.0": - version: 1.1.0 - resolution: "simple-update-notifier@npm:1.1.0" +"simple-update-notifier@npm:^2.0.0": + version: 2.0.0 + resolution: "simple-update-notifier@npm:2.0.0" dependencies: - semver: ~7.0.0 - checksum: 3cbbbc71a5d9a2924f0e3f42fbf3cbe1854bfe142203456b00d5233bdbbdeb5091b8067cd34fb00f81dbfbc29fc30dbb6e026b3d58ea0551e3f26c0e64082092 + semver: ^7.5.3 + checksum: 2a00bd03bfbcbf8a737c47ab230d7920f8bfb92d1159d421bdd194479f6d01ebc995d13fbe13d45dace23066a78a3dc6642999b4e3b38b847e6664191575b20c languageName: node linkType: hard diff --git a/docs/snippets/react/component-story-highlight-addon.js.mdx b/docs/snippets/react/component-story-highlight-addon.js.mdx index b558cb4e3324..b4779176d2c5 100644 --- a/docs/snippets/react/component-story-highlight-addon.js.mdx +++ b/docs/snippets/react/component-story-highlight-addon.js.mdx @@ -8,11 +8,11 @@ import { Card } from './Card'; export default { /* 👇 The title prop is optional. - * See https://storybook.js.org/docs/react/configure/overview#configure-story-loading - * to learn how to generate automatic titles - */ + * See https://storybook.js.org/docs/react/configure/overview#configure-story-loading + * to learn how to generate automatic titles + */ title: 'Card', - component: Card + component: Card, }; export const Default = () => ; diff --git a/docs/snippets/vue/component-story-highlight-addon.js.mdx b/docs/snippets/vue/component-story-highlight-addon.js.mdx index 5f1b88376f60..693c23ee9c1c 100644 --- a/docs/snippets/vue/component-story-highlight-addon.js.mdx +++ b/docs/snippets/vue/component-story-highlight-addon.js.mdx @@ -7,11 +7,11 @@ import { Card } from './Card.vue'; export default { /* 👇 The title prop is optional. - * See https://storybook.js.org/docs/angular/configure/overview#configure-story-loading - * to learn how to generate automatic titles - */ + * See https://storybook.js.org/docs/angular/configure/overview#configure-story-loading + * to learn how to generate automatic titles + */ title: 'Card', - component: Card + component: Card, }; export const Default: Story = (args) => ({ diff --git a/scripts/dangerfile.ts b/scripts/dangerfile.ts index 6e8c5a2536ae..7b87377c0cd3 100644 --- a/scripts/dangerfile.ts +++ b/scripts/dangerfile.ts @@ -17,7 +17,7 @@ const Versions = { MAJOR: 'MAJOR', }; -const ciLabels = ['ci:normal', 'ci:merged', 'ci:daily']; +const ciLabels = ['ci:normal', 'ci:merged', 'ci:daily', 'ci:docs']; const branchVersion = Versions.MINOR;