Skip to content

Commit

Permalink
chore(react-persona): migrate to new package structure (#25737)
Browse files Browse the repository at this point in the history
  • Loading branch information
TristanWatanabe authored Nov 22, 2022
1 parent 79a448b commit fafaced
Show file tree
Hide file tree
Showing 17 changed files with 24 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "chore: Migrate to new package structure.",
"packageName": "@fluentui/react-persona",
"email": "tristan.watanabe@gmail.com",
"dependentChangeType": "patch"
}
5 changes: 3 additions & 2 deletions packages/react-components/react-persona/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
bundle-size/
config/
coverage/
e2e/
docs/
etc/
node_modules/
src/
stories/
dist/types/
temp/
__fixtures__
Expand All @@ -16,7 +17,7 @@ __tests__
*.api.json
*.log
*.spec.*
*.stories.*
*.cy.*
*.test.*
*.yml

Expand Down
2 changes: 1 addition & 1 deletion packages/react-components/react-persona/.storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const rootMain = require('../../../../.storybook/main');

module.exports = /** @type {Omit<import('../../../../.storybook/main'), 'typescript'|'babel'>} */ ({
...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) };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Here's how the API of v8's `Persona` compares to the one from v9's `Persona` com
- ```
```

- `imageShouldFadeIn` => NOT SUPPORTED
- `isOutOfOffice` => Use the `outOfOffice` prop of the `presence` slot. E.g.: `presence={{ outOfOffice: true }}`
- `presence` => Use the `status` prop of the `presence` slot. E.g.: `presence={{ status: 'away' }}`
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import { isConformant } from '../../common/isConformant';
import { isConformant } from '../../testing/isConformant';
import { omit } from '@fluentui/react-utilities/src/utils/omit';
import { Persona } from './Persona';
import { personaClassNames } from './usePersonaStyles';
Expand Down
2 changes: 1 addition & 1 deletion packages/react-components/react-persona/tsconfig.lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"types": ["static-assets", "environment"]
},
"exclude": [
"./src/common/**",
"./src/testing/**",
"**/*.spec.ts",
"**/*.spec.tsx",
"**/*.test.ts",
Expand Down
10 changes: 9 additions & 1 deletion packages/react-components/react-persona/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
}

0 comments on commit fafaced

Please sign in to comment.