Skip to content

Commit

Permalink
Fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
kasperpeulen committed Jun 11, 2024
1 parent 831b141 commit a431b1d
Show file tree
Hide file tree
Showing 17 changed files with 37 additions and 37 deletions.
2 changes: 1 addition & 1 deletion code/addons/links/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"prep": "node --loader ../../../scripts/node_modules/esbuild-register/loader.js -r ../../../scripts/node_modules/esbuild-register/register.js ../../../scripts/prepare/addon-bundle.ts"
},
"dependencies": {
"@storybook/csf": "0.1.8--canary.91.84e764b.0",
"@storybook/csf": "0.1.9--canary.91.ad22273.0",
"@storybook/global": "^5.0.0",
"ts-dedent": "^2.0.0"
},
Expand Down
2 changes: 1 addition & 1 deletion code/lib/codemod/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"@babel/core": "^7.24.4",
"@babel/preset-env": "^7.24.4",
"@babel/types": "^7.24.0",
"@storybook/csf": "0.1.8--canary.91.84e764b.0",
"@storybook/csf": "0.1.9--canary.91.ad22273.0",
"@storybook/csf-tools": "workspace:*",
"@storybook/node-logger": "workspace:*",
"@storybook/types": "workspace:*",
Expand Down
2 changes: 1 addition & 1 deletion code/lib/core-events/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"prep": "node --loader ../../../scripts/node_modules/esbuild-register/loader.js -r ../../../scripts/node_modules/esbuild-register/register.js ../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@storybook/csf": "0.1.8--canary.91.84e764b.0",
"@storybook/csf": "0.1.9--canary.91.ad22273.0",
"ts-dedent": "^2.0.0"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion code/lib/core-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"@storybook/channels": "workspace:*",
"@storybook/core-common": "workspace:*",
"@storybook/core-events": "workspace:*",
"@storybook/csf": "0.1.8--canary.91.84e764b.0",
"@storybook/csf": "0.1.9--canary.91.ad22273.0",
"@storybook/csf-tools": "workspace:*",
"@storybook/docs-mdx": "3.1.0-next.0",
"@storybook/global": "^5.0.0",
Expand Down
2 changes: 1 addition & 1 deletion code/lib/csf-tools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"@babel/parser": "^7.24.4",
"@babel/traverse": "^7.24.1",
"@babel/types": "^7.24.0",
"@storybook/csf": "0.1.8--canary.91.84e764b.0",
"@storybook/csf": "0.1.9--canary.91.ad22273.0",
"@storybook/types": "workspace:*",
"fs-extra": "^11.1.0",
"recast": "^0.23.5",
Expand Down
2 changes: 1 addition & 1 deletion code/lib/manager-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"@storybook/channels": "workspace:*",
"@storybook/client-logger": "workspace:*",
"@storybook/core-events": "workspace:*",
"@storybook/csf": "0.1.8--canary.91.84e764b.0",
"@storybook/csf": "0.1.9--canary.91.ad22273.0",
"@storybook/global": "^5.0.0",
"@storybook/icons": "^1.2.5",
"@storybook/router": "workspace:*",
Expand Down
2 changes: 1 addition & 1 deletion code/lib/preview-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"@storybook/channels": "workspace:*",
"@storybook/client-logger": "workspace:*",
"@storybook/core-events": "workspace:*",
"@storybook/csf": "0.1.8--canary.91.84e764b.0",
"@storybook/csf": "0.1.9--canary.91.ad22273.0",
"@storybook/global": "^5.0.0",
"@storybook/types": "workspace:*",
"@types/qs": "^6.9.5",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ export class StoryRender<TRenderer extends Renderer> implements Render<TRenderer
const teardown = await this.renderToScreen(renderContext, canvasElement);
this.teardownRender = teardown || (() => {});
});
return {};
},
step: (label: StepLabel, play: PlayFunction<TRenderer>) => runStep!(label, play, context),
};
Expand Down
2 changes: 1 addition & 1 deletion code/lib/source-loader/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"prep": "node --loader ../../../scripts/node_modules/esbuild-register/loader.js -r ../../../scripts/node_modules/esbuild-register/register.js ../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@storybook/csf": "0.1.8--canary.91.84e764b.0",
"@storybook/csf": "0.1.9--canary.91.ad22273.0",
"@storybook/types": "workspace:*",
"estraverse": "^5.2.0",
"lodash": "^4.17.21",
Expand Down
12 changes: 5 additions & 7 deletions code/lib/test/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,15 @@ import {
resetAllMocks,
restoreAllMocks,
} from './spy';
import type { Renderer } from '@storybook/types';
import type { Renderer, WebRenderer } from '@storybook/types';
import type { queries } from './testing-library';
import { within } from './testing-library';
export * from './spy';

