Skip to content

Commit

Permalink
[chore] upgrade packages (#220)
Browse files Browse the repository at this point in the history
  • Loading branch information
sijav authored May 21, 2024
1 parent 17efaf9 commit ef63885
Show file tree
Hide file tree
Showing 5 changed files with 1,681 additions and 1,068 deletions.
14 changes: 10 additions & 4 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,15 @@ const config: StorybookConfig = {
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
addons: ['@storybook/addon-links', '@storybook/addon-essentials'],
typescript: {
reactDocgen: 'react-docgen', // 👈 react-docgen configured here.
reactDocgen: 'react-docgen-typescript', // 👈 react-docgen configured here.
reactDocgenTypescriptOptions: {
// Makes union prop types like variant and size appear as select controls
shouldExtractLiteralValuesFromEnum: true,
// Makes string and boolean types that can be undefined appear as inputs and switches
shouldRemoveUndefinedFromOptional: true,
// Filter out third-party props from node_modules except @mui packages
propFilter: (prop: { parent?: { fileName: string } }) => (prop.parent ? !/node_modules\/(?!@mui)/.test(prop.parent.fileName) : true),
},
},
framework: {
name: '@storybook/react-vite',
Expand All @@ -17,9 +25,7 @@ const config: StorybookConfig = {
env: {
VITE_USE_MOCK: 'true',
},
docs: {
autodocs: 'tag',
},
docs: {},
core: {
disableTelemetry: true,
},
Expand Down
3 changes: 2 additions & 1 deletion .storybook/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { WithProviders } from './WithProviders'

const preview: Preview = {
parameters: {
actions: { argTypesRegex: '^on[A-Z].*' },
actions: { argTypesRegex: '^on.*' },
controls: {
matchers: {
color: /(background|color)$/i,
Expand Down Expand Up @@ -40,6 +40,7 @@ const preview: Preview = {
},
},
decorators: [(Story, context) => <WithProviders Story={Story} context={context} />],
tags: ['autodocs'],
}

export default preview
85 changes: 42 additions & 43 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,89 +35,88 @@
"@emotion/react": "^11.11.4",
"@emotion/styled": "^11.11.5",
"@fontsource-variable/nunito-sans": "^5.0.14",
"@lingui/react": "^4.10.0",
"@mui/icons-material": "^5.15.15",
"@lingui/macro": "^4.11.0",
"@lingui/react": "^4.11.0",
"@mui/icons-material": "^5.15.18",
"@mui/lab": "^5.0.0-alpha.170",
"@mui/material": "^5.15.15",
"@mui/material": "^5.15.18",
"@mui/system": "^5.15.15",
"@mui/x-charts": "^7.3.0",
"@mui/x-data-grid-premium": "^7.3.0",
"@mui/x-date-pickers-pro": "^7.2.0",
"@mui/x-tree-view": "^7.3.0",
"@tanstack/react-query": "^5.32.0",
"@mui/x-charts": "^7.5.0",
"@mui/x-data-grid-premium": "^7.5.0",
"@mui/x-date-pickers-pro": "^7.5.0",
"@mui/x-tree-view": "^7.5.0",
"@tanstack/react-query": "^5.37.1",
"@uidotdev/usehooks": "^2.4.1",
"axios": "^1.6.8",
"axios": "^1.7.1",
"d3": "^7.9.0",
"dayjs": "^1.11.10",
"dayjs": "^1.11.11",
"diff": "^5.2.0",
"flag-icons": "^7.2.1",
"hast-util-to-jsx-runtime": "^2.3.0",
"highlight.js": "^11.9.0",
"immer": "^10.0.4",
"immer": "^10.1.1",
"js-md5": "^0.8.3",
"lowlight": "^3.1.0",
"mustache": "^4.2.0",
"qrcode": "^1.5.3",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-error-boundary": "^4.0.13",
"react-router-dom": "^6.23.0",
"react-router-dom": "^6.23.1",
"react-transition-group": "^4.4.5",
"react-window": "^1.8.10",
"recharts": "^2.12.6",
"recharts": "^2.12.7",
"trackjs": "^3.10.4",
"typescript-parsec": "^0.3.4",
"yaml": "^2.4.1"
"yaml": "^2.4.2"
},
"devDependencies": {
"@lingui/cli": "^4.10.0",
"@lingui/macro": "^4.10.0",
"@lingui/react": "^4.10.0",
"@lingui/cli": "^4.11.0",
"@lingui/swc-plugin": "^4.0.7",
"@lingui/vite-plugin": "^4.10.0",
"@storybook/addon-essentials": "^8.0.9",
"@storybook/addon-links": "^8.0.9",
"@storybook/blocks": "^8.0.9",
"@storybook/react": "^8.0.9",
"@storybook/react-vite": "^8.0.9",
"@storybook/test": "8.0.9",
"@testing-library/jest-dom": "^6.4.2",
"@lingui/vite-plugin": "^4.11.0",
"@storybook/addon-essentials": "^8.1.1",
"@storybook/addon-links": "^8.1.1",
"@storybook/blocks": "^8.1.1",
"@storybook/react": "^8.1.1",
"@storybook/react-vite": "^8.1.1",
"@storybook/test": "^8.1.1",
"@testing-library/jest-dom": "^6.4.5",
"@types/d3": "^7.4.3",
"@types/diff": "^5.2.0",
"@types/diff": "^5.2.1",
"@types/mustache": "^4.2.5",
"@types/qrcode": "^1.5.5",
"@types/react": "^18.2.79",
"@types/react-dom": "^18.2.25",
"@types/react": "^18.3.2",
"@types/react-dom": "^18.3.0",
"@types/react-window": "^1.8.8",
"@typescript-eslint/eslint-plugin": "^7.7.1",
"@typescript-eslint/parser": "^7.7.1",
"@typescript-eslint/eslint-plugin": "^7.10.0",
"@typescript-eslint/parser": "^7.10.0",
"@vitejs/plugin-react-swc": "~3.6.0",
"@vitest/coverage-v8": "^1.5.2",
"@vitest/ui": "^1.5.2",
"@vitest/coverage-v8": "^1.6.0",
"@vitest/ui": "^1.6.0",
"babel-plugin-macros": "3.1.0",
"esbuild": "^0.20.2",
"esbuild": "^0.21.3",
"eslint": "^8.57.0",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.6",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-react-refresh": "^0.4.7",
"eslint-plugin-storybook": "^0.8.0",
"husky": "^9.0.11",
"lint-staged": "^15.2.2",
"prettier": "^3.2.5",
"prettier-plugin-organize-imports": "^3.2.4",
"prop-types": "15",
"react-refresh": "^0.14.0",
"storybook": "^8.0.9",
"react-refresh": "^0.14.2",
"storybook": "^8.1.1",
"tsc-files": "^1.1.4",
"type-fest": "^4.17.0",
"type-fest": "^4.18.2",
"typescript": "^5.4.5",
"unique-names-generator": "^4.7.1",
"uuid": "^9.0.1",
"vite": "^5.2.10",
"vite": "^5.2.11",
"vite-plugin-mock-dev-server": "^1.5.0",
"vite-plugin-svgr": "^4.2.0",
"vitest": "^1.5.2",
"web-vitals": "^3.5.2"
"vitest": "^1.6.0",
"web-vitals": "^4.0.0"
},
"browserslist": {
"production": [
Expand Down
16 changes: 8 additions & 8 deletions src/reportWebVitals.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { ReportHandler } from 'web-vitals'
import { Metric, ReportOpts } from 'web-vitals'

const reportWebVitals = (onPerfEntry?: ReportHandler) => {
const reportWebVitals = (onPerfEntry?: (metric: Metric) => void, opts?: ReportOpts | undefined) => {
if (onPerfEntry && onPerfEntry instanceof Function) {
void import('web-vitals').then(({ onCLS, onFID, onFCP, onLCP, onTTFB }) => {
onCLS(onPerfEntry)
onFID(onPerfEntry)
onFCP(onPerfEntry)
onLCP(onPerfEntry)
onTTFB(onPerfEntry)
void import('web-vitals').then(({ onCLS, onINP, onFCP, onLCP, onTTFB }) => {
onCLS(onPerfEntry, opts)
onINP(onPerfEntry, opts)
onFCP(onPerfEntry, opts)
onLCP(onPerfEntry, opts)
onTTFB(onPerfEntry, opts)
})
}
}
Expand Down
Loading

0 comments on commit ef63885

Please sign in to comment.