From 21916797bc44249f940710b9f4d0de48e414ad4d Mon Sep 17 00:00:00 2001 From: Alen Ajam Date: Mon, 1 May 2023 18:57:43 +0200 Subject: [PATCH 001/249] fix(Select.tsx): added value prop to select and multiselect --- code/ui/blocks/src/controls/options/Select.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/code/ui/blocks/src/controls/options/Select.tsx b/code/ui/blocks/src/controls/options/Select.tsx index f033c131bd7..b05d58a4a3a 100644 --- a/code/ui/blocks/src/controls/options/Select.tsx +++ b/code/ui/blocks/src/controls/options/Select.tsx @@ -110,7 +110,9 @@ const SingleSelect: FC = ({ name, value, options, onChange }) => { {NO_SELECTION} {Object.keys(options).map((key) => ( - + ))} @@ -131,7 +133,9 @@ const MultiSelect: FC = ({ name, value, options, onChange }) => { {Object.keys(options).map((key) => ( - + ))} From 41dd534a5f777ec7babe8e4cdbda19cb5e30f9db Mon Sep 17 00:00:00 2001 From: Alen Ajam Date: Mon, 1 May 2023 19:03:08 +0200 Subject: [PATCH 002/249] fix(basics.stories.ts): fixed select and multiselect controls, added double space option --- code/addons/controls/template/stories/basics.stories.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/addons/controls/template/stories/basics.stories.ts b/code/addons/controls/template/stories/basics.stories.ts index 51acda9c1f2..6d2224d8012 100644 --- a/code/addons/controls/template/stories/basics.stories.ts +++ b/code/addons/controls/template/stories/basics.stories.ts @@ -25,8 +25,8 @@ export default { control: { type: 'radio', options: ['a', 'b', 'c'], labels: ['alpha', 'beta', 'gamma'] }, }, inlineRadio: { control: { type: 'inline-radio', options: ['a', 'b', 'c'] } }, - select: { control: { type: 'select', options: ['a', 'b', 'c'] } }, - multiSelect: { control: { type: 'multi-select', options: ['a', 'b', 'c'] } }, + select: { control: 'select', options: ['a', 'b', 'c', 'double space'] }, + multiSelect: { control: { type: 'multi-select' }, options: ['a', 'b', 'c', 'double space'] }, range: { control: 'range' }, rangeCustom: { control: { type: 'range', min: 0, max: 1000, step: 100 } }, text: { control: 'text' }, From afd96e736acc58b2d6fe1abecac4b68fec887b5c Mon Sep 17 00:00:00 2001 From: Alen Ajam Date: Mon, 1 May 2023 19:07:21 +0200 Subject: [PATCH 003/249] test(addon-controls.spec.ts): check that options which value contain double spaces work --- code/e2e-tests/addon-controls.spec.ts | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/code/e2e-tests/addon-controls.spec.ts b/code/e2e-tests/addon-controls.spec.ts index bcbf9601994..df376782aae 100644 --- a/code/e2e-tests/addon-controls.spec.ts +++ b/code/e2e-tests/addon-controls.spec.ts @@ -70,4 +70,31 @@ test.describe('addon-controls', () => { const label = await sbPage.panelContent().locator('textarea[name=label]').inputValue(); await expect(label).toEqual('Hello world'); }); + + test('should set select option when value contains double spaces', async ({ page }) => { + await page.goto(`${storybookUrl}?path=/story/addons-controls-basics--undefined`); + + const sbPage = new SbPage(page); + await sbPage.waitUntilLoaded(); + await sbPage.viewAddonPanel('Controls'); + await sbPage.panelContent().locator('#control-select').selectOption('double space'); + + await expect(sbPage.panelContent().locator('#control-select')).toHaveValue('double space'); + await expect(page).toHaveURL(/.*select:double\+\+space.*/); + }); + + test('should set multiselect option when value contains double spaces', async ({ page }) => { + await page.goto(`${storybookUrl}?path=/story/addons-controls-basics--undefined`); + + const sbPage = new SbPage(page); + await sbPage.waitUntilLoaded(); + await sbPage.viewAddonPanel('Controls'); + await sbPage.panelContent().locator('#control-multiSelect').selectOption('double space'); + + await expect(sbPage.panelContent().locator('#control-multiSelect')).toHaveValue( + 'double space' + ); + + await expect(page).toHaveURL(/.*multiSelect\[0]:double\+\+space.*/); + }); }); From 79c2201b31031c37296d7791e65c29655b4aff87 Mon Sep 17 00:00:00 2001 From: Wilson Chen Date: Tue, 15 Aug 2023 13:47:19 -0700 Subject: [PATCH 004/249] Updated primary block to support of prop --- MIGRATION.md | 5 ++ code/ui/blocks/src/blocks/Primary.stories.tsx | 61 ++++++++++++++++++- code/ui/blocks/src/blocks/Primary.tsx | 51 ++++++++++++++-- docs/api/doc-block-primary.md | 6 ++ 4 files changed, 116 insertions(+), 7 deletions(-) diff --git a/MIGRATION.md b/MIGRATION.md index 5022eefb59b..a5bc41380f8 100644 --- a/MIGRATION.md +++ b/MIGRATION.md @@ -73,6 +73,7 @@ - [Unattached docs files](#unattached-docs-files) - [Doc Blocks](#doc-blocks) - [Meta block](#meta-block) + - [Primary block](#primary-block) - [Description block, `parameters.notes` and `parameters.info`](#description-block-parametersnotes-and-parametersinfo) - [Story block](#story-block) - [Source block](#source-block) @@ -1429,6 +1430,10 @@ Additionally to changing the docs information architecture, we've updated the AP The primary change of the `Meta` block is the ability to attach to CSF files with `` as described above. +##### Primary block + +The `Primary` block now also accepts an `of` prop as described above. It still accepts being passed `name` or no props at all. + ##### Description block, `parameters.notes` and `parameters.info` In 6.5 the Description doc block accepted a range of different props, `markdown`, `type` and `children` as a way to customize the content. diff --git a/code/ui/blocks/src/blocks/Primary.stories.tsx b/code/ui/blocks/src/blocks/Primary.stories.tsx index 42977ff6c9e..b1d316c4e66 100644 --- a/code/ui/blocks/src/blocks/Primary.stories.tsx +++ b/code/ui/blocks/src/blocks/Primary.stories.tsx @@ -1,13 +1,16 @@ import type { Meta, StoryObj } from '@storybook/react'; import { Primary } from './Primary'; +import * as DefaultButtonStories from '../examples/Button.stories'; +import * as StoriesParametersStories from '../examples/StoriesParameters.stories'; -const meta = { +const meta: Meta = { component: Primary, parameters: { + // workaround for https://github.com/storybookjs/storybook/issues/20505 + docs: { source: { type: 'code' } }, docsStyles: true, }, -} satisfies Meta; - +}; export default meta; type Story = StoryObj; @@ -22,3 +25,55 @@ export const WithoutToolbar: Story = { relativeCsfPaths: ['../examples/StoriesParameters.stories'], }, }; + +export const DefaultWithName: Story = { + name: 'Name', + args: { + name: 'Primary', + }, + parameters: { + relativeCsfPaths: ['../examples/Button.stories'], + }, +}; + +export const WithoutToolbarWithName: Story = { + name: 'Name Without Toolbar', + args: { + name: 'Without Toolbar', + }, + parameters: { + relativeCsfPaths: ['../examples/StoriesParameters.stories'], + }, +}; + +export const DefaultWithOf: Story = { + name: 'Of', + args: { + of: DefaultButtonStories, + }, + parameters: { relativeCsfPaths: ['../examples/Button.stories'] }, +}; + +export const WithoutToolbarWithOf: Story = { + name: 'Of Without Toolbar', + args: { + of: StoriesParametersStories, + }, + parameters: { relativeCsfPaths: ['../examples/StoriesParameters.stories'] }, +}; + +export const DefaultOfStringMetaAttached: Story = { + name: 'Of Attached "meta"', + args: { + of: 'meta', + }, + parameters: { relativeCsfPaths: ['../examples/Button.stories'] }, +}; + +export const WithoutToolbarOfStringMetaAttached: Story = { + name: 'Of Attached "meta" Without Toolbar', + args: { + of: 'meta', + }, + parameters: { relativeCsfPaths: ['../examples/StoriesParameters.stories'] }, +}; diff --git a/code/ui/blocks/src/blocks/Primary.tsx b/code/ui/blocks/src/blocks/Primary.tsx index 7583200f72c..040edff489e 100644 --- a/code/ui/blocks/src/blocks/Primary.tsx +++ b/code/ui/blocks/src/blocks/Primary.tsx @@ -2,7 +2,8 @@ import type { FC } from 'react'; import React, { useContext } from 'react'; import dedent from 'ts-dedent'; import { deprecate } from '@storybook/client-logger'; - +import type { Of } from './useOf'; +import { useOf } from './useOf'; import { DocsContext } from './DocsContext'; import { DocsStory } from './DocsStory'; @@ -11,17 +12,59 @@ interface PrimaryProps { * @deprecated Primary block should only be used to render the primary story, which is automatically found. */ name?: string; + /** + * Specify where to get the primary story from. + */ + of?: Of; } -export const Primary: FC = ({ name }) => { +const getPrimaryFromResolvedOf = (resolvedOf: ReturnType): any | null => { + switch (resolvedOf.type) { + case 'meta': { + return resolvedOf.csfFile.stories[0] || null; + } + case 'story': + case 'component': { + throw new Error( + `Unsupported module type. Primary's \`of\` prop only supports \`meta\`, got: ${ + (resolvedOf as any).type + }` + ); + } + default: { + throw new Error( + `Unrecognized module type resolved from 'useOf', got: ${(resolvedOf as any).type}` + ); + } + } +}; + +export const Primary: FC = (props) => { + const { name, of } = props; + + if ('of' in props && of === undefined) { + throw new Error('Unexpected `of={undefined}`, did you mistype a CSF file reference?'); + } + const docsContext = useContext(DocsContext); + + let story; + if (of) { + const resolvedOf = useOf(of || 'meta'); + story = getPrimaryFromResolvedOf(resolvedOf); + } + + if (!story) { + const storyId = name && docsContext.storyIdByName(name); + story = docsContext.storyById(storyId); + } + if (name) { deprecate(dedent`\`name\` prop is deprecated on the Primary block. The Primary block should only be used to render the primary story, which is automatically found. `); } - const storyId = name && docsContext.storyIdByName(name); - const story = docsContext.storyById(storyId); + return story ? ( ) : null; diff --git a/docs/api/doc-block-primary.md b/docs/api/doc-block-primary.md index 5d124df65b9..37bf5eec9bc 100644 --- a/docs/api/doc-block-primary.md +++ b/docs/api/doc-block-primary.md @@ -29,6 +29,12 @@ import { Primary } from '@storybook/blocks'; `Primary` is configured with the following props: +### `of` + +Type: CSF file exports + +Specifies the primary (first) story to be rendered. + ### `name` (⛔️ **Deprecated**) From f720962519e7298acf06f0ad4c8739afa84d4646 Mon Sep 17 00:00:00 2001 From: Wilson Chen Date: Tue, 15 Aug 2023 21:05:51 -0700 Subject: [PATCH 005/249] Removed use of any type --- code/ui/blocks/src/blocks/Primary.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/code/ui/blocks/src/blocks/Primary.tsx b/code/ui/blocks/src/blocks/Primary.tsx index 040edff489e..7983ea94b0b 100644 --- a/code/ui/blocks/src/blocks/Primary.tsx +++ b/code/ui/blocks/src/blocks/Primary.tsx @@ -18,12 +18,11 @@ interface PrimaryProps { of?: Of; } -const getPrimaryFromResolvedOf = (resolvedOf: ReturnType): any | null => { +const getPrimaryFromResolvedOf = (resolvedOf: ReturnType) => { switch (resolvedOf.type) { case 'meta': { return resolvedOf.csfFile.stories[0] || null; } - case 'story': case 'component': { throw new Error( `Unsupported module type. Primary's \`of\` prop only supports \`meta\`, got: ${ From d2c6faa1f9bfbd2a1635dd359c90498800df4f5a Mon Sep 17 00:00:00 2001 From: Wilson Chen Date: Thu, 24 Aug 2023 10:47:01 -0700 Subject: [PATCH 006/249] Revert back to satisfies operator for Primary, improve API docs --- code/ui/blocks/src/blocks/Primary.stories.tsx | 4 ++-- docs/api/doc-block-primary.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/code/ui/blocks/src/blocks/Primary.stories.tsx b/code/ui/blocks/src/blocks/Primary.stories.tsx index b1d316c4e66..7c4747d53a3 100644 --- a/code/ui/blocks/src/blocks/Primary.stories.tsx +++ b/code/ui/blocks/src/blocks/Primary.stories.tsx @@ -3,14 +3,14 @@ import { Primary } from './Primary'; import * as DefaultButtonStories from '../examples/Button.stories'; import * as StoriesParametersStories from '../examples/StoriesParameters.stories'; -const meta: Meta = { +const meta = { component: Primary, parameters: { // workaround for https://github.com/storybookjs/storybook/issues/20505 docs: { source: { type: 'code' } }, docsStyles: true, }, -}; +} satisfies Meta; export default meta; type Story = StoryObj; diff --git a/docs/api/doc-block-primary.md b/docs/api/doc-block-primary.md index 37bf5eec9bc..c4993c2db2a 100644 --- a/docs/api/doc-block-primary.md +++ b/docs/api/doc-block-primary.md @@ -33,7 +33,7 @@ import { Primary } from '@storybook/blocks'; Type: CSF file exports -Specifies the primary (first) story to be rendered. +Specifies which CSF file is used to find the first story, which is then rendered by this block. Pass the full set of exports from the CSF file (not the default export!). ### `name` From f5430d37636a711c7dcc368a0bf36dc36829ab7d Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Mon, 28 Aug 2023 15:37:37 +0200 Subject: [PATCH 007/249] rename release preparement workflows --- ...release.yml => prepare-hotfix-release.yml} | 4 +- ...rerelease.yml => prepare-next-release.yml} | 2 +- CONTRIBUTING/RELEASING.md | 70 ++++++++++--------- scripts/release/generate-pr-description.ts | 6 +- 4 files changed, 44 insertions(+), 38 deletions(-) rename .github/workflows/{prepare-patch-release.yml => prepare-hotfix-release.yml} (99%) rename .github/workflows/{prepare-prerelease.yml => prepare-next-release.yml} (99%) diff --git a/.github/workflows/prepare-patch-release.yml b/.github/workflows/prepare-hotfix-release.yml similarity index 99% rename from .github/workflows/prepare-patch-release.yml rename to .github/workflows/prepare-hotfix-release.yml index c88022c7ea0..6ee8d3091c1 100644 --- a/.github/workflows/prepare-patch-release.yml +++ b/.github/workflows/prepare-hotfix-release.yml @@ -16,8 +16,8 @@ concurrency: cancel-in-progress: true jobs: - prepare-patch-pull-request: - name: Prepare patch pull request + prepare-hotfix-pull-request: + name: Prepare hotfix pull request runs-on: ubuntu-latest environment: release defaults: diff --git a/.github/workflows/prepare-prerelease.yml b/.github/workflows/prepare-next-release.yml similarity index 99% rename from .github/workflows/prepare-prerelease.yml rename to .github/workflows/prepare-next-release.yml index 1250aedcfaa..42695e823cc 100644 --- a/.github/workflows/prepare-prerelease.yml +++ b/.github/workflows/prepare-next-release.yml @@ -34,7 +34,7 @@ concurrency: cancel-in-progress: true jobs: - prepare-prerelease-pull-request: + prepare-next-pull-request: name: Prepare prerelease pull request runs-on: ubuntu-latest environment: release diff --git a/CONTRIBUTING/RELEASING.md b/CONTRIBUTING/RELEASING.md index 0997b757b6e..e81029088f8 100644 --- a/CONTRIBUTING/RELEASING.md +++ b/CONTRIBUTING/RELEASING.md @@ -8,8 +8,8 @@ - [Introduction](#introduction) - [Branches](#branches) - [Release Pull Requests](#release-pull-requests) - - [Prereleases](#prereleases) - - [Patch Releases](#patch-releases) + - [`next`-releases](#next-releases) + - [Hotfix Releases](#hotfix-releases) - [Publishing](#publishing) - [👉 How to Release](#-how-to-release) - [1. Find the Prepared Pull Request](#1-find-the-prepared-pull-request) @@ -21,6 +21,8 @@ - [7. See the "Publish" Workflow Finish](#7-see-the-publish-workflow-finish) - [Releasing Locally in an Emergency 🚨](#releasing-locally-in-an-emergency-) - [Canary Releases](#canary-releases) + - [With GitHub UI](#with-github-ui) + - [With the CLI](#with-the-cli) - [Versioning Scenarios](#versioning-scenarios) - [Prereleases - `7.1.0-alpha.12` -\> `7.1.0-alpha.13`](#prereleases---710-alpha12---710-alpha13) - [Prerelease promotions - `7.1.0-alpha.13` -\> `7.1.0-beta.0`](#prerelease-promotions---710-alpha13---710-beta0) @@ -31,7 +33,7 @@ - [Prerelease of upcoming patch release - `7.0.20` -\> `7.0.21-alpha.0`](#prerelease-of-upcoming-patch-release---7020---7021-alpha0) - [Merges to `main` without versioning](#merges-to-main-without-versioning) - [FAQ](#faq) - - [When should I use the "patch" label?](#when-should-i-use-the-patch-label) + - [When should I use the "patch:yes" label?](#when-should-i-use-the-patchyes-label) - [How do I make changes to the release tooling/process?](#how-do-i-make-changes-to-the-release-toolingprocess) - [Why do I need to re-trigger workflows to update the changelog?](#why-do-i-need-to-re-trigger-workflows-to-update-the-changelog) - [Which combination of inputs creates the version bump I need?](#which-combination-of-inputs-creates-the-version-bump-i-need) @@ -50,8 +52,8 @@ The release process is based on automatically created "Release Pull Requests", t A designated Releaser -- which may rotate between core team members -- will go through the release process in the current Release PR. This process is implemented with NodeJS scripts in [`scripts/release`](../scripts/release/) and three GitHub Actions workflows: -- [Prepare Prerelease PR](../.github/workflows/prepare-prerelease.yml) -- [Prepare Patch PR](../.github/workflows/prepare-patch-release.yml) +- [Prepare `next` PR](../.github/workflows/prepare-next-release.yml) +- [Prepare hotfix PR](../.github/workflows/prepare-hotfix-release.yml) - [Publish](../.github/workflows/publish.yml) > **Note** @@ -115,18 +117,18 @@ A few key points to note in this flow: - The changelogs are committed during the preparation, but the packages are not version bumped and not published until later. - The release pull requests don't target their working branches (`next` and `main`), but rather `next-release` and `latest-release`. -### Prereleases +### `next`-releases > **Note** -> Workflow: [`prepare-prerelease.yml`](../.github/workflows/prepare-prerelease.yml) +> Workflow: [`prepare-next-release.yml`](../.github/workflows/prepare-next-release.yml) -Prereleases are prepared with all content from the `next` branch. The changelog is generated by examining the git history, and looking up all the commits and pull requests between the current prerelease (on `next-release`) and `HEAD` of `next`. +`next`-releases are prepared with all content from the `next` branch. The changelog is generated by examining the git history, and looking up all the commits and pull requests between the current prerelease (on `next-release`) and `HEAD` of `next`. The default versioning strategy is to increase the current prerelease number, as described in [Prereleases - `7.1.0-alpha.12` -> `7.1.0-alpha.13`](#prereleases---710-alpha12---710-alpha13). If there is no prerelease number (i.e., we just released a new stable minor/major version), it will add one to a patch bump, so it would go from `7.2.0` to `7.2.1-0` by default. Prerelease PRs are only created if there are actual changes to release. Content labeled with "build" or "documentation" is [not considered "releasable"](#which-changes-are-considered-releasable-and-what-does-it-mean) and is not user-facing, so it doesn't make sense to create a release. This is explained in more detail in [Why are no release PRs being prepared?](#why-are-no-release-prs-being-prepared). -The preparation workflow will create a new branch from `next`, called `version-prerelease-from-`, and open a pull request targeting `next-release`. When the Releaser merges it, the [publish workflow](#publishing) will merge `next-release` into `next`. +The preparation workflow will create a new branch from `next`, called `version-next-from-`, and open a pull request targeting `next-release`. When the Releaser merges it, the [publish workflow](#publishing) will merge `next-release` into `next`. Here's an example of a workflow where a feature and a bugfix have been created and then released to a new `7.1.0-alpha.29` version. All the commits highlighted with square dots are the ones that will be considered when generating the changelog. @@ -157,20 +159,20 @@ gitGraph merge next-release ``` -### Patch Releases +### Hotfix Releases > **Note** -> Workflow: [`prepare-patch-release.yml`](../.github/workflows/prepare-patch-release.yml) +> Workflow: [`prepare-hotfix-release.yml`](../.github/workflows/prepare-hotfix-release.yml) -Patch releases are created by [cherry-picking](https://www.atlassian.com/git/tutorials/cherry-pick) any merged, unreleased pull requests that have the "**patch**" label applied to the `next` branch. The merge commit of said pull requests are cherry-picked. +Hotfix releases are created by [cherry-picking](https://www.atlassian.com/git/tutorials/cherry-pick) any merged, unreleased pull requests that have the "**patch:yes**" label applied to the `next` branch. The merge commit of said pull requests are cherry-picked. -Sometimes it is desired to pick pull requests back to `main` even if they are not considered "releasable". Unlike prerelease preparation, patch releases will not be canceled if the content is not releasable. It might not make sense to create a new patch release if the changes are only for documentation and/or internal build systems. However, getting the changes back to `main` is the only way to deploy the documentation to the production docs site. You may also want to cherry-pick changes to internal CI to fix issues. These are valid scenarios where you want to cherry-pick the changes without being blocked on "releasable" content. In these cases, where all cherry picks are non-releasable, the preparation workflow creates a "merging" pull request instead of a "releasing" pull request. This pull request does not bump versions or update changelogs; it just cherry-picks the changes and allows you to merge them into `latest-release` -> `main`. +Sometimes it is desired to pick pull requests back to `main` even if they are not considered "releasable". Unlike `next`-release preparation, hotfix releases will not be canceled if the content is not releasable. It might not make sense to create a new hotfix release if the changes are only for documentation and/or internal build systems. However, getting the changes back to `main` is the only way to deploy the documentation to the production docs site. You may also want to cherry-pick changes to internal CI to fix issues. These are valid scenarios where you want to cherry-pick the changes without being blocked on "releasable" content. In these cases, where all cherry picks are non-releasable, the preparation workflow creates a "merging" pull request instead of a "releasing" pull request. This pull request does not bump versions or update changelogs; it just cherry-picks the changes and allows you to merge them into `latest-release` -> `main`. The preparation workflow sequentially cherry-picks each patch pull request to its branch. If this cherry-picking fails due to conflicts or other reasons, it is ignored and the next pull request is processed. All failing cherry-picks are listed in the release pull request's description, for the Releaser to manually cherry-pick during the release process. This problem occurs more often when `main` and `next` diverge, i.e. the longer it has been since a stable major/minor release. -Similar to the prerelease flow, the preparation workflow for patches will create a new branch from `main` called `version-patch-from-`, and open a pull request that targets `latest-release`. When the pull request is merged by the Releaser, the [publish workflow](#publishing) will eventually merge `latest-release` into `main`. +Similar to the `next`-release flow, the preparation workflow for patches will create a new branch from `main` called `version-hotfix-from-`, and open a pull request that targets `latest-release`. When the pull request is merged by the Releaser, the [publish workflow](#publishing) will eventually merge `latest-release` into `main`. -Here is an example of a workflow where a feature and two bug fixes have been merged to `next`. Only the bug fixes have the "**patch**" label, so only those two go into the new `7.0.19` release. Note that it is the merge commits to `next` that are cherry-picked, not the commits on the bugfix branches. +Here is an example of a workflow where a feature and two bug fixes have been merged to `next`. Only the bug fixes have the "**patch:yes**" label, so only those two go into the new `7.0.19` release. Note that it is the merge commits to `next` that are cherry-picked, not the commits on the bugfix branches. ```mermaid gitGraph @@ -213,16 +215,15 @@ gitGraph > **Note** > Workflow: [`publish.yml`](../.github/workflows/publish.yml) -When either a prerelease or a patch release branch is merged into `main` or `next-release`, the publishing workflow is triggered. This workflow performs the following tasks: +When either a `next`-release or a hotfix release branch is merged into `latest-release` or `next-release`, the publishing workflow is triggered. This workflow performs the following tasks: 1. Bump versions of all packages according to the plan from the prepared PRs 2. Install dependencies and build all packages. 3. Publish packages to npm. -4. (If this is a patch release, add the "**picked**" label to all relevant pull requests.) +4. (If this is a hotfix release, add the "**patch:done**" label to all relevant pull requests.) 5. Create a new GitHub Release, including a version tag in the release branch (`latest-release` or `next-release`). 6. Merge the release branch into the core branch (`main` or `next`). -7. (If this is a patch release, copy the `CHANGELOG.md` changes from `main` to `next`.) -8. (If this is [a promotion from a prerelease to a stable release](#minormajor-releases---710-rc2---710-or-800-rc3---800), force push `next` to `main`.) +7. (If this is a hotfix release, copy the `CHANGELOG.md` changes from `main` to `next`.) The publish workflow runs in the "release" GitHub environment, which has the npm token required to publish packages to the `@storybook` npm organization. For security reasons, this environment can only be accessed from the four "core" branches: `main`, `next`, `latest-release` and `next-release`. @@ -300,10 +301,10 @@ When triggering the workflows, always choose the `next` branch as the base, unle The workflows can be triggered here: -- [Prepare prerelease PR](https://github.com/storybookjs/storybook/actions/workflows/prepare-prerelease.yml) -- [Prepare patch PR](https://github.com/storybookjs/storybook/actions/workflows/prepare-patch-release.yml) +- [Prepare prerelease PR](https://github.com/storybookjs/storybook/actions/workflows/prepare-next-release.yml) +- [Prepare patch PR](https://github.com/storybookjs/storybook/actions/workflows/prepare-hotfix-release.yml) -Crucially for prereleases, this is also where you change the versioning strategy if you need something else than the default as described in [Preparing - Prereleases](#prereleases). When triggering the prerelease workflow manually, you can optionally add inputs: +Crucially for prereleases, this is also where you change the versioning strategy if you need something else than the default as described in [Preparing - `next`-releases](#next-releases). When triggering the prerelease workflow manually, you can optionally add inputs: ![Screenshot of triggering the prerelease workflow in GitHub Actions, with a form that shows a release type selector and a prerelease identifier text field](prerelease-workflow-inputs.png) @@ -434,7 +435,7 @@ There are multiple types of releases that use the same principles, but are done ### Prereleases - `7.1.0-alpha.12` -> `7.1.0-alpha.13` -This is the default strategy for prereleases, there's nothing special needed to trigger this scenario. +This is the default strategy for `next`-releases, there's nothing special needed to trigger this scenario. ### Prerelease promotions - `7.1.0-alpha.13` -> `7.1.0-beta.0` @@ -445,14 +446,14 @@ To promote a prerelease to a new prerelease ID, during the [Re-trigger the Workf ### Minor/major releases - `7.1.0-rc.2` -> `7.1.0` or `8.0.0-rc.3` -> `8.0.0` -To promote a prerelease to a new prerelease ID, during the [Re-trigger the Workflow](#4-re-trigger-the-workflow) step, choose: +To promote a prerelease to a stable reelase, during the [Re-trigger the Workflow](#4-re-trigger-the-workflow) step, choose: - Release type: Patch - Prerelease ID: Leave empty The "Patch" release type ensures the current prerelease version gets promoted to a stable version without any major/minor/patch bumps. -This scenario is special as it turns the `next` branch into a stable branch (until the next prerelease). Therefore, this will also force push `next` to `main`, to ensure that `main` contains the latest stable release. Consequently, the history for `main` is lost. +This scenario is special as it will target `latest-release` instead of `next-release`, and thus merge into `main` when done, and not `next`. So it goes `next` -> `version-from- `latest-release` -> `main`. When this is done, the Releaser will need to trigger a new release on `next` that bumps the version to a new prerelease minor as described [just below](#first-prerelease-of-new-majorminor---710---720-alpha0-or-800-alpha0). ### First prerelease of new major/minor - `7.1.0` -> `7.2.0-alpha.0` or `8.0.0-alpha.0` @@ -463,7 +464,7 @@ This is the first prerelease after a stable major/minor has been released. The d ### Patch releases to stable - subset of `7.1.0-alpha.13` -> `7.0.14` -This is the default patch release scenario, which cherry picks patches to `main`. +This is the default hotfix release scenario, which cherry picks patches to `main`. ### Patch releases to earlier versions - subset of `7.1.0-alpha.13` -> `6.5.14` @@ -477,17 +478,17 @@ No process is defined for this. ### Merges to `main` without versioning -As described in more details in [the Patch Releases section](#patch-releases), there are scenarios where you want to patch [unreleasable](#which-changes-are-considered-releasable-and-what-does-it-mean) content back to `main` without bumping versions or publishing a new release. This happens automatically as long as all the unpicked patch pull requests have unreleasable labels. In that case the prepared patch pull request will change form slighty, to just cherry-picking the patches without bumping the versions. +As described in more details in [the Hotfix Releases section](#hotfix-releases), there are scenarios where you want to patch [unreleasable](#which-changes-are-considered-releasable-and-what-does-it-mean) content back to `main` without bumping versions or publishing a new release. This happens automatically as long as all the unpicked patch pull requests have unreleasable labels. In that case the prepared patch pull request will change form slighty, to just cherry-picking the patches without bumping the versions. ## FAQ -### When should I use the "patch" label? +### When should I use the "patch:yes" label? -Not all pull requests need to be patched back to the stable release, which is why only those with the **"patch"** label gets that treatment. But how do you decide whether or not a give pull requests should have that label? +Not all pull requests need to be patched back to the stable release, which is why only those with the **"patch:yes"** label gets that treatment. But how do you decide whether or not a give pull requests should have that label? -First of all, patches are only for fixes and minor improvements, and not completely new features. A pull request that introduces a new feature shouldn't be patched back to the stable release. +First of all, patches are only for important and time-sensitive fixes, and not minor improvements or completely new features. A pull request that introduces a new feature shouldn't be patched back to the stable release. -Second, any destabilizing changes shouldn't be patched back either. Breaking changes are reserved for major releases, but changes can be destabilizing without being strictly breaking, and those shouldn't be patched back either. An example is moving the settings panel in the manager to a completely different place, but with the same functionality. Many wouldn't consider this breaking because no usage will stop working because of this, but it can be considered a destabilizing change because user behavior have to change as a result of this. +Second, PRs that changes the code in a big architectural way should ideally not be patched back either, because that makes merge conflicts more likely in the future. When in doubt ask the core team for their input. @@ -497,12 +498,15 @@ The whole process is based on [GitHub Action workflows](../.github/workflows/) a The short answer to "how", is to make changes as a regular pull request that is also patched back to `main`. -There's a longer answer too, but it's pretty confusing: +
+ There's a longer answer too, but it's pretty confusing The scripts run from either `main` or `next`, so if you're changing a release script, you must patch it back to `main` for it to have an effect on patch releases. If you need the change to take effect immediately, you must manually cherry pick it to `main`. For workflow file changes, they usually run from `next`, but patching them back is recommended for consistency. The "publish" workflow runs from `latest-release` and `next-release`, so you should always patch changes back for _that_. 🙃 +
+ ### Why do I need to re-trigger workflows to update the changelog? Changes to pull requests' titles, labels or even reverts won't be reflected in the release pull request. This is because the workflow only triggers on pushes to `next`, not when pull request meta data is changed. @@ -536,7 +540,7 @@ If a pull request does not have any of the above labels at the time of release, This is most likely because `next` only contains [unreleasable changes](#which-changes-are-considered-releasable-and-what-does-it-mean), which causes the preparation workflow to cancel itself. That's because it doesn't make sense to prepare a new release if all the changes are unreleasable, as that wouldn't bump the version nor write a new changelog entry, so "releasing" it would just merge it back to `next` without any differences. -You can always see the workflows and if they have been cancelled [here for prereleases](https://github.com/storybookjs/storybook/actions/workflows/prepare-prerelease.yml) and [here for patch releases](https://github.com/storybookjs/storybook/actions/workflows/prepare-patch-release.yml). +You can always see the workflows and if they have been cancelled [here for `next`-releases](https://github.com/storybookjs/storybook/actions/workflows/prepare-next-release.yml) and [here for hotfix releases](https://github.com/storybookjs/storybook/actions/workflows/prepare-hotfix-release.yml). ### Why do we need separate release branches? diff --git a/scripts/release/generate-pr-description.ts b/scripts/release/generate-pr-description.ts index 16a6928e994..f912c588522 100644 --- a/scripts/release/generate-pr-description.ts +++ b/scripts/release/generate-pr-description.ts @@ -141,7 +141,9 @@ export const generateReleaseDescription = ({ changelogText: string; manualCherryPicks?: string; }): string => { - const workflow = semver.prerelease(nextVersion) ? 'prepare-prerelease' : 'prepare-patch-release'; + const workflow = semver.prerelease(nextVersion) + ? 'prepare-next-release' + : 'prepare-hotfix-release'; const workflowUrl = `https://github.com/storybookjs/storybook/actions/workflows/${workflow}.yml`; return ( @@ -215,7 +217,7 @@ export const generateNonReleaseDescription = ( ${manualCherryPicks || ''} - If you've made any changes (change PR titles, revert PRs), manually trigger a re-generation of this PR with [this workflow](https://github.com/storybookjs/storybook/actions/workflows/prepare-patch-release.yml) and wait for it to finish. + If you've made any changes (change PR titles, revert PRs), manually trigger a re-generation of this PR with [this workflow](https://github.com/storybookjs/storybook/actions/workflows/prepare-hotfix-release.yml) and wait for it to finish. Feel free to manually commit any changes necessary to this branch **after** you've done the last re-generation, following the [Make Manual Changes](https://github.com/storybookjs/storybook/blob/next/CONTRIBUTING/RELEASING.md#5-make-manual-changes) section in the docs. From 8d582d7e4dd66b0b1c85044afcf8228240eb1f8e Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Tue, 29 Aug 2023 14:28:23 +0200 Subject: [PATCH 008/249] merge stable to latest-release instead of next-release, resolving merge conflicts --- .github/workflows/prepare-hotfix-release.yml | 4 +-- .github/workflows/prepare-next-release.yml | 27 +++++++++++++++----- CONTRIBUTING/RELEASING.md | 16 ++++++------ scripts/release/generate-pr-description.ts | 1 + scripts/release/is-pr-frozen.ts | 6 ++--- 5 files changed, 35 insertions(+), 19 deletions(-) diff --git a/.github/workflows/prepare-hotfix-release.yml b/.github/workflows/prepare-hotfix-release.yml index 6ee8d3091c1..2a331fb5f3e 100644 --- a/.github/workflows/prepare-hotfix-release.yml +++ b/.github/workflows/prepare-hotfix-release.yml @@ -56,7 +56,7 @@ jobs: id: check-frozen env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: yarn release:is-pr-frozen --patch + run: yarn release:is-pr-frozen --hotfix - name: Cancel when frozen if: steps.check-frozen.outputs.frozen == 'true' && github.event_name != 'workflow_dispatch' @@ -121,7 +121,7 @@ jobs: git config --global user.email '32066757+storybook-bot@users.noreply.github.com' git checkout -b version-patch-from-${{ steps.versions.outputs.current }} git add . - git commit -m "Write changelog for ${{ steps.versions.outputs.next }}" || true + git commit -m "Write changelog for ${{ steps.versions.outputs.next }} [skip ci]" || true git push --force origin version-patch-from-${{ steps.versions.outputs.current }} - name: Generate PR description diff --git a/.github/workflows/prepare-next-release.yml b/.github/workflows/prepare-next-release.yml index 42695e823cc..ad79b5f1b3f 100644 --- a/.github/workflows/prepare-next-release.yml +++ b/.github/workflows/prepare-next-release.yml @@ -112,21 +112,35 @@ jobs: run: | yarn release:version --deferred --release-type ${{ inputs.release-type || 'prerelease' }} ${{ inputs.pre-id && format('{0} {1}', '--pre-id', inputs.pre-id) || '' }} --verbose + - name: Check release vs prerelease + id: is-prerelease + run: yarn release:is-prerelease ${{ steps.bump-version.outputs.next-version }} + - name: Write changelog env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | yarn release:write-changelog ${{ steps.bump-version.outputs.next-version }} --verbose - - name: 'Commit changes to branch: version-prerelease-from-${{ steps.bump-version.outputs.current-version }}' + - name: 'Commit changes to branch: version-next-from-${{ steps.bump-version.outputs.current-version }}' working-directory: . run: | git config --global user.name 'storybook-bot' git config --global user.email '32066757+storybook-bot@users.noreply.github.com' - git checkout -b version-prerelease-from-${{ steps.bump-version.outputs.current-version }} + git checkout -b version-next-from-${{ steps.bump-version.outputs.current-version }} git add . - git commit -m "Write changelog for ${{ steps.bump-version.outputs.next-version }}" || true - git push --force origin version-prerelease-from-${{ steps.bump-version.outputs.current-version }} + git commit -m "Write changelog for ${{ steps.bump-version.outputs.next-version }} [skip ci]" || true + git push --force origin version-next-from-${{ steps.bump-version.outputs.current-version }} + + - name: Resolve merge-conflicts with base branch + if: steps.is-prerelease.outputs.prerelease == 'true' + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + git pull origin latest-release + git checkout --ours . + git add . + git commit -m "Merge latest-release into version-1 with conflicts resolved to ours [skip ci]" - name: Generate PR description id: description @@ -144,14 +158,15 @@ jobs: gh pr edit \ --repo "${{github.repository }}" \ --title "Release: $CAPITALIZED_RELEASE_TYPE ${{ inputs.pre-id && format('{0} ', inputs.pre-id) }}${{ steps.bump-version.outputs.next-version }}" \ + --base ${{ steps.is-prerelease.outputs.prerelease == 'true' && 'next-release' || 'latest-release' }} \ --body "${{ steps.description.outputs.description }}" else gh pr create \ --repo "${{github.repository }}"\ --title "Release: $CAPITALIZED_RELEASE_TYPE ${{ inputs.pre-id && format('{0} ', inputs.pre-id) }}${{ steps.bump-version.outputs.next-version }}" \ --label "release" \ - --base next-release \ - --head version-prerelease-from-${{ steps.bump-version.outputs.current-version }} \ + --base ${{ steps.is-prerelease.outputs.prerelease == 'true' && 'next-release' || 'latest-release' }} \ + --head version-next-from-${{ steps.bump-version.outputs.current-version }} \ --body "${{ steps.description.outputs.description }}" fi diff --git a/CONTRIBUTING/RELEASING.md b/CONTRIBUTING/RELEASING.md index e81029088f8..ab71e8fe6b4 100644 --- a/CONTRIBUTING/RELEASING.md +++ b/CONTRIBUTING/RELEASING.md @@ -150,10 +150,10 @@ gitGraph commit checkout next merge some-bugfix type: HIGHLIGHT - branch version-prerelease-from-7.1.0-alpha.28 + branch version-next-from-7.1.0-alpha.28 commit id: "write changelog" checkout next-release - merge version-prerelease-from-7.1.0-alpha.28 + merge version-next-from-7.1.0-alpha.28 commit id: "bump versions" tag: "7.1.0-alpha.29" checkout next merge next-release @@ -562,11 +562,11 @@ gitGraph branch some-simultaneous-bugfix commit checkout next - branch version-prerelease-from-7.1.0-alpha.28 + branch version-next-from-7.1.0-alpha.28 commit id checkout next merge some-simultaneous-bugfix type: HIGHLIGHT id: "whoops!" - merge version-prerelease-from-7.1.0-alpha.28 tag: "v7.1.0-alpha.29" + merge version-next-from-7.1.0-alpha.28 tag: "v7.1.0-alpha.29" ``` When publishing at the last commit with tag `v7.1.0-alpha.29`, it will publish whatever the content is at that point (all the square dots), which includes the "whoops!" commit from merging the bugfix. But the bugfix was never part of the release pull request because it got prepared before the bugfix was merged in. @@ -586,19 +586,19 @@ gitGraph branch some-simultanous-bugfix commit checkout next - branch version-prerelease-from-7.1.0-alpha.28 + branch version-next-from-7.1.0-alpha.28 commit id: "write changelog" checkout next merge some-simultanous-bugfix id: "whoops!" checkout next-release - merge version-prerelease-from-7.1.0-alpha.28 + merge version-next-from-7.1.0-alpha.28 commit id: "bump versions" tag: "v7.1.0-alpha.29" checkout next merge next-release - branch version-prerelease-from-7.1.0-alpha.29 + branch version-next-from-7.1.0-alpha.29 commit id: "write changelog again" checkout next-release - merge version-prerelease-from-7.1.0-alpha.29 + merge version-next-from-7.1.0-alpha.29 commit id: "bump versions again" tag: "v7.1.0-alpha.30" checkout next merge next-release diff --git a/scripts/release/generate-pr-description.ts b/scripts/release/generate-pr-description.ts index f912c588522..7049a1aa44c 100644 --- a/scripts/release/generate-pr-description.ts +++ b/scripts/release/generate-pr-description.ts @@ -52,6 +52,7 @@ const CHANGE_TITLES_TO_IGNORE = [ /\[ci skip\]/i, /^Update CHANGELOG\.md for.*/i, /^Release: (Pre)?(Patch|Minor|Major|Release).*\d+$/i, + /^Update \.\/docs\/versions/, ]; export const mapToChangelist = ({ diff --git a/scripts/release/is-pr-frozen.ts b/scripts/release/is-pr-frozen.ts index 70289b5369d..27d3a37b765 100644 --- a/scripts/release/is-pr-frozen.ts +++ b/scripts/release/is-pr-frozen.ts @@ -12,7 +12,7 @@ program .description( 'returns true if the versioning pull request associated with the current branch has the "freeze" label' ) - .option('-P, --patch', 'Look for patch PR instead of prerelease PR', false) + .option('-P, --patch', 'Look for hotfix PR instead of next PR', false) .option('-V, --verbose', 'Enable verbose logging', false); const CODE_DIR_PATH = path.join(__dirname, '..', '..', 'code'); @@ -43,10 +43,10 @@ const getRepo = async (verbose?: boolean): Promise => { }; export const run = async (options: unknown) => { - const { verbose, patch } = options as { verbose?: boolean; patch?: boolean }; + const { verbose, hotfix } = options as { verbose?: boolean; hotfix?: boolean }; const version = await getCurrentVersion(); - const branch = `version-${patch ? 'patch' : 'prerelease'}-from-${version}`; + const branch = `version-${hotfix ? 'hotfix' : 'next'}-from-${version}`; console.log(`💬 Determining if pull request from branch '${chalk.blue(branch)}' is frozen`); From 1161b7ada4b93a0f0bb6a9dda7a34abacbf479dd Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Tue, 29 Aug 2023 14:42:41 +0200 Subject: [PATCH 009/249] more renaming of new release workflows --- CONTRIBUTING/RELEASING.md | 42 +++++++++++----------- scripts/release/generate-pr-description.ts | 2 +- scripts/release/is-pr-frozen.ts | 2 +- 3 files changed, 22 insertions(+), 24 deletions(-) diff --git a/CONTRIBUTING/RELEASING.md b/CONTRIBUTING/RELEASING.md index ab71e8fe6b4..05533fccb38 100644 --- a/CONTRIBUTING/RELEASING.md +++ b/CONTRIBUTING/RELEASING.md @@ -45,8 +45,8 @@ This document explains the release process for the Storybook monorepo. There are two types: -1. Prereleases and major/minor releases - releasing any content that is on the `next` branch -2. Patch releases - picking any content from `next` to `main`, that needs to be patched back to the current stable minor release +1. `next`-releases - releasing any content that is on the `next` branch, either prereleases or stable releases +2. Hotfix releases - picking any content from `next` to `main`, that needs to be patched back to the current stable minor release The release process is based on automatically created "Release Pull Requests", that when merged will trigger a new version to be released. @@ -57,7 +57,7 @@ A designated Releaser -- which may rotate between core team members -- will go t - [Publish](../.github/workflows/publish.yml) > **Note** -> This document distinguishes between **patch** releases and **prereleases**. This is a simplification; stable major and minor releases work the same way as prereleases. The distinction reflects the difference between patching an existing minor version on `main` or releasing a new minor/major/prerelease from `next`. +> This document distinguishes between **`next`-releases** and **hotfix** releases. The distinction reflects the difference between patching an existing minor version on `main` or releasing a new minor/major/prerelease from `next`. ### Branches @@ -103,7 +103,7 @@ Two GitHub Actions workflows automatically create release pull requests, one for The high-level flow is: 1. When a PR is merged to `next` (or a commit is pushed), both release pull requests are (re)generated. -2. They create a new branch - `version-(patch|prerelease)-from-`. +2. They create a new branch - `version-(hotfix|next)-from-`. 3. They calculate which version to bump to according to the version strategy. 4. They update `CHANGELOG(.prerelease).md` with all changes detected. 5. They commit everything. @@ -126,7 +126,7 @@ A few key points to note in this flow: The default versioning strategy is to increase the current prerelease number, as described in [Prereleases - `7.1.0-alpha.12` -> `7.1.0-alpha.13`](#prereleases---710-alpha12---710-alpha13). If there is no prerelease number (i.e., we just released a new stable minor/major version), it will add one to a patch bump, so it would go from `7.2.0` to `7.2.1-0` by default. -Prerelease PRs are only created if there are actual changes to release. Content labeled with "build" or "documentation" is [not considered "releasable"](#which-changes-are-considered-releasable-and-what-does-it-mean) and is not user-facing, so it doesn't make sense to create a release. This is explained in more detail in [Why are no release PRs being prepared?](#why-are-no-release-prs-being-prepared). +`next`-PRs are only created if there are actual changes to release. Content labeled with "build" or "documentation" is [not considered "releasable"](#which-changes-are-considered-releasable-and-what-does-it-mean) and is not user-facing, so it doesn't make sense to create a release. This is explained in more detail in [Why are no release PRs being prepared?](#why-are-no-release-prs-being-prepared). The preparation workflow will create a new branch from `next`, called `version-next-from-`, and open a pull request targeting `next-release`. When the Releaser merges it, the [publish workflow](#publishing) will merge `next-release` into `next`. @@ -245,9 +245,9 @@ The high-level workflow for a Releaser is: Look for the release pull request that has been prepared for the type of release you're about to release: -- "Release: Prerelease ``" for prereleases -- "Release: Patch ``" for patch releases -- "Release: Merge patches to `main` (without version bump)" for patches without releases +- "Release: Prerelease|Minor|Major ``" for releases from `next` +- "Release: Hotfix ``" for hotfix releases +- "Release: Merge patches to `main` (without version bump)" for hotfixes without releases For example: https://github.com/storybookjs/storybook/pull/23148 @@ -267,7 +267,7 @@ It is important to verify that the release includes the right content. Key eleme For example, check if it's a breaking change that isn't allowed in a minor prerelease, or if it's a new feature in a patch release. If it's not suitable, revert the pull request and notify the author. -Sometimes when doing a patch release, a pull request can have the "patch" label but you don't want that change to be part of this release. Maybe you're not confident in the change, or you require more input from maintainers before releasing it. In those situations you should remove the "patch" label from the pull request and follow through with the release (make sure to re-trigger the workflow). When the release is done, add the patch label back again, so it will be part of the next release. +Sometimes when doing a patch release, a pull request can have the "patch:yes" label but you don't want that change to be part of this release. Maybe you're not confident in the change, or you require more input from maintainers before releasing it. In those situations you should remove the "patch:yes" label from the pull request and follow through with the release (make sure to re-trigger the workflow). When the release is done, add the "patch:yes" label back again, so it will be part of the next release. 2. Is the pull request title correct? @@ -280,9 +280,9 @@ If a pull request changes multiple places, it can be hard to choose an area - th Some labels have specific meanings when it comes to releases. It's important that each pull request has labels that accurately describe the change, as labels can determine if a pull request is included in the changelog or not. This is explained further in the [Which changes are considered "releasable", and what does it mean?](#which-changes-are-considered-releasable-and-what-does-it-mean) section. -4. Patches: has it already been released in a prerelease? +4. Hotfixes: has it already been released in a prerelease? -If this is a patch release, make sure that all pull requests have already been released in a prerelease. If some haven't, create a new prerelease first. +If this is a hotfix release, make sure that all pull requests have already been released in a prerelease. If some haven't, create a new prerelease first. This is not a technical requirement, but it's a good practice to ensure that a change doesn't break a prerelease before releasing it to stable. @@ -301,12 +301,12 @@ When triggering the workflows, always choose the `next` branch as the base, unle The workflows can be triggered here: -- [Prepare prerelease PR](https://github.com/storybookjs/storybook/actions/workflows/prepare-next-release.yml) -- [Prepare patch PR](https://github.com/storybookjs/storybook/actions/workflows/prepare-hotfix-release.yml) +- [Prepare next PR](https://github.com/storybookjs/storybook/actions/workflows/prepare-next-release.yml) +- [Prepare hotfix PR](https://github.com/storybookjs/storybook/actions/workflows/prepare-hotfix-release.yml) Crucially for prereleases, this is also where you change the versioning strategy if you need something else than the default as described in [Preparing - `next`-releases](#next-releases). When triggering the prerelease workflow manually, you can optionally add inputs: -![Screenshot of triggering the prerelease workflow in GitHub Actions, with a form that shows a release type selector and a prerelease identifier text field](prerelease-workflow-inputs.png) +![Screenshot of triggering the next-release workflow in GitHub Actions, with a form that shows a release type selector and a prerelease identifier text field](prerelease-workflow-inputs.png) See [Versioning Scenarios](#versioning-scenarios) for a description of each version bump scenario, how to activate it and what it does, and [Which combination of inputs creates the version bump I need?](#which-combination-of-inputs-creates-the-version-bump-i-need) for a detailed description of the workflow inputs. @@ -340,11 +340,11 @@ You can inspect the workflows to see what they are running and copy that, but he Before you start you should make sure that your working tree is clean and the repository is in a clean state by running `git clean -xdf`. -1. Create a new branch from either `next` (prereleases) or `main` (patches) +1. Create a new branch from either `next` or `main` (hotfixes) 2. Get all tags: `git fetch --tags origin` 3. Install dependencies: `yarn task --task=install --start-from=install` 4. `cd scripts` -5. (If patch release) Cherry pick: +5. (If hotfix release) Cherry pick: 1. `yarn release:pick-patches` 2. Manually cherry pick any necessary patches based on the previous output 6. Bump versions: @@ -362,21 +362,21 @@ Before you start you should make sure that your working tree is clean and the re 12. (If automatic publishing is still working, it should kick in now and the rest of the steps can be skipped) 13. `cd ..` 14. Publish to the registry: `YARN_NPM_AUTH_TOKEN= yarn release:publish --tag <"next" OR "latest"> --verbose` -15. (If patch release) `yarn release:label-patches` +15. (If hotfix release) `yarn release:label-patches` 16. Manually create a GitHub Release with a tag that is the new version and the target being `latest-release` or `next-release`. 17. Merge to core branch: 1. `git checkout <"next"|"main">` 2. `git pull` 3. `git merge <"next-release"|"latest-release">` 4. `git push origin` -18. (If patch release) Sync `CHANGELOG.md` to `next` with: +18. (If hotfix release) Sync `CHANGELOG.md` to `next` with: 1. `git checkout next` 2. `git pull` 3. `git checkout origin/main ./CHANGELOG.md` 4. `git add ./CHANGELOG.md` 5. `git commit -m "Update CHANGELOG.md for v"` 6. `git push origin` -19. (If prerelease) Sync `versions/next.json` from `next` to `main` +19. (If `next`-release) Sync `versions/next.json` from `next` to `main` 1. `git checkout main` 2. `git pull` 3. `git checkout origin/next ./docs/versions/next.json` @@ -448,11 +448,9 @@ To promote a prerelease to a new prerelease ID, during the [Re-trigger the Workf To promote a prerelease to a stable reelase, during the [Re-trigger the Workflow](#4-re-trigger-the-workflow) step, choose: -- Release type: Patch +- Release type: Patch, Minor or Major - Prerelease ID: Leave empty -The "Patch" release type ensures the current prerelease version gets promoted to a stable version without any major/minor/patch bumps. - This scenario is special as it will target `latest-release` instead of `next-release`, and thus merge into `main` when done, and not `next`. So it goes `next` -> `version-from- `latest-release` -> `main`. When this is done, the Releaser will need to trigger a new release on `next` that bumps the version to a new prerelease minor as described [just below](#first-prerelease-of-new-majorminor---710---720-alpha0-or-800-alpha0). ### First prerelease of new major/minor - `7.1.0` -> `7.2.0-alpha.0` or `8.0.0-alpha.0` diff --git a/scripts/release/generate-pr-description.ts b/scripts/release/generate-pr-description.ts index 7049a1aa44c..aa7dfe7e53e 100644 --- a/scripts/release/generate-pr-description.ts +++ b/scripts/release/generate-pr-description.ts @@ -18,7 +18,7 @@ program 'Which version to generate changelog from, eg. "7.0.7". Defaults to the version at code/package.json' ) .option('-N, --next-version ', 'Which version to generate changelog to, eg. "7.0.8"') - .option('-P, --unpicked-patches', 'Set to only consider PRs labeled with "patch" label') + .option('-P, --unpicked-patches', 'Set to only consider PRs labeled with "patch:yes" label') .option( '-M, --manual-cherry-picks ', 'A stringified JSON array of commit hashes, of patch PRs that needs to be cherry-picked manually' diff --git a/scripts/release/is-pr-frozen.ts b/scripts/release/is-pr-frozen.ts index 27d3a37b765..56f75d0ba33 100644 --- a/scripts/release/is-pr-frozen.ts +++ b/scripts/release/is-pr-frozen.ts @@ -12,7 +12,7 @@ program .description( 'returns true if the versioning pull request associated with the current branch has the "freeze" label' ) - .option('-P, --patch', 'Look for hotfix PR instead of next PR', false) + .option('-H, --hotfix', 'Look for hotfix PR instead of next PR', false) .option('-V, --verbose', 'Enable verbose logging', false); const CODE_DIR_PATH = path.join(__dirname, '..', '..', 'code'); From 8978776ff528b8ea80cc90f8d86d3949e28ab237 Mon Sep 17 00:00:00 2001 From: Shaun Lloyd Date: Tue, 29 Aug 2023 14:21:12 -0400 Subject: [PATCH 010/249] Add url for themes icon --- code/addons/themes/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/addons/themes/package.json b/code/addons/themes/package.json index 8e4a40ec9a0..93cd55aba01 100644 --- a/code/addons/themes/package.json +++ b/code/addons/themes/package.json @@ -114,6 +114,6 @@ "unsupportedFrameworks": [ "react-native" ], - "icon": "" + "icon": "https://user-images.githubusercontent.com/18172605/264114587-e4b32190-a9b7-4afa-b739-c873fc0498a6.png" } } From bd5f0fd0956cddc1401fb2f2d380139d6b3d1439 Mon Sep 17 00:00:00 2001 From: Shaun Evening Date: Tue, 29 Aug 2023 16:38:34 -0400 Subject: [PATCH 011/249] Merge pull request #23996 from storybookjs/shaun/fix-chanelog-json-builder Scripts: Fix the changelog writer to escape doublequotes (cherry picked from commit 7669124b075c6fae95785de5015ad7b09fa11c15) --- .../release/__tests__/write-changelog.test.ts | 39 +++++++++++++++++++ scripts/release/write-changelog.ts | 2 +- 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/scripts/release/__tests__/write-changelog.test.ts b/scripts/release/__tests__/write-changelog.test.ts index 383d3169dec..7431222f975 100644 --- a/scripts/release/__tests__/write-changelog.test.ts +++ b/scripts/release/__tests__/write-changelog.test.ts @@ -82,6 +82,45 @@ describe('Write changelog', () => { `); }); + it('should escape double quotes for json files', async () => { + getChangesMock.mockResolvedValue({ + changes: [], + changelogText: `## 7.0.1 + +- React: Make it reactive +- Revert "CLI: Not UI" +- CLI: Not UI`, + }); + + await writeChangelog(['7.0.1'], {}); + + expect(fsExtra.writeFile).toHaveBeenCalledTimes(1); + expect(fsExtra.writeFile.mock.calls[0][0]).toBe(STABLE_CHANGELOG_PATH); + expect(fsExtra.writeFile.mock.calls[0][1]).toMatchInlineSnapshot(` + "## 7.0.1 + + - React: Make it reactive + - Revert "CLI: Not UI" + - CLI: Not UI + + ## 7.0.0 + + - Core: Some change" + `); + expect(fsExtra.writeJson).toBeCalledTimes(1); + expect(fsExtra.writeJson.mock.calls[0][0]).toBe(LATEST_VERSION_PATH); + expect(fsExtra.writeJson.mock.calls[0][1]).toMatchInlineSnapshot(` + { + "info": { + "plain": "- React: Make it reactive + - Revert \\"CLI: Not UI\\" + - CLI: Not UI", + }, + "version": "7.0.1", + } + `); + }); + it('should write to prerelase changelogs and version files in docs', async () => { getChangesMock.mockResolvedValue({ changes: [], diff --git a/scripts/release/write-changelog.ts b/scripts/release/write-changelog.ts index e97a7acc70d..41bc9b72bd3 100644 --- a/scripts/release/write-changelog.ts +++ b/scripts/release/write-changelog.ts @@ -94,7 +94,7 @@ const writeToDocsVersionFile = async ({ console.log(`📝 Writing changelog to ${chalk.blue(path)}`); } - const textWithoutHeading = changelogText.split('\n').slice(2).join('\n'); + const textWithoutHeading = changelogText.split('\n').slice(2).join('\n').replaceAll('"', '\\"'); const content = { version, From 8311a65d30b668d58c7e5fda7d6633767427ada7 Mon Sep 17 00:00:00 2001 From: Shaun Evening Date: Tue, 29 Aug 2023 16:46:35 -0400 Subject: [PATCH 012/249] Merge pull request #23997 from storybookjs/shaun/fix-json-changelog Docs: Fix broken JSON in version files (cherry picked from commit a810931c9321c0d95d2eb48e23f62856f11b5592) --- docs/versions/latest.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/versions/latest.json b/docs/versions/latest.json index 18bc602521b..4325d5d96ac 100644 --- a/docs/versions/latest.json +++ b/docs/versions/latest.json @@ -1 +1,6 @@ -{"version":"7.4.0","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- 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- CLI: Improve autotitle stories format handling in GFM automigration - [#23964](https://github.com/storybookjs/storybook/pull/23964), thanks [@yannbf](https://github.com/yannbf)!\n- CLI: Install latest version of non-core addon - [#23956](https://github.com/storybookjs/storybook/pull/23956), thanks [@Integrayshaun](https://github.com/Integrayshaun)!\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- CLI: Set server init generator to use Webpack5 - [#23971](https://github.com/storybookjs/storybook/pull/23971), thanks [@yannbf](https://github.com/yannbf)!\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 indexing for non-prefixed `stories.*` stories - [#23974](https://github.com/storybookjs/storybook/pull/23974), thanks [@shilman](https://github.com/shilman)!\n- Core: Fix race-condition relating to `addons.setConfig` - [#23802](https://github.com/storybookjs/storybook/pull/23802), thanks [@ndelangen](https://github.com/ndelangen)!\n- Core: Throw an error when detecting empty stories field - [#23942](https://github.com/storybookjs/storybook/pull/23942), thanks [@yannbf](https://github.com/yannbf)!\n- Dependencies: Upgrade `escodegen` to fix security issue - [#23973](https://github.com/storybookjs/storybook/pull/23973), thanks [@shilman](https://github.com/shilman)!\n- Index: Fix `*.story.*` CSF indexing - [#23852](https://github.com/storybookjs/storybook/pull/23852), thanks [@shilman](https://github.com/shilman)!\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: Move filtering of sidebar into the state - [#23911](https://github.com/storybookjs/storybook/pull/23911), thanks [@ndelangen](https://github.com/ndelangen)!\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- 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- Preset: Add common preset overrides mechanism - [#23915](https://github.com/storybookjs/storybook/pull/23915), thanks [@yannbf](https://github.com/yannbf)!\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- Shortcuts: Execute preventDefault only if keyboard shortcuts are enabled - [#23412](https://github.com/storybookjs/storybook/pull/23412), thanks [@Spielboerg](https://github.com/Spielboerg)!\n- Types: Fix `React.ReactElement` not found - [#23967](https://github.com/storybookjs/storybook/pull/23967), thanks [@abu-osos](https://github.com/abu-osos)!\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 filter functions at runtime - [#23722](https://github.com/storybookjs/storybook/pull/23722), 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)!\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", + "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- 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- CLI: Improve autotitle stories format handling in GFM automigration - [#23964](https://github.com/storybookjs/storybook/pull/23964), thanks [@yannbf](https://github.com/yannbf)!\n- CLI: Install latest version of non-core addon - [#23956](https://github.com/storybookjs/storybook/pull/23956), thanks [@Integrayshaun](https://github.com/Integrayshaun)!\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- CLI: Set server init generator to use Webpack5 - [#23971](https://github.com/storybookjs/storybook/pull/23971), thanks [@yannbf](https://github.com/yannbf)!\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 indexing for non-prefixed `stories.*` stories - [#23974](https://github.com/storybookjs/storybook/pull/23974), thanks [@shilman](https://github.com/shilman)!\n- Core: Fix race-condition relating to `addons.setConfig` - [#23802](https://github.com/storybookjs/storybook/pull/23802), thanks [@ndelangen](https://github.com/ndelangen)!\n- Core: Throw an error when detecting empty stories field - [#23942](https://github.com/storybookjs/storybook/pull/23942), thanks [@yannbf](https://github.com/yannbf)!\n- Dependencies: Upgrade `escodegen` to fix security issue - [#23973](https://github.com/storybookjs/storybook/pull/23973), thanks [@shilman](https://github.com/shilman)!\n- Index: Fix `*.story.*` CSF indexing - [#23852](https://github.com/storybookjs/storybook/pull/23852), thanks [@shilman](https://github.com/shilman)!\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: Move filtering of sidebar into the state - [#23911](https://github.com/storybookjs/storybook/pull/23911), thanks [@ndelangen](https://github.com/ndelangen)!\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- 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- Preset: Add common preset overrides mechanism - [#23915](https://github.com/storybookjs/storybook/pull/23915), thanks [@yannbf](https://github.com/yannbf)!\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- Shortcuts: Execute preventDefault only if keyboard shortcuts are enabled - [#23412](https://github.com/storybookjs/storybook/pull/23412), thanks [@Spielboerg](https://github.com/Spielboerg)!\n- Types: Fix `React.ReactElement` not found - [#23967](https://github.com/storybookjs/storybook/pull/23967), thanks [@abu-osos](https://github.com/abu-osos)!\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 filter functions at runtime - [#23722](https://github.com/storybookjs/storybook/pull/23722), 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)!\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 d6297bff9975b1e1d2949eab0461fe0ac24338e0 Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Wed, 30 Aug 2023 09:19:30 +0200 Subject: [PATCH 013/249] only commit changelog changes when there are actual changes --- .github/workflows/publish.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 18e23c17416..e52af0dc1c7 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -160,8 +160,10 @@ jobs: git pull git checkout origin/main ./CHANGELOG.md git add ./CHANGELOG.md - git commit -m "Update CHANGELOG.md for v${{ steps.version.outputs.current-version }} [skip ci]" - git push origin next + if ! git diff-index --quiet HEAD; then + git commit -m "Update CHANGELOG.md for v${{ steps.version.outputs.current-version }} [skip ci]" + git push origin next + fi - name: Sync version JSONs from `next-release` to `main` if: github.ref_name == 'next-release' From 670bc5167af3f3ec70653460c864e5c91dadb633 Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Wed, 30 Aug 2023 10:01:55 +0200 Subject: [PATCH 014/249] add comments --- .github/workflows/publish.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index e52af0dc1c7..821bbf1d15e 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -111,6 +111,12 @@ jobs: id: target run: echo "target=${{ github.ref_name == 'next-release' && 'next' || 'main' }}" >> $GITHUB_OUTPUT + # TODO: create a commit on next that does the following: + # bump version accordingly + # update changelog + # update version JSONs + # push to next + # TODO: ensure all of this logic works if a release from next targets latest-release. steps.targets.outputs? - name: Get changelog for ${{ steps.version.outputs.current-version }} if: steps.publish-needed.outputs.published == 'false' id: changelog @@ -160,6 +166,7 @@ jobs: git pull git checkout origin/main ./CHANGELOG.md git add ./CHANGELOG.md + # only commit if there are changes if ! git diff-index --quiet HEAD; then git commit -m "Update CHANGELOG.md for v${{ steps.version.outputs.current-version }} [skip ci]" git push origin next From d5df684fc7c107bceffddfa176d2799c60c9a58e Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Wed, 30 Aug 2023 10:44:03 +0200 Subject: [PATCH 015/249] simplify --- .github/workflows/publish.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 821bbf1d15e..47e9798ca46 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -166,11 +166,8 @@ jobs: git pull git checkout origin/main ./CHANGELOG.md git add ./CHANGELOG.md - # only commit if there are changes - if ! git diff-index --quiet HEAD; then - git commit -m "Update CHANGELOG.md for v${{ steps.version.outputs.current-version }} [skip ci]" - git push origin next - fi + git commit -m "Update CHANGELOG.md for v${{ steps.version.outputs.current-version }} [skip ci]" || true + git push origin next - name: Sync version JSONs from `next-release` to `main` if: github.ref_name == 'next-release' From 431ec639fe559b0911427087a8f1d3c0b53cea53 Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Thu, 31 Aug 2023 11:14:00 +0200 Subject: [PATCH 016/249] ensure next is always ahead of main during stable releases --- .github/workflows/publish.yml | 38 ++++++++++++++++++++++++++--------- 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 47e9798ca46..c31ef7c6a0d 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -63,7 +63,6 @@ jobs: yarn install - name: Apply deferred version bump and commit - id: version-bump working-directory: . run: | CURRENT_VERSION=$(cat ./code/package.json | jq '.version') @@ -111,11 +110,6 @@ jobs: id: target run: echo "target=${{ github.ref_name == 'next-release' && 'next' || 'main' }}" >> $GITHUB_OUTPUT - # TODO: create a commit on next that does the following: - # bump version accordingly - # update changelog - # update version JSONs - # push to next # TODO: ensure all of this logic works if a release from next targets latest-release. steps.targets.outputs? - name: Get changelog for ${{ steps.version.outputs.current-version }} if: steps.publish-needed.outputs.published == 'false' @@ -129,6 +123,7 @@ jobs: # when this is a patch release from main, label any patch PRs included in the release # when this is a stable release from next, label ALL patch PRs found, as they will per definition be "patched" now + # TODO: this won't work anymore for releases from next to latest-release - name: Label patch PRs as picked if: github.ref_name == 'latest-release' || (steps.publish-needed.outputs.published == 'false' && steps.target.outputs.target == 'next' && !steps.is-prerelease.outputs.prerelease) env: @@ -157,6 +152,33 @@ jobs: git merge ${{ github.ref_name }} git push origin ${{ steps.target.outputs.target }} + # This step ensures that next is always one minor ahead of main + # this is needed when releasing a stable from next + # next will be at eg. 7.4.0-alpha.4, and main will be at 7.3.0 + # then we release 7.4.0 by merging next to latest-release to main + # we then ensure here that next is bumped to 7.5.0 - without releasing it + # if this is a hotfix release bumping main to 7.3.1, next will not be touched because it's already ahead + - name: Ensure `next` is a minor version ahead of `main` + if: github.ref_name == 'latest-release' + run: | + git checkout next + git pull + + CODE_PKG_JSON=$(cat ../code/package.json) + VERSION_ON_NEXT=$(echo $CODE_PKG_JSON | jq --raw-output '.version') + VERSION_ON_MAIN="${{ steps.version.outputs.current-version }}" + + # check if next is behind current version + if NEXT_IS_BEHIND=$(npx semver --include-prerelease --range "<$VERSION_ON_MAIN" "$VERSION_ON_NEXT" 2>/dev/null); then + # temporarily set the version on next to be the same as main... + echo "$CODE_PKG_JSON" | jq --arg version "$VERSION_ON_MAIN" '.version = $version' > ../code/package.json + # ... then bump it by one minor + yarn release:version --release-type minor + git add .. + git commit -m "Bump next to be one minor ahead of main [skip ci]" + git push origin next + fi + - name: Sync CHANGELOG.md from `main` to `next` if: github.ref_name == 'latest-release' working-directory: . @@ -182,10 +204,6 @@ jobs: git commit -m "Update $VERSION_FILE for v${{ steps.version.outputs.current-version }}" git push origin main - - name: Overwrite main with next - if: steps.target.outputs.target == 'next' && steps.is-prerelease.outputs.prerelease == 'false' - run: git push --force origin next:main - - name: Report job failure to Discord if: failure() env: From 507516571bdf628c944632e78c136d859c7ee68e Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Thu, 31 Aug 2023 12:51:27 +0200 Subject: [PATCH 017/249] improve readability of publish script --- .github/workflows/publish.yml | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index c31ef7c6a0d..4f71006b763 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -110,7 +110,6 @@ jobs: id: target run: echo "target=${{ github.ref_name == 'next-release' && 'next' || 'main' }}" >> $GITHUB_OUTPUT - # TODO: ensure all of this logic works if a release from next targets latest-release. steps.targets.outputs? - name: Get changelog for ${{ steps.version.outputs.current-version }} if: steps.publish-needed.outputs.published == 'false' id: changelog @@ -122,13 +121,11 @@ jobs: run: git fetch --tags origin # when this is a patch release from main, label any patch PRs included in the release - # when this is a stable release from next, label ALL patch PRs found, as they will per definition be "patched" now - # TODO: this won't work anymore for releases from next to latest-release - name: Label patch PRs as picked - if: github.ref_name == 'latest-release' || (steps.publish-needed.outputs.published == 'false' && steps.target.outputs.target == 'next' && !steps.is-prerelease.outputs.prerelease) + if: github.ref_name == 'latest-release' env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: yarn release:label-patches ${{ steps.target.outputs.target == 'next' && '--all' || '' }} + run: yarn release:label-patches - name: Create GitHub Release if: steps.publish-needed.outputs.published == 'false' @@ -159,7 +156,7 @@ jobs: # we then ensure here that next is bumped to 7.5.0 - without releasing it # if this is a hotfix release bumping main to 7.3.1, next will not be touched because it's already ahead - name: Ensure `next` is a minor version ahead of `main` - if: github.ref_name == 'latest-release' + if: steps.target.outputs.target == 'main' run: | git checkout next git pull @@ -168,19 +165,21 @@ jobs: VERSION_ON_NEXT=$(echo $CODE_PKG_JSON | jq --raw-output '.version') VERSION_ON_MAIN="${{ steps.version.outputs.current-version }}" - # check if next is behind current version - if NEXT_IS_BEHIND=$(npx semver --include-prerelease --range "<$VERSION_ON_MAIN" "$VERSION_ON_NEXT" 2>/dev/null); then - # temporarily set the version on next to be the same as main... - echo "$CODE_PKG_JSON" | jq --arg version "$VERSION_ON_MAIN" '.version = $version' > ../code/package.json - # ... then bump it by one minor - yarn release:version --release-type minor - git add .. - git commit -m "Bump next to be one minor ahead of main [skip ci]" - git push origin next + # skip if next is already ahead of main + if NEXT_IS_AHEAD=$(npx semver --include-prerelease --range ">=$VERSION_ON_MAIN" "$VERSION_ON_NEXT" 2>/dev/null); then + return fi + # temporarily set the version on next to be the same as main... + echo "$CODE_PKG_JSON" | jq --arg version "$VERSION_ON_MAIN" '.version = $version' > ../code/package.json + # ... then bump it by one minor + yarn release:version --release-type minor + git add .. + git commit -m "Bump next to be one minor ahead of main [skip ci]" + git push origin next + - name: Sync CHANGELOG.md from `main` to `next` - if: github.ref_name == 'latest-release' + if: steps.target.outputs.target == 'main' working-directory: . run: | git fetch origin next From 44e988cd10aac138cf5da37a9335618e3b68935e Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Thu, 31 Aug 2023 12:53:37 +0200 Subject: [PATCH 018/249] pul all release workflows in same concurrency group --- .github/workflows/prepare-hotfix-release.yml | 4 ++-- .github/workflows/prepare-next-release.yml | 4 ++-- .github/workflows/publish.yml | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/prepare-hotfix-release.yml b/.github/workflows/prepare-hotfix-release.yml index 2a331fb5f3e..83109bcf52c 100644 --- a/.github/workflows/prepare-hotfix-release.yml +++ b/.github/workflows/prepare-hotfix-release.yml @@ -12,8 +12,8 @@ env: PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: 1 concurrency: - group: ${{ github.workflow }} - cancel-in-progress: true + group: release-group + cancel-in-progress: false jobs: prepare-hotfix-pull-request: diff --git a/.github/workflows/prepare-next-release.yml b/.github/workflows/prepare-next-release.yml index ad79b5f1b3f..4add96125d3 100644 --- a/.github/workflows/prepare-next-release.yml +++ b/.github/workflows/prepare-next-release.yml @@ -30,8 +30,8 @@ env: PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: 1 concurrency: - group: ${{ github.workflow }} - cancel-in-progress: true + group: release-group + cancel-in-progress: false jobs: prepare-next-pull-request: diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 4f71006b763..f2ee9cbc12a 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -16,7 +16,8 @@ permissions: pull-requests: write concurrency: - group: ${{ github.workflow }}-${{ github.ref_name }} + group: release-group + cancel-in-progress: false jobs: publish: From bff632d0474999cb07989d1620b8cb782eeb1094 Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Fri, 1 Sep 2023 11:17:24 +0200 Subject: [PATCH 019/249] add todos --- .github/workflows/publish.yml | 2 +- scripts/release/is-pr-frozen.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index f2ee9cbc12a..505c9f301a0 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -36,7 +36,7 @@ jobs: run: | gh run cancel ${{ github.run_id }} gh run watch ${{ github.run_id }} - + # TODO: here, cancel any running AND pending runs for the preparation workflows: https://stackoverflow.com/questions/60753453/how-to-cancel-run-for-all-scheduled-github-actions-at-once - name: Checkout ${{ github.ref_name }} uses: actions/checkout@v3 with: diff --git a/scripts/release/is-pr-frozen.ts b/scripts/release/is-pr-frozen.ts index 56f75d0ba33..d053f3f5973 100644 --- a/scripts/release/is-pr-frozen.ts +++ b/scripts/release/is-pr-frozen.ts @@ -78,6 +78,7 @@ export const run = async (options: unknown) => { console.log(`🔍 Found pull request: ${JSON.stringify(pullRequest, null, 2)}`); + // TODO: check if pull request is still open const isFrozen = pullRequest.labels?.includes('freeze'); if (process.env.GITHUB_ACTIONS === 'true') { setOutput('frozen', isFrozen); From 8ed4c1ca3e7815f5e3649081e0da169a540c9a23 Mon Sep 17 00:00:00 2001 From: storybook-bot <32066757+storybook-bot@users.noreply.github.com> Date: Fri, 1 Sep 2023 21:45:11 +0000 Subject: [PATCH 020/249] Update ./docs/versions/next.json for v7.5.0-alpha.0 --- docs/versions/next.json | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/docs/versions/next.json b/docs/versions/next.json index b9164a2dcd0..93bfe5e2300 100644 --- a/docs/versions/next.json +++ b/docs/versions/next.json @@ -1,6 +1 @@ -{ - "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)!" - } -} +{"version":"7.5.0-alpha.0","info":{"plain":"- Addon API: Improve the updateStatus API - [#24007](https://github.com/storybookjs/storybook/pull/24007), thanks [@ndelangen](https://github.com/ndelangen)!\n- CLI: Add more information to `storybook info` command - [#24003](https://github.com/storybookjs/storybook/pull/24003), thanks [@JReinhold](https://github.com/JReinhold)!\n- CLI: Add uncaughtException handler - [#24018](https://github.com/storybookjs/storybook/pull/24018), thanks [@yannbf](https://github.com/yannbf)!\n- CLI: Remove random commas in storybook upgrade logs - [#22333](https://github.com/storybookjs/storybook/pull/22333), thanks [@joaonunomota](https://github.com/joaonunomota)!\n- Doc Blocks: Add `title` to `Meta` prop types - [#23370](https://github.com/storybookjs/storybook/pull/23370), thanks [@iqbalcodes6602](https://github.com/iqbalcodes6602)!\n- Docs: Fix TOC import - [#24047](https://github.com/storybookjs/storybook/pull/24047), thanks [@shilman](https://github.com/shilman)!\n- Docs: Fix table of contents scroll behavior - [#23986](https://github.com/storybookjs/storybook/pull/23986), thanks [@almoghaimo](https://github.com/almoghaimo)!\n- Telemetry: Filter addon options to protect sensitive info - [#24000](https://github.com/storybookjs/storybook/pull/24000), thanks [@shilman](https://github.com/shilman)!\n- Types: Remove `@types/react` dep from `@storybook/types` - [#24042](https://github.com/storybookjs/storybook/pull/24042), thanks [@JReinhold](https://github.com/JReinhold)!"}} From 98692824ad0efa90c7c118446bf322d32790d3e7 Mon Sep 17 00:00:00 2001 From: Nate Houk Date: Sat, 2 Sep 2023 09:32:01 +0200 Subject: [PATCH 021/249] Update chromatic-github-action.js.mdx Update to fix errors with fetch-depth --- docs/snippets/common/chromatic-github-action.js.mdx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/snippets/common/chromatic-github-action.js.mdx b/docs/snippets/common/chromatic-github-action.js.mdx index c064b7ae6cf..8e796479564 100644 --- a/docs/snippets/common/chromatic-github-action.js.mdx +++ b/docs/snippets/common/chromatic-github-action.js.mdx @@ -15,7 +15,13 @@ jobs: # Job steps steps: - uses: actions/checkout@v3 - - run: yarn + with: + fetch-depth: 0 + - uses: actions/setup-node@v3 + with: + node-version: 20 + cache: 'npm' + - run: npm ci #👇 Adds Chromatic as a step in the workflow - uses: chromaui/action@v1 # Options required for Chromatic's GitHub Action From a88829dd8a84d967bc5150990ab92e12f5f85794 Mon Sep 17 00:00:00 2001 From: storybook-bot <32066757+storybook-bot@users.noreply.github.com> Date: Mon, 4 Sep 2023 02:25:35 +0000 Subject: [PATCH 022/249] Update ./docs/versions/next.json for v7.5.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 93bfe5e2300..739652e36af 100644 --- a/docs/versions/next.json +++ b/docs/versions/next.json @@ -1 +1 @@ -{"version":"7.5.0-alpha.0","info":{"plain":"- Addon API: Improve the updateStatus API - [#24007](https://github.com/storybookjs/storybook/pull/24007), thanks [@ndelangen](https://github.com/ndelangen)!\n- CLI: Add more information to `storybook info` command - [#24003](https://github.com/storybookjs/storybook/pull/24003), thanks [@JReinhold](https://github.com/JReinhold)!\n- CLI: Add uncaughtException handler - [#24018](https://github.com/storybookjs/storybook/pull/24018), thanks [@yannbf](https://github.com/yannbf)!\n- CLI: Remove random commas in storybook upgrade logs - [#22333](https://github.com/storybookjs/storybook/pull/22333), thanks [@joaonunomota](https://github.com/joaonunomota)!\n- Doc Blocks: Add `title` to `Meta` prop types - [#23370](https://github.com/storybookjs/storybook/pull/23370), thanks [@iqbalcodes6602](https://github.com/iqbalcodes6602)!\n- Docs: Fix TOC import - [#24047](https://github.com/storybookjs/storybook/pull/24047), thanks [@shilman](https://github.com/shilman)!\n- Docs: Fix table of contents scroll behavior - [#23986](https://github.com/storybookjs/storybook/pull/23986), thanks [@almoghaimo](https://github.com/almoghaimo)!\n- Telemetry: Filter addon options to protect sensitive info - [#24000](https://github.com/storybookjs/storybook/pull/24000), thanks [@shilman](https://github.com/shilman)!\n- Types: Remove `@types/react` dep from `@storybook/types` - [#24042](https://github.com/storybookjs/storybook/pull/24042), thanks [@JReinhold](https://github.com/JReinhold)!"}} +{"version":"7.5.0-alpha.1","info":{"plain":"- Core: Add CJS entrypoints to errors in core events - [#24038](https://github.com/storybookjs/storybook/pull/24038), thanks [@yannbf](https://github.com/yannbf)!"}} From 39ea6ba5b7a77db16d1788d1b9c0e18091aa570b Mon Sep 17 00:00:00 2001 From: Yann Braga Date: Mon, 4 Sep 2023 16:13:17 +0200 Subject: [PATCH 023/249] Merge pull request #24015 from johnhunter/node-version-nvmrc Development: Manage Node version with .nvmrc --- .github/workflows/canary-release-pr.yml | 3 +-- .github/workflows/danger-js.yml | 4 ++-- .github/workflows/prepare-patch-release.yml | 2 +- .github/workflows/prepare-prerelease.yml | 2 +- .github/workflows/publish.yml | 2 +- .gitignore | 1 - .nvmrc | 1 + CONTRIBUTING.md | 15 +++++++++++++-- package.json | 6 +----- 9 files changed, 21 insertions(+), 15 deletions(-) create mode 100644 .nvmrc diff --git a/.github/workflows/canary-release-pr.yml b/.github/workflows/canary-release-pr.yml index 4b1504cfd1b..827f24a2c5f 100644 --- a/.github/workflows/canary-release-pr.yml +++ b/.github/workflows/canary-release-pr.yml @@ -58,8 +58,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v3 with: - node-version: '16' - + node-version-file: '.nvmrc' - name: Cache dependencies uses: actions/cache@v3 with: diff --git a/.github/workflows/danger-js.yml b/.github/workflows/danger-js.yml index f83519953b4..eddb5dee1fe 100644 --- a/.github/workflows/danger-js.yml +++ b/.github/workflows/danger-js.yml @@ -21,10 +21,10 @@ jobs: name: Danger JS runs-on: ubuntu-latest steps: + - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: - node-version: '16' - - uses: actions/checkout@v3 + node-version-file: '.nvmrc' - name: Danger JS uses: danger/danger-js@11.2.6 env: diff --git a/.github/workflows/prepare-patch-release.yml b/.github/workflows/prepare-patch-release.yml index c88022c7ea0..e4f8e38df50 100644 --- a/.github/workflows/prepare-patch-release.yml +++ b/.github/workflows/prepare-patch-release.yml @@ -33,7 +33,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v3 with: - node-version: '16' + node-version-file: '.nvmrc' - name: Cache dependencies uses: actions/cache@v3 diff --git a/.github/workflows/prepare-prerelease.yml b/.github/workflows/prepare-prerelease.yml index 1250aedcfaa..e68a7e1ef63 100644 --- a/.github/workflows/prepare-prerelease.yml +++ b/.github/workflows/prepare-prerelease.yml @@ -54,7 +54,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v3 with: - node-version: '16' + node-version-file: '.nvmrc' - name: Cache dependencies uses: actions/cache@v3 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 18e23c17416..863b4e9ae7e 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -45,7 +45,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v3 with: - node-version: '16' + node-version-file: '.nvmrc' - name: Cache dependencies uses: actions/cache@v3 diff --git a/.gitignore b/.gitignore index 29c025aadf2..63f9445af85 100644 --- a/.gitignore +++ b/.gitignore @@ -37,7 +37,6 @@ coverage/ /**/LICENSE code/docs/public package-lock.json -.nvmrc storybook-static .jest-test-results.json *.jar diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 00000000000..59ea99ee63c --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +16.20 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index cc26a6bff21..78993afd838 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,13 +1,24 @@ # Getting started -Storybook is developed against a specific node version. We recommend using [Volta](https://volta.sh/) as it will automatically install the correct node and yarn version when you first use the repo. If you chose not to use Volta please ensure you you have node version 16 installed (suggestion: v16.5) +Storybook is developed against a specific node version which is defined in an `.nvmrc` file. You can use any Node version manager that uses the `.nvmrc` configuration file (we recommend [fnm](https://fnm.vercel.app/)). + +## Using fnm as a Node version manager + +- Install fnm [as per instructions](https://github.com/Schniz/fnm/tree/master#installation) +- In your shell setup include the `use-on-cd`, `corepack-enabled` and `version-file-strategy recursive` parameters in the `fnm env` command, e.g. + + ```sh + eval "$(fnm env --use-on-cd --corepack-enabled --version-file-strategy recursive)" + ``` + +## Running the local development environment - Ensure if you are using Windows to use the Windows Subsystem for Linux (WSL). - Run `yarn start` in the root directory to run a basic test Storybook "sandbox". The `yarn start` script will generate a React Vite TypeScript sandbox with a set of test stories inside it, as well as taking all steps required to get it running (building the various packages we need etc). There is no need to run `yarn` or `yarn install` as `yarn start` will do this for you. -## Issues +### Issues If you run `yarn start` and encounter the following error, try rerunning `yarn start` a second time: diff --git a/package.json b/package.json index 7c606bfbed0..562cce14091 100644 --- a/package.json +++ b/package.json @@ -12,9 +12,5 @@ "test": "cd code; yarn test", "upload-bench": "cd scripts; yarn upload-bench" }, - "packageManager": "yarn@3.5.1", - "volta": { - "node": "16.20.1", - "yarn": "3.5.1" - } + "packageManager": "yarn@3.5.1" } From a896513363238e66674fac01ef233979b694e281 Mon Sep 17 00:00:00 2001 From: Michael Shilman Date: Wed, 30 Aug 2023 13:55:35 +0800 Subject: [PATCH 024/249] Merge pull request #24000 from storybookjs/shilman/filter-addons-telemetry Telemetry: Filter addon options to protect sensitive info (cherry picked from commit 7b4f37f4d7a97b6e21a8dd730d37f8ffb18a2fd0) --- .../telemetry/src/storybook-metadata.test.ts | 27 +++++++++++++++++++ code/lib/telemetry/src/storybook-metadata.ts | 4 ++- 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/code/lib/telemetry/src/storybook-metadata.test.ts b/code/lib/telemetry/src/storybook-metadata.test.ts index ab64dc26e9a..83a206a9276 100644 --- a/code/lib/telemetry/src/storybook-metadata.test.ts +++ b/code/lib/telemetry/src/storybook-metadata.test.ts @@ -349,6 +349,33 @@ describe('storybook-metadata', () => { expect(res.refCount).toEqual(2); }); + test('only reports addon options for addon-essentials', async () => { + const res = await computeStorybookMetadata({ + packageJson: packageJsonMock, + mainConfig: { + ...mainJsMock, + addons: [ + { name: '@storybook/addon-essentials', options: { controls: false } }, + { name: 'addon-foo', options: { foo: 'bar' } }, + ], + }, + }); + expect(res.addons).toMatchInlineSnapshot(` + Object { + "@storybook/addon-essentials": Object { + "options": Object { + "controls": false, + }, + "version": "x.x.x", + }, + "addon-foo": Object { + "options": undefined, + "version": "x.x.x", + }, + } + `); + }); + test.each(Object.entries(metaFrameworks))( 'should detect the supported metaframework: %s', async (metaFramework, name) => { diff --git a/code/lib/telemetry/src/storybook-metadata.ts b/code/lib/telemetry/src/storybook-metadata.ts index 01a54d9c9ec..2c70b566f97 100644 --- a/code/lib/telemetry/src/storybook-metadata.ts +++ b/code/lib/telemetry/src/storybook-metadata.ts @@ -114,7 +114,9 @@ export const computeStorybookMetadata = async ({ if (typeof addon === 'string') { addonName = sanitizeAddonName(addon); } else { - options = addon.options; + if (addon.name.includes('addon-essentials')) { + options = addon.options; + } addonName = sanitizeAddonName(addon.name); } From ebe172e5ed15fcda9c5adad2a104eec6ca894800 Mon Sep 17 00:00:00 2001 From: Yann Braga Date: Fri, 1 Sep 2023 18:49:23 +0200 Subject: [PATCH 025/249] Merge pull request #24018 from storybookjs/yann/string-width-issue CLI: Add uncaughtException handler (cherry picked from commit a66b8b22455f6032f94a85f13aa9a39b763ba917) --- code/lib/cli/bin/index.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/code/lib/cli/bin/index.js b/code/lib/cli/bin/index.js index 812bff5291c..7131e95a311 100755 --- a/code/lib/cli/bin/index.js +++ b/code/lib/cli/bin/index.js @@ -6,4 +6,21 @@ if (majorNodeVersion < 16) { process.exit(1); } +// The Storybook CLI has a catch block for all of its commands, but if an error +// occurs before the command even runs, for instance, if an import fails, then +// such error will fall under the uncaughtException handler. +// This is the earliest moment we can catch such errors. +process.once('uncaughtException', (error) => { + if (error.message.includes('string-width')) { + console.error( + [ + '🔴 Error: It looks like you are having a known issue with package hoisting.', + 'Please check the following issue for details and solutions: https://github.com/storybookjs/storybook/issues/22431#issuecomment-1630086092\n\n', + ].join('\n') + ); + } + + throw error; +}); + require('../dist/generate.js'); From 4c80e0537089c504afccc9f0321e4f977a5c0ace Mon Sep 17 00:00:00 2001 From: Michael Shilman Date: Sat, 2 Sep 2023 01:14:46 +0800 Subject: [PATCH 026/249] Merge pull request #24047 from storybookjs/shilman/fix-tocbot-import Docs: Fix TOC import (cherry picked from commit 2995f493028aeb85ea3325cdcae85781af2f7733) --- code/ui/blocks/src/components/TableOfContents.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/ui/blocks/src/components/TableOfContents.tsx b/code/ui/blocks/src/components/TableOfContents.tsx index 892f1e137f2..65d0e1bc006 100644 --- a/code/ui/blocks/src/components/TableOfContents.tsx +++ b/code/ui/blocks/src/components/TableOfContents.tsx @@ -1,7 +1,7 @@ import React, { useEffect } from 'react'; import type { FC, ReactElement } from 'react'; import { styled } from '@storybook/theming'; -import tocbot from 'tocbot'; +import * as tocbot from 'tocbot'; export interface TocParameters { /** CSS selector for the container to search for headings. */ From 27a0887ebb8b0c62edaf8834012a1acb0c019a7f Mon Sep 17 00:00:00 2001 From: Michael Shilman Date: Mon, 4 Sep 2023 08:40:40 +0800 Subject: [PATCH 027/249] Merge pull request #24038 from storybookjs/yann/fix-cjs-entries-on-core-events Core: Add CJS entrypoints to errors in core events (cherry picked from commit 509dc79955b81a94aa754051451749852db41401) --- code/lib/cli/package.json | 1 + code/lib/core-common/package.json | 1 + code/lib/core-events/manager-errors.js | 4 ++++ code/lib/core-events/preview-errors.js | 4 ++++ code/lib/core-events/server-errors.js | 4 ++++ code/yarn.lock | 2 ++ 6 files changed, 16 insertions(+) create mode 100644 code/lib/core-events/manager-errors.js create mode 100644 code/lib/core-events/preview-errors.js create mode 100644 code/lib/core-events/server-errors.js diff --git a/code/lib/cli/package.json b/code/lib/cli/package.json index 8dbcdb6b8c9..74ab0adb636 100644 --- a/code/lib/cli/package.json +++ b/code/lib/cli/package.json @@ -61,6 +61,7 @@ "@ndelangen/get-tarball": "^3.0.7", "@storybook/codemod": "workspace:*", "@storybook/core-common": "workspace:*", + "@storybook/core-events": "workspace:*", "@storybook/core-server": "workspace:*", "@storybook/csf-tools": "workspace:*", "@storybook/node-logger": "workspace:*", diff --git a/code/lib/core-common/package.json b/code/lib/core-common/package.json index 56aad7f9f47..d6dd5a49d7f 100644 --- a/code/lib/core-common/package.json +++ b/code/lib/core-common/package.json @@ -44,6 +44,7 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { + "@storybook/core-events": "workspace:*", "@storybook/node-logger": "workspace:*", "@storybook/types": "workspace:*", "@types/find-cache-dir": "^3.2.1", diff --git a/code/lib/core-events/manager-errors.js b/code/lib/core-events/manager-errors.js new file mode 100644 index 00000000000..6a1ce1522c1 --- /dev/null +++ b/code/lib/core-events/manager-errors.js @@ -0,0 +1,4 @@ +// This is required for projects that require paths such as `@storybook/core-events/manager-errors` +// but in CJS, while not in ESM mode. Else an error like this will occur: +// ENOENT: no such file or directory, open '/xyz/node_modules/@storybook/core-events/manager-errors.js' +module.exports = require('./dist/errors/manager-errors'); diff --git a/code/lib/core-events/preview-errors.js b/code/lib/core-events/preview-errors.js new file mode 100644 index 00000000000..a98055ba796 --- /dev/null +++ b/code/lib/core-events/preview-errors.js @@ -0,0 +1,4 @@ +// This is required for projects that require paths such as `@storybook/core-events/preview-errors` +// but in CJS, while not in ESM mode. Else an error like this will occur: +// ENOENT: no such file or directory, open '/xyz/node_modules/@storybook/core-events/preview-errors.js' +module.exports = require('./dist/errors/preview-errors'); diff --git a/code/lib/core-events/server-errors.js b/code/lib/core-events/server-errors.js new file mode 100644 index 00000000000..5f4eb31a408 --- /dev/null +++ b/code/lib/core-events/server-errors.js @@ -0,0 +1,4 @@ +// This is required for projects that require paths such as `@storybook/core-events/server-errors` +// but in CJS, while not in ESM mode. Else an error like this will occur: +// ENOENT: no such file or directory, open '/xyz/node_modules/@storybook/core-events/server-errors.js' +module.exports = require('./dist/errors/server-errors'); diff --git a/code/yarn.lock b/code/yarn.lock index 6c80e860b68..3caa8171c40 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -6571,6 +6571,7 @@ __metadata: "@storybook/client-api": "workspace:*" "@storybook/codemod": "workspace:*" "@storybook/core-common": "workspace:*" + "@storybook/core-events": "workspace:*" "@storybook/core-server": "workspace:*" "@storybook/csf-tools": "workspace:*" "@storybook/node-logger": "workspace:*" @@ -6719,6 +6720,7 @@ __metadata: version: 0.0.0-use.local resolution: "@storybook/core-common@workspace:lib/core-common" dependencies: + "@storybook/core-events": "workspace:*" "@storybook/node-logger": "workspace:*" "@storybook/types": "workspace:*" "@types/find-cache-dir": ^3.2.1 From a3d9706d094f6cb8400f6adce69aa9600c9aecd8 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Fri, 1 Sep 2023 16:02:45 +0200 Subject: [PATCH 028/249] Merge pull request #24042 from storybookjs/remove-types-react Types: Remove `@types/react` dep from `@storybook/types` (cherry picked from commit 5bd426472aa3d6d715f0ee6478eff5574c43d4fe) --- code/lib/types/package.json | 1 - code/yarn.lock | 1 - 2 files changed, 2 deletions(-) diff --git a/code/lib/types/package.json b/code/lib/types/package.json index b8b9ea5c6c5..894c1ca7fc0 100644 --- a/code/lib/types/package.json +++ b/code/lib/types/package.json @@ -47,7 +47,6 @@ "@storybook/channels": "workspace:*", "@types/babel__core": "^7.0.0", "@types/express": "^4.7.0", - "@types/react": "^16.14.34", "file-system-cache": "2.3.0" }, "devDependencies": { diff --git a/code/yarn.lock b/code/yarn.lock index 3caa8171c40..86a64db6519 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -8050,7 +8050,6 @@ __metadata: "@types/babel__core": ^7.0.0 "@types/express": ^4.7.0 "@types/node": ^16.0.0 - "@types/react": ^16.14.34 file-system-cache: 2.3.0 typescript: ~4.9.3 languageName: unknown From 3a2e15b751f08e1711d3a4389ab0b1fcd5c25339 Mon Sep 17 00:00:00 2001 From: Yann Braga Date: Mon, 4 Sep 2023 16:17:01 +0200 Subject: [PATCH 029/249] Merge pull request #24062 from oruman/patch-1 Vue3: Remove console.log in sourceDecorator (cherry picked from commit a024424dbcf37291ae1bc9195a94b718493e3546) --- code/renderers/vue3/src/docs/sourceDecorator.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/code/renderers/vue3/src/docs/sourceDecorator.ts b/code/renderers/vue3/src/docs/sourceDecorator.ts index 5c1e9e51b0e..f0e254f082a 100644 --- a/code/renderers/vue3/src/docs/sourceDecorator.ts +++ b/code/renderers/vue3/src/docs/sourceDecorator.ts @@ -247,7 +247,6 @@ export function generateTemplateSource( .map((child) => child.content) .join('') : ''; - console.log(' vnode ', vnode, ' childSources ', childSources, ' attributes ', attributes); const name = typeof type === 'string' ? type From 86775b822841a38513b6261e8c2ac89b28d47afd Mon Sep 17 00:00:00 2001 From: Shaun Evening Date: Tue, 5 Sep 2023 11:43:22 -0400 Subject: [PATCH 030/249] Merge pull request #24079 from storybookjs/cli/fix-add-command CLI: Fix packageManager handling in `sb add` (cherry picked from commit 0cb9932cd75c31d4987b92d4925faf7d38d9de00) --- code/addons/themes/postinstall.js | 2 +- code/lib/cli/src/add.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/code/addons/themes/postinstall.js b/code/addons/themes/postinstall.js index c84a4e88e4b..01a9b3151e8 100644 --- a/code/addons/themes/postinstall.js +++ b/code/addons/themes/postinstall.js @@ -2,7 +2,7 @@ const { spawn } = require('child_process'); const PACKAGE_MANAGER_TO_COMMAND = { npm: 'npx', - yarn1: 'yarn dlx', + yarn1: 'npx', yarn2: 'yarn dlx', pnpm: 'pnpm dlx', }; diff --git a/code/lib/cli/src/add.ts b/code/lib/cli/src/add.ts index a163e1f1e34..71437b314b1 100644 --- a/code/lib/cli/src/add.ts +++ b/code/lib/cli/src/add.ts @@ -91,6 +91,6 @@ export async function add( await writeConfig(main); if (!options.skipPostinstall && isStorybookAddon) { - await postinstallAddon(addonName, { packageManager: pkgMgr }); + await postinstallAddon(addonName, { packageManager: packageManager.type }); } } From f8dd2a96f8adaad94cbf688bbfd0ab42063c5eef Mon Sep 17 00:00:00 2001 From: Yann Braga Date: Thu, 7 Sep 2023 18:35:14 +0200 Subject: [PATCH 031/249] Merge pull request #24100 from storybookjs/revert-24033-fix-angular-prerelease-sandbox Revert: Sandboxes: Use Node 18 to generate Angular prerelease sandboxes (cherry picked from commit 32e8c0bd3d28ab614707c5af2fb2d2b68ed8c8a3) --- code/lib/cli/src/sandbox-templates.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/lib/cli/src/sandbox-templates.ts b/code/lib/cli/src/sandbox-templates.ts index bbfdaef49ef..7fb52574ea3 100644 --- a/code/lib/cli/src/sandbox-templates.ts +++ b/code/lib/cli/src/sandbox-templates.ts @@ -285,6 +285,8 @@ const baseTemplates = { builder: '@storybook/builder-webpack5', }, skipTasks: ['e2e-tests-dev', 'bench'], + // TODO: Can be enabled once we re-revert this PR: https://github.com/storybookjs/storybook/pull/24033 + inDevelopment: true, }, 'angular-cli/default-ts': { name: 'Angular CLI (latest)', From 36d408e8538a22c300b76e26b052ac12418247c0 Mon Sep 17 00:00:00 2001 From: storybook-bot <32066757+storybook-bot@users.noreply.github.com> Date: Fri, 8 Sep 2023 09:01:23 +0000 Subject: [PATCH 032/249] Write changelog for 7.4.1 --- CHANGELOG.md | 10 ++++++++++ code/package.json | 3 ++- docs/versions/latest.json | 7 +------ 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a0baacd83b..990f0318310 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,13 @@ +## 7.4.1 + +- CLI: Add uncaughtException handler - [#24018](https://github.com/storybookjs/storybook/pull/24018), thanks [@yannbf](https://github.com/yannbf)! +- CLI: Fix packageManager handling in `sb add` - [#24079](https://github.com/storybookjs/storybook/pull/24079), thanks [@Integrayshaun](https://github.com/Integrayshaun)! +- Core: Add CJS entrypoints to errors in core events - [#24038](https://github.com/storybookjs/storybook/pull/24038), thanks [@yannbf](https://github.com/yannbf)! +- Docs: Fix TOC import - [#24047](https://github.com/storybookjs/storybook/pull/24047), thanks [@shilman](https://github.com/shilman)! +- Telemetry: Filter addon options to protect sensitive info - [#24000](https://github.com/storybookjs/storybook/pull/24000), thanks [@shilman](https://github.com/shilman)! +- Types: Remove `@types/react` dep from `@storybook/types` - [#24042](https://github.com/storybookjs/storybook/pull/24042), thanks [@JReinhold](https://github.com/JReinhold)! +- Vue3: Remove console.log in sourceDecorator - [#24062](https://github.com/storybookjs/storybook/pull/24062), thanks [@oruman](https://github.com/oruman)! + ## 7.4.0 - Addon-docs: Resolve `mdx-react-shim` & `@storybook/global` correctly - [#23941](https://github.com/storybookjs/storybook/pull/23941), thanks [@ndelangen](https://github.com/ndelangen)! diff --git a/code/package.json b/code/package.json index 4f9fe2399e4..b77f6ca1b6e 100644 --- a/code/package.json +++ b/code/package.json @@ -327,5 +327,6 @@ "Dependency Upgrades" ] ] - } + }, + "deferredNextVersion": "7.4.1" } diff --git a/docs/versions/latest.json b/docs/versions/latest.json index 4325d5d96ac..af61adb7efb 100644 --- a/docs/versions/latest.json +++ b/docs/versions/latest.json @@ -1,6 +1 @@ -{ - "version": "7.4.0", - "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- 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- CLI: Improve autotitle stories format handling in GFM automigration - [#23964](https://github.com/storybookjs/storybook/pull/23964), thanks [@yannbf](https://github.com/yannbf)!\n- CLI: Install latest version of non-core addon - [#23956](https://github.com/storybookjs/storybook/pull/23956), thanks [@Integrayshaun](https://github.com/Integrayshaun)!\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- CLI: Set server init generator to use Webpack5 - [#23971](https://github.com/storybookjs/storybook/pull/23971), thanks [@yannbf](https://github.com/yannbf)!\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 indexing for non-prefixed `stories.*` stories - [#23974](https://github.com/storybookjs/storybook/pull/23974), thanks [@shilman](https://github.com/shilman)!\n- Core: Fix race-condition relating to `addons.setConfig` - [#23802](https://github.com/storybookjs/storybook/pull/23802), thanks [@ndelangen](https://github.com/ndelangen)!\n- Core: Throw an error when detecting empty stories field - [#23942](https://github.com/storybookjs/storybook/pull/23942), thanks [@yannbf](https://github.com/yannbf)!\n- Dependencies: Upgrade `escodegen` to fix security issue - [#23973](https://github.com/storybookjs/storybook/pull/23973), thanks [@shilman](https://github.com/shilman)!\n- Index: Fix `*.story.*` CSF indexing - [#23852](https://github.com/storybookjs/storybook/pull/23852), thanks [@shilman](https://github.com/shilman)!\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: Move filtering of sidebar into the state - [#23911](https://github.com/storybookjs/storybook/pull/23911), thanks [@ndelangen](https://github.com/ndelangen)!\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- 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- Preset: Add common preset overrides mechanism - [#23915](https://github.com/storybookjs/storybook/pull/23915), thanks [@yannbf](https://github.com/yannbf)!\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- Shortcuts: Execute preventDefault only if keyboard shortcuts are enabled - [#23412](https://github.com/storybookjs/storybook/pull/23412), thanks [@Spielboerg](https://github.com/Spielboerg)!\n- Types: Fix `React.ReactElement` not found - [#23967](https://github.com/storybookjs/storybook/pull/23967), thanks [@abu-osos](https://github.com/abu-osos)!\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 filter functions at runtime - [#23722](https://github.com/storybookjs/storybook/pull/23722), 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)!\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.1","info":{"plain":"- CLI: Add uncaughtException handler - [#24018](https://github.com/storybookjs/storybook/pull/24018), thanks [@yannbf](https://github.com/yannbf)!\n- CLI: Fix packageManager handling in `sb add` - [#24079](https://github.com/storybookjs/storybook/pull/24079), thanks [@Integrayshaun](https://github.com/Integrayshaun)!\n- Core: Add CJS entrypoints to errors in core events - [#24038](https://github.com/storybookjs/storybook/pull/24038), thanks [@yannbf](https://github.com/yannbf)!\n- Docs: Fix TOC import - [#24047](https://github.com/storybookjs/storybook/pull/24047), thanks [@shilman](https://github.com/shilman)!\n- Telemetry: Filter addon options to protect sensitive info - [#24000](https://github.com/storybookjs/storybook/pull/24000), thanks [@shilman](https://github.com/shilman)!\n- Types: Remove `@types/react` dep from `@storybook/types` - [#24042](https://github.com/storybookjs/storybook/pull/24042), thanks [@JReinhold](https://github.com/JReinhold)!\n- Vue3: Remove console.log in sourceDecorator - [#24062](https://github.com/storybookjs/storybook/pull/24062), thanks [@oruman](https://github.com/oruman)!"}} From fe201ea08834908477bbe8140e1aa5f4dd3f3087 Mon Sep 17 00:00:00 2001 From: Kasper Peulen Date: Fri, 8 Sep 2023 11:04:30 +0200 Subject: [PATCH 033/249] Fix parallelism --- .circleci/config.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5e7cc4a22d2..617cdac42c2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -609,22 +609,22 @@ workflows: requires: - build - create-sandboxes: - parallelism: 35 + parallelism: 34 requires: - build # - smoke-test-sandboxes: # disabled for now # requires: # - create-sandboxes - build-sandboxes: - parallelism: 35 + parallelism: 34 requires: - create-sandboxes - chromatic-sandboxes: - parallelism: 32 + parallelism: 31 requires: - build-sandboxes - e2e-production: - parallelism: 32 + parallelism: 31 requires: - build-sandboxes - e2e-dev: @@ -632,7 +632,7 @@ workflows: requires: - create-sandboxes - test-runner-production: - parallelism: 32 + parallelism: 31 requires: - build-sandboxes # TODO: reenable once we find out the source of flakyness From ba8e5feb7208822b175c0cf5f4b154e78a902832 Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Fri, 8 Sep 2023 14:35:29 +0200 Subject: [PATCH 034/249] cancel any release-preparation runs in progress --- .github/workflows/publish.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 1bca24753ab..272fa1af341 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -36,7 +36,23 @@ jobs: run: | gh run cancel ${{ github.run_id }} gh run watch ${{ github.run_id }} - # TODO: here, cancel any running AND pending runs for the preparation workflows: https://stackoverflow.com/questions/60753453/how-to-cancel-run-for-all-scheduled-github-actions-at-once + + - name: Cancel all release preparation runs + run: | + # Get a list of all running or pending release preparation runs + # combining both the prepare-hotfix-release.yml and prepare-next-release.yml workflows + RUNNING_RELEASE_PREPARATIONS=$( + { + gh run list --limit 50 --workflow=prepare-hotfix-release.yml --json databaseId,status + gh run list --limit 50 --workflow=prepare-next-release.yml --json databaseId,status + } | jq -rc '.[] | select(.status | contains("in_progress", "pending", "queued", "requested", "waiting")) | .databaseId' + ) + + # Loop through each run and pass it to the "gh run cancel" command + while IFS= read -r databaseId; do + gh run cancel "$databaseId" + done <<< "$RUNNING_RELEASE_PREPARATIONS" + - name: Checkout ${{ github.ref_name }} uses: actions/checkout@v3 with: From a84e270f67944997ca5870a465088a48187915bb Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Fri, 8 Sep 2023 14:53:55 +0200 Subject: [PATCH 035/249] cleanup --- .github/workflows/prepare-hotfix-release.yml | 4 ++-- .github/workflows/prepare-next-release.yml | 6 +++--- .github/workflows/publish.yml | 3 +-- CONTRIBUTING/RELEASING.md | 2 +- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/prepare-hotfix-release.yml b/.github/workflows/prepare-hotfix-release.yml index f5a44306fe5..032357306f5 100644 --- a/.github/workflows/prepare-hotfix-release.yml +++ b/.github/workflows/prepare-hotfix-release.yml @@ -12,8 +12,8 @@ env: PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: 1 concurrency: - group: release-group - cancel-in-progress: false + group: ${{ github.workflow }} + cancel-in-progress: true jobs: prepare-hotfix-pull-request: diff --git a/.github/workflows/prepare-next-release.yml b/.github/workflows/prepare-next-release.yml index 4ea2c9b3c08..e1b4b45a016 100644 --- a/.github/workflows/prepare-next-release.yml +++ b/.github/workflows/prepare-next-release.yml @@ -30,8 +30,8 @@ env: PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: 1 concurrency: - group: release-group - cancel-in-progress: false + group: ${{ github.workflow }} + cancel-in-progress: true jobs: prepare-next-pull-request: @@ -140,7 +140,7 @@ jobs: git pull origin latest-release git checkout --ours . git add . - git commit -m "Merge latest-release into version-1 with conflicts resolved to ours [skip ci]" + git commit -m "Merge latest-release into version-next-from-${{ steps.bump-version.outputs.current-version }} with conflicts resolved to ours [skip ci]" - name: Generate PR description id: description diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 272fa1af341..f5efac64565 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -16,8 +16,7 @@ permissions: pull-requests: write concurrency: - group: release-group - cancel-in-progress: false + group: ${{ github.workflow }}-${{ github.ref_name }} jobs: publish: diff --git a/CONTRIBUTING/RELEASING.md b/CONTRIBUTING/RELEASING.md index 05533fccb38..c22bf923e07 100644 --- a/CONTRIBUTING/RELEASING.md +++ b/CONTRIBUTING/RELEASING.md @@ -451,7 +451,7 @@ To promote a prerelease to a stable reelase, during the [Re-trigger the Workflow - Release type: Patch, Minor or Major - Prerelease ID: Leave empty -This scenario is special as it will target `latest-release` instead of `next-release`, and thus merge into `main` when done, and not `next`. So it goes `next` -> `version-from- `latest-release` -> `main`. When this is done, the Releaser will need to trigger a new release on `next` that bumps the version to a new prerelease minor as described [just below](#first-prerelease-of-new-majorminor---710---720-alpha0-or-800-alpha0). +This scenario is special as it will target `latest-release` instead of `next-release`, and thus merge into `main` when done, and not `next`. So it goes `next` -> `version-from- `latest-release` -> `main`. ### First prerelease of new major/minor - `7.1.0` -> `7.2.0-alpha.0` or `8.0.0-alpha.0` From e1a2172dfb662622b6e656692d3c6b84b6bd0256 Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Fri, 8 Sep 2023 15:15:05 +0200 Subject: [PATCH 036/249] only consider open PRs when looking for frozen state --- scripts/release/is-pr-frozen.ts | 8 ++++++++ scripts/release/utils/get-github-info.ts | 6 ++++++ 2 files changed, 14 insertions(+) diff --git a/scripts/release/is-pr-frozen.ts b/scripts/release/is-pr-frozen.ts index d053f3f5973..27ec56c65c6 100644 --- a/scripts/release/is-pr-frozen.ts +++ b/scripts/release/is-pr-frozen.ts @@ -78,6 +78,14 @@ export const run = async (options: unknown) => { console.log(`🔍 Found pull request: ${JSON.stringify(pullRequest, null, 2)}`); + if (pullRequest.state !== 'OPEN') { + console.log('❌ The pull request is already closed, ignoring it'); + if (process.env.GITHUB_ACTIONS === 'true') { + setOutput('frozen', false); + } + return false; + } + // TODO: check if pull request is still open const isFrozen = pullRequest.labels?.includes('freeze'); if (process.env.GITHUB_ACTIONS === 'true') { diff --git a/scripts/release/utils/get-github-info.ts b/scripts/release/utils/get-github-info.ts index 6bd7126aec0..ce58b782235 100644 --- a/scripts/release/utils/get-github-info.ts +++ b/scripts/release/utils/get-github-info.ts @@ -40,6 +40,7 @@ function makeQuery(repos: ReposWithCommitsAndPRsToFetch) { number id title + state url mergedAt labels(first: 50) { @@ -63,6 +64,7 @@ function makeQuery(repos: ReposWithCommitsAndPRsToFetch) { : `pr__${data.pull}: pullRequest(number: ${data.pull}) { url title + state author { login url @@ -161,6 +163,7 @@ export type PullRequestInfo = { user: string | null; id: string | null; title: string | null; + state: string | null; commit: string | null; pull: number | null; labels: string[] | null; @@ -197,6 +200,7 @@ export async function getPullInfoFromCommit(request: { pull: null, commit: request.commit, title: null, + state: null, labels: null, links: { commit: request.commit, @@ -245,6 +249,7 @@ export async function getPullInfoFromCommit(request: { pull: associatedPullRequest ? associatedPullRequest.number : null, commit: request.commit, title: associatedPullRequest ? associatedPullRequest.title : null, + state: associatedPullRequest ? associatedPullRequest.state : null, labels: associatedPullRequest ? (associatedPullRequest.labels.nodes || []).map((label: { name: string }) => label.name) : null, @@ -287,6 +292,7 @@ export async function getPullInfoFromPullRequest(request: { pull: request.pull, commit: commit ? commit.oid : null, title: title || null, + state: data?.state || null, labels: data ? (data.labels.nodes || []).map((label: { name: string }) => label.name) : null, links: { commit: commit ? `[\`${commit.oid}\`](${commit.commitUrl})` : null, From 4d569f2f6735a7fe55440a7c450566ddf5f47837 Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Fri, 8 Sep 2023 15:20:16 +0200 Subject: [PATCH 037/249] update tests --- .../__tests__/generate-pr-description.test.ts | 8 ++++---- scripts/release/__tests__/is-pr-frozen.test.ts | 18 ++++++++++++++---- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/scripts/release/__tests__/generate-pr-description.test.ts b/scripts/release/__tests__/generate-pr-description.test.ts index b0f1bbe89db..fdd412462ae 100644 --- a/scripts/release/__tests__/generate-pr-description.test.ts +++ b/scripts/release/__tests__/generate-pr-description.test.ts @@ -213,7 +213,7 @@ For each pull request below, you need to either manually cherry pick it, or disc - [ ] [#42](https://github.com/storybookjs/storybook/pull/42): \\\`git cherry-pick -m1 -x abc123\\\` - If you\\'ve made any changes doing the above QA (change PR titles, revert PRs), manually trigger a re-generation of this PR with [this workflow](https://github.com/storybookjs/storybook/actions/workflows/prepare-prerelease.yml) and wait for it to finish. It will wipe your progress in this to do, which is expected. + If you\\'ve made any changes doing the above QA (change PR titles, revert PRs), manually trigger a re-generation of this PR with [this workflow](https://github.com/storybookjs/storybook/actions/workflows/prepare-next-release.yml) and wait for it to finish. It will wipe your progress in this to do, which is expected. Feel free to manually commit any changes necessary to this branch **after** you\\'ve done the last re-generation, following the [Make Manual Changes](https://github.com/storybookjs/storybook/blob/next/CONTRIBUTING/RELEASING.md#5-make-manual-changes) section in the docs, *especially* if you\\'re making changes to the changelog. @@ -273,7 +273,7 @@ For each pull request below, you need to either manually cherry pick it, or disc - [ ] [#42](https://github.com/storybookjs/storybook/pull/42): \\\`git cherry-pick -m1 -x abc123\\\` - If you\\'ve made any changes (change PR titles, revert PRs), manually trigger a re-generation of this PR with [this workflow](https://github.com/storybookjs/storybook/actions/workflows/prepare-patch-release.yml) and wait for it to finish. + If you\\'ve made any changes (change PR titles, revert PRs), manually trigger a re-generation of this PR with [this workflow](https://github.com/storybookjs/storybook/actions/workflows/prepare-hotfix-release.yml) and wait for it to finish. Feel free to manually commit any changes necessary to this branch **after** you\\'ve done the last re-generation, following the [Make Manual Changes](https://github.com/storybookjs/storybook/blob/next/CONTRIBUTING/RELEASING.md#5-make-manual-changes) section in the docs. @@ -340,7 +340,7 @@ For each pull request below, you need to either manually cherry pick it, or disc - If you\\'ve made any changes doing the above QA (change PR titles, revert PRs), manually trigger a re-generation of this PR with [this workflow](https://github.com/storybookjs/storybook/actions/workflows/prepare-prerelease.yml) and wait for it to finish. It will wipe your progress in this to do, which is expected. + If you\\'ve made any changes doing the above QA (change PR titles, revert PRs), manually trigger a re-generation of this PR with [this workflow](https://github.com/storybookjs/storybook/actions/workflows/prepare-next-release.yml) and wait for it to finish. It will wipe your progress in this to do, which is expected. Feel free to manually commit any changes necessary to this branch **after** you\\'ve done the last re-generation, following the [Make Manual Changes](https://github.com/storybookjs/storybook/blob/next/CONTRIBUTING/RELEASING.md#5-make-manual-changes) section in the docs, *especially* if you\\'re making changes to the changelog. @@ -395,7 +395,7 @@ For each pull request below, you need to either manually cherry pick it, or disc - If you\\'ve made any changes (change PR titles, revert PRs), manually trigger a re-generation of this PR with [this workflow](https://github.com/storybookjs/storybook/actions/workflows/prepare-patch-release.yml) and wait for it to finish. + If you\\'ve made any changes (change PR titles, revert PRs), manually trigger a re-generation of this PR with [this workflow](https://github.com/storybookjs/storybook/actions/workflows/prepare-hotfix-release.yml) and wait for it to finish. Feel free to manually commit any changes necessary to this branch **after** you\\'ve done the last re-generation, following the [Make Manual Changes](https://github.com/storybookjs/storybook/blob/next/CONTRIBUTING/RELEASING.md#5-make-manual-changes) section in the docs. diff --git a/scripts/release/__tests__/is-pr-frozen.test.ts b/scripts/release/__tests__/is-pr-frozen.test.ts index 63747a863dd..d5d1e8a16b7 100644 --- a/scripts/release/__tests__/is-pr-frozen.test.ts +++ b/scripts/release/__tests__/is-pr-frozen.test.ts @@ -26,6 +26,7 @@ describe('isPrFrozen', () => { it('should return true when PR is frozen', async () => { getPullInfoFromCommit.mockResolvedValue({ labels: ['freeze'], + state: 'OPEN', }); await expect(isPrFrozen({ patch: false })).resolves.toBe(true); }); @@ -33,17 +34,26 @@ describe('isPrFrozen', () => { it('should return false when PR is not frozen', async () => { getPullInfoFromCommit.mockResolvedValue({ labels: [], + state: 'OPEN', }); await expect(isPrFrozen({ patch: false })).resolves.toBe(false); }); - it('should look for patch PRs when patch is true', async () => { + it('should return false when PR is closed', async () => { + getPullInfoFromCommit.mockResolvedValue({ + labels: ['freeze'], + state: 'CLOSED', + }); + await expect(isPrFrozen({ patch: false })).resolves.toBe(false); + }); + + it('should look for patch PRs when hotfix is true', async () => { getPullInfoFromCommit.mockResolvedValue({ labels: [], }); - await isPrFrozen({ patch: true }); + await isPrFrozen({ hotfix: true }); - expect(simpleGit.__fetch).toHaveBeenCalledWith('origin', 'version-patch-from-1.0.0', { + expect(simpleGit.__fetch).toHaveBeenCalledWith('origin', 'version-hotfix-from-1.0.0', { '--depth': 1, }); }); @@ -54,7 +64,7 @@ describe('isPrFrozen', () => { }); await isPrFrozen({ patch: false }); - expect(simpleGit.__fetch).toHaveBeenCalledWith('origin', 'version-prerelease-from-1.0.0', { + expect(simpleGit.__fetch).toHaveBeenCalledWith('origin', 'version-next-from-1.0.0', { '--depth': 1, }); }); From ff7b7e176737a67fa73b655175e11f1433f3241b Mon Sep 17 00:00:00 2001 From: j3rem1e Date: Wed, 6 Sep 2023 21:12:16 +0200 Subject: [PATCH 038/249] Svelte: Always inject doc metadata --- .../svelte-vite/src/plugins/svelte-docgen.ts | 19 +++++++----- .../src/svelte-docgen-loader.ts | 29 ++++++++++--------- 2 files changed, 27 insertions(+), 21 deletions(-) diff --git a/code/frameworks/svelte-vite/src/plugins/svelte-docgen.ts b/code/frameworks/svelte-vite/src/plugins/svelte-docgen.ts index b9e8ac5fa76..7f6dc2314a5 100644 --- a/code/frameworks/svelte-vite/src/plugins/svelte-docgen.ts +++ b/code/frameworks/svelte-vite/src/plugins/svelte-docgen.ts @@ -79,21 +79,24 @@ export function svelteDocgen(svelteOptions: Record = {}): PluginOpt const s = new MagicString(src); + let componentDoc: any; try { - const componentDoc = await svelteDoc.parse(options); - // get filename for source content - const file = path.basename(resource); - - componentDoc.name = path.basename(file); - - const componentName = getNameFromFilename(resource); - s.append(`;${componentName}.__docgen = ${JSON.stringify(componentDoc)}`); + componentDoc = await svelteDoc.parse(options); } catch (error: any) { + componentDoc = { keywords: [], data: [] }; if (logDocgen) { logger.error(error); } } + // get filename for source content + const file = path.basename(resource); + + componentDoc.name = path.basename(file); + + const componentName = getNameFromFilename(resource); + s.append(`;${componentName}.__docgen = ${JSON.stringify(componentDoc)}`); + return { code: s.toString(), map: s.generateMap({ hires: true, source: id }), diff --git a/code/presets/svelte-webpack/src/svelte-docgen-loader.ts b/code/presets/svelte-webpack/src/svelte-docgen-loader.ts index 5267e73a317..b8c6ae1a656 100644 --- a/code/presets/svelte-webpack/src/svelte-docgen-loader.ts +++ b/code/presets/svelte-webpack/src/svelte-docgen-loader.ts @@ -73,27 +73,30 @@ export default async function svelteDocgen(this: any, source: string) { let docgen = ''; + let componentDoc: any; try { // FIXME // @ts-expect-error (Converted from ts-ignore) - const componentDoc = await svelteDoc.parse(options); - - // get filename for source content - const file = path.basename(resource); - - // populate filename in docgen - componentDoc.name = path.basename(file); - - const componentName = getNameFromFilename(resource); - - docgen = dedent` - ${componentName}.__docgen = ${JSON.stringify(componentDoc)}; - `; + componentDoc = await svelteDoc.parse(options); } catch (error) { + componentDoc = { keywords: [], data: [] }; if (logDocgen) { logger.error(error as any); } } + + // get filename for source content + const file = path.basename(resource); + + // populate filename in docgen + componentDoc.name = path.basename(file); + + const componentName = getNameFromFilename(resource); + + docgen = dedent` + ${componentName}.__docgen = ${JSON.stringify(componentDoc)}; + `; + // inject __docgen prop in svelte component const output = source + docgen; From 4f6667dcb1cb42a4920920984b84e33743c8fb3f Mon Sep 17 00:00:00 2001 From: j3rem1e Date: Wed, 6 Sep 2023 21:18:25 +0200 Subject: [PATCH 039/249] Svelte: Fix parsing of ecma v12 by sveltedoc-parser --- .../svelte-vite/src/plugins/svelte-docgen.ts | 16 ++++++++++++++++ .../svelte-webpack/src/svelte-docgen-loader.ts | 16 ++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/code/frameworks/svelte-vite/src/plugins/svelte-docgen.ts b/code/frameworks/svelte-vite/src/plugins/svelte-docgen.ts index 7f6dc2314a5..6f46d8be1a2 100644 --- a/code/frameworks/svelte-vite/src/plugins/svelte-docgen.ts +++ b/code/frameworks/svelte-vite/src/plugins/svelte-docgen.ts @@ -8,6 +8,22 @@ import { logger } from '@storybook/node-logger'; import { preprocess } from 'svelte/compiler'; import { createFilter } from 'vite'; +/* + * Patch sveltedoc-parser internal options. + * Waiting for a fix for https://github.com/alexprey/sveltedoc-parser/issues/87 + */ +const svelteDocParserOptions = require('sveltedoc-parser/lib/options.js'); + +svelteDocParserOptions.getAstDefaultOptions = () => ({ + range: true, + loc: true, + comment: true, + tokens: true, + ecmaVersion: 12, + sourceType: 'module', + ecmaFeatures: {}, +}); + // Most of the code here should probably be exported by @storybook/svelte and reused here. // See: https://github.com/storybookjs/storybook/blob/next/app/svelte/src/server/svelte-docgen-loader.ts diff --git a/code/presets/svelte-webpack/src/svelte-docgen-loader.ts b/code/presets/svelte-webpack/src/svelte-docgen-loader.ts index b8c6ae1a656..f8305513205 100644 --- a/code/presets/svelte-webpack/src/svelte-docgen-loader.ts +++ b/code/presets/svelte-webpack/src/svelte-docgen-loader.ts @@ -5,6 +5,22 @@ import * as fs from 'fs'; import { preprocess } from 'svelte/compiler'; import { logger } from '@storybook/node-logger'; +/* + * Patch sveltedoc-parser internal options. + * Waiting for a fix for https://github.com/alexprey/sveltedoc-parser/issues/87 + */ +const svelteDocParserOptions = require('sveltedoc-parser/lib/options.js'); + +svelteDocParserOptions.getAstDefaultOptions = () => ({ + range: true, + loc: true, + comment: true, + tokens: true, + ecmaVersion: 12, + sourceType: 'module', + ecmaFeatures: {}, +}); + // From https://github.com/sveltejs/svelte/blob/8db3e8d0297e052556f0b6dde310ef6e197b8d18/src/compiler/compile/utils/get_name_from_filename.ts // Copied because it is not exported from the compiler function getNameFromFilename(filename: string) { From e0fb28981d2f6f76968ff4f420fe43c783b8607e Mon Sep 17 00:00:00 2001 From: j3rem1e Date: Sat, 9 Sep 2023 17:51:30 +0200 Subject: [PATCH 040/249] Adding e2e to test Svelte documentation --- code/e2e-tests/framework-svelte.spec.ts | 30 +++++++++++++++++++ .../svelte/template/cli/js/Button.svelte | 3 +- .../svelte/template/cli/ts-3-8/Button.svelte | 3 +- .../svelte/template/cli/ts-4-9/Button.svelte | 3 +- .../svelte/template/components/Button.svelte | 3 +- 5 files changed, 38 insertions(+), 4 deletions(-) create mode 100644 code/e2e-tests/framework-svelte.spec.ts diff --git a/code/e2e-tests/framework-svelte.spec.ts b/code/e2e-tests/framework-svelte.spec.ts new file mode 100644 index 00000000000..b2a3dbf4167 --- /dev/null +++ b/code/e2e-tests/framework-svelte.spec.ts @@ -0,0 +1,30 @@ +/* eslint-disable jest/no-disabled-tests */ +import type { Locator } from '@playwright/test'; +import { test, expect } from '@playwright/test'; +import process from 'process'; +import { SbPage } from './util'; + +const storybookUrl = process.env.STORYBOOK_URL || 'http://localhost:6006'; +const templateName = process.env.STORYBOOK_TEMPLATE_NAME; + +test.describe('Svelte', () => { + test.skip( + // eslint-disable-next-line jest/valid-title + !templateName?.includes('svelte') || templateName?.includes('-ts'), + 'Only run this test on Svelte with javascript' + ); + + test.beforeEach(async ({ page }) => { + await page.goto(storybookUrl); + await new SbPage(page).waitUntilLoaded(); + }); + + test('Story have a documentation', async ({ page }) => { + const sbPage = new SbPage(page); + + sbPage.navigateToStory('example/button', 'docs'); + const root = sbPage.previewRoot(); + const argsTable = root.locator('.docblock-argstable'); + await expect(argsTable).toContainText('Is this the principal call to action on the page'); + }); +}); diff --git a/code/renderers/svelte/template/cli/js/Button.svelte b/code/renderers/svelte/template/cli/js/Button.svelte index a2a78d9d0d6..de99698d769 100644 --- a/code/renderers/svelte/template/cli/js/Button.svelte +++ b/code/renderers/svelte/template/cli/js/Button.svelte @@ -24,6 +24,7 @@ $: mode = primary ? 'storybook-button--primary' : 'storybook-button--secondary'; $: style = backgroundColor ? `background-color: ${backgroundColor}` : ''; + $: text = label?.toString(); // Test parsing of Elvis Operator diff --git a/code/renderers/svelte/template/cli/ts-3-8/Button.svelte b/code/renderers/svelte/template/cli/ts-3-8/Button.svelte index dfc4bbd4c03..977d766f355 100644 --- a/code/renderers/svelte/template/cli/ts-3-8/Button.svelte +++ b/code/renderers/svelte/template/cli/ts-3-8/Button.svelte @@ -22,6 +22,7 @@ $: mode = primary ? 'storybook-button--primary' : 'storybook-button--secondary'; $: style = backgroundColor ? `background-color: ${backgroundColor}` : ''; + $: text = label?.toString(); // Test parsing of Elvis Operator diff --git a/code/renderers/svelte/template/cli/ts-4-9/Button.svelte b/code/renderers/svelte/template/cli/ts-4-9/Button.svelte index f590a0aff55..0c551e54f84 100644 --- a/code/renderers/svelte/template/cli/ts-4-9/Button.svelte +++ b/code/renderers/svelte/template/cli/ts-4-9/Button.svelte @@ -22,6 +22,7 @@ $: mode = primary ? 'storybook-button--primary' : 'storybook-button--secondary'; $: style = backgroundColor ? `background-color: ${backgroundColor}` : ''; + $: text = label?.toString(); // Test parsing of Elvis Operator diff --git a/code/renderers/svelte/template/components/Button.svelte b/code/renderers/svelte/template/components/Button.svelte index 4b80e84b813..07f18594ace 100644 --- a/code/renderers/svelte/template/components/Button.svelte +++ b/code/renderers/svelte/template/components/Button.svelte @@ -24,6 +24,7 @@ $: mode = primary ? 'storybook-button--primary' : 'storybook-button--secondary'; $: style = backgroundColor ? `background-color: ${backgroundColor}` : ''; + $: text = label?.toString(); // Test parsing of Elvis Operator const dispatch = createEventDispatcher(); @@ -41,5 +42,5 @@ {style} on:click={onClick} > - {label} + {text} From 173a105c3d4b3b957941d6d9100d4ffdf1c4d6ed Mon Sep 17 00:00:00 2001 From: storybook-bot <32066757+storybook-bot@users.noreply.github.com> Date: Mon, 11 Sep 2023 10:56:49 +0000 Subject: [PATCH 041/249] Update ./docs/versions/next.json for v7.5.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 739652e36af..5c73bf231c8 100644 --- a/docs/versions/next.json +++ b/docs/versions/next.json @@ -1 +1 @@ -{"version":"7.5.0-alpha.1","info":{"plain":"- Core: Add CJS entrypoints to errors in core events - [#24038](https://github.com/storybookjs/storybook/pull/24038), thanks [@yannbf](https://github.com/yannbf)!"}} +{"version":"7.5.0-alpha.2","info":{"plain":"- Angular: Categorize legacy build options error - [#24014](https://github.com/storybookjs/storybook/pull/24014), thanks [@yannbf](https://github.com/yannbf)!\n- Builder-Webpack5: Categorize builder error - [#24031](https://github.com/storybookjs/storybook/pull/24031), thanks [@yannbf](https://github.com/yannbf)!\n- CI: Inform the user how to dedupe and strip color from info command - [#24087](https://github.com/storybookjs/storybook/pull/24087), thanks [@kasperpeulen](https://github.com/kasperpeulen)!\n- CLI: Fix packageManager handling in `sb add` - [#24079](https://github.com/storybookjs/storybook/pull/24079), thanks [@Integrayshaun](https://github.com/Integrayshaun)!\n- CLI: Improve sanitization logic in crash reports - [#24028](https://github.com/storybookjs/storybook/pull/24028), thanks [@yannbf](https://github.com/yannbf)!\n- Maintenance: Add more context to explanation in core-events errors - [#24063](https://github.com/storybookjs/storybook/pull/24063), thanks [@yannbf](https://github.com/yannbf)!\n- Monorepo: Fix `svelte-vite` detection - [#24085](https://github.com/storybookjs/storybook/pull/24085), thanks [@legnaleurc](https://github.com/legnaleurc)!\n- NextJS: Fix Image Context reuse (ensure singleton by externalizing it) - [#23881](https://github.com/storybookjs/storybook/pull/23881), thanks [@martinnabhan](https://github.com/martinnabhan)!\n- Source-loader: Fix property key validation - [#24068](https://github.com/storybookjs/storybook/pull/24068), thanks [@MrZillaGold](https://github.com/MrZillaGold)!\n- Svelte: Fix generated properties on Svelte event handler - [#24020](https://github.com/storybookjs/storybook/pull/24020), thanks [@j3rem1e](https://github.com/j3rem1e)!\n- Telemetry: Add platform info to telemetry event - [#24081](https://github.com/storybookjs/storybook/pull/24081), thanks [@yannbf](https://github.com/yannbf)!\n- UI: Fix target id in searchfield label - [#23464](https://github.com/storybookjs/storybook/pull/23464), thanks [@plumpNation](https://github.com/plumpNation)!\n- Vue3: Remove console.log in sourceDecorator - [#24062](https://github.com/storybookjs/storybook/pull/24062), thanks [@oruman](https://github.com/oruman)!"}} From c4cc4cd09dea221deecd7e78f91a7dbd0bdf3ed7 Mon Sep 17 00:00:00 2001 From: storybook-bot <32066757+storybook-bot@users.noreply.github.com> Date: Mon, 11 Sep 2023 12:07:08 +0000 Subject: [PATCH 042/249] Bump version from "7.4.0" to "7.4.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 5a7c1215c46..8e0ce219a98 100644 --- a/code/addons/a11y/package.json +++ b/code/addons/a11y/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-a11y", - "version": "7.4.0", + "version": "7.4.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 62e0156cd7e..0777969d495 100644 --- a/code/addons/actions/package.json +++ b/code/addons/actions/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-actions", - "version": "7.4.0", + "version": "7.4.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 af672d68317..6dbd7d3c0c6 100644 --- a/code/addons/backgrounds/package.json +++ b/code/addons/backgrounds/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-backgrounds", - "version": "7.4.0", + "version": "7.4.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 c4e025a3168..fb52d049dad 100644 --- a/code/addons/controls/package.json +++ b/code/addons/controls/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-controls", - "version": "7.4.0", + "version": "7.4.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 5c443e55334..d6d36f85d45 100644 --- a/code/addons/docs/package.json +++ b/code/addons/docs/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-docs", - "version": "7.4.0", + "version": "7.4.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 459bdde2d04..fb7dbb82cab 100644 --- a/code/addons/essentials/package.json +++ b/code/addons/essentials/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-essentials", - "version": "7.4.0", + "version": "7.4.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 a14a7eb5660..425519f969f 100644 --- a/code/addons/gfm/package.json +++ b/code/addons/gfm/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-mdx-gfm", - "version": "7.4.0", + "version": "7.4.1", "description": "GitHub Flavored Markdown in Storybook", "keywords": [ "addon", diff --git a/code/addons/highlight/package.json b/code/addons/highlight/package.json index a83314a5c24..a9371893d22 100644 --- a/code/addons/highlight/package.json +++ b/code/addons/highlight/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-highlight", - "version": "7.4.0", + "version": "7.4.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 721e13cac58..6d42fbd8f21 100644 --- a/code/addons/interactions/package.json +++ b/code/addons/interactions/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-interactions", - "version": "7.4.0", + "version": "7.4.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 bb1f30c9106..97d844fd34c 100644 --- a/code/addons/jest/package.json +++ b/code/addons/jest/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-jest", - "version": "7.4.0", + "version": "7.4.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 60047cef410..5ff946c2271 100644 --- a/code/addons/links/package.json +++ b/code/addons/links/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-links", - "version": "7.4.0", + "version": "7.4.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 4b1466d0d3c..b3f4d620383 100644 --- a/code/addons/measure/package.json +++ b/code/addons/measure/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-measure", - "version": "7.4.0", + "version": "7.4.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 3e0c58105cb..4ff84998891 100644 --- a/code/addons/outline/package.json +++ b/code/addons/outline/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-outline", - "version": "7.4.0", + "version": "7.4.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 e21c58a8890..6a6abc8d94d 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.4.0", + "version": "7.4.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 4c966ff4357..c2ec8399e57 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.4.0", + "version": "7.4.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 be8581fc248..70b6737bb50 100644 --- a/code/addons/storysource/package.json +++ b/code/addons/storysource/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-storysource", - "version": "7.4.0", + "version": "7.4.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 8e4a40ec9a0..f080a9dae9c 100644 --- a/code/addons/themes/package.json +++ b/code/addons/themes/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-themes", - "version": "7.4.0", + "version": "7.4.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 d988e992541..ce84af39a7f 100644 --- a/code/addons/toolbars/package.json +++ b/code/addons/toolbars/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-toolbars", - "version": "7.4.0", + "version": "7.4.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 c7dae82f506..e259a9e6e9e 100644 --- a/code/addons/viewport/package.json +++ b/code/addons/viewport/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-viewport", - "version": "7.4.0", + "version": "7.4.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 7f12ba26bea..c340deb1de7 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.4.0", + "version": "7.4.1", "description": "Storybook manager builder", "keywords": [ "storybook" diff --git a/code/builders/builder-vite/package.json b/code/builders/builder-vite/package.json index 9d38efab01e..c4251ed4651 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.4.0", + "version": "7.4.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 0466c0ea057..241102dde8a 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.4.0", + "version": "7.4.1", "description": "Storybook framework-agnostic API", "keywords": [ "storybook" diff --git a/code/deprecated/addons/package.json b/code/deprecated/addons/package.json index e8f710906b8..33f88eb9d21 100644 --- a/code/deprecated/addons/package.json +++ b/code/deprecated/addons/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addons", - "version": "7.4.0", + "version": "7.4.1", "description": "Storybook addons store", "keywords": [ "storybook" diff --git a/code/deprecated/channel-postmessage/package.json b/code/deprecated/channel-postmessage/package.json index 626bbf0529b..2ef9a806f5f 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.4.0", + "version": "7.4.1", "description": "", "keywords": [ "storybook" diff --git a/code/deprecated/channel-websocket/package.json b/code/deprecated/channel-websocket/package.json index beca23fe6fe..079a6d11d6c 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.4.0", + "version": "7.4.1", "description": "", "keywords": [ "storybook" diff --git a/code/deprecated/client-api/package.json b/code/deprecated/client-api/package.json index 330465df9e3..ce575eef7ba 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.4.0", + "version": "7.4.1", "description": "Storybook Client API", "keywords": [ "storybook" diff --git a/code/deprecated/core-client/package.json b/code/deprecated/core-client/package.json index d5eac9d32aa..897893758d5 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.4.0", + "version": "7.4.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 b873695766d..5dfc8cac249 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.4.0", + "version": "7.4.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 49a530b00f9..c0024e30237 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.4.0", + "version": "7.4.1", "description": "", "keywords": [ "storybook" diff --git a/code/deprecated/store/package.json b/code/deprecated/store/package.json index 6d6e9aa413f..c13bc58348d 100644 --- a/code/deprecated/store/package.json +++ b/code/deprecated/store/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/store", - "version": "7.4.0", + "version": "7.4.1", "description": "", "keywords": [ "storybook" diff --git a/code/frameworks/angular/package.json b/code/frameworks/angular/package.json index 0611580a818..63dcb4ffa73 100644 --- a/code/frameworks/angular/package.json +++ b/code/frameworks/angular/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/angular", - "version": "7.4.0", + "version": "7.4.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 16f724b1ba9..847faf930a7 100644 --- a/code/frameworks/ember/package.json +++ b/code/frameworks/ember/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/ember", - "version": "7.4.0", + "version": "7.4.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 b7003719087..bab1b857498 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.4.0", + "version": "7.4.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 4f4704a723e..84654b896d1 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.4.0", + "version": "7.4.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 a7cf4171ab4..c59a7cc15a1 100644 --- a/code/frameworks/nextjs/package.json +++ b/code/frameworks/nextjs/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/nextjs", - "version": "7.4.0", + "version": "7.4.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 b4e19bb7c8f..6d29d88bb5e 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.4.0", + "version": "7.4.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 7e59ec07cd5..42d120fbd43 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.4.0", + "version": "7.4.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 9e6b008bed0..a9868f1b65c 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.4.0", + "version": "7.4.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 00036ab34b9..57b57715da5 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.4.0", + "version": "7.4.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 e18f980f484..1f394ef60a5 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.4.0", + "version": "7.4.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 e911b05375e..bb5effb4cdc 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.4.0", + "version": "7.4.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 da70c830243..2b3e8bdbad9 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.4.0", + "version": "7.4.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 fe3d0227169..c94791422b6 100644 --- a/code/frameworks/sveltekit/package.json +++ b/code/frameworks/sveltekit/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/sveltekit", - "version": "7.4.0", + "version": "7.4.1", "description": "Storybook for SvelteKit", "keywords": [ "storybook", diff --git a/code/frameworks/vue-vite/package.json b/code/frameworks/vue-vite/package.json index 30ae8c7d541..02b2a784f55 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.4.0", + "version": "7.4.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 d5f2d05df30..ed3df7783b9 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.4.0", + "version": "7.4.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 17a4cf65a98..4a9a89917be 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.4.0", + "version": "7.4.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 e1c6efab600..92f36642d53 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.4.0", + "version": "7.4.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 2a123ea0041..2c17aa3ba00 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.4.0", + "version": "7.4.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 565f9ca6089..ea576b9c5d8 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.4.0", + "version": "7.4.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 97be4d3904b..53b3288e66f 100644 --- a/code/lib/channels/package.json +++ b/code/lib/channels/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/channels", - "version": "7.4.0", + "version": "7.4.1", "description": "", "keywords": [ "storybook" diff --git a/code/lib/cli-sb/package.json b/code/lib/cli-sb/package.json index fe90b2d6c39..00b284153c7 100644 --- a/code/lib/cli-sb/package.json +++ b/code/lib/cli-sb/package.json @@ -1,6 +1,6 @@ { "name": "sb", - "version": "7.4.0", + "version": "7.4.1", "description": "Storybook CLI", "keywords": [ "storybook" diff --git a/code/lib/cli-storybook/package.json b/code/lib/cli-storybook/package.json index 1e3e673d7bb..73adab8de9b 100644 --- a/code/lib/cli-storybook/package.json +++ b/code/lib/cli-storybook/package.json @@ -1,6 +1,6 @@ { "name": "storybook", - "version": "7.4.0", + "version": "7.4.1", "description": "Storybook CLI", "keywords": [ "storybook" diff --git a/code/lib/cli/package.json b/code/lib/cli/package.json index 74ab0adb636..195f7884f0d 100644 --- a/code/lib/cli/package.json +++ b/code/lib/cli/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/cli", - "version": "7.4.0", + "version": "7.4.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 d55ca23b838..127640bcb2a 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.4.0', - '@storybook/addon-actions': '7.4.0', - '@storybook/addon-backgrounds': '7.4.0', - '@storybook/addon-controls': '7.4.0', - '@storybook/addon-docs': '7.4.0', - '@storybook/addon-essentials': '7.4.0', - '@storybook/addon-highlight': '7.4.0', - '@storybook/addon-interactions': '7.4.0', - '@storybook/addon-jest': '7.4.0', - '@storybook/addon-links': '7.4.0', - '@storybook/addon-mdx-gfm': '7.4.0', - '@storybook/addon-measure': '7.4.0', - '@storybook/addon-outline': '7.4.0', - '@storybook/addon-themes': '7.4.0', - '@storybook/addon-storyshots': '7.4.0', - '@storybook/addon-storyshots-puppeteer': '7.4.0', - '@storybook/addon-storysource': '7.4.0', - '@storybook/addon-toolbars': '7.4.0', - '@storybook/addon-viewport': '7.4.0', - '@storybook/addons': '7.4.0', - '@storybook/angular': '7.4.0', - '@storybook/api': '7.4.0', - '@storybook/blocks': '7.4.0', - '@storybook/builder-manager': '7.4.0', - '@storybook/builder-vite': '7.4.0', - '@storybook/builder-webpack5': '7.4.0', - '@storybook/channel-postmessage': '7.4.0', - '@storybook/channel-websocket': '7.4.0', - '@storybook/channels': '7.4.0', - '@storybook/cli': '7.4.0', - '@storybook/client-api': '7.4.0', - '@storybook/client-logger': '7.4.0', - '@storybook/codemod': '7.4.0', - '@storybook/components': '7.4.0', - '@storybook/core-client': '7.4.0', - '@storybook/core-common': '7.4.0', - '@storybook/core-events': '7.4.0', - '@storybook/core-server': '7.4.0', - '@storybook/core-webpack': '7.4.0', - '@storybook/csf-plugin': '7.4.0', - '@storybook/csf-tools': '7.4.0', - '@storybook/docs-tools': '7.4.0', - '@storybook/ember': '7.4.0', - '@storybook/html': '7.4.0', - '@storybook/html-vite': '7.4.0', - '@storybook/html-webpack5': '7.4.0', - '@storybook/instrumenter': '7.4.0', - '@storybook/manager': '7.4.0', - '@storybook/manager-api': '7.4.0', - '@storybook/nextjs': '7.4.0', - '@storybook/node-logger': '7.4.0', - '@storybook/postinstall': '7.4.0', - '@storybook/preact': '7.4.0', - '@storybook/preact-vite': '7.4.0', - '@storybook/preact-webpack5': '7.4.0', - '@storybook/preset-create-react-app': '7.4.0', - '@storybook/preset-html-webpack': '7.4.0', - '@storybook/preset-preact-webpack': '7.4.0', - '@storybook/preset-react-webpack': '7.4.0', - '@storybook/preset-server-webpack': '7.4.0', - '@storybook/preset-svelte-webpack': '7.4.0', - '@storybook/preset-vue-webpack': '7.4.0', - '@storybook/preset-vue3-webpack': '7.4.0', - '@storybook/preset-web-components-webpack': '7.4.0', - '@storybook/preview': '7.4.0', - '@storybook/preview-api': '7.4.0', - '@storybook/preview-web': '7.4.0', - '@storybook/react': '7.4.0', - '@storybook/react-dom-shim': '7.4.0', - '@storybook/react-vite': '7.4.0', - '@storybook/react-webpack5': '7.4.0', - '@storybook/router': '7.4.0', - '@storybook/server': '7.4.0', - '@storybook/server-webpack5': '7.4.0', - '@storybook/source-loader': '7.4.0', - '@storybook/store': '7.4.0', - '@storybook/svelte': '7.4.0', - '@storybook/svelte-vite': '7.4.0', - '@storybook/svelte-webpack5': '7.4.0', - '@storybook/sveltekit': '7.4.0', - '@storybook/telemetry': '7.4.0', - '@storybook/theming': '7.4.0', - '@storybook/types': '7.4.0', - '@storybook/vue': '7.4.0', - '@storybook/vue-vite': '7.4.0', - '@storybook/vue-webpack5': '7.4.0', - '@storybook/vue3': '7.4.0', - '@storybook/vue3-vite': '7.4.0', - '@storybook/vue3-webpack5': '7.4.0', - '@storybook/web-components': '7.4.0', - '@storybook/web-components-vite': '7.4.0', - '@storybook/web-components-webpack5': '7.4.0', - sb: '7.4.0', - storybook: '7.4.0', + '@storybook/addon-a11y': '7.4.1', + '@storybook/addon-actions': '7.4.1', + '@storybook/addon-backgrounds': '7.4.1', + '@storybook/addon-controls': '7.4.1', + '@storybook/addon-docs': '7.4.1', + '@storybook/addon-essentials': '7.4.1', + '@storybook/addon-highlight': '7.4.1', + '@storybook/addon-interactions': '7.4.1', + '@storybook/addon-jest': '7.4.1', + '@storybook/addon-links': '7.4.1', + '@storybook/addon-mdx-gfm': '7.4.1', + '@storybook/addon-measure': '7.4.1', + '@storybook/addon-outline': '7.4.1', + '@storybook/addon-themes': '7.4.1', + '@storybook/addon-storyshots': '7.4.1', + '@storybook/addon-storyshots-puppeteer': '7.4.1', + '@storybook/addon-storysource': '7.4.1', + '@storybook/addon-toolbars': '7.4.1', + '@storybook/addon-viewport': '7.4.1', + '@storybook/addons': '7.4.1', + '@storybook/angular': '7.4.1', + '@storybook/api': '7.4.1', + '@storybook/blocks': '7.4.1', + '@storybook/builder-manager': '7.4.1', + '@storybook/builder-vite': '7.4.1', + '@storybook/builder-webpack5': '7.4.1', + '@storybook/channel-postmessage': '7.4.1', + '@storybook/channel-websocket': '7.4.1', + '@storybook/channels': '7.4.1', + '@storybook/cli': '7.4.1', + '@storybook/client-api': '7.4.1', + '@storybook/client-logger': '7.4.1', + '@storybook/codemod': '7.4.1', + '@storybook/components': '7.4.1', + '@storybook/core-client': '7.4.1', + '@storybook/core-common': '7.4.1', + '@storybook/core-events': '7.4.1', + '@storybook/core-server': '7.4.1', + '@storybook/core-webpack': '7.4.1', + '@storybook/csf-plugin': '7.4.1', + '@storybook/csf-tools': '7.4.1', + '@storybook/docs-tools': '7.4.1', + '@storybook/ember': '7.4.1', + '@storybook/html': '7.4.1', + '@storybook/html-vite': '7.4.1', + '@storybook/html-webpack5': '7.4.1', + '@storybook/instrumenter': '7.4.1', + '@storybook/manager': '7.4.1', + '@storybook/manager-api': '7.4.1', + '@storybook/nextjs': '7.4.1', + '@storybook/node-logger': '7.4.1', + '@storybook/postinstall': '7.4.1', + '@storybook/preact': '7.4.1', + '@storybook/preact-vite': '7.4.1', + '@storybook/preact-webpack5': '7.4.1', + '@storybook/preset-create-react-app': '7.4.1', + '@storybook/preset-html-webpack': '7.4.1', + '@storybook/preset-preact-webpack': '7.4.1', + '@storybook/preset-react-webpack': '7.4.1', + '@storybook/preset-server-webpack': '7.4.1', + '@storybook/preset-svelte-webpack': '7.4.1', + '@storybook/preset-vue-webpack': '7.4.1', + '@storybook/preset-vue3-webpack': '7.4.1', + '@storybook/preset-web-components-webpack': '7.4.1', + '@storybook/preview': '7.4.1', + '@storybook/preview-api': '7.4.1', + '@storybook/preview-web': '7.4.1', + '@storybook/react': '7.4.1', + '@storybook/react-dom-shim': '7.4.1', + '@storybook/react-vite': '7.4.1', + '@storybook/react-webpack5': '7.4.1', + '@storybook/router': '7.4.1', + '@storybook/server': '7.4.1', + '@storybook/server-webpack5': '7.4.1', + '@storybook/source-loader': '7.4.1', + '@storybook/store': '7.4.1', + '@storybook/svelte': '7.4.1', + '@storybook/svelte-vite': '7.4.1', + '@storybook/svelte-webpack5': '7.4.1', + '@storybook/sveltekit': '7.4.1', + '@storybook/telemetry': '7.4.1', + '@storybook/theming': '7.4.1', + '@storybook/types': '7.4.1', + '@storybook/vue': '7.4.1', + '@storybook/vue-vite': '7.4.1', + '@storybook/vue-webpack5': '7.4.1', + '@storybook/vue3': '7.4.1', + '@storybook/vue3-vite': '7.4.1', + '@storybook/vue3-webpack5': '7.4.1', + '@storybook/web-components': '7.4.1', + '@storybook/web-components-vite': '7.4.1', + '@storybook/web-components-webpack5': '7.4.1', + sb: '7.4.1', + storybook: '7.4.1', }; diff --git a/code/lib/client-logger/package.json b/code/lib/client-logger/package.json index fb451424848..7c283ccd461 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.4.0", + "version": "7.4.1", "description": "", "keywords": [ "storybook" diff --git a/code/lib/codemod/package.json b/code/lib/codemod/package.json index aa6caa1a169..effd68e64a5 100644 --- a/code/lib/codemod/package.json +++ b/code/lib/codemod/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/codemod", - "version": "7.4.0", + "version": "7.4.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 d6dd5a49d7f..8f6d879bb69 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.4.0", + "version": "7.4.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 c497f9041ce..18f18ed31d9 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.4.0", + "version": "7.4.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 aa2be123b5d..69afabf104b 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.4.0", + "version": "7.4.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 dfc8f3a78e6..a7b4ff002ea 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.4.0", + "version": "7.4.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 9097da12c31..79899c9f554 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.4.0", + "version": "7.4.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 18633851f3d..02b98e08870 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.4.0", + "version": "7.4.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 0ce1ad2f560..a50c2a5b837 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.4.0", + "version": "7.4.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 ed33b6ca6ae..66efd926352 100644 --- a/code/lib/instrumenter/package.json +++ b/code/lib/instrumenter/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/instrumenter", - "version": "7.4.0", + "version": "7.4.1", "description": "", "keywords": [ "storybook" diff --git a/code/lib/manager-api/package.json b/code/lib/manager-api/package.json index 7ca039a1b0c..20ba215a29d 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.4.0", + "version": "7.4.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 1ed1073630d..1bc82ee5bb7 100644 --- a/code/lib/manager-api/src/version.ts +++ b/code/lib/manager-api/src/version.ts @@ -1 +1 @@ -export const version = '7.4.0'; +export const version = '7.4.1'; diff --git a/code/lib/node-logger/package.json b/code/lib/node-logger/package.json index 5c8dc3fdc7d..31c4fdbbe56 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.4.0", + "version": "7.4.1", "description": "", "keywords": [ "storybook" diff --git a/code/lib/postinstall/package.json b/code/lib/postinstall/package.json index 8a2938e0c8e..48d298d3b6c 100644 --- a/code/lib/postinstall/package.json +++ b/code/lib/postinstall/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/postinstall", - "version": "7.4.0", + "version": "7.4.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 1c018d6c123..4c91561ae4d 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.4.0", + "version": "7.4.1", "description": "", "keywords": [ "storybook" diff --git a/code/lib/preview/package.json b/code/lib/preview/package.json index 3750786446c..6ce55aa6eff 100644 --- a/code/lib/preview/package.json +++ b/code/lib/preview/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preview", - "version": "7.4.0", + "version": "7.4.1", "description": "", "keywords": [ "storybook" diff --git a/code/lib/react-dom-shim/package.json b/code/lib/react-dom-shim/package.json index 25b300b3861..3934734b0a9 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.4.0", + "version": "7.4.1", "description": "", "keywords": [ "storybook" diff --git a/code/lib/router/package.json b/code/lib/router/package.json index 9d615e8ad8d..12034bcfcdb 100644 --- a/code/lib/router/package.json +++ b/code/lib/router/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/router", - "version": "7.4.0", + "version": "7.4.1", "description": "Core Storybook Router", "keywords": [ "storybook" diff --git a/code/lib/source-loader/package.json b/code/lib/source-loader/package.json index 09f8532b630..653609f6a10 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.4.0", + "version": "7.4.1", "description": "Source loader", "keywords": [ "lib", diff --git a/code/lib/telemetry/package.json b/code/lib/telemetry/package.json index 8ca60a31c8e..69a9fc513b5 100644 --- a/code/lib/telemetry/package.json +++ b/code/lib/telemetry/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/telemetry", - "version": "7.4.0", + "version": "7.4.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 32867e2d019..86343d73bb5 100644 --- a/code/lib/theming/package.json +++ b/code/lib/theming/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/theming", - "version": "7.4.0", + "version": "7.4.1", "description": "Core Storybook Components", "keywords": [ "storybook" diff --git a/code/lib/types/package.json b/code/lib/types/package.json index 894c1ca7fc0..4255183119f 100644 --- a/code/lib/types/package.json +++ b/code/lib/types/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/types", - "version": "7.4.0", + "version": "7.4.1", "description": "Core Storybook TS Types", "keywords": [ "storybook" diff --git a/code/package.json b/code/package.json index b77f6ca1b6e..12a9d0ba65b 100644 --- a/code/package.json +++ b/code/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/root", - "version": "7.4.0", + "version": "7.4.1", "private": true, "description": "Storybook root", "homepage": "https://storybook.js.org/", @@ -327,6 +327,5 @@ "Dependency Upgrades" ] ] - }, - "deferredNextVersion": "7.4.1" + } } diff --git a/code/presets/create-react-app/package.json b/code/presets/create-react-app/package.json index 7b4bbd5576d..a16c8a9afc6 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.4.0", + "version": "7.4.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 1f35784d524..7791f05bf27 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.4.0", + "version": "7.4.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 f368bc6785d..4a6eda67060 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.4.0", + "version": "7.4.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 04a2d399bee..514fe74bdbc 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.4.0", + "version": "7.4.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 054090c68f0..eda08fce0f2 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.4.0", + "version": "7.4.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 2f3abbaca8d..3f25985071b 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.4.0", + "version": "7.4.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 7d6d01fee24..fa964f455e9 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.4.0", + "version": "7.4.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 434621c3ddc..1940e2e95e8 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.4.0", + "version": "7.4.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 378c65328ac..b806cda6612 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.4.0", + "version": "7.4.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 7d169e4cada..fa37fd2cc1c 100644 --- a/code/renderers/html/package.json +++ b/code/renderers/html/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/html", - "version": "7.4.0", + "version": "7.4.1", "description": "Storybook HTML renderer", "keywords": [ "storybook" diff --git a/code/renderers/preact/package.json b/code/renderers/preact/package.json index 5cf82426242..5422c21e6e1 100644 --- a/code/renderers/preact/package.json +++ b/code/renderers/preact/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preact", - "version": "7.4.0", + "version": "7.4.1", "description": "Storybook Preact renderer", "keywords": [ "storybook" diff --git a/code/renderers/react/package.json b/code/renderers/react/package.json index 5ef32e5acb8..e56a93299f9 100644 --- a/code/renderers/react/package.json +++ b/code/renderers/react/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/react", - "version": "7.4.0", + "version": "7.4.1", "description": "Storybook React renderer", "keywords": [ "storybook" diff --git a/code/renderers/server/package.json b/code/renderers/server/package.json index 87a8a327d95..47f438c9d5f 100644 --- a/code/renderers/server/package.json +++ b/code/renderers/server/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/server", - "version": "7.4.0", + "version": "7.4.1", "description": "Storybook Server renderer", "keywords": [ "storybook" diff --git a/code/renderers/svelte/package.json b/code/renderers/svelte/package.json index f55fa8c12b0..f34c6d9775f 100644 --- a/code/renderers/svelte/package.json +++ b/code/renderers/svelte/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/svelte", - "version": "7.4.0", + "version": "7.4.1", "description": "Storybook Svelte renderer", "keywords": [ "storybook" diff --git a/code/renderers/vue/package.json b/code/renderers/vue/package.json index c7162ed280e..dd71de1ae60 100644 --- a/code/renderers/vue/package.json +++ b/code/renderers/vue/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/vue", - "version": "7.4.0", + "version": "7.4.1", "description": "Storybook Vue renderer", "keywords": [ "storybook" diff --git a/code/renderers/vue3/package.json b/code/renderers/vue3/package.json index 9673350e4c2..67723b9ee7a 100644 --- a/code/renderers/vue3/package.json +++ b/code/renderers/vue3/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/vue3", - "version": "7.4.0", + "version": "7.4.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 448afa36805..56687684124 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.4.0", + "version": "7.4.1", "description": "Storybook web-components renderer", "keywords": [ "lit", diff --git a/code/ui/blocks/package.json b/code/ui/blocks/package.json index 436d00f85a2..c3917fa21b6 100644 --- a/code/ui/blocks/package.json +++ b/code/ui/blocks/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/blocks", - "version": "7.4.0", + "version": "7.4.1", "description": "Storybook Doc Blocks", "keywords": [ "storybook" diff --git a/code/ui/components/package.json b/code/ui/components/package.json index 9b170beb3b7..7ba3b143149 100644 --- a/code/ui/components/package.json +++ b/code/ui/components/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/components", - "version": "7.4.0", + "version": "7.4.1", "description": "Core Storybook Components", "keywords": [ "storybook" diff --git a/code/ui/manager/package.json b/code/ui/manager/package.json index d47573e31a8..8be381b6281 100644 --- a/code/ui/manager/package.json +++ b/code/ui/manager/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/manager", - "version": "7.4.0", + "version": "7.4.1", "description": "Core Storybook UI", "keywords": [ "storybook" From 4f5351151c7bce95e55a0eec528d02993af77cf0 Mon Sep 17 00:00:00 2001 From: j3rem1e Date: Tue, 12 Sep 2023 20:13:36 +0200 Subject: [PATCH 043/249] Svelte: Fix documentation for typescript component with vite --- code/e2e-tests/framework-svelte.spec.ts | 5 ++-- code/frameworks/svelte-vite/package.json | 1 + .../svelte-vite/src/plugins/svelte-docgen.ts | 23 ++++++++++++++++--- code/yarn.lock | 1 + 4 files changed, 24 insertions(+), 6 deletions(-) diff --git a/code/e2e-tests/framework-svelte.spec.ts b/code/e2e-tests/framework-svelte.spec.ts index b2a3dbf4167..3bf8d5d39ab 100644 --- a/code/e2e-tests/framework-svelte.spec.ts +++ b/code/e2e-tests/framework-svelte.spec.ts @@ -1,5 +1,4 @@ /* eslint-disable jest/no-disabled-tests */ -import type { Locator } from '@playwright/test'; import { test, expect } from '@playwright/test'; import process from 'process'; import { SbPage } from './util'; @@ -10,8 +9,8 @@ const templateName = process.env.STORYBOOK_TEMPLATE_NAME; test.describe('Svelte', () => { test.skip( // eslint-disable-next-line jest/valid-title - !templateName?.includes('svelte') || templateName?.includes('-ts'), - 'Only run this test on Svelte with javascript' + !templateName?.includes('svelte'), + 'Only run this test on Svelte' ); test.beforeEach(async ({ page }) => { diff --git a/code/frameworks/svelte-vite/package.json b/code/frameworks/svelte-vite/package.json index ddbf5fc5488..95ed91f74d3 100644 --- a/code/frameworks/svelte-vite/package.json +++ b/code/frameworks/svelte-vite/package.json @@ -52,6 +52,7 @@ "@storybook/svelte": "workspace:*", "@sveltejs/vite-plugin-svelte": "^2.4.2", "magic-string": "^0.30.0", + "svelte-preprocess": "^5.0.4", "sveltedoc-parser": "^4.2.1", "ts-dedent": "^2.2.0" }, diff --git a/code/frameworks/svelte-vite/src/plugins/svelte-docgen.ts b/code/frameworks/svelte-vite/src/plugins/svelte-docgen.ts index 6f46d8be1a2..5dfe00afd76 100644 --- a/code/frameworks/svelte-vite/src/plugins/svelte-docgen.ts +++ b/code/frameworks/svelte-vite/src/plugins/svelte-docgen.ts @@ -7,6 +7,7 @@ import type { SvelteParserOptions } from 'sveltedoc-parser'; import { logger } from '@storybook/node-logger'; import { preprocess } from 'svelte/compiler'; import { createFilter } from 'vite'; +import { replace, typescript } from 'svelte-preprocess'; /* * Patch sveltedoc-parser internal options. @@ -60,10 +61,26 @@ function getNameFromFilename(filename: string) { export function svelteDocgen(svelteOptions: Record = {}): PluginOption { const cwd = process.cwd(); - const { preprocess: preprocessOptions, logDocgen = false } = svelteOptions; + const { preprocess: preprocessOptions, docPreprocess, logDocgen = false } = svelteOptions; const include = /\.(svelte)$/; const filter = createFilter(include); + let docPreprocessOptions = docPreprocess; + if (!docPreprocessOptions && preprocessOptions) { + /* + * We can't use vitePreprocess() for the documentation. + * This preprocessor uses esbuild which removes jsdoc. + * + * By default, only typescript is transpiled, and style tags are removed. + * This can be configured with the `docPreprocess` options. + * + * Note: theses preprocessors are only used to make the component + * compatible to sveltedoc-parser (no ts), not to compile + * the component. + */ + docPreprocessOptions = [typescript(), replace([[//gims, '']])]; + } + return { name: 'storybook:svelte-docgen-plugin', async transform(src: string, id: string) { @@ -72,11 +89,11 @@ export function svelteDocgen(svelteOptions: Record = {}): PluginOpt const resource = path.relative(cwd, id); let docOptions; - if (preprocessOptions) { + if (docPreprocessOptions) { // eslint-disable-next-line @typescript-eslint/no-shadow const src = fs.readFileSync(resource).toString(); - const { code: fileContent } = await preprocess(src, preprocessOptions, { + const { code: fileContent } = await preprocess(src, docPreprocessOptions, { filename: resource, }); diff --git a/code/yarn.lock b/code/yarn.lock index 1ab170d5bbc..13d2baf9766 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -8050,6 +8050,7 @@ __metadata: "@types/node": ^16.0.0 magic-string: ^0.30.0 svelte: ^4.0.0 + svelte-preprocess: ^5.0.4 sveltedoc-parser: ^4.2.1 ts-dedent: ^2.2.0 typescript: ~4.9.3 From a1860c02d5a9991bc4c88f77c23bb7606f9df8b7 Mon Sep 17 00:00:00 2001 From: j3rem1e Date: Wed, 13 Sep 2023 19:20:43 +0200 Subject: [PATCH 044/249] Fix e2e tests --- code/e2e-tests/framework-svelte.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/e2e-tests/framework-svelte.spec.ts b/code/e2e-tests/framework-svelte.spec.ts index 3bf8d5d39ab..d8821bde95c 100644 --- a/code/e2e-tests/framework-svelte.spec.ts +++ b/code/e2e-tests/framework-svelte.spec.ts @@ -21,7 +21,7 @@ test.describe('Svelte', () => { test('Story have a documentation', async ({ page }) => { const sbPage = new SbPage(page); - sbPage.navigateToStory('example/button', 'docs'); + await sbPage.navigateToStory('example/button', 'docs'); const root = sbPage.previewRoot(); const argsTable = root.locator('.docblock-argstable'); await expect(argsTable).toContainText('Is this the principal call to action on the page'); From 048d7c661320abab820af54ccf601630088524fd Mon Sep 17 00:00:00 2001 From: j3rem1e Date: Thu, 14 Sep 2023 21:10:13 +0200 Subject: [PATCH 045/249] Move e2e tests into ButtonView --- code/e2e-tests/framework-svelte.spec.ts | 4 ++-- code/renderers/svelte/template/cli/js/Button.svelte | 3 +-- .../svelte/template/cli/ts-3-8/Button.svelte | 3 +-- .../svelte/template/cli/ts-4-9/Button.svelte | 3 +-- .../svelte/template/components/Button.svelte | 3 +-- .../renderers/svelte/template/stories/docs.stories.js | 11 +++++++++++ .../svelte/template/stories/views/ButtonView.svelte | 6 +++--- 7 files changed, 20 insertions(+), 13 deletions(-) create mode 100644 code/renderers/svelte/template/stories/docs.stories.js diff --git a/code/e2e-tests/framework-svelte.spec.ts b/code/e2e-tests/framework-svelte.spec.ts index d8821bde95c..09136254b0f 100644 --- a/code/e2e-tests/framework-svelte.spec.ts +++ b/code/e2e-tests/framework-svelte.spec.ts @@ -21,9 +21,9 @@ test.describe('Svelte', () => { test('Story have a documentation', async ({ page }) => { const sbPage = new SbPage(page); - await sbPage.navigateToStory('example/button', 'docs'); + await sbPage.navigateToStory('stories/renderers/svelte/docs', 'docs'); const root = sbPage.previewRoot(); const argsTable = root.locator('.docblock-argstable'); - await expect(argsTable).toContainText('Is this the principal call to action on the page'); + await expect(argsTable).toContainText('Rounds the button'); }); }); diff --git a/code/renderers/svelte/template/cli/js/Button.svelte b/code/renderers/svelte/template/cli/js/Button.svelte index de99698d769..a2a78d9d0d6 100644 --- a/code/renderers/svelte/template/cli/js/Button.svelte +++ b/code/renderers/svelte/template/cli/js/Button.svelte @@ -24,7 +24,6 @@ $: mode = primary ? 'storybook-button--primary' : 'storybook-button--secondary'; $: style = backgroundColor ? `background-color: ${backgroundColor}` : ''; - $: text = label?.toString(); // Test parsing of Elvis Operator diff --git a/code/renderers/svelte/template/cli/ts-3-8/Button.svelte b/code/renderers/svelte/template/cli/ts-3-8/Button.svelte index 977d766f355..dfc4bbd4c03 100644 --- a/code/renderers/svelte/template/cli/ts-3-8/Button.svelte +++ b/code/renderers/svelte/template/cli/ts-3-8/Button.svelte @@ -22,7 +22,6 @@ $: mode = primary ? 'storybook-button--primary' : 'storybook-button--secondary'; $: style = backgroundColor ? `background-color: ${backgroundColor}` : ''; - $: text = label?.toString(); // Test parsing of Elvis Operator diff --git a/code/renderers/svelte/template/cli/ts-4-9/Button.svelte b/code/renderers/svelte/template/cli/ts-4-9/Button.svelte index 0c551e54f84..f590a0aff55 100644 --- a/code/renderers/svelte/template/cli/ts-4-9/Button.svelte +++ b/code/renderers/svelte/template/cli/ts-4-9/Button.svelte @@ -22,7 +22,6 @@ $: mode = primary ? 'storybook-button--primary' : 'storybook-button--secondary'; $: style = backgroundColor ? `background-color: ${backgroundColor}` : ''; - $: text = label?.toString(); // Test parsing of Elvis Operator diff --git a/code/renderers/svelte/template/components/Button.svelte b/code/renderers/svelte/template/components/Button.svelte index 07f18594ace..4b80e84b813 100644 --- a/code/renderers/svelte/template/components/Button.svelte +++ b/code/renderers/svelte/template/components/Button.svelte @@ -24,7 +24,6 @@ $: mode = primary ? 'storybook-button--primary' : 'storybook-button--secondary'; $: style = backgroundColor ? `background-color: ${backgroundColor}` : ''; - $: text = label?.toString(); // Test parsing of Elvis Operator const dispatch = createEventDispatcher(); @@ -42,5 +41,5 @@ {style} on:click={onClick} > - {text} + {label} diff --git a/code/renderers/svelte/template/stories/docs.stories.js b/code/renderers/svelte/template/stories/docs.stories.js new file mode 100644 index 00000000000..56337bab730 --- /dev/null +++ b/code/renderers/svelte/template/stories/docs.stories.js @@ -0,0 +1,11 @@ +import ButtonView from './views/ButtonView.svelte'; + +export default { + component: ButtonView, + args: { + primary: true, + }, + tags: ['autodocs'], +}; + +export const Primary = {}; diff --git a/code/renderers/svelte/template/stories/views/ButtonView.svelte b/code/renderers/svelte/template/stories/views/ButtonView.svelte index 201981d8df3..900949a1b8c 100644 --- a/code/renderers/svelte/template/stories/views/ButtonView.svelte +++ b/code/renderers/svelte/template/stories/views/ButtonView.svelte @@ -1,10 +1,10 @@ - From 72a8744d8ea8614d6a4ce628be07a472efcdba7a Mon Sep 17 00:00:00 2001 From: Jason McKenzie Date: Fri, 15 Sep 2023 17:04:35 +1000 Subject: [PATCH 046/249] Fix default next image loader when src has params --- .../src/images/next-image-default-loader.tsx | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/code/frameworks/nextjs/src/images/next-image-default-loader.tsx b/code/frameworks/nextjs/src/images/next-image-default-loader.tsx index 6029390979a..1d137fdf95f 100644 --- a/code/frameworks/nextjs/src/images/next-image-default-loader.tsx +++ b/code/frameworks/nextjs/src/images/next-image-default-loader.tsx @@ -24,5 +24,17 @@ export const defaultLoader = ({ src, width, quality }: _NextImage.ImageLoaderPro ); } - return `${src}?w=${width}&q=${quality ?? 75}`; + const [baseUrlAndSearch, hash = ''] = src.split('#'); + const [baseUrl, search = ''] = baseUrlAndSearch.split('?'); + + const params = new URLSearchParams(search); + + if (!params.has('w') && !params.has('q')) { + params.set('w', width.toString()); + params.set('q', (quality ?? 75).toString()); + } + + const prefixedHash = hash ? `#${hash}` : ''; + + return `${baseUrl}?${params.toString()}${prefixedHash}`; }; From 735fb3518853585fc33daa4ec6599a0699ea9d89 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Thu, 14 Sep 2023 11:04:18 +0200 Subject: [PATCH 047/249] Merge pull request #24099 from storybookjs/norbert/improve-status-ui-sidebar UI: Improve look and feel of status UI in sidebar (cherry picked from commit 9c49e160fd77396db8458811caea781ad152849a) --- .../src/components/tooltip/WithTooltip.tsx | 5 +- .../src/components/sidebar/SearchResults.tsx | 6 +- .../manager/src/components/sidebar/Tree.tsx | 89 +++++++++---------- code/ui/manager/src/utils/status.tsx | 36 +++++--- 4 files changed, 74 insertions(+), 62 deletions(-) diff --git a/code/ui/components/src/components/tooltip/WithTooltip.tsx b/code/ui/components/src/components/tooltip/WithTooltip.tsx index 058d7140c2a..bece4bc6427 100644 --- a/code/ui/components/src/components/tooltip/WithTooltip.tsx +++ b/code/ui/components/src/components/tooltip/WithTooltip.tsx @@ -1,4 +1,4 @@ -import type { FC, ReactNode } from 'react'; +import type { ComponentProps, FC, ReactNode } from 'react'; import React, { useCallback, useState, useEffect } from 'react'; import ReactDOM from 'react-dom'; import { styled } from '@storybook/theming'; @@ -28,6 +28,7 @@ interface WithHideFn { export interface WithTooltipPureProps extends Omit, + Omit, 'trigger'>, PopperOptions { svg?: boolean; withArrows?: boolean; @@ -129,7 +130,7 @@ const WithTooltipPure: FC = ({ return ( <> - + {children} {isVisible && ReactDOM.createPortal(tooltipComponent, document.body)} diff --git a/code/ui/manager/src/components/sidebar/SearchResults.tsx b/code/ui/manager/src/components/sidebar/SearchResults.tsx index 8cca81f84cb..2ce58aba337 100644 --- a/code/ui/manager/src/components/sidebar/SearchResults.tsx +++ b/code/ui/manager/src/components/sidebar/SearchResults.tsx @@ -172,14 +172,12 @@ const Result: FC< node = ; } - const [i, iconColor] = item.status ? statusMapping[item.status] : []; + const [i] = item.status ? statusMapping[item.status] : []; return ( {node} - {item.status ? ( - - ) : null} + {item.status ? i : null} ); }); diff --git a/code/ui/manager/src/components/sidebar/Tree.tsx b/code/ui/manager/src/components/sidebar/Tree.tsx index 8d5ac50484e..dadff45d998 100644 --- a/code/ui/manager/src/components/sidebar/Tree.tsx +++ b/code/ui/manager/src/components/sidebar/Tree.tsx @@ -37,44 +37,47 @@ import { } from '../../utils/tree'; import { statusMapping, getHighestStatus, getGroupStatus } from '../../utils/status'; -export const Action = styled.button(({ theme }) => ({ - display: 'inline-flex', - alignItems: 'center', - justifyContent: 'center', - width: 20, - height: 20, - margin: 0, - marginLeft: 'auto', - padding: 0, - outline: 0, - lineHeight: 'normal', - background: 'none', - border: `1px solid transparent`, - borderRadius: '100%', - cursor: 'pointer', - transition: 'all 150ms ease-out', - color: - theme.base === 'light' - ? transparentize(0.3, theme.color.defaultText) - : transparentize(0.6, theme.color.defaultText), +export const Action = styled.button<{ height?: number; width?: number }>( + ({ theme, height, width }) => ({ + display: 'inline-flex', + alignItems: 'center', + justifyContent: 'center', + width: width || 20, + height: height || 20, + boxSizing: 'border-box', + margin: 0, + marginLeft: 'auto', + padding: 0, + outline: 0, + lineHeight: 'normal', + background: 'none', + border: `1px solid transparent`, + borderRadius: '100%', + cursor: 'pointer', + transition: 'all 150ms ease-out', + color: + theme.base === 'light' + ? transparentize(0.3, theme.color.defaultText) + : transparentize(0.6, theme.color.defaultText), - '&:hover': { - color: theme.color.secondary, - }, - '&:focus': { - color: theme.color.secondary, - borderColor: theme.color.secondary, - - '&:not(:focus-visible)': { - borderColor: 'transparent', + '&:hover': { + color: theme.color.secondary, }, - }, + '&:focus': { + color: theme.color.secondary, + borderColor: theme.color.secondary, - svg: { - width: 10, - height: 10, - }, -})); + '&:not(:focus-visible)': { + borderColor: 'transparent', + }, + }, + + svg: { + width: 10, + height: 10, + }, + }) +); const CollapseButton = styled.button(({ theme }) => ({ // Reset button @@ -207,7 +210,7 @@ const Node = React.memo(function Node({ const LeafNode = item.type === 'docs' ? DocumentNode : StoryNode; const statusValue = getHighestStatus(Object.values(status || {}).map((s) => s.status)); - const [icon, iconColor, textColor] = statusMapping[statusValue]; + const [icon, textColor] = statusMapping[statusValue]; return ( (function Node({ {icon ? ( ( ({ id: k, title: v.title, description: v.description, - right: ( - - ), + right: statusMapping[v.status][0], }))} /> )} closeOnOutsideClick > - - + + {icon} ) : null} @@ -530,7 +529,7 @@ export const Tree = React.memo<{ } const isDisplayed = !item.parent || ancestry[itemId].every((a: string) => expanded[a]); - const color = groupStatus[itemId] ? statusMapping[groupStatus[itemId]][2] : null; + const color = groupStatus[itemId] ? statusMapping[groupStatus[itemId]][1] : null; return ( ({ + // specificity hack + animation: `${animation.glow} 1.5s ease-in-out infinite`, + color: base === 'light' ? color.mediumdark : color.darker, +})); + export const statusPriority: API_StatusValue[] = ['unknown', 'pending', 'success', 'warn', 'error']; -export const statusMapping: Record< - API_StatusValue, - [ComponentProps['icon'] | null, string | null, string | null] -> = { - unknown: [null, null, null], - pending: ['watch', 'currentColor', 'currentColor'], - success: ['circle', 'green', 'currentColor'], - warn: ['circle', 'orange', '#A15C20'], - error: ['circle', 'red', 'brown'], +export const statusMapping: Record = { + unknown: [null, null], + pending: [, 'currentColor'], + success: [, 'currentColor'], + warn: [, '#A15C20'], + error: [, 'brown'], }; export const getHighestStatus = (statuses: API_StatusValue[]): API_StatusValue => { From e6f3982bcc25aedefdd6e7904cc98f95dfefbd80 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Thu, 31 Aug 2023 12:12:51 +0200 Subject: [PATCH 048/249] Merge pull request #24007 from storybookjs/norbert/enhance-updateStatus Addon API: Improve the updateStatus API (cherry picked from commit 115d439da3f8e418e306d10fc2026383a130e4be) --- code/lib/manager-api/src/modules/stories.ts | 23 ++++- .../lib/manager-api/src/tests/stories.test.ts | 84 +++++++++++++++++++ code/lib/types/src/modules/api-stories.ts | 2 +- 3 files changed, 105 insertions(+), 4 deletions(-) diff --git a/code/lib/manager-api/src/modules/stories.ts b/code/lib/manager-api/src/modules/stories.ts index c69e5e23cdb..aff85aabcea 100644 --- a/code/lib/manager-api/src/modules/stories.ts +++ b/code/lib/manager-api/src/modules/stories.ts @@ -263,7 +263,10 @@ export interface SubAPI { * @param {StatusUpdate} update - An object containing the updated status information. * @returns {Promise} A promise that resolves when the status has been updated. */ - experimental_updateStatus: (addonId: string, update: API_StatusUpdate) => Promise; + experimental_updateStatus: ( + addonId: string, + update: API_StatusUpdate | ((state: API_StatusState) => API_StatusUpdate) + ) => Promise; /** * Updates the filtering of the index. * @@ -581,13 +584,27 @@ export const init: ModuleFn = ({ }, /* EXPERIMENTAL APIs */ - experimental_updateStatus: async (id, update) => { + experimental_updateStatus: async (id, input) => { const { status, internal_index: index } = store.getState(); const newStatus = { ...status }; + const update = typeof input === 'function' ? input(status) : input; + + if (Object.keys(update).length === 0) { + return; + } + Object.entries(update).forEach(([storyId, value]) => { newStatus[storyId] = { ...(newStatus[storyId] || {}) }; - newStatus[storyId][id] = value; + if (value === null) { + delete newStatus[storyId][id]; + } else { + newStatus[storyId][id] = value; + } + + if (Object.keys(newStatus[storyId]).length === 0) { + delete newStatus[storyId]; + } }); await store.setState({ status: newStatus }, { persistence: 'session' }); diff --git a/code/lib/manager-api/src/tests/stories.test.ts b/code/lib/manager-api/src/tests/stories.test.ts index 0ee0c9be4eb..a93cd1df9a9 100644 --- a/code/lib/manager-api/src/tests/stories.test.ts +++ b/code/lib/manager-api/src/tests/stories.test.ts @@ -1273,6 +1273,90 @@ describe('stories API', () => { } `); }); + it('delete when value is null', async () => { + const moduleArgs = createMockModuleArgs({}); + const { api } = initStories(moduleArgs as unknown as ModuleArgs); + const { store } = moduleArgs; + + await api.setIndex({ v: 4, entries: mockEntries }); + + await expect( + api.experimental_updateStatus('a-addon-id', { + 'a-story-id': { + status: 'pending', + title: 'an addon title', + description: 'an addon description', + }, + 'another-story-id': { status: 'success', title: 'a addon title', description: '' }, + }) + ).resolves.not.toThrow(); + + // do a second update, this time with null + await expect( + api.experimental_updateStatus('a-addon-id', { + 'a-story-id': null, + 'another-story-id': { status: 'success', title: 'a addon title', description: '' }, + }) + ).resolves.not.toThrow(); + + expect(store.getState().status).toMatchInlineSnapshot(` + Object { + "another-story-id": Object { + "a-addon-id": Object { + "description": "", + "status": "success", + "title": "a addon title", + }, + }, + } + `); + }); + it('updates with a function', async () => { + const moduleArgs = createMockModuleArgs({}); + const { api } = initStories(moduleArgs as unknown as ModuleArgs); + const { store } = moduleArgs; + + await api.setIndex({ v: 4, entries: mockEntries }); + + // setup initial state + await expect( + api.experimental_updateStatus('a-addon-id', () => ({ + 'a-story-id': { + status: 'pending', + title: 'an addon title', + description: 'an addon description', + }, + 'another-story-id': { status: 'success', title: 'a addon title', description: '' }, + })) + ).resolves.not.toThrow(); + + // use existing state in function + await expect( + api.experimental_updateStatus('a-addon-id', (current) => { + return Object.fromEntries( + Object.entries(current).map(([k, v]) => [k, { ...v['a-addon-id'], status: 'success' }]) + ); + }) + ).resolves.not.toThrow(); + expect(store.getState().status).toMatchInlineSnapshot(` + Object { + "a-story-id": Object { + "a-addon-id": Object { + "description": "an addon description", + "status": "success", + "title": "an addon title", + }, + }, + "another-story-id": Object { + "a-addon-id": Object { + "description": "", + "status": "success", + "title": "a addon title", + }, + }, + } + `); + }); }); describe('experimental_setFilter', () => { it('is included in the initial state', async () => { diff --git a/code/lib/types/src/modules/api-stories.ts b/code/lib/types/src/modules/api-stories.ts index 3df42dd812e..45acc19e35c 100644 --- a/code/lib/types/src/modules/api-stories.ts +++ b/code/lib/types/src/modules/api-stories.ts @@ -186,5 +186,5 @@ export type API_StatusState = Record>; export type API_StatusUpdate = Record; export type API_FilterFunction = ( - item: API_PreparedIndexEntry & { status: Record } + item: API_PreparedIndexEntry & { status: Record } ) => boolean; From 08011472c030405fdcfd9e69807669405d9f8526 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Thu, 14 Sep 2023 11:41:42 +0200 Subject: [PATCH 049/249] Merge pull request #24156 from storybookjs/norbert/improve-svg-recoloration UI: Remove override path fill when path has a fill attribute (cherry picked from commit 72400c6057ad86294b91149f2acec31197c763d4) --- .../src/components/Button/Button.tsx | 4 +- .../components/tooltip/ListItem.stories.tsx | 89 ++++++++++++++++++- .../src/components/tooltip/ListItem.tsx | 2 +- .../src/components/typography/link/link.tsx | 16 ++-- 4 files changed, 99 insertions(+), 12 deletions(-) diff --git a/code/ui/components/src/components/Button/Button.tsx b/code/ui/components/src/components/Button/Button.tsx index f39414bf434..72598c214ec 100644 --- a/code/ui/components/src/components/Button/Button.tsx +++ b/code/ui/components/src/components/Button/Button.tsx @@ -167,7 +167,7 @@ const ButtonWrapper = styled.button<{ boxShadow: `${color} 0 0 0 1px inset`, color, - 'svg path': { + 'svg path:not([fill])': { fill: color, }, @@ -205,7 +205,7 @@ const ButtonWrapper = styled.button<{ boxShadow: `${color} 0 0 0 1px inset`, color, - 'svg path': { + 'svg path:not([fill])': { fill: color, }, diff --git a/code/ui/components/src/components/tooltip/ListItem.stories.tsx b/code/ui/components/src/components/tooltip/ListItem.stories.tsx index 38344eb6335..8ffeaf32251 100644 --- a/code/ui/components/src/components/tooltip/ListItem.stories.tsx +++ b/code/ui/components/src/components/tooltip/ListItem.stories.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import React, { Fragment } from 'react'; import ListItem from './ListItem'; import { Icons } from '../icon/icon'; @@ -51,6 +51,93 @@ export const ActiveIcon = { right: , }, }; +export const ActiveIconLeft = { + args: { + title: 'Active icon', + active: true, + left: , + }, +}; +export const ActiveIconLeftColored = { + args: { + title: 'Active icon', + active: true, + left: ( + + + + + + + + + + + + + + + + + + + + + + + + + + + ), + }, +}; export const WPositions = { args: { diff --git a/code/ui/components/src/components/tooltip/ListItem.tsx b/code/ui/components/src/components/tooltip/ListItem.tsx index 96c5fa3f58a..38b6488faa2 100644 --- a/code/ui/components/src/components/tooltip/ListItem.tsx +++ b/code/ui/components/src/components/tooltip/ListItem.tsx @@ -107,7 +107,7 @@ const Left = styled.span( '& svg': { opacity: 1, }, - '& svg path': { + '& svg path:not([fill])': { fill: theme.color.secondary, }, } diff --git a/code/ui/components/src/components/typography/link/link.tsx b/code/ui/components/src/components/typography/link/link.tsx index abd33bad4f4..193fca15e97 100644 --- a/code/ui/components/src/components/typography/link/link.tsx +++ b/code/ui/components/src/components/typography/link/link.tsx @@ -73,13 +73,13 @@ const A = styled.a( '&:hover, &:focus': { cursor: 'pointer', color: darken(0.07, theme.color.secondary), - 'svg path': { + 'svg path:not([fill])': { fill: darken(0.07, theme.color.secondary), }, }, '&:active': { color: darken(0.1, theme.color.secondary), - 'svg path': { + 'svg path:not([fill])': { fill: darken(0.1, theme.color.secondary), }, }, @@ -110,20 +110,20 @@ const A = styled.a( return colors ? { color: colors[0], - 'svg path': { + 'svg path:not([fill])': { fill: colors[0], }, '&:hover': { color: colors[1], - 'svg path': { + 'svg path:not([fill])': { fill: colors[1], }, }, '&:active': { color: colors[2], - 'svg path': { + 'svg path:not([fill])': { fill: colors[2], }, }, @@ -145,20 +145,20 @@ const A = styled.a( inverse ? { color: theme.color.lightest, - 'svg path': { + ':not([fill])': { fill: theme.color.lightest, }, '&:hover': { color: theme.color.lighter, - 'svg path': { + 'svg path:not([fill])': { fill: theme.color.lighter, }, }, '&:active': { color: theme.color.light, - 'svg path': { + 'svg path:not([fill])': { fill: theme.color.light, }, }, From 5246f9fee7e41a182b6283716fe369bd91ed339d Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Fri, 15 Sep 2023 10:12:32 +0200 Subject: [PATCH 050/249] Merge pull request #24178 from storybookjs/yann/nextjs-config-to-preview-annotations Nextjs: Migrate from config to previewAnnotations (cherry picked from commit 896b2e7270f76c05b9844e42143d273ed1dc363f) --- code/frameworks/nextjs/src/preset.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/frameworks/nextjs/src/preset.ts b/code/frameworks/nextjs/src/preset.ts index 238ba2bb170..4aa06d54c4d 100644 --- a/code/frameworks/nextjs/src/preset.ts +++ b/code/frameworks/nextjs/src/preset.ts @@ -68,7 +68,7 @@ export const core: PresetProperty<'core', StorybookConfig> = async (config, opti }; }; -export const config: StorybookConfig['previewAnnotations'] = (entry = []) => [ +export const previewAnnotations: StorybookConfig['previewAnnotations'] = (entry = []) => [ ...entry, require.resolve('@storybook/nextjs/preview.js'), ]; From 8124518744ca1dc780033524670bfc3f708ae88d Mon Sep 17 00:00:00 2001 From: storybook-bot <32066757+storybook-bot@users.noreply.github.com> Date: Fri, 15 Sep 2023 08:59:41 +0000 Subject: [PATCH 051/249] Write changelog for 7.4.2 --- CHANGELOG.md | 7 +++++++ code/package.json | 3 ++- docs/versions/latest.json | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 990f0318310..26e490d7c6d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## 7.4.2 + +- Addon API: Improve the updateStatus API - [#24007](https://github.com/storybookjs/storybook/pull/24007), thanks [@ndelangen](https://github.com/ndelangen)! +- Nextjs: Migrate from config to previewAnnotations - [#24178](https://github.com/storybookjs/storybook/pull/24178), thanks [@yannbf](https://github.com/yannbf)! +- UI: Fix SVG override fill when path has a fill attribute - [#24156](https://github.com/storybookjs/storybook/pull/24156), thanks [@ndelangen](https://github.com/ndelangen)! +- UI: Improve look and feel of status UI in sidebar - [#24099](https://github.com/storybookjs/storybook/pull/24099), thanks [@ndelangen](https://github.com/ndelangen)! + ## 7.4.1 - CLI: Add uncaughtException handler - [#24018](https://github.com/storybookjs/storybook/pull/24018), thanks [@yannbf](https://github.com/yannbf)! diff --git a/code/package.json b/code/package.json index 12a9d0ba65b..ec2d374e76f 100644 --- a/code/package.json +++ b/code/package.json @@ -327,5 +327,6 @@ "Dependency Upgrades" ] ] - } + }, + "deferredNextVersion": "7.4.2" } diff --git a/docs/versions/latest.json b/docs/versions/latest.json index af61adb7efb..ff379ea5b97 100644 --- a/docs/versions/latest.json +++ b/docs/versions/latest.json @@ -1 +1 @@ -{"version":"7.4.1","info":{"plain":"- CLI: Add uncaughtException handler - [#24018](https://github.com/storybookjs/storybook/pull/24018), thanks [@yannbf](https://github.com/yannbf)!\n- CLI: Fix packageManager handling in `sb add` - [#24079](https://github.com/storybookjs/storybook/pull/24079), thanks [@Integrayshaun](https://github.com/Integrayshaun)!\n- Core: Add CJS entrypoints to errors in core events - [#24038](https://github.com/storybookjs/storybook/pull/24038), thanks [@yannbf](https://github.com/yannbf)!\n- Docs: Fix TOC import - [#24047](https://github.com/storybookjs/storybook/pull/24047), thanks [@shilman](https://github.com/shilman)!\n- Telemetry: Filter addon options to protect sensitive info - [#24000](https://github.com/storybookjs/storybook/pull/24000), thanks [@shilman](https://github.com/shilman)!\n- Types: Remove `@types/react` dep from `@storybook/types` - [#24042](https://github.com/storybookjs/storybook/pull/24042), thanks [@JReinhold](https://github.com/JReinhold)!\n- Vue3: Remove console.log in sourceDecorator - [#24062](https://github.com/storybookjs/storybook/pull/24062), thanks [@oruman](https://github.com/oruman)!"}} +{"version":"7.4.2","info":{"plain":"- Addon API: Improve the updateStatus API - [#24007](https://github.com/storybookjs/storybook/pull/24007), thanks [@ndelangen](https://github.com/ndelangen)!\n- Nextjs: Migrate from config to previewAnnotations - [#24178](https://github.com/storybookjs/storybook/pull/24178), thanks [@yannbf](https://github.com/yannbf)!\n- UI: Fix SVG override fill when path has a fill attribute - [#24156](https://github.com/storybookjs/storybook/pull/24156), thanks [@ndelangen](https://github.com/ndelangen)!\n- UI: Improve look and feel of status UI in sidebar - [#24099](https://github.com/storybookjs/storybook/pull/24099), thanks [@ndelangen](https://github.com/ndelangen)!"}} From d0dcf7d9182b5c4378bf5e0e83d8335883d423b9 Mon Sep 17 00:00:00 2001 From: storybook-bot <32066757+storybook-bot@users.noreply.github.com> Date: Fri, 15 Sep 2023 09:35:40 +0000 Subject: [PATCH 052/249] Bump version from "7.4.1" to "7.4.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 8e0ce219a98..9cf4b086fdb 100644 --- a/code/addons/a11y/package.json +++ b/code/addons/a11y/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-a11y", - "version": "7.4.1", + "version": "7.4.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 0777969d495..9fafe53e78c 100644 --- a/code/addons/actions/package.json +++ b/code/addons/actions/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-actions", - "version": "7.4.1", + "version": "7.4.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 6dbd7d3c0c6..1ea75e07a9f 100644 --- a/code/addons/backgrounds/package.json +++ b/code/addons/backgrounds/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-backgrounds", - "version": "7.4.1", + "version": "7.4.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 fb52d049dad..a41c30a669b 100644 --- a/code/addons/controls/package.json +++ b/code/addons/controls/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-controls", - "version": "7.4.1", + "version": "7.4.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 d6d36f85d45..4566cba0aa3 100644 --- a/code/addons/docs/package.json +++ b/code/addons/docs/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-docs", - "version": "7.4.1", + "version": "7.4.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 fb7dbb82cab..37698f64c23 100644 --- a/code/addons/essentials/package.json +++ b/code/addons/essentials/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-essentials", - "version": "7.4.1", + "version": "7.4.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 425519f969f..a7894703dd4 100644 --- a/code/addons/gfm/package.json +++ b/code/addons/gfm/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-mdx-gfm", - "version": "7.4.1", + "version": "7.4.2", "description": "GitHub Flavored Markdown in Storybook", "keywords": [ "addon", diff --git a/code/addons/highlight/package.json b/code/addons/highlight/package.json index a9371893d22..1bcac58de33 100644 --- a/code/addons/highlight/package.json +++ b/code/addons/highlight/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-highlight", - "version": "7.4.1", + "version": "7.4.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 6d42fbd8f21..37baf0026fa 100644 --- a/code/addons/interactions/package.json +++ b/code/addons/interactions/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-interactions", - "version": "7.4.1", + "version": "7.4.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 97d844fd34c..ffc37ca5c58 100644 --- a/code/addons/jest/package.json +++ b/code/addons/jest/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-jest", - "version": "7.4.1", + "version": "7.4.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 5ff946c2271..13039dcf3ff 100644 --- a/code/addons/links/package.json +++ b/code/addons/links/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-links", - "version": "7.4.1", + "version": "7.4.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 b3f4d620383..24543a05f6e 100644 --- a/code/addons/measure/package.json +++ b/code/addons/measure/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-measure", - "version": "7.4.1", + "version": "7.4.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 4ff84998891..93d24ada373 100644 --- a/code/addons/outline/package.json +++ b/code/addons/outline/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-outline", - "version": "7.4.1", + "version": "7.4.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 6a6abc8d94d..48d4bc86c5e 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.4.1", + "version": "7.4.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 c2ec8399e57..114e7e482ed 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.4.1", + "version": "7.4.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 70b6737bb50..0e8322f3181 100644 --- a/code/addons/storysource/package.json +++ b/code/addons/storysource/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-storysource", - "version": "7.4.1", + "version": "7.4.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 f080a9dae9c..0fdffc9c7b2 100644 --- a/code/addons/themes/package.json +++ b/code/addons/themes/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-themes", - "version": "7.4.1", + "version": "7.4.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 ce84af39a7f..ce9bd6aaad6 100644 --- a/code/addons/toolbars/package.json +++ b/code/addons/toolbars/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-toolbars", - "version": "7.4.1", + "version": "7.4.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 e259a9e6e9e..8b071abfacb 100644 --- a/code/addons/viewport/package.json +++ b/code/addons/viewport/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-viewport", - "version": "7.4.1", + "version": "7.4.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 c340deb1de7..8fcd2d2131a 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.4.1", + "version": "7.4.2", "description": "Storybook manager builder", "keywords": [ "storybook" diff --git a/code/builders/builder-vite/package.json b/code/builders/builder-vite/package.json index c4251ed4651..9c0ffbced83 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.4.1", + "version": "7.4.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 241102dde8a..4194864a878 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.4.1", + "version": "7.4.2", "description": "Storybook framework-agnostic API", "keywords": [ "storybook" diff --git a/code/deprecated/addons/package.json b/code/deprecated/addons/package.json index 33f88eb9d21..dc12048ade9 100644 --- a/code/deprecated/addons/package.json +++ b/code/deprecated/addons/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addons", - "version": "7.4.1", + "version": "7.4.2", "description": "Storybook addons store", "keywords": [ "storybook" diff --git a/code/deprecated/channel-postmessage/package.json b/code/deprecated/channel-postmessage/package.json index 2ef9a806f5f..121531feef4 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.4.1", + "version": "7.4.2", "description": "", "keywords": [ "storybook" diff --git a/code/deprecated/channel-websocket/package.json b/code/deprecated/channel-websocket/package.json index 079a6d11d6c..3b8ee3096dd 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.4.1", + "version": "7.4.2", "description": "", "keywords": [ "storybook" diff --git a/code/deprecated/client-api/package.json b/code/deprecated/client-api/package.json index ce575eef7ba..bb2a61865fe 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.4.1", + "version": "7.4.2", "description": "Storybook Client API", "keywords": [ "storybook" diff --git a/code/deprecated/core-client/package.json b/code/deprecated/core-client/package.json index 897893758d5..02de6da5b23 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.4.1", + "version": "7.4.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 5dfc8cac249..0ce674cb7cc 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.4.1", + "version": "7.4.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 c0024e30237..cab1445871d 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.4.1", + "version": "7.4.2", "description": "", "keywords": [ "storybook" diff --git a/code/deprecated/store/package.json b/code/deprecated/store/package.json index c13bc58348d..6dc8599a823 100644 --- a/code/deprecated/store/package.json +++ b/code/deprecated/store/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/store", - "version": "7.4.1", + "version": "7.4.2", "description": "", "keywords": [ "storybook" diff --git a/code/frameworks/angular/package.json b/code/frameworks/angular/package.json index 63dcb4ffa73..0ce5f46b8e5 100644 --- a/code/frameworks/angular/package.json +++ b/code/frameworks/angular/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/angular", - "version": "7.4.1", + "version": "7.4.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 847faf930a7..58d855118e7 100644 --- a/code/frameworks/ember/package.json +++ b/code/frameworks/ember/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/ember", - "version": "7.4.1", + "version": "7.4.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 bab1b857498..8993abf548e 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.4.1", + "version": "7.4.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 84654b896d1..8cc8102c0fa 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.4.1", + "version": "7.4.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 c59a7cc15a1..a058162dce3 100644 --- a/code/frameworks/nextjs/package.json +++ b/code/frameworks/nextjs/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/nextjs", - "version": "7.4.1", + "version": "7.4.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 6d29d88bb5e..d6e4f886de1 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.4.1", + "version": "7.4.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 42d120fbd43..1eb5afcd4bc 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.4.1", + "version": "7.4.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 a9868f1b65c..7208205f7d3 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.4.1", + "version": "7.4.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 57b57715da5..b1819dd3916 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.4.1", + "version": "7.4.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 1f394ef60a5..0e619c9dcc5 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.4.1", + "version": "7.4.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 bb5effb4cdc..c794c0067bd 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.4.1", + "version": "7.4.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 2b3e8bdbad9..d799c027b90 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.4.1", + "version": "7.4.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 c94791422b6..63df737cf6b 100644 --- a/code/frameworks/sveltekit/package.json +++ b/code/frameworks/sveltekit/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/sveltekit", - "version": "7.4.1", + "version": "7.4.2", "description": "Storybook for SvelteKit", "keywords": [ "storybook", diff --git a/code/frameworks/vue-vite/package.json b/code/frameworks/vue-vite/package.json index 02b2a784f55..60bb6a4a3cc 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.4.1", + "version": "7.4.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 ed3df7783b9..12857380fb2 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.4.1", + "version": "7.4.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 4a9a89917be..8c1ce2d0d05 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.4.1", + "version": "7.4.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 92f36642d53..85936b02864 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.4.1", + "version": "7.4.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 2c17aa3ba00..253d98c3908 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.4.1", + "version": "7.4.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 ea576b9c5d8..6b92d1388d4 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.4.1", + "version": "7.4.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 53b3288e66f..7ee15b9f9c5 100644 --- a/code/lib/channels/package.json +++ b/code/lib/channels/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/channels", - "version": "7.4.1", + "version": "7.4.2", "description": "", "keywords": [ "storybook" diff --git a/code/lib/cli-sb/package.json b/code/lib/cli-sb/package.json index 00b284153c7..e1e40405907 100644 --- a/code/lib/cli-sb/package.json +++ b/code/lib/cli-sb/package.json @@ -1,6 +1,6 @@ { "name": "sb", - "version": "7.4.1", + "version": "7.4.2", "description": "Storybook CLI", "keywords": [ "storybook" diff --git a/code/lib/cli-storybook/package.json b/code/lib/cli-storybook/package.json index 73adab8de9b..56f74c49fdb 100644 --- a/code/lib/cli-storybook/package.json +++ b/code/lib/cli-storybook/package.json @@ -1,6 +1,6 @@ { "name": "storybook", - "version": "7.4.1", + "version": "7.4.2", "description": "Storybook CLI", "keywords": [ "storybook" diff --git a/code/lib/cli/package.json b/code/lib/cli/package.json index 195f7884f0d..4dea220618c 100644 --- a/code/lib/cli/package.json +++ b/code/lib/cli/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/cli", - "version": "7.4.1", + "version": "7.4.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 127640bcb2a..bc572115334 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.4.1', - '@storybook/addon-actions': '7.4.1', - '@storybook/addon-backgrounds': '7.4.1', - '@storybook/addon-controls': '7.4.1', - '@storybook/addon-docs': '7.4.1', - '@storybook/addon-essentials': '7.4.1', - '@storybook/addon-highlight': '7.4.1', - '@storybook/addon-interactions': '7.4.1', - '@storybook/addon-jest': '7.4.1', - '@storybook/addon-links': '7.4.1', - '@storybook/addon-mdx-gfm': '7.4.1', - '@storybook/addon-measure': '7.4.1', - '@storybook/addon-outline': '7.4.1', - '@storybook/addon-themes': '7.4.1', - '@storybook/addon-storyshots': '7.4.1', - '@storybook/addon-storyshots-puppeteer': '7.4.1', - '@storybook/addon-storysource': '7.4.1', - '@storybook/addon-toolbars': '7.4.1', - '@storybook/addon-viewport': '7.4.1', - '@storybook/addons': '7.4.1', - '@storybook/angular': '7.4.1', - '@storybook/api': '7.4.1', - '@storybook/blocks': '7.4.1', - '@storybook/builder-manager': '7.4.1', - '@storybook/builder-vite': '7.4.1', - '@storybook/builder-webpack5': '7.4.1', - '@storybook/channel-postmessage': '7.4.1', - '@storybook/channel-websocket': '7.4.1', - '@storybook/channels': '7.4.1', - '@storybook/cli': '7.4.1', - '@storybook/client-api': '7.4.1', - '@storybook/client-logger': '7.4.1', - '@storybook/codemod': '7.4.1', - '@storybook/components': '7.4.1', - '@storybook/core-client': '7.4.1', - '@storybook/core-common': '7.4.1', - '@storybook/core-events': '7.4.1', - '@storybook/core-server': '7.4.1', - '@storybook/core-webpack': '7.4.1', - '@storybook/csf-plugin': '7.4.1', - '@storybook/csf-tools': '7.4.1', - '@storybook/docs-tools': '7.4.1', - '@storybook/ember': '7.4.1', - '@storybook/html': '7.4.1', - '@storybook/html-vite': '7.4.1', - '@storybook/html-webpack5': '7.4.1', - '@storybook/instrumenter': '7.4.1', - '@storybook/manager': '7.4.1', - '@storybook/manager-api': '7.4.1', - '@storybook/nextjs': '7.4.1', - '@storybook/node-logger': '7.4.1', - '@storybook/postinstall': '7.4.1', - '@storybook/preact': '7.4.1', - '@storybook/preact-vite': '7.4.1', - '@storybook/preact-webpack5': '7.4.1', - '@storybook/preset-create-react-app': '7.4.1', - '@storybook/preset-html-webpack': '7.4.1', - '@storybook/preset-preact-webpack': '7.4.1', - '@storybook/preset-react-webpack': '7.4.1', - '@storybook/preset-server-webpack': '7.4.1', - '@storybook/preset-svelte-webpack': '7.4.1', - '@storybook/preset-vue-webpack': '7.4.1', - '@storybook/preset-vue3-webpack': '7.4.1', - '@storybook/preset-web-components-webpack': '7.4.1', - '@storybook/preview': '7.4.1', - '@storybook/preview-api': '7.4.1', - '@storybook/preview-web': '7.4.1', - '@storybook/react': '7.4.1', - '@storybook/react-dom-shim': '7.4.1', - '@storybook/react-vite': '7.4.1', - '@storybook/react-webpack5': '7.4.1', - '@storybook/router': '7.4.1', - '@storybook/server': '7.4.1', - '@storybook/server-webpack5': '7.4.1', - '@storybook/source-loader': '7.4.1', - '@storybook/store': '7.4.1', - '@storybook/svelte': '7.4.1', - '@storybook/svelte-vite': '7.4.1', - '@storybook/svelte-webpack5': '7.4.1', - '@storybook/sveltekit': '7.4.1', - '@storybook/telemetry': '7.4.1', - '@storybook/theming': '7.4.1', - '@storybook/types': '7.4.1', - '@storybook/vue': '7.4.1', - '@storybook/vue-vite': '7.4.1', - '@storybook/vue-webpack5': '7.4.1', - '@storybook/vue3': '7.4.1', - '@storybook/vue3-vite': '7.4.1', - '@storybook/vue3-webpack5': '7.4.1', - '@storybook/web-components': '7.4.1', - '@storybook/web-components-vite': '7.4.1', - '@storybook/web-components-webpack5': '7.4.1', - sb: '7.4.1', - storybook: '7.4.1', + '@storybook/addon-a11y': '7.4.2', + '@storybook/addon-actions': '7.4.2', + '@storybook/addon-backgrounds': '7.4.2', + '@storybook/addon-controls': '7.4.2', + '@storybook/addon-docs': '7.4.2', + '@storybook/addon-essentials': '7.4.2', + '@storybook/addon-highlight': '7.4.2', + '@storybook/addon-interactions': '7.4.2', + '@storybook/addon-jest': '7.4.2', + '@storybook/addon-links': '7.4.2', + '@storybook/addon-mdx-gfm': '7.4.2', + '@storybook/addon-measure': '7.4.2', + '@storybook/addon-outline': '7.4.2', + '@storybook/addon-themes': '7.4.2', + '@storybook/addon-storyshots': '7.4.2', + '@storybook/addon-storyshots-puppeteer': '7.4.2', + '@storybook/addon-storysource': '7.4.2', + '@storybook/addon-toolbars': '7.4.2', + '@storybook/addon-viewport': '7.4.2', + '@storybook/addons': '7.4.2', + '@storybook/angular': '7.4.2', + '@storybook/api': '7.4.2', + '@storybook/blocks': '7.4.2', + '@storybook/builder-manager': '7.4.2', + '@storybook/builder-vite': '7.4.2', + '@storybook/builder-webpack5': '7.4.2', + '@storybook/channel-postmessage': '7.4.2', + '@storybook/channel-websocket': '7.4.2', + '@storybook/channels': '7.4.2', + '@storybook/cli': '7.4.2', + '@storybook/client-api': '7.4.2', + '@storybook/client-logger': '7.4.2', + '@storybook/codemod': '7.4.2', + '@storybook/components': '7.4.2', + '@storybook/core-client': '7.4.2', + '@storybook/core-common': '7.4.2', + '@storybook/core-events': '7.4.2', + '@storybook/core-server': '7.4.2', + '@storybook/core-webpack': '7.4.2', + '@storybook/csf-plugin': '7.4.2', + '@storybook/csf-tools': '7.4.2', + '@storybook/docs-tools': '7.4.2', + '@storybook/ember': '7.4.2', + '@storybook/html': '7.4.2', + '@storybook/html-vite': '7.4.2', + '@storybook/html-webpack5': '7.4.2', + '@storybook/instrumenter': '7.4.2', + '@storybook/manager': '7.4.2', + '@storybook/manager-api': '7.4.2', + '@storybook/nextjs': '7.4.2', + '@storybook/node-logger': '7.4.2', + '@storybook/postinstall': '7.4.2', + '@storybook/preact': '7.4.2', + '@storybook/preact-vite': '7.4.2', + '@storybook/preact-webpack5': '7.4.2', + '@storybook/preset-create-react-app': '7.4.2', + '@storybook/preset-html-webpack': '7.4.2', + '@storybook/preset-preact-webpack': '7.4.2', + '@storybook/preset-react-webpack': '7.4.2', + '@storybook/preset-server-webpack': '7.4.2', + '@storybook/preset-svelte-webpack': '7.4.2', + '@storybook/preset-vue-webpack': '7.4.2', + '@storybook/preset-vue3-webpack': '7.4.2', + '@storybook/preset-web-components-webpack': '7.4.2', + '@storybook/preview': '7.4.2', + '@storybook/preview-api': '7.4.2', + '@storybook/preview-web': '7.4.2', + '@storybook/react': '7.4.2', + '@storybook/react-dom-shim': '7.4.2', + '@storybook/react-vite': '7.4.2', + '@storybook/react-webpack5': '7.4.2', + '@storybook/router': '7.4.2', + '@storybook/server': '7.4.2', + '@storybook/server-webpack5': '7.4.2', + '@storybook/source-loader': '7.4.2', + '@storybook/store': '7.4.2', + '@storybook/svelte': '7.4.2', + '@storybook/svelte-vite': '7.4.2', + '@storybook/svelte-webpack5': '7.4.2', + '@storybook/sveltekit': '7.4.2', + '@storybook/telemetry': '7.4.2', + '@storybook/theming': '7.4.2', + '@storybook/types': '7.4.2', + '@storybook/vue': '7.4.2', + '@storybook/vue-vite': '7.4.2', + '@storybook/vue-webpack5': '7.4.2', + '@storybook/vue3': '7.4.2', + '@storybook/vue3-vite': '7.4.2', + '@storybook/vue3-webpack5': '7.4.2', + '@storybook/web-components': '7.4.2', + '@storybook/web-components-vite': '7.4.2', + '@storybook/web-components-webpack5': '7.4.2', + sb: '7.4.2', + storybook: '7.4.2', }; diff --git a/code/lib/client-logger/package.json b/code/lib/client-logger/package.json index 7c283ccd461..befad080f13 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.4.1", + "version": "7.4.2", "description": "", "keywords": [ "storybook" diff --git a/code/lib/codemod/package.json b/code/lib/codemod/package.json index effd68e64a5..35566126b45 100644 --- a/code/lib/codemod/package.json +++ b/code/lib/codemod/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/codemod", - "version": "7.4.1", + "version": "7.4.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 8f6d879bb69..18215bc9335 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.4.1", + "version": "7.4.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 18f18ed31d9..eb4a573d771 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.4.1", + "version": "7.4.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 69afabf104b..226531c18b0 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.4.1", + "version": "7.4.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 a7b4ff002ea..ba9b4802c90 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.4.1", + "version": "7.4.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 79899c9f554..be24391d12b 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.4.1", + "version": "7.4.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 02b98e08870..9e0adf26c6f 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.4.1", + "version": "7.4.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 a50c2a5b837..4381c8c7151 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.4.1", + "version": "7.4.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 66efd926352..3ef0055183e 100644 --- a/code/lib/instrumenter/package.json +++ b/code/lib/instrumenter/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/instrumenter", - "version": "7.4.1", + "version": "7.4.2", "description": "", "keywords": [ "storybook" diff --git a/code/lib/manager-api/package.json b/code/lib/manager-api/package.json index 20ba215a29d..163125b5664 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.4.1", + "version": "7.4.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 1bc82ee5bb7..bdb919dc910 100644 --- a/code/lib/manager-api/src/version.ts +++ b/code/lib/manager-api/src/version.ts @@ -1 +1 @@ -export const version = '7.4.1'; +export const version = '7.4.2'; diff --git a/code/lib/node-logger/package.json b/code/lib/node-logger/package.json index 31c4fdbbe56..7a12c2e3f3b 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.4.1", + "version": "7.4.2", "description": "", "keywords": [ "storybook" diff --git a/code/lib/postinstall/package.json b/code/lib/postinstall/package.json index 48d298d3b6c..df069b17340 100644 --- a/code/lib/postinstall/package.json +++ b/code/lib/postinstall/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/postinstall", - "version": "7.4.1", + "version": "7.4.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 4c91561ae4d..aa8fc2dc121 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.4.1", + "version": "7.4.2", "description": "", "keywords": [ "storybook" diff --git a/code/lib/preview/package.json b/code/lib/preview/package.json index 6ce55aa6eff..2218d2aa6e8 100644 --- a/code/lib/preview/package.json +++ b/code/lib/preview/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preview", - "version": "7.4.1", + "version": "7.4.2", "description": "", "keywords": [ "storybook" diff --git a/code/lib/react-dom-shim/package.json b/code/lib/react-dom-shim/package.json index 3934734b0a9..081b0d14d80 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.4.1", + "version": "7.4.2", "description": "", "keywords": [ "storybook" diff --git a/code/lib/router/package.json b/code/lib/router/package.json index 12034bcfcdb..65055c805d1 100644 --- a/code/lib/router/package.json +++ b/code/lib/router/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/router", - "version": "7.4.1", + "version": "7.4.2", "description": "Core Storybook Router", "keywords": [ "storybook" diff --git a/code/lib/source-loader/package.json b/code/lib/source-loader/package.json index 653609f6a10..7fb0f6efad2 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.4.1", + "version": "7.4.2", "description": "Source loader", "keywords": [ "lib", diff --git a/code/lib/telemetry/package.json b/code/lib/telemetry/package.json index 69a9fc513b5..9a4f5678c38 100644 --- a/code/lib/telemetry/package.json +++ b/code/lib/telemetry/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/telemetry", - "version": "7.4.1", + "version": "7.4.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 86343d73bb5..c8cc3b921d4 100644 --- a/code/lib/theming/package.json +++ b/code/lib/theming/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/theming", - "version": "7.4.1", + "version": "7.4.2", "description": "Core Storybook Components", "keywords": [ "storybook" diff --git a/code/lib/types/package.json b/code/lib/types/package.json index 4255183119f..adae50d2d14 100644 --- a/code/lib/types/package.json +++ b/code/lib/types/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/types", - "version": "7.4.1", + "version": "7.4.2", "description": "Core Storybook TS Types", "keywords": [ "storybook" diff --git a/code/package.json b/code/package.json index ec2d374e76f..0ee798ad338 100644 --- a/code/package.json +++ b/code/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/root", - "version": "7.4.1", + "version": "7.4.2", "private": true, "description": "Storybook root", "homepage": "https://storybook.js.org/", @@ -327,6 +327,5 @@ "Dependency Upgrades" ] ] - }, - "deferredNextVersion": "7.4.2" + } } diff --git a/code/presets/create-react-app/package.json b/code/presets/create-react-app/package.json index a16c8a9afc6..845d1915824 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.4.1", + "version": "7.4.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 7791f05bf27..69f9e6339e3 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.4.1", + "version": "7.4.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 4a6eda67060..c6577abfd8a 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.4.1", + "version": "7.4.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 514fe74bdbc..658badbdd25 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.4.1", + "version": "7.4.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 eda08fce0f2..8d18b795ad2 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.4.1", + "version": "7.4.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 3f25985071b..a6c36a2405f 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.4.1", + "version": "7.4.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 fa964f455e9..14b50ab8258 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.4.1", + "version": "7.4.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 1940e2e95e8..2a19f4698c9 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.4.1", + "version": "7.4.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 b806cda6612..a3a2d7be554 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.4.1", + "version": "7.4.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 fa37fd2cc1c..24343f7e200 100644 --- a/code/renderers/html/package.json +++ b/code/renderers/html/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/html", - "version": "7.4.1", + "version": "7.4.2", "description": "Storybook HTML renderer", "keywords": [ "storybook" diff --git a/code/renderers/preact/package.json b/code/renderers/preact/package.json index 5422c21e6e1..15c00704506 100644 --- a/code/renderers/preact/package.json +++ b/code/renderers/preact/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preact", - "version": "7.4.1", + "version": "7.4.2", "description": "Storybook Preact renderer", "keywords": [ "storybook" diff --git a/code/renderers/react/package.json b/code/renderers/react/package.json index e56a93299f9..0293cc51d48 100644 --- a/code/renderers/react/package.json +++ b/code/renderers/react/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/react", - "version": "7.4.1", + "version": "7.4.2", "description": "Storybook React renderer", "keywords": [ "storybook" diff --git a/code/renderers/server/package.json b/code/renderers/server/package.json index 47f438c9d5f..65810e56ec2 100644 --- a/code/renderers/server/package.json +++ b/code/renderers/server/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/server", - "version": "7.4.1", + "version": "7.4.2", "description": "Storybook Server renderer", "keywords": [ "storybook" diff --git a/code/renderers/svelte/package.json b/code/renderers/svelte/package.json index f34c6d9775f..6e532c41d43 100644 --- a/code/renderers/svelte/package.json +++ b/code/renderers/svelte/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/svelte", - "version": "7.4.1", + "version": "7.4.2", "description": "Storybook Svelte renderer", "keywords": [ "storybook" diff --git a/code/renderers/vue/package.json b/code/renderers/vue/package.json index dd71de1ae60..dd8a089974a 100644 --- a/code/renderers/vue/package.json +++ b/code/renderers/vue/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/vue", - "version": "7.4.1", + "version": "7.4.2", "description": "Storybook Vue renderer", "keywords": [ "storybook" diff --git a/code/renderers/vue3/package.json b/code/renderers/vue3/package.json index 67723b9ee7a..49bc462405f 100644 --- a/code/renderers/vue3/package.json +++ b/code/renderers/vue3/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/vue3", - "version": "7.4.1", + "version": "7.4.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 56687684124..20d5cbd13c9 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.4.1", + "version": "7.4.2", "description": "Storybook web-components renderer", "keywords": [ "lit", diff --git a/code/ui/blocks/package.json b/code/ui/blocks/package.json index c3917fa21b6..29a4dd24281 100644 --- a/code/ui/blocks/package.json +++ b/code/ui/blocks/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/blocks", - "version": "7.4.1", + "version": "7.4.2", "description": "Storybook Doc Blocks", "keywords": [ "storybook" diff --git a/code/ui/components/package.json b/code/ui/components/package.json index 7ba3b143149..08e00b47b18 100644 --- a/code/ui/components/package.json +++ b/code/ui/components/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/components", - "version": "7.4.1", + "version": "7.4.2", "description": "Core Storybook Components", "keywords": [ "storybook" diff --git a/code/ui/manager/package.json b/code/ui/manager/package.json index 8be381b6281..69ebd9ddb91 100644 --- a/code/ui/manager/package.json +++ b/code/ui/manager/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/manager", - "version": "7.4.1", + "version": "7.4.2", "description": "Core Storybook UI", "keywords": [ "storybook" From 984d1566585fea6a859e712d8266d18baa81f22c Mon Sep 17 00:00:00 2001 From: Jason McKenzie Date: Fri, 15 Sep 2023 22:04:37 +1000 Subject: [PATCH 053/249] Use URL to fix next image loader src params --- .../src/images/next-image-default-loader.tsx | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/code/frameworks/nextjs/src/images/next-image-default-loader.tsx b/code/frameworks/nextjs/src/images/next-image-default-loader.tsx index 1d137fdf95f..8851c279f07 100644 --- a/code/frameworks/nextjs/src/images/next-image-default-loader.tsx +++ b/code/frameworks/nextjs/src/images/next-image-default-loader.tsx @@ -1,6 +1,6 @@ import type * as _NextImage from 'next/image'; -export const defaultLoader = ({ src, width, quality }: _NextImage.ImageLoaderProps) => { +export const defaultLoader = ({ src, width, quality = 75 }: _NextImage.ImageLoaderProps) => { const missingValues = []; if (!src) { missingValues.push('src'); @@ -24,17 +24,16 @@ export const defaultLoader = ({ src, width, quality }: _NextImage.ImageLoaderPro ); } - const [baseUrlAndSearch, hash = ''] = src.split('#'); - const [baseUrl, search = ''] = baseUrlAndSearch.split('?'); + const url = new URL(src, window.location.href); - const params = new URLSearchParams(search); - - if (!params.has('w') && !params.has('q')) { - params.set('w', width.toString()); - params.set('q', (quality ?? 75).toString()); + if (!url.searchParams.has('w') && !url.searchParams.has('q')) { + url.searchParams.set('w', width.toString()); + url.searchParams.set('q', (quality ?? 75).toString()); } - const prefixedHash = hash ? `#${hash}` : ''; + if (!src.startsWith('http://') && !src.startsWith('https://')) { + return url.toString().slice(url.origin.length); + } - return `${baseUrl}?${params.toString()}${prefixedHash}`; + return url.toString(); }; From c4ba76077be80a120b813cbad1de384f3eacca23 Mon Sep 17 00:00:00 2001 From: Jason McKenzie Date: Fri, 15 Sep 2023 22:14:51 +1000 Subject: [PATCH 054/249] Remove double default in next image default loader --- code/frameworks/nextjs/src/images/next-image-default-loader.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/frameworks/nextjs/src/images/next-image-default-loader.tsx b/code/frameworks/nextjs/src/images/next-image-default-loader.tsx index 8851c279f07..c7050914371 100644 --- a/code/frameworks/nextjs/src/images/next-image-default-loader.tsx +++ b/code/frameworks/nextjs/src/images/next-image-default-loader.tsx @@ -28,7 +28,7 @@ export const defaultLoader = ({ src, width, quality = 75 }: _NextImage.ImageLoad if (!url.searchParams.has('w') && !url.searchParams.has('q')) { url.searchParams.set('w', width.toString()); - url.searchParams.set('q', (quality ?? 75).toString()); + url.searchParams.set('q', quality.toString()); } if (!src.startsWith('http://') && !src.startsWith('https://')) { From d3b51fa4efd468c995bfa6d56f16d6f824f6c97f Mon Sep 17 00:00:00 2001 From: j3rem1e Date: Sun, 17 Sep 2023 20:42:01 +0200 Subject: [PATCH 055/249] Remove the possibility to configure doc preprocessors --- code/frameworks/svelte-vite/src/plugins/svelte-docgen.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/code/frameworks/svelte-vite/src/plugins/svelte-docgen.ts b/code/frameworks/svelte-vite/src/plugins/svelte-docgen.ts index 5dfe00afd76..2c2bccfc3a8 100644 --- a/code/frameworks/svelte-vite/src/plugins/svelte-docgen.ts +++ b/code/frameworks/svelte-vite/src/plugins/svelte-docgen.ts @@ -61,18 +61,17 @@ function getNameFromFilename(filename: string) { export function svelteDocgen(svelteOptions: Record = {}): PluginOption { const cwd = process.cwd(); - const { preprocess: preprocessOptions, docPreprocess, logDocgen = false } = svelteOptions; + const { preprocess: preprocessOptions, logDocgen = false } = svelteOptions; const include = /\.(svelte)$/; const filter = createFilter(include); - let docPreprocessOptions = docPreprocess; - if (!docPreprocessOptions && preprocessOptions) { + let docPreprocessOptions: any = null; + if (preprocessOptions) { /* * We can't use vitePreprocess() for the documentation. * This preprocessor uses esbuild which removes jsdoc. * * By default, only typescript is transpiled, and style tags are removed. - * This can be configured with the `docPreprocess` options. * * Note: theses preprocessors are only used to make the component * compatible to sveltedoc-parser (no ts), not to compile From 70d43ab43aa7aae7125c7b54ed855f638b37eea8 Mon Sep 17 00:00:00 2001 From: j3rem1e Date: Mon, 18 Sep 2023 20:40:54 +0200 Subject: [PATCH 056/249] Ignore type checking of globalThis --- code/renderers/svelte/template/stories/views/ButtonView.svelte | 1 + 1 file changed, 1 insertion(+) diff --git a/code/renderers/svelte/template/stories/views/ButtonView.svelte b/code/renderers/svelte/template/stories/views/ButtonView.svelte index 900949a1b8c..d4bccf14900 100644 --- a/code/renderers/svelte/template/stories/views/ButtonView.svelte +++ b/code/renderers/svelte/template/stories/views/ButtonView.svelte @@ -4,6 +4,7 @@ * @wrapper */ import { global as globalThis } from '@storybook/global'; + // @ts-ignore const Button = globalThis.Components?.Button; /** From 1bfdfb16b657bf2b36e563bd83d5144425f906d0 Mon Sep 17 00:00:00 2001 From: Nate Houk Date: Wed, 20 Sep 2023 06:47:39 +0200 Subject: [PATCH 057/249] Update chromatic-github-action.js.mdx --- docs/snippets/common/chromatic-github-action.js.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/snippets/common/chromatic-github-action.js.mdx b/docs/snippets/common/chromatic-github-action.js.mdx index 8e796479564..17ba831a0cc 100644 --- a/docs/snippets/common/chromatic-github-action.js.mdx +++ b/docs/snippets/common/chromatic-github-action.js.mdx @@ -19,8 +19,8 @@ jobs: fetch-depth: 0 - uses: actions/setup-node@v3 with: - node-version: 20 - cache: 'npm' + node-version: 18 + cache: 'yarn' - run: npm ci #👇 Adds Chromatic as a step in the workflow - uses: chromaui/action@v1 From b3674b8c0382af83015724cedf1c86dd6b277314 Mon Sep 17 00:00:00 2001 From: Nate Houk Date: Wed, 20 Sep 2023 06:50:40 +0200 Subject: [PATCH 058/249] Update chromatic-github-action.js.mdx --- docs/snippets/common/chromatic-github-action.js.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/snippets/common/chromatic-github-action.js.mdx b/docs/snippets/common/chromatic-github-action.js.mdx index 17ba831a0cc..ed13fa937ac 100644 --- a/docs/snippets/common/chromatic-github-action.js.mdx +++ b/docs/snippets/common/chromatic-github-action.js.mdx @@ -21,7 +21,7 @@ jobs: with: node-version: 18 cache: 'yarn' - - run: npm ci + - run: yarn ci #👇 Adds Chromatic as a step in the workflow - uses: chromaui/action@v1 # Options required for Chromatic's GitHub Action From bf63829a5e374a0b734a50d5e13035676685df78 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Mon, 18 Sep 2023 12:46:49 +0200 Subject: [PATCH 059/249] Merge pull request #24206 from storybookjs/norbert/improve-type-of-statusupdate Types: Allow `null` in value of `experimental_updateStatus` to clear status (cherry picked from commit 2bf4dc506aa3cefce0cbdde3e8306125297ae700) --- code/lib/types/src/modules/api-stories.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/lib/types/src/modules/api-stories.ts b/code/lib/types/src/modules/api-stories.ts index 45acc19e35c..b6c150242a2 100644 --- a/code/lib/types/src/modules/api-stories.ts +++ b/code/lib/types/src/modules/api-stories.ts @@ -183,7 +183,7 @@ export interface API_StatusObject { } export type API_StatusState = Record>; -export type API_StatusUpdate = Record; +export type API_StatusUpdate = Record; export type API_FilterFunction = ( item: API_PreparedIndexEntry & { status: Record } From b38266079f3fe36063607e7a12fb4e645d94e13c Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 19 Sep 2023 08:36:18 +0200 Subject: [PATCH 060/249] Merge pull request #24208 from storybookjs/norbert/filter-angular-prerelease Build: Filter `angular-cli/prerelease` in sandbox generation (cherry picked from commit f49c9a24128110d9df272a153901e72564dbec75) --- .github/workflows/generate-sandboxes-main.yml | 2 +- .github/workflows/generate-sandboxes-next.yml | 2 +- code/lib/cli/src/sandbox-templates.ts | 5 ++-- scripts/sandbox/generate.ts | 28 +++++++++++++------ scripts/tasks/generate.ts | 3 +- 5 files changed, 26 insertions(+), 14 deletions(-) diff --git a/.github/workflows/generate-sandboxes-main.yml b/.github/workflows/generate-sandboxes-main.yml index 66cd1b800d3..47454249584 100644 --- a/.github/workflows/generate-sandboxes-main.yml +++ b/.github/workflows/generate-sandboxes-main.yml @@ -43,7 +43,7 @@ jobs: run: yarn wait-on http://localhost:6001 working-directory: ./code - name: Generate - run: yarn generate-sandboxes --local-registry + run: yarn generate-sandboxes --local-registry --exclude=angular-cli/prerelease working-directory: ./code - name: Publish run: yarn publish-sandboxes --remote=https://storybook-bot:${{ secrets.PAT_STORYBOOK_BOT}}@github.com/storybookjs/sandboxes.git --push --branch=main diff --git a/.github/workflows/generate-sandboxes-next.yml b/.github/workflows/generate-sandboxes-next.yml index f22e7cb4a50..f6ab2f7c822 100644 --- a/.github/workflows/generate-sandboxes-next.yml +++ b/.github/workflows/generate-sandboxes-next.yml @@ -43,7 +43,7 @@ jobs: run: yarn wait-on http://localhost:6001 working-directory: ./code - name: Generate - run: yarn generate-sandboxes --local-registry + run: yarn generate-sandboxes --local-registry --exclude=angular-cli/prerelease working-directory: ./code - name: Publish run: yarn publish-sandboxes --remote=https://storybook-bot:${{ secrets.PAT_STORYBOOK_BOT}}@github.com/storybookjs/sandboxes.git --push --branch=next diff --git a/code/lib/cli/src/sandbox-templates.ts b/code/lib/cli/src/sandbox-templates.ts index 7fb52574ea3..b2c4e3b6b17 100644 --- a/code/lib/cli/src/sandbox-templates.ts +++ b/code/lib/cli/src/sandbox-templates.ts @@ -285,7 +285,7 @@ const baseTemplates = { builder: '@storybook/builder-webpack5', }, skipTasks: ['e2e-tests-dev', 'bench'], - // TODO: Can be enabled once we re-revert this PR: https://github.com/storybookjs/storybook/pull/24033 + // TODO: Should be removed after we merge this PR: https://github.com/storybookjs/storybook/pull/24188 inDevelopment: true, }, 'angular-cli/default-ts': { @@ -575,7 +575,8 @@ export const merged: TemplateKey[] = [ ]; export const daily: TemplateKey[] = [ ...merged, - 'angular-cli/prerelease', + // TODO: Should be re-added after we merge this PR: https://github.com/storybookjs/storybook/pull/24188 + // 'angular-cli/prerelease', 'cra/default-js', 'react-vite/default-js', 'vue3-vite/default-js', diff --git a/scripts/sandbox/generate.ts b/scripts/sandbox/generate.ts index b74ae5a28d0..0e477b1a622 100755 --- a/scripts/sandbox/generate.ts +++ b/scripts/sandbox/generate.ts @@ -202,11 +202,16 @@ const runGenerators = async ( }; export const options = createOptions({ - template: { - type: 'string', - description: 'Which template would you like to create?', + templates: { + type: 'string[]', + description: 'Which templates would you like to create?', values: Object.keys(sandboxTemplates), }, + exclude: { + type: 'string[]', + description: 'Space-delimited list of templates to exclude. Takes precedence over --templates', + promptType: false, + }, localRegistry: { type: 'boolean', description: 'Generate reproduction from local registry?', @@ -220,7 +225,8 @@ export const options = createOptions({ }); export const generate = async ({ - template, + templates, + exclude, localRegistry, debug, }: OptionValues) => { @@ -230,11 +236,11 @@ export const generate = async ({ ...configuration, })) .filter(({ dirName }) => { - if (template) { - return dirName === template; + let include = Array.isArray(templates) ? templates.includes(dirName) : true; + if (Array.isArray(exclude) && include) { + include = !exclude.includes(dirName); } - - return true; + return include; }); await runGenerators(generatorConfigs, localRegistry, debug); @@ -243,7 +249,11 @@ export const generate = async ({ if (require.main === module) { program .description('Generate sandboxes from a set of possible templates') - .option('--template