type Queries = ReturnType<typeof within<typeof queries>>;

declare module '@storybook/types' {
interface StoryContext {
mount(): Promise<Queries>;
}
interface MountReturnType extends Queries {}
}

export const { expect } = instrument(
Expand Down Expand Up @@ -97,11 +95,11 @@ const nameSpiesAndWrapActionsInSpies: LoaderFunction<Renderer> = ({ initialArgs
traverseArgs(initialArgs);
};

const enhanceMount: LoaderFunction<Renderer> = (context) => {
const enhanceMount: LoaderFunction<WebRenderer> = (context) => {
if ('mount' in context) {
const mount = context.mount.bind(null);
context.mount = async () => {
await mount();
context.mount = async (...args) => {
await mount(...args);
return within(context.canvasElement);
};
}
Expand Down
2 changes: 1 addition & 1 deletion code/lib/types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"file-system-cache": "2.3.0"
},
"devDependencies": {
"@storybook/csf": "0.1.8--canary.91.84e764b.0",
"@storybook/csf": "0.1.9--canary.91.ad22273.0",
"@types/fs-extra": "^11.0.1",
"@types/node": "^18.0.0",
"typescript": "^5.3.2"
Expand Down
1 change: 1 addition & 0 deletions code/lib/types/src/modules/csf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export type {
LegacyStoryAnnotationsOrFn,
LegacyStoryFn,
LoaderFunction,
MountReturnType,
Parameters,
PartialStoryFn,
PlayFunction,
Expand Down
2 changes: 1 addition & 1 deletion code/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
"@storybook/core-events": "workspace:*",
"@storybook/core-server": "workspace:*",
"@storybook/core-webpack": "workspace:*",
"@storybook/csf": "0.1.8--canary.91.84e764b.0",
"@storybook/csf": "0.1.9--canary.91.ad22273.0",
"@storybook/csf-plugin": "workspace:*",
"@storybook/csf-tools": "workspace:*",
"@storybook/docs-tools": "workspace:*",
Expand Down
2 changes: 1 addition & 1 deletion code/renderers/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"prep": "node --loader ../../../scripts/node_modules/esbuild-register/loader.js -r ../../../scripts/node_modules/esbuild-register/register.js ../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@storybook/csf": "0.1.8--canary.91.84e764b.0",
"@storybook/csf": "0.1.9--canary.91.ad22273.0",
"@storybook/csf-tools": "workspace:*",
"@storybook/global": "^5.0.0",
"@storybook/preview-api": "workspace:*",
Expand Down
2 changes: 1 addition & 1 deletion code/ui/blocks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"@storybook/client-logger": "workspace:*",
"@storybook/components": "workspace:*",
"@storybook/core-events": "workspace:*",
"@storybook/csf": "0.1.8--canary.91.84e764b.0",
"@storybook/csf": "0.1.9--canary.91.ad22273.0",
"@storybook/docs-tools": "workspace:*",
"@storybook/global": "^5.0.0",
"@storybook/icons": "^1.2.5",
Expand Down
2 changes: 1 addition & 1 deletion code/ui/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"@radix-ui/react-dialog": "^1.0.5",
"@radix-ui/react-slot": "^1.0.2",
"@storybook/client-logger": "workspace:*",
"@storybook/csf": "0.1.8--canary.91.84e764b.0",
"@storybook/csf": "0.1.9--canary.91.ad22273.0",
"@storybook/global": "^5.0.0",
"@storybook/icons": "^1.2.5",
"@storybook/theming": "workspace:*",
Expand Down
34 changes: 17 additions & 17 deletions code/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5323,7 +5323,7 @@ __metadata:
dependencies:
"@storybook/client-logger": "workspace:*"
"@storybook/core-events": "workspace:*"
"@storybook/csf": "npm:0.1.8--canary.91.84e764b.0"
"@storybook/csf": "npm:0.1.9--canary.91.ad22273.0"
"@storybook/global": "npm:^5.0.0"
"@storybook/manager-api": "workspace:*"
"@storybook/preview-api": "workspace:*"
Expand Down Expand Up @@ -5591,7 +5591,7 @@ __metadata:
"@storybook/client-logger": "workspace:*"
"@storybook/components": "workspace:*"
"@storybook/core-events": "workspace:*"
"@storybook/csf": "npm:0.1.8--canary.91.84e764b.0"
"@storybook/csf": "npm:0.1.9--canary.91.ad22273.0"
"@storybook/docs-tools": "workspace:*"
"@storybook/global": "npm:^5.0.0"
"@storybook/icons": "npm:^1.2.5"
Expand Down Expand Up @@ -5821,7 +5821,7 @@ __metadata:
"@babel/core": "npm:^7.24.4"
"@babel/preset-env": "npm:^7.24.4"
"@babel/types": "npm:^7.24.0"
"@storybook/csf": "npm:0.1.8--canary.91.84e764b.0"
"@storybook/csf": "npm:0.1.9--canary.91.ad22273.0"
"@storybook/csf-tools": "workspace:*"
"@storybook/node-logger": "workspace:*"
"@storybook/types": "workspace:*"
Expand Down Expand Up @@ -5858,7 +5858,7 @@ __metadata:
"@radix-ui/react-scroll-area": "npm:^1.0.5"
"@radix-ui/react-slot": "npm:^1.0.2"
"@storybook/client-logger": "workspace:*"
"@storybook/csf": "npm:0.1.8--canary.91.84e764b.0"
"@storybook/csf": "npm:0.1.9--canary.91.ad22273.0"
"@storybook/global": "npm:^5.0.0"
"@storybook/icons": "npm:^1.2.5"
"@storybook/test": "workspace:*"
Expand Down Expand Up @@ -5942,7 +5942,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "@storybook/core-events@workspace:lib/core-events"
dependencies:
"@storybook/csf": "npm:0.1.8--canary.91.84e764b.0"
"@storybook/csf": "npm:0.1.9--canary.91.ad22273.0"
chalk: "npm:^4.1.0"
ts-dedent: "npm:^2.0.0"
typescript: "npm:^5.3.2"
Expand All @@ -5962,7 +5962,7 @@ __metadata:
"@storybook/channels": "workspace:*"
"@storybook/core-common": "workspace:*"
"@storybook/core-events": "workspace:*"
"@storybook/csf": "npm:0.1.8--canary.91.84e764b.0"
"@storybook/csf": "npm:0.1.9--canary.91.ad22273.0"
"@storybook/csf-tools": "workspace:*"
"@storybook/docs-mdx": "npm:3.1.0-next.0"
"@storybook/global": "npm:^5.0.0"
Expand Down Expand Up @@ -6045,7 +6045,7 @@ __metadata:
"@babel/parser": "npm:^7.24.4"
"@babel/traverse": "npm:^7.24.1"
"@babel/types": "npm:^7.24.0"
"@storybook/csf": "npm:0.1.8--canary.91.84e764b.0"
"@storybook/csf": "npm:0.1.9--canary.91.ad22273.0"
"@storybook/types": "workspace:*"
"@types/fs-extra": "npm:^11.0.1"
"@types/js-yaml": "npm:^4.0.5"
Expand All @@ -6057,12 +6057,12 @@ __metadata:
languageName: unknown
linkType: soft

"@storybook/csf@npm:0.1.8--canary.91.84e764b.0":
version: 0.1.8--canary.91.84e764b.0
resolution: "@storybook/csf@npm:0.1.8--canary.91.84e764b.0"
"@storybook/csf@npm:0.1.9--canary.91.ad22273.0":
version: 0.1.9--canary.91.ad22273.0
resolution: "@storybook/csf@npm:0.1.9--canary.91.ad22273.0"
dependencies:
type-fest: "npm:^2.19.0"
checksum: 10c0/31a72b56eed86960c0b577ebdf288b1fe67c9262b21b756cd53b0043d2a3df36e8e92ac2f49c196326323af146ebf65c764a1982b26a122b2e7994bd8f1ff95f
checksum: 10c0/bd7713438b32bdd58b2aec030e6db02d5ffad6977450091a7fdf8c693e5599b548472680698a43e7fd3d05c9bb91b2879666fe26a7e9d1da8a740e83aa45cf9c
languageName: node
linkType: hard

Expand Down Expand Up @@ -6245,7 +6245,7 @@ __metadata:
"@storybook/channels": "workspace:*"
"@storybook/client-logger": "workspace:*"
"@storybook/core-events": "workspace:*"
"@storybook/csf": "npm:0.1.8--canary.91.84e764b.0"
"@storybook/csf": "npm:0.1.9--canary.91.ad22273.0"
"@storybook/global": "npm:^5.0.0"
"@storybook/icons": "npm:^1.2.5"
"@storybook/router": "workspace:*"
Expand Down Expand Up @@ -6585,7 +6585,7 @@ __metadata:
"@storybook/client-logger": "workspace:*"
"@storybook/core-common": "workspace:*"
"@storybook/core-events": "workspace:*"
"@storybook/csf": "npm:0.1.8--canary.91.84e764b.0"
"@storybook/csf": "npm:0.1.9--canary.91.ad22273.0"
"@storybook/global": "npm:^5.0.0"
"@storybook/types": "workspace:*"
"@types/qs": "npm:^6.9.5"
Expand Down Expand Up @@ -6772,7 +6772,7 @@ __metadata:
"@storybook/core-events": "workspace:*"
"@storybook/core-server": "workspace:*"
"@storybook/core-webpack": "workspace:*"
"@storybook/csf": "npm:0.1.8--canary.91.84e764b.0"
"@storybook/csf": "npm:0.1.9--canary.91.ad22273.0"
"@storybook/csf-plugin": "workspace:*"
"@storybook/csf-tools": "workspace:*"
"@storybook/docs-tools": "workspace:*"
Expand Down Expand Up @@ -6927,7 +6927,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "@storybook/server@workspace:renderers/server"
dependencies:
"@storybook/csf": "npm:0.1.8--canary.91.84e764b.0"
"@storybook/csf": "npm:0.1.9--canary.91.ad22273.0"
"@storybook/csf-tools": "workspace:*"
"@storybook/global": "npm:^5.0.0"
"@storybook/preview-api": "workspace:*"
Expand All @@ -6944,7 +6944,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "@storybook/source-loader@workspace:lib/source-loader"
dependencies:
"@storybook/csf": "npm:0.1.8--canary.91.84e764b.0"
"@storybook/csf": "npm:0.1.9--canary.91.ad22273.0"
"@storybook/types": "workspace:*"
estraverse: "npm:^5.2.0"
lodash: "npm:^4.17.21"
Expand Down Expand Up @@ -7115,7 +7115,7 @@ __metadata:
resolution: "@storybook/types@workspace:lib/types"
dependencies:
"@storybook/channels": "workspace:*"
"@storybook/csf": "npm:0.1.8--canary.91.84e764b.0"
"@storybook/csf": "npm:0.1.9--canary.91.ad22273.0"
"@types/express": "npm:^4.7.0"
"@types/fs-extra": "npm:^11.0.1"
"@types/node": "npm:^18.0.0"
Expand Down

0 comments on commit a431b1d

Please sign in to comment.