Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/next' into test/concurrent-react
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon committed Jul 5, 2021
2 parents debacd4 + 83e1b3a commit 89e4735
Show file tree
Hide file tree
Showing 31 changed files with 247 additions and 225 deletions.
5 changes: 2 additions & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -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': [
Expand Down Expand Up @@ -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',
},
},
Expand Down
59 changes: 0 additions & 59 deletions .github/dependabot.yml

This file was deleted.

86 changes: 86 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -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"
}
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/issue-mark-duplicate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion benchmark/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down
3 changes: 0 additions & 3 deletions docs/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,6 @@ module.exports = {
...config.resolve.extensions.filter((extension) => extension !== '.tsx'),
],
},
node: {
fs: 'empty',
},
module: {
...config.module,
rules: config.module.rules.concat([
Expand Down
4 changes: 2 additions & 2 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
3 changes: 3 additions & 0 deletions docs/packages/markdown/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
const { createRender, getHeaders, renderInline } = require('./parseMarkdown');

module.exports = { createRender, getHeaders, renderInline };
4 changes: 2 additions & 2 deletions docs/packages/markdown/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/_app.js
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ function AppWrapper(props) {
))}
</NextHead>
<ReduxProvider store={redux}>
<PageContext.Provider value={{ activePage, pages, versions: pageProps.versions }}>
<PageContext.Provider value={{ activePage, pages }}>
{/* TODO v5: remove once migration to emotion is completed */}
<StyledEngineProvider injectFirst>
<StylesProvider jss={jss}>
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/components/hidden.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 <MarkdownDocs demos={demos} docs={docs} requireDemo={requireDemo} />;
Expand Down
22 changes: 3 additions & 19 deletions docs/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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();
}, []);
Expand Down Expand Up @@ -160,7 +150,7 @@ export default function LandingPage(props: LandingPageProps) {
<QuickWord />
<Steps />
<Themes />
<Sponsors {...sponsorsProps} />
<Sponsors />
<Quotes />
<Users />
</main>
Expand Down Expand Up @@ -189,9 +179,3 @@ export default function LandingPage(props: LandingPageProps) {
</AppFrame>
);
}

LandingPage.getInitialProps = async () => {
return {
sponsorsProps: await getInitialSponsorsProps(),
};
};
39 changes: 24 additions & 15 deletions docs/pages/versions.js
Original file line number Diff line number Diff line change
@@ -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 <MarkdownDocs demos={demos} docs={docs} requireDemo={requireDemo} />;
export default function Page(props) {
const { versions } = props;
return (
<VersionsContext.Provider value={versions}>
<MarkdownDocs demos={demos} docs={docs} requireDemo={requireDemo} />
</VersionsContext.Provider>
);
}

function formatVersion(version) {
Expand Down Expand Up @@ -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}`,
Expand All @@ -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') &&
Expand All @@ -71,7 +82,5 @@ Page.getInitialProps = async () => {
});
}

versions = sortedUniqBy(versions, 'version');

return { versions };
return { versions: sortedUniqBy(versions, 'version') };
};
Loading

0 comments on commit 89e4735

Please sign in to comment.