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

Fix minor unaddressed TS 4 upgrade PR comments #18027

Merged
merged 2 commits into from
May 4, 2021
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": "Add parameter to ComboBox internal method to avoid cast",
"packageName": "@fluentui/react",
"email": "[email protected]",
"dependentChangeType": "none"
}
14 changes: 2 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
"vrtest": "cd apps && cd vr-tests && yarn screener"
},
"devDependencies": {
"@microsoft/api-extractor": "7.13.0",
"@storybook/addon-a11y": "6.0.28",
"@storybook/addon-actions": "6.0.28",
"@storybook/addon-info": "6.0.0-alpha.2",
Expand Down Expand Up @@ -150,17 +151,14 @@
"@fluentui/make-styles/stylis",
"@fluentui/react-bindings/stylis",
"@fluentui/react-northstar-fela-renderer/stylis",
"@fluentui/web-components/**/typescript",
"@fluentui/web-components/@microsoft/eslint-config-fast-dna",
"@fluentui/web-components/@storybook/**",
"@fluentui/web-components/build",
Copy link
Member Author

Choose a reason for hiding this comment

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

This is not a package

"@fluentui/web-components/build/**",
"@fluentui/web-components/ts-loader",
"@fluentui/web-components/ts-loader/**",
"@fluentui/web-components/ts-node",
"@fluentui/web-components/ts-node/**",
"@fluentui/web-components/typescript",
"@fluentui/web-components/typescript/**",
Copy link
Member Author

Choose a reason for hiding this comment

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

typescript has no dependencies

"@fluentui/web-components/**/typescript",
"@fluentui/web-components/webpack"
]
},
Expand All @@ -184,14 +182,6 @@
"scripts/package.json"
],
"versionGroups": [
{
Copy link
Member Author

Choose a reason for hiding this comment

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

This is unneeded because test-bundles no longer uses a different webpack version

"packages": [
"test-bundles"
],
"dependencies": [
"webpack"
]
},
{
"packages": [
"@fluentui/web-components"
Expand Down
6 changes: 3 additions & 3 deletions packages/react/src/components/ComboBox/ComboBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import {
Async,
EventGroup,
getPropsWithDefaults,
IRenderFunction,
} from '../../Utilities';
import { Callout, DirectionalHint } from '../../Callout';
import { Checkbox } from '../../Checkbox';
Expand Down Expand Up @@ -445,8 +446,7 @@ class ComboBoxInternal extends React.Component<IComboBoxInternalProps, IComboBox
{onRenderLabel({ props: this.props, multiselectAccessibleText }, this._onRenderLabel)}
{comboBoxWrapper}
{(persistMenu || isOpen) &&
// eslint-disable-next-line @typescript-eslint/no-explicit-any
(onRenderContainer as any)(
onRenderContainer(
{
...this.props,
onRenderList,
Expand Down Expand Up @@ -1204,7 +1204,7 @@ class ComboBoxInternal extends React.Component<IComboBoxInternalProps, IComboBox
}

// Render Callout container and pass in list
private _onRenderContainer = (props: IComboBoxProps): JSX.Element => {
private _onRenderContainer = (props: IComboBoxProps, defaultRender: IRenderFunction<IComboBoxProps>): JSX.Element => {
const {
onRenderList,
calloutProps,
Expand Down
1 change: 0 additions & 1 deletion scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
"@babel/standalone": "^7.10.4",
"@fluentui/eslint-plugin": "^1.2.0",
"@mdx-js/loader": "^1.5.5",
"@microsoft/api-extractor": "7.13.0",
"@microsoft/load-themed-styles": "^1.10.26",
"@microsoft/loader-load-themed-styles": "^1.7.205",
"@octokit/rest": "^16.28.2",
Expand Down
6 changes: 5 additions & 1 deletion scripts/scrub.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,11 @@ async function run() {

// do these before deleting node_nodules
console.log('\nClearing Jest cache...');
spawn(os.platform() === 'win32' ? 'npx.cmd' : 'npx', ['jest', '--clearCache']);
try {
Copy link
Member

Choose a reason for hiding this comment

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

I have never seen this script being used, can we just remove it ?

Copy link
Contributor

Choose a reason for hiding this comment

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

+1, this is a ticking bomb IMHO for anyone not familiar with this monorepo setup - removing untracked files etc should be done manually by git by current user.

Copy link
Contributor

Choose a reason for hiding this comment

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

lets discuss this during @microsoft/fluentui-react-build sync

Copy link
Member Author

@ecraig12345 ecraig12345 May 4, 2021

Choose a reason for hiding this comment

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

This is never run automatically, and it explicitly requires confirmation when you start the script. It's intended to help recover the repo from a bad state, in a way compatible with Windows (IIRC git clean -fdx sometimes incorrectly handles symlinks on Windows), and that handles a couple caches that are outside the repo. In my experience this can be quite important at times, and not a "time bomb" for the reasons mentioned above.

spawn(os.platform() === 'win32' ? 'npx.cmd' : 'npx', ['jest', '--clearCache']);
} catch (err) {
console.error('Clearing jest cache failed, likely due to it or a dep not being installed.');
}
try {
console.log('\nAttempting to clear gulp-cache...');
const cache = require('gulp-cache');
Expand Down