From d4504f108058e667afeddf38c4ff9d3dcf0d1e5b Mon Sep 17 00:00:00 2001 From: Kasper Peulen Date: Thu, 20 Apr 2023 12:00:48 +0200 Subject: [PATCH 001/115] Build: Migrate @storybook/addon-backgrounds to strict-ts --- .../backgrounds/src/containers/BackgroundSelector.tsx | 6 +++--- code/addons/backgrounds/src/helpers/index.ts | 8 ++++---- code/addons/backgrounds/src/types/index.ts | 2 +- code/addons/backgrounds/tsconfig.json | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/code/addons/backgrounds/src/containers/BackgroundSelector.tsx b/code/addons/backgrounds/src/containers/BackgroundSelector.tsx index 078a2752a5e3..d941f178b788 100644 --- a/code/addons/backgrounds/src/containers/BackgroundSelector.tsx +++ b/code/addons/backgrounds/src/containers/BackgroundSelector.tsx @@ -18,10 +18,10 @@ import { getBackgroundColorByName } from '../helpers'; const createBackgroundSelectorItem = memoize(1000)( ( - id: string, + id: string | null, name: string, value: string, - hasSwatch: boolean, + hasSwatch: boolean | null, change: (arg: { selected: string; name: string }) => void, active: boolean ): BackgroundSelectorItem => ({ @@ -102,7 +102,7 @@ export const BackgroundSelector: FC = memo(function BackgroundSelector() { } const onBackgroundChange = useCallback( - (value: string) => { + (value: string | undefined) => { updateGlobals({ [BACKGROUNDS_PARAM_KEY]: { ...globals[BACKGROUNDS_PARAM_KEY], value } }); }, [backgroundsConfig, globals, updateGlobals] diff --git a/code/addons/backgrounds/src/helpers/index.ts b/code/addons/backgrounds/src/helpers/index.ts index 39065eec6648..c1af13cde407 100644 --- a/code/addons/backgrounds/src/helpers/index.ts +++ b/code/addons/backgrounds/src/helpers/index.ts @@ -15,7 +15,7 @@ export const isReduceMotionEnabled = () => { export const getBackgroundColorByName = ( currentSelectedValue: string, backgrounds: Background[] = [], - defaultName: string + defaultName: string | null | undefined ): string => { if (currentSelectedValue === 'transparent') { return 'transparent'; @@ -52,7 +52,7 @@ export const clearStyles = (selector: string | string[]) => { const clearStyle = (selector: string) => { const element = document.getElementById(selector) as HTMLElement; if (element) { - element.parentElement.removeChild(element); + element.parentElement?.removeChild(element); } }; @@ -70,7 +70,7 @@ export const addGridStyle = (selector: string, css: string) => { } }; -export const addBackgroundStyle = (selector: string, css: string, storyId: string) => { +export const addBackgroundStyle = (selector: string, css: string, storyId: string | null) => { const existingStyle = document.getElementById(selector) as HTMLElement; if (existingStyle) { if (existingStyle.innerHTML !== css) { @@ -85,7 +85,7 @@ export const addBackgroundStyle = (selector: string, css: string, storyId: strin // If grids already exist, we want to add the style tag BEFORE it so the background doesn't override grid const existingGridStyle = document.getElementById(gridStyleSelector) as HTMLElement; if (existingGridStyle) { - existingGridStyle.parentElement.insertBefore(style, existingGridStyle); + existingGridStyle.parentElement?.insertBefore(style, existingGridStyle); } else { document.head.appendChild(style); } diff --git a/code/addons/backgrounds/src/types/index.ts b/code/addons/backgrounds/src/types/index.ts index f1f0285ac319..1439f4cd1329 100644 --- a/code/addons/backgrounds/src/types/index.ts +++ b/code/addons/backgrounds/src/types/index.ts @@ -20,7 +20,7 @@ export interface Background { } export interface BackgroundsParameter { - default?: string; + default?: string | null; disable?: boolean; values: Background[]; } diff --git a/code/addons/backgrounds/tsconfig.json b/code/addons/backgrounds/tsconfig.json index 4c6f20a1be4d..b5a2f9a70918 100644 --- a/code/addons/backgrounds/tsconfig.json +++ b/code/addons/backgrounds/tsconfig.json @@ -2,6 +2,6 @@ "extends": "../../tsconfig.json", "include": ["src/**/*"], "compilerOptions": { - "strict": false + "strict": true } } From 645c7cd335a8a771bceaa18166ee189725d50c9c Mon Sep 17 00:00:00 2001 From: Bruno Bufolin Date: Sun, 23 Apr 2023 18:06:44 -0300 Subject: [PATCH 002/115] fix: adjust tree node alignment when using a different font --- .../src/components/sidebar/TreeNode.tsx | 43 +++++++++++++++---- 1 file changed, 34 insertions(+), 9 deletions(-) diff --git a/code/ui/manager/src/components/sidebar/TreeNode.tsx b/code/ui/manager/src/components/sidebar/TreeNode.tsx index f71c7c0e9202..f869fb53ba67 100644 --- a/code/ui/manager/src/components/sidebar/TreeNode.tsx +++ b/code/ui/manager/src/components/sidebar/TreeNode.tsx @@ -9,7 +9,6 @@ export const CollapseIcon = styled.span<{ isExpanded: boolean }>(({ theme, isExp display: 'inline-block', width: 0, height: 0, - marginTop: 6, marginLeft: 8, marginRight: 5, color: transparentize(0.4, theme.textMutedColor), @@ -41,8 +40,6 @@ const TypeIcon = styled(Icons)<{ docsMode?: boolean }>( { width: 12, height: 12, - padding: 1, - marginTop: 3, marginRight: 5, flex: '0 0 auto', }, @@ -145,6 +142,26 @@ export const RootNode = styled.div(({ theme }) => ({ color: theme.textMutedColor, })); +const Wrapper = styled.div({ + display: 'flex', + alignItems: 'center', +}); + +const InvisibleText = styled.p({ + margin: 0, + width: 0, +}); + +// Make the content have a min-height equal to one line of text +export const IconsWrapper: FunctionComponent<{ children?: React.ReactNode }> = ({ children }) => { + return ( + +   + {children} + + ); +}; + export const GroupNode: FunctionComponent< ComponentProps & { isExpanded?: boolean; isExpandable?: boolean } > = React.memo(function GroupNode({ @@ -155,8 +172,10 @@ export const GroupNode: FunctionComponent< }) { return ( - {isExpandable ? : null} - + + {isExpandable ? : null} + + {children} ); @@ -166,8 +185,10 @@ export const ComponentNode: FunctionComponent> function ComponentNode({ theme, children, isExpanded, isExpandable, isSelected, ...props }) { return ( - {isExpandable && } - + + {isExpandable && } + + {children} ); @@ -179,7 +200,9 @@ export const DocumentNode: FunctionComponent< > = React.memo(function DocumentNode({ theme, children, docsMode, ...props }) { return ( - + + + {children} ); @@ -189,7 +212,9 @@ export const StoryNode: FunctionComponent> = Rea function StoryNode({ theme, children, ...props }) { return ( - + + + {children} ); From d45f0bd93ed0fe5f459caa698bd7df63cfdb180a Mon Sep 17 00:00:00 2001 From: Hikaru Yoshino Date: Wed, 26 Apr 2023 22:37:22 +0900 Subject: [PATCH 003/115] fix: use secondary-based color as background when BranchNode is hovered or focused. --- code/ui/manager/src/components/sidebar/TreeNode.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/ui/manager/src/components/sidebar/TreeNode.tsx b/code/ui/manager/src/components/sidebar/TreeNode.tsx index f71c7c0e9202..3a7b66bb39ee 100644 --- a/code/ui/manager/src/components/sidebar/TreeNode.tsx +++ b/code/ui/manager/src/components/sidebar/TreeNode.tsx @@ -75,7 +75,7 @@ const BranchNode = styled.button<{ fontSize: `${theme.typography.size.s2 - 1}px`, background: 'transparent', '&:hover, &:focus': { - background: theme.background.hoverable, + background: transparentize(0.93, theme.color.secondary), outline: 'none', }, })); From 9093fbbe040a84f9a31f9c345523867bb3a7deb0 Mon Sep 17 00:00:00 2001 From: Hikaru Yoshino Date: Wed, 26 Apr 2023 22:37:50 +0900 Subject: [PATCH 004/115] fix: use secondary-based color as background when LeafNode is hovered or focused. --- code/ui/manager/src/components/sidebar/TreeNode.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/ui/manager/src/components/sidebar/TreeNode.tsx b/code/ui/manager/src/components/sidebar/TreeNode.tsx index 3a7b66bb39ee..6814a3e7bb59 100644 --- a/code/ui/manager/src/components/sidebar/TreeNode.tsx +++ b/code/ui/manager/src/components/sidebar/TreeNode.tsx @@ -92,7 +92,7 @@ const LeafNode = styled.a<{ depth?: number }>(({ theme, depth = 0 }) => ({ background: 'transparent', '&:hover, &:focus': { outline: 'none', - background: theme.background.hoverable, + background: transparentize(0.93, theme.color.secondary), }, '&[data-selected="true"]': { color: theme.color.lightest, From 578cbbff4ba2926d08ffecd1d80055eb8dde6578 Mon Sep 17 00:00:00 2001 From: sook Date: Mon, 22 May 2023 20:25:56 +0900 Subject: [PATCH 005/115] fix: sandbox package.json when pre-existing NODE_OPTIONS value contains whitespaces --- scripts/tasks/sandbox-parts.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/tasks/sandbox-parts.ts b/scripts/tasks/sandbox-parts.ts index e32ce51214b8..63b4285c5e8c 100644 --- a/scripts/tasks/sandbox-parts.ts +++ b/scripts/tasks/sandbox-parts.ts @@ -131,7 +131,7 @@ export const install: Task['run'] = async ( } const nodeOptionsString = nodeOptions.join(' '); - const prefix = `NODE_OPTIONS="${nodeOptionsString}" STORYBOOK_TELEMETRY_URL="http://localhost:6007/event-log"`; + const prefix = `NODE_OPTIONS='${nodeOptionsString}' STORYBOOK_TELEMETRY_URL="http://localhost:6007/event-log"`; await updatePackageScripts({ cwd, From f5621205dc714499563f9cb9061f421756a1d632 Mon Sep 17 00:00:00 2001 From: Bruno Bufolin Date: Sun, 25 Jun 2023 22:52:03 -0300 Subject: [PATCH 006/115] refactor: change FunctionComponent for FC to type components --- code/ui/manager/src/components/sidebar/TreeNode.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/code/ui/manager/src/components/sidebar/TreeNode.tsx b/code/ui/manager/src/components/sidebar/TreeNode.tsx index f869fb53ba67..e6a60d0e2003 100644 --- a/code/ui/manager/src/components/sidebar/TreeNode.tsx +++ b/code/ui/manager/src/components/sidebar/TreeNode.tsx @@ -2,7 +2,7 @@ import { styled } from '@storybook/theming'; import type { Color, Theme } from '@storybook/theming'; import { Icons } from '@storybook/components'; import { transparentize } from 'polished'; -import type { FunctionComponent, ComponentProps } from 'react'; +import type { FC, ComponentProps } from 'react'; import React from 'react'; export const CollapseIcon = styled.span<{ isExpanded: boolean }>(({ theme, isExpanded }) => ({ @@ -153,7 +153,7 @@ const InvisibleText = styled.p({ }); // Make the content have a min-height equal to one line of text -export const IconsWrapper: FunctionComponent<{ children?: React.ReactNode }> = ({ children }) => { +export const IconsWrapper: FC<{ children?: React.ReactNode }> = ({ children }) => { return (   @@ -162,7 +162,7 @@ export const IconsWrapper: FunctionComponent<{ children?: React.ReactNode }> = ( ); }; -export const GroupNode: FunctionComponent< +export const GroupNode: FC< ComponentProps & { isExpanded?: boolean; isExpandable?: boolean } > = React.memo(function GroupNode({ children, @@ -181,7 +181,7 @@ export const GroupNode: FunctionComponent< ); }); -export const ComponentNode: FunctionComponent> = React.memo( +export const ComponentNode: FC> = React.memo( function ComponentNode({ theme, children, isExpanded, isExpandable, isSelected, ...props }) { return ( @@ -195,7 +195,7 @@ export const ComponentNode: FunctionComponent> } ); -export const DocumentNode: FunctionComponent< +export const DocumentNode: FC< ComponentProps & { docsMode: boolean } > = React.memo(function DocumentNode({ theme, children, docsMode, ...props }) { return ( @@ -208,7 +208,7 @@ export const DocumentNode: FunctionComponent< ); }); -export const StoryNode: FunctionComponent> = React.memo( +export const StoryNode: FC> = React.memo( function StoryNode({ theme, children, ...props }) { return ( From 5dcec37414cbde00d607a01018c89d05913fb98d Mon Sep 17 00:00:00 2001 From: serious Date: Thu, 29 Jun 2023 16:03:21 +0200 Subject: [PATCH 007/115] set file-system-cache to ^2.4.1 --- code/lib/core-common/package.json | 2 +- code/lib/types/package.json | 2 +- code/yarn.lock | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/code/lib/core-common/package.json b/code/lib/core-common/package.json index 19660af656e4..7ab6766c0ee6 100644 --- a/code/lib/core-common/package.json +++ b/code/lib/core-common/package.json @@ -52,7 +52,7 @@ "chalk": "^4.1.0", "esbuild": "^0.18.0", "esbuild-register": "^3.4.0", - "file-system-cache": "2.3.0", + "file-system-cache": "^2.4.1", "find-cache-dir": "^3.0.0", "find-up": "^5.0.0", "fs-extra": "^11.1.0", diff --git a/code/lib/types/package.json b/code/lib/types/package.json index 8065aa73f205..5ba5d4c94582 100644 --- a/code/lib/types/package.json +++ b/code/lib/types/package.json @@ -46,7 +46,7 @@ "@storybook/channels": "7.1.0-alpha.41", "@types/babel__core": "^7.0.0", "@types/express": "^4.7.0", - "file-system-cache": "2.3.0" + "file-system-cache": "^2.4.1" }, "devDependencies": { "@storybook/csf": "^0.1.0", diff --git a/code/yarn.lock b/code/yarn.lock index 938050052b72..aeb9e9e4ee4e 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -6146,7 +6146,7 @@ __metadata: chalk: ^4.1.0 esbuild: ^0.18.0 esbuild-register: ^3.4.0 - file-system-cache: 2.3.0 + file-system-cache: ^2.4.1 find-cache-dir: ^3.0.0 find-up: ^5.0.0 fs-extra: ^11.1.0 @@ -7455,7 +7455,7 @@ __metadata: "@types/babel__core": ^7.0.0 "@types/express": ^4.7.0 "@types/node": ^16.0.0 - file-system-cache: 2.3.0 + file-system-cache: ^2.4.1 typescript: ~4.9.3 languageName: unknown linkType: soft @@ -16002,13 +16002,13 @@ __metadata: languageName: node linkType: hard -"file-system-cache@npm:2.3.0": - version: 2.3.0 - resolution: "file-system-cache@npm:2.3.0" +"file-system-cache@npm:^2.4.1": + version: 2.4.1 + resolution: "file-system-cache@npm:2.4.1" dependencies: fs-extra: 11.1.1 ramda: 0.29.0 - checksum: 43de19f0db32e6546bb7abeecb1d6ea83c1eca23b38905c9415a29f6219cc9d6d87b0c1a6aca92c46a0f1bc276241a339f2f68b8aa0ca5c2eb64b6e1e3e4da01 + checksum: 7f370924f8ef547fb746797e1be7efc22464e7263fbe3e202f8103da7a9d00280ca297ff044ca8fdd8b333d01c27d4cbf8772d01a85cbc276e8450096e1e7584 languageName: node linkType: hard From 1de752eb9ea27986500c56a83e92177cb88aa0ea Mon Sep 17 00:00:00 2001 From: Bruno Bufolin Date: Thu, 29 Jun 2023 23:14:56 -0300 Subject: [PATCH 008/115] refactor: format file --- .../src/components/sidebar/TreeNode.tsx | 34 ++++++++++--------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/code/ui/manager/src/components/sidebar/TreeNode.tsx b/code/ui/manager/src/components/sidebar/TreeNode.tsx index e6a60d0e2003..879b8077852b 100644 --- a/code/ui/manager/src/components/sidebar/TreeNode.tsx +++ b/code/ui/manager/src/components/sidebar/TreeNode.tsx @@ -195,28 +195,30 @@ export const ComponentNode: FC> = React.memo( } ); -export const DocumentNode: FC< - ComponentProps & { docsMode: boolean } -> = React.memo(function DocumentNode({ theme, children, docsMode, ...props }) { - return ( - - - - - {children} - - ); -}); - -export const StoryNode: FC> = React.memo( - function StoryNode({ theme, children, ...props }) { +export const DocumentNode: FC & { docsMode: boolean }> = React.memo( + function DocumentNode({ theme, children, docsMode, ...props }) { return ( - + {children} ); } ); + +export const StoryNode: FC> = React.memo(function StoryNode({ + theme, + children, + ...props +}) { + return ( + + + + + {children} + + ); +}); From 73165b42eb6ff366356ebf6b50a8cce09c1740ee Mon Sep 17 00:00:00 2001 From: serious Date: Sun, 9 Jul 2023 13:43:55 +0200 Subject: [PATCH 009/115] set file-system-cache to ^2.4.2 --- code/lib/core-common/package.json | 2 +- code/lib/types/package.json | 2 +- code/yarn.lock | 38 ++++++++++++++++++++++++++----- 3 files changed, 34 insertions(+), 8 deletions(-) diff --git a/code/lib/core-common/package.json b/code/lib/core-common/package.json index faf92ab281cb..62f2985c2efa 100644 --- a/code/lib/core-common/package.json +++ b/code/lib/core-common/package.json @@ -52,7 +52,7 @@ "chalk": "^4.1.0", "esbuild": "^0.18.0", "esbuild-register": "^3.4.0", - "file-system-cache": "^2.4.1", + "file-system-cache": "^2.4.2", "find-cache-dir": "^3.0.0", "find-up": "^5.0.0", "fs-extra": "^11.1.0", diff --git a/code/lib/types/package.json b/code/lib/types/package.json index c2d3c45fb708..206a8dcc0aea 100644 --- a/code/lib/types/package.json +++ b/code/lib/types/package.json @@ -46,7 +46,7 @@ "@storybook/channels": "7.1.0-alpha.42", "@types/babel__core": "^7.0.0", "@types/express": "^4.7.0", - "file-system-cache": "^2.4.1" + "file-system-cache": "^2.4.2" }, "devDependencies": { "@storybook/csf": "^0.1.0", diff --git a/code/yarn.lock b/code/yarn.lock index a526d5252bcb..27f6e56e0fa8 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -6146,7 +6146,7 @@ __metadata: chalk: ^4.1.0 esbuild: ^0.18.0 esbuild-register: ^3.4.0 - file-system-cache: ^2.4.1 + file-system-cache: ^2.4.2 find-cache-dir: ^3.0.0 find-up: ^5.0.0 fs-extra: ^11.1.0 @@ -7455,7 +7455,7 @@ __metadata: "@types/babel__core": ^7.0.0 "@types/express": ^4.7.0 "@types/node": ^16.0.0 - file-system-cache: ^2.4.1 + file-system-cache: ^2.4.2 typescript: ~4.9.3 languageName: unknown linkType: soft @@ -8699,6 +8699,15 @@ __metadata: languageName: node linkType: hard +"@types/ramda@npm:0.29.3": + version: 0.29.3 + resolution: "@types/ramda@npm:0.29.3" + dependencies: + types-ramda: ^0.29.4 + checksum: 9c62a4600f5df5e65a01ffe4a470500c98f7c0d093fde47e0d4257675f1ec50effe4696cb004a6b53227948db67ea26a2345dbc91819ecc868105c0f64cecd1e + languageName: node + linkType: hard + "@types/range-parser@npm:*": version: 1.2.4 resolution: "@types/range-parser@npm:1.2.4" @@ -16002,13 +16011,14 @@ __metadata: languageName: node linkType: hard -"file-system-cache@npm:^2.4.1": - version: 2.4.1 - resolution: "file-system-cache@npm:2.4.1" +"file-system-cache@npm:^2.4.2": + version: 2.4.2 + resolution: "file-system-cache@npm:2.4.2" dependencies: + "@types/ramda": 0.29.3 fs-extra: 11.1.1 ramda: 0.29.0 - checksum: 7f370924f8ef547fb746797e1be7efc22464e7263fbe3e202f8103da7a9d00280ca297ff044ca8fdd8b333d01c27d4cbf8772d01a85cbc276e8450096e1e7584 + checksum: fe7f348b7a88501656173f82269ac509dfc7fca720aecea26dc549996c253878e6a0af302afd30ffd5eea275f6801db7d17584031c31ee4ad01e1b89db5503c6 languageName: node linkType: hard @@ -29445,6 +29455,13 @@ __metadata: languageName: node linkType: hard +"ts-toolbelt@npm:^9.6.0": + version: 9.6.0 + resolution: "ts-toolbelt@npm:9.6.0" + checksum: 838f9a2f0fe881d5065257a23b402c41315b33ff987b73db3e2b39fcb70640c4c7220e1ef118ed5676763543724fdbf4eda7b0e2c17acb667ed1401336af9f8c + languageName: node + linkType: hard + "tsconfig-paths-webpack-plugin@npm:^4.0.1": version: 4.0.1 resolution: "tsconfig-paths-webpack-plugin@npm:4.0.1" @@ -29608,6 +29625,15 @@ __metadata: languageName: node linkType: hard +"types-ramda@npm:^0.29.4": + version: 0.29.4 + resolution: "types-ramda@npm:0.29.4" + dependencies: + ts-toolbelt: ^9.6.0 + checksum: 7f73719de87ad49ffa48bdece4feb41d9707f945cad649c5bd1c0b1c2f80703d9eb90cc9003411a5af4d4eee3c0c582f8baa86af069be29e9c46f802db203825 + languageName: node + linkType: hard + "typescript@npm:^3 || ^4, typescript@npm:^4.9.3, typescript@npm:~4.9.3": version: 4.9.5 resolution: "typescript@npm:4.9.5" From c12baf29e99cab71e56d9604edc6e3dcd2d1d451 Mon Sep 17 00:00:00 2001 From: serious Date: Sun, 9 Jul 2023 21:22:04 +0200 Subject: [PATCH 010/115] file-system-cache requires @types/fs-extra as devDependency --- code/lib/core-common/package.json | 1 + code/lib/types/package.json | 1 + code/yarn.lock | 2 ++ 3 files changed, 4 insertions(+) diff --git a/code/lib/core-common/package.json b/code/lib/core-common/package.json index ceb3ad2a4e23..67977f76a0a6 100644 --- a/code/lib/core-common/package.json +++ b/code/lib/core-common/package.json @@ -67,6 +67,7 @@ "ts-dedent": "^2.0.0" }, "devDependencies": { + "@types/fs-extra": "^11.0.1", "@types/mock-fs": "^4.13.1", "@types/picomatch": "^2.3.0", "mock-fs": "^5.2.0", diff --git a/code/lib/types/package.json b/code/lib/types/package.json index 76e6c384d3e5..986415c091c9 100644 --- a/code/lib/types/package.json +++ b/code/lib/types/package.json @@ -50,6 +50,7 @@ }, "devDependencies": { "@storybook/csf": "^0.1.0", + "@types/fs-extra": "^11.0.1", "@types/node": "^16.0.0", "typescript": "~4.9.3" }, diff --git a/code/yarn.lock b/code/yarn.lock index 95a0d497f0c0..9628ecbfd11d 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -6139,6 +6139,7 @@ __metadata: "@storybook/node-logger": 7.1.0-beta.1 "@storybook/types": 7.1.0-beta.1 "@types/find-cache-dir": ^3.2.1 + "@types/fs-extra": ^11.0.1 "@types/mock-fs": ^4.13.1 "@types/node": ^16.0.0 "@types/node-fetch": ^2.6.4 @@ -7455,6 +7456,7 @@ __metadata: "@storybook/csf": ^0.1.0 "@types/babel__core": ^7.0.0 "@types/express": ^4.7.0 + "@types/fs-extra": ^11.0.1 "@types/node": ^16.0.0 file-system-cache: ^2.4.2 typescript: ~4.9.3 From 16d0156fa17306ecfc94938dc425d75917ad9944 Mon Sep 17 00:00:00 2001 From: Gavin King Date: Fri, 14 Jul 2023 11:42:28 +0200 Subject: [PATCH 011/115] search label for attribute doesn't match id of input (fixes #23463) The for attribute value was not set to match the hardcoded value used for the search input id. --- code/ui/manager/src/components/sidebar/Search.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/code/ui/manager/src/components/sidebar/Search.tsx b/code/ui/manager/src/components/sidebar/Search.tsx index 9bd4b6839954..675351ddc552 100644 --- a/code/ui/manager/src/components/sidebar/Search.tsx +++ b/code/ui/manager/src/components/sidebar/Search.tsx @@ -345,9 +345,13 @@ export const Search = React.memo<{ onBlur: () => setPlaceholder('Find components'), }); + const labelProps = getLabelProps({ + htmlFor: 'storybook-explorer-searchfield', + }); + return ( <> - Search for components + Search for components Date: Tue, 1 Aug 2023 20:34:16 +0900 Subject: [PATCH 012/115] add aliases that resolve react & react-dom to next/dist/compiled/ --- code/frameworks/nextjs/src/config/webpack.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/frameworks/nextjs/src/config/webpack.ts b/code/frameworks/nextjs/src/config/webpack.ts index a5f99fd51864..13c1a251cebe 100644 --- a/code/frameworks/nextjs/src/config/webpack.ts +++ b/code/frameworks/nextjs/src/config/webpack.ts @@ -17,6 +17,8 @@ export const configureConfig = async ({ const nextConfig = await resolveNextConfig({ baseConfig, nextConfigPath, configDir }); addScopedAlias(baseConfig, 'next/config'); + addScopedAlias(baseConfig, 'react', 'next/dist/compiled/react'); + addScopedAlias(baseConfig, 'react-dom', 'next/dist/compiled/react-dom'); setupRuntimeConfig(baseConfig, nextConfig); return nextConfig; From caf8e1be0f5beaec6a1a169376b7d1ff6153efc8 Mon Sep 17 00:00:00 2001 From: Valentin Palkovic Date: Fri, 4 Aug 2023 17:29:37 +0200 Subject: [PATCH 013/115] Remove broken dangerouslySetInnerHTML property on mounting div in InlineStory --- code/ui/blocks/src/components/Story.tsx | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/code/ui/blocks/src/components/Story.tsx b/code/ui/blocks/src/components/Story.tsx index 2718197456f1..089df560b2d8 100644 --- a/code/ui/blocks/src/components/Story.tsx +++ b/code/ui/blocks/src/components/Story.tsx @@ -64,9 +64,6 @@ const InlineStory: FunctionComponent = (props) => { }; }, [autoplay, renderStoryToElement, story]); - // We do this so React doesn't complain when we replace the span in a secondary render - const htmlContents = ``; - if (error) { return (
@@ -83,13 +80,7 @@ const InlineStory: FunctionComponent = (props) => {
         )} { min-height: ${height}; transform: translateZ(0); overflow: auto }`}
       ) : null}
       {showLoader && }
-      
+
); }; From 20a7d21cb41af58237cc2bad717e46b7a8413972 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Nuno=20Mota?= Date: Wed, 9 Aug 2023 19:56:54 +0100 Subject: [PATCH 014/115] Expand Ref for selected story --- code/ui/manager/src/components/sidebar/Refs.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/code/ui/manager/src/components/sidebar/Refs.tsx b/code/ui/manager/src/components/sidebar/Refs.tsx index a7696ee696ca..ebbbbe6d92ff 100644 --- a/code/ui/manager/src/components/sidebar/Refs.tsx +++ b/code/ui/manager/src/components/sidebar/Refs.tsx @@ -1,5 +1,5 @@ import type { FC, MutableRefObject } from 'react'; -import React, { useMemo, useState, useRef, useCallback } from 'react'; +import React, { useEffect, useMemo, useState, useRef, useCallback } from 'react'; import type { State } from '@storybook/manager-api'; import { useStorybookApi, useStorybookState } from '@storybook/manager-api'; import { styled } from '@storybook/theming'; @@ -131,6 +131,12 @@ export const Ref: FC = React. const state = getStateType(isLoading, isAuthRequired, isError, isEmpty); const [isExpanded, setExpanded] = useState(expanded); + useEffect(() => { + if (index && selectedStoryId && index[selectedStoryId]) { + setExpanded(true); + } + }, [setExpanded, index, selectedStoryId]); + const handleClick = useCallback(() => setExpanded((value) => !value), [setExpanded]); const setHighlightedItemId = useCallback( From b050b1faa2ba9b47c1ac687f30feede1c92b3fef Mon Sep 17 00:00:00 2001 From: Michael Shilman Date: Wed, 16 Aug 2023 16:49:47 +0800 Subject: [PATCH 015/115] Merge pull request #23852 from storybookjs/shilman/fix-story-indexer Index: Fix `*.story.*` CSF indexing (cherry picked from commit 377f7f9c0a022ae073ab0e93792d4e15dd88b15c) --- .../core-server/src/presets/common-preset.ts | 2 +- .../src/utils/StoryIndexGenerator.test.ts | 30 +++++++++++++++++++ .../src/utils/__mockdata__/src/F.story.ts | 7 +++++ 3 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 code/lib/core-server/src/utils/__mockdata__/src/F.story.ts diff --git a/code/lib/core-server/src/presets/common-preset.ts b/code/lib/core-server/src/presets/common-preset.ts index fcb4b5681571..7e13ade9ddf0 100644 --- a/code/lib/core-server/src/presets/common-preset.ts +++ b/code/lib/core-server/src/presets/common-preset.ts @@ -195,7 +195,7 @@ export const features = async ( }); export const csfIndexer: Indexer = { - test: /\.stories\.(m?js|ts)x?$/, + test: /\.(stories|story)\.(m?js|ts)x?$/, index: async (fileName, options) => (await readCsf(fileName, options)).parse().indexInputs, }; diff --git a/code/lib/core-server/src/utils/StoryIndexGenerator.test.ts b/code/lib/core-server/src/utils/StoryIndexGenerator.test.ts index 7110743b7003..b1097c168a86 100644 --- a/code/lib/core-server/src/utils/StoryIndexGenerator.test.ts +++ b/code/lib/core-server/src/utils/StoryIndexGenerator.test.ts @@ -99,6 +99,36 @@ describe('StoryIndexGenerator', () => { `); }); }); + describe('single file .story specifier', () => { + it('extracts stories from the right files', async () => { + const specifier: NormalizedStoriesSpecifier = normalizeStoriesEntry( + './src/F.story.ts', + options + ); + + const generator = new StoryIndexGenerator([specifier], options); + await generator.initialize(); + + expect(await generator.getIndex()).toMatchInlineSnapshot(` + Object { + "entries": Object { + "f--story-one": Object { + "id": "f--story-one", + "importPath": "./src/F.story.ts", + "name": "Story One", + "tags": Array [ + "autodocs", + "story", + ], + "title": "F", + "type": "story", + }, + }, + "v": 4, + } + `); + }); + }); describe('non-recursive specifier', () => { it('extracts stories from the right files', async () => { const specifier: NormalizedStoriesSpecifier = normalizeStoriesEntry( diff --git a/code/lib/core-server/src/utils/__mockdata__/src/F.story.ts b/code/lib/core-server/src/utils/__mockdata__/src/F.story.ts new file mode 100644 index 000000000000..bb14d42c7112 --- /dev/null +++ b/code/lib/core-server/src/utils/__mockdata__/src/F.story.ts @@ -0,0 +1,7 @@ +const component = {}; +export default { + component, + tags: ['autodocs'], +}; + +export const StoryOne = {}; From 3c34b0af3df702e1cfbeb70054edab2d5377b37b Mon Sep 17 00:00:00 2001 From: storybook-bot <32066757+storybook-bot@users.noreply.github.com> Date: Wed, 16 Aug 2023 09:12:37 +0000 Subject: [PATCH 016/115] Write changelog for 7.3.1 --- CHANGELOG.md | 4 ++++ code/package.json | 3 ++- docs/versions/latest.json | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e4a4cfb7b83..076226ae9e77 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 7.3.1 + +- Index: Fix `*.story.*` CSF indexing - [#23852](https://github.com/storybookjs/storybook/pull/23852), thanks [@shilman](https://github.com/shilman)! + ## 7.3.0 - ✨ Indexer: Introduce new experimental `indexer` API - #23691, thanks [@JReinhold](https://github.com/jreinhold)! diff --git a/code/package.json b/code/package.json index df1c2df8d920..112b9d186e04 100644 --- a/code/package.json +++ b/code/package.json @@ -326,5 +326,6 @@ "Dependency Upgrades" ] ] - } + }, + "deferredNextVersion": "7.3.1" } diff --git a/docs/versions/latest.json b/docs/versions/latest.json index 7618803cf164..52543f66851f 100644 --- a/docs/versions/latest.json +++ b/docs/versions/latest.json @@ -1 +1 @@ -{"version":"7.3.0","info":{"plain":"- Core: Improve `composeStories` typings - [#23577](https://github.com/storybookjs/storybook/pull/23577), thanks [@yannbf](https://github.com/yannbf)!"}} +{"version":"7.3.1","info":{"plain":"- Index: Fix `*.story.*` CSF indexing - [#23852](https://github.com/storybookjs/storybook/pull/23852), thanks [@shilman](https://github.com/shilman)!"}} From 2d5bbb14ea87fdb1806c20399e931c31ed52a651 Mon Sep 17 00:00:00 2001 From: storybook-bot <32066757+storybook-bot@users.noreply.github.com> Date: Wed, 16 Aug 2023 09:20:48 +0000 Subject: [PATCH 017/115] Bump version from "7.3.0" to "7.3.1" [skip ci] --- code/addons/a11y/package.json | 2 +- code/addons/actions/package.json | 2 +- code/addons/backgrounds/package.json | 2 +- code/addons/controls/package.json | 2 +- code/addons/docs/package.json | 2 +- code/addons/essentials/package.json | 2 +- code/addons/gfm/package.json | 2 +- code/addons/highlight/package.json | 2 +- code/addons/interactions/package.json | 2 +- code/addons/jest/package.json | 2 +- code/addons/links/package.json | 2 +- code/addons/measure/package.json | 2 +- code/addons/outline/package.json | 2 +- code/addons/storyshots-core/package.json | 2 +- code/addons/storyshots-puppeteer/package.json | 2 +- code/addons/storysource/package.json | 2 +- code/addons/themes/package.json | 2 +- code/addons/toolbars/package.json | 2 +- code/addons/viewport/package.json | 2 +- code/builders/builder-manager/package.json | 2 +- code/builders/builder-vite/package.json | 2 +- code/builders/builder-webpack5/package.json | 2 +- code/deprecated/addons/package.json | 2 +- .../channel-postmessage/package.json | 2 +- .../deprecated/channel-websocket/package.json | 2 +- code/deprecated/client-api/package.json | 2 +- code/deprecated/core-client/package.json | 2 +- code/deprecated/manager-api-shim/package.json | 2 +- code/deprecated/preview-web/package.json | 2 +- code/deprecated/store/package.json | 2 +- code/frameworks/angular/package.json | 2 +- code/frameworks/ember/package.json | 2 +- code/frameworks/html-vite/package.json | 2 +- code/frameworks/html-webpack5/package.json | 2 +- code/frameworks/nextjs/package.json | 2 +- code/frameworks/preact-vite/package.json | 2 +- code/frameworks/preact-webpack5/package.json | 2 +- code/frameworks/react-vite/package.json | 2 +- code/frameworks/react-webpack5/package.json | 2 +- code/frameworks/server-webpack5/package.json | 2 +- code/frameworks/svelte-vite/package.json | 2 +- code/frameworks/svelte-webpack5/package.json | 2 +- code/frameworks/sveltekit/package.json | 2 +- code/frameworks/vue-vite/package.json | 2 +- code/frameworks/vue-webpack5/package.json | 2 +- code/frameworks/vue3-vite/package.json | 2 +- code/frameworks/vue3-webpack5/package.json | 2 +- .../web-components-vite/package.json | 2 +- .../web-components-webpack5/package.json | 2 +- code/lib/channels/package.json | 2 +- code/lib/cli-sb/package.json | 2 +- code/lib/cli-storybook/package.json | 2 +- code/lib/cli/package.json | 2 +- code/lib/cli/src/versions.ts | 188 +++++++++--------- code/lib/client-logger/package.json | 2 +- code/lib/codemod/package.json | 2 +- code/lib/core-common/package.json | 2 +- code/lib/core-events/package.json | 2 +- code/lib/core-server/package.json | 2 +- code/lib/core-webpack/package.json | 2 +- code/lib/csf-plugin/package.json | 2 +- code/lib/csf-tools/package.json | 2 +- code/lib/docs-tools/package.json | 2 +- code/lib/instrumenter/package.json | 2 +- code/lib/manager-api/package.json | 2 +- code/lib/manager-api/src/version.ts | 2 +- code/lib/node-logger/package.json | 2 +- code/lib/postinstall/package.json | 2 +- code/lib/preview-api/package.json | 2 +- code/lib/preview/package.json | 2 +- code/lib/react-dom-shim/package.json | 2 +- code/lib/router/package.json | 2 +- code/lib/source-loader/package.json | 2 +- code/lib/telemetry/package.json | 2 +- code/lib/theming/package.json | 2 +- code/lib/types/package.json | 2 +- code/package.json | 5 +- code/presets/create-react-app/package.json | 2 +- code/presets/html-webpack/package.json | 2 +- code/presets/preact-webpack/package.json | 2 +- code/presets/react-webpack/package.json | 2 +- code/presets/server-webpack/package.json | 2 +- code/presets/svelte-webpack/package.json | 2 +- code/presets/vue-webpack/package.json | 2 +- code/presets/vue3-webpack/package.json | 2 +- .../web-components-webpack/package.json | 2 +- code/renderers/html/package.json | 2 +- code/renderers/preact/package.json | 2 +- code/renderers/react/package.json | 2 +- code/renderers/server/package.json | 2 +- code/renderers/svelte/package.json | 2 +- code/renderers/vue/package.json | 2 +- code/renderers/vue3/package.json | 2 +- code/renderers/web-components/package.json | 2 +- code/ui/blocks/package.json | 2 +- code/ui/components/package.json | 2 +- code/ui/manager/package.json | 2 +- 97 files changed, 191 insertions(+), 192 deletions(-) diff --git a/code/addons/a11y/package.json b/code/addons/a11y/package.json index 76c2879662be..6edadb788dd4 100644 --- a/code/addons/a11y/package.json +++ b/code/addons/a11y/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-a11y", - "version": "7.3.0", + "version": "7.3.1", "description": "Test component compliance with web accessibility standards", "keywords": [ "a11y", diff --git a/code/addons/actions/package.json b/code/addons/actions/package.json index 599324390f73..da361a4137e5 100644 --- a/code/addons/actions/package.json +++ b/code/addons/actions/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-actions", - "version": "7.3.0", + "version": "7.3.1", "description": "Get UI feedback when an action is performed on an interactive element", "keywords": [ "storybook", diff --git a/code/addons/backgrounds/package.json b/code/addons/backgrounds/package.json index 5cd29033cb26..ea8e9b2ef4a4 100644 --- a/code/addons/backgrounds/package.json +++ b/code/addons/backgrounds/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-backgrounds", - "version": "7.3.0", + "version": "7.3.1", "description": "Switch backgrounds to view components in different settings", "keywords": [ "addon", diff --git a/code/addons/controls/package.json b/code/addons/controls/package.json index 74db14cbb69b..194af2b3c193 100644 --- a/code/addons/controls/package.json +++ b/code/addons/controls/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-controls", - "version": "7.3.0", + "version": "7.3.1", "description": "Interact with component inputs dynamically in the Storybook UI", "keywords": [ "addon", diff --git a/code/addons/docs/package.json b/code/addons/docs/package.json index 08cd404d7cce..2305a51ec7c4 100644 --- a/code/addons/docs/package.json +++ b/code/addons/docs/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-docs", - "version": "7.3.0", + "version": "7.3.1", "description": "Document component usage and properties in Markdown", "keywords": [ "addon", diff --git a/code/addons/essentials/package.json b/code/addons/essentials/package.json index 4ff2d5fbac2e..6937aee6703d 100644 --- a/code/addons/essentials/package.json +++ b/code/addons/essentials/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-essentials", - "version": "7.3.0", + "version": "7.3.1", "description": "Curated addons to bring out the best of Storybook", "keywords": [ "addon", diff --git a/code/addons/gfm/package.json b/code/addons/gfm/package.json index c1ead65d3fff..86fb7d0f6ec5 100644 --- a/code/addons/gfm/package.json +++ b/code/addons/gfm/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-mdx-gfm", - "version": "7.3.0", + "version": "7.3.1", "description": "GitHub Flavored Markdown in Storybook", "keywords": [ "addon", diff --git a/code/addons/highlight/package.json b/code/addons/highlight/package.json index 9af71e1f7ac8..5ca8d2c1e833 100644 --- a/code/addons/highlight/package.json +++ b/code/addons/highlight/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-highlight", - "version": "7.3.0", + "version": "7.3.1", "description": "Highlight DOM nodes within your stories", "keywords": [ "storybook-addons", diff --git a/code/addons/interactions/package.json b/code/addons/interactions/package.json index 976799311f75..46b64e5e2c07 100644 --- a/code/addons/interactions/package.json +++ b/code/addons/interactions/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-interactions", - "version": "7.3.0", + "version": "7.3.1", "description": "Automate, test and debug user interactions", "keywords": [ "storybook-addons", diff --git a/code/addons/jest/package.json b/code/addons/jest/package.json index 23efeab7cf04..fba044f40699 100644 --- a/code/addons/jest/package.json +++ b/code/addons/jest/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-jest", - "version": "7.3.0", + "version": "7.3.1", "description": "React storybook addon that show component jest report", "keywords": [ "addon", diff --git a/code/addons/links/package.json b/code/addons/links/package.json index 517f0f22b717..9b56796267c3 100644 --- a/code/addons/links/package.json +++ b/code/addons/links/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-links", - "version": "7.3.0", + "version": "7.3.1", "description": "Link stories together to build demos and prototypes with your UI components", "keywords": [ "addon", diff --git a/code/addons/measure/package.json b/code/addons/measure/package.json index 7a0fc23b4d50..b19622c52bbc 100644 --- a/code/addons/measure/package.json +++ b/code/addons/measure/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-measure", - "version": "7.3.0", + "version": "7.3.1", "description": "Inspect layouts by visualizing the box model", "keywords": [ "storybook-addons", diff --git a/code/addons/outline/package.json b/code/addons/outline/package.json index f793d6a2faf7..1eb943d9d0f0 100644 --- a/code/addons/outline/package.json +++ b/code/addons/outline/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-outline", - "version": "7.3.0", + "version": "7.3.1", "description": "Outline all elements with CSS to help with layout placement and alignment", "keywords": [ "storybook-addons", diff --git a/code/addons/storyshots-core/package.json b/code/addons/storyshots-core/package.json index 8c614e6c8798..8b22df2e3f31 100644 --- a/code/addons/storyshots-core/package.json +++ b/code/addons/storyshots-core/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-storyshots", - "version": "7.3.0", + "version": "7.3.1", "description": "Take a code snapshot of every story automatically with Jest", "keywords": [ "addon", diff --git a/code/addons/storyshots-puppeteer/package.json b/code/addons/storyshots-puppeteer/package.json index 13f25f712338..c84402858ef2 100644 --- a/code/addons/storyshots-puppeteer/package.json +++ b/code/addons/storyshots-puppeteer/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-storyshots-puppeteer", - "version": "7.3.0", + "version": "7.3.1", "description": "Image snapshots addition to StoryShots based on puppeteer", "keywords": [ "addon", diff --git a/code/addons/storysource/package.json b/code/addons/storysource/package.json index 4395240f6df9..5faf3ca76d35 100644 --- a/code/addons/storysource/package.json +++ b/code/addons/storysource/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-storysource", - "version": "7.3.0", + "version": "7.3.1", "description": "View a story’s source code to see how it works and paste into your app", "keywords": [ "addon", diff --git a/code/addons/themes/package.json b/code/addons/themes/package.json index 24a4e0949118..bab65ef64ae3 100644 --- a/code/addons/themes/package.json +++ b/code/addons/themes/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-themes", - "version": "7.3.0", + "version": "7.3.1", "description": "Switch between multiple themes for you components in Storybook", "keywords": [ "css", diff --git a/code/addons/toolbars/package.json b/code/addons/toolbars/package.json index 9f0b44e59328..f8d780421449 100644 --- a/code/addons/toolbars/package.json +++ b/code/addons/toolbars/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-toolbars", - "version": "7.3.0", + "version": "7.3.1", "description": "Create your own toolbar items that control story rendering", "keywords": [ "addon", diff --git a/code/addons/viewport/package.json b/code/addons/viewport/package.json index 07d2294ab569..28d175d6671d 100644 --- a/code/addons/viewport/package.json +++ b/code/addons/viewport/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-viewport", - "version": "7.3.0", + "version": "7.3.1", "description": "Build responsive components by adjusting Storybook’s viewport size and orientation", "keywords": [ "addon", diff --git a/code/builders/builder-manager/package.json b/code/builders/builder-manager/package.json index 704f08fea244..52ff15c99996 100644 --- a/code/builders/builder-manager/package.json +++ b/code/builders/builder-manager/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/builder-manager", - "version": "7.3.0", + "version": "7.3.1", "description": "Storybook manager builder", "keywords": [ "storybook" diff --git a/code/builders/builder-vite/package.json b/code/builders/builder-vite/package.json index a35a53364315..86956aeba5e6 100644 --- a/code/builders/builder-vite/package.json +++ b/code/builders/builder-vite/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/builder-vite", - "version": "7.3.0", + "version": "7.3.1", "description": "A plugin to run and build Storybooks with Vite", "homepage": "https://github.com/storybookjs/storybook/tree/next/code/builders/builder-vite/#readme", "bugs": { diff --git a/code/builders/builder-webpack5/package.json b/code/builders/builder-webpack5/package.json index 66dd30c9ef9a..2ac9e39ad156 100644 --- a/code/builders/builder-webpack5/package.json +++ b/code/builders/builder-webpack5/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/builder-webpack5", - "version": "7.3.0", + "version": "7.3.1", "description": "Storybook framework-agnostic API", "keywords": [ "storybook" diff --git a/code/deprecated/addons/package.json b/code/deprecated/addons/package.json index 124fb2622c46..322a10dd90d8 100644 --- a/code/deprecated/addons/package.json +++ b/code/deprecated/addons/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addons", - "version": "7.3.0", + "version": "7.3.1", "description": "Storybook addons store", "keywords": [ "storybook" diff --git a/code/deprecated/channel-postmessage/package.json b/code/deprecated/channel-postmessage/package.json index 2a33d33ba82f..e81e9031d5dc 100644 --- a/code/deprecated/channel-postmessage/package.json +++ b/code/deprecated/channel-postmessage/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/channel-postmessage", - "version": "7.3.0", + "version": "7.3.1", "description": "", "keywords": [ "storybook" diff --git a/code/deprecated/channel-websocket/package.json b/code/deprecated/channel-websocket/package.json index 5f513bdc70ff..55c9937cc80e 100644 --- a/code/deprecated/channel-websocket/package.json +++ b/code/deprecated/channel-websocket/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/channel-websocket", - "version": "7.3.0", + "version": "7.3.1", "description": "", "keywords": [ "storybook" diff --git a/code/deprecated/client-api/package.json b/code/deprecated/client-api/package.json index a2ab95fb4252..3e85bc6aa0df 100644 --- a/code/deprecated/client-api/package.json +++ b/code/deprecated/client-api/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/client-api", - "version": "7.3.0", + "version": "7.3.1", "description": "Storybook Client API", "keywords": [ "storybook" diff --git a/code/deprecated/core-client/package.json b/code/deprecated/core-client/package.json index 96ee7201f468..dbb1eea4915a 100644 --- a/code/deprecated/core-client/package.json +++ b/code/deprecated/core-client/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/core-client", - "version": "7.3.0", + "version": "7.3.1", "description": "Storybook framework-agnostic API", "keywords": [ "storybook" diff --git a/code/deprecated/manager-api-shim/package.json b/code/deprecated/manager-api-shim/package.json index a9f367cba0c7..5fa4382e7f11 100644 --- a/code/deprecated/manager-api-shim/package.json +++ b/code/deprecated/manager-api-shim/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/api", - "version": "7.3.0", + "version": "7.3.1", "description": "Storybook Manager API (facade)", "keywords": [ "storybook" diff --git a/code/deprecated/preview-web/package.json b/code/deprecated/preview-web/package.json index fce9fa4f51d6..0dc92e65ec88 100644 --- a/code/deprecated/preview-web/package.json +++ b/code/deprecated/preview-web/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preview-web", - "version": "7.3.0", + "version": "7.3.1", "description": "", "keywords": [ "storybook" diff --git a/code/deprecated/store/package.json b/code/deprecated/store/package.json index b21441db3872..a3e7e145a60f 100644 --- a/code/deprecated/store/package.json +++ b/code/deprecated/store/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/store", - "version": "7.3.0", + "version": "7.3.1", "description": "", "keywords": [ "storybook" diff --git a/code/frameworks/angular/package.json b/code/frameworks/angular/package.json index 33eeb0499291..d708fb417d41 100644 --- a/code/frameworks/angular/package.json +++ b/code/frameworks/angular/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/angular", - "version": "7.3.0", + "version": "7.3.1", "description": "Storybook for Angular: Develop Angular components in isolation with hot reloading.", "keywords": [ "storybook", diff --git a/code/frameworks/ember/package.json b/code/frameworks/ember/package.json index 8285c171522a..677f741d0cb2 100644 --- a/code/frameworks/ember/package.json +++ b/code/frameworks/ember/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/ember", - "version": "7.3.0", + "version": "7.3.1", "description": "Storybook for Ember: Develop Ember Component in isolation with Hot Reloading.", "homepage": "https://github.com/storybookjs/storybook/tree/next/code/frameworks/ember", "bugs": { diff --git a/code/frameworks/html-vite/package.json b/code/frameworks/html-vite/package.json index 56570ae8edc1..4912c0cfc620 100644 --- a/code/frameworks/html-vite/package.json +++ b/code/frameworks/html-vite/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/html-vite", - "version": "7.3.0", + "version": "7.3.1", "description": "Storybook for HTML and Vite: Develop HTML in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/frameworks/html-webpack5/package.json b/code/frameworks/html-webpack5/package.json index 828e969b1471..143ce4b02d6b 100644 --- a/code/frameworks/html-webpack5/package.json +++ b/code/frameworks/html-webpack5/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/html-webpack5", - "version": "7.3.0", + "version": "7.3.1", "description": "Storybook for HTML: View HTML snippets in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/frameworks/nextjs/package.json b/code/frameworks/nextjs/package.json index 912da54f2c89..efcc9db0053f 100644 --- a/code/frameworks/nextjs/package.json +++ b/code/frameworks/nextjs/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/nextjs", - "version": "7.3.0", + "version": "7.3.1", "description": "Storybook for Next.js", "keywords": [ "storybook", diff --git a/code/frameworks/preact-vite/package.json b/code/frameworks/preact-vite/package.json index 8a467536bca8..e255c52c8935 100644 --- a/code/frameworks/preact-vite/package.json +++ b/code/frameworks/preact-vite/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preact-vite", - "version": "7.3.0", + "version": "7.3.1", "description": "Storybook for Preact and Vite: Develop Preact components in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/frameworks/preact-webpack5/package.json b/code/frameworks/preact-webpack5/package.json index 1284590682ad..3bf7f0385353 100644 --- a/code/frameworks/preact-webpack5/package.json +++ b/code/frameworks/preact-webpack5/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preact-webpack5", - "version": "7.3.0", + "version": "7.3.1", "description": "Storybook for Preact: Develop Preact Component in isolation.", "keywords": [ "storybook" diff --git a/code/frameworks/react-vite/package.json b/code/frameworks/react-vite/package.json index f8095686dda1..5e14527d934d 100644 --- a/code/frameworks/react-vite/package.json +++ b/code/frameworks/react-vite/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/react-vite", - "version": "7.3.0", + "version": "7.3.1", "description": "Storybook for React and Vite: Develop React components in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/frameworks/react-webpack5/package.json b/code/frameworks/react-webpack5/package.json index aa22fd8cf3b3..06a98ecf5b06 100644 --- a/code/frameworks/react-webpack5/package.json +++ b/code/frameworks/react-webpack5/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/react-webpack5", - "version": "7.3.0", + "version": "7.3.1", "description": "Storybook for React: Develop React Component in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/frameworks/server-webpack5/package.json b/code/frameworks/server-webpack5/package.json index 233761d6cc09..2dc6a989131e 100644 --- a/code/frameworks/server-webpack5/package.json +++ b/code/frameworks/server-webpack5/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/server-webpack5", - "version": "7.3.0", + "version": "7.3.1", "description": "Storybook for Server: View HTML snippets from a server in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/frameworks/svelte-vite/package.json b/code/frameworks/svelte-vite/package.json index 8c17ef8a4961..624998beac7e 100644 --- a/code/frameworks/svelte-vite/package.json +++ b/code/frameworks/svelte-vite/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/svelte-vite", - "version": "7.3.0", + "version": "7.3.1", "description": "Storybook for Svelte and Vite: Develop Svelte components in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/frameworks/svelte-webpack5/package.json b/code/frameworks/svelte-webpack5/package.json index f9a25939c4d3..70f846657f24 100644 --- a/code/frameworks/svelte-webpack5/package.json +++ b/code/frameworks/svelte-webpack5/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/svelte-webpack5", - "version": "7.3.0", + "version": "7.3.1", "description": "Storybook for Svelte: Develop Svelte Component in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/frameworks/sveltekit/package.json b/code/frameworks/sveltekit/package.json index 0cc308123d04..49e065e57d4d 100644 --- a/code/frameworks/sveltekit/package.json +++ b/code/frameworks/sveltekit/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/sveltekit", - "version": "7.3.0", + "version": "7.3.1", "description": "Storybook for SvelteKit", "keywords": [ "storybook", diff --git a/code/frameworks/vue-vite/package.json b/code/frameworks/vue-vite/package.json index 70d6f0441e8d..6a22228b89e3 100644 --- a/code/frameworks/vue-vite/package.json +++ b/code/frameworks/vue-vite/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/vue-vite", - "version": "7.3.0", + "version": "7.3.1", "description": "Storybook for Vue2 and Vite: Develop Vue2 Components in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/frameworks/vue-webpack5/package.json b/code/frameworks/vue-webpack5/package.json index 08245dcbd057..86e5982eb90a 100644 --- a/code/frameworks/vue-webpack5/package.json +++ b/code/frameworks/vue-webpack5/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/vue-webpack5", - "version": "7.3.0", + "version": "7.3.1", "description": "Storybook for Vue: Develop Vue Component in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/frameworks/vue3-vite/package.json b/code/frameworks/vue3-vite/package.json index 8d5665dd5eb0..20a54b1451ef 100644 --- a/code/frameworks/vue3-vite/package.json +++ b/code/frameworks/vue3-vite/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/vue3-vite", - "version": "7.3.0", + "version": "7.3.1", "description": "Storybook for Vue3 and Vite: Develop Vue3 components in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/frameworks/vue3-webpack5/package.json b/code/frameworks/vue3-webpack5/package.json index 5f9d00fd3a0e..33946ebe68df 100644 --- a/code/frameworks/vue3-webpack5/package.json +++ b/code/frameworks/vue3-webpack5/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/vue3-webpack5", - "version": "7.3.0", + "version": "7.3.1", "description": "Storybook for Vue 3: Develop Vue 3 Components in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/frameworks/web-components-vite/package.json b/code/frameworks/web-components-vite/package.json index fa1035d9edce..78d45b9446bf 100644 --- a/code/frameworks/web-components-vite/package.json +++ b/code/frameworks/web-components-vite/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/web-components-vite", - "version": "7.3.0", + "version": "7.3.1", "description": "Storybook for web-components and Vite: Develop Web Components in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/frameworks/web-components-webpack5/package.json b/code/frameworks/web-components-webpack5/package.json index b0769e92ece7..270a39f72fb2 100644 --- a/code/frameworks/web-components-webpack5/package.json +++ b/code/frameworks/web-components-webpack5/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/web-components-webpack5", - "version": "7.3.0", + "version": "7.3.1", "description": "Storybook for web-components: View web components snippets in isolation with Hot Reloading.", "keywords": [ "lit", diff --git a/code/lib/channels/package.json b/code/lib/channels/package.json index d57aa997ea4a..3e5eb96241c6 100644 --- a/code/lib/channels/package.json +++ b/code/lib/channels/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/channels", - "version": "7.3.0", + "version": "7.3.1", "description": "", "keywords": [ "storybook" diff --git a/code/lib/cli-sb/package.json b/code/lib/cli-sb/package.json index e73d0e6b3014..e8838066b70c 100644 --- a/code/lib/cli-sb/package.json +++ b/code/lib/cli-sb/package.json @@ -1,6 +1,6 @@ { "name": "sb", - "version": "7.3.0", + "version": "7.3.1", "description": "Storybook CLI", "keywords": [ "storybook" diff --git a/code/lib/cli-storybook/package.json b/code/lib/cli-storybook/package.json index a6f6a2f2205a..64e2b776e863 100644 --- a/code/lib/cli-storybook/package.json +++ b/code/lib/cli-storybook/package.json @@ -1,6 +1,6 @@ { "name": "storybook", - "version": "7.3.0", + "version": "7.3.1", "description": "Storybook CLI", "keywords": [ "storybook" diff --git a/code/lib/cli/package.json b/code/lib/cli/package.json index 163f03125d1a..aa1038a18b19 100644 --- a/code/lib/cli/package.json +++ b/code/lib/cli/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/cli", - "version": "7.3.0", + "version": "7.3.1", "description": "Storybook's CLI - easiest method of adding storybook to your projects", "keywords": [ "cli", diff --git a/code/lib/cli/src/versions.ts b/code/lib/cli/src/versions.ts index a9388238b9c2..7d44e26d8026 100644 --- a/code/lib/cli/src/versions.ts +++ b/code/lib/cli/src/versions.ts @@ -1,97 +1,97 @@ // auto generated file, do not edit export default { - '@storybook/addon-a11y': '7.3.0', - '@storybook/addon-actions': '7.3.0', - '@storybook/addon-backgrounds': '7.3.0', - '@storybook/addon-controls': '7.3.0', - '@storybook/addon-docs': '7.3.0', - '@storybook/addon-essentials': '7.3.0', - '@storybook/addon-highlight': '7.3.0', - '@storybook/addon-interactions': '7.3.0', - '@storybook/addon-jest': '7.3.0', - '@storybook/addon-links': '7.3.0', - '@storybook/addon-mdx-gfm': '7.3.0', - '@storybook/addon-measure': '7.3.0', - '@storybook/addon-outline': '7.3.0', - '@storybook/addon-themes': '7.3.0', - '@storybook/addon-storyshots': '7.3.0', - '@storybook/addon-storyshots-puppeteer': '7.3.0', - '@storybook/addon-storysource': '7.3.0', - '@storybook/addon-toolbars': '7.3.0', - '@storybook/addon-viewport': '7.3.0', - '@storybook/addons': '7.3.0', - '@storybook/angular': '7.3.0', - '@storybook/api': '7.3.0', - '@storybook/blocks': '7.3.0', - '@storybook/builder-manager': '7.3.0', - '@storybook/builder-vite': '7.3.0', - '@storybook/builder-webpack5': '7.3.0', - '@storybook/channel-postmessage': '7.3.0', - '@storybook/channel-websocket': '7.3.0', - '@storybook/channels': '7.3.0', - '@storybook/cli': '7.3.0', - '@storybook/client-api': '7.3.0', - '@storybook/client-logger': '7.3.0', - '@storybook/codemod': '7.3.0', - '@storybook/components': '7.3.0', - '@storybook/core-client': '7.3.0', - '@storybook/core-common': '7.3.0', - '@storybook/core-events': '7.3.0', - '@storybook/core-server': '7.3.0', - '@storybook/core-webpack': '7.3.0', - '@storybook/csf-plugin': '7.3.0', - '@storybook/csf-tools': '7.3.0', - '@storybook/docs-tools': '7.3.0', - '@storybook/ember': '7.3.0', - '@storybook/html': '7.3.0', - '@storybook/html-vite': '7.3.0', - '@storybook/html-webpack5': '7.3.0', - '@storybook/instrumenter': '7.3.0', - '@storybook/manager': '7.3.0', - '@storybook/manager-api': '7.3.0', - '@storybook/nextjs': '7.3.0', - '@storybook/node-logger': '7.3.0', - '@storybook/postinstall': '7.3.0', - '@storybook/preact': '7.3.0', - '@storybook/preact-vite': '7.3.0', - '@storybook/preact-webpack5': '7.3.0', - '@storybook/preset-create-react-app': '7.3.0', - '@storybook/preset-html-webpack': '7.3.0', - '@storybook/preset-preact-webpack': '7.3.0', - '@storybook/preset-react-webpack': '7.3.0', - '@storybook/preset-server-webpack': '7.3.0', - '@storybook/preset-svelte-webpack': '7.3.0', - '@storybook/preset-vue-webpack': '7.3.0', - '@storybook/preset-vue3-webpack': '7.3.0', - '@storybook/preset-web-components-webpack': '7.3.0', - '@storybook/preview': '7.3.0', - '@storybook/preview-api': '7.3.0', - '@storybook/preview-web': '7.3.0', - '@storybook/react': '7.3.0', - '@storybook/react-dom-shim': '7.3.0', - '@storybook/react-vite': '7.3.0', - '@storybook/react-webpack5': '7.3.0', - '@storybook/router': '7.3.0', - '@storybook/server': '7.3.0', - '@storybook/server-webpack5': '7.3.0', - '@storybook/source-loader': '7.3.0', - '@storybook/store': '7.3.0', - '@storybook/svelte': '7.3.0', - '@storybook/svelte-vite': '7.3.0', - '@storybook/svelte-webpack5': '7.3.0', - '@storybook/sveltekit': '7.3.0', - '@storybook/telemetry': '7.3.0', - '@storybook/theming': '7.3.0', - '@storybook/types': '7.3.0', - '@storybook/vue': '7.3.0', - '@storybook/vue-vite': '7.3.0', - '@storybook/vue-webpack5': '7.3.0', - '@storybook/vue3': '7.3.0', - '@storybook/vue3-vite': '7.3.0', - '@storybook/vue3-webpack5': '7.3.0', - '@storybook/web-components': '7.3.0', - '@storybook/web-components-vite': '7.3.0', - '@storybook/web-components-webpack5': '7.3.0', - sb: '7.3.0', - storybook: '7.3.0', + '@storybook/addon-a11y': '7.3.1', + '@storybook/addon-actions': '7.3.1', + '@storybook/addon-backgrounds': '7.3.1', + '@storybook/addon-controls': '7.3.1', + '@storybook/addon-docs': '7.3.1', + '@storybook/addon-essentials': '7.3.1', + '@storybook/addon-highlight': '7.3.1', + '@storybook/addon-interactions': '7.3.1', + '@storybook/addon-jest': '7.3.1', + '@storybook/addon-links': '7.3.1', + '@storybook/addon-mdx-gfm': '7.3.1', + '@storybook/addon-measure': '7.3.1', + '@storybook/addon-outline': '7.3.1', + '@storybook/addon-themes': '7.3.1', + '@storybook/addon-storyshots': '7.3.1', + '@storybook/addon-storyshots-puppeteer': '7.3.1', + '@storybook/addon-storysource': '7.3.1', + '@storybook/addon-toolbars': '7.3.1', + '@storybook/addon-viewport': '7.3.1', + '@storybook/addons': '7.3.1', + '@storybook/angular': '7.3.1', + '@storybook/api': '7.3.1', + '@storybook/blocks': '7.3.1', + '@storybook/builder-manager': '7.3.1', + '@storybook/builder-vite': '7.3.1', + '@storybook/builder-webpack5': '7.3.1', + '@storybook/channel-postmessage': '7.3.1', + '@storybook/channel-websocket': '7.3.1', + '@storybook/channels': '7.3.1', + '@storybook/cli': '7.3.1', + '@storybook/client-api': '7.3.1', + '@storybook/client-logger': '7.3.1', + '@storybook/codemod': '7.3.1', + '@storybook/components': '7.3.1', + '@storybook/core-client': '7.3.1', + '@storybook/core-common': '7.3.1', + '@storybook/core-events': '7.3.1', + '@storybook/core-server': '7.3.1', + '@storybook/core-webpack': '7.3.1', + '@storybook/csf-plugin': '7.3.1', + '@storybook/csf-tools': '7.3.1', + '@storybook/docs-tools': '7.3.1', + '@storybook/ember': '7.3.1', + '@storybook/html': '7.3.1', + '@storybook/html-vite': '7.3.1', + '@storybook/html-webpack5': '7.3.1', + '@storybook/instrumenter': '7.3.1', + '@storybook/manager': '7.3.1', + '@storybook/manager-api': '7.3.1', + '@storybook/nextjs': '7.3.1', + '@storybook/node-logger': '7.3.1', + '@storybook/postinstall': '7.3.1', + '@storybook/preact': '7.3.1', + '@storybook/preact-vite': '7.3.1', + '@storybook/preact-webpack5': '7.3.1', + '@storybook/preset-create-react-app': '7.3.1', + '@storybook/preset-html-webpack': '7.3.1', + '@storybook/preset-preact-webpack': '7.3.1', + '@storybook/preset-react-webpack': '7.3.1', + '@storybook/preset-server-webpack': '7.3.1', + '@storybook/preset-svelte-webpack': '7.3.1', + '@storybook/preset-vue-webpack': '7.3.1', + '@storybook/preset-vue3-webpack': '7.3.1', + '@storybook/preset-web-components-webpack': '7.3.1', + '@storybook/preview': '7.3.1', + '@storybook/preview-api': '7.3.1', + '@storybook/preview-web': '7.3.1', + '@storybook/react': '7.3.1', + '@storybook/react-dom-shim': '7.3.1', + '@storybook/react-vite': '7.3.1', + '@storybook/react-webpack5': '7.3.1', + '@storybook/router': '7.3.1', + '@storybook/server': '7.3.1', + '@storybook/server-webpack5': '7.3.1', + '@storybook/source-loader': '7.3.1', + '@storybook/store': '7.3.1', + '@storybook/svelte': '7.3.1', + '@storybook/svelte-vite': '7.3.1', + '@storybook/svelte-webpack5': '7.3.1', + '@storybook/sveltekit': '7.3.1', + '@storybook/telemetry': '7.3.1', + '@storybook/theming': '7.3.1', + '@storybook/types': '7.3.1', + '@storybook/vue': '7.3.1', + '@storybook/vue-vite': '7.3.1', + '@storybook/vue-webpack5': '7.3.1', + '@storybook/vue3': '7.3.1', + '@storybook/vue3-vite': '7.3.1', + '@storybook/vue3-webpack5': '7.3.1', + '@storybook/web-components': '7.3.1', + '@storybook/web-components-vite': '7.3.1', + '@storybook/web-components-webpack5': '7.3.1', + sb: '7.3.1', + storybook: '7.3.1', }; diff --git a/code/lib/client-logger/package.json b/code/lib/client-logger/package.json index fadc0e639a30..7b44d08236e3 100644 --- a/code/lib/client-logger/package.json +++ b/code/lib/client-logger/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/client-logger", - "version": "7.3.0", + "version": "7.3.1", "description": "", "keywords": [ "storybook" diff --git a/code/lib/codemod/package.json b/code/lib/codemod/package.json index b293788964f2..150f484f0f3f 100644 --- a/code/lib/codemod/package.json +++ b/code/lib/codemod/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/codemod", - "version": "7.3.0", + "version": "7.3.1", "description": "A collection of codemod scripts written with JSCodeshift", "keywords": [ "storybook" diff --git a/code/lib/core-common/package.json b/code/lib/core-common/package.json index 405f19502739..0865e8a6c395 100644 --- a/code/lib/core-common/package.json +++ b/code/lib/core-common/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/core-common", - "version": "7.3.0", + "version": "7.3.1", "description": "Storybook framework-agnostic API", "keywords": [ "storybook" diff --git a/code/lib/core-events/package.json b/code/lib/core-events/package.json index 26e2ca96b734..e00de5c5e6d1 100644 --- a/code/lib/core-events/package.json +++ b/code/lib/core-events/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/core-events", - "version": "7.3.0", + "version": "7.3.1", "description": "Event names used in storybook core", "keywords": [ "storybook" diff --git a/code/lib/core-server/package.json b/code/lib/core-server/package.json index a01154f12c2a..6e23bf031d02 100644 --- a/code/lib/core-server/package.json +++ b/code/lib/core-server/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/core-server", - "version": "7.3.0", + "version": "7.3.1", "description": "Storybook framework-agnostic API", "keywords": [ "storybook" diff --git a/code/lib/core-webpack/package.json b/code/lib/core-webpack/package.json index 21acc09bf888..23d7939ee9a6 100644 --- a/code/lib/core-webpack/package.json +++ b/code/lib/core-webpack/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/core-webpack", - "version": "7.3.0", + "version": "7.3.1", "description": "Storybook framework-agnostic API", "keywords": [ "storybook" diff --git a/code/lib/csf-plugin/package.json b/code/lib/csf-plugin/package.json index f034ce0a71bb..886378f4710a 100644 --- a/code/lib/csf-plugin/package.json +++ b/code/lib/csf-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/csf-plugin", - "version": "7.3.0", + "version": "7.3.1", "description": "Enrich CSF files via static analysis", "keywords": [ "storybook" diff --git a/code/lib/csf-tools/package.json b/code/lib/csf-tools/package.json index 30a526b9be9f..142d97989f25 100644 --- a/code/lib/csf-tools/package.json +++ b/code/lib/csf-tools/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/csf-tools", - "version": "7.3.0", + "version": "7.3.1", "description": "Parse and manipulate CSF and Storybook config files", "keywords": [ "storybook" diff --git a/code/lib/docs-tools/package.json b/code/lib/docs-tools/package.json index cb24a06c9f3c..34eb9cd9d0dd 100644 --- a/code/lib/docs-tools/package.json +++ b/code/lib/docs-tools/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/docs-tools", - "version": "7.3.0", + "version": "7.3.1", "description": "Shared utility functions for frameworks to implement docs", "keywords": [ "storybook" diff --git a/code/lib/instrumenter/package.json b/code/lib/instrumenter/package.json index c1f1560ec42f..fdef9c712ef0 100644 --- a/code/lib/instrumenter/package.json +++ b/code/lib/instrumenter/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/instrumenter", - "version": "7.3.0", + "version": "7.3.1", "description": "", "keywords": [ "storybook" diff --git a/code/lib/manager-api/package.json b/code/lib/manager-api/package.json index fb0f6736b956..f983524ceb60 100644 --- a/code/lib/manager-api/package.json +++ b/code/lib/manager-api/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/manager-api", - "version": "7.3.0", + "version": "7.3.1", "description": "Core Storybook Manager API & Context", "keywords": [ "storybook" diff --git a/code/lib/manager-api/src/version.ts b/code/lib/manager-api/src/version.ts index ca51139550fa..d1d40f5e3132 100644 --- a/code/lib/manager-api/src/version.ts +++ b/code/lib/manager-api/src/version.ts @@ -1 +1 @@ -export const version = '7.3.0'; +export const version = '7.3.1'; diff --git a/code/lib/node-logger/package.json b/code/lib/node-logger/package.json index ef1378e1b6c6..fc16c29a01c4 100644 --- a/code/lib/node-logger/package.json +++ b/code/lib/node-logger/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/node-logger", - "version": "7.3.0", + "version": "7.3.1", "description": "", "keywords": [ "storybook" diff --git a/code/lib/postinstall/package.json b/code/lib/postinstall/package.json index 7542b3e8a9e2..3d221e62659d 100644 --- a/code/lib/postinstall/package.json +++ b/code/lib/postinstall/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/postinstall", - "version": "7.3.0", + "version": "7.3.1", "description": "Storybook addons postinstall utilities", "keywords": [ "api", diff --git a/code/lib/preview-api/package.json b/code/lib/preview-api/package.json index b68ebf5e2628..ca63581b0d49 100644 --- a/code/lib/preview-api/package.json +++ b/code/lib/preview-api/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preview-api", - "version": "7.3.0", + "version": "7.3.1", "description": "", "keywords": [ "storybook" diff --git a/code/lib/preview/package.json b/code/lib/preview/package.json index 9a4f8654f213..a9180f04048a 100644 --- a/code/lib/preview/package.json +++ b/code/lib/preview/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preview", - "version": "7.3.0", + "version": "7.3.1", "description": "", "keywords": [ "storybook" diff --git a/code/lib/react-dom-shim/package.json b/code/lib/react-dom-shim/package.json index 01f7e0405f7b..56dea5f4cdd8 100644 --- a/code/lib/react-dom-shim/package.json +++ b/code/lib/react-dom-shim/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/react-dom-shim", - "version": "7.3.0", + "version": "7.3.1", "description": "", "keywords": [ "storybook" diff --git a/code/lib/router/package.json b/code/lib/router/package.json index a535467e630f..903432bb4cb5 100644 --- a/code/lib/router/package.json +++ b/code/lib/router/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/router", - "version": "7.3.0", + "version": "7.3.1", "description": "Core Storybook Router", "keywords": [ "storybook" diff --git a/code/lib/source-loader/package.json b/code/lib/source-loader/package.json index 27db17126d76..b81c23fcc3dd 100644 --- a/code/lib/source-loader/package.json +++ b/code/lib/source-loader/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/source-loader", - "version": "7.3.0", + "version": "7.3.1", "description": "Source loader", "keywords": [ "lib", diff --git a/code/lib/telemetry/package.json b/code/lib/telemetry/package.json index ba2a37473248..da6e63d696c3 100644 --- a/code/lib/telemetry/package.json +++ b/code/lib/telemetry/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/telemetry", - "version": "7.3.0", + "version": "7.3.1", "description": "Telemetry logging for crash reports and usage statistics", "keywords": [ "storybook" diff --git a/code/lib/theming/package.json b/code/lib/theming/package.json index 6ad548dd4dec..fcf13efc640b 100644 --- a/code/lib/theming/package.json +++ b/code/lib/theming/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/theming", - "version": "7.3.0", + "version": "7.3.1", "description": "Core Storybook Components", "keywords": [ "storybook" diff --git a/code/lib/types/package.json b/code/lib/types/package.json index 57e0430e4b28..8f434c012f96 100644 --- a/code/lib/types/package.json +++ b/code/lib/types/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/types", - "version": "7.3.0", + "version": "7.3.1", "description": "Core Storybook TS Types", "keywords": [ "storybook" diff --git a/code/package.json b/code/package.json index 112b9d186e04..e5af86fb55c7 100644 --- a/code/package.json +++ b/code/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/root", - "version": "7.3.0", + "version": "7.3.1", "private": true, "description": "Storybook root", "homepage": "https://storybook.js.org/", @@ -326,6 +326,5 @@ "Dependency Upgrades" ] ] - }, - "deferredNextVersion": "7.3.1" + } } diff --git a/code/presets/create-react-app/package.json b/code/presets/create-react-app/package.json index 7cfb70bbbc8d..5d654ea41f83 100644 --- a/code/presets/create-react-app/package.json +++ b/code/presets/create-react-app/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preset-create-react-app", - "version": "7.3.0", + "version": "7.3.1", "description": "Storybook for Create React App preset", "keywords": [ "storybook" diff --git a/code/presets/html-webpack/package.json b/code/presets/html-webpack/package.json index 7f55a312452c..bc2b788edf28 100644 --- a/code/presets/html-webpack/package.json +++ b/code/presets/html-webpack/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preset-html-webpack", - "version": "7.3.0", + "version": "7.3.1", "description": "Storybook for HTML: View HTML snippets in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/presets/preact-webpack/package.json b/code/presets/preact-webpack/package.json index 6b154449c90e..a7c37e4fba83 100644 --- a/code/presets/preact-webpack/package.json +++ b/code/presets/preact-webpack/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preset-preact-webpack", - "version": "7.3.0", + "version": "7.3.1", "description": "Storybook for Preact: Develop Preact Component in isolation.", "keywords": [ "storybook" diff --git a/code/presets/react-webpack/package.json b/code/presets/react-webpack/package.json index 0bdfa1778dc9..34848ba43544 100644 --- a/code/presets/react-webpack/package.json +++ b/code/presets/react-webpack/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preset-react-webpack", - "version": "7.3.0", + "version": "7.3.1", "description": "Storybook for React: Develop React Component in isolation with Hot Reloading", "keywords": [ "storybook" diff --git a/code/presets/server-webpack/package.json b/code/presets/server-webpack/package.json index 5e1fe8b38a0c..f87530832203 100644 --- a/code/presets/server-webpack/package.json +++ b/code/presets/server-webpack/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preset-server-webpack", - "version": "7.3.0", + "version": "7.3.1", "description": "Storybook for Server: View HTML snippets from a server in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/presets/svelte-webpack/package.json b/code/presets/svelte-webpack/package.json index 2595e56dba71..8f9d5a86f923 100644 --- a/code/presets/svelte-webpack/package.json +++ b/code/presets/svelte-webpack/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preset-svelte-webpack", - "version": "7.3.0", + "version": "7.3.1", "description": "Storybook for Svelte: Develop Svelte Component in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/presets/vue-webpack/package.json b/code/presets/vue-webpack/package.json index 8bfaf38af9e0..edd805a12d8c 100644 --- a/code/presets/vue-webpack/package.json +++ b/code/presets/vue-webpack/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preset-vue-webpack", - "version": "7.3.0", + "version": "7.3.1", "description": "Storybook for Vue: Develop Vue Component in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/presets/vue3-webpack/package.json b/code/presets/vue3-webpack/package.json index 4f2de86f77f1..c22029a28226 100644 --- a/code/presets/vue3-webpack/package.json +++ b/code/presets/vue3-webpack/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preset-vue3-webpack", - "version": "7.3.0", + "version": "7.3.1", "description": "Storybook for Vue 3: Develop Vue 3 Components in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/presets/web-components-webpack/package.json b/code/presets/web-components-webpack/package.json index f62b3a6ad1f3..7209a3dbb946 100644 --- a/code/presets/web-components-webpack/package.json +++ b/code/presets/web-components-webpack/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preset-web-components-webpack", - "version": "7.3.0", + "version": "7.3.1", "description": "Storybook for web-components: View web components snippets in isolation with Hot Reloading.", "keywords": [ "lit", diff --git a/code/renderers/html/package.json b/code/renderers/html/package.json index a3a5801e093a..0a3bba00b37c 100644 --- a/code/renderers/html/package.json +++ b/code/renderers/html/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/html", - "version": "7.3.0", + "version": "7.3.1", "description": "Storybook HTML renderer", "keywords": [ "storybook" diff --git a/code/renderers/preact/package.json b/code/renderers/preact/package.json index adce500b1e92..dadf609012d7 100644 --- a/code/renderers/preact/package.json +++ b/code/renderers/preact/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preact", - "version": "7.3.0", + "version": "7.3.1", "description": "Storybook Preact renderer", "keywords": [ "storybook" diff --git a/code/renderers/react/package.json b/code/renderers/react/package.json index adf57c5716ff..6a21584cbf45 100644 --- a/code/renderers/react/package.json +++ b/code/renderers/react/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/react", - "version": "7.3.0", + "version": "7.3.1", "description": "Storybook React renderer", "keywords": [ "storybook" diff --git a/code/renderers/server/package.json b/code/renderers/server/package.json index d3ab547ddfac..fa2203865aa6 100644 --- a/code/renderers/server/package.json +++ b/code/renderers/server/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/server", - "version": "7.3.0", + "version": "7.3.1", "description": "Storybook Server renderer", "keywords": [ "storybook" diff --git a/code/renderers/svelte/package.json b/code/renderers/svelte/package.json index 9c9dde9359ae..555a3d66d493 100644 --- a/code/renderers/svelte/package.json +++ b/code/renderers/svelte/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/svelte", - "version": "7.3.0", + "version": "7.3.1", "description": "Storybook Svelte renderer", "keywords": [ "storybook" diff --git a/code/renderers/vue/package.json b/code/renderers/vue/package.json index dd97f8355ffd..75bbe3566540 100644 --- a/code/renderers/vue/package.json +++ b/code/renderers/vue/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/vue", - "version": "7.3.0", + "version": "7.3.1", "description": "Storybook Vue renderer", "keywords": [ "storybook" diff --git a/code/renderers/vue3/package.json b/code/renderers/vue3/package.json index 25287daf4f0e..1851b10d8247 100644 --- a/code/renderers/vue3/package.json +++ b/code/renderers/vue3/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/vue3", - "version": "7.3.0", + "version": "7.3.1", "description": "Storybook Vue 3 renderer", "keywords": [ "storybook" diff --git a/code/renderers/web-components/package.json b/code/renderers/web-components/package.json index c1557493295c..0bd895f3e2ef 100644 --- a/code/renderers/web-components/package.json +++ b/code/renderers/web-components/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/web-components", - "version": "7.3.0", + "version": "7.3.1", "description": "Storybook web-components renderer", "keywords": [ "lit", diff --git a/code/ui/blocks/package.json b/code/ui/blocks/package.json index 949ce897e27a..614a5fd4a905 100644 --- a/code/ui/blocks/package.json +++ b/code/ui/blocks/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/blocks", - "version": "7.3.0", + "version": "7.3.1", "description": "Storybook Doc Blocks", "keywords": [ "storybook" diff --git a/code/ui/components/package.json b/code/ui/components/package.json index ca96517c2435..2d86313342fe 100644 --- a/code/ui/components/package.json +++ b/code/ui/components/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/components", - "version": "7.3.0", + "version": "7.3.1", "description": "Core Storybook Components", "keywords": [ "storybook" diff --git a/code/ui/manager/package.json b/code/ui/manager/package.json index b0be5348605c..bf858c589ccf 100644 --- a/code/ui/manager/package.json +++ b/code/ui/manager/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/manager", - "version": "7.3.0", + "version": "7.3.1", "description": "Core Storybook UI", "keywords": [ "storybook" From b83bf344d28dee39449996a2acfad0b924cf1966 Mon Sep 17 00:00:00 2001 From: storybook-bot <32066757+storybook-bot@users.noreply.github.com> Date: Wed, 16 Aug 2023 11:06:14 +0000 Subject: [PATCH 018/115] Update ./docs/versions/next.json for v7.4.0-alpha.0 --- docs/versions/next.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/versions/next.json b/docs/versions/next.json index ff2e45d46476..13e20888799b 100644 --- a/docs/versions/next.json +++ b/docs/versions/next.json @@ -1 +1 @@ -{"version":"7.3.0-alpha.0","info":{"plain":"- Addons: Deprecate key in addon render function as it is not available anymore - [#23792](https://github.com/storybookjs/storybook/pull/23792), thanks [@kasperpeulen](https://github.com/kasperpeulen)!\n- Build: Support Chrome 100, Safari 15 and Firefox 91 - [#23800](https://github.com/storybookjs/storybook/pull/23800), thanks [@kasperpeulen](https://github.com/kasperpeulen)!\n- CLI: Update postinstall to look for addon script - [#23791](https://github.com/storybookjs/storybook/pull/23791), thanks [@Integrayshaun](https://github.com/Integrayshaun)!\n- UI: Update IconButton and add new Toolbar component - [#23795](https://github.com/storybookjs/storybook/pull/23795), thanks [@cdedreuille](https://github.com/cdedreuille)!\n- UI: Upgrade Addon Design - [#23806](https://github.com/storybookjs/storybook/pull/23806), thanks [@cdedreuille](https://github.com/cdedreuille)!\n- Vue3: Don't assign values to all slots (rollback to v7.0.27) - [#23697](https://github.com/storybookjs/storybook/pull/23697), thanks [@kasperpeulen](https://github.com/kasperpeulen)!"}} +{"version":"7.4.0-alpha.0","info":{"plain":"- Index: Fix `*.story.*` CSF indexing - [#23852](https://github.com/storybookjs/storybook/pull/23852), thanks [@shilman](https://github.com/shilman)!"}} From 2e0da3284834d100bc4ca6683cd3415c2a713ce4 Mon Sep 17 00:00:00 2001 From: Yann Braga Date: Wed, 16 Aug 2023 11:09:42 +0200 Subject: [PATCH 019/115] Merge pull request #23839 from storybookjs/yann/add-parallelism-count-check Build: Add parallelism count check to CI (cherry picked from commit f495b35a37f184784fdc14edefc806382938c9b3) --- .circleci/config.yml | 15 ++++--- scripts/get-template.ts | 89 +++++++++++++++++++++++++++++------------ scripts/package.json | 1 + scripts/yarn.lock | 3 +- 4 files changed, 77 insertions(+), 31 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d383fc19de3c..7d187778889f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -183,7 +183,7 @@ jobs: git diff --exit-code - report-workflow-on-failure - cancel-workflow-on-failure - script-unit-tests: + script-checks: executor: sb_node_16_browsers steps: - git-shallow-clone/checkout_advanced: @@ -191,7 +191,12 @@ jobs: - attach_workspace: at: . - run: - name: Test + name: Check parallelism count + command: | + cd scripts + yarn get-template --check + - run: + name: Run tests command: | cd scripts yarn test --coverage --ci @@ -479,7 +484,7 @@ workflows: - unit-tests: requires: - build - - script-unit-tests: + - script-checks: requires: - build - chromatic-internal-storybooks: @@ -535,7 +540,7 @@ workflows: - unit-tests: requires: - build - - script-unit-tests: + - script-checks: requires: - build - chromatic-internal-storybooks: @@ -592,7 +597,7 @@ workflows: - unit-tests: requires: - build - - script-unit-tests: + - script-checks: requires: - build - chromatic-internal-storybooks: diff --git a/scripts/get-template.ts b/scripts/get-template.ts index 2968d8a9c6ce..e6e6b8b22e08 100644 --- a/scripts/get-template.ts +++ b/scripts/get-template.ts @@ -1,7 +1,9 @@ import { readdir } from 'fs/promises'; -import { pathExists } from 'fs-extra'; +import { pathExists, readFile } from 'fs-extra'; import { program } from 'commander'; import dedent from 'ts-dedent'; +import chalk from 'chalk'; +import yaml from 'yaml'; import { allTemplates, templatesByCadence, @@ -70,23 +72,31 @@ export async function getTemplate( return potentialTemplateKeys[index]; } -const tasks = [ - 'sandbox', - 'build', - 'chromatic', - 'e2e-tests', - 'e2e-tests-dev', - 'test-runner', +const tasksMap = { + sandbox: 'create-sandboxes', + build: 'build-sandboxes', + chromatic: 'chromatic-sandboxes', + 'e2e-tests': 'e2e-production', + 'e2e-tests-dev': 'e2e-dev', + 'test-runner': 'test-runner-production', // 'test-runner-dev', TODO: bring this back when the task is enabled again - 'bench', -]; + bench: 'bench', +}; + +const tasks = Object.keys(tasksMap); + +const CONFIG_YML_FILE = '../.circleci/config.yml'; + +async function checkParallelism(cadence?: Cadence, scriptName?: string) { + const configYml = await readFile(CONFIG_YML_FILE, 'utf-8'); + const data = yaml.parse(configYml); -async function getParallelismSummary(cadence?: Cadence, scriptName?: string) { let potentialTemplateKeys: TemplateKey[] = []; const cadences = cadence ? [cadence] : (Object.keys(templatesByCadence) as Cadence[]); const scripts = scriptName ? [scriptName] : tasks; const summary = []; - summary.push('These are the values you should have in .circleci/config.yml:'); + let isIncorrect = false; + cadences.forEach((cad) => { summary.push(`\n${cad}`); const cadenceTemplates = Object.entries(allTemplates).filter(([key]) => @@ -94,7 +104,7 @@ async function getParallelismSummary(cadence?: Cadence, scriptName?: string) { ); potentialTemplateKeys = cadenceTemplates.map(([k]) => k) as TemplateKey[]; - scripts.forEach((script) => { + scripts.forEach((script: keyof typeof tasksMap) => { const templateKeysPerScript = potentialTemplateKeys.filter((t) => { const currentTemplate = allTemplates[t] as Template; return ( @@ -102,31 +112,56 @@ async function getParallelismSummary(cadence?: Cadence, scriptName?: string) { !currentTemplate.skipTasks?.includes(script as SkippableTask) ); }); - if (templateKeysPerScript.length > 0) { - summary.push( - `-- ${script} - parallelism: ${templateKeysPerScript.length}${ - templateKeysPerScript.length === 2 ? ' (default)' : '' - }` - ); + const workflowJobsRaw: (string | { [key: string]: any })[] = data.workflows[cad].jobs; + const workflowJobs = workflowJobsRaw + .filter((item) => typeof item === 'object' && item !== null) + .reduce((result, item) => Object.assign(result, item), {}) as Record; + + if (templateKeysPerScript.length > 0 && workflowJobs[tasksMap[script]]) { + const currentParallelism = workflowJobs[tasksMap[script]].parallelism || 2; + const newParallelism = templateKeysPerScript.length; + + if (newParallelism !== currentParallelism) { + summary.push( + `-- ❌ ${tasksMap[script]} - parallelism: ${currentParallelism} ${chalk.bgRed( + `(should be ${newParallelism})` + )}` + ); + isIncorrect = true; + } else { + summary.push( + `-- ✅ ${tasksMap[script]} - parallelism: ${templateKeysPerScript.length}${ + templateKeysPerScript.length === 2 ? ' (default)' : '' + }` + ); + } } else { summary.push(`-- ${script} - this script is fully skipped for this cadence.`); } }); }); - return summary.concat('\n').join('\n'); + if (isIncorrect) { + summary.unshift( + 'The parellism count is incorrect for some jobs in .circleci/config.yml, you have to update them:' + ); + throw new Error(summary.concat('\n').join('\n')); + } else { + summary.unshift('✅ The parallelism count is correct for all jobs in .circleci/config.yml:'); + console.log(summary.concat('\n').join('\n')); + } } -type RunOptions = { cadence?: Cadence; task?: string; debug: boolean }; -async function run({ cadence, task, debug }: RunOptions) { - if (debug) { +type RunOptions = { cadence?: Cadence; task?: string; check: boolean }; +async function run({ cadence, task, check }: RunOptions) { + if (check) { if (task && !tasks.includes(task)) { throw new Error( dedent`The "${task}" task you provided is not valid. Valid tasks (found in .circleci/config.yml) are: ${tasks.map((v) => `- ${v}`).join('\n')}` ); } - console.log(await getParallelismSummary(cadence as Cadence, task)); + await checkParallelism(cadence as Cadence, task); return; } @@ -147,7 +182,11 @@ if (require.main === module) { .description('Retrieve the template to run for a given cadence and task') .option('--cadence ', 'Which cadence you want to run the script for') .option('--task ', 'Which task you want to run the script for') - .option('--debug', 'Whether to list the parallelism counts for tasks by cadence', false); + .option( + '--check', + 'Throws an error when the parallelism counts for tasks are incorrect', + false + ); program.parse(process.argv); diff --git a/scripts/package.json b/scripts/package.json index d551f204baef..6b7d18750111 100644 --- a/scripts/package.json +++ b/scripts/package.json @@ -185,6 +185,7 @@ "uuid": "^9.0.0", "wait-on": "^7.0.1", "window-size": "^1.1.1", + "yaml": "^2.3.1", "zod": "^3.21.4" }, "optionalDependencies": { diff --git a/scripts/yarn.lock b/scripts/yarn.lock index 21dc69364812..6fe301173b5d 100644 --- a/scripts/yarn.lock +++ b/scripts/yarn.lock @@ -3046,6 +3046,7 @@ __metadata: verdaccio-auth-memory: ^10.2.0 wait-on: ^7.0.1 window-size: ^1.1.1 + yaml: ^2.3.1 zod: ^3.21.4 dependenciesMeta: "@verdaccio/types": @@ -17359,7 +17360,7 @@ __metadata: languageName: node linkType: hard -"yaml@npm:^2.0.0": +"yaml@npm:^2.0.0, yaml@npm:^2.3.1": version: 2.3.1 resolution: "yaml@npm:2.3.1" checksum: ed4c21a907fb1cd60a25177612fa46d95064a144623d269199817908475fe85bef20fb17406e3bdc175351b6488056a6f84beb7836e8c262646546a0220188e3 From 4b7b27b7138689cb33358c86e8c7fd5f09dd3223 Mon Sep 17 00:00:00 2001 From: Kasper Peulen Date: Wed, 16 Aug 2023 13:56:32 +0200 Subject: [PATCH 020/115] Merge pull request #23856 from storybookjs/kasper/fix-template-file Build: Fix ts errors in get-template (cherry picked from commit 78c6527254a8f7bb0753e2cc1ee390e73500f901) --- scripts/get-template.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/scripts/get-template.ts b/scripts/get-template.ts index e6e6b8b22e08..c56418f7a0b4 100644 --- a/scripts/get-template.ts +++ b/scripts/get-template.ts @@ -65,7 +65,7 @@ export async function getTemplate( } templates to run for the "${scriptName}" task: ${potentialTemplateKeys.map((v) => `- ${v}`).join('\n')} - ${await getParallelismSummary(cadence)} + ${await checkParallelism(cadence)} `); } @@ -81,13 +81,15 @@ const tasksMap = { 'test-runner': 'test-runner-production', // 'test-runner-dev', TODO: bring this back when the task is enabled again bench: 'bench', -}; +} as const; -const tasks = Object.keys(tasksMap); +type TaskKey = keyof typeof tasksMap; + +const tasks = Object.keys(tasksMap) as TaskKey[]; const CONFIG_YML_FILE = '../.circleci/config.yml'; -async function checkParallelism(cadence?: Cadence, scriptName?: string) { +async function checkParallelism(cadence?: Cadence, scriptName?: TaskKey) { const configYml = await readFile(CONFIG_YML_FILE, 'utf-8'); const data = yaml.parse(configYml); @@ -104,7 +106,7 @@ async function checkParallelism(cadence?: Cadence, scriptName?: string) { ); potentialTemplateKeys = cadenceTemplates.map(([k]) => k) as TemplateKey[]; - scripts.forEach((script: keyof typeof tasksMap) => { + scripts.forEach((script) => { const templateKeysPerScript = potentialTemplateKeys.filter((t) => { const currentTemplate = allTemplates[t] as Template; return ( @@ -152,7 +154,7 @@ async function checkParallelism(cadence?: Cadence, scriptName?: string) { } } -type RunOptions = { cadence?: Cadence; task?: string; check: boolean }; +type RunOptions = { cadence?: Cadence; task?: TaskKey; check: boolean }; async function run({ cadence, task, check }: RunOptions) { if (check) { if (task && !tasks.includes(task)) { From fa43dbb3233b065c76ed3274164990fd5d523769 Mon Sep 17 00:00:00 2001 From: Michael Shilman Date: Fri, 18 Aug 2023 21:52:47 +0800 Subject: [PATCH 021/115] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4633f6efc0b8..8bef7c303587 100644 --- a/README.md +++ b/README.md @@ -97,7 +97,7 @@ For additional help, join us in the [Storybook Discord](https://discord.gg/story ### Supported Frameworks -| Renderer | Demo | | +| Renderer | Demo | | | -------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | | [React](code/renderers/react) | [![Storybook demo](https://img.shields.io/npm/v/@storybook/react/latest?style=flat-square&color=blue&label)](https://next--630511d655df72125520f051.chromatic.com/) | [![React](https://img.shields.io/npm/dm/@storybook/react?style=flat-square&color=eee)](code/renderers/react) | | [Angular](code/frameworks/angular/) | [![Storybook demo](https://img.shields.io/npm/v/@storybook/angular/latest?style=flat-square&color=blue&label)](https://next--6322ce6af69825592bbb28fc.chromatic.com/) | [![Angular](https://img.shields.io/npm/dm/@storybook/angular?style=flat-square&color=eee)](code/frameworks/angular/) | From 7e6206a464dea529c7ade0af0fbb20bb6f97989f Mon Sep 17 00:00:00 2001 From: Yann Braga Date: Fri, 18 Aug 2023 15:24:48 +0200 Subject: [PATCH 022/115] Merge pull request #23882 from storybookjs/revert-23496-norbert/react-peerdep-webpack-builder-removal Maintenance: Revert "WebpackBuilder: Remove need for `react` as peerDependency" (cherry picked from commit 946ea827b2a551863d056f0f3bc2cdfd0affca4f) --- code/builders/builder-webpack5/package.json | 14 +++++++++- .../src/preview/iframe-webpack.config.ts | 26 ++++++------------- code/yarn.lock | 15 +++++++++-- 3 files changed, 34 insertions(+), 21 deletions(-) diff --git a/code/builders/builder-webpack5/package.json b/code/builders/builder-webpack5/package.json index 2ac9e39ad156..a8058f6e7e63 100644 --- a/code/builders/builder-webpack5/package.json +++ b/code/builders/builder-webpack5/package.json @@ -55,15 +55,23 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@babel/core": "^7.22.0", + "@babel/core": "^7.22.9", + "@storybook/addons": "workspace:*", "@storybook/channels": "workspace:*", + "@storybook/client-api": "workspace:*", "@storybook/client-logger": "workspace:*", + "@storybook/components": "workspace:*", "@storybook/core-common": "workspace:*", "@storybook/core-events": "workspace:*", "@storybook/core-webpack": "workspace:*", + "@storybook/global": "^5.0.0", + "@storybook/manager-api": "workspace:*", "@storybook/node-logger": "workspace:*", "@storybook/preview": "workspace:*", "@storybook/preview-api": "workspace:*", + "@storybook/router": "workspace:*", + "@storybook/store": "workspace:*", + "@storybook/theming": "workspace:*", "@swc/core": "^1.3.49", "@types/node": "^16.0.0", "@types/semver": "^7.3.4", @@ -101,6 +109,10 @@ "slash": "^5.0.0", "typescript": "~4.9.3" }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0" + }, "peerDependenciesMeta": { "typescript": { "optional": true diff --git a/code/builders/builder-webpack5/src/preview/iframe-webpack.config.ts b/code/builders/builder-webpack5/src/preview/iframe-webpack.config.ts index 704d8fe2b98b..c99a1df1da81 100644 --- a/code/builders/builder-webpack5/src/preview/iframe-webpack.config.ts +++ b/code/builders/builder-webpack5/src/preview/iframe-webpack.config.ts @@ -36,29 +36,19 @@ const storybookPaths: Record = { `@storybook/components` )}/dist/experimental`, ...[ - // these packages are not pre-bundled because of react dependencies. - // these are not dependencies of the builder anymore, thus resolving them can fail. - // we should remove the aliases in 8.0, I'm not sure why they are here in the first place. + // these packages are not pre-bundled because of react dependencies 'components', 'global', 'manager-api', 'router', 'theming', - ].reduce((acc, sbPackage) => { - let packagePath; - try { - packagePath = getAbsolutePath(`@storybook/${sbPackage}`); - } catch (e) { - // ignore - } - if (packagePath) { - return { - ...acc, - [`@storybook/${sbPackage}`]: getAbsolutePath(`@storybook/${sbPackage}`), - }; - } - return acc; - }, {}), + ].reduce( + (acc, sbPackage) => ({ + ...acc, + [`@storybook/${sbPackage}`]: getAbsolutePath(`@storybook/${sbPackage}`), + }), + {} + ), // deprecated, remove in 8.0 [`@storybook/api`]: getAbsolutePath(`@storybook/manager-api`), }; diff --git a/code/yarn.lock b/code/yarn.lock index 88afaae488c0..a576cddaf7a5 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -453,7 +453,7 @@ __metadata: languageName: node linkType: hard -"@babel/core@npm:^7.11.6, @babel/core@npm:^7.12.0, @babel/core@npm:^7.12.3, @babel/core@npm:^7.13.16, @babel/core@npm:^7.19.6, @babel/core@npm:^7.20.12, @babel/core@npm:^7.22.0, @babel/core@npm:^7.22.1, @babel/core@npm:^7.22.9, @babel/core@npm:^7.3.4, @babel/core@npm:^7.7.5": +"@babel/core@npm:^7.11.6, @babel/core@npm:^7.12.0, @babel/core@npm:^7.12.3, @babel/core@npm:^7.13.16, @babel/core@npm:^7.19.6, @babel/core@npm:^7.20.12, @babel/core@npm:^7.22.1, @babel/core@npm:^7.22.9, @babel/core@npm:^7.3.4, @babel/core@npm:^7.7.5": version: 7.22.9 resolution: "@babel/core@npm:7.22.9" dependencies: @@ -6466,15 +6466,23 @@ __metadata: version: 0.0.0-use.local resolution: "@storybook/builder-webpack5@workspace:builders/builder-webpack5" dependencies: - "@babel/core": ^7.22.0 + "@babel/core": ^7.22.9 + "@storybook/addons": "workspace:*" "@storybook/channels": "workspace:*" + "@storybook/client-api": "workspace:*" "@storybook/client-logger": "workspace:*" + "@storybook/components": "workspace:*" "@storybook/core-common": "workspace:*" "@storybook/core-events": "workspace:*" "@storybook/core-webpack": "workspace:*" + "@storybook/global": ^5.0.0 + "@storybook/manager-api": "workspace:*" "@storybook/node-logger": "workspace:*" "@storybook/preview": "workspace:*" "@storybook/preview-api": "workspace:*" + "@storybook/router": "workspace:*" + "@storybook/store": "workspace:*" + "@storybook/theming": "workspace:*" "@swc/core": ^1.3.49 "@types/node": ^16.0.0 "@types/pretty-hrtime": ^1.0.0 @@ -6509,6 +6517,9 @@ __metadata: webpack-dev-middleware: ^6.1.1 webpack-hot-middleware: ^2.25.1 webpack-virtual-modules: ^0.5.0 + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 peerDependenciesMeta: typescript: optional: true From 99ff3307c447b0e1571397273355ddcabd9b2f2e Mon Sep 17 00:00:00 2001 From: storybook-bot <32066757+storybook-bot@users.noreply.github.com> Date: Fri, 18 Aug 2023 13:56:46 +0000 Subject: [PATCH 023/115] Write changelog for 7.3.2 --- CHANGELOG.md | 4 ++++ code/package.json | 3 ++- docs/versions/latest.json | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 076226ae9e77..6f4d663ad990 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 7.3.2 + +- Maintenance: Revert "WebpackBuilder: Remove need for `react` as peerDependency" - [#23882](https://github.com/storybookjs/storybook/pull/23882), thanks [@vanessayuenn](https://github.com/vanessayuenn)! + ## 7.3.1 - Index: Fix `*.story.*` CSF indexing - [#23852](https://github.com/storybookjs/storybook/pull/23852), thanks [@shilman](https://github.com/shilman)! diff --git a/code/package.json b/code/package.json index e5af86fb55c7..bb883cb89c4c 100644 --- a/code/package.json +++ b/code/package.json @@ -326,5 +326,6 @@ "Dependency Upgrades" ] ] - } + }, + "deferredNextVersion": "7.3.2" } diff --git a/docs/versions/latest.json b/docs/versions/latest.json index 52543f66851f..1a5c7ebf786b 100644 --- a/docs/versions/latest.json +++ b/docs/versions/latest.json @@ -1 +1 @@ -{"version":"7.3.1","info":{"plain":"- Index: Fix `*.story.*` CSF indexing - [#23852](https://github.com/storybookjs/storybook/pull/23852), thanks [@shilman](https://github.com/shilman)!"}} +{"version":"7.3.2","info":{"plain":"- Maintenance: Revert \"WebpackBuilder: Remove need for `react` as peerDependency\" - [#23882](https://github.com/storybookjs/storybook/pull/23882), thanks [@vanessayuenn](https://github.com/vanessayuenn)!"}} From 72479330f11784d37b8dd0b1abe83b99cabb1d08 Mon Sep 17 00:00:00 2001 From: storybook-bot <32066757+storybook-bot@users.noreply.github.com> Date: Fri, 18 Aug 2023 14:01:09 +0000 Subject: [PATCH 024/115] Bump version from "7.3.1" to "7.3.2" [skip ci] --- code/addons/a11y/package.json | 2 +- code/addons/actions/package.json | 2 +- code/addons/backgrounds/package.json | 2 +- code/addons/controls/package.json | 2 +- code/addons/docs/package.json | 2 +- code/addons/essentials/package.json | 2 +- code/addons/gfm/package.json | 2 +- code/addons/highlight/package.json | 2 +- code/addons/interactions/package.json | 2 +- code/addons/jest/package.json | 2 +- code/addons/links/package.json | 2 +- code/addons/measure/package.json | 2 +- code/addons/outline/package.json | 2 +- code/addons/storyshots-core/package.json | 2 +- code/addons/storyshots-puppeteer/package.json | 2 +- code/addons/storysource/package.json | 2 +- code/addons/themes/package.json | 2 +- code/addons/toolbars/package.json | 2 +- code/addons/viewport/package.json | 2 +- code/builders/builder-manager/package.json | 2 +- code/builders/builder-vite/package.json | 2 +- code/builders/builder-webpack5/package.json | 2 +- code/deprecated/addons/package.json | 2 +- .../channel-postmessage/package.json | 2 +- .../deprecated/channel-websocket/package.json | 2 +- code/deprecated/client-api/package.json | 2 +- code/deprecated/core-client/package.json | 2 +- code/deprecated/manager-api-shim/package.json | 2 +- code/deprecated/preview-web/package.json | 2 +- code/deprecated/store/package.json | 2 +- code/frameworks/angular/package.json | 2 +- code/frameworks/ember/package.json | 2 +- code/frameworks/html-vite/package.json | 2 +- code/frameworks/html-webpack5/package.json | 2 +- code/frameworks/nextjs/package.json | 2 +- code/frameworks/preact-vite/package.json | 2 +- code/frameworks/preact-webpack5/package.json | 2 +- code/frameworks/react-vite/package.json | 2 +- code/frameworks/react-webpack5/package.json | 2 +- code/frameworks/server-webpack5/package.json | 2 +- code/frameworks/svelte-vite/package.json | 2 +- code/frameworks/svelte-webpack5/package.json | 2 +- code/frameworks/sveltekit/package.json | 2 +- code/frameworks/vue-vite/package.json | 2 +- code/frameworks/vue-webpack5/package.json | 2 +- code/frameworks/vue3-vite/package.json | 2 +- code/frameworks/vue3-webpack5/package.json | 2 +- .../web-components-vite/package.json | 2 +- .../web-components-webpack5/package.json | 2 +- code/lib/channels/package.json | 2 +- code/lib/cli-sb/package.json | 2 +- code/lib/cli-storybook/package.json | 2 +- code/lib/cli/package.json | 2 +- code/lib/cli/src/versions.ts | 188 +++++++++--------- code/lib/client-logger/package.json | 2 +- code/lib/codemod/package.json | 2 +- code/lib/core-common/package.json | 2 +- code/lib/core-events/package.json | 2 +- code/lib/core-server/package.json | 2 +- code/lib/core-webpack/package.json | 2 +- code/lib/csf-plugin/package.json | 2 +- code/lib/csf-tools/package.json | 2 +- code/lib/docs-tools/package.json | 2 +- code/lib/instrumenter/package.json | 2 +- code/lib/manager-api/package.json | 2 +- code/lib/manager-api/src/version.ts | 2 +- code/lib/node-logger/package.json | 2 +- code/lib/postinstall/package.json | 2 +- code/lib/preview-api/package.json | 2 +- code/lib/preview/package.json | 2 +- code/lib/react-dom-shim/package.json | 2 +- code/lib/router/package.json | 2 +- code/lib/source-loader/package.json | 2 +- code/lib/telemetry/package.json | 2 +- code/lib/theming/package.json | 2 +- code/lib/types/package.json | 2 +- code/package.json | 5 +- code/presets/create-react-app/package.json | 2 +- code/presets/html-webpack/package.json | 2 +- code/presets/preact-webpack/package.json | 2 +- code/presets/react-webpack/package.json | 2 +- code/presets/server-webpack/package.json | 2 +- code/presets/svelte-webpack/package.json | 2 +- code/presets/vue-webpack/package.json | 2 +- code/presets/vue3-webpack/package.json | 2 +- .../web-components-webpack/package.json | 2 +- code/renderers/html/package.json | 2 +- code/renderers/preact/package.json | 2 +- code/renderers/react/package.json | 2 +- code/renderers/server/package.json | 2 +- code/renderers/svelte/package.json | 2 +- code/renderers/vue/package.json | 2 +- code/renderers/vue3/package.json | 2 +- code/renderers/web-components/package.json | 2 +- code/ui/blocks/package.json | 2 +- code/ui/components/package.json | 2 +- code/ui/manager/package.json | 2 +- 97 files changed, 191 insertions(+), 192 deletions(-) diff --git a/code/addons/a11y/package.json b/code/addons/a11y/package.json index 6edadb788dd4..fa265bc394eb 100644 --- a/code/addons/a11y/package.json +++ b/code/addons/a11y/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-a11y", - "version": "7.3.1", + "version": "7.3.2", "description": "Test component compliance with web accessibility standards", "keywords": [ "a11y", diff --git a/code/addons/actions/package.json b/code/addons/actions/package.json index da361a4137e5..0ea69956df9a 100644 --- a/code/addons/actions/package.json +++ b/code/addons/actions/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-actions", - "version": "7.3.1", + "version": "7.3.2", "description": "Get UI feedback when an action is performed on an interactive element", "keywords": [ "storybook", diff --git a/code/addons/backgrounds/package.json b/code/addons/backgrounds/package.json index ea8e9b2ef4a4..8970f861a422 100644 --- a/code/addons/backgrounds/package.json +++ b/code/addons/backgrounds/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-backgrounds", - "version": "7.3.1", + "version": "7.3.2", "description": "Switch backgrounds to view components in different settings", "keywords": [ "addon", diff --git a/code/addons/controls/package.json b/code/addons/controls/package.json index 194af2b3c193..a88021105d76 100644 --- a/code/addons/controls/package.json +++ b/code/addons/controls/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-controls", - "version": "7.3.1", + "version": "7.3.2", "description": "Interact with component inputs dynamically in the Storybook UI", "keywords": [ "addon", diff --git a/code/addons/docs/package.json b/code/addons/docs/package.json index 2305a51ec7c4..9bfbd9029b16 100644 --- a/code/addons/docs/package.json +++ b/code/addons/docs/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-docs", - "version": "7.3.1", + "version": "7.3.2", "description": "Document component usage and properties in Markdown", "keywords": [ "addon", diff --git a/code/addons/essentials/package.json b/code/addons/essentials/package.json index 6937aee6703d..639c9a6eeb71 100644 --- a/code/addons/essentials/package.json +++ b/code/addons/essentials/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-essentials", - "version": "7.3.1", + "version": "7.3.2", "description": "Curated addons to bring out the best of Storybook", "keywords": [ "addon", diff --git a/code/addons/gfm/package.json b/code/addons/gfm/package.json index 86fb7d0f6ec5..cecf769eb8e9 100644 --- a/code/addons/gfm/package.json +++ b/code/addons/gfm/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-mdx-gfm", - "version": "7.3.1", + "version": "7.3.2", "description": "GitHub Flavored Markdown in Storybook", "keywords": [ "addon", diff --git a/code/addons/highlight/package.json b/code/addons/highlight/package.json index 5ca8d2c1e833..8156f047b02a 100644 --- a/code/addons/highlight/package.json +++ b/code/addons/highlight/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-highlight", - "version": "7.3.1", + "version": "7.3.2", "description": "Highlight DOM nodes within your stories", "keywords": [ "storybook-addons", diff --git a/code/addons/interactions/package.json b/code/addons/interactions/package.json index 46b64e5e2c07..63029c2c3410 100644 --- a/code/addons/interactions/package.json +++ b/code/addons/interactions/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-interactions", - "version": "7.3.1", + "version": "7.3.2", "description": "Automate, test and debug user interactions", "keywords": [ "storybook-addons", diff --git a/code/addons/jest/package.json b/code/addons/jest/package.json index fba044f40699..d6c90626c54d 100644 --- a/code/addons/jest/package.json +++ b/code/addons/jest/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-jest", - "version": "7.3.1", + "version": "7.3.2", "description": "React storybook addon that show component jest report", "keywords": [ "addon", diff --git a/code/addons/links/package.json b/code/addons/links/package.json index 9b56796267c3..6b98825b296b 100644 --- a/code/addons/links/package.json +++ b/code/addons/links/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-links", - "version": "7.3.1", + "version": "7.3.2", "description": "Link stories together to build demos and prototypes with your UI components", "keywords": [ "addon", diff --git a/code/addons/measure/package.json b/code/addons/measure/package.json index b19622c52bbc..8bfe08ae7820 100644 --- a/code/addons/measure/package.json +++ b/code/addons/measure/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-measure", - "version": "7.3.1", + "version": "7.3.2", "description": "Inspect layouts by visualizing the box model", "keywords": [ "storybook-addons", diff --git a/code/addons/outline/package.json b/code/addons/outline/package.json index 1eb943d9d0f0..89b13393d6e1 100644 --- a/code/addons/outline/package.json +++ b/code/addons/outline/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-outline", - "version": "7.3.1", + "version": "7.3.2", "description": "Outline all elements with CSS to help with layout placement and alignment", "keywords": [ "storybook-addons", diff --git a/code/addons/storyshots-core/package.json b/code/addons/storyshots-core/package.json index 8b22df2e3f31..df6c5655d975 100644 --- a/code/addons/storyshots-core/package.json +++ b/code/addons/storyshots-core/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-storyshots", - "version": "7.3.1", + "version": "7.3.2", "description": "Take a code snapshot of every story automatically with Jest", "keywords": [ "addon", diff --git a/code/addons/storyshots-puppeteer/package.json b/code/addons/storyshots-puppeteer/package.json index c84402858ef2..c2cc6f44fb37 100644 --- a/code/addons/storyshots-puppeteer/package.json +++ b/code/addons/storyshots-puppeteer/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-storyshots-puppeteer", - "version": "7.3.1", + "version": "7.3.2", "description": "Image snapshots addition to StoryShots based on puppeteer", "keywords": [ "addon", diff --git a/code/addons/storysource/package.json b/code/addons/storysource/package.json index 5faf3ca76d35..49aed74c2426 100644 --- a/code/addons/storysource/package.json +++ b/code/addons/storysource/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-storysource", - "version": "7.3.1", + "version": "7.3.2", "description": "View a story’s source code to see how it works and paste into your app", "keywords": [ "addon", diff --git a/code/addons/themes/package.json b/code/addons/themes/package.json index bab65ef64ae3..38059c78dede 100644 --- a/code/addons/themes/package.json +++ b/code/addons/themes/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-themes", - "version": "7.3.1", + "version": "7.3.2", "description": "Switch between multiple themes for you components in Storybook", "keywords": [ "css", diff --git a/code/addons/toolbars/package.json b/code/addons/toolbars/package.json index f8d780421449..885a5cbd0dbc 100644 --- a/code/addons/toolbars/package.json +++ b/code/addons/toolbars/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-toolbars", - "version": "7.3.1", + "version": "7.3.2", "description": "Create your own toolbar items that control story rendering", "keywords": [ "addon", diff --git a/code/addons/viewport/package.json b/code/addons/viewport/package.json index 28d175d6671d..bc226521eb63 100644 --- a/code/addons/viewport/package.json +++ b/code/addons/viewport/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-viewport", - "version": "7.3.1", + "version": "7.3.2", "description": "Build responsive components by adjusting Storybook’s viewport size and orientation", "keywords": [ "addon", diff --git a/code/builders/builder-manager/package.json b/code/builders/builder-manager/package.json index 52ff15c99996..f2a0fe7a2ff1 100644 --- a/code/builders/builder-manager/package.json +++ b/code/builders/builder-manager/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/builder-manager", - "version": "7.3.1", + "version": "7.3.2", "description": "Storybook manager builder", "keywords": [ "storybook" diff --git a/code/builders/builder-vite/package.json b/code/builders/builder-vite/package.json index 86956aeba5e6..c21366fdc68c 100644 --- a/code/builders/builder-vite/package.json +++ b/code/builders/builder-vite/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/builder-vite", - "version": "7.3.1", + "version": "7.3.2", "description": "A plugin to run and build Storybooks with Vite", "homepage": "https://github.com/storybookjs/storybook/tree/next/code/builders/builder-vite/#readme", "bugs": { diff --git a/code/builders/builder-webpack5/package.json b/code/builders/builder-webpack5/package.json index a8058f6e7e63..3be94a45c480 100644 --- a/code/builders/builder-webpack5/package.json +++ b/code/builders/builder-webpack5/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/builder-webpack5", - "version": "7.3.1", + "version": "7.3.2", "description": "Storybook framework-agnostic API", "keywords": [ "storybook" diff --git a/code/deprecated/addons/package.json b/code/deprecated/addons/package.json index 322a10dd90d8..96609bd42cc9 100644 --- a/code/deprecated/addons/package.json +++ b/code/deprecated/addons/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addons", - "version": "7.3.1", + "version": "7.3.2", "description": "Storybook addons store", "keywords": [ "storybook" diff --git a/code/deprecated/channel-postmessage/package.json b/code/deprecated/channel-postmessage/package.json index e81e9031d5dc..165b5fd0d398 100644 --- a/code/deprecated/channel-postmessage/package.json +++ b/code/deprecated/channel-postmessage/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/channel-postmessage", - "version": "7.3.1", + "version": "7.3.2", "description": "", "keywords": [ "storybook" diff --git a/code/deprecated/channel-websocket/package.json b/code/deprecated/channel-websocket/package.json index 55c9937cc80e..9d518f5553df 100644 --- a/code/deprecated/channel-websocket/package.json +++ b/code/deprecated/channel-websocket/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/channel-websocket", - "version": "7.3.1", + "version": "7.3.2", "description": "", "keywords": [ "storybook" diff --git a/code/deprecated/client-api/package.json b/code/deprecated/client-api/package.json index 3e85bc6aa0df..9771027e0ff7 100644 --- a/code/deprecated/client-api/package.json +++ b/code/deprecated/client-api/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/client-api", - "version": "7.3.1", + "version": "7.3.2", "description": "Storybook Client API", "keywords": [ "storybook" diff --git a/code/deprecated/core-client/package.json b/code/deprecated/core-client/package.json index dbb1eea4915a..7ad8146349a3 100644 --- a/code/deprecated/core-client/package.json +++ b/code/deprecated/core-client/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/core-client", - "version": "7.3.1", + "version": "7.3.2", "description": "Storybook framework-agnostic API", "keywords": [ "storybook" diff --git a/code/deprecated/manager-api-shim/package.json b/code/deprecated/manager-api-shim/package.json index 5fa4382e7f11..f1eb7a27f0ce 100644 --- a/code/deprecated/manager-api-shim/package.json +++ b/code/deprecated/manager-api-shim/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/api", - "version": "7.3.1", + "version": "7.3.2", "description": "Storybook Manager API (facade)", "keywords": [ "storybook" diff --git a/code/deprecated/preview-web/package.json b/code/deprecated/preview-web/package.json index 0dc92e65ec88..c9e34e74295e 100644 --- a/code/deprecated/preview-web/package.json +++ b/code/deprecated/preview-web/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preview-web", - "version": "7.3.1", + "version": "7.3.2", "description": "", "keywords": [ "storybook" diff --git a/code/deprecated/store/package.json b/code/deprecated/store/package.json index a3e7e145a60f..d023f2112bd8 100644 --- a/code/deprecated/store/package.json +++ b/code/deprecated/store/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/store", - "version": "7.3.1", + "version": "7.3.2", "description": "", "keywords": [ "storybook" diff --git a/code/frameworks/angular/package.json b/code/frameworks/angular/package.json index d708fb417d41..e6a6a26976c1 100644 --- a/code/frameworks/angular/package.json +++ b/code/frameworks/angular/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/angular", - "version": "7.3.1", + "version": "7.3.2", "description": "Storybook for Angular: Develop Angular components in isolation with hot reloading.", "keywords": [ "storybook", diff --git a/code/frameworks/ember/package.json b/code/frameworks/ember/package.json index 677f741d0cb2..31a6a402fdf2 100644 --- a/code/frameworks/ember/package.json +++ b/code/frameworks/ember/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/ember", - "version": "7.3.1", + "version": "7.3.2", "description": "Storybook for Ember: Develop Ember Component in isolation with Hot Reloading.", "homepage": "https://github.com/storybookjs/storybook/tree/next/code/frameworks/ember", "bugs": { diff --git a/code/frameworks/html-vite/package.json b/code/frameworks/html-vite/package.json index 4912c0cfc620..dd0cd93fd8a1 100644 --- a/code/frameworks/html-vite/package.json +++ b/code/frameworks/html-vite/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/html-vite", - "version": "7.3.1", + "version": "7.3.2", "description": "Storybook for HTML and Vite: Develop HTML in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/frameworks/html-webpack5/package.json b/code/frameworks/html-webpack5/package.json index 143ce4b02d6b..855810db85b1 100644 --- a/code/frameworks/html-webpack5/package.json +++ b/code/frameworks/html-webpack5/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/html-webpack5", - "version": "7.3.1", + "version": "7.3.2", "description": "Storybook for HTML: View HTML snippets in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/frameworks/nextjs/package.json b/code/frameworks/nextjs/package.json index efcc9db0053f..c84fc579948b 100644 --- a/code/frameworks/nextjs/package.json +++ b/code/frameworks/nextjs/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/nextjs", - "version": "7.3.1", + "version": "7.3.2", "description": "Storybook for Next.js", "keywords": [ "storybook", diff --git a/code/frameworks/preact-vite/package.json b/code/frameworks/preact-vite/package.json index e255c52c8935..95f2fff5a7ef 100644 --- a/code/frameworks/preact-vite/package.json +++ b/code/frameworks/preact-vite/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preact-vite", - "version": "7.3.1", + "version": "7.3.2", "description": "Storybook for Preact and Vite: Develop Preact components in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/frameworks/preact-webpack5/package.json b/code/frameworks/preact-webpack5/package.json index 3bf7f0385353..d70fabab53cf 100644 --- a/code/frameworks/preact-webpack5/package.json +++ b/code/frameworks/preact-webpack5/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preact-webpack5", - "version": "7.3.1", + "version": "7.3.2", "description": "Storybook for Preact: Develop Preact Component in isolation.", "keywords": [ "storybook" diff --git a/code/frameworks/react-vite/package.json b/code/frameworks/react-vite/package.json index 5e14527d934d..6e1cfa22cdc5 100644 --- a/code/frameworks/react-vite/package.json +++ b/code/frameworks/react-vite/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/react-vite", - "version": "7.3.1", + "version": "7.3.2", "description": "Storybook for React and Vite: Develop React components in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/frameworks/react-webpack5/package.json b/code/frameworks/react-webpack5/package.json index 06a98ecf5b06..b4c1f320f953 100644 --- a/code/frameworks/react-webpack5/package.json +++ b/code/frameworks/react-webpack5/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/react-webpack5", - "version": "7.3.1", + "version": "7.3.2", "description": "Storybook for React: Develop React Component in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/frameworks/server-webpack5/package.json b/code/frameworks/server-webpack5/package.json index 2dc6a989131e..503424029c54 100644 --- a/code/frameworks/server-webpack5/package.json +++ b/code/frameworks/server-webpack5/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/server-webpack5", - "version": "7.3.1", + "version": "7.3.2", "description": "Storybook for Server: View HTML snippets from a server in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/frameworks/svelte-vite/package.json b/code/frameworks/svelte-vite/package.json index 624998beac7e..992158b99b03 100644 --- a/code/frameworks/svelte-vite/package.json +++ b/code/frameworks/svelte-vite/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/svelte-vite", - "version": "7.3.1", + "version": "7.3.2", "description": "Storybook for Svelte and Vite: Develop Svelte components in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/frameworks/svelte-webpack5/package.json b/code/frameworks/svelte-webpack5/package.json index 70f846657f24..4e04dddd2f61 100644 --- a/code/frameworks/svelte-webpack5/package.json +++ b/code/frameworks/svelte-webpack5/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/svelte-webpack5", - "version": "7.3.1", + "version": "7.3.2", "description": "Storybook for Svelte: Develop Svelte Component in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/frameworks/sveltekit/package.json b/code/frameworks/sveltekit/package.json index 49e065e57d4d..789d842876ac 100644 --- a/code/frameworks/sveltekit/package.json +++ b/code/frameworks/sveltekit/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/sveltekit", - "version": "7.3.1", + "version": "7.3.2", "description": "Storybook for SvelteKit", "keywords": [ "storybook", diff --git a/code/frameworks/vue-vite/package.json b/code/frameworks/vue-vite/package.json index 6a22228b89e3..62cef65a7da4 100644 --- a/code/frameworks/vue-vite/package.json +++ b/code/frameworks/vue-vite/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/vue-vite", - "version": "7.3.1", + "version": "7.3.2", "description": "Storybook for Vue2 and Vite: Develop Vue2 Components in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/frameworks/vue-webpack5/package.json b/code/frameworks/vue-webpack5/package.json index 86e5982eb90a..70ef27e81ece 100644 --- a/code/frameworks/vue-webpack5/package.json +++ b/code/frameworks/vue-webpack5/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/vue-webpack5", - "version": "7.3.1", + "version": "7.3.2", "description": "Storybook for Vue: Develop Vue Component in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/frameworks/vue3-vite/package.json b/code/frameworks/vue3-vite/package.json index 20a54b1451ef..377fe61279b8 100644 --- a/code/frameworks/vue3-vite/package.json +++ b/code/frameworks/vue3-vite/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/vue3-vite", - "version": "7.3.1", + "version": "7.3.2", "description": "Storybook for Vue3 and Vite: Develop Vue3 components in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/frameworks/vue3-webpack5/package.json b/code/frameworks/vue3-webpack5/package.json index 33946ebe68df..81cde4c7bc79 100644 --- a/code/frameworks/vue3-webpack5/package.json +++ b/code/frameworks/vue3-webpack5/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/vue3-webpack5", - "version": "7.3.1", + "version": "7.3.2", "description": "Storybook for Vue 3: Develop Vue 3 Components in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/frameworks/web-components-vite/package.json b/code/frameworks/web-components-vite/package.json index 78d45b9446bf..92dded2085db 100644 --- a/code/frameworks/web-components-vite/package.json +++ b/code/frameworks/web-components-vite/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/web-components-vite", - "version": "7.3.1", + "version": "7.3.2", "description": "Storybook for web-components and Vite: Develop Web Components in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/frameworks/web-components-webpack5/package.json b/code/frameworks/web-components-webpack5/package.json index 270a39f72fb2..a379298eafaf 100644 --- a/code/frameworks/web-components-webpack5/package.json +++ b/code/frameworks/web-components-webpack5/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/web-components-webpack5", - "version": "7.3.1", + "version": "7.3.2", "description": "Storybook for web-components: View web components snippets in isolation with Hot Reloading.", "keywords": [ "lit", diff --git a/code/lib/channels/package.json b/code/lib/channels/package.json index 3e5eb96241c6..ba7c72c1882e 100644 --- a/code/lib/channels/package.json +++ b/code/lib/channels/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/channels", - "version": "7.3.1", + "version": "7.3.2", "description": "", "keywords": [ "storybook" diff --git a/code/lib/cli-sb/package.json b/code/lib/cli-sb/package.json index e8838066b70c..b8c890e9ee6a 100644 --- a/code/lib/cli-sb/package.json +++ b/code/lib/cli-sb/package.json @@ -1,6 +1,6 @@ { "name": "sb", - "version": "7.3.1", + "version": "7.3.2", "description": "Storybook CLI", "keywords": [ "storybook" diff --git a/code/lib/cli-storybook/package.json b/code/lib/cli-storybook/package.json index 64e2b776e863..6b4c4a49554e 100644 --- a/code/lib/cli-storybook/package.json +++ b/code/lib/cli-storybook/package.json @@ -1,6 +1,6 @@ { "name": "storybook", - "version": "7.3.1", + "version": "7.3.2", "description": "Storybook CLI", "keywords": [ "storybook" diff --git a/code/lib/cli/package.json b/code/lib/cli/package.json index aa1038a18b19..458fbda1a953 100644 --- a/code/lib/cli/package.json +++ b/code/lib/cli/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/cli", - "version": "7.3.1", + "version": "7.3.2", "description": "Storybook's CLI - easiest method of adding storybook to your projects", "keywords": [ "cli", diff --git a/code/lib/cli/src/versions.ts b/code/lib/cli/src/versions.ts index 7d44e26d8026..644bcbfe1d8a 100644 --- a/code/lib/cli/src/versions.ts +++ b/code/lib/cli/src/versions.ts @@ -1,97 +1,97 @@ // auto generated file, do not edit export default { - '@storybook/addon-a11y': '7.3.1', - '@storybook/addon-actions': '7.3.1', - '@storybook/addon-backgrounds': '7.3.1', - '@storybook/addon-controls': '7.3.1', - '@storybook/addon-docs': '7.3.1', - '@storybook/addon-essentials': '7.3.1', - '@storybook/addon-highlight': '7.3.1', - '@storybook/addon-interactions': '7.3.1', - '@storybook/addon-jest': '7.3.1', - '@storybook/addon-links': '7.3.1', - '@storybook/addon-mdx-gfm': '7.3.1', - '@storybook/addon-measure': '7.3.1', - '@storybook/addon-outline': '7.3.1', - '@storybook/addon-themes': '7.3.1', - '@storybook/addon-storyshots': '7.3.1', - '@storybook/addon-storyshots-puppeteer': '7.3.1', - '@storybook/addon-storysource': '7.3.1', - '@storybook/addon-toolbars': '7.3.1', - '@storybook/addon-viewport': '7.3.1', - '@storybook/addons': '7.3.1', - '@storybook/angular': '7.3.1', - '@storybook/api': '7.3.1', - '@storybook/blocks': '7.3.1', - '@storybook/builder-manager': '7.3.1', - '@storybook/builder-vite': '7.3.1', - '@storybook/builder-webpack5': '7.3.1', - '@storybook/channel-postmessage': '7.3.1', - '@storybook/channel-websocket': '7.3.1', - '@storybook/channels': '7.3.1', - '@storybook/cli': '7.3.1', - '@storybook/client-api': '7.3.1', - '@storybook/client-logger': '7.3.1', - '@storybook/codemod': '7.3.1', - '@storybook/components': '7.3.1', - '@storybook/core-client': '7.3.1', - '@storybook/core-common': '7.3.1', - '@storybook/core-events': '7.3.1', - '@storybook/core-server': '7.3.1', - '@storybook/core-webpack': '7.3.1', - '@storybook/csf-plugin': '7.3.1', - '@storybook/csf-tools': '7.3.1', - '@storybook/docs-tools': '7.3.1', - '@storybook/ember': '7.3.1', - '@storybook/html': '7.3.1', - '@storybook/html-vite': '7.3.1', - '@storybook/html-webpack5': '7.3.1', - '@storybook/instrumenter': '7.3.1', - '@storybook/manager': '7.3.1', - '@storybook/manager-api': '7.3.1', - '@storybook/nextjs': '7.3.1', - '@storybook/node-logger': '7.3.1', - '@storybook/postinstall': '7.3.1', - '@storybook/preact': '7.3.1', - '@storybook/preact-vite': '7.3.1', - '@storybook/preact-webpack5': '7.3.1', - '@storybook/preset-create-react-app': '7.3.1', - '@storybook/preset-html-webpack': '7.3.1', - '@storybook/preset-preact-webpack': '7.3.1', - '@storybook/preset-react-webpack': '7.3.1', - '@storybook/preset-server-webpack': '7.3.1', - '@storybook/preset-svelte-webpack': '7.3.1', - '@storybook/preset-vue-webpack': '7.3.1', - '@storybook/preset-vue3-webpack': '7.3.1', - '@storybook/preset-web-components-webpack': '7.3.1', - '@storybook/preview': '7.3.1', - '@storybook/preview-api': '7.3.1', - '@storybook/preview-web': '7.3.1', - '@storybook/react': '7.3.1', - '@storybook/react-dom-shim': '7.3.1', - '@storybook/react-vite': '7.3.1', - '@storybook/react-webpack5': '7.3.1', - '@storybook/router': '7.3.1', - '@storybook/server': '7.3.1', - '@storybook/server-webpack5': '7.3.1', - '@storybook/source-loader': '7.3.1', - '@storybook/store': '7.3.1', - '@storybook/svelte': '7.3.1', - '@storybook/svelte-vite': '7.3.1', - '@storybook/svelte-webpack5': '7.3.1', - '@storybook/sveltekit': '7.3.1', - '@storybook/telemetry': '7.3.1', - '@storybook/theming': '7.3.1', - '@storybook/types': '7.3.1', - '@storybook/vue': '7.3.1', - '@storybook/vue-vite': '7.3.1', - '@storybook/vue-webpack5': '7.3.1', - '@storybook/vue3': '7.3.1', - '@storybook/vue3-vite': '7.3.1', - '@storybook/vue3-webpack5': '7.3.1', - '@storybook/web-components': '7.3.1', - '@storybook/web-components-vite': '7.3.1', - '@storybook/web-components-webpack5': '7.3.1', - sb: '7.3.1', - storybook: '7.3.1', + '@storybook/addon-a11y': '7.3.2', + '@storybook/addon-actions': '7.3.2', + '@storybook/addon-backgrounds': '7.3.2', + '@storybook/addon-controls': '7.3.2', + '@storybook/addon-docs': '7.3.2', + '@storybook/addon-essentials': '7.3.2', + '@storybook/addon-highlight': '7.3.2', + '@storybook/addon-interactions': '7.3.2', + '@storybook/addon-jest': '7.3.2', + '@storybook/addon-links': '7.3.2', + '@storybook/addon-mdx-gfm': '7.3.2', + '@storybook/addon-measure': '7.3.2', + '@storybook/addon-outline': '7.3.2', + '@storybook/addon-themes': '7.3.2', + '@storybook/addon-storyshots': '7.3.2', + '@storybook/addon-storyshots-puppeteer': '7.3.2', + '@storybook/addon-storysource': '7.3.2', + '@storybook/addon-toolbars': '7.3.2', + '@storybook/addon-viewport': '7.3.2', + '@storybook/addons': '7.3.2', + '@storybook/angular': '7.3.2', + '@storybook/api': '7.3.2', + '@storybook/blocks': '7.3.2', + '@storybook/builder-manager': '7.3.2', + '@storybook/builder-vite': '7.3.2', + '@storybook/builder-webpack5': '7.3.2', + '@storybook/channel-postmessage': '7.3.2', + '@storybook/channel-websocket': '7.3.2', + '@storybook/channels': '7.3.2', + '@storybook/cli': '7.3.2', + '@storybook/client-api': '7.3.2', + '@storybook/client-logger': '7.3.2', + '@storybook/codemod': '7.3.2', + '@storybook/components': '7.3.2', + '@storybook/core-client': '7.3.2', + '@storybook/core-common': '7.3.2', + '@storybook/core-events': '7.3.2', + '@storybook/core-server': '7.3.2', + '@storybook/core-webpack': '7.3.2', + '@storybook/csf-plugin': '7.3.2', + '@storybook/csf-tools': '7.3.2', + '@storybook/docs-tools': '7.3.2', + '@storybook/ember': '7.3.2', + '@storybook/html': '7.3.2', + '@storybook/html-vite': '7.3.2', + '@storybook/html-webpack5': '7.3.2', + '@storybook/instrumenter': '7.3.2', + '@storybook/manager': '7.3.2', + '@storybook/manager-api': '7.3.2', + '@storybook/nextjs': '7.3.2', + '@storybook/node-logger': '7.3.2', + '@storybook/postinstall': '7.3.2', + '@storybook/preact': '7.3.2', + '@storybook/preact-vite': '7.3.2', + '@storybook/preact-webpack5': '7.3.2', + '@storybook/preset-create-react-app': '7.3.2', + '@storybook/preset-html-webpack': '7.3.2', + '@storybook/preset-preact-webpack': '7.3.2', + '@storybook/preset-react-webpack': '7.3.2', + '@storybook/preset-server-webpack': '7.3.2', + '@storybook/preset-svelte-webpack': '7.3.2', + '@storybook/preset-vue-webpack': '7.3.2', + '@storybook/preset-vue3-webpack': '7.3.2', + '@storybook/preset-web-components-webpack': '7.3.2', + '@storybook/preview': '7.3.2', + '@storybook/preview-api': '7.3.2', + '@storybook/preview-web': '7.3.2', + '@storybook/react': '7.3.2', + '@storybook/react-dom-shim': '7.3.2', + '@storybook/react-vite': '7.3.2', + '@storybook/react-webpack5': '7.3.2', + '@storybook/router': '7.3.2', + '@storybook/server': '7.3.2', + '@storybook/server-webpack5': '7.3.2', + '@storybook/source-loader': '7.3.2', + '@storybook/store': '7.3.2', + '@storybook/svelte': '7.3.2', + '@storybook/svelte-vite': '7.3.2', + '@storybook/svelte-webpack5': '7.3.2', + '@storybook/sveltekit': '7.3.2', + '@storybook/telemetry': '7.3.2', + '@storybook/theming': '7.3.2', + '@storybook/types': '7.3.2', + '@storybook/vue': '7.3.2', + '@storybook/vue-vite': '7.3.2', + '@storybook/vue-webpack5': '7.3.2', + '@storybook/vue3': '7.3.2', + '@storybook/vue3-vite': '7.3.2', + '@storybook/vue3-webpack5': '7.3.2', + '@storybook/web-components': '7.3.2', + '@storybook/web-components-vite': '7.3.2', + '@storybook/web-components-webpack5': '7.3.2', + sb: '7.3.2', + storybook: '7.3.2', }; diff --git a/code/lib/client-logger/package.json b/code/lib/client-logger/package.json index 7b44d08236e3..ef4b550f5c26 100644 --- a/code/lib/client-logger/package.json +++ b/code/lib/client-logger/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/client-logger", - "version": "7.3.1", + "version": "7.3.2", "description": "", "keywords": [ "storybook" diff --git a/code/lib/codemod/package.json b/code/lib/codemod/package.json index 150f484f0f3f..7a5b8b69ed12 100644 --- a/code/lib/codemod/package.json +++ b/code/lib/codemod/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/codemod", - "version": "7.3.1", + "version": "7.3.2", "description": "A collection of codemod scripts written with JSCodeshift", "keywords": [ "storybook" diff --git a/code/lib/core-common/package.json b/code/lib/core-common/package.json index 0865e8a6c395..3e708343c24d 100644 --- a/code/lib/core-common/package.json +++ b/code/lib/core-common/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/core-common", - "version": "7.3.1", + "version": "7.3.2", "description": "Storybook framework-agnostic API", "keywords": [ "storybook" diff --git a/code/lib/core-events/package.json b/code/lib/core-events/package.json index e00de5c5e6d1..af33e2a1bd9d 100644 --- a/code/lib/core-events/package.json +++ b/code/lib/core-events/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/core-events", - "version": "7.3.1", + "version": "7.3.2", "description": "Event names used in storybook core", "keywords": [ "storybook" diff --git a/code/lib/core-server/package.json b/code/lib/core-server/package.json index 6e23bf031d02..9a41bfc3967f 100644 --- a/code/lib/core-server/package.json +++ b/code/lib/core-server/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/core-server", - "version": "7.3.1", + "version": "7.3.2", "description": "Storybook framework-agnostic API", "keywords": [ "storybook" diff --git a/code/lib/core-webpack/package.json b/code/lib/core-webpack/package.json index 23d7939ee9a6..e1d7f9f86833 100644 --- a/code/lib/core-webpack/package.json +++ b/code/lib/core-webpack/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/core-webpack", - "version": "7.3.1", + "version": "7.3.2", "description": "Storybook framework-agnostic API", "keywords": [ "storybook" diff --git a/code/lib/csf-plugin/package.json b/code/lib/csf-plugin/package.json index 886378f4710a..f255305a1dac 100644 --- a/code/lib/csf-plugin/package.json +++ b/code/lib/csf-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/csf-plugin", - "version": "7.3.1", + "version": "7.3.2", "description": "Enrich CSF files via static analysis", "keywords": [ "storybook" diff --git a/code/lib/csf-tools/package.json b/code/lib/csf-tools/package.json index 142d97989f25..e848c4d03522 100644 --- a/code/lib/csf-tools/package.json +++ b/code/lib/csf-tools/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/csf-tools", - "version": "7.3.1", + "version": "7.3.2", "description": "Parse and manipulate CSF and Storybook config files", "keywords": [ "storybook" diff --git a/code/lib/docs-tools/package.json b/code/lib/docs-tools/package.json index 34eb9cd9d0dd..6ce365a94111 100644 --- a/code/lib/docs-tools/package.json +++ b/code/lib/docs-tools/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/docs-tools", - "version": "7.3.1", + "version": "7.3.2", "description": "Shared utility functions for frameworks to implement docs", "keywords": [ "storybook" diff --git a/code/lib/instrumenter/package.json b/code/lib/instrumenter/package.json index fdef9c712ef0..8a1efea7186a 100644 --- a/code/lib/instrumenter/package.json +++ b/code/lib/instrumenter/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/instrumenter", - "version": "7.3.1", + "version": "7.3.2", "description": "", "keywords": [ "storybook" diff --git a/code/lib/manager-api/package.json b/code/lib/manager-api/package.json index f983524ceb60..93923d6266be 100644 --- a/code/lib/manager-api/package.json +++ b/code/lib/manager-api/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/manager-api", - "version": "7.3.1", + "version": "7.3.2", "description": "Core Storybook Manager API & Context", "keywords": [ "storybook" diff --git a/code/lib/manager-api/src/version.ts b/code/lib/manager-api/src/version.ts index d1d40f5e3132..b3ae5664ea03 100644 --- a/code/lib/manager-api/src/version.ts +++ b/code/lib/manager-api/src/version.ts @@ -1 +1 @@ -export const version = '7.3.1'; +export const version = '7.3.2'; diff --git a/code/lib/node-logger/package.json b/code/lib/node-logger/package.json index fc16c29a01c4..6e9df02d2e5a 100644 --- a/code/lib/node-logger/package.json +++ b/code/lib/node-logger/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/node-logger", - "version": "7.3.1", + "version": "7.3.2", "description": "", "keywords": [ "storybook" diff --git a/code/lib/postinstall/package.json b/code/lib/postinstall/package.json index 3d221e62659d..862b3db65ab0 100644 --- a/code/lib/postinstall/package.json +++ b/code/lib/postinstall/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/postinstall", - "version": "7.3.1", + "version": "7.3.2", "description": "Storybook addons postinstall utilities", "keywords": [ "api", diff --git a/code/lib/preview-api/package.json b/code/lib/preview-api/package.json index ca63581b0d49..a4188aa3f116 100644 --- a/code/lib/preview-api/package.json +++ b/code/lib/preview-api/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preview-api", - "version": "7.3.1", + "version": "7.3.2", "description": "", "keywords": [ "storybook" diff --git a/code/lib/preview/package.json b/code/lib/preview/package.json index a9180f04048a..3d023995a43a 100644 --- a/code/lib/preview/package.json +++ b/code/lib/preview/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preview", - "version": "7.3.1", + "version": "7.3.2", "description": "", "keywords": [ "storybook" diff --git a/code/lib/react-dom-shim/package.json b/code/lib/react-dom-shim/package.json index 56dea5f4cdd8..20e551750db2 100644 --- a/code/lib/react-dom-shim/package.json +++ b/code/lib/react-dom-shim/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/react-dom-shim", - "version": "7.3.1", + "version": "7.3.2", "description": "", "keywords": [ "storybook" diff --git a/code/lib/router/package.json b/code/lib/router/package.json index 903432bb4cb5..b36a1f204756 100644 --- a/code/lib/router/package.json +++ b/code/lib/router/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/router", - "version": "7.3.1", + "version": "7.3.2", "description": "Core Storybook Router", "keywords": [ "storybook" diff --git a/code/lib/source-loader/package.json b/code/lib/source-loader/package.json index b81c23fcc3dd..e63bc84b2d49 100644 --- a/code/lib/source-loader/package.json +++ b/code/lib/source-loader/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/source-loader", - "version": "7.3.1", + "version": "7.3.2", "description": "Source loader", "keywords": [ "lib", diff --git a/code/lib/telemetry/package.json b/code/lib/telemetry/package.json index da6e63d696c3..dd747058adc2 100644 --- a/code/lib/telemetry/package.json +++ b/code/lib/telemetry/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/telemetry", - "version": "7.3.1", + "version": "7.3.2", "description": "Telemetry logging for crash reports and usage statistics", "keywords": [ "storybook" diff --git a/code/lib/theming/package.json b/code/lib/theming/package.json index fcf13efc640b..5f7ec1f2202f 100644 --- a/code/lib/theming/package.json +++ b/code/lib/theming/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/theming", - "version": "7.3.1", + "version": "7.3.2", "description": "Core Storybook Components", "keywords": [ "storybook" diff --git a/code/lib/types/package.json b/code/lib/types/package.json index 8f434c012f96..1603ad1bcdb6 100644 --- a/code/lib/types/package.json +++ b/code/lib/types/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/types", - "version": "7.3.1", + "version": "7.3.2", "description": "Core Storybook TS Types", "keywords": [ "storybook" diff --git a/code/package.json b/code/package.json index bb883cb89c4c..367c48370a20 100644 --- a/code/package.json +++ b/code/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/root", - "version": "7.3.1", + "version": "7.3.2", "private": true, "description": "Storybook root", "homepage": "https://storybook.js.org/", @@ -326,6 +326,5 @@ "Dependency Upgrades" ] ] - }, - "deferredNextVersion": "7.3.2" + } } diff --git a/code/presets/create-react-app/package.json b/code/presets/create-react-app/package.json index 5d654ea41f83..6dd86bbbb5eb 100644 --- a/code/presets/create-react-app/package.json +++ b/code/presets/create-react-app/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preset-create-react-app", - "version": "7.3.1", + "version": "7.3.2", "description": "Storybook for Create React App preset", "keywords": [ "storybook" diff --git a/code/presets/html-webpack/package.json b/code/presets/html-webpack/package.json index bc2b788edf28..a85325b01474 100644 --- a/code/presets/html-webpack/package.json +++ b/code/presets/html-webpack/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preset-html-webpack", - "version": "7.3.1", + "version": "7.3.2", "description": "Storybook for HTML: View HTML snippets in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/presets/preact-webpack/package.json b/code/presets/preact-webpack/package.json index a7c37e4fba83..cb9b0a895e31 100644 --- a/code/presets/preact-webpack/package.json +++ b/code/presets/preact-webpack/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preset-preact-webpack", - "version": "7.3.1", + "version": "7.3.2", "description": "Storybook for Preact: Develop Preact Component in isolation.", "keywords": [ "storybook" diff --git a/code/presets/react-webpack/package.json b/code/presets/react-webpack/package.json index 34848ba43544..82437e0e5de9 100644 --- a/code/presets/react-webpack/package.json +++ b/code/presets/react-webpack/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preset-react-webpack", - "version": "7.3.1", + "version": "7.3.2", "description": "Storybook for React: Develop React Component in isolation with Hot Reloading", "keywords": [ "storybook" diff --git a/code/presets/server-webpack/package.json b/code/presets/server-webpack/package.json index f87530832203..80e911988ed0 100644 --- a/code/presets/server-webpack/package.json +++ b/code/presets/server-webpack/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preset-server-webpack", - "version": "7.3.1", + "version": "7.3.2", "description": "Storybook for Server: View HTML snippets from a server in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/presets/svelte-webpack/package.json b/code/presets/svelte-webpack/package.json index 8f9d5a86f923..0a22507f23a8 100644 --- a/code/presets/svelte-webpack/package.json +++ b/code/presets/svelte-webpack/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preset-svelte-webpack", - "version": "7.3.1", + "version": "7.3.2", "description": "Storybook for Svelte: Develop Svelte Component in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/presets/vue-webpack/package.json b/code/presets/vue-webpack/package.json index edd805a12d8c..54abe928b76b 100644 --- a/code/presets/vue-webpack/package.json +++ b/code/presets/vue-webpack/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preset-vue-webpack", - "version": "7.3.1", + "version": "7.3.2", "description": "Storybook for Vue: Develop Vue Component in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/presets/vue3-webpack/package.json b/code/presets/vue3-webpack/package.json index c22029a28226..442fcd8fa545 100644 --- a/code/presets/vue3-webpack/package.json +++ b/code/presets/vue3-webpack/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preset-vue3-webpack", - "version": "7.3.1", + "version": "7.3.2", "description": "Storybook for Vue 3: Develop Vue 3 Components in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/presets/web-components-webpack/package.json b/code/presets/web-components-webpack/package.json index 7209a3dbb946..d0f3ca03a60a 100644 --- a/code/presets/web-components-webpack/package.json +++ b/code/presets/web-components-webpack/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preset-web-components-webpack", - "version": "7.3.1", + "version": "7.3.2", "description": "Storybook for web-components: View web components snippets in isolation with Hot Reloading.", "keywords": [ "lit", diff --git a/code/renderers/html/package.json b/code/renderers/html/package.json index 0a3bba00b37c..baf855f6efdf 100644 --- a/code/renderers/html/package.json +++ b/code/renderers/html/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/html", - "version": "7.3.1", + "version": "7.3.2", "description": "Storybook HTML renderer", "keywords": [ "storybook" diff --git a/code/renderers/preact/package.json b/code/renderers/preact/package.json index dadf609012d7..1ffe627690a1 100644 --- a/code/renderers/preact/package.json +++ b/code/renderers/preact/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preact", - "version": "7.3.1", + "version": "7.3.2", "description": "Storybook Preact renderer", "keywords": [ "storybook" diff --git a/code/renderers/react/package.json b/code/renderers/react/package.json index 6a21584cbf45..8d8fcff5327d 100644 --- a/code/renderers/react/package.json +++ b/code/renderers/react/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/react", - "version": "7.3.1", + "version": "7.3.2", "description": "Storybook React renderer", "keywords": [ "storybook" diff --git a/code/renderers/server/package.json b/code/renderers/server/package.json index fa2203865aa6..c5f19f58a3e7 100644 --- a/code/renderers/server/package.json +++ b/code/renderers/server/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/server", - "version": "7.3.1", + "version": "7.3.2", "description": "Storybook Server renderer", "keywords": [ "storybook" diff --git a/code/renderers/svelte/package.json b/code/renderers/svelte/package.json index 555a3d66d493..b80fec764d18 100644 --- a/code/renderers/svelte/package.json +++ b/code/renderers/svelte/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/svelte", - "version": "7.3.1", + "version": "7.3.2", "description": "Storybook Svelte renderer", "keywords": [ "storybook" diff --git a/code/renderers/vue/package.json b/code/renderers/vue/package.json index 75bbe3566540..01862367eec0 100644 --- a/code/renderers/vue/package.json +++ b/code/renderers/vue/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/vue", - "version": "7.3.1", + "version": "7.3.2", "description": "Storybook Vue renderer", "keywords": [ "storybook" diff --git a/code/renderers/vue3/package.json b/code/renderers/vue3/package.json index 1851b10d8247..9a00d2380309 100644 --- a/code/renderers/vue3/package.json +++ b/code/renderers/vue3/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/vue3", - "version": "7.3.1", + "version": "7.3.2", "description": "Storybook Vue 3 renderer", "keywords": [ "storybook" diff --git a/code/renderers/web-components/package.json b/code/renderers/web-components/package.json index 0bd895f3e2ef..4e805aa3c99f 100644 --- a/code/renderers/web-components/package.json +++ b/code/renderers/web-components/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/web-components", - "version": "7.3.1", + "version": "7.3.2", "description": "Storybook web-components renderer", "keywords": [ "lit", diff --git a/code/ui/blocks/package.json b/code/ui/blocks/package.json index 614a5fd4a905..f0728ce0529a 100644 --- a/code/ui/blocks/package.json +++ b/code/ui/blocks/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/blocks", - "version": "7.3.1", + "version": "7.3.2", "description": "Storybook Doc Blocks", "keywords": [ "storybook" diff --git a/code/ui/components/package.json b/code/ui/components/package.json index 2d86313342fe..5ec09b98ce68 100644 --- a/code/ui/components/package.json +++ b/code/ui/components/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/components", - "version": "7.3.1", + "version": "7.3.2", "description": "Core Storybook Components", "keywords": [ "storybook" diff --git a/code/ui/manager/package.json b/code/ui/manager/package.json index bf858c589ccf..623bd50a535d 100644 --- a/code/ui/manager/package.json +++ b/code/ui/manager/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/manager", - "version": "7.3.1", + "version": "7.3.2", "description": "Core Storybook UI", "keywords": [ "storybook" From f86b57b56168feabe0673e09967974e6ae5a7755 Mon Sep 17 00:00:00 2001 From: Nathan Heaps <1282393+nsheaps@users.noreply.github.com> Date: Fri, 18 Aug 2023 15:15:30 -0400 Subject: [PATCH 025/115] Update error message to be useful when google fonts fail to load Helpful for debugging which fonts need to be mocked related: https://github.com/storybookjs/storybook/issues/23332 --- .../font/webpack/loader/google/get-font-face-declarations.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/frameworks/nextjs/src/font/webpack/loader/google/get-font-face-declarations.ts b/code/frameworks/nextjs/src/font/webpack/loader/google/get-font-face-declarations.ts index 9526072fe0bf..3f45a5d085e4 100644 --- a/code/frameworks/nextjs/src/font/webpack/loader/google/get-font-face-declarations.ts +++ b/code/frameworks/nextjs/src/font/webpack/loader/google/get-font-face-declarations.ts @@ -33,7 +33,7 @@ export async function getFontFaceDeclarations(options: LoaderOptions) { cssCache.delete(url); } if (fontFaceCSS === null) { - throw Error(`Failed to fetch \`${fontFamily}\` from Google Fonts.`); + throw Error(`Failed to fetch \`${fontFamily}\` from Google Fonts. URL: \`${url}\``); } return { @@ -45,6 +45,6 @@ export async function getFontFaceDeclarations(options: LoaderOptions) { variable, }; } catch (error) { - throw new Error("Google Fonts couldn't be loaded."); + throw new Error("Google Fonts couldn't be loaded.", {cause: error}); } } From 1f5b00b9b5c2b8e0a37cd2037f6d772539950b21 Mon Sep 17 00:00:00 2001 From: Nathan Heaps <1282393+nsheaps@users.noreply.github.com> Date: Fri, 18 Aug 2023 15:29:57 -0400 Subject: [PATCH 026/115] basic docs (will add code references in a moment) --- .../build-pages-with-storybook.md | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/docs/writing-stories/build-pages-with-storybook.md b/docs/writing-stories/build-pages-with-storybook.md index 4307a31020f4..90e0508a8a9f 100644 --- a/docs/writing-stories/build-pages-with-storybook.md +++ b/docs/writing-stories/build-pages-with-storybook.md @@ -394,3 +394,24 @@ If you’ve set up `GlobalContainerContext`, you’ll need to set up a decorator /> + +### Mocking fonts + +If your application uses fonts from a Google, occasionally fetching these fonts may fail as part of your storybook build. It is highly recommended to mock these requests, as those failures can cause your pipeline to fail as well. + +#### Mocking fonts in Next.js + +Next.js [supports](https://github.com/vercel/next.js/blob/725ddc7371f80cca273779d37f961c3e20356f95/packages/font/src/google/fetch-css-from-google-fonts.ts#L36)https://github.com/vercel/next.js/blob/725ddc7371f80cca273779d37f961c3e20356f95/packages/font/src/google/fetch-css-from-google-fonts.ts#L36 mocking fonts via a javascript module located where the env var `NEXT_FONT_GOOGLE_MOCKED_RESPONSES` references. + + + + + + From 9fb47bd45d06ba68d6fe840445581f3b48f23068 Mon Sep 17 00:00:00 2001 From: Nathan Heaps <1282393+nsheaps@users.noreply.github.com> Date: Fri, 18 Aug 2023 15:42:00 -0400 Subject: [PATCH 027/115] Update docs --- docs/sharing/publish-storybook.md | 6 ++++ ...hromatic-github-action-with-mocking.js.mdx | 10 +++++++ .../common/mocked-google-fonts.js.mdx | 29 +++++++++++++++++++ .../build-pages-with-storybook.md | 6 ++-- 4 files changed, 47 insertions(+), 4 deletions(-) create mode 100644 docs/snippets/common/chromatic-github-action-with-mocking.js.mdx create mode 100644 docs/snippets/common/mocked-google-fonts.js.mdx diff --git a/docs/sharing/publish-storybook.md b/docs/sharing/publish-storybook.md index 0c89b6978653..ad011fc3b7ab 100644 --- a/docs/sharing/publish-storybook.md +++ b/docs/sharing/publish-storybook.md @@ -109,6 +109,12 @@ In your project's root directory, add a new file called `chromatic.yml` inside t
+
+ +💡 External font resources may occasionally fail to load at build timefor a variety of reasons. If you have issues with them, a good way to get around that problem is to [mock the fonts](../writing-stories/build-pages-with-storybook.md#mocking-fonts) your application requires + +
+ Commit and push the file. Congratulations, you've successfully automated publishing your Storybook. Now whenever you open a PR you’ll get a handy link to your published Storybook in your PR checks. ![PR check publish](./prbadge-publish.png) diff --git a/docs/snippets/common/chromatic-github-action-with-mocking.js.mdx b/docs/snippets/common/chromatic-github-action-with-mocking.js.mdx new file mode 100644 index 000000000000..2b4ae573a5e5 --- /dev/null +++ b/docs/snippets/common/chromatic-github-action-with-mocking.js.mdx @@ -0,0 +1,10 @@ +```shell + - uses: chromaui/action@v1 + env: + #👇 the location of mocked fonts to use + NEXT_FONT_GOOGLE_MOCKED_RESPONSES: ${{ github.workspace }}/mocked-google-fonts.js + with: + #👇 Chromatic projectToken, + projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} + token: ${{ secrets.GITHUB_TOKEN }} +``` diff --git a/docs/snippets/common/mocked-google-fonts.js.mdx b/docs/snippets/common/mocked-google-fonts.js.mdx new file mode 100644 index 000000000000..ccc04bd0efab --- /dev/null +++ b/docs/snippets/common/mocked-google-fonts.js.mdx @@ -0,0 +1,29 @@ +```js +// mocked-google-fonts.js + +//👇 Mocked responses of google fonts +// If you run into errors during your build, easiest is to fetch them yourself and drop them in here +// so the URL requested explicitly matches the mocks rather than trying to determine it yourself. +module.exports = { + "https://fonts.googleapis.com/css?family=Inter:wght@400;500;600;800&display=block": ` + /* cyrillic-ext */ + @font-face { + font-family: 'Inter'; + font-style: normal; + font-weight: 400; + font-display: block; + src: url(https://fonts.gstatic.com/s/inter/v12/UcCO3FwrK3iLTeHuS_fvQtMwCp50KnMw2boKoduKmMEVuLyfAZJhiJ-Ek-_EeAmM.woff2) format('woff2'); + unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; + } + /* more font declarations go here */ + /* latin */ + @font-face { + font-family: 'Inter'; + font-style: normal; + font-weight: 400; + font-display: block; + src: url(https://fonts.gstatic.com/s/inter/v12/UcCO3FwrK3iLTeHuS_fvQtMwCp50KnMw2boKoduKmMEVuLyfAZ9hiJ-Ek-_EeA.woff2) format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; + }`, +} +``` diff --git a/docs/writing-stories/build-pages-with-storybook.md b/docs/writing-stories/build-pages-with-storybook.md index 90e0508a8a9f..6553d19cdf1d 100644 --- a/docs/writing-stories/build-pages-with-storybook.md +++ b/docs/writing-stories/build-pages-with-storybook.md @@ -407,10 +407,8 @@ Next.js [supports](https://github.com/vercel/next.js/blob/725ddc7371f80cca273779 From 6405f3646ca2935ff9eb882a6d6e131cceed3452 Mon Sep 17 00:00:00 2001 From: Nathan Heaps <1282393+nsheaps@users.noreply.github.com> Date: Fri, 18 Aug 2023 15:44:34 -0400 Subject: [PATCH 028/115] add missing space --- docs/sharing/publish-storybook.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sharing/publish-storybook.md b/docs/sharing/publish-storybook.md index ad011fc3b7ab..1e3b4145ff20 100644 --- a/docs/sharing/publish-storybook.md +++ b/docs/sharing/publish-storybook.md @@ -111,7 +111,7 @@ In your project's root directory, add a new file called `chromatic.yml` inside t
-💡 External font resources may occasionally fail to load at build timefor a variety of reasons. If you have issues with them, a good way to get around that problem is to [mock the fonts](../writing-stories/build-pages-with-storybook.md#mocking-fonts) your application requires +💡 External font resources may occasionally fail to load at build time for a variety of reasons. If you have issues with them, a good way to get around that problem is to [mock the fonts](../writing-stories/build-pages-with-storybook.md#mocking-fonts) your application requires
From 9d84f42bca9e03b435da00d9bde5f4e18447a3c7 Mon Sep 17 00:00:00 2001 From: Nathan Heaps <1282393+nsheaps@users.noreply.github.com> Date: Fri, 18 Aug 2023 15:48:22 -0400 Subject: [PATCH 029/115] remove extra word --- docs/writing-stories/build-pages-with-storybook.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/writing-stories/build-pages-with-storybook.md b/docs/writing-stories/build-pages-with-storybook.md index 6553d19cdf1d..53f1de9efb93 100644 --- a/docs/writing-stories/build-pages-with-storybook.md +++ b/docs/writing-stories/build-pages-with-storybook.md @@ -397,7 +397,7 @@ If you’ve set up `GlobalContainerContext`, you’ll need to set up a decorator ### Mocking fonts -If your application uses fonts from a Google, occasionally fetching these fonts may fail as part of your storybook build. It is highly recommended to mock these requests, as those failures can cause your pipeline to fail as well. +If your application uses fonts from Google, occasionally fetching these fonts may fail as part of your storybook build. It is highly recommended to mock these requests, as those failures can cause your pipeline to fail as well. #### Mocking fonts in Next.js From 13a729ca5501d4297e52dbf64c98eb7eef74964b Mon Sep 17 00:00:00 2001 From: Nathan Heaps <1282393+nsheaps@users.noreply.github.com> Date: Mon, 21 Aug 2023 09:51:58 -0400 Subject: [PATCH 030/115] linting --- .../font/webpack/loader/google/get-font-face-declarations.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/frameworks/nextjs/src/font/webpack/loader/google/get-font-face-declarations.ts b/code/frameworks/nextjs/src/font/webpack/loader/google/get-font-face-declarations.ts index 3f45a5d085e4..8da5b6acf833 100644 --- a/code/frameworks/nextjs/src/font/webpack/loader/google/get-font-face-declarations.ts +++ b/code/frameworks/nextjs/src/font/webpack/loader/google/get-font-face-declarations.ts @@ -45,6 +45,6 @@ export async function getFontFaceDeclarations(options: LoaderOptions) { variable, }; } catch (error) { - throw new Error("Google Fonts couldn't be loaded.", {cause: error}); + throw new Error("Google Fonts couldn't be loaded.", { cause: error }); } } From abf551fa1037b8d2eca81b2ea723964019a09588 Mon Sep 17 00:00:00 2001 From: Nathan Heaps Date: Mon, 21 Aug 2023 09:59:52 -0400 Subject: [PATCH 031/115] prettier linting --- docs/snippets/common/mocked-google-fonts.js.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/snippets/common/mocked-google-fonts.js.mdx b/docs/snippets/common/mocked-google-fonts.js.mdx index ccc04bd0efab..a56429147f1d 100644 --- a/docs/snippets/common/mocked-google-fonts.js.mdx +++ b/docs/snippets/common/mocked-google-fonts.js.mdx @@ -5,7 +5,7 @@ // If you run into errors during your build, easiest is to fetch them yourself and drop them in here // so the URL requested explicitly matches the mocks rather than trying to determine it yourself. module.exports = { - "https://fonts.googleapis.com/css?family=Inter:wght@400;500;600;800&display=block": ` + 'https://fonts.googleapis.com/css?family=Inter:wght@400;500;600;800&display=block': ` /* cyrillic-ext */ @font-face { font-family: 'Inter'; @@ -25,5 +25,5 @@ module.exports = { src: url(https://fonts.gstatic.com/s/inter/v12/UcCO3FwrK3iLTeHuS_fvQtMwCp50KnMw2boKoduKmMEVuLyfAZ9hiJ-Ek-_EeA.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }`, -} +}; ``` From 4d509a51811427e625f619f359db46c8117eee65 Mon Sep 17 00:00:00 2001 From: storybook-bot <32066757+storybook-bot@users.noreply.github.com> Date: Wed, 23 Aug 2023 10:10:04 +0000 Subject: [PATCH 032/115] Update ./docs/versions/next.json for v7.4.0-alpha.1 --- docs/versions/next.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/versions/next.json b/docs/versions/next.json index 13e20888799b..1c94da1365b5 100644 --- a/docs/versions/next.json +++ b/docs/versions/next.json @@ -1 +1 @@ -{"version":"7.4.0-alpha.0","info":{"plain":"- Index: Fix `*.story.*` CSF indexing - [#23852](https://github.com/storybookjs/storybook/pull/23852), thanks [@shilman](https://github.com/shilman)!"}} +{"version":"7.4.0-alpha.1","info":{"plain":"- Build: Migrate @storybook/scripts to strict-ts - [#23818](https://github.com/storybookjs/storybook/pull/23818), thanks [@stilt0n](https://github.com/stilt0n)!\n- CLI: Exclude addon-styling from upgrade - [#23841](https://github.com/storybookjs/storybook/pull/23841), thanks [@Integrayshaun](https://github.com/Integrayshaun)!\n- Core: Add error categorization framework - [#23653](https://github.com/storybookjs/storybook/pull/23653), thanks [@yannbf](https://github.com/yannbf)!\n- Core: Fix error thrown if `docs.defaultName` is unset - [#23893](https://github.com/storybookjs/storybook/pull/23893), thanks [@stilt0n](https://github.com/stilt0n)!\n- Core: Fix race-condition relating to `addons.setConfig` - [#23802](https://github.com/storybookjs/storybook/pull/23802), thanks [@ndelangen](https://github.com/ndelangen)!\n- Maintenance: Move filtering of sidebar into the state - [#23911](https://github.com/storybookjs/storybook/pull/23911), thanks [@ndelangen](https://github.com/ndelangen)!\n- Maintenance: Revert \"WebpackBuilder: Remove need for `react` as peerDependency\" - [#23882](https://github.com/storybookjs/storybook/pull/23882), thanks [@vanessayuenn](https://github.com/vanessayuenn)!\n- Manager API: Fix `api.getAddonState`default value - [#23804](https://github.com/storybookjs/storybook/pull/23804), thanks [@sookmax](https://github.com/sookmax)!\n- Publish: Don't distribute src files or unnecessary template files - [#23853](https://github.com/storybookjs/storybook/pull/23853), thanks [@shilman](https://github.com/shilman)!\n- UI: Add an experimental API for adding sidebar filter functions at runtime - [#23722](https://github.com/storybookjs/storybook/pull/23722), thanks [@ndelangen](https://github.com/ndelangen)!\n- UI: Removal of experimental components - [#23907](https://github.com/storybookjs/storybook/pull/23907), thanks [@ndelangen](https://github.com/ndelangen)!\n- Vue3: Add support for Global Apps install - [#23772](https://github.com/storybookjs/storybook/pull/23772), thanks [@chakAs3](https://github.com/chakAs3)!\n- Vue3: Use slot value directly if it's a string in source decorator - [#23784](https://github.com/storybookjs/storybook/pull/23784), thanks [@nasvillanueva](https://github.com/nasvillanueva)!"}} From 20111e41517b30334505b4ab9ae2c4ec56d3bd4d Mon Sep 17 00:00:00 2001 From: Marcin Date: Wed, 23 Aug 2023 08:45:48 -0700 Subject: [PATCH 033/115] removed. --- scripts/run-registry.ts | 2 +- scripts/utils/concurrency.js | 27 --------------------------- scripts/utils/concurrency.ts | 9 +++++++++ 3 files changed, 10 insertions(+), 28 deletions(-) delete mode 100644 scripts/utils/concurrency.js create mode 100644 scripts/utils/concurrency.ts diff --git a/scripts/run-registry.ts b/scripts/run-registry.ts index 34e5e8920920..54d82739d762 100755 --- a/scripts/run-registry.ts +++ b/scripts/run-registry.ts @@ -7,7 +7,7 @@ import program from 'commander'; import { runServer, parseConfigFile } from 'verdaccio'; import pLimit from 'p-limit'; import type { Server } from 'http'; -// @ts-expect-error (Converted from ts-ignore) + import { maxConcurrentTasks } from './utils/concurrency'; import { listOfPackages } from './utils/list-packages'; diff --git a/scripts/utils/concurrency.js b/scripts/utils/concurrency.js deleted file mode 100644 index 6745f3649014..000000000000 --- a/scripts/utils/concurrency.js +++ /dev/null @@ -1,27 +0,0 @@ -const os = require('os'); - -/** - * The maximum number of concurrent tasks we want to have on some CLI and CI tasks. - * The amount of CPUS minus one, arbitrary limited to 15 to not overload CI executors. - * @type {number} - */ -const maxConcurrentTasks = Math.min(Math.max(1, os.cpus().length - 1), 15); - -/** - * Use a simple round robin to filter input data according to the CI node currently running the script - * @param {Array} arrayOfData An array of anything you want - * @returns {Array} An array containing only the data that shoud be used by current CI node. - */ -function filterDataForCurrentCircleCINode(arrayOfData) { - const nodeIndex = +process.env.CIRCLE_NODE_INDEX || 0; - const numberOfNodes = +process.env.CIRCLE_NODE_TOTAL || 1; - - return arrayOfData.filter((_, index) => { - return index % numberOfNodes === nodeIndex; - }); -} - -module.exports = { - maxConcurrentTasks, - filterDataForCurrentCircleCINode, -}; diff --git a/scripts/utils/concurrency.ts b/scripts/utils/concurrency.ts new file mode 100644 index 000000000000..ab49dc41e8f5 --- /dev/null +++ b/scripts/utils/concurrency.ts @@ -0,0 +1,9 @@ +const os = require('os'); + +/** + * The maximum number of concurrent tasks we want to have on some CLI and CI tasks. + * The amount of CPUS minus one, arbitrary limited to 15 to not overload CI executors. + * @type {number} + */ +export const maxConcurrentTasks = Math.min(Math.max(1, os.cpus().length - 1), 15); + From 8fd8bcacbd9c498a78c7533b78e76238353b5cb8 Mon Sep 17 00:00:00 2001 From: Marcin Date: Wed, 23 Aug 2023 10:06:23 -0700 Subject: [PATCH 034/115] Fix type checking. --- .../src/js-package-manager/PNPMProxy.test.ts | 10 ++++- .../src/docs/typeScript/handleProp.test.tsx | 44 +++++++------------ 2 files changed, 23 insertions(+), 31 deletions(-) diff --git a/code/lib/cli/src/js-package-manager/PNPMProxy.test.ts b/code/lib/cli/src/js-package-manager/PNPMProxy.test.ts index e59bd7354bcc..fc89fd2b32f6 100644 --- a/code/lib/cli/src/js-package-manager/PNPMProxy.test.ts +++ b/code/lib/cli/src/js-package-manager/PNPMProxy.test.ts @@ -213,9 +213,14 @@ describe('PNPM Proxy', () => { .spyOn(pnpmProxy, 'writePackageJson') .mockImplementation(jest.fn()); + const basePackageAttributes = { + dependencies: {}, + devDependencies: {}, + }; + jest.spyOn(pnpmProxy, 'retrievePackageJson').mockImplementation( - // @ts-expect-error (not strict) - jest.fn(() => ({ + jest.fn(async () => ({ + ...basePackageAttributes, overrides: { bar: 'x.x.x', }, @@ -228,6 +233,7 @@ describe('PNPM Proxy', () => { await pnpmProxy.addPackageResolutions(versions); expect(writePackageSpy).toHaveBeenCalledWith({ + ...basePackageAttributes, overrides: { ...versions, bar: 'x.x.x', diff --git a/code/renderers/react/src/docs/typeScript/handleProp.test.tsx b/code/renderers/react/src/docs/typeScript/handleProp.test.tsx index 37527fd501df..ce74acf8be7c 100644 --- a/code/renderers/react/src/docs/typeScript/handleProp.test.tsx +++ b/code/renderers/react/src/docs/typeScript/handleProp.test.tsx @@ -64,7 +64,7 @@ function extractPropDef(component: Component, rawDefaultProp?: any): PropDef { describe('enhanceTypeScriptProp', () => { describe('defaultValue', () => { function createTestComponent( - defaultValue: DocgenPropDefaultValue, + defaultValue: DocgenPropDefaultValue | undefined, typeName = 'anything-is-fine' ): Component { return createComponent({ @@ -295,8 +295,7 @@ describe('enhanceTypeScriptProp', () => { }); it('should support strings', () => { - // @ts-expect-error (not strict) - const component = createTestComponent(null); + const component = createTestComponent(undefined); const { defaultValue } = extractPropDef(component, 'foo'); @@ -305,8 +304,7 @@ describe('enhanceTypeScriptProp', () => { }); it('should support array of primitives', () => { - // @ts-expect-error (not strict) - const component = createTestComponent(null); + const component = createTestComponent(undefined); const { defaultValue } = extractPropDef(component, [1, 2, 3]); @@ -315,8 +313,7 @@ describe('enhanceTypeScriptProp', () => { }); it('should support array of short object', () => { - // @ts-expect-error (not strict) - const component = createTestComponent(null); + const component = createTestComponent(undefined); const { defaultValue } = extractPropDef(component, [{ foo: 'bar' }]); @@ -325,8 +322,7 @@ describe('enhanceTypeScriptProp', () => { }); it('should support array of long object', () => { - // @ts-expect-error (not strict) - const component = createTestComponent(null); + const component = createTestComponent(undefined); const { defaultValue } = extractPropDef(component, [{ foo: 'bar', bar: 'foo', hey: 'ho' }]); @@ -342,8 +338,7 @@ describe('enhanceTypeScriptProp', () => { }); it('should support short object', () => { - // @ts-expect-error (not strict) - const component = createTestComponent(null); + const component = createTestComponent(undefined); const { defaultValue } = extractPropDef(component, { foo: 'bar' }); @@ -352,8 +347,7 @@ describe('enhanceTypeScriptProp', () => { }); it('should support long object', () => { - // @ts-expect-error (not strict) - const component = createTestComponent(null); + const component = createTestComponent(undefined); const { defaultValue } = extractPropDef(component, { foo: 'bar', bar: 'foo', hey: 'ho' }); @@ -369,8 +363,7 @@ describe('enhanceTypeScriptProp', () => { }); it('should support anonymous function', () => { - // @ts-expect-error (not strict) - const component = createTestComponent(null); + const component = createTestComponent(undefined); const { defaultValue } = extractPropDef(component, () => 'hey!'); @@ -379,8 +372,7 @@ describe('enhanceTypeScriptProp', () => { }); it('should support named function', () => { - // @ts-expect-error (not strict) - const component = createTestComponent(null); + const component = createTestComponent(undefined); const { defaultValue } = extractPropDef(component, function hello() { return 'world!'; @@ -391,8 +383,7 @@ describe('enhanceTypeScriptProp', () => { }); it('should support named function with params', () => { - // @ts-expect-error (not strict) - const component = createTestComponent(null); + const component = createTestComponent(undefined); const { defaultValue } = extractPropDef(component, function add(a: number, b: number) { return a + b; @@ -403,8 +394,7 @@ describe('enhanceTypeScriptProp', () => { }); it('should support React element', () => { - // @ts-expect-error (not strict) - const component = createTestComponent(null); + const component = createTestComponent(undefined); const defaultProp = ; // Simulate babel-plugin-add-react-displayname. @@ -417,8 +407,7 @@ describe('enhanceTypeScriptProp', () => { }); it('should support React element with props', () => { - // @ts-expect-error (not strict) - const component = createTestComponent(null); + const component = createTestComponent(undefined); // @ts-expect-error (Converted from ts-ignore) const defaultProp = ; @@ -432,8 +421,7 @@ describe('enhanceTypeScriptProp', () => { }); it('should support short HTML element', () => { - // @ts-expect-error (not strict) - const component = createTestComponent(null); + const component = createTestComponent(undefined); const { defaultValue } = extractPropDef(component,
HTML element
); @@ -442,8 +430,7 @@ describe('enhanceTypeScriptProp', () => { }); it('should support long HTML element', () => { - // @ts-expect-error (not strict) - const component = createTestComponent(null); + const component = createTestComponent(undefined); const { defaultValue } = extractPropDef( component, @@ -514,8 +501,7 @@ describe('enhanceTypeScriptProp', () => { }); it(`should support inlined named React functional component with props for ${x}`, () => { - // @ts-expect-error (not strict) - const component = createTestComponent(null, x); + const component = createTestComponent(undefined, x); const { defaultValue } = extractPropDef( component, From f7c77b073f8c997aec9d31b6a60152bf4a081e03 Mon Sep 17 00:00:00 2001 From: Marcin Date: Wed, 23 Aug 2023 10:13:02 -0700 Subject: [PATCH 035/115] fix error for title --- code/addons/links/src/utils.test.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/code/addons/links/src/utils.test.ts b/code/addons/links/src/utils.test.ts index f2dd2871501c..47a477b4104f 100644 --- a/code/addons/links/src/utils.test.ts +++ b/code/addons/links/src/utils.test.ts @@ -41,8 +41,7 @@ describe('preview', () => { it('should select the story (only) provided', () => { // simulate a currently selected, but not found as ID - // @ts-expect-error (not strict) - const handler = linkTo(undefined, 'name'); + const handler = linkTo('title', 'name'); handler(); expect(channel.emit).toHaveBeenCalledWith(SELECT_STORY, { From d1526a3c946548e0a6e7539da3b4b2b0c89801df Mon Sep 17 00:00:00 2001 From: Marcin Date: Wed, 23 Aug 2023 10:26:24 -0700 Subject: [PATCH 036/115] more fixes. --- .../react/src/docs/typeScript/handleProp.test.tsx | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/code/renderers/react/src/docs/typeScript/handleProp.test.tsx b/code/renderers/react/src/docs/typeScript/handleProp.test.tsx index ce74acf8be7c..a230f0229b5a 100644 --- a/code/renderers/react/src/docs/typeScript/handleProp.test.tsx +++ b/code/renderers/react/src/docs/typeScript/handleProp.test.tsx @@ -448,8 +448,7 @@ describe('enhanceTypeScriptProp', () => { ['element', 'elementType'].forEach((x) => { it(`should support inlined React class component for ${x}`, () => { - // @ts-expect-error (not strict) - const component = createTestComponent(null, x); + const component = createTestComponent(undefined, x); const { defaultValue } = extractPropDef( component, @@ -465,8 +464,7 @@ describe('enhanceTypeScriptProp', () => { }); it(`should support inlined anonymous React functional component for ${x}`, () => { - // @ts-expect-error (not strict) - const component = createTestComponent(null, x); + const component = createTestComponent(undefined, x); const { defaultValue } = extractPropDef(component, () => { return
Inlined FunctionalComponent!
; @@ -477,8 +475,7 @@ describe('enhanceTypeScriptProp', () => { }); it(`should support inlined anonymous React functional component with props for ${x}`, () => { - // @ts-expect-error (not strict) - const component = createTestComponent(null, x); + const component = createTestComponent(undefined, x); const { defaultValue } = extractPropDef(component, ({ foo }: { foo: string }) => { return
{foo}
; @@ -489,8 +486,7 @@ describe('enhanceTypeScriptProp', () => { }); it(`should support inlined named React functional component for ${x}`, () => { - // @ts-expect-error (not strict) - const component = createTestComponent(null, x); + const component = createTestComponent(undefined, x); const { defaultValue } = extractPropDef(component, function InlinedFunctionalComponent() { return
Inlined FunctionalComponent!
; From da3a4208779649f736c6d067e3b7e196a4973b59 Mon Sep 17 00:00:00 2001 From: storybook-bot <32066757+storybook-bot@users.noreply.github.com> Date: Fri, 25 Aug 2023 16:12:35 +0000 Subject: [PATCH 037/115] Update ./docs/versions/next.json for v7.4.0-alpha.2 --- docs/versions/next.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/versions/next.json b/docs/versions/next.json index 1c94da1365b5..b44395b73796 100644 --- a/docs/versions/next.json +++ b/docs/versions/next.json @@ -1 +1 @@ -{"version":"7.4.0-alpha.1","info":{"plain":"- Build: Migrate @storybook/scripts to strict-ts - [#23818](https://github.com/storybookjs/storybook/pull/23818), thanks [@stilt0n](https://github.com/stilt0n)!\n- CLI: Exclude addon-styling from upgrade - [#23841](https://github.com/storybookjs/storybook/pull/23841), thanks [@Integrayshaun](https://github.com/Integrayshaun)!\n- Core: Add error categorization framework - [#23653](https://github.com/storybookjs/storybook/pull/23653), thanks [@yannbf](https://github.com/yannbf)!\n- Core: Fix error thrown if `docs.defaultName` is unset - [#23893](https://github.com/storybookjs/storybook/pull/23893), thanks [@stilt0n](https://github.com/stilt0n)!\n- Core: Fix race-condition relating to `addons.setConfig` - [#23802](https://github.com/storybookjs/storybook/pull/23802), thanks [@ndelangen](https://github.com/ndelangen)!\n- Maintenance: Move filtering of sidebar into the state - [#23911](https://github.com/storybookjs/storybook/pull/23911), thanks [@ndelangen](https://github.com/ndelangen)!\n- Maintenance: Revert \"WebpackBuilder: Remove need for `react` as peerDependency\" - [#23882](https://github.com/storybookjs/storybook/pull/23882), thanks [@vanessayuenn](https://github.com/vanessayuenn)!\n- Manager API: Fix `api.getAddonState`default value - [#23804](https://github.com/storybookjs/storybook/pull/23804), thanks [@sookmax](https://github.com/sookmax)!\n- Publish: Don't distribute src files or unnecessary template files - [#23853](https://github.com/storybookjs/storybook/pull/23853), thanks [@shilman](https://github.com/shilman)!\n- UI: Add an experimental API for adding sidebar filter functions at runtime - [#23722](https://github.com/storybookjs/storybook/pull/23722), thanks [@ndelangen](https://github.com/ndelangen)!\n- UI: Removal of experimental components - [#23907](https://github.com/storybookjs/storybook/pull/23907), thanks [@ndelangen](https://github.com/ndelangen)!\n- Vue3: Add support for Global Apps install - [#23772](https://github.com/storybookjs/storybook/pull/23772), thanks [@chakAs3](https://github.com/chakAs3)!\n- Vue3: Use slot value directly if it's a string in source decorator - [#23784](https://github.com/storybookjs/storybook/pull/23784), thanks [@nasvillanueva](https://github.com/nasvillanueva)!"}} +{"version":"7.4.0-alpha.2","info":{"plain":"- Addon-docs: Resolve `mdx-react-shim` & `@storybook/global` correctly - [#23941](https://github.com/storybookjs/storybook/pull/23941), thanks [@ndelangen](https://github.com/ndelangen)!\n- Addons: Fix key is not a prop warning - [#23935](https://github.com/storybookjs/storybook/pull/23935), thanks [@kasperpeulen](https://github.com/kasperpeulen)!\n- CLI: Pass package manager to postinstall - [#23913](https://github.com/storybookjs/storybook/pull/23913), thanks [@Integrayshaun](https://github.com/Integrayshaun)!\n- CLI: Provide guidance for users who try to initialize Storybook on an empty dir - [#23874](https://github.com/storybookjs/storybook/pull/23874), thanks [@yannbf](https://github.com/yannbf)!\n- Logger: Fix double error messages/stack - [#23919](https://github.com/storybookjs/storybook/pull/23919), thanks [@ndelangen](https://github.com/ndelangen)!\n- Maintenance: Categorize server errors - [#23912](https://github.com/storybookjs/storybook/pull/23912), thanks [@yannbf](https://github.com/yannbf)!\n- Maintenance: Remove need for `react` as peerDependency - [#23897](https://github.com/storybookjs/storybook/pull/23897), thanks [@ndelangen](https://github.com/ndelangen)!\n- Maintenance: Remove sourcemaps generation - [#23936](https://github.com/storybookjs/storybook/pull/23936), thanks [@ndelangen](https://github.com/ndelangen)!\n- Preset: Add common preset overrides mechanism - [#23915](https://github.com/storybookjs/storybook/pull/23915), thanks [@yannbf](https://github.com/yannbf)!\n- UI: Add an experimental API for adding sidebar bottom toolbar - [#23778](https://github.com/storybookjs/storybook/pull/23778), thanks [@ndelangen](https://github.com/ndelangen)!\n- UI: Add an experimental API for adding sidebar top toolbar - [#23811](https://github.com/storybookjs/storybook/pull/23811), thanks [@ndelangen](https://github.com/ndelangen)!"}} From 643eec1e14a5179d97c436afb99d04910e562373 Mon Sep 17 00:00:00 2001 From: Marcin Date: Mon, 28 Aug 2023 07:21:31 -0700 Subject: [PATCH 038/115] updated. --- code/addons/links/src/utils.test.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/code/addons/links/src/utils.test.ts b/code/addons/links/src/utils.test.ts index 47a477b4104f..25499e4958d7 100644 --- a/code/addons/links/src/utils.test.ts +++ b/code/addons/links/src/utils.test.ts @@ -45,6 +45,7 @@ describe('preview', () => { handler(); expect(channel.emit).toHaveBeenCalledWith(SELECT_STORY, { + kind: 'title', story: 'name', }); }); From b652cd111292a0b74fe12db4319ac20d23b83ae5 Mon Sep 17 00:00:00 2001 From: Marcin Date: Mon, 28 Aug 2023 08:32:03 -0700 Subject: [PATCH 039/115] MERGED --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8bef7c303587..4633f6efc0b8 100644 --- a/README.md +++ b/README.md @@ -97,7 +97,7 @@ For additional help, join us in the [Storybook Discord](https://discord.gg/story ### Supported Frameworks -| Renderer | Demo | | +| Renderer | Demo | | | -------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | | [React](code/renderers/react) | [![Storybook demo](https://img.shields.io/npm/v/@storybook/react/latest?style=flat-square&color=blue&label)](https://next--630511d655df72125520f051.chromatic.com/) | [![React](https://img.shields.io/npm/dm/@storybook/react?style=flat-square&color=eee)](code/renderers/react) | | [Angular](code/frameworks/angular/) | [![Storybook demo](https://img.shields.io/npm/v/@storybook/angular/latest?style=flat-square&color=blue&label)](https://next--6322ce6af69825592bbb28fc.chromatic.com/) | [![Angular](https://img.shields.io/npm/dm/@storybook/angular?style=flat-square&color=eee)](code/frameworks/angular/) | From be61d0a4ebfc8ddef2e1ce059611c74d3f200841 Mon Sep 17 00:00:00 2001 From: Marcin Date: Mon, 28 Aug 2023 08:32:46 -0700 Subject: [PATCH 040/115] MERGED --- .circleci/config.yml | 5 +++++ docs/versions/latest.json | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7d187778889f..5e7cc4a22d24 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -195,6 +195,11 @@ jobs: command: | cd scripts yarn get-template --check + - run: + name: Type check + command: | + cd scripts + yarn check - run: name: Run tests command: | diff --git a/docs/versions/latest.json b/docs/versions/latest.json index 1a5c7ebf786b..7618803cf164 100644 --- a/docs/versions/latest.json +++ b/docs/versions/latest.json @@ -1 +1 @@ -{"version":"7.3.2","info":{"plain":"- Maintenance: Revert \"WebpackBuilder: Remove need for `react` as peerDependency\" - [#23882](https://github.com/storybookjs/storybook/pull/23882), thanks [@vanessayuenn](https://github.com/vanessayuenn)!"}} +{"version":"7.3.0","info":{"plain":"- Core: Improve `composeStories` typings - [#23577](https://github.com/storybookjs/storybook/pull/23577), thanks [@yannbf](https://github.com/yannbf)!"}} From d548caafc29571b4dbd3adf047307f84a02c832f Mon Sep 17 00:00:00 2001 From: Marcin Date: Mon, 28 Aug 2023 08:37:52 -0700 Subject: [PATCH 041/115] added --- scripts/run-registry.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/run-registry.ts b/scripts/run-registry.ts index 6735e9811a0b..9184e885b4d6 100755 --- a/scripts/run-registry.ts +++ b/scripts/run-registry.ts @@ -9,7 +9,7 @@ import pLimit from 'p-limit'; import type { Server } from 'http'; import { mkdir } from 'fs/promises'; import { PACKS_DIRECTORY } from './utils/constants'; -// @ts-expect-error (Converted from ts-ignore) + import { maxConcurrentTasks } from './utils/concurrency'; import { listOfPackages } from './utils/list-packages'; From 01717a64519e9bfb1692d6c675452a062ea66c54 Mon Sep 17 00:00:00 2001 From: Marcin Date: Mon, 28 Aug 2023 08:41:55 -0700 Subject: [PATCH 042/115] reverted --- code/addons/links/src/utils.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/addons/links/src/utils.test.ts b/code/addons/links/src/utils.test.ts index 25499e4958d7..f2dd2871501c 100644 --- a/code/addons/links/src/utils.test.ts +++ b/code/addons/links/src/utils.test.ts @@ -41,11 +41,11 @@ describe('preview', () => { it('should select the story (only) provided', () => { // simulate a currently selected, but not found as ID - const handler = linkTo('title', 'name'); + // @ts-expect-error (not strict) + const handler = linkTo(undefined, 'name'); handler(); expect(channel.emit).toHaveBeenCalledWith(SELECT_STORY, { - kind: 'title', story: 'name', }); }); From 3b7bfba9858f630ad8b27fa78040dcb5bcae1425 Mon Sep 17 00:00:00 2001 From: serious Date: Tue, 29 Aug 2023 11:36:26 +0200 Subject: [PATCH 043/115] Updated file-system-cache dependency to 2.4.4 --- code/lib/core-common/package.json | 2 +- code/lib/types/package.json | 2 +- code/yarn.lock | 15 ++++++++------- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/code/lib/core-common/package.json b/code/lib/core-common/package.json index 67977f76a0a6..0eb4267420df 100644 --- a/code/lib/core-common/package.json +++ b/code/lib/core-common/package.json @@ -52,7 +52,7 @@ "chalk": "^4.1.0", "esbuild": "^0.18.0", "esbuild-register": "^3.4.0", - "file-system-cache": "^2.4.2", + "file-system-cache": "^2.4.4", "find-cache-dir": "^3.0.0", "find-up": "^5.0.0", "fs-extra": "^11.1.0", diff --git a/code/lib/types/package.json b/code/lib/types/package.json index 986415c091c9..d9acca432833 100644 --- a/code/lib/types/package.json +++ b/code/lib/types/package.json @@ -46,7 +46,7 @@ "@storybook/channels": "7.1.0-beta.1", "@types/babel__core": "^7.0.0", "@types/express": "^4.7.0", - "file-system-cache": "^2.4.2" + "file-system-cache": "^2.4.4" }, "devDependencies": { "@storybook/csf": "^0.1.0", diff --git a/code/yarn.lock b/code/yarn.lock index 9628ecbfd11d..35bcec7fecbe 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -6148,7 +6148,7 @@ __metadata: chalk: ^4.1.0 esbuild: ^0.18.0 esbuild-register: ^3.4.0 - file-system-cache: ^2.4.2 + file-system-cache: ^2.4.4 find-cache-dir: ^3.0.0 find-up: ^5.0.0 fs-extra: ^11.1.0 @@ -7458,7 +7458,7 @@ __metadata: "@types/express": ^4.7.0 "@types/fs-extra": ^11.0.1 "@types/node": ^16.0.0 - file-system-cache: ^2.4.2 + file-system-cache: ^2.4.4 typescript: ~4.9.3 languageName: unknown linkType: soft @@ -8268,7 +8268,7 @@ __metadata: languageName: node linkType: hard -"@types/fs-extra@npm:^11.0.1": +"@types/fs-extra@npm:11.0.1, @types/fs-extra@npm:^11.0.1": version: 11.0.1 resolution: "@types/fs-extra@npm:11.0.1" dependencies: @@ -16014,14 +16014,15 @@ __metadata: languageName: node linkType: hard -"file-system-cache@npm:^2.4.2": - version: 2.4.2 - resolution: "file-system-cache@npm:2.4.2" +"file-system-cache@npm:^2.4.4": + version: 2.4.4 + resolution: "file-system-cache@npm:2.4.4" dependencies: + "@types/fs-extra": 11.0.1 "@types/ramda": 0.29.3 fs-extra: 11.1.1 ramda: 0.29.0 - checksum: fe7f348b7a88501656173f82269ac509dfc7fca720aecea26dc549996c253878e6a0af302afd30ffd5eea275f6801db7d17584031c31ee4ad01e1b89db5503c6 + checksum: 274bd9c2f8f81d0c3b2cc0d077807c969b48cac4857ae77f87b4b480548252aa42d3a43b3e9d4bb54df567eb70f0c384782514fcea74b78765543e9496e27e2d languageName: node linkType: hard From 07846ac1a946b0b28bd618e9bfdec5ce6255e12d Mon Sep 17 00:00:00 2001 From: Nathan Heaps <1282393+nsheaps@users.noreply.github.com> Date: Wed, 30 Aug 2023 09:28:03 -0400 Subject: [PATCH 044/115] PR feedback - move docs into nextjs specific readme --- code/frameworks/nextjs/README.md | 46 +++++++++++++++++++ docs/sharing/publish-storybook.md | 6 --- ...hromatic-github-action-with-mocking.js.mdx | 10 ---- .../common/mocked-google-fonts.js.mdx | 29 ------------ .../build-pages-with-storybook.md | 19 -------- 5 files changed, 46 insertions(+), 64 deletions(-) delete mode 100644 docs/snippets/common/chromatic-github-action-with-mocking.js.mdx delete mode 100644 docs/snippets/common/mocked-google-fonts.js.mdx diff --git a/code/frameworks/nextjs/README.md b/code/frameworks/nextjs/README.md index 4d9ea8542470..d1e1a33bcc85 100644 --- a/code/frameworks/nextjs/README.md +++ b/code/frameworks/nextjs/README.md @@ -19,6 +19,7 @@ - [next/font/google](#nextfontgoogle) - [next/font/local](#nextfontlocal) - [Not supported features of next/font](#not-supported-features-of-nextfont) + - [Mocking fonts during testing](#mocking-fonts-during-testing) - [Next.js Routing](#nextjs-routing) - [Overriding defaults](#overriding-defaults) - [Global Defaults](#global-defaults) @@ -271,6 +272,51 @@ The following features are not supported (yet). Support for these features might - [preload](https://nextjs.org/docs/api-reference/next/font#preload) option gets ignored. Storybook handles Font loading its own way. - [display](https://nextjs.org/docs/api-reference/next/font#display) option gets ignored. All fonts are loaded with display set to "block" to make Storybook load the font properly. +#### Mocking fonts during testing + +Occasionally fetching fonts from google may fail as part of your storybook build. It is highly recommended to mock these requests, as those failures can cause your pipeline to fail as well. Next.js [supports](https://github.com/vercel/next.js/blob/725ddc7371f80cca273779d37f961c3e20356f95/packages/font/src/google/fetch-css-from-google-fonts.ts#L36)https://github.com/vercel/next.js/blob/725ddc7371f80cca273779d37f961c3e20356f95/packages/font/src/google/fetch-css-from-google-fonts.ts#L36 mocking fonts via a javascript module located where the env var `NEXT_FONT_GOOGLE_MOCKED_RESPONSES` references. + +For example, using [GitHub Actions](https://www.chromatic.com/docs/github-actions): + +```shell + - uses: chromaui/action@v1 + env: + #👇 the location of mocked fonts to use + NEXT_FONT_GOOGLE_MOCKED_RESPONSES: ${{ github.workspace }}/mocked-google-fonts.js + with: + projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} + token: ${{ secrets.GITHUB_TOKEN }} +``` + +Your mocked fonts will look something lke this: + +```js +// mocked-google-fonts.js +//👇 Mocked responses of google fonts with the URL as the key +module.exports = { + 'https://fonts.googleapis.com/css?family=Inter:wght@400;500;600;800&display=block': ` + /* cyrillic-ext */ + @font-face { + font-family: 'Inter'; + font-style: normal; + font-weight: 400; + font-display: block; + src: url(https://fonts.gstatic.com/s/inter/v12/UcCO3FwrK3iLTeHuS_fvQtMwCp50KnMw2boKoduKmMEVuLyfAZJhiJ-Ek-_EeAmM.woff2) format('woff2'); + unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; + } + /* more font declarations go here */ + /* latin */ + @font-face { + font-family: 'Inter'; + font-style: normal; + font-weight: 400; + font-display: block; + src: url(https://fonts.gstatic.com/s/inter/v12/UcCO3FwrK3iLTeHuS_fvQtMwCp50KnMw2boKoduKmMEVuLyfAZ9hiJ-Ek-_EeA.woff2) format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; + }`, +}; +``` + ### Next.js Routing [Next.js's router](https://nextjs.org/docs/routing/introduction) is automatically stubbed for you so that when the router is interacted with, all of its interactions are automatically logged to the Actions ctions panel if you have the [Storybook actions addon](https://storybook.js.org/docs/react/essentials/actions). diff --git a/docs/sharing/publish-storybook.md b/docs/sharing/publish-storybook.md index 1e3b4145ff20..0c89b6978653 100644 --- a/docs/sharing/publish-storybook.md +++ b/docs/sharing/publish-storybook.md @@ -109,12 +109,6 @@ In your project's root directory, add a new file called `chromatic.yml` inside t
-
- -💡 External font resources may occasionally fail to load at build time for a variety of reasons. If you have issues with them, a good way to get around that problem is to [mock the fonts](../writing-stories/build-pages-with-storybook.md#mocking-fonts) your application requires - -
- Commit and push the file. Congratulations, you've successfully automated publishing your Storybook. Now whenever you open a PR you’ll get a handy link to your published Storybook in your PR checks. ![PR check publish](./prbadge-publish.png) diff --git a/docs/snippets/common/chromatic-github-action-with-mocking.js.mdx b/docs/snippets/common/chromatic-github-action-with-mocking.js.mdx deleted file mode 100644 index 2b4ae573a5e5..000000000000 --- a/docs/snippets/common/chromatic-github-action-with-mocking.js.mdx +++ /dev/null @@ -1,10 +0,0 @@ -```shell - - uses: chromaui/action@v1 - env: - #👇 the location of mocked fonts to use - NEXT_FONT_GOOGLE_MOCKED_RESPONSES: ${{ github.workspace }}/mocked-google-fonts.js - with: - #👇 Chromatic projectToken, - projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} - token: ${{ secrets.GITHUB_TOKEN }} -``` diff --git a/docs/snippets/common/mocked-google-fonts.js.mdx b/docs/snippets/common/mocked-google-fonts.js.mdx deleted file mode 100644 index a56429147f1d..000000000000 --- a/docs/snippets/common/mocked-google-fonts.js.mdx +++ /dev/null @@ -1,29 +0,0 @@ -```js -// mocked-google-fonts.js - -//👇 Mocked responses of google fonts -// If you run into errors during your build, easiest is to fetch them yourself and drop them in here -// so the URL requested explicitly matches the mocks rather than trying to determine it yourself. -module.exports = { - 'https://fonts.googleapis.com/css?family=Inter:wght@400;500;600;800&display=block': ` - /* cyrillic-ext */ - @font-face { - font-family: 'Inter'; - font-style: normal; - font-weight: 400; - font-display: block; - src: url(https://fonts.gstatic.com/s/inter/v12/UcCO3FwrK3iLTeHuS_fvQtMwCp50KnMw2boKoduKmMEVuLyfAZJhiJ-Ek-_EeAmM.woff2) format('woff2'); - unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; - } - /* more font declarations go here */ - /* latin */ - @font-face { - font-family: 'Inter'; - font-style: normal; - font-weight: 400; - font-display: block; - src: url(https://fonts.gstatic.com/s/inter/v12/UcCO3FwrK3iLTeHuS_fvQtMwCp50KnMw2boKoduKmMEVuLyfAZ9hiJ-Ek-_EeA.woff2) format('woff2'); - unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; - }`, -}; -``` diff --git a/docs/writing-stories/build-pages-with-storybook.md b/docs/writing-stories/build-pages-with-storybook.md index 53f1de9efb93..4307a31020f4 100644 --- a/docs/writing-stories/build-pages-with-storybook.md +++ b/docs/writing-stories/build-pages-with-storybook.md @@ -394,22 +394,3 @@ If you’ve set up `GlobalContainerContext`, you’ll need to set up a decorator /> - -### Mocking fonts - -If your application uses fonts from Google, occasionally fetching these fonts may fail as part of your storybook build. It is highly recommended to mock these requests, as those failures can cause your pipeline to fail as well. - -#### Mocking fonts in Next.js - -Next.js [supports](https://github.com/vercel/next.js/blob/725ddc7371f80cca273779d37f961c3e20356f95/packages/font/src/google/fetch-css-from-google-fonts.ts#L36)https://github.com/vercel/next.js/blob/725ddc7371f80cca273779d37f961c3e20356f95/packages/font/src/google/fetch-css-from-google-fonts.ts#L36 mocking fonts via a javascript module located where the env var `NEXT_FONT_GOOGLE_MOCKED_RESPONSES` references. - - - - - - From c6c1f7b4abe6e579345df94b6b836d44c5da2e6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20D=C3=A9ramond?= Date: Thu, 8 Dec 2022 18:14:39 +0100 Subject: [PATCH 045/115] Theming: add `barHoverColor` --- code/lib/theming/src/convert.ts | 2 ++ code/lib/theming/src/themes/dark.ts | 1 + code/lib/theming/src/themes/light.ts | 1 + code/lib/theming/src/types.ts | 2 ++ code/ui/components/src/components/bar/button.tsx | 4 ++-- 5 files changed, 8 insertions(+), 2 deletions(-) diff --git a/code/lib/theming/src/convert.ts b/code/lib/theming/src/convert.ts index b4054f03c5a0..05ecaaf1f322 100644 --- a/code/lib/theming/src/convert.ts +++ b/code/lib/theming/src/convert.ts @@ -88,6 +88,7 @@ export const convert = (inherit: ThemeVars = themes[getPreferredColorScheme()]): textColor, textInverseColor, barTextColor, + barHoverColor, barSelectedColor, barBg, buttonBg, @@ -157,6 +158,7 @@ export const convert = (inherit: ThemeVars = themes[getPreferredColorScheme()]): // Toolbar default/active colors barTextColor, + barHoverColor: barHoverColor || colorSecondary, barSelectedColor: barSelectedColor || colorSecondary, barBg, diff --git a/code/lib/theming/src/themes/dark.ts b/code/lib/theming/src/themes/dark.ts index ec9fa9f94f34..49fea0807c25 100644 --- a/code/lib/theming/src/themes/dark.ts +++ b/code/lib/theming/src/themes/dark.ts @@ -25,6 +25,7 @@ const theme: ThemeVars = { // Toolbar default and active colors barTextColor: '#798186', + barHoverColor: color.secondary, barSelectedColor: color.secondary, barBg: '#292C2E', diff --git a/code/lib/theming/src/themes/light.ts b/code/lib/theming/src/themes/light.ts index 9ca253bca7ce..88508b62b8c4 100644 --- a/code/lib/theming/src/themes/light.ts +++ b/code/lib/theming/src/themes/light.ts @@ -25,6 +25,7 @@ const theme: ThemeVars = { // Toolbar default and active colors barTextColor: color.mediumdark, + barHoverColor: color.secondary, barSelectedColor: color.secondary, barBg: color.lightest, diff --git a/code/lib/theming/src/types.ts b/code/lib/theming/src/types.ts index c8f2f9a9fa54..b6f28f8c955f 100644 --- a/code/lib/theming/src/types.ts +++ b/code/lib/theming/src/types.ts @@ -31,6 +31,7 @@ export interface ThemeVarsColors { // Toolbar default and active colors barTextColor: string; + barHoverColor: string; barSelectedColor: string; barBg: string; @@ -87,6 +88,7 @@ export interface StorybookTheme { // Toolbar default/active colors barTextColor: string; + barHoverColor: string; barSelectedColor: string; barBg: string; diff --git a/code/ui/components/src/components/bar/button.tsx b/code/ui/components/src/components/bar/button.tsx index a65e6fa7bc4e..7cee1e72fad7 100644 --- a/code/ui/components/src/components/bar/button.tsx +++ b/code/ui/components/src/components/bar/button.tsx @@ -116,7 +116,7 @@ export const IconButton = styled(ButtonOrLink, { shouldForwardProp: isPropValid active ? { backgroundColor: theme.background.hoverable, - color: theme.color.secondary, + color: theme.barSelectedColor, } : {}, ({ disabled, theme }) => @@ -128,7 +128,7 @@ export const IconButton = styled(ButtonOrLink, { shouldForwardProp: isPropValid : { '&:hover, &:focus-visible': { background: transparentize(0.88, theme.color.secondary), - color: theme.color.secondary, + color: theme.barHoverColor, }, '&:focus-visible': { outline: auto, // Ensures links have the same focus style From d6be6ba3720fcf11e801ebf55894d0253208647d Mon Sep 17 00:00:00 2001 From: j3rem1e Date: Thu, 31 Aug 2023 22:24:26 +0200 Subject: [PATCH 046/115] Fix generated properties on Svelte event handler --- .../svelte/src/docs/sourceDecorator.test.ts | 36 +++++++++++++++++++ .../svelte/src/docs/sourceDecorator.ts | 28 +++++++++++---- 2 files changed, 57 insertions(+), 7 deletions(-) diff --git a/code/renderers/svelte/src/docs/sourceDecorator.test.ts b/code/renderers/svelte/src/docs/sourceDecorator.test.ts index 86b30788f462..6123b45d8b94 100644 --- a/code/renderers/svelte/src/docs/sourceDecorator.test.ts +++ b/code/renderers/svelte/src/docs/sourceDecorator.test.ts @@ -7,6 +7,9 @@ expect.addSnapshotSerializer({ test: (val: unknown) => typeof val === 'string', }); +const loremIpsum = 'Lorem ipsum dolor sit amet'; +const lotOfProperties = { property1: loremIpsum, property2: loremIpsum, property3: loremIpsum }; + function generateForArgs(args: Args, slotProperty: string | null = null) { return generateSvelteSource({ name: 'Component' }, args, {}, slotProperty); } @@ -35,6 +38,14 @@ describe('generateSvelteSource', () => { test('multiple properties', () => { expect(generateForArgs({ a: 1, b: 2 })).toMatchInlineSnapshot(``); }); + test('lot of properties', () => { + expect(generateForArgs(lotOfProperties)).toMatchInlineSnapshot(` + + `); + }); test('slot property', () => { expect(generateForArgs({ content: 'xyz', myProp: 'abc' }, 'content')).toMatchInlineSnapshot(` @@ -42,7 +53,32 @@ describe('generateSvelteSource', () => { `); }); + test('slot property with lot of properties', () => { + expect(generateForArgs({ content: 'xyz', ...lotOfProperties }, 'content')) + .toMatchInlineSnapshot(` + + xyz + + `); + }); test('component is not set', () => { expect(generateSvelteSource(null, {}, {}, null)).toBeNull(); }); + test('Skip event property', () => { + expect( + generateSvelteSource( + { name: 'Component' }, + { event_click: () => {} }, + { event_click: { action: 'click' } } + ) + ).toMatchInlineSnapshot(``); + }); + test('Property value is a function', () => { + expect( + generateSvelteSource({ name: 'Component' }, { myHandler: () => {} }, {}) + ).toMatchInlineSnapshot(`}/>`); + }); }); diff --git a/code/renderers/svelte/src/docs/sourceDecorator.ts b/code/renderers/svelte/src/docs/sourceDecorator.ts index 9f16caf80162..7b61eea6a7e9 100644 --- a/code/renderers/svelte/src/docs/sourceDecorator.ts +++ b/code/renderers/svelte/src/docs/sourceDecorator.ts @@ -38,8 +38,15 @@ function toSvelteProperty(key: string, value: any, argTypes: ArgTypes): string | return null; } + const argType = argTypes[key]; + // default value ? - if (argTypes[key] && argTypes[key].defaultValue === value) { + if (argType && argType.defaultValue === value) { + return null; + } + + // event should be skipped + if (argType && argType.action) { return null; } @@ -51,6 +58,11 @@ function toSvelteProperty(key: string, value: any, argTypes: ArgTypes): string | return `${key}=${JSON.stringify(value)}`; } + // handle function + if (typeof value === 'function') { + return `${key}={}`; + } + return `${key}={${JSON.stringify(value)}}`; } @@ -98,19 +110,21 @@ export function generateSvelteSource( return null; } - const props = Object.entries(args) + const propsArray = Object.entries(args) .filter(([k]) => k !== slotProperty) .map(([k, v]) => toSvelteProperty(k, v, argTypes)) - .filter((p) => p) - .join(' '); + .filter((p) => p); + const props = propsArray.join(' '); + + const multiline = props.length > 50; const slotValue = slotProperty ? args[slotProperty] : null; + const srcStart = multiline ? `<${name}\n ${propsArray.join('\n ')}` : `<${name} ${props}`; if (slotValue) { - return `<${name} ${props}>\n ${slotValue}\n`; + return `${srcStart}>\n ${slotValue}\n`; } - - return `<${name} ${props}/>`; + return `${srcStart}/>`; } /** From 3648a0e11f808d1593b37042d59f46e101f475c2 Mon Sep 17 00:00:00 2001 From: Yann Braga Date: Wed, 30 Aug 2023 14:51:01 +0200 Subject: [PATCH 047/115] categorize angular legacy build options error --- MIGRATION.md | 6 +- code/frameworks/angular/README.md | 6 +- .../server/framework-preset-angular-cli.ts | 15 +---- .../src/automigrate/fixes/angular-builders.ts | 4 +- .../lib/cli/src/generators/ANGULAR/helpers.ts | 5 +- .../core-events/src/errors/preview-errors.ts | 19 ------- .../core-events/src/errors/server-errors.ts | 55 +++++++++++++++++++ 7 files changed, 71 insertions(+), 39 deletions(-) diff --git a/MIGRATION.md b/MIGRATION.md index 5022eefb59bd..d7c47af924b3 100644 --- a/MIGRATION.md +++ b/MIGRATION.md @@ -1044,7 +1044,11 @@ Starting in 7.0, we drop support for Angular < 14 #### Angular: Drop support for calling Storybook directly -In Storybook 6.4 we have deprecated calling Storybook directly (`npm run storybook`) for Angular. In Storybook 7.0, we've removed it entirely. Instead you have to set up the Storybook builder in your `angular.json` and execute `ng run :storybook` to start Storybook. Please visit https://github.com/storybookjs/storybook/tree/next/code/frameworks/angular to set up Storybook for Angular correctly. +_Has automigration_ + +In Storybook 6.4 we deprecated calling Storybook directly (e.g. `npm run storybook`) for Angular. In Storybook 7.0, we've removed it entirely. Instead, you have to set up the Storybook builder in your `angular.json` and execute `ng run :storybook` to start Storybook. + +You can run `npx storybook@next automigrate` to automatically fix your configuration, or visit https://github.com/storybookjs/storybook/tree/next/code/frameworks/angular/README.md#how-do-i-migrate-to-an-angular-storybook-builder for instructions on how to set up Storybook for Angular manually. #### Angular: Application providers and ModuleWithProviders diff --git a/code/frameworks/angular/README.md b/code/frameworks/angular/README.md index 3158060f3f9a..d97e1ab93f2a 100644 --- a/code/frameworks/angular/README.md +++ b/code/frameworks/angular/README.md @@ -10,7 +10,7 @@ - [moduleMetadata decorator](#modulemetadata-decorator) - [applicationConfig decorator](#applicationconfig-decorator) - [FAQ](#faq) - - [How do I migrate to a Angular Storybook builder?](#how-do-i-migrate-to-a-angular-storybook-builder) + - [How do I migrate to an Angular Storybook builder?](#how-do-i-migrate-to-an-angular-storybook-builder) - [Do you have only one Angular project in your workspace?](#do-you-have-only-one-angular-project-in-your-workspace) - [Adjust your `package.json`](#adjust-your-packagejson) - [I have multiple projects in my Angular workspace](#i-have-multiple-projects-in-my-angular-workspace) @@ -252,10 +252,12 @@ export const WithCustomApplicationProvider: Story = { ## FAQ -### How do I migrate to a Angular Storybook builder? +### How do I migrate to an Angular Storybook builder? The Storybook [Angular builder](https://angular.io/guide/glossary#builder) is a new way to run Storybook in an Angular workspace. It is a drop-in replacement for running `storybook dev` and `storybook build` directly. +You can run `npx storybook@next automigrate` to try let Storybook detect and automatically fix your configuration. Otherwise, you can follow the next steps to manually adjust your configuration. + #### Do you have only one Angular project in your workspace? In this case go to your `angular.json` and add `storybook` and `build-storybook` entries in `architect` section of your project like shown above. diff --git a/code/frameworks/angular/src/server/framework-preset-angular-cli.ts b/code/frameworks/angular/src/server/framework-preset-angular-cli.ts index f8f78996c366..059d8b30f4d1 100644 --- a/code/frameworks/angular/src/server/framework-preset-angular-cli.ts +++ b/code/frameworks/angular/src/server/framework-preset-angular-cli.ts @@ -1,10 +1,10 @@ import webpack from 'webpack'; import { logger } from '@storybook/node-logger'; +import { AngularLegacyBuildOptionsError } from '@storybook/core-events/server-errors'; import { BuilderContext, targetFromTargetString } from '@angular-devkit/architect'; import { sync as findUpSync } from 'find-up'; -import { dedent } from 'ts-dedent'; - import { JsonObject, logging } from '@angular-devkit/core'; + import { getWebpackConfig as getCustomWebpackConfig } from './angular-cli-webpack'; import { moduleIsAvailable } from './utils/module-is-available'; import { PresetOptions } from './preset-options'; @@ -85,13 +85,6 @@ async function getBuilderOptions( return builderOptions; } -export const migrationToBuilderReferrenceMessage = dedent`Your Storybook startup uses a solution that is not supported. - You must use angular builder to have an explicit configuration on the project used in angular.json - Read more at: - - https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#sb-angular-builder) - - https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#angular13) - `; - /** * Checks if using legacy configuration that doesn't use builder and logs message referring to migration docs. */ @@ -101,7 +94,5 @@ function checkForLegacyBuildOptions(options: PresetOptions) { return; } - logger.error(migrationToBuilderReferrenceMessage); - - throw Error('angularBrowserTarget is undefined.'); + throw new AngularLegacyBuildOptionsError(); } diff --git a/code/lib/cli/src/automigrate/fixes/angular-builders.ts b/code/lib/cli/src/automigrate/fixes/angular-builders.ts index 626723f091ff..3bdc9da5062c 100644 --- a/code/lib/cli/src/automigrate/fixes/angular-builders.ts +++ b/code/lib/cli/src/automigrate/fixes/angular-builders.ts @@ -59,14 +59,14 @@ export const angularBuilders: Fix = { prompt() { return dedent` - We have detected that your project does not use the Storybook Angular builder yet. In Storybook 6.4 we have deprecated calling Storybook directly (npm run storybook) for Angular. In Storybook 7.0, we've removed it entirely. + We have detected that your project does not use the Storybook Angular builder yet. In Storybook 6.4 we deprecated calling Storybook directly (npm run storybook) for Angular. In Storybook 7.0, we've removed it entirely. In order to use the Storybook Angular builder, we need to add a few entries to your angular.json file. Additionally, we will add the @compodoc/compodoc package to your devDependencies if you want and we will add a few scripts to your package.json file. Also feel free to remove the Compodoc script from your package.json file if you don't use it apart from Storybook anymore. Storybook uses Compodoc internally and you don't have to call in separately anymore. Read more about the Angular builder here: ${chalk.yellow( - 'https://storybook.js.org/docs/angular/configure/storybook-builders' + 'https://github.com/storybookjs/storybook/tree/next/code/frameworks/angular#how-do-i-migrate-to-an-angular-storybook-builder' )} `; }, diff --git a/code/lib/cli/src/generators/ANGULAR/helpers.ts b/code/lib/cli/src/generators/ANGULAR/helpers.ts index d1774e583017..459cbeac8165 100644 --- a/code/lib/cli/src/generators/ANGULAR/helpers.ts +++ b/code/lib/cli/src/generators/ANGULAR/helpers.ts @@ -1,6 +1,7 @@ import fs from 'fs'; import prompts from 'prompts'; import dedent from 'ts-dedent'; +import { MissingAngularJsonError } from '@storybook/core-events/server-errors'; export const ANGULAR_JSON_PATH = 'angular.json'; @@ -27,9 +28,7 @@ export class AngularJSON { constructor() { if (!fs.existsSync(ANGULAR_JSON_PATH)) { - throw new Error( - 'An angular.json file was not found in the current working directory. Storybook needs it to work properly, so please rerun the command at the root of your project, where the angular.json file is located. More info: https://storybook.js.org/docs/angular/faq#error-no-angularjson-file-found' - ); + throw new MissingAngularJsonError(); } const jsonContent = fs.readFileSync(ANGULAR_JSON_PATH, 'utf8'); diff --git a/code/lib/core-events/src/errors/preview-errors.ts b/code/lib/core-events/src/errors/preview-errors.ts index 3a2fe93aecf5..84161db505b8 100644 --- a/code/lib/core-events/src/errors/preview-errors.ts +++ b/code/lib/core-events/src/errors/preview-errors.ts @@ -19,25 +19,6 @@ export enum Category { PREVIEW_REACT_DOM_SHIM = 'PREVIEW_REACT-DOM-SHIM', PREVIEW_ROUTER = 'PREVIEW_ROUTER', PREVIEW_THEMING = 'PREVIEW_THEMING', - FRAMEWORK_ANGULAR = 'FRAMEWORK_ANGULAR', - FRAMEWORK_EMBER = 'FRAMEWORK_EMBER', - FRAMEWORK_HTML_VITE = 'FRAMEWORK_HTML-VITE', - FRAMEWORK_HTML_WEBPACK5 = 'FRAMEWORK_HTML-WEBPACK5', - FRAMEWORK_NEXTJS = 'FRAMEWORK_NEXTJS', - FRAMEWORK_PREACT_VITE = 'FRAMEWORK_PREACT-VITE', - FRAMEWORK_PREACT_WEBPACK5 = 'FRAMEWORK_PREACT-WEBPACK5', - FRAMEWORK_REACT_VITE = 'FRAMEWORK_REACT-VITE', - FRAMEWORK_REACT_WEBPACK5 = 'FRAMEWORK_REACT-WEBPACK5', - FRAMEWORK_SERVER_WEBPACK5 = 'FRAMEWORK_SERVER-WEBPACK5', - FRAMEWORK_SVELTE_VITE = 'FRAMEWORK_SVELTE-VITE', - FRAMEWORK_SVELTE_WEBPACK5 = 'FRAMEWORK_SVELTE-WEBPACK5', - FRAMEWORK_SVELTEKIT = 'FRAMEWORK_SVELTEKIT', - FRAMEWORK_VUE_VITE = 'FRAMEWORK_VUE-VITE', - FRAMEWORK_VUE_WEBPACK5 = 'FRAMEWORK_VUE-WEBPACK5', - FRAMEWORK_VUE3_VITE = 'FRAMEWORK_VUE3-VITE', - FRAMEWORK_VUE3_WEBPACK5 = 'FRAMEWORK_VUE3-WEBPACK5', - FRAMEWORK_WEB_COMPONENTS_VITE = 'FRAMEWORK_WEB-COMPONENTS-VITE', - FRAMEWORK_WEB_COMPONENTS_WEBPACK5 = 'FRAMEWORK_WEB-COMPONENTS-WEBPACK5', RENDERER_HTML = 'RENDERER_HTML', RENDERER_PREACT = 'RENDERER_PREACT', RENDERER_REACT = 'RENDERER_REACT', diff --git a/code/lib/core-events/src/errors/server-errors.ts b/code/lib/core-events/src/errors/server-errors.ts index bba1faec306f..5d7068a10912 100644 --- a/code/lib/core-events/src/errors/server-errors.ts +++ b/code/lib/core-events/src/errors/server-errors.ts @@ -28,6 +28,25 @@ export enum Category { POSTINSTALL = 'POSTINSTALL', DOCS_TOOLS = 'DOCS-TOOLS', CORE_WEBPACK = 'CORE-WEBPACK', + FRAMEWORK_ANGULAR = 'FRAMEWORK_ANGULAR', + FRAMEWORK_EMBER = 'FRAMEWORK_EMBER', + FRAMEWORK_HTML_VITE = 'FRAMEWORK_HTML-VITE', + FRAMEWORK_HTML_WEBPACK5 = 'FRAMEWORK_HTML-WEBPACK5', + FRAMEWORK_NEXTJS = 'FRAMEWORK_NEXTJS', + FRAMEWORK_PREACT_VITE = 'FRAMEWORK_PREACT-VITE', + FRAMEWORK_PREACT_WEBPACK5 = 'FRAMEWORK_PREACT-WEBPACK5', + FRAMEWORK_REACT_VITE = 'FRAMEWORK_REACT-VITE', + FRAMEWORK_REACT_WEBPACK5 = 'FRAMEWORK_REACT-WEBPACK5', + FRAMEWORK_SERVER_WEBPACK5 = 'FRAMEWORK_SERVER-WEBPACK5', + FRAMEWORK_SVELTE_VITE = 'FRAMEWORK_SVELTE-VITE', + FRAMEWORK_SVELTE_WEBPACK5 = 'FRAMEWORK_SVELTE-WEBPACK5', + FRAMEWORK_SVELTEKIT = 'FRAMEWORK_SVELTEKIT', + FRAMEWORK_VUE_VITE = 'FRAMEWORK_VUE-VITE', + FRAMEWORK_VUE_WEBPACK5 = 'FRAMEWORK_VUE-WEBPACK5', + FRAMEWORK_VUE3_VITE = 'FRAMEWORK_VUE3-VITE', + FRAMEWORK_VUE3_WEBPACK5 = 'FRAMEWORK_VUE3-WEBPACK5', + FRAMEWORK_WEB_COMPONENTS_VITE = 'FRAMEWORK_WEB-COMPONENTS-VITE', + FRAMEWORK_WEB_COMPONENTS_WEBPACK5 = 'FRAMEWORK_WEB-COMPONENTS-WEBPACK5', } export class NxProjectDetectedError extends StorybookError { @@ -216,3 +235,39 @@ export class WebpackCompilationError extends StorybookError { `; } } + +export class MissingAngularJsonError extends StorybookError { + readonly category = Category.CLI_INIT; + + readonly code = 2; + + public readonly documentation = + 'https://storybook.js.org/docs/angular/faq#error-no-angularjson-file-found'; + + template() { + return dedent` + An angular.json file was not found in the current working directory. + Storybook needs it to work properly, so please rerun the command at the root of your project, where the angular.json file is located. + `; + } +} + +export class AngularLegacyBuildOptionsError extends StorybookError { + readonly category = Category.FRAMEWORK_ANGULAR; + + readonly code = 1; + + public readonly documentation = [ + 'https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#angular-drop-support-for-calling-storybook-directly', + 'https://github.com/storybookjs/storybook/tree/next/code/frameworks/angular#how-do-i-migrate-to-an-angular-storybook-builder', + ]; + + template() { + return dedent` + Your Storybook startup script uses a solution that is not supported anymore. + You must use Angular builder to have an explicit configuration on the project used in angular.json. + + Please run 'npx storybook@next automigrate' to automatically fix your config. + `; + } +} From 95bdc7e8e4761dd69ae631b377a0db4723194083 Mon Sep 17 00:00:00 2001 From: Yann Braga Date: Mon, 4 Sep 2023 16:48:21 +0200 Subject: [PATCH 048/115] small refactor --- code/ui/manager/src/components/sidebar/Search.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/code/ui/manager/src/components/sidebar/Search.tsx b/code/ui/manager/src/components/sidebar/Search.tsx index 5f13898c79c5..d9d03217db38 100644 --- a/code/ui/manager/src/components/sidebar/Search.tsx +++ b/code/ui/manager/src/components/sidebar/Search.tsx @@ -348,8 +348,9 @@ export const Search = React.memo<{ } } + const inputId = 'storybook-explorer-searchfield'; const inputProps = getInputProps({ - id: 'storybook-explorer-searchfield', + id: inputId, ref: inputRef, required: true, type: 'search', @@ -362,7 +363,7 @@ export const Search = React.memo<{ }); const labelProps = getLabelProps({ - htmlFor: 'storybook-explorer-searchfield', + htmlFor: inputId, }); return ( From 8dae1fe5872fd36e35bd42f402fc087fed88bdf0 Mon Sep 17 00:00:00 2001 From: Nathan Heaps <1282393+nsheaps@users.noreply.github.com> Date: Mon, 4 Sep 2023 12:02:39 -0400 Subject: [PATCH 049/115] Apply suggestions from code review Co-authored-by: Yann Braga --- code/frameworks/nextjs/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/frameworks/nextjs/README.md b/code/frameworks/nextjs/README.md index d1e1a33bcc85..21624ab23efa 100644 --- a/code/frameworks/nextjs/README.md +++ b/code/frameworks/nextjs/README.md @@ -274,7 +274,7 @@ The following features are not supported (yet). Support for these features might #### Mocking fonts during testing -Occasionally fetching fonts from google may fail as part of your storybook build. It is highly recommended to mock these requests, as those failures can cause your pipeline to fail as well. Next.js [supports](https://github.com/vercel/next.js/blob/725ddc7371f80cca273779d37f961c3e20356f95/packages/font/src/google/fetch-css-from-google-fonts.ts#L36)https://github.com/vercel/next.js/blob/725ddc7371f80cca273779d37f961c3e20356f95/packages/font/src/google/fetch-css-from-google-fonts.ts#L36 mocking fonts via a javascript module located where the env var `NEXT_FONT_GOOGLE_MOCKED_RESPONSES` references. +Occasionally fetching fonts from Google may fail as part of your Storybook build step. It is highly recommended to mock these requests, as those failures can cause your pipeline to fail as well. Next.js [supports mocking fonts](https://github.com/vercel/next.js/blob/725ddc7371f80cca273779d37f961c3e20356f95/packages/font/src/google/fetch-css-from-google-fonts.ts#L36) via a JavaScript module located where the env var `NEXT_FONT_GOOGLE_MOCKED_RESPONSES` references. For example, using [GitHub Actions](https://www.chromatic.com/docs/github-actions): @@ -288,7 +288,7 @@ For example, using [GitHub Actions](https://www.chromatic.com/docs/github-action token: ${{ secrets.GITHUB_TOKEN }} ``` -Your mocked fonts will look something lke this: +Your mocked fonts will look something like this: ```js // mocked-google-fonts.js From 911aee2fec21ce0cafbbfcf53a67f64304347734 Mon Sep 17 00:00:00 2001 From: jonniebigodes Date: Mon, 4 Sep 2023 20:49:55 +0100 Subject: [PATCH 050/115] Adds action video to the documentation --- docs/essentials/actions.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/essentials/actions.md b/docs/essentials/actions.md index 130b05a2e307..2ffc18444046 100644 --- a/docs/essentials/actions.md +++ b/docs/essentials/actions.md @@ -2,6 +2,8 @@ title: 'Actions' --- + + The actions addon is used to display data received by event handler (callback) arguments in your stories.