Skip to content

Commit

Permalink
Merge branch 'next' into addon-docs-without-react
Browse files Browse the repository at this point in the history
  • Loading branch information
JReinhold authored Dec 18, 2023
2 parents 28051ed + 152edae commit 2db44d7
Show file tree
Hide file tree
Showing 14 changed files with 54 additions and 2,246 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 7.6.5

- Angular: Update Angular cli templates - [#25152](https://github.com/storybookjs/storybook/pull/25152), thanks [@Marklb](https://github.com/Marklb)!
- Blocks: Fix Subtitle block for unattached docs pages - [#25157](https://github.com/storybookjs/storybook/pull/25157), thanks [@kripod](https://github.com/kripod)!
- SvelteKit: Fix missing `$app` modules - [#25132](https://github.com/storybookjs/storybook/pull/25132), thanks [@paoloricciuti](https://github.com/paoloricciuti)!

## 7.6.4

- Angular: Fix CSF Plugin - [#25098](https://github.com/storybookjs/storybook/pull/25098), thanks [@valentinpalkovic](https://github.com/valentinpalkovic)!
Expand Down
7 changes: 7 additions & 0 deletions MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
- [Icons is deprecated](#icons-is-deprecated)
- [React-docgen component analysis by default](#react-docgen-component-analysis-by-default)
- [Removed postinstall](#removed-postinstall)
- [Removed stories.json](#removed-storiesjson)
- [Framework-specific changes](#framework-specific-changes)
- [Angular: Drop support for Angular \< 15](#angular-drop-support-for-angular--15)
- [Next.js: Drop support for version \< 13.5](#nextjs-drop-support-for-version--135)
Expand Down Expand Up @@ -473,6 +474,12 @@ For more information see: https://storybook.js.org/docs/react/api/main-config-ty

We removed the `@storybook/postinstall` package, which provided some utilities for addons to programmatically modify user configuration files on install. This package was years out of date, so this should be a non-disruptive change. If your addon used the package, you can view the old source code [here](https://github.com/storybookjs/storybook/tree/release-7-5/code/lib/postinstall) and adapt it into your addon.

#### Removed stories.json

In addition to the built storybook, `storybook build` generates two files, `index.json` and `stories.json`, that list out the contents of the Storybook. `stories.json` is a legacy format and we included it for backwards compatibility. As of 8.0 we no longer build `stories.json` by default, and we will remove it completely in 9.0.

In the meantime if you have code that relies on `stories.json`, you can find code that transforms the "v4" `index.json` to the "v3" `stories.json` format (and their respective TS types): https://github.com/storybookjs/storybook/blob/release-7-5/code/lib/core-server/src/utils/stories-json.ts#L71-L91

### Framework-specific changes

#### Angular: Drop support for Angular \< 15
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<script>
import { browser, dev, building, version } from '$app/environment';
import { browser, dev, building, version } from '$app/environment';
</script>

<div data-testid="browser">{browser}</div>
<div data-testid="dev">{dev}</div>
<div data-testid="building">{building}</div>
<div data-testid="version">{version}</div>
<div data-testid="version" data-chromatic="ignore">{version}</div>
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<script>
import { browser, dev, building, version } from '$app/environment';
import { browser, dev, building, version } from '$app/environment';
</script>

<div data-testid="browser">{browser}</div>
<div data-testid="dev">{dev}</div>
<div data-testid="building">{building}</div>
<div data-testid="version">{version}</div>
<div data-testid="version" data-chromatic="ignore">{version}</div>
10 changes: 1 addition & 9 deletions code/lib/core-server/src/build-static.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {
copyAllStaticFilesRelativeToMain,
} from './utils/copy-all-static-files';
import { getBuilders } from './utils/get-builders';
import { convertToIndexV3, extractStoriesJson } from './utils/stories-json';
import { extractStoriesJson } from './utils/stories-json';
import { extractStorybookMetadata } from './utils/metadata';
import { StoryIndexGenerator } from './utils/StoryIndexGenerator';
import { summarizeIndex } from './utils/summarizeIndex';
Expand Down Expand Up @@ -172,19 +172,11 @@ export async function buildStaticStandalone(options: BuildStaticStandaloneOption
storyIndexers: deprecatedStoryIndexers,
indexers,
docs: docsOptions,
storiesV2Compatibility: !features?.storyStoreV7,
storyStoreV7: !!features?.storyStoreV7,
build,
});

initializedStoryIndexGenerator = generator.initialize().then(() => generator);
effects.push(
extractStoriesJson(
join(options.outputDir, 'stories.json'),
initializedStoryIndexGenerator as Promise<StoryIndexGenerator>,
convertToIndexV3
)
);
effects.push(
extractStoriesJson(
join(options.outputDir, 'index.json'),
Expand Down
Loading

0 comments on commit 2db44d7

Please sign in to comment.