Skip to content

Commit

Permalink
Fix type errors
Browse files Browse the repository at this point in the history
  • Loading branch information
kasperpeulen committed Apr 12, 2024
1 parent 2d8e341 commit 3f7e1c2
Show file tree
Hide file tree
Showing 15 changed files with 243 additions and 330 deletions.
4 changes: 2 additions & 2 deletions code/addons/links/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-links",
"version": "8.1.0-alpha.7",
"version": "8.1.0-alpha.6",
"description": "Link stories together to build demos and prototypes with your UI components",
"keywords": [
"addon",
Expand Down 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.2",
"@storybook/csf": "0.1.4--canary.82.eb42c88.0",
"@storybook/global": "^5.0.0",
"ts-dedent": "^2.0.0"
},
Expand Down
4 changes: 2 additions & 2 deletions code/lib/codemod/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/codemod",
"version": "8.1.0-alpha.7",
"version": "8.1.0-alpha.6",
"description": "A collection of codemod scripts written with JSCodeshift",
"keywords": [
"storybook"
Expand Down Expand Up @@ -57,7 +57,7 @@
"@babel/core": "^7.23.2",
"@babel/preset-env": "^7.23.2",
"@babel/types": "^7.23.0",
"@storybook/csf": "^0.1.2",
"@storybook/csf": "0.1.4--canary.82.eb42c88.0",
"@storybook/csf-tools": "workspace:*",
"@storybook/node-logger": "workspace:*",
"@storybook/types": "workspace:*",
Expand Down
4 changes: 2 additions & 2 deletions code/lib/core-server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/core-server",
"version": "8.1.0-alpha.7",
"version": "8.1.0-alpha.6",
"description": "Storybook framework-agnostic API",
"keywords": [
"storybook"
Expand Down Expand Up @@ -62,7 +62,7 @@
"@storybook/channels": "workspace:*",
"@storybook/core-common": "workspace:*",
"@storybook/core-events": "workspace:*",
"@storybook/csf": "^0.1.2",
"@storybook/csf": "0.1.4--canary.82.eb42c88.0",
"@storybook/csf-tools": "workspace:*",
"@storybook/docs-mdx": "3.0.0",
"@storybook/global": "^5.0.0",
Expand Down
4 changes: 2 additions & 2 deletions code/lib/csf-tools/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/csf-tools",
"version": "8.1.0-alpha.7",
"version": "8.1.0-alpha.6",
"description": "Parse and manipulate CSF and Storybook config files",
"keywords": [
"storybook"
Expand Down Expand Up @@ -46,7 +46,7 @@
"@babel/parser": "^7.23.0",
"@babel/traverse": "^7.23.2",
"@babel/types": "^7.23.0",
"@storybook/csf": "^0.1.2",
"@storybook/csf": "0.1.4--canary.82.eb42c88.0",
"@storybook/types": "workspace:*",
"fs-extra": "^11.1.0",
"recast": "^0.23.5",
Expand Down
4 changes: 2 additions & 2 deletions code/lib/manager-api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/manager-api",
"version": "8.1.0-alpha.7",
"version": "8.1.0-alpha.6",
"description": "Core Storybook Manager API & Context",
"keywords": [
"storybook"
Expand Down Expand Up @@ -47,7 +47,7 @@
"@storybook/channels": "workspace:*",
"@storybook/client-logger": "workspace:*",
"@storybook/core-events": "workspace:*",
"@storybook/csf": "^0.1.2",
"@storybook/csf": "0.1.4--canary.82.eb42c88.0",
"@storybook/global": "^5.0.0",
"@storybook/icons": "^1.2.5",
"@storybook/router": "workspace:*",
Expand Down
4 changes: 2 additions & 2 deletions code/lib/preview-api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/preview-api",
"version": "8.1.0-alpha.7",
"version": "8.1.0-alpha.6",
"description": "",
"keywords": [
"storybook"
Expand Down Expand Up @@ -47,7 +47,7 @@
"@storybook/channels": "workspace:*",
"@storybook/client-logger": "workspace:*",
"@storybook/core-events": "workspace:*",
"@storybook/csf": "^0.1.2",
"@storybook/csf": "0.1.4--canary.82.eb42c88.0",
"@storybook/global": "^5.0.0",
"@storybook/types": "workspace:*",
"@types/qs": "^6.9.5",
Expand Down
4 changes: 2 additions & 2 deletions code/lib/source-loader/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/source-loader",
"version": "8.1.0-alpha.7",
"version": "8.1.0-alpha.6",
"description": "Source loader",
"keywords": [
"lib",
Expand Down 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.2",
"@storybook/csf": "0.1.4--canary.82.eb42c88.0",
"@storybook/types": "workspace:*",
"estraverse": "^5.2.0",
"lodash": "^4.17.21",
Expand Down
4 changes: 2 additions & 2 deletions code/lib/types/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/types",
"version": "8.1.0-alpha.7",
"version": "8.1.0-alpha.6",
"description": "Core Storybook TS Types",
"keywords": [
"storybook"
Expand Down Expand Up @@ -49,7 +49,7 @@
"file-system-cache": "2.3.0"
},
"devDependencies": {
"@storybook/csf": "^0.1.2",
"@storybook/csf": "0.1.4--canary.82.eb42c88.0",
"@types/fs-extra": "^11.0.1",
"@types/node": "^18.0.0",
"typescript": "^5.3.2"
Expand Down
4 changes: 2 additions & 2 deletions code/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/root",
"version": "8.1.0-alpha.7",
"version": "8.1.0-alpha.6",
"private": true,
"description": "Storybook root",
"homepage": "https://storybook.js.org/",
Expand Down Expand Up @@ -127,7 +127,7 @@
"@storybook/core-events": "workspace:*",
"@storybook/core-server": "workspace:*",
"@storybook/core-webpack": "workspace:*",
"@storybook/csf": "^0.1.2",
"@storybook/csf": "0.1.4--canary.82.eb42c88.0",
"@storybook/csf-plugin": "workspace:*",
"@storybook/csf-tools": "workspace:*",
"@storybook/docs-tools": "workspace:*",
Expand Down
4 changes: 2 additions & 2 deletions code/renderers/server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/server",
"version": "8.1.0-alpha.7",
"version": "8.1.0-alpha.6",
"description": "Storybook Server renderer",
"keywords": [
"storybook"
Expand Down 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.2",
"@storybook/csf": "0.1.4--canary.82.eb42c88.0",
"@storybook/csf-tools": "workspace:*",
"@storybook/global": "^5.0.0",
"@storybook/preview-api": "workspace:*",
Expand Down
3 changes: 2 additions & 1 deletion code/renderers/server/src/render.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ const buildStoryArgs = (args: Args, argTypes: ArgTypes) => {
Object.keys(argTypes).forEach((key: string) => {
const argType = argTypes[key];
const { control } = argType;
const controlType = control && control.type.toLowerCase();
const controlType =
control && typeof control === 'object' && 'type' in control && control.type?.toLowerCase();
const argValue = storyArgs[key];
switch (controlType) {
case 'date':
Expand Down
4 changes: 2 additions & 2 deletions code/ui/blocks/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/blocks",
"version": "8.1.0-alpha.7",
"version": "8.1.0-alpha.6",
"description": "Storybook Doc Blocks",
"keywords": [
"storybook"
Expand Down Expand Up @@ -48,7 +48,7 @@
"@storybook/client-logger": "workspace:*",
"@storybook/components": "workspace:*",
"@storybook/core-events": "workspace:*",
"@storybook/csf": "^0.1.2",
"@storybook/csf": "0.1.4--canary.82.eb42c88.0",
"@storybook/docs-tools": "workspace:*",
"@storybook/global": "^5.0.0",
"@storybook/icons": "^1.2.5",
Expand Down
4 changes: 2 additions & 2 deletions code/ui/blocks/src/components/ArgsTable/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ export interface ArgType {
disable?: boolean;
subcategory?: string;
defaultValue?: {
summary: string;
summary?: string;
detail?: string;
};
type?: {
summary: string;
summary?: string;
detail?: string;
};
readonly?: boolean;
Expand Down
4 changes: 2 additions & 2 deletions code/ui/components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/components",
"version": "8.1.0-alpha.7",
"version": "8.1.0-alpha.6",
"description": "Core Storybook Components",
"keywords": [
"storybook"
Expand Down Expand Up @@ -61,7 +61,7 @@
"dependencies": {
"@radix-ui/react-slot": "^1.0.2",
"@storybook/client-logger": "workspace:*",
"@storybook/csf": "^0.1.2",
"@storybook/csf": "0.1.4--canary.82.eb42c88.0",
"@storybook/global": "^5.0.0",
"@storybook/icons": "^1.2.5",
"@storybook/theming": "workspace:*",
Expand Down
Loading

0 comments on commit 3f7e1c2

Please sign in to comment.