Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Release: Prerelease 8.1.0-alpha.2 #26443

Merged
merged 82 commits into from Mar 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
f1a7509
move chromatic to script directory
ndelangen Feb 28, 2024
bbd2908
Merge branch 'next' into norbert/upgrade-chromatic
ndelangen Feb 28, 2024
8cfa773
add package for `code/ui/.storybook/preview.tsx`
ndelangen Feb 28, 2024
3823695
set `--storybook-config-dir` to root
ndelangen Feb 28, 2024
1b73ae2
Update vite plugin
ethriel3695 Feb 28, 2024
2174004
remove unused dependency
ndelangen Feb 28, 2024
cf5e82b
Update chromatic script because we cd
ethriel3695 Feb 28, 2024
fb35508
Fix search result color easier to read
winchesHe Mar 2, 2024
25b7a62
Merge branch 'next' into norbert/upgrade-chromatic
ndelangen Mar 4, 2024
0afea01
remove chromatic as dependency in code
ndelangen Mar 4, 2024
5586855
make it argument optional
ndelangen Mar 4, 2024
eea1baf
Merge branch 'norbert/upgrade-chromatic' of https://github.com/storyb…
ndelangen Mar 4, 2024
52314a7
Merge branch 'next' into norbert/upgrade-chromatic
ndelangen Mar 5, 2024
f52e691
make setProjectAnnotations accept multiple types of imports
yannbf Mar 5, 2024
d1d6100
Fix #25819: Number controls do not reset
jiyiru Mar 6, 2024
6442cfd
Merge branch 'storybookjs:next' into my-first-storybook-contribution
jiyiru Mar 7, 2024
0a0ad92
Update vite-config-file.ts
joevaugh4n Mar 7, 2024
d8ffec0
Merge branch 'next' into fix-recently-search
winchesHe Mar 9, 2024
8751d84
WIP: Add docs get started index
kylegach Mar 11, 2024
ac63ab2
only setState when the notification was found
ndelangen Mar 11, 2024
3302212
Merge branch 'next' into norbert/upgrade-chromatic
ndelangen Mar 11, 2024
c9a7555
Discard changes to code/frameworks/react-webpack5/README.md
ndelangen Mar 11, 2024
d95716f
Discard changes to code/frameworks/react-vite/README.md
ndelangen Mar 11, 2024
7112293
Merge branch 'next' into joevaugh4n-patch-3
ndelangen Mar 11, 2024
204626e
Merge branch 'next' into fix-recently-search
ndelangen Mar 11, 2024
f97d202
Merge branch 'next' into fix-recently-search
ndelangen Mar 12, 2024
2b969e5
Merge branch 'next' into joevaugh4n-patch-3
ndelangen Mar 12, 2024
56ead87
Merge branch 'next' into norbert/upgrade-chromatic
ndelangen Mar 12, 2024
a8fa52c
fix
ndelangen Mar 12, 2024
0402f64
Merge pull request #26415 from storybookjs/norbert/optimize-clear-not…
kasperpeulen Mar 12, 2024
f6c14d0
Merge pull request #26375 from storybookjs/joevaugh4n-patch-3
ndelangen Mar 12, 2024
171374c
Merge pull request #26287 from winchesHe/fix-recently-search
ndelangen Mar 12, 2024
99969fb
Merge branch 'next' into pr/jiyiru/26372
ndelangen Mar 12, 2024
917da2a
Docs: Storybook 8 image updates
jonniebigodes Mar 12, 2024
57361ec
Merge branch 'next' into docs_asset_updates
jonniebigodes Mar 12, 2024
2c00719
Merge pull request #26372 from jiyiru/my-first-storybook-contribution
ndelangen Mar 12, 2024
219c07f
Merge branch 'next' into docs_asset_updates
jonniebigodes Mar 12, 2024
49593b5
Merge pull request #26449 from storybookjs/docs_asset_updates
jonniebigodes Mar 12, 2024
a144db7
Adding icons
cdedreuille Mar 12, 2024
0de51cb
Update index.md
cdedreuille Mar 12, 2024
302aae1
Content updates
kylegach Mar 12, 2024
5b57fe2
Merge branch 'next' into kylegach/sbdx-167-build-out-docs-homepage
kylegach Mar 12, 2024
9563ed6
Update blocks layouts
cdedreuille Mar 13, 2024
55761f8
Add key property to list children in Highlight component
valentinpalkovic Mar 13, 2024
be079d3
Merge pull request #26471 from storybookjs/valentin/fix-missing-key-f…
valentinpalkovic Mar 13, 2024
205970f
Merge pull request #26233 from storybookjs/norbert/upgrade-chromatic
ndelangen Mar 13, 2024
318a6f0
upgrade to latest version of VTA in monorepo
ndelangen Mar 13, 2024
47c1c05
fix config issue
ndelangen Mar 13, 2024
953733b
Merge branch 'next' into norbert/upgrade-VTA
ndelangen Mar 13, 2024
a33bd45
Add zip option to chromatic.config.json
ndelangen Mar 13, 2024
cfb2fbe
Merge pull request #26476 from storybookjs/norbert/upgrade-VTA
ndelangen Mar 13, 2024
eea733e
Merge branch 'next' into feature/portable-stories-annotations-improve…
yannbf Mar 13, 2024
d1b2ea9
address review comments
yannbf Mar 13, 2024
9affb10
Move icons out of content
kylegach Mar 13, 2024
d534eaa
Prose improvements
kylegach Mar 13, 2024
64802b9
Merge branch 'next' into kylegach/sbdx-167-build-out-docs-homepage
kylegach Mar 13, 2024
fe254cf
Merge pull request #26401 from storybookjs/kylegach/sbdx-167-build-ou…
kylegach Mar 13, 2024
270d047
Fix broken links
kylegach Mar 13, 2024
b95582a
Merge pull request #26486 from storybookjs/fix-get-started
kylegach Mar 13, 2024
136005b
Fix broken links
kylegach Mar 13, 2024
8dbff49
Merge pull request #26489 from storybookjs/fix-get-started-2
kylegach Mar 13, 2024
40f7bdc
Merge branch 'next' into feature/portable-stories-annotations-improve…
yannbf Mar 14, 2024
8edd503
fix type issue
yannbf Mar 14, 2024
84b39c0
Merge pull request #26316 from storybookjs/feature/portable-stories-a…
yannbf Mar 14, 2024
1efcba5
check the real installed version to compare
ndelangen Mar 14, 2024
a9c158b
Remove unused arg from initiate and sandbox functions
valentinpalkovic Mar 14, 2024
979ca69
fix tests
yannbf Mar 14, 2024
dcc314c
move getInstalledVersion utility to package manager abstraction
yannbf Mar 14, 2024
71ba298
Merge pull request #26498 from storybookjs/valentin/remove-unused-var…
valentinpalkovic Mar 14, 2024
164ea49
Update code/lib/core-common/src/js-package-manager/JsPackageManager.ts
yannbf Mar 15, 2024
96d9c08
update bug report template
vanessayuenn Mar 15, 2024
704f964
Merge pull request #26497 from storybookjs/norbert/improve-automigrat…
ndelangen Mar 15, 2024
00d9b82
Wordsmith the descriptions some more
vanessayuenn Mar 15, 2024
3a91209
Merge pull request #26512 from storybookjs/vanessayuenn-patch-1
vanessayuenn Mar 15, 2024
a81b405
refactor(addons/actions): resolve ts-expect-error
Mar 15, 2024
cabfab8
refactor(addons/links): resolve ts-expect-error
Mar 15, 2024
f9979b3
refactor(core): resolve ts-expect-error in js package manager
Mar 15, 2024
db4867c
refactor(preview/web): resolve ts-expect-error
Mar 16, 2024
5dc3d92
refactor(test): resolve ts-expect-error
Mar 16, 2024
f6688d5
Fix type errors
valentinpalkovic Mar 16, 2024
a105385
Merge pull request #26524 from storybookjs/fix-ts-expect-errors
valentinpalkovic Mar 16, 2024
f585078
Write changelog for 8.1.0-alpha.2 [skip ci]
storybook-bot Mar 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 6 additions & 5 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Expand Up @@ -19,18 +19,19 @@ body:
attributes:
label: To Reproduce
description: >-
We prioritize bug reports that have a reproduction. You can create a reproduction using [storybook.new](https://storybook.new), or by running `npx sb@next sandbox` and
following the instructions. Read our
[documentation](https://storybook.js.org/docs/react/contribute/how-to-reproduce)
to learn more about creating reproductions.
Due to the high volume of reports we receive, we can only prioritize bug reports that include a clear reproduction of the problem. Please use [storybook.new](https://storybook.new) to create one, and consult our [documentation](https://storybook.js.org/docs/react/contribute/how-to-reproduce) for guidance. Thank you for your understanding!
placeholder: >-
Paste a link to your reproduction here. We prioritize issues with reproductions over those without.
Please provide a link to your reproduction here. If creating a reproduction really isn't feasible, let us know and be sure to include as much detail as you can to help us understand the issue.
validations:
required: true
- type: textarea
id: system
attributes:
label: System
description: Please paste the results of `npx storybook@latest info` here.
render: bash
validations:
required: true
- type: textarea
id: context
attributes:
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.prerelease.md
@@ -1,3 +1,13 @@
## 8.1.0-alpha.2

- CLI: Automigrate improve upgrade storybook related packages - [#26497](https://github.com/storybookjs/storybook/pull/26497), thanks @ndelangen!
- CLI: Improve `vite-config-file.ts` - [#26375](https://github.com/storybookjs/storybook/pull/26375), thanks @joevaugh4n!
- Controls: Fix number controls do not reset - [#26372](https://github.com/storybookjs/storybook/pull/26372), thanks @jiyiru!
- Core: Optimize clearNotification - [#26415](https://github.com/storybookjs/storybook/pull/26415), thanks @ndelangen!
- Portable stories: Make setProjectAnnotations accept multiple types of imports - [#26316](https://github.com/storybookjs/storybook/pull/26316), thanks @yannbf!
- UI: Add key property to list children in Highlight component - [#26471](https://github.com/storybookjs/storybook/pull/26471), thanks @valentinpalkovic!
- UI: Fix search result color contrast - [#26287](https://github.com/storybookjs/storybook/pull/26287), thanks @winchesHe!

## 8.1.0-alpha.1

- Maintenance: Fix performance regressions - [#26411](https://github.com/storybookjs/storybook/pull/26411), thanks @kasperpeulen!
Expand Down
3 changes: 1 addition & 2 deletions code/addons/actions/src/runtime/action.ts
Expand Up @@ -21,10 +21,9 @@ const isReactSyntheticEvent = (e: unknown): e is SyntheticEvent =>
findProto(e, (proto) => /^Synthetic(?:Base)?Event$/.test(proto.constructor.name)) &&
typeof (e as SyntheticEvent).persist === 'function'
);
const serializeArg = <T>(a: T) => {
const serializeArg = <T extends object>(a: T) => {
if (isReactSyntheticEvent(a)) {
const e: SyntheticEvent = Object.create(
// @ts-expect-error (Converted from ts-ignore)
a.constructor.prototype,
Object.getOwnPropertyDescriptors(a)
);
Expand Down
Expand Up @@ -3,7 +3,7 @@ import type { StoryObj, Meta } from '@storybook/react';
import { CallStates } from '@storybook/instrumenter';
import { styled } from '@storybook/theming';
import { userEvent, within, waitFor, expect } from '@storybook/test';
import isChromatic from 'chromatic/isChromatic';
import { isChromatic } from '../../../../ui/.storybook/isChromatic';

import { getCalls, getInteractions } from '../mocks';
import { InteractionsPanel } from './InteractionsPanel';
Expand Down
4 changes: 1 addition & 3 deletions code/addons/links/src/utils.ts
Expand Up @@ -37,9 +37,7 @@ export const hrefTo = (title: ComponentTitle, name: StoryName): Promise<string>
return new Promise((resolve) => {
const { location } = document;
const query = parseQuery(location.search);
// @ts-expect-error (Converted from ts-ignore)
const existingId = [].concat(query.id)[0];
// @ts-expect-error (Converted from ts-ignore)
const existingId = query.id;
const titleToLink = title || existingId.split('--', 2)[0];
const id = toId(titleToLink, name);
const path = `/story/${id}`;
Expand Down
5 changes: 3 additions & 2 deletions code/chromatic.config.json
Expand Up @@ -3,6 +3,7 @@
"projectToken": "80b312430ec4",
"buildScriptName": "storybook:ui:build",
"onlyChanged": true,
"storybookConfigDir": "./ui/.storybook",
"storybookBaseDir": "./code"
"storybookConfigDir": "ui/.storybook",
"storybookBaseDir": "./code",
"zip": true
}
2 changes: 1 addition & 1 deletion code/frameworks/react-vite/README.md
@@ -1,3 +1,3 @@
# Storybook for React & Vite

See [documentation](https://storybook.js.org/docs/8.0/get-started/react-vite?renderer=react) for installation instructions, usage examples, APIs, and more.
See [documentation](https://storybook.js.org/docs/8.0/get-started/react-vite?renderer=react) for installation instructions, usage examples, APIs, and more.
2 changes: 1 addition & 1 deletion code/frameworks/react-webpack5/README.md
@@ -1,3 +1,3 @@
# Storybook for React & Webpack

See [documentation](https://storybook.js.org/docs/8.0/get-started/react-webpack5?renderer=react) for installation instructions, usage examples, APIs, and more.
See [documentation](https://storybook.js.org/docs/8.0/get-started/react-webpack5?renderer=react) for installation instructions, usage examples, APIs, and more.
2 changes: 1 addition & 1 deletion code/frameworks/vue3-webpack5/README.md
@@ -1,3 +1,3 @@
# Storybook for Vue 3 and Webpack

See [documentation](https://storybook.js.org/docs/8.0/get-started/vue3-webpack5?renderer=vue) for installation instructions, usage examples, APIs, and more.
See [documentation](https://storybook.js.org/docs/8.0/get-started/vue3-webpack5?renderer=vue) for installation instructions, usage examples, APIs, and more.
Expand Up @@ -52,22 +52,26 @@ describe('upgrade-storybook-related-dependencies fix', () => {
{
packageName: 'storybook',
packageVersion: '8.0.0',
availableUpgrade: undefined,
availableUpgrade: '8.0.0',
hasIncompatibleDependencies: true,
},
];
vi.mocked(docsUtils.getIncompatibleStorybookPackages).mockResolvedValue(analyzedPackages);
await expect(
check({
packageManager: {
getAllDependencies: async () => ({
'@chromatic-com/storybook': '1.2.9',
'@storybook/jest': '0.2.3',
'@storybook/preset-create-react-app': '3.2.0',
storybook: '8.0.0',
}),
getAllDependencies: async () =>
analyzedPackages.reduce(
(acc, { packageName, packageVersion }) => {
acc[packageName] = packageVersion;
return acc;
},
{} as Record<string, string>
),
latestVersion: async (pkgName) =>
analyzedPackages.find((pkg) => pkg.packageName === pkgName)?.availableUpgrade || '',
getInstalledVersion: async (pkgName) =>
analyzedPackages.find((pkg) => pkg.packageName === pkgName)?.packageVersion || null,
},
})
).resolves.toMatchInlineSnapshot(`
Expand Down
@@ -1,6 +1,6 @@
import { dedent } from 'ts-dedent';
import { cyan, yellow } from 'chalk';
import { valid, coerce } from 'semver';
import { gt } from 'semver';
import type { JsPackageManager } from '@storybook/core-common';
import { isCorePackage } from '@storybook/core-common';
import type { Fix } from '../types';
Expand All @@ -21,24 +21,14 @@ async function getLatestVersions(
packages: [string, string][]
): Promise<PackageMetadata[]> {
return Promise.all(
packages.map(async ([packageName, beforeVersion]) => ({
packages.map(async ([packageName]) => ({
packageName,
beforeVersion: coerce(beforeVersion)?.toString() || null,
beforeVersion: await packageManager.getInstalledVersion(packageName).catch(() => null),
afterVersion: await packageManager.latestVersion(packageName).catch(() => null),
}))
);
}

function isPackageUpgradable(
afterVersion: string,
packageName: string,
allDependencies: Record<string, string>
) {
const installedVersion = coerce(allDependencies[packageName])?.toString();

return valid(afterVersion) && afterVersion !== installedVersion;
}

/**
* Is the user upgrading to the `latest` version of Storybook?
* Let's try to pull along some of the storybook related dependencies to `latest` as well!
Expand Down Expand Up @@ -75,15 +65,13 @@ export const upgradeStorybookRelatedDependencies = {

const packageVersions = await getLatestVersions(packageManager, uniquePackages);

const upgradablePackages = packageVersions.filter(
({ packageName, afterVersion, beforeVersion }) => {
if (beforeVersion === null || afterVersion === null) {
return false;
}

return isPackageUpgradable(afterVersion, packageName, allDependencies);
const upgradablePackages = packageVersions.filter(({ afterVersion, beforeVersion }) => {
if (beforeVersion === null || afterVersion === null) {
return false;
}
);

return gt(afterVersion, beforeVersion);
});

return upgradablePackages.length > 0 ? { upgradable: upgradablePackages } : null;
},
Expand Down
6 changes: 3 additions & 3 deletions code/lib/cli/src/automigrate/fixes/vite-config-file.ts
Expand Up @@ -97,12 +97,12 @@ export const viteConfigFile = {
prompt({ existed, plugins }) {
if (existed) {
return dedent`
Since version 8.0.0, Storybook no longer ships with a Vite config build-in.
Since version 8.0.0, Storybook no longer ships with an in-built Vite config.
We've detected you do have a Vite config, but you may be missing the following plugins in it.

${plugins.map((plugin) => ` - ${plugin}`).join('\n')}

If you do already have these plugins, you can ignore this message.
If you already have these plugins, you can ignore this message.

You can find more information on how to do this here:
https://storybook.js.org/docs/8.0/migration-guide/#missing-viteconfigjs-file
Expand All @@ -111,7 +111,7 @@ export const viteConfigFile = {
`;
}
return dedent`
Since version 8.0.0, Storybook no longer ships with a Vite config build-in.
Since version 8.0.0, Storybook no longer ships with an in-built Vite config.
Please add a vite.config.js file to your project root.

You can find more information on how to do this here:
Expand Down
4 changes: 2 additions & 2 deletions code/lib/cli/src/generate.ts
Expand Up @@ -59,7 +59,7 @@ command('init')
.option('-b --builder <webpack5 | vite>', 'Builder library')
.option('-l --linkable', 'Prepare installation for link (contributor helper)')
.action((options: CommandOptions) => {
initiate(options, pkg).catch(() => process.exit(1));
initiate(options).catch(() => process.exit(1));
});

command('add <addon>')
Expand Down Expand Up @@ -155,7 +155,7 @@ command('sandbox [filterValue]')
.option('-o --output <outDir>', 'Define an output directory')
.option('--no-init', 'Whether to download a template without an initialized Storybook', false)
.action((filterValue, options) =>
sandbox({ filterValue, ...options }, pkg).catch((e) => {
sandbox({ filterValue, ...options }).catch((e) => {
logger.error(e);
process.exit(1);
})
Expand Down
10 changes: 3 additions & 7 deletions code/lib/cli/src/initiate.ts
@@ -1,5 +1,4 @@
import { appendFile, readFile } from 'fs/promises';
import type { PackageJson } from 'read-pkg-up';
import findUp from 'find-up';
import chalk from 'chalk';
import prompts from 'prompts';
Expand Down Expand Up @@ -228,10 +227,7 @@ const projectTypeInquirer = async (
process.exit(0);
};

export async function doInitiate(
options: CommandOptions,
pkg: PackageJson
): Promise<
export async function doInitiate(options: CommandOptions): Promise<
| {
shouldRunDev: true;
projectType: ProjectType;
Expand Down Expand Up @@ -409,14 +405,14 @@ export async function doInitiate(
};
}

export async function initiate(options: CommandOptions, pkg: PackageJson): Promise<void> {
export async function initiate(options: CommandOptions): Promise<void> {
const initiateResult = await withTelemetry(
'init',
{
cliOptions: options,
printError: (err) => !err.handled && logger.error(err),
},
() => doInitiate(options, pkg)
() => doInitiate(options)
);

if (initiateResult?.shouldRunDev) {
Expand Down
21 changes: 10 additions & 11 deletions code/lib/cli/src/sandbox.ts
Expand Up @@ -10,7 +10,7 @@ import invariant from 'tiny-invariant';
import { lt, prerelease } from 'semver';
import type { Template, TemplateKey } from './sandbox-templates';
import { allTemplates as TEMPLATES } from './sandbox-templates';
import type { PackageJson, PackageManagerName } from '@storybook/core-common';
import type { PackageManagerName } from '@storybook/core-common';
import { JsPackageManagerFactory } from '@storybook/core-common';
import { versions } from '@storybook/core-common';
import { doInitiate } from './initiate';
Expand All @@ -28,10 +28,12 @@ type Choice = keyof typeof TEMPLATES;

const toChoices = (c: Choice): prompts.Choice => ({ title: TEMPLATES[c].name, value: c });

export const sandbox = async (
{ output: outputDirectory, filterValue, init, ...options }: SandboxOptions,
pkg: PackageJson
) => {
export const sandbox = async ({
output: outputDirectory,
filterValue,
init,
...options
}: SandboxOptions) => {
// Either get a direct match when users pass a template id, or filter through all templates
let selectedConfig: Template | undefined = TEMPLATES[filterValue as TemplateKey];
let templateId: Choice | null = selectedConfig ? (filterValue as TemplateKey) : null;
Expand Down Expand Up @@ -222,12 +224,9 @@ export const sandbox = async (
const before = process.cwd();
process.chdir(templateDestination);
// we run doInitiate, instead of initiate, to avoid sending this init event to telemetry, because it's not a real world project
await doInitiate(
{
...options,
},
pkg
);
await doInitiate({
...options,
});
process.chdir(before);
}
} catch (err) {
Expand Down
19 changes: 16 additions & 3 deletions code/lib/core-common/src/js-package-manager/JsPackageManager.ts
Expand Up @@ -17,6 +17,8 @@ const logger = console;

export type PackageManagerName = 'npm' | 'yarn1' | 'yarn2' | 'pnpm';

type StorybookPackage = keyof typeof storybookPackagesVersions;

/**
* Extract package name and version from input
*
Expand Down Expand Up @@ -381,9 +383,8 @@ export abstract class JsPackageManager {
public async getVersion(packageName: string, constraint?: string): Promise<string> {
let current: string | undefined;

if (/(@storybook|^sb$|^storybook$)/.test(packageName)) {
// @ts-expect-error (Converted from ts-ignore)
current = storybookPackagesVersions[packageName];
if (packageName in storybookPackagesVersions) {
current = storybookPackagesVersions[packageName as StorybookPackage];
}

let latest;
Expand Down Expand Up @@ -535,6 +536,18 @@ export abstract class JsPackageManager {
}
}

/**
* Returns the installed (within node_modules or pnp zip) version of a specified package
*/
public async getInstalledVersion(packageName: string): Promise<string | null> {
const installations = await this.findInstallations([packageName]);
if (!installations) {
return null;
}

return Object.entries(installations.dependencies)[0]?.[1]?.[0].version || null;
}

public async executeCommand({
command,
args = [],
Expand Down
10 changes: 6 additions & 4 deletions code/lib/manager-api/src/modules/notifications.ts
Expand Up @@ -37,11 +37,13 @@ export const init: ModuleFn = ({ store }) => {
clearNotification: (id) => {
const { notifications } = store.getState();

store.setState({ notifications: notifications.filter((n) => n.id !== id) });

const notification = notifications.find((n) => n.id === id);
if (notification && notification.onClear) {
notification.onClear({ dismissed: false });

if (notification) {
store.setState({ notifications: notifications.filter((n) => n.id !== id) });
if (notification.onClear) {
notification.onClear({ dismissed: false });
}
}
},
};
Expand Down
4 changes: 1 addition & 3 deletions code/lib/preview-api/src/modules/preview-web/Preview.tsx
Expand Up @@ -100,9 +100,7 @@ export class Preview<TRenderer extends Renderer> {
get: (_, method) => {
if (this.storyStoreValue) {
deprecate('Accessing the Story Store is deprecated and will be removed in 9.0');

// @ts-expect-error I'm not sure if there's a way to keep TS happy here
return this.storyStoreValue[method];
return this.storyStoreValue[method as keyof StoryStore<TRenderer>];
}

throw new StoryStoreAccessedBeforeInitializationError();
Expand Down
@@ -0,0 +1,7 @@
export default {
parameters: {
fromAnnotations: {
asDefaultImport: true,
},
},
};
@@ -0,0 +1,5 @@
export const parameters = {
fromAnnotations: {
asObjectImport: true,
},
};