From 66c20d1a302bac5ee6a304d68f16ce730a0a75ec Mon Sep 17 00:00:00 2001 From: georgewrmarshall Date: Thu, 14 Nov 2024 17:01:47 -0800 Subject: [PATCH 1/4] chore: storybook clean up --- apps/storybook-react/.storybook/main.ts | 4 ---- apps/storybook-react/package.json | 1 + apps/storybook-react/vite.config.ts | 11 +---------- yarn.lock | 10 ++++++++++ 4 files changed, 12 insertions(+), 14 deletions(-) diff --git a/apps/storybook-react/.storybook/main.ts b/apps/storybook-react/.storybook/main.ts index 6af9f2e9..469e2be4 100644 --- a/apps/storybook-react/.storybook/main.ts +++ b/apps/storybook-react/.storybook/main.ts @@ -38,10 +38,6 @@ const config: StorybookConfig = { __dirname, '../../../node_modules/@metamask/design-tokens', ), - '@components': path.resolve( - __dirname, - '../packages/react-components/src', - ), }; } return config; diff --git a/apps/storybook-react/package.json b/apps/storybook-react/package.json index 3672e8af..634942e3 100644 --- a/apps/storybook-react/package.json +++ b/apps/storybook-react/package.json @@ -18,6 +18,7 @@ "@storybook/addon-links": "^8.3.5", "@storybook/addon-onboarding": "^8.3.5", "@storybook/blocks": "^8.3.5", + "@storybook/manager-api": "^8.3.5", "@storybook/react": "^8.3.5", "@storybook/react-vite": "^8.3.5", "@storybook/test": "^8.3.5", diff --git a/apps/storybook-react/vite.config.ts b/apps/storybook-react/vite.config.ts index 0a375b99..ba5f2675 100644 --- a/apps/storybook-react/vite.config.ts +++ b/apps/storybook-react/vite.config.ts @@ -1,14 +1,5 @@ -// import path from 'path'; import { defineConfig } from 'vite'; export default defineConfig({ - resolve: { - // TO DO: Update when react component package is created - // alias: { - // '@components': path.resolve( - // __dirname, - // '../packages/react-components/src', - // ), - // }, - }, + resolve: {}, }); diff --git a/yarn.lock b/yarn.lock index 56295069..d29ea403 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3416,6 +3416,7 @@ __metadata: "@storybook/addon-links": "npm:^8.3.5" "@storybook/addon-onboarding": "npm:^8.3.5" "@storybook/blocks": "npm:^8.3.5" + "@storybook/manager-api": "npm:^8.3.5" "@storybook/react": "npm:^8.3.5" "@storybook/react-vite": "npm:^8.3.5" "@storybook/test": "npm:^8.3.5" @@ -4841,6 +4842,15 @@ __metadata: languageName: node linkType: hard +"@storybook/manager-api@npm:^8.3.5": + version: 8.4.4 + resolution: "@storybook/manager-api@npm:8.4.4" + peerDependencies: + storybook: ^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0 + checksum: 10/9eac4488f55e1860940e0e850a48f4278a7b6e6325c7381007447626715a8f8e52d6f876f6caaa2597787fb19c40a33f96d34b56558190f7be4772cac7805ebc + languageName: node + linkType: hard + "@storybook/node-logger@npm:6.5.16": version: 6.5.16 resolution: "@storybook/node-logger@npm:6.5.16" From 05190f65b94d4db3642faa445be65beec5705bde Mon Sep 17 00:00:00 2001 From: georgewrmarshall Date: Thu, 14 Nov 2024 17:08:14 -0800 Subject: [PATCH 2/4] chore: removing dependency for storybook manager --- apps/storybook-react/package.json | 1 - yarn.lock | 10 ---------- 2 files changed, 11 deletions(-) diff --git a/apps/storybook-react/package.json b/apps/storybook-react/package.json index 634942e3..3672e8af 100644 --- a/apps/storybook-react/package.json +++ b/apps/storybook-react/package.json @@ -18,7 +18,6 @@ "@storybook/addon-links": "^8.3.5", "@storybook/addon-onboarding": "^8.3.5", "@storybook/blocks": "^8.3.5", - "@storybook/manager-api": "^8.3.5", "@storybook/react": "^8.3.5", "@storybook/react-vite": "^8.3.5", "@storybook/test": "^8.3.5", diff --git a/yarn.lock b/yarn.lock index d29ea403..56295069 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3416,7 +3416,6 @@ __metadata: "@storybook/addon-links": "npm:^8.3.5" "@storybook/addon-onboarding": "npm:^8.3.5" "@storybook/blocks": "npm:^8.3.5" - "@storybook/manager-api": "npm:^8.3.5" "@storybook/react": "npm:^8.3.5" "@storybook/react-vite": "npm:^8.3.5" "@storybook/test": "npm:^8.3.5" @@ -4842,15 +4841,6 @@ __metadata: languageName: node linkType: hard -"@storybook/manager-api@npm:^8.3.5": - version: 8.4.4 - resolution: "@storybook/manager-api@npm:8.4.4" - peerDependencies: - storybook: ^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0 - checksum: 10/9eac4488f55e1860940e0e850a48f4278a7b6e6325c7381007447626715a8f8e52d6f876f6caaa2597787fb19c40a33f96d34b56558190f7be4772cac7805ebc - languageName: node - linkType: hard - "@storybook/node-logger@npm:6.5.16": version: 6.5.16 resolution: "@storybook/node-logger@npm:6.5.16" From d34e3820c535b1e9221464ea7d602f9d5973179f Mon Sep 17 00:00:00 2001 From: georgewrmarshall Date: Thu, 14 Nov 2024 17:14:22 -0800 Subject: [PATCH 3/4] chore: updating vite config --- apps/storybook-react/package.json | 1 + apps/storybook-react/vite.config.ts | 3 ++- yarn.lock | 31 +++++++++++++++++++++++++---- 3 files changed, 30 insertions(+), 5 deletions(-) diff --git a/apps/storybook-react/package.json b/apps/storybook-react/package.json index 3672e8af..a750ee0a 100644 --- a/apps/storybook-react/package.json +++ b/apps/storybook-react/package.json @@ -24,6 +24,7 @@ "@types/prop-types": "^15", "@types/react": "^18.2.0", "@types/react-dom": "^18.2.0", + "@vitejs/plugin-react": "^4.3.3", "autoprefixer": "^10.4.20", "prop-types": "^15.8.1", "react": "^18.2.0", diff --git a/apps/storybook-react/vite.config.ts b/apps/storybook-react/vite.config.ts index ba5f2675..0466183a 100644 --- a/apps/storybook-react/vite.config.ts +++ b/apps/storybook-react/vite.config.ts @@ -1,5 +1,6 @@ import { defineConfig } from 'vite'; +import react from '@vitejs/plugin-react'; export default defineConfig({ - resolve: {}, + plugins: [react()], }); diff --git a/yarn.lock b/yarn.lock index 56295069..14fa97df 100644 --- a/yarn.lock +++ b/yarn.lock @@ -77,7 +77,7 @@ __metadata: languageName: node linkType: hard -"@babel/core@npm:^7.1.0, @babel/core@npm:^7.12.10, @babel/core@npm:^7.12.3, @babel/core@npm:^7.13.16, @babel/core@npm:^7.18.9, @babel/core@npm:^7.20.0, @babel/core@npm:^7.23.5, @babel/core@npm:^7.7.2, @babel/core@npm:^7.8.0": +"@babel/core@npm:^7.1.0, @babel/core@npm:^7.12.10, @babel/core@npm:^7.12.3, @babel/core@npm:^7.13.16, @babel/core@npm:^7.18.9, @babel/core@npm:^7.20.0, @babel/core@npm:^7.23.5, @babel/core@npm:^7.25.2, @babel/core@npm:^7.7.2, @babel/core@npm:^7.8.0": version: 7.26.0 resolution: "@babel/core@npm:7.26.0" dependencies: @@ -1358,7 +1358,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-react-jsx-self@npm:^7.0.0": +"@babel/plugin-transform-react-jsx-self@npm:^7.0.0, @babel/plugin-transform-react-jsx-self@npm:^7.24.7": version: 7.25.9 resolution: "@babel/plugin-transform-react-jsx-self@npm:7.25.9" dependencies: @@ -1369,7 +1369,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-react-jsx-source@npm:^7.0.0": +"@babel/plugin-transform-react-jsx-source@npm:^7.0.0, @babel/plugin-transform-react-jsx-source@npm:^7.24.7": version: 7.25.9 resolution: "@babel/plugin-transform-react-jsx-source@npm:7.25.9" dependencies: @@ -3422,6 +3422,7 @@ __metadata: "@types/prop-types": "npm:^15" "@types/react": "npm:^18.2.0" "@types/react-dom": "npm:^18.2.0" + "@vitejs/plugin-react": "npm:^4.3.3" autoprefixer: "npm:^10.4.20" prop-types: "npm:^15.8.1" react: "npm:^18.2.0" @@ -5273,7 +5274,7 @@ __metadata: languageName: node linkType: hard -"@types/babel__core@npm:^7.0.0, @types/babel__core@npm:^7.1.14, @types/babel__core@npm:^7.18.0": +"@types/babel__core@npm:^7.0.0, @types/babel__core@npm:^7.1.14, @types/babel__core@npm:^7.18.0, @types/babel__core@npm:^7.20.5": version: 7.20.5 resolution: "@types/babel__core@npm:7.20.5" dependencies: @@ -5780,6 +5781,21 @@ __metadata: languageName: node linkType: hard +"@vitejs/plugin-react@npm:^4.3.3": + version: 4.3.3 + resolution: "@vitejs/plugin-react@npm:4.3.3" + dependencies: + "@babel/core": "npm:^7.25.2" + "@babel/plugin-transform-react-jsx-self": "npm:^7.24.7" + "@babel/plugin-transform-react-jsx-source": "npm:^7.24.7" + "@types/babel__core": "npm:^7.20.5" + react-refresh: "npm:^0.14.2" + peerDependencies: + vite: ^4.2.0 || ^5.0.0 + checksum: 10/816b47c54aefce198ce2fb2b3e63b5f158ab33b04713dbec0e780a89c5126d4ea6b08544972464c43096b16e90e7f467fcf19692fad30d4f8ca5bf9a386f38b3 + languageName: node + linkType: hard + "@vitest/expect@npm:2.0.5": version: 2.0.5 resolution: "@vitest/expect@npm:2.0.5" @@ -16919,6 +16935,13 @@ __metadata: languageName: node linkType: hard +"react-refresh@npm:^0.14.2": + version: 0.14.2 + resolution: "react-refresh@npm:0.14.2" + checksum: 10/512abf97271ab8623486061be04b608c39d932e3709f9af1720b41573415fa4993d0009fa5138b6705b60a98f4102f744d4e26c952b14f41a0e455521c6be4cc + languageName: node + linkType: hard + "react-refresh@npm:^0.4.0": version: 0.4.3 resolution: "react-refresh@npm:0.4.3" From 3febc015bd928bc67fb3b5b8ed4c27c340cef04e Mon Sep 17 00:00:00 2001 From: georgewrmarshall Date: Thu, 14 Nov 2024 17:15:33 -0800 Subject: [PATCH 4/4] chore: lint fix --- apps/storybook-react/vite.config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/storybook-react/vite.config.ts b/apps/storybook-react/vite.config.ts index 0466183a..fabde1a8 100644 --- a/apps/storybook-react/vite.config.ts +++ b/apps/storybook-react/vite.config.ts @@ -1,5 +1,5 @@ -import { defineConfig } from 'vite'; import react from '@vitejs/plugin-react'; +import { defineConfig } from 'vite'; export default defineConfig({ plugins: [react()],