From 3e7f893c979b84ae382a4bc42079343ce804c2da Mon Sep 17 00:00:00 2001 From: Tristan Watanabe Date: Fri, 23 Dec 2022 19:20:43 -0500 Subject: [PATCH 1/2] chore: run migration generator --- packages/react-components/react-infobutton/.npmignore | 5 +++-- .../react-infobutton/.storybook/main.js | 2 +- .../react-infobutton/.storybook/tsconfig.json | 2 +- .../react-infobutton/{ => docs}/Spec.md | 0 .../src/components/InfoButton/InfoButton.test.tsx | 2 +- .../src/{common => testing}/isConformant.ts | 0 .../stories/Infobutton/InfoButtonBestPractices.md | 0 .../stories/Infobutton/InfoButtonDefault.stories.tsx | 0 .../stories/Infobutton/InfoButtonDescription.md | 0 .../stories/Infobutton/InfoButtonSize.stories.tsx | 0 .../{src => }/stories/Infobutton/index.stories.tsx | 0 .../react-infobutton/tsconfig.lib.json | 2 +- .../react-infobutton/tsconfig.spec.json | 10 +++++++++- 13 files changed, 16 insertions(+), 7 deletions(-) rename packages/react-components/react-infobutton/{ => docs}/Spec.md (100%) rename packages/react-components/react-infobutton/src/{common => testing}/isConformant.ts (100%) rename packages/react-components/react-infobutton/{src => }/stories/Infobutton/InfoButtonBestPractices.md (100%) rename packages/react-components/react-infobutton/{src => }/stories/Infobutton/InfoButtonDefault.stories.tsx (100%) rename packages/react-components/react-infobutton/{src => }/stories/Infobutton/InfoButtonDescription.md (100%) rename packages/react-components/react-infobutton/{src => }/stories/Infobutton/InfoButtonSize.stories.tsx (100%) rename packages/react-components/react-infobutton/{src => }/stories/Infobutton/index.stories.tsx (100%) diff --git a/packages/react-components/react-infobutton/.npmignore b/packages/react-components/react-infobutton/.npmignore index 52d2a7273a151d..f7ce568a6dbf7c 100644 --- a/packages/react-components/react-infobutton/.npmignore +++ b/packages/react-components/react-infobutton/.npmignore @@ -3,10 +3,11 @@ bundle-size/ config/ coverage/ -e2e/ +docs/ etc/ node_modules/ src/ +stories/ dist/types/ temp/ __fixtures__ @@ -16,7 +17,7 @@ __tests__ *.api.json *.log *.spec.* -*.stories.* +*.cy.* *.test.* *.yml diff --git a/packages/react-components/react-infobutton/.storybook/main.js b/packages/react-components/react-infobutton/.storybook/main.js index f57cfd09509e78..26536b61b387f6 100644 --- a/packages/react-components/react-infobutton/.storybook/main.js +++ b/packages/react-components/react-infobutton/.storybook/main.js @@ -2,7 +2,7 @@ const rootMain = require('../../../../.storybook/main'); module.exports = /** @type {Omit} */ ({ ...rootMain, - stories: [...rootMain.stories, '../src/**/*.stories.mdx', '../src/**/index.stories.@(ts|tsx)'], + stories: [...rootMain.stories, '../stories/**/*.stories.mdx', '../stories/**/index.stories.@(ts|tsx)'], addons: [...rootMain.addons], webpackFinal: (config, options) => { const localConfig = { ...rootMain.webpackFinal(config, options) }; diff --git a/packages/react-components/react-infobutton/.storybook/tsconfig.json b/packages/react-components/react-infobutton/.storybook/tsconfig.json index f9f60e1234ed49..ea89218a3d916f 100644 --- a/packages/react-components/react-infobutton/.storybook/tsconfig.json +++ b/packages/react-components/react-infobutton/.storybook/tsconfig.json @@ -6,5 +6,5 @@ "checkJs": true, "types": ["static-assets", "environment", "storybook__addons"] }, - "include": ["../src/**/*.stories.ts", "../src/**/*.stories.tsx", "*.js"] + "include": ["../stories/**/*.stories.ts", "../stories/**/*.stories.tsx", "*.js"] } diff --git a/packages/react-components/react-infobutton/Spec.md b/packages/react-components/react-infobutton/docs/Spec.md similarity index 100% rename from packages/react-components/react-infobutton/Spec.md rename to packages/react-components/react-infobutton/docs/Spec.md diff --git a/packages/react-components/react-infobutton/src/components/InfoButton/InfoButton.test.tsx b/packages/react-components/react-infobutton/src/components/InfoButton/InfoButton.test.tsx index a22e9cc47c03b6..cc3698d16f1b13 100644 --- a/packages/react-components/react-infobutton/src/components/InfoButton/InfoButton.test.tsx +++ b/packages/react-components/react-infobutton/src/components/InfoButton/InfoButton.test.tsx @@ -1,5 +1,5 @@ import { InfoButton } from './InfoButton'; -import { isConformant } from '../../common/isConformant'; +import { isConformant } from '../../testing/isConformant'; import { infoButtonClassNames } from './useInfoButtonStyles'; import type { RenderResult } from '@testing-library/react'; diff --git a/packages/react-components/react-infobutton/src/common/isConformant.ts b/packages/react-components/react-infobutton/src/testing/isConformant.ts similarity index 100% rename from packages/react-components/react-infobutton/src/common/isConformant.ts rename to packages/react-components/react-infobutton/src/testing/isConformant.ts diff --git a/packages/react-components/react-infobutton/src/stories/Infobutton/InfoButtonBestPractices.md b/packages/react-components/react-infobutton/stories/Infobutton/InfoButtonBestPractices.md similarity index 100% rename from packages/react-components/react-infobutton/src/stories/Infobutton/InfoButtonBestPractices.md rename to packages/react-components/react-infobutton/stories/Infobutton/InfoButtonBestPractices.md diff --git a/packages/react-components/react-infobutton/src/stories/Infobutton/InfoButtonDefault.stories.tsx b/packages/react-components/react-infobutton/stories/Infobutton/InfoButtonDefault.stories.tsx similarity index 100% rename from packages/react-components/react-infobutton/src/stories/Infobutton/InfoButtonDefault.stories.tsx rename to packages/react-components/react-infobutton/stories/Infobutton/InfoButtonDefault.stories.tsx diff --git a/packages/react-components/react-infobutton/src/stories/Infobutton/InfoButtonDescription.md b/packages/react-components/react-infobutton/stories/Infobutton/InfoButtonDescription.md similarity index 100% rename from packages/react-components/react-infobutton/src/stories/Infobutton/InfoButtonDescription.md rename to packages/react-components/react-infobutton/stories/Infobutton/InfoButtonDescription.md diff --git a/packages/react-components/react-infobutton/src/stories/Infobutton/InfoButtonSize.stories.tsx b/packages/react-components/react-infobutton/stories/Infobutton/InfoButtonSize.stories.tsx similarity index 100% rename from packages/react-components/react-infobutton/src/stories/Infobutton/InfoButtonSize.stories.tsx rename to packages/react-components/react-infobutton/stories/Infobutton/InfoButtonSize.stories.tsx diff --git a/packages/react-components/react-infobutton/src/stories/Infobutton/index.stories.tsx b/packages/react-components/react-infobutton/stories/Infobutton/index.stories.tsx similarity index 100% rename from packages/react-components/react-infobutton/src/stories/Infobutton/index.stories.tsx rename to packages/react-components/react-infobutton/stories/Infobutton/index.stories.tsx diff --git a/packages/react-components/react-infobutton/tsconfig.lib.json b/packages/react-components/react-infobutton/tsconfig.lib.json index 7f94e04299ed85..6f90cf95c005bd 100644 --- a/packages/react-components/react-infobutton/tsconfig.lib.json +++ b/packages/react-components/react-infobutton/tsconfig.lib.json @@ -10,7 +10,7 @@ "types": ["static-assets", "environment"] }, "exclude": [ - "./src/common/**", + "./src/testing/**", "**/*.spec.ts", "**/*.spec.tsx", "**/*.test.ts", diff --git a/packages/react-components/react-infobutton/tsconfig.spec.json b/packages/react-components/react-infobutton/tsconfig.spec.json index 469fcba4d7ba75..911456fe4b4d91 100644 --- a/packages/react-components/react-infobutton/tsconfig.spec.json +++ b/packages/react-components/react-infobutton/tsconfig.spec.json @@ -5,5 +5,13 @@ "outDir": "dist", "types": ["jest", "node"] }, - "include": ["**/*.spec.ts", "**/*.spec.tsx", "**/*.test.ts", "**/*.test.tsx", "**/*.d.ts"] + "include": [ + "**/*.spec.ts", + "**/*.spec.tsx", + "**/*.test.ts", + "**/*.test.tsx", + "**/*.d.ts", + "./src/testing/**/*.ts", + "./src/testing/**/*.tsx" + ] } From d7b0f4f1e7ec5366f454c9eb830cc29f3425e27a Mon Sep 17 00:00:00 2001 From: Tristan Watanabe Date: Fri, 23 Dec 2022 19:28:43 -0500 Subject: [PATCH 2/2] Change File --- ...ct-infobutton-02ac705a-5478-4e26-a4d8-16eca13f2d23.json | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 change/@fluentui-react-infobutton-02ac705a-5478-4e26-a4d8-16eca13f2d23.json diff --git a/change/@fluentui-react-infobutton-02ac705a-5478-4e26-a4d8-16eca13f2d23.json b/change/@fluentui-react-infobutton-02ac705a-5478-4e26-a4d8-16eca13f2d23.json new file mode 100644 index 00000000000000..be5c601df8d060 --- /dev/null +++ b/change/@fluentui-react-infobutton-02ac705a-5478-4e26-a4d8-16eca13f2d23.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "chore: migrate to new package structure.", + "packageName": "@fluentui/react-infobutton", + "email": "tristan.watanabe@gmail.com", + "dependentChangeType": "patch" +}