From 4b2bbb2957db6b8945516a57e4bf0680500bc451 Mon Sep 17 00:00:00 2001 From: Siriwat K Date: Fri, 2 Jul 2021 08:07:21 +0700 Subject: [PATCH 01/17] [SwitchBase] bring back `checked` and mark as deprecated (#27047) --- docs/src/pages/guides/migration-v4/migration-v4.md | 2 +- packages/material-ui/src/internal/SwitchBase.d.ts | 2 +- packages/material-ui/src/internal/SwitchBase.js | 7 +++++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/docs/src/pages/guides/migration-v4/migration-v4.md b/docs/src/pages/guides/migration-v4/migration-v4.md index c73a7f7874ac7d..ec22daec8e3162 100644 --- a/docs/src/pages/guides/migration-v4/migration-v4.md +++ b/docs/src/pages/guides/migration-v4/migration-v4.md @@ -1488,7 +1488,7 @@ You can use the [`collapse-rename-collapsedheight` codemod](https://github.com/m ### Switch -- Remove the second argument from `onChange`. You can pull out the checked state by accessing `event.target.checked`. +- Deprecate the second argument from `onChange`. You can pull out the checked state by accessing `event.target.checked`. ```diff function MySwitch() { diff --git a/packages/material-ui/src/internal/SwitchBase.d.ts b/packages/material-ui/src/internal/SwitchBase.d.ts index a34ae08c71cbf1..5280d11d091193 100644 --- a/packages/material-ui/src/internal/SwitchBase.d.ts +++ b/packages/material-ui/src/internal/SwitchBase.d.ts @@ -61,7 +61,7 @@ export interface SwitchBaseProps * You can pull out the new value by accessing `event.target.value` (string). * You can pull out the new checked state by accessing `event.target.checked` (boolean). */ - onChange?: (event: React.ChangeEvent) => void; + onChange?: (event: React.ChangeEvent, checked: boolean) => void; readOnly?: boolean; /** * If `true`, the `input` element is required. diff --git a/packages/material-ui/src/internal/SwitchBase.js b/packages/material-ui/src/internal/SwitchBase.js index 82380ec32853bb..c14265c54937ae 100644 --- a/packages/material-ui/src/internal/SwitchBase.js +++ b/packages/material-ui/src/internal/SwitchBase.js @@ -112,10 +112,13 @@ const SwitchBase = React.forwardRef(function SwitchBase(props, ref) { return; } - setCheckedState(event.target.checked); + const newChecked = event.target.checked; + + setCheckedState(newChecked); if (onChange) { - onChange(event); + // TODO v6: remove the second argument. + onChange(event, newChecked); } }; From 1291ff1a79ed8a65d5521a93f190553b38288185 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 2 Jul 2021 09:26:29 +0200 Subject: [PATCH 02/17] [core] Configure Renovate (#27003) Co-authored-by: Renovate Bot Co-authored-by: eps1lon --- .github/dependabot.yml | 59 ----------------------------- .github/renovate.json | 86 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 86 insertions(+), 59 deletions(-) delete mode 100644 .github/dependabot.yml create mode 100644 .github/renovate.json diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index c465303c2b2ca8..00000000000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,59 +0,0 @@ -# https://docs.github.com/en/code-security/supply-chain-security/configuration-options-for-dependency-updates -version: 2 -updates: - - package-ecosystem: npm - directory: '/' - schedule: - interval: weekly - day: sunday - time: '02:00' - open-pull-requests-limit: 30 - labels: - - dependencies - ignore: - # These should be grouped. Maintainer advise: Watch https://github.com/babel/babel - # for new releases and file a PR if you got time. - - dependency-name: '@babel/*' - versions: - - '>= 0' - # https://github.com/mui-org/material-ui/pull/17604#issuecomment-536262291 - - dependency-name: core-js - versions: - - '>= 0' - # These should be grouped once a PR for `jss` is opened - - dependency-name: jss-* - versions: - - '>= 0' - # These should be grouped. Maintainer advise: Watch https://github.com/dmtrKovalenko/date-io - # for new releases and file a PR if you got time. - - dependency-name: '@date-io/*' - versions: - - '>= 0' - # 2.0 started using ES modules instead of CommonJS modules - - dependency-name: raw-loader - versions: - - '>= 0' - # not ignoring `react`. We'll hijack those PRs and also upgrade the other - # packages in the facebook/react repository - # should be grouped with `react` - - dependency-name: react-dom - versions: - - '>= 0' - # should be grouped with `react` - - dependency-name: react-is - versions: - - '>= 0' - # should be grouped with `react` - - dependency-name: react-test-renderer - versions: - - '>= 0' - # https://github.com/mui-org/material-ui/pull/17168#issuecomment-524861427 - - dependency-name: tslint - versions: - - 5.x - # Should be grouped with @typescript-eslint/eslint-plugin - # They sometimes are mergable independently but create a different dependency when merged leading to a changed yarn.lock - # TODO: Revisit once https://github.com/dependabot/dependabot-core/issues/1190 is resolved. - - dependency-name: '@typescript-eslint/parser' - versions: - - '>= 0' diff --git a/.github/renovate.json b/.github/renovate.json new file mode 100644 index 00000000000000..4dcf848fe1590c --- /dev/null +++ b/.github/renovate.json @@ -0,0 +1,86 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "automerge": false, + "commitMessageAction": "Bump", + "commitMessageExtra": "to {{newValue}}", + "commitMessageTopic": "{{depName}}", + "dependencyDashboard": true, + "ignoreDeps": [], + "labels": ["dependencies"], + "packageRules": [ + { + "groupName": "babel", + "matchPackagePatterns": "@babel/*" + }, + { + "groupName": "date-io", + "matchPackagePatterns": "@date-io/*" + }, + { + "groupName": "Emotion", + "matchPackagePatterns": "@emotion/*" + }, + { + "groupName": "core-js", + "matchPackageNames": ["core-js"], + "allowedVersions": "< 2.0.0" + }, + { + "groupName": "JSS", + "matchPackageNames": [ + "jss", + "jss-plugin-camel-case", + "jss-plugin-default-unit", + "jss-plugin-global", + "jss-plugin-nested", + "jss-plugin-props-sort", + "jss-plugin-props-sort", + "jss-plugin-rule-value-function", + "jss-plugin-vendor-prefixer", + "react-jss" + ] + }, + { + "groupName": "raw-loader", + "matchPackageNames": ["raw-loader"], + "allowedVersions": "< 2.0.0" + }, + { + "groupName": "react-spring", + "matchPackageNames": ["react-spring"], + "allowedVersions": "< 9.0.0" + }, + { + "groupName": "React", + "matchPackageNames": ["react", "react-dom", "react-is", "react-test-renderer"] + }, + { + "groupName": "tslint", + "matchPackageNames": ["tslint"], + "allowedVersions": "<= 5.14.0" + }, + { + "groupName": "typescript-eslint", + "matchPackagePatterns": "@typescript-eslint/*" + }, + { + "groupName": "bundling fixtures", + "matchPaths": ["test/bundling/fixtures/**/package.json"], + "schedule": "every 6 months on the first day of the month" + }, + { + "groupName": "examples", + "matchPaths": ["examples/**/package.json"], + "minor": { + "enabled": false + }, + "patch": { + "enabled": false + } + } + ], + "prConcurrentLimit": 30, + "prHourlyLimit": 0, + "schedule": "on sunday before 6:00am", + "timezone": "UTC" +} From 8ca6103ccec5dc27340c186770d6d6828d3a450d Mon Sep 17 00:00:00 2001 From: Sebastian Silbermann Date: Fri, 2 Jul 2021 20:34:09 +0200 Subject: [PATCH 03/17] [docs] Remove unused fs polyfill (#27069) --- docs/next.config.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/docs/next.config.js b/docs/next.config.js index e16e3157f6a501..1526e0b4e236f1 100644 --- a/docs/next.config.js +++ b/docs/next.config.js @@ -86,9 +86,6 @@ module.exports = { ...config.resolve.extensions.filter((extension) => extension !== '.tsx'), ], }, - node: { - fs: 'empty', - }, module: { ...config.module, rules: config.module.rules.concat([ From bb02e9139a6ec95bffccf0c0c5137bf025717643 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 4 Jul 2021 09:39:01 +0200 Subject: [PATCH 04/17] Bump actions-cool/issues-helper action to v2 (#27091) Co-authored-by: Renovate Bot --- .github/workflows/issue-mark-duplicate.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/issue-mark-duplicate.yml b/.github/workflows/issue-mark-duplicate.yml index 5561af6b32a1eb..c505fb23222c7d 100644 --- a/.github/workflows/issue-mark-duplicate.yml +++ b/.github/workflows/issue-mark-duplicate.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest steps: - name: mark-duplicate - uses: actions-cool/issues-helper@2.x + uses: actions-cool/issues-helper@v2 with: actions: 'mark-duplicate' token: ${{ secrets.GITHUB_TOKEN }} From 3fd46a5186b90b1d68c09d2956c52ba5d43103e8 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 4 Jul 2021 09:41:33 +0200 Subject: [PATCH 05/17] Bump @types/styled-components to 5.1.11 (#27090) Co-authored-by: Renovate Bot --- docs/package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/package.json b/docs/package.json index 88a40b29e79793..0a95cab20d0cd8 100644 --- a/docs/package.json +++ b/docs/package.json @@ -53,7 +53,7 @@ "@types/react-text-mask": "^5.4.6", "@types/react-virtualized": "^9.21.4", "@types/react-window": "^1.7.0", - "@types/styled-components": "5.1.10", + "@types/styled-components": "5.1.11", "accept-language": "^3.0.18", "address": "^1.0.3", "ast-types": "^0.14.1", diff --git a/yarn.lock b/yarn.lock index 2a1ed30a20112a..be3470d414c229 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3193,10 +3193,10 @@ resolved "https://registry.yarnpkg.com/@types/source-list-map/-/source-list-map-0.1.2.tgz#0078836063ffaf17412349bba364087e0ac02ec9" integrity sha512-K5K+yml8LTo9bWJI/rECfIPrGgxdpeNbj+d53lwN4QjW1MCwlkhUms+gtdzigTeUyBr09+u8BwOIY3MXvHdcsA== -"@types/styled-components@5.1.10": - version "5.1.10" - resolved "https://registry.yarnpkg.com/@types/styled-components/-/styled-components-5.1.10.tgz#b509da9d62be8a02cefd88ec6b820f417429a503" - integrity sha512-g3ZfWlTiyXktASIhcfCicZtqB/fFFnq0a7kPYYxKXNggdrohp8m/9bMmmt3zDvHj2gplWDGCkZByfFnEXfbSWg== +"@types/styled-components@5.1.11": + version "5.1.11" + resolved "https://registry.yarnpkg.com/@types/styled-components/-/styled-components-5.1.11.tgz#a3a1bc0f2cdad7318d8ce219ee507e6b353503b5" + integrity sha512-u8g3bSw9KUiZY+S++gh+LlURGraqBe3MC5I5dygrNjGDHWWQfsmZZRTJ9K9oHU2CqWtxChWmJkDI/gp+TZPQMw== dependencies: "@types/hoist-non-react-statics" "*" "@types/react" "*" From ca2eae18864f7a698e0db42676c97e6ace28e2e8 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 4 Jul 2021 09:41:54 +0200 Subject: [PATCH 06/17] Bump @types/react to ^17.0.0 (#27096) Co-authored-by: Renovate Bot --- framer/Material-UI.framerfx/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framer/Material-UI.framerfx/package.json b/framer/Material-UI.framerfx/package.json index df47b84db69c86..d28b49ee356d60 100644 --- a/framer/Material-UI.framerfx/package.json +++ b/framer/Material-UI.framerfx/package.json @@ -20,7 +20,7 @@ "lodash": "^4.17.21" }, "peerDependencies": { - "@types/react": "^16.8.6", + "@types/react": "^17.0.0", "framer": "^1.0.0", "react": "^17.0.0", "react-dom": "^17.0.0" From 7666dd64571b8f63d43cfb7baa25c66ac50acf5a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 4 Jul 2021 09:42:35 +0200 Subject: [PATCH 07/17] Bump theme-ui to ^0.10.0 (#27093) Co-authored-by: Renovate Bot --- benchmark/package.json | 2 +- yarn.lock | 102 ++++++++++++++++++++--------------------- 2 files changed, 52 insertions(+), 52 deletions(-) diff --git a/benchmark/package.json b/benchmark/package.json index ec58314c0da063..c7a51cc7f481f9 100644 --- a/benchmark/package.json +++ b/benchmark/package.json @@ -26,7 +26,7 @@ "react-jss": "^10.3.0", "serve-handler": "^6.1.3", "styled-components": "^5.0.0", - "theme-ui": "^0.9.1", + "theme-ui": "^0.10.0", "webpack": "^4.41.0", "webpack-cli": "^4.0.0" } diff --git a/yarn.lock b/yarn.lock index be3470d414c229..9c6e20c38b912b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2643,76 +2643,76 @@ "@babel/runtime" "^7.12.5" "@testing-library/dom" "^8.0.0" -"@theme-ui/color-modes@0.9.1": - version "0.9.1" - resolved "https://registry.yarnpkg.com/@theme-ui/color-modes/-/color-modes-0.9.1.tgz#429e8f5911a6ae4876013d0ed897a6bab138edec" - integrity sha512-70QgmXZye9OPx11Xh10elzvOx4R6djnJu+bgW0gUzsFD1JD4G2TgTVotNi+SHsppcQDRrzgcOkAzbbleWeNkAQ== +"@theme-ui/color-modes@0.10.0": + version "0.10.0" + resolved "https://registry.yarnpkg.com/@theme-ui/color-modes/-/color-modes-0.10.0.tgz#85071f16d7d4458f3dab5a7af8b9ea459da4dcd0" + integrity sha512-6sZaagCFK48p2YjecLljFwPkiB3/R9dMNKUQC3+fnaH3N9FcsflNWpjKAYhtQ5QLKvYacFdqczT4YaMtGwKb/Q== dependencies: "@emotion/react" "^11.1.1" - "@theme-ui/core" "0.9.1" - "@theme-ui/css" "0.9.1" + "@theme-ui/core" "0.10.0" + "@theme-ui/css" "0.10.0" deepmerge "^4.2.2" -"@theme-ui/components@0.9.1": - version "0.9.1" - resolved "https://registry.yarnpkg.com/@theme-ui/components/-/components-0.9.1.tgz#529165cfa01b9c573de6bc8726bfa2521ff4c40d" - integrity sha512-ZrJd9AAEpQfEw+SNcr1A59z5MvuEy01ii4wjfpDhkNDyFmbr9malEos9d/JUE3ZwTu6QQnnB6xe9Hf0f5VE0ww== +"@theme-ui/components@0.10.0": + version "0.10.0" + resolved "https://registry.yarnpkg.com/@theme-ui/components/-/components-0.10.0.tgz#c1aa9cade71e5a6cf7c19f9e0ade900122ef23f9" + integrity sha512-zPA+16fP+R140kns+3FBhybsPzNjcCWHgXcwIPjww1dfDnlXRa7al9Nz4Y8zyWvk1wNiGqUa09Y1sabK6EYspQ== dependencies: "@emotion/react" "^11.1.1" "@emotion/styled" "^11.0.0" "@styled-system/color" "^5.1.2" "@styled-system/should-forward-prop" "^5.1.2" "@styled-system/space" "^5.1.2" - "@theme-ui/css" "0.9.1" + "@theme-ui/css" "0.10.0" "@types/styled-system" "^5.1.10" -"@theme-ui/core@0.9.1": - version "0.9.1" - resolved "https://registry.yarnpkg.com/@theme-ui/core/-/core-0.9.1.tgz#bc155bdf7f488072935b65cdb6ed7541f9ca623c" - integrity sha512-virruR+uaGMIZd9rs2IcDq7aWJspk2c7vtvhAlvhKQoLXlhWrtvZCwd9b6lKHMEhNxpjXEZa3cJxRR9LQ0Utgw== +"@theme-ui/core@0.10.0": + version "0.10.0" + resolved "https://registry.yarnpkg.com/@theme-ui/core/-/core-0.10.0.tgz#2373d53368da5fa561915414ade070a9de0e9678" + integrity sha512-3DeTHGqyqIi05JCsJ+G+fqW6YsX/oGJiaAvMgLfd86tGdJOnDseEBQG41oDFHSWtQSJDpBcoFgAWMGITmYdH+g== dependencies: "@emotion/react" "^11.1.1" - "@theme-ui/css" "0.9.1" - "@theme-ui/parse-props" "0.9.1" + "@theme-ui/css" "0.10.0" + "@theme-ui/parse-props" "0.10.0" deepmerge "^4.2.2" -"@theme-ui/css@0.9.1": - version "0.9.1" - resolved "https://registry.yarnpkg.com/@theme-ui/css/-/css-0.9.1.tgz#f5f9b02b7de243acde5089011e7e7312afb5ae55" - integrity sha512-wVNJp7LIZhfXx7HdziJan0qfC8Iz6xcP/PVjFRVBupbmeGUkTM3UgfnsU3TkVQMLn0BxYe5AvaeOeKlVTx/k+g== +"@theme-ui/css@0.10.0": + version "0.10.0" + resolved "https://registry.yarnpkg.com/@theme-ui/css/-/css-0.10.0.tgz#871f63334fb138491406c32f8347d53b19846a9b" + integrity sha512-Up3HqXoy2ERn/9gVxApCSl2n9vwtHBwPrYlMyEjX0YPs/rxmo+Aqe3kAxO+SG9idMw08mtdaDfMIFaPsBE5ovA== dependencies: "@emotion/react" "^11.1.1" csstype "^3.0.5" -"@theme-ui/mdx@0.9.1": - version "0.9.1" - resolved "https://registry.yarnpkg.com/@theme-ui/mdx/-/mdx-0.9.1.tgz#30d225e585f46d0cfa6bb9286486c0601bc6162c" - integrity sha512-DbvK8ECv5vhYd7nvtWAxwazXYmWahkG18ZfcoadnQa5tqI2Y7vhuHw/719Cg2k87G8FVZC8Lm+x4J20eGrWZ7g== +"@theme-ui/mdx@0.10.0": + version "0.10.0" + resolved "https://registry.yarnpkg.com/@theme-ui/mdx/-/mdx-0.10.0.tgz#14124cb194df8023f7253391900d8d17a6011a92" + integrity sha512-IcDrQONVrOFQFCFdyrlNoTTKmhw7ELtrLktRYmmWtCEz+KHpBiEVdxNo2yvz/05zF2BPGKOqu4wkMpUR13wNSQ== dependencies: "@emotion/react" "^11.1.1" "@emotion/styled" "^11.0.0" "@mdx-js/react" "^1.6.22" - "@theme-ui/core" "0.9.1" - "@theme-ui/css" "0.9.1" + "@theme-ui/core" "0.10.0" + "@theme-ui/css" "0.10.0" -"@theme-ui/parse-props@0.9.1": - version "0.9.1" - resolved "https://registry.yarnpkg.com/@theme-ui/parse-props/-/parse-props-0.9.1.tgz#3c48138d3144da8658d436ec1fb5f911a21238b8" - integrity sha512-QvjXu0e/qw5E0J7xHKniz9DcssbWnx2V/Q96z6CH3EbFFKq+Y8x+OAx+jZ78IPddunuLvoTG+pAzDdviF+Lkhg== +"@theme-ui/parse-props@0.10.0": + version "0.10.0" + resolved "https://registry.yarnpkg.com/@theme-ui/parse-props/-/parse-props-0.10.0.tgz#8d2f4f3b3edafd925c3872ddd559e2b62006f43f" + integrity sha512-UfcLyThXYsB9azc8qbsZVgbF7xf+GLF2Hhy+suyjwQ3XSVOx97B5ZsuzCNUGbggtBw4dXayJgRmMz0FHyp0L8Q== dependencies: "@emotion/react" "^11.1.1" - "@theme-ui/css" "0.9.1" + "@theme-ui/css" "0.10.0" -"@theme-ui/theme-provider@0.9.1": - version "0.9.1" - resolved "https://registry.yarnpkg.com/@theme-ui/theme-provider/-/theme-provider-0.9.1.tgz#8939b27dd59f38f63b9a09683d828798d5b32eaf" - integrity sha512-kC9ee252/jWT0/Wml9ScLa/QmtJZDgWny65sBs5z61zdE1s3TpWS603laycmqdK5XV2+pcJPT/cwaMnAciO6ug== +"@theme-ui/theme-provider@0.10.0": + version "0.10.0" + resolved "https://registry.yarnpkg.com/@theme-ui/theme-provider/-/theme-provider-0.10.0.tgz#16586af579bef804f1e4997a131134d2465bfd5d" + integrity sha512-1AVsegjEAw7uidr0/qJMoKktKbdXuXRjfukI9712GZleft3dzoHhkQUO7IefXjbafyu/plzo/WTXkbz0A4uhmA== dependencies: "@emotion/react" "^11.1.1" - "@theme-ui/color-modes" "0.9.1" - "@theme-ui/core" "0.9.1" - "@theme-ui/css" "0.9.1" - "@theme-ui/mdx" "0.9.1" + "@theme-ui/color-modes" "0.10.0" + "@theme-ui/core" "0.10.0" + "@theme-ui/css" "0.10.0" + "@theme-ui/mdx" "0.10.0" "@tootallnate/once@1": version "1.1.2" @@ -15719,17 +15719,17 @@ text-table@^0.2.0: resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= -theme-ui@^0.9.1: - version "0.9.1" - resolved "https://registry.yarnpkg.com/theme-ui/-/theme-ui-0.9.1.tgz#3e30f58458ab7ff6d6c7404a8f08749c44880b7a" - integrity sha512-4tRdMOb0YJU4PMKtPABBkccdq0jUBPIdgURB868WgmxLBvMx+pLPTPlwGM+Yuf4gpIbx+4O8vNREtGGy11z30w== - dependencies: - "@theme-ui/color-modes" "0.9.1" - "@theme-ui/components" "0.9.1" - "@theme-ui/core" "0.9.1" - "@theme-ui/css" "0.9.1" - "@theme-ui/mdx" "0.9.1" - "@theme-ui/theme-provider" "0.9.1" +theme-ui@^0.10.0: + version "0.10.0" + resolved "https://registry.yarnpkg.com/theme-ui/-/theme-ui-0.10.0.tgz#4fce8fbe7ad008ec07b383eaf5f468b0317fcfa1" + integrity sha512-6uj9/4n6gZrlhrfQKt+QoLdtVc46ETJZv42iqedCatXaaTA5tHN1j7TJDmvYD9ooD/CT0+hsvOrx2d2etb/kYg== + dependencies: + "@theme-ui/color-modes" "0.10.0" + "@theme-ui/components" "0.10.0" + "@theme-ui/core" "0.10.0" + "@theme-ui/css" "0.10.0" + "@theme-ui/mdx" "0.10.0" + "@theme-ui/theme-provider" "0.10.0" theming@^3.3.0: version "3.3.0" From f1ef74908d17389aad40ec08e3bc317a39b2611f Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 4 Jul 2021 09:48:18 +0200 Subject: [PATCH 08/17] Bump actions/setup-node action to v2 (#27097) Co-authored-by: Renovate Bot --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a5b701c74acc25..34e0a6b0d0db0a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,7 +24,7 @@ jobs: # fetch all tags which are required for `yarn release:changelog` fetch-depth: 0 - name: Use Node.js 14.x - uses: actions/setup-node@v1 + uses: actions/setup-node@v2 with: node-version: 14 - run: yarn install From d8c8481d9290389621b365ed9f2f8e6e605f6e12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Dudak?= Date: Sun, 4 Jul 2021 10:07:15 +0200 Subject: [PATCH 09/17] [docs] Fix typos (#27074) --- docs/src/pages/guides/right-to-left/right-to-left.md | 8 ++++---- docs/src/pages/system/styled/styled.md | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/src/pages/guides/right-to-left/right-to-left.md b/docs/src/pages/guides/right-to-left/right-to-left.md index 4d96573882baaa..f2bb9461196fbc 100644 --- a/docs/src/pages/guides/right-to-left/right-to-left.md +++ b/docs/src/pages/guides/right-to-left/right-to-left.md @@ -54,9 +54,9 @@ npm install stylis-plugin-rtl Having installed the plugin in your project, Material-UI components still require it to be loaded by the style engine instance that you use. Find bellow guides on how you can load it. -### 3. Load the rtl plugin +### 4. Load the rtl plugin -#### 3.1 JSS +#### 4.1 JSS Having installed the plugin in your project, Material-UI components still require it to be loaded by the jss instance, as described below. Internally, withStyles is using this JSS plugin when `direction: 'rtl'` is set on the theme. @@ -80,7 +80,7 @@ function RTL(props) { } ``` -#### 3.2 emotion +#### 4.2 emotion If you use emotion as your style engine, you should create new cache instance that uses the `stylis-plugin-rtl` and provide that on the top of your application tree. The [CacheProvider](https://emotion.sh/docs/cache-provider) component enables this: @@ -100,7 +100,7 @@ function RTL(props) { } ``` -#### 3.3 styled-components +#### 4.3 styled-components If you use `styled-components` as your style engine, you can use the [StyleSheetManager](https://styled-components.com/docs/api#stylesheetmanager) and provide the stylis-plugin-rtl as an item in the `stylisPlugins` property: diff --git a/docs/src/pages/system/styled/styled.md b/docs/src/pages/system/styled/styled.md index 6e687e04e7a281..ba0b97a191f51a 100644 --- a/docs/src/pages/system/styled/styled.md +++ b/docs/src/pages/system/styled/styled.md @@ -31,11 +31,11 @@ It aims to solve the same problem, but also provides the following benefits: 1. `Component`: The component that will be wrapped. 2. `options` (_object_ [optional]): - - `options.shouldForwardProp` (_`(props: string) => bool`_ [optional]): Indicates whether the `prop` should be forwarded to the `Component`. + - `options.shouldForwardProp` (_`(prop: string) => bool`_ [optional]): Indicates whether the `prop` should be forwarded to the `Component`. - `options.label` (_string_ [optional]): The suffix of the style sheet. Useful for debugging. - `options.name` (_string_ [optional]): The key used under `theme.components` for specifying `styleOverrides` and `variants`. Also used for generating the `label`. - `options.slot` (_string_ [optional]): If `Root`, it automatically applies the theme's `styleOverrides` & `variants`. - - `options.overridesResolver` (_(props: object, styles: Record) => styles_ [optional]): Function that returns styles based on the props and the `theme.components[name]styleOverrides` object. + - `options.overridesResolver` (_(props: object, styles: Record) => styles_ [optional]): Function that returns styles based on the props and the `theme.components[name].styleOverrides` object. - `options.skipVariantsResolver` (_bool_): Disables the automatic resolver for the `theme.components[name].variants`. - `options.skipSx` (_bool_ [optional]): Disables the `sx` prop on the component. - The other keys are forwarded to the `options` argument of emotion's [`styled([Component], [options])`](https://emotion.sh/docs/styled). From 0c8c58e9b00ac65e5ee75db0b7ddefa7ab037185 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20=C5=A0ilhan?= Date: Sun, 4 Jul 2021 10:13:38 +0200 Subject: [PATCH 10/17] [theme] Add missing MuiRating types to components.d.ts (#27086) --- packages/material-ui/src/styles/components.d.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/material-ui/src/styles/components.d.ts b/packages/material-ui/src/styles/components.d.ts index 3b763612e59cbf..c11504b93ccef1 100644 --- a/packages/material-ui/src/styles/components.d.ts +++ b/packages/material-ui/src/styles/components.d.ts @@ -320,6 +320,10 @@ export interface Components { defaultProps?: ComponentsProps['MuiRadio']; styleOverrides?: ComponentsOverrides['MuiRadio']; }; + MuiRating?: { + defaultProps?: ComponentsProps['MuiRating']; + styleOverrides?: ComponentsOverrides['MuiRating']; + }; MuiScopedCssBaseline?: { defaultProps?: ComponentsProps['MuiScopedCssBaseline']; styleOverrides?: ComponentsOverrides['MuiScopedCssBaseline']; From 698df95f32767a834394ed11b4ac66e910ecc9f4 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 4 Jul 2021 10:53:12 +0200 Subject: [PATCH 11/17] Bump dot-prop to ^6.0.0 (#27101) --- package.json | 1 - yarn.lock | 15 +++++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 6a041b67698c95..031f05b0b49814 100644 --- a/package.json +++ b/package.json @@ -196,7 +196,6 @@ "**/@types/react": "^17.0.0", "**/@types/react-dom": "^17.0.0", "**/cross-fetch": "^3.0.5", - "**/dot-prop": "^5.2.0", "**/react-is": "^17.0.1" }, "nyc": { diff --git a/yarn.lock b/yarn.lock index 9c6e20c38b912b..ce1d70b48af3a9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6807,10 +6807,17 @@ dot-case@^3.0.3: no-case "^3.0.3" tslib "^1.10.0" -dot-prop@^5.1.0, dot-prop@^5.2.0, dot-prop@^6.0.1: - version "5.2.0" - resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-5.2.0.tgz#c34ecc29556dc45f1f4c22697b6f4904e0cc4fcb" - integrity sha512-uEUyaDKoSQ1M4Oq8l45hSE26SnTxL6snNnqvK/VWx5wJhmff5z0FUVJDKDanor/6w3kzE3i7XZOk+7wC0EXr1A== +dot-prop@^5.1.0, dot-prop@^5.2.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-5.3.0.tgz#90ccce708cd9cd82cc4dc8c3ddd9abdd55b20e88" + integrity sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q== + dependencies: + is-obj "^2.0.0" + +dot-prop@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-6.0.1.tgz#fc26b3cf142b9e59b74dbd39ed66ce620c681083" + integrity sha512-tE7ztYzXHIeyvc7N+hR3oi7FIbf/NIjVP9hmAt3yMXzrQ072/fpjGLx2GxNxGxUl5V73MEqYzioOMoVhGMJ5cA== dependencies: is-obj "^2.0.0" From 075543c80f83714716b1ffc6a37f2fa0e62257b2 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 4 Jul 2021 11:26:59 +0200 Subject: [PATCH 12/17] Bump @types/node to ^16.0.0 (#27095) --- packages/typescript-to-proptypes/package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/typescript-to-proptypes/package.json b/packages/typescript-to-proptypes/package.json index d58901bf0cf689..d82f0abc6f3a3e 100644 --- a/packages/typescript-to-proptypes/package.json +++ b/packages/typescript-to-proptypes/package.json @@ -26,7 +26,7 @@ "@types/babel__core": "^7.1.2", "@types/doctrine": "^0.0.3", "@types/lodash": "^4.14.136", - "@types/node": "^15.12.5", + "@types/node": "^16.0.0", "@types/prettier": "^2.0.1", "@types/react": "^17.0.0", "@types/uuid": "^8.0.0", diff --git a/yarn.lock b/yarn.lock index ce1d70b48af3a9..887ca100fda026 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3022,10 +3022,10 @@ resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-8.2.2.tgz#91daa226eb8c2ff261e6a8cbf8c7304641e095e0" integrity sha512-Lwh0lzzqT5Pqh6z61P3c3P5nm6fzQK/MMHl9UKeneAeInVflBSz1O2EkX6gM6xfJd7FBXBY5purtLx7fUiZ7Hw== -"@types/node@*", "@types/node@>= 8", "@types/node@^15.12.5": - version "15.12.5" - resolved "https://registry.yarnpkg.com/@types/node/-/node-15.12.5.tgz#9a78318a45d75c9523d2396131bd3cca54b2d185" - integrity sha512-se3yX7UHv5Bscf8f1ERKvQOD6sTyycH3hdaoozvaLxgUiY5lIGEeH37AD0G0Qi9kPqihPn0HOfd2yaIEN9VwEg== +"@types/node@*", "@types/node@>= 8", "@types/node@^16.0.0": + version "16.0.0" + resolved "https://registry.yarnpkg.com/@types/node/-/node-16.0.0.tgz#067a6c49dc7a5c2412a505628e26902ae967bf6f" + integrity sha512-TmCW5HoZ2o2/z2EYi109jLqIaPIi9y/lc2LmDCWzuCi35bcaQ+OtUh6nwBiFK7SOu25FAU5+YKdqFZUwtqGSdg== "@types/node@^12.12.29": version "12.12.47" From cf050c1b4dc1fd42b0c3b55168f67fb1577b4fd5 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 4 Jul 2021 12:41:01 +0200 Subject: [PATCH 13/17] Bump @date-io/core to ^2.0.0 (#27094) Co-authored-by: Renovate Bot Co-authored-by: eps1lon --- docs/package.json | 2 +- yarn.lock | 13 ++++--------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/docs/package.json b/docs/package.json index 0a95cab20d0cd8..df9283ac0c405f 100644 --- a/docs/package.json +++ b/docs/package.json @@ -21,7 +21,7 @@ "@babel/core": "^7.10.2", "@babel/plugin-transform-object-assign": "^7.10.1", "@babel/runtime-corejs2": "^7.10.2", - "@date-io/core": "^1.3.9", + "@date-io/core": "^2.0.0", "@date-io/date-fns-jalali": "^2.10.8", "@emotion/cache": "^11.4.0", "@emotion/react": "^11.4.0", diff --git a/yarn.lock b/yarn.lock index 887ca100fda026..b2596ea0ee6286 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1126,15 +1126,10 @@ framesync "5.3.0" lodash.mergewith "4.6.2" -"@date-io/core@^1.3.9": - version "1.3.13" - resolved "https://registry.yarnpkg.com/@date-io/core/-/core-1.3.13.tgz#90c71da493f20204b7a972929cc5c482d078b3fa" - integrity sha512-AlEKV7TxjeK+jxWVKcCFrfYAk8spX9aCyiToFIiLPtfQbsjmRGLIhb5VZgptQcJdHtLXo7+m0DuurwFgUToQuA== - -"@date-io/core@^2.10.6", "@date-io/core@^2.10.7": - version "2.10.7" - resolved "https://registry.yarnpkg.com/@date-io/core/-/core-2.10.7.tgz#0fe1fa0ef02c827919e23c2802a4b25589ac522d" - integrity sha512-EG/1qDiQvd12RoNJ6H+sZcHVswC/3uMx/ySvfaJ24vB30rLjkgHggEXbgMbfgki7wMuiQ/zXI8QlmF1k3kWRGQ== +"@date-io/core@^2.0.0", "@date-io/core@^2.10.6", "@date-io/core@^2.10.7": + version "2.10.11" + resolved "https://registry.yarnpkg.com/@date-io/core/-/core-2.10.11.tgz#b1a3d57730f3eaaab54d5658be4a71727297e357" + integrity sha512-keXQnwH0LM8wyvu+j5Z2KGK56D+eItjy7DnwuWl/oV+DM2UEYl0z5WhdPMpfswSyt/kjuPOzcVF/7u/skMLaoA== "@date-io/date-fns-jalali@^2.10.8": version "2.10.8" From 1e31878744e0816763f4de7e2c63f42f23859148 Mon Sep 17 00:00:00 2001 From: Vantroy Date: Mon, 5 Jul 2021 08:18:02 +0700 Subject: [PATCH 14/17] [docs] Fix import source of hidden component (#27116) --- docs/pages/components/hidden.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/pages/components/hidden.js b/docs/pages/components/hidden.js index d7dd3dd6bffa5c..3d2e92b240ee47 100644 --- a/docs/pages/components/hidden.js +++ b/docs/pages/components/hidden.js @@ -4,7 +4,7 @@ import { demos, docs, requireDemo, -} from '!@material-ui/markdown/loader!docs/src/pages/components/dividers/dividers.md'; +} from '!@material-ui/markdown/loader!docs/src/pages/components/hidden/hidden.md'; export default function Page() { return ; From 779a572177d7b2c2951aba2e770213fd51430d5e Mon Sep 17 00:00:00 2001 From: Sebastian Silbermann Date: Mon, 5 Jul 2021 13:00:45 +0200 Subject: [PATCH 15/17] [docs] Move versions from _app PageContext to page-specific context (#27078) --- docs/pages/_app.js | 2 +- docs/pages/versions.js | 39 +++++++++++++-------- docs/src/modules/components/PageContext.tsx | 4 --- docs/src/pages/versions/ReleasedVersions.js | 4 +-- docs/src/pages/versions/VersionsContext.js | 16 +++++++++ 5 files changed, 43 insertions(+), 22 deletions(-) create mode 100644 docs/src/pages/versions/VersionsContext.js diff --git a/docs/pages/_app.js b/docs/pages/_app.js index ee0b84afacfedd..b31ea9a8c0d399 100644 --- a/docs/pages/_app.js +++ b/docs/pages/_app.js @@ -329,7 +329,7 @@ function AppWrapper(props) { ))} - + {/* TODO v5: remove once migration to emotion is completed */} diff --git a/docs/pages/versions.js b/docs/pages/versions.js index 570a2c10e90f63..85b2717ba52a2a 100644 --- a/docs/pages/versions.js +++ b/docs/pages/versions.js @@ -1,14 +1,20 @@ import * as React from 'react'; import sortedUniqBy from 'lodash/sortedUniqBy'; import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs'; +import VersionsContext from 'docs/src/pages/versions/VersionsContext'; import { demos, docs, requireDemo, } from '!@material-ui/markdown/loader!docs/src/pages/versions/versions.md'; -export default function Page() { - return ; +export default function Page(props) { + const { versions } = props; + return ( + + + + ); } function formatVersion(version) { @@ -40,13 +46,20 @@ Page.getInitialProps = async () => { const FILTERED_BRANCHES = ['latest', 'l10n', 'next']; const branches = await getBranches(); - let versions = branches.map((branch) => branch.name); - versions = versions.filter((value) => FILTERED_BRANCHES.indexOf(value) === -1); - versions = versions.map((version) => ({ - version, - // Replace dot with dashes for Netlify branch subdomains - url: `https://${version.replace(/\./g, '-')}.material-ui.com`, - })); + /** + * @type {import('docs/src/pages/versions/VersionsContext').VersionsContextValue} + */ + const versions = []; + branches.forEach((branch) => { + if (FILTERED_BRANCHES.indexOf(branch.name) === -1) { + const version = branch.name; + versions.push({ + version, + // Replace dot with dashes for Netlify branch subdomains + url: `https://${version.replace(/\./g, '-')}.material-ui.com`, + }); + } + }); // Current version. versions.push({ version: `v${process.env.LIB_VERSION}`, @@ -57,9 +70,7 @@ Page.getInitialProps = async () => { version: 'v0', url: 'https://v0.material-ui.com', }); - versions = versions.sort((a, b) => - formatVersion(b.version).localeCompare(formatVersion(a.version)), - ); + versions.sort((a, b) => formatVersion(b.version).localeCompare(formatVersion(a.version))); if ( branches.find((branch) => branch.name === 'next') && @@ -71,7 +82,5 @@ Page.getInitialProps = async () => { }); } - versions = sortedUniqBy(versions, 'version'); - - return { versions }; + return { versions: sortedUniqBy(versions, 'version') }; }; diff --git a/docs/src/modules/components/PageContext.tsx b/docs/src/modules/components/PageContext.tsx index 3a9b0272175593..dbae8afed08752 100644 --- a/docs/src/modules/components/PageContext.tsx +++ b/docs/src/modules/components/PageContext.tsx @@ -1,13 +1,9 @@ import * as React from 'react'; import type { MuiPage } from 'docs/src/pages'; -/** - * @type {React.Context<>} - */ const PageContext = React.createContext<{ activePage: MuiPage | null; pages: MuiPage[]; - versions: unknown[]; }>(undefined!); if (process.env.NODE_ENV !== 'production') { diff --git a/docs/src/pages/versions/ReleasedVersions.js b/docs/src/pages/versions/ReleasedVersions.js index f1b653cf9dd902..5885e87d22d151 100644 --- a/docs/src/pages/versions/ReleasedVersions.js +++ b/docs/src/pages/versions/ReleasedVersions.js @@ -6,13 +6,13 @@ import TableCell from '@material-ui/core/TableCell'; import TableRow from '@material-ui/core/TableRow'; import Typography from '@material-ui/core/Typography'; import Link from 'docs/src/modules/components/Link'; -import PageContext from 'docs/src/modules/components/PageContext'; +import VersionsContext from './VersionsContext'; const GITHUB_RELEASE_BASE_URL = 'https://github.com/mui-org/material-ui/releases/tag/'; function ReleasedVersions() { - const { versions } = React.useContext(PageContext); + const versions = React.useContext(VersionsContext); return ( diff --git a/docs/src/pages/versions/VersionsContext.js b/docs/src/pages/versions/VersionsContext.js new file mode 100644 index 00000000000000..1811ba6efc5eaa --- /dev/null +++ b/docs/src/pages/versions/VersionsContext.js @@ -0,0 +1,16 @@ +import * as React from 'react'; + +/** + * @typedef {Array<{ version: string; url: string }>} VersionsContextValue + */ + +/** + * @type {React.Context Date: Mon, 5 Jul 2021 13:01:24 +0200 Subject: [PATCH 16/17] [docs] Use custom markdown loader for landing page (#27065) --- .eslintrc.js | 5 ++--- docs/packages/markdown/index.js | 3 +++ docs/packages/markdown/package.json | 4 ++-- docs/pages/index.tsx | 22 +++---------------- .../modules/utils/mapApiPageTranslations.js | 2 +- docs/src/pages/landing/Sponsors.js | 19 ++-------------- 6 files changed, 13 insertions(+), 42 deletions(-) create mode 100644 docs/packages/markdown/index.js diff --git a/.eslintrc.js b/.eslintrc.js index 614e85168ce702..c19451023ad781 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -104,6 +104,8 @@ module.exports = { 'import/named': 'off', // Missing yarn workspace support 'import/no-extraneous-dependencies': 'off', + // The code is already coupled to webpack. Prefer explicit coupling. + 'import/no-webpack-loader-syntax': 'off', // doesn't work? 'jsx-a11y/label-has-associated-control': [ @@ -229,9 +231,6 @@ module.exports = { { files: ['docs/pages/**/*.js'], rules: { - // The code is already coupled to webpack. - 'import/no-webpack-loader-syntax': 'off', - 'react/prop-types': 'off', }, }, diff --git a/docs/packages/markdown/index.js b/docs/packages/markdown/index.js new file mode 100644 index 00000000000000..5840a24c8d754c --- /dev/null +++ b/docs/packages/markdown/index.js @@ -0,0 +1,3 @@ +const { createRender, getHeaders, renderInline } = require('./parseMarkdown'); + +module.exports = { createRender, getHeaders, renderInline }; diff --git a/docs/packages/markdown/package.json b/docs/packages/markdown/package.json index c724197cb08ef6..6b279aa6a79838 100644 --- a/docs/packages/markdown/package.json +++ b/docs/packages/markdown/package.json @@ -3,9 +3,9 @@ "version": "0.1.1", "private": true, "type": "commonjs", - "main": "./parseMarkdown.js", + "main": "./index.js", "exports": { - ".": "./parseMarkdown.js", + ".": "./index.js", "./loader": "./loader.js", "./prism": "./prism.js" }, diff --git a/docs/pages/index.tsx b/docs/pages/index.tsx index 5a2f6d905703d1..e0bea3fbc67544 100644 --- a/docs/pages/index.tsx +++ b/docs/pages/index.tsx @@ -7,9 +7,7 @@ import Container from '@material-ui/core/Container'; import Steps from 'docs/src/pages/landing/Steps'; import Themes from 'docs/src/pages/landing/Themes'; import QuickWord from 'docs/src/pages/landing/QuickWord'; -import Sponsors, { - getInitialProps as getInitialSponsorsProps, -} from 'docs/src/pages/landing/Sponsors'; +import Sponsors from 'docs/src/pages/landing/Sponsors'; import Users from 'docs/src/pages/landing/Users'; import Quotes from 'docs/src/pages/landing/Quotes'; import Pro from 'docs/src/pages/landing/Pro'; @@ -86,15 +84,7 @@ const Social = styled('div')(({ theme }) => ({ }, })); -interface LandingPageProps { - sponsorsProps: { - docs: object; - }; -} - -export default function LandingPage(props: LandingPageProps) { - const { sponsorsProps } = props; - +export default function LandingPage() { React.useEffect(() => { loadDependencies(); }, []); @@ -160,7 +150,7 @@ export default function LandingPage(props: LandingPageProps) { - + @@ -189,9 +179,3 @@ export default function LandingPage(props: LandingPageProps) { ); } - -LandingPage.getInitialProps = async () => { - return { - sponsorsProps: await getInitialSponsorsProps(), - }; -}; diff --git a/docs/src/modules/utils/mapApiPageTranslations.js b/docs/src/modules/utils/mapApiPageTranslations.js index d5ed68cd1df741..50c65bdb79e922 100644 --- a/docs/src/modules/utils/mapApiPageTranslations.js +++ b/docs/src/modules/utils/mapApiPageTranslations.js @@ -1,4 +1,4 @@ -import { createRender } from '@material-ui/markdown/parseMarkdown'; +import { createRender } from '@material-ui/markdown'; const notEnglishJsonRegExp = /-([a-z]{2})\.json$/; diff --git a/docs/src/pages/landing/Sponsors.js b/docs/src/pages/landing/Sponsors.js index b36a3aeb96dcd7..1b96ca897ba549 100644 --- a/docs/src/pages/landing/Sponsors.js +++ b/docs/src/pages/landing/Sponsors.js @@ -1,12 +1,11 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import { makeStyles } from '@material-ui/styles'; import NoSsr from '@material-ui/core/NoSsr'; import MarkdownElement from 'docs/src/modules/components/MarkdownElement'; import Container from '@material-ui/core/Container'; import Divider from '@material-ui/core/Divider'; -import { prepareMarkdown } from '@material-ui/markdown/parseMarkdown'; import { useUserLanguage } from 'docs/src/modules/utils/i18n'; +import { docs } from '!@material-ui/markdown/loader!./backers.md'; const useStyles = makeStyles( (theme) => ({ @@ -28,7 +27,7 @@ const useStyles = makeStyles( { name: 'Sponsors' }, ); -export default function Sponsors({ docs }) { +export default function Sponsors() { const classes = useStyles(); const userLanguage = useUserLanguage(); const { rendered } = docs[userLanguage]; @@ -52,17 +51,3 @@ export default function Sponsors({ docs }) { ); } - -Sponsors.propTypes = { - docs: PropTypes.object.isRequired, -}; - -const requireRaw = require.context('./', false, /\.md$/); - -export async function getInitialProps() { - const { docs } = prepareMarkdown({ - pageFilename: '/', - requireRaw, - }); - return { docs }; -} From 83e1b3ac503c4395a345cf8bcf49f1394a2afcf2 Mon Sep 17 00:00:00 2001 From: Sebastian Silbermann Date: Mon, 5 Jul 2021 13:06:20 +0200 Subject: [PATCH 17/17] [core] Migrate remaining mentions of Dependabot to Renovate (#27118) --- .github/workflows/ci.yml | 4 ++-- README.md | 2 +- scripts/releaseChangelog.js | 8 +++----- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 34e0a6b0d0db0a..8d2a5e9f95654d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,9 +3,9 @@ name: CI on: push: branches-ignore: - # Dependabot branches are always Pull Requests. + # Renovate branches are always Pull Requests. # We don't need to run CI twice (push+pull_request) - - 'dependabot/**' + - 'renovate/**' pull_request: jobs: diff --git a/README.md b/README.md index 53e634246acb93..c0a6678cad9765 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ Quickly build beautiful [React](https://reactjs.org/) apps. Material-UI is a sim [![CircleCI](https://img.shields.io/circleci/project/github/mui-org/material-ui/next.svg)](https://app.circleci.com/pipelines/github/mui-org/material-ui?branch=next) [![Coverage Status](https://img.shields.io/codecov/c/github/mui-org/material-ui/next.svg)](https://codecov.io/gh/mui-org/material-ui/branch/next) [![Follow on Twitter](https://img.shields.io/twitter/follow/MaterialUI.svg?label=follow+Material-UI)](https://twitter.com/MaterialUI) -[![Dependabot Status](https://api.dependabot.com/badges/status?host=github&repo=mui-org/material-ui)](https://dependabot.com) +[![Renovate status](https://img.shields.io/badge/renovate-enabled-brightgreen.svg)](https://github.com/mui-org/material-ui/issues/27062) [![Average time to resolve an issue](https://isitmaintained.com/badge/resolution/mui-org/material-ui.svg)](https://isitmaintained.com/project/mui-org/material-ui 'Average time to resolve an issue') [![Crowdin](https://badges.crowdin.net/material-ui-docs/localized.svg)](https://translate.material-ui.com/project/material-ui-docs) [![Open Collective backers and sponsors](https://img.shields.io/opencollective/all/material-ui)](https://opencollective.com/material-ui) diff --git a/scripts/releaseChangelog.js b/scripts/releaseChangelog.js index d6b00d22d69725..c41b45d105cdb7 100644 --- a/scripts/releaseChangelog.js +++ b/scripts/releaseChangelog.js @@ -32,11 +32,9 @@ function parseTags(commitMessage) { * @param {Octokit.ReposCompareCommitsResponseCommitsItem} commitsItem */ function filterCommit(commitsItem) { - // exclude dependabot commits (sometimes they're merged manually so filtering by author is insufficient) - return ( - commitsItem.author.login !== 'dependabot-preview[bot]' && - !commitsItem.commit.message.startsWith('Bump') - ); + // TODO: Use labels + // Filter dependency updates + return !commitsItem.commit.message.startsWith('Bump'); } async function findLatestTaggedVersion() {