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

[core] Upgrade the dependencies #17612

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 8 additions & 1 deletion .eslintrc.js
Expand Up @@ -37,10 +37,17 @@ module.exports = {
'no-constant-condition': 'error',
// Airbnb use error
'no-param-reassign': 'off',
'prefer-object-spread': 'off',
'max-classes-per-file': 'off', // Doesn't matter
'react/state-in-constructor': 'off', // Doesn't matter
'react/static-property-placement': 'off', // Non compatible with TypeScript classes
'react/jsx-props-no-spreading': 'off', // It should
'react/jsx-fragments': 'off', // Can't use ref
'no-prototype-builtins': 'off',
'prefer-arrow-callback': ['error', { allowNamedFunctions: true }],
'prefer-destructuring': 'off', // Destructuring harm grep potential.

'jsx-a11y/control-has-associated-label': 'off',
'jsx-a11y/label-has-associated-control': 'off',
'jsx-a11y/label-has-for': 'off', // deprecated
'jsx-a11y/no-autofocus': 'off', // We are a library, people do what they want.
Expand Down Expand Up @@ -96,7 +103,7 @@ module.exports = {
},
rules: {
// does not work with wildcard imports. Mistakes will throw at runtime anyway
'import/named': false,
'import/named': 'off',
// for expect style assertions
'no-unused-expressions': 'off',

Expand Down
18 changes: 9 additions & 9 deletions docs/package.json
Expand Up @@ -36,7 +36,7 @@
"@types/json2mq": "^0.2.0",
"@types/react-autosuggest": "^9.3.11",
"@types/react-dom": "^16.9.0",
"@types/react-router-dom": "^4.3.5",
"@types/react-router-dom": "^5.1.0",
"@types/react-select": "^3.0.4",
"@types/react-swipeable-views": "^0.13.0",
"@types/react-text-mask": "^5.4.6",
Expand All @@ -59,11 +59,11 @@
"clean-css": "^4.1.11",
"clipboard-copy": "^3.0.0",
"clsx": "^1.0.2",
"core-js": "^2.6.5",
"cross-env": "^5.2.1",
"core-js": "^3.2.1",
"cross-env": "^6.0.0",
"css-loader": "^3.1.0",
"css-mediaquery": "^0.1.2",
"date-fns": "^2.0.1",
"date-fns": "^2.4.1",
"deepmerge": "^4.0.0",
"docsearch.js": "^2.6.3",
"doctrine": "^3.0.0",
Expand All @@ -77,28 +77,28 @@
"json2mq": "^0.2.0",
"jss": "^10.0.0",
"jss-plugin-template": "^10.0.0",
"jss-rtl": "^0.2.3",
"jss-rtl": "^0.3.0",
"lodash": "^4.17.15",
"lz-string": "^1.4.4",
"markdown-to-jsx": "^6.10.2",
"marked": "^0.7.0",
"material-table": "^1.50.0",
"material-ui-popup-state": "^1.4.1",
"next": "8.1.0",
"notistack": "^0.8.9",
"notistack": "^0.9.2",
"nprogress": "^0.2.0",
"postcss": "^7.0.18",
"prismjs": "^1.17.1",
"prop-types": "^15.7.2",
"raw-loader": "^1.0.0",
"raw-loader": "^3.1.0",
"react": "^16.10.1",
"react-autosuggest": "^9.4.3",
"react-docgen": "^5.0.0-beta.1",
"react-dom": "^16.10.1",
"react-draggable": "^3.0.5",
"react-draggable": "^4.0.0",
"react-final-form": "^6.3.0",
"react-frame-component": "^4.1.1",
"react-inspector": "^3.0.2",
"react-inspector": "^4.0.0",
Copy link
Member

Choose a reason for hiding this comment

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

What insight did you gain over #17605?

Copy link
Member Author

Choose a reason for hiding this comment

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

It seems to break SSR too.

I'm not sure about using our tree view, it seems that a non-obvious layer of UI is required to reproduce Chrome output.

"react-number-format": "^4.0.8",
"react-redux": "^7.1.1",
"react-router": "^5.0.0",
Expand Down
4 changes: 1 addition & 3 deletions docs/src/pages/components/material-icons/SearchIcons.js
Expand Up @@ -197,9 +197,7 @@ let DialogDetails = props => {
<MarkdownElement
className={classes.markdown}
onClick={handleClick}
text={`\`\`\`js\nimport ${selectedIcon.key}Icon from '@material-ui/icons/${
selectedIcon.key
}';\n\`\`\``}
text={`\`\`\`js\nimport ${selectedIcon.key}Icon from '@material-ui/icons/${selectedIcon.key}';\n\`\`\``}
/>
<Link
className={classes.import}
Expand Down
14 changes: 7 additions & 7 deletions package.json
Expand Up @@ -46,7 +46,7 @@
"@babel/plugin-proposal-class-properties": "^7.5.5",
"@babel/plugin-proposal-object-rest-spread": "^7.5.5",
"@babel/plugin-transform-object-assign": "^7.2.0",
"@babel/plugin-transform-runtime": "~7.5.5",
"@babel/plugin-transform-runtime": "^7.6.2",
"@babel/preset-env": "^7.6.0",
"@babel/preset-react": "^7.0.0",
"@babel/register": "^7.6.0",
Expand Down Expand Up @@ -78,13 +78,13 @@
"chai": "^4.1.2",
"chai-dom": "^1.8.1",
"compression-webpack-plugin": "^3.0.0",
"cross-env": "^5.2.1",
"cross-env": "^6.0.0",
"danger": "^9.1.8",
"dtslint": "^0.9.3",
"enzyme": "^3.9.0",
"enzyme-adapter-react-16": "^1.14.0",
"eslint": "^5.9.0",
"eslint-config-airbnb": "^17.1.1",
"eslint": "~6.4.0",
"eslint-config-airbnb": "^18.0.1",
"eslint-config-prettier": "^6.2.0",
"eslint-import-resolver-webpack": "^0.11.0",
"eslint-plugin-babel": "^5.3.0",
Expand All @@ -107,9 +107,9 @@
"karma-sourcemap-loader": "^0.3.7",
"karma-webpack": "^4.0.2",
"lerna": "^3.16.4",
"mocha": "^6.2.0",
"mocha": "^6.2.1",
"nyc": "^14.1.1",
"prettier": "1.17.0",
"prettier": "1.18.2",
Copy link
Member

Choose a reason for hiding this comment

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

What insight did you gain over #16717?

"prop-types": "^15.7.2",
"puppeteer": "^1.20.0",
"react": "^16.10.1",
Expand All @@ -123,7 +123,7 @@
"rollup-plugin-size-snapshot": "^0.10.0",
"rollup-plugin-terser": "^5.1.1",
"sinon": "^7.0.0",
"size-limit": "^0.21.0",
"size-limit": "^2.0.0",
Copy link
Member

Choose a reason for hiding this comment

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

What insights did you gain over #16975?

"ts-node": "^8.3.0",
"tslint": "5.14.0",
"typescript": "3.2.4",
Expand Down
2 changes: 1 addition & 1 deletion packages/material-ui-icons/package.json
Expand Up @@ -51,7 +51,7 @@
"mustache": "^3.0.2",
"svgo": "^1.3.0",
"temp": "^0.9.0",
"yargs": "^13.3.0"
"yargs": "^14.0.0"
},
"sideEffects": false,
"publishConfig": {
Expand Down
4 changes: 1 addition & 3 deletions packages/material-ui-icons/scripts/download.js
Expand Up @@ -31,9 +31,7 @@ function downloadIcon(icon) {
Object.keys(themeMap).map(async theme => {
const formattedTheme = themeMap[theme].split('_').join('');
const response = await fetch(
`https://fonts.gstatic.com/s/i/materialicons${formattedTheme}/${icon.name}/v${
icon.version
}/24px.svg`,
`https://fonts.gstatic.com/s/i/materialicons${formattedTheme}/${icon.name}/v${icon.version}/24px.svg`,
);
if (response.status !== 200) {
throw new Error(`status ${response.status}`);
Expand Down
2 changes: 1 addition & 1 deletion packages/material-ui-styles/src/ThemeProvider/nested.js
@@ -1,3 +1,3 @@
const hasSymbol = typeof Symbol === 'function' && Symbol.for;

export default (hasSymbol ? Symbol.for('mui.nested') : '__THEME_NESTED__');
export default hasSymbol ? Symbol.for('mui.nested') : '__THEME_NESTED__';
2 changes: 1 addition & 1 deletion packages/material-ui-styles/src/withStyles/withStyles.d.ts
Expand Up @@ -22,7 +22,7 @@ export interface CSSProperties extends BaseCSSProperties {
}

export type BaseCreateCSSProperties<Props extends object = {}> = {
[P in keyof BaseCSSProperties]: BaseCSSProperties[P] | ((props: Props) => BaseCSSProperties[P])
[P in keyof BaseCSSProperties]: BaseCSSProperties[P] | ((props: Props) => BaseCSSProperties[P]);
};

export interface CreateCSSProperties<Props extends object = {}>
Expand Down
4 changes: 2 additions & 2 deletions packages/material-ui-utils/src/getDisplayName.test.js
Expand Up @@ -13,13 +13,13 @@ describe('utils/getDisplayName.js', () => {
}

class SomeOtherComponent extends React.Component {
static displayName = 'CustomDisplayName';

render() {
return <div />;
}
}

SomeOtherComponent.displayName = 'CustomDisplayName';

function YetAnotherComponent() {
return <div />;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/material-ui/src/styles/overrides.d.ts
Expand Up @@ -98,7 +98,7 @@ import { TouchRippleClassKey } from '../ButtonBase/TouchRipple';
import { TypographyClassKey } from '../Typography';

export type Overrides = {
[Name in keyof ComponentNameToClassKey]?: Partial<StyleRules<ComponentNameToClassKey[Name]>>
[Name in keyof ComponentNameToClassKey]?: Partial<StyleRules<ComponentNameToClassKey[Name]>>;
};

export interface ComponentNameToClassKey {
Expand Down
2 changes: 1 addition & 1 deletion packages/material-ui/src/styles/props.d.ts
Expand Up @@ -98,7 +98,7 @@ import { TypographyProps } from '../Typography';
import { WithWidthOptions } from '../withWidth';

export type ComponentsProps = {
[Name in keyof ComponentsPropsList]?: Partial<ComponentsPropsList[Name]>
[Name in keyof ComponentsPropsList]?: Partial<ComponentsPropsList[Name]>;
};

export interface ComponentsPropsList {
Expand Down
20 changes: 10 additions & 10 deletions packages/material-ui/src/test-utils/createMount.js
Expand Up @@ -12,16 +12,6 @@ import { mount as enzymeMount } from 'enzyme';
*/
// eslint-disable-next-line react/prefer-stateless-function
class Mode extends React.Component {
static propTypes = {
/**
* this is essentially children. However we can't use children because then
* using `wrapper.setProps({ children })` would work differently if this component
* would be the root.
*/
__element: PropTypes.element.isRequired,
__strict: PropTypes.bool.isRequired,
};

render() {
// Excess props will come from e.g. enzyme setProps
const { __element, __strict, ...other } = this.props;
Expand All @@ -31,6 +21,16 @@ class Mode extends React.Component {
}
}

Mode.propTypes = {
/**
* this is essentially children. However we can't use children because then
* using `wrapper.setProps({ children })` would work differently if this component
* would be the root.
*/
__element: PropTypes.element.isRequired,
__strict: PropTypes.bool.isRequired,
};

// Generate an enhanced mount function.
export default function createMount(options = {}) {
const { mount = enzymeMount, strict: globalStrict, ...globalEnzymeOptions } = options;
Expand Down
1 change: 1 addition & 0 deletions scripts/sizeSnapshot/upload.js
Expand Up @@ -8,6 +8,7 @@ const snapshotDestPath = path.join(workspaceRoot, 'size-snapshot.json');

async function main() {
function uploadArtifact(artifact, options) {
// eslint-disable-next-line no-async-promise-executor
return new Promise(async (resolve, reject) => {
const s3 = new aws.S3();

Expand Down