Skip to content

Commit

Permalink
Fix type error and update scripts in package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkPurple141 committed Jan 28, 2024
1 parent d177cb1 commit 74a1c90
Show file tree
Hide file tree
Showing 11 changed files with 1,530 additions and 109 deletions.
5 changes: 5 additions & 0 deletions .changeset/tough-poets-argue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'storybook-addon-performance': patch
---

Fix type error for bumped deps
4 changes: 2 additions & 2 deletions examples/react-esm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
"webpack": "^5.90.0"
},
"scripts": {
"storybook:dev": "pnpm storybook dev --port 9005",
"dev": "pnpm storybook dev --port 9005",
"build": "pnpm storybook build",
"start-server": "pnpm http-server storybook-static --port 9005 --silent"
}
}
}
10 changes: 5 additions & 5 deletions examples/react-v16.8/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@
"@babel/preset-env": "^7.23.9",
"@babel/preset-react": "^7.23.3",
"@babel/preset-typescript": "^7.23.3",
"@storybook/react": "7.0.0-beta.2",
"@storybook/react-webpack5": "7.0.0-beta.2",
"@storybook/react": "^7.0.0",
"@storybook/react-webpack5": "^7.0.0",
"babel-loader": "^9.1.3",
"http-server": "^14.1.1",
"storybook": "7.0.0-beta.2",
"storybook": "^7.0.0",
"storybook-addon-performance": "workspace:*",
"typescript": "^4.9.5",
"webpack": "^5.90.0"
},
"scripts": {
"storybook:dev": "pnpm storybook dev --port 9003",
"dev": "pnpm storybook dev --port 9003",
"build": "pnpm storybook build",
"start-server": "pnpm http-server storybook-static --port 9003 --silent"
}
}
}
4 changes: 2 additions & 2 deletions examples/react-v17/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
"webpack": "^5.90.0"
},
"scripts": {
"storybook:dev": "pnpm storybook dev --port 9004",
"dev": "pnpm storybook dev --port 9004",
"build": "pnpm storybook build",
"start-server": "pnpm http-server storybook-static --port 9004 --silent"
}
}
}
4 changes: 2 additions & 2 deletions examples/react-v18/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
"webpack": "^5.90.0"
},
"scripts": {
"storybook:dev": "pnpm storybook dev --port 9006",
"dev": "pnpm storybook dev --port 9006",
"build": "pnpm storybook build",
"start-server": "pnpm http-server storybook-static --port 9006 --silent"
}
}
}
2 changes: 1 addition & 1 deletion packages/storybook-addon-performance/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"dependencies": {
"@storybook/manager-api": "^7.6.10",
"@storybook/theming": "^7.6.10",
"@storybook/types": "^7.6.10",
"@xstate/react": "^3.2.2",
"xstate": "^4.38.3"
},
Expand Down Expand Up @@ -70,7 +71,6 @@
"prettier:write": "pnpm prettier src --write --config ../../.prettierrc",
"eslint:check": "eslint -c ../../.eslintrc.js --max-warnings=0",
"validate": "pnpm typescript:check && pnpm prettier:check && pnpm eslint:check",
"dev": "pnpm typescript:watch & pnpm storybook:dev",
"test": "pnpm jest",
"watch": "tsup src --watch",
"build": "tsup",
Expand Down
9 changes: 5 additions & 4 deletions packages/storybook-addon-performance/src/manager.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { useParameter, addons, types } from '@storybook/manager-api';
import { useParameter, addons } from '@storybook/manager-api';
import { Channel } from '@storybook/channels';
import { Addon_TypesEnum } from '@storybook/types';
import { AddonPanel } from '@storybook/components';
import React from 'react';
import * as constants from './addon-constants';
Expand Down Expand Up @@ -31,10 +32,10 @@ function Env({ children }: EnvProps) {

addons.register(constants.addonKey, () => {
addons.add(constants.panelKey, {
type: types.PANEL,
type: Addon_TypesEnum.PANEL,
title: constants.panelTitle,
render: ({ active, key }) => (
<AddonPanel active={active ?? true} key={key}>
render: ({ active }) => (
<AddonPanel active={active ?? true}>
<Env>
{({ interactions, channel, allowedGroups }) => (
<Panel channel={channel} interactions={interactions} allowedGroups={allowedGroups} />
Expand Down
1 change: 1 addition & 0 deletions packages/storybook-addon-performance/src/panel/top-bar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ export default function Topbar() {
<ResponsiveText>Load result</ResponsiveText>
</Button>
}
{/* @ts-expect-error */}
<Form.Input
style={{ display: 'none' }}
id={selectors.loadButtonId}
Expand Down

This file was deleted.

Loading

0 comments on commit 74a1c90

Please sign in to comment.