Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(react-overflow): migrate to new package structure #25524

Merged
merged 3 commits into from
Nov 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "chore: Migrate to new package structure.",
"packageName": "@fluentui/react-overflow",
"email": "[email protected]",
"dependentChangeType": "none"
}
5 changes: 3 additions & 2 deletions packages/react-components/react-overflow/.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
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 @@ -416,7 +416,7 @@ describe('Overflow', () => {
cy.get(`[${selectors.divider}]`).should('have.length', 1);
});

it.only('should remove overflow menu if the last overflowed item can take its place', () => {
it('should remove overflow menu if the last overflowed item can take its place', () => {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing .only here because it triggers a lint error below and it actually resulted in only this cypress test being run which i'm not sure was intentional or not @ling1726 :

  419:3  error  'it.only' is restricted from being used. it.only should only be used during test development 

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whoops, that's definitely not intentional, thx for correcting this

const mapHelper = new Array(10).fill(0).map((_, i) => i);
mount(
<Container>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"extends": "../tsconfig.json",
"extends": "./tsconfig.json",
"compilerOptions": {
"isolatedModules": false,
"types": ["node", "cypress", "cypress-storybook/cypress", "cypress-real-events"],
"lib": ["ES2019", "dom"]
},
"include": ["**/*.ts", "**/*.tsx"]
"include": ["**/*.cy.ts", "**/*.cy.tsx"]
}
3 changes: 3 additions & 0 deletions packages/react-components/react-overflow/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
},
{
"path": "./.storybook/tsconfig.json"
},
{
"path": "./tsconfig.cy.json"
}
]
}
11 changes: 10 additions & 1 deletion packages/react-components/react-overflow/tsconfig.lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@
"inlineSources": true,
"types": ["static-assets", "environment"]
},
"exclude": ["**/*.spec.ts", "**/*.spec.tsx", "**/*.test.ts", "**/*.test.tsx", "**/*.stories.ts", "**/*.stories.tsx"],
"exclude": [
"**/*.spec.ts",
"**/*.spec.tsx",
"**/*.test.ts",
"**/*.test.tsx",
"**/*.stories.ts",
"**/*.stories.tsx",
"**/*.cy.ts",
"**/*.cy.tsx"
],
"include": ["./src/**/*.ts", "./src/**/*.tsx"]
}