Skip to content

Commit

Permalink
Merge branch 'master' into patch1
Browse files Browse the repository at this point in the history
  • Loading branch information
mnajdova committed Mar 23, 2022
2 parents bf80d5d + d308623 commit 73445c0
Show file tree
Hide file tree
Showing 6,112 changed files with 128,985 additions and 65,226 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
105 changes: 71 additions & 34 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ parameters:
description: The name of the workflow to run
type: string
default: pipeline
e2e-base-url:
description: The base url for running end-to-end test
type: string
default: ''

defaults: &defaults
parameters:
Expand All @@ -26,6 +30,10 @@ defaults: &defaults
description: A particular type of tests that should be run
type: string
default: undefined
e2e-base-url:
description: The base url for running end-to-end test
type: string
default: << pipeline.parameters.e2e-base-url >>
environment:
# Keep in sync with "Save playwright cache"
PLAYWRIGHT_BROWSERS_PATH: /tmp/pw-browsers
Expand All @@ -36,7 +44,8 @@ defaults: &defaults
AWS_REGION_ARTIFACTS: eu-central-1
working_directory: /tmp/material-ui
docker:
- image: circleci/node:12
- image: cimg/node:12.22

# CircleCI has disabled the cache across forks for security reasons.
# Following their official statement, it was a quick solution, they
# are working on providing this feature back with appropriate security measures.
Expand Down Expand Up @@ -101,7 +110,7 @@ commands:
key: v8-yarn-{{ checksum "yarn.lock" }}
paths:
# Keep path in sync with "Set yarn cache folder"
# Can't use environment variables for `save_cache` paths (tested in https://app.circleci.com/pipelines/github/mui-org/material-ui/37813/workflows/5b1e207f-ac8b-44e7-9ba4-d0f9a01f5c55/jobs/223370)
# Can't use environment variables for `save_cache` paths (tested in https://app.circleci.com/pipelines/github/mui/material-ui/37813/workflows/5b1e207f-ac8b-44e7-9ba4-d0f9a01f5c55/jobs/223370)
- /tmp/yarn-cache
- when:
condition: << parameters.browsers >>
Expand All @@ -111,7 +120,7 @@ commands:
key: v5-playwright-{{ arch }}-{{ checksum "/tmp/playwright_info.json" }}
paths:
# Keep path in sync with "PLAYWRIGHT_BROWSERS_PATH"
# Can't use environment variables for `save_cache` paths (tested in https://app.circleci.com/pipelines/github/mui-org/material-ui/37813/workflows/5b1e207f-ac8b-44e7-9ba4-d0f9a01f5c55/jobs/223370)
# Can't use environment variables for `save_cache` paths (tested in https://app.circleci.com/pipelines/github/mui/material-ui/37813/workflows/5b1e207f-ac8b-44e7-9ba4-d0f9a01f5c55/jobs/223370)
- /tmp/pw-browsers

jobs:
Expand Down Expand Up @@ -179,7 +188,10 @@ jobs:
fi
- run:
name: Coverage
command: bash <(curl -s https://codecov.io/bash) -Z -F "$REACT_DIST_TAG-jsdom"
command: |
curl -Os https://uploader.codecov.io/latest/linux/codecov
chmod +x codecov
./codecov -t ${CODECOV_TOKEN} -Z -F "$REACT_DIST_TAG-jsdom"
test_lint:
<<: *defaults
steps:
Expand All @@ -194,6 +206,9 @@ jobs:
- run:
name: Lint JSON
command: yarn jsonlint
- run:
name: Lint Markdown
command: yarn markdownlint
test_static:
<<: *defaults
steps:
Expand All @@ -220,19 +235,14 @@ jobs:
- run:
name: '`yarn docs:i18n` changes committed?'
command: git diff --exit-code
- run:
name: '`yarn framer:build` changes committed?'
command: yarn workspace framer build
- run:
name: '`yarn workspace framer build` changes committed?'
command: git diff --exit-code
- run:
name: '`yarn extract-error-codes` changes committed?'
command: |
yarn extract-error-codes
git diff --exit-code
test_types:
<<: *defaults
resource_class: 'medium+'
steps:
- checkout
- install_js
Expand Down Expand Up @@ -265,7 +275,7 @@ jobs:
git add -f packages/mui-material/build || echo '/material declarations do not exist'
git add -f packages/mui-lab/build || echo '/lab declarations do not exist'
git add -f packages/mui-utils/build || echo '/utils declarations do not exist'
yarn lerna run --parallel build:types
yarn lerna run build:types
git --no-pager diff
- run:
Expand All @@ -281,6 +291,7 @@ jobs:
- packages/mui-utils/build
test_types_next:
<<: *defaults
resource_class: 'medium+'
steps:
- checkout
- run:
Expand Down Expand Up @@ -315,7 +326,7 @@ jobs:
git add -f packages/mui-material/build || echo '/core declarations do not exist'
git add -f packages/mui-lab/build || echo '/lab declarations do not exist'
git add -f packages/mui-utils/build || echo '/utils declarations do not exist'
yarn lerna run --parallel build:types
yarn lerna run build:types
git --no-pager diff
- run:
Expand All @@ -330,7 +341,7 @@ jobs:
test_browser:
<<: *defaults
docker:
- image: mcr.microsoft.com/playwright@sha256:f08e263c95e83334104e6e2fee047ad92062a03af6ae94c0f8686ba2b3014823
- image: mcr.microsoft.com/playwright:v1.20.0-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand All @@ -349,15 +360,18 @@ jobs:
fi
- run:
name: Coverage
command: bash <(curl -s https://codecov.io/bash) -Z -F "$REACT_DIST_TAG-browser"
command: |
curl -Os https://uploader.codecov.io/latest/linux/codecov
chmod +x codecov
./codecov -t ${CODECOV_TOKEN} -Z -F "$REACT_DIST_TAG-browser"
- store_artifacts:
# hardcoded in karma-webpack
path: /tmp/_karma_webpack_
destination: artifact-file
test_e2e:
<<: *defaults
docker:
- image: mcr.microsoft.com/playwright@sha256:f08e263c95e83334104e6e2fee047ad92062a03af6ae94c0f8686ba2b3014823
- image: mcr.microsoft.com/playwright:v1.20.0-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand All @@ -373,10 +387,25 @@ jobs:
- run:
name: Test umd release
command: yarn test:umd
test_e2e_website:
<<: *defaults
docker:
- image: mcr.microsoft.com/playwright:v1.20.0-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
- checkout
- install_js:
browsers: true
- run:
name: yarn test:e2e-website
command: yarn test:e2e-website
environment:
PLAYWRIGHT_TEST_BASE_URL: << parameters.e2e-base-url >>
test_profile:
<<: *defaults
docker:
- image: mcr.microsoft.com/playwright@sha256:f08e263c95e83334104e6e2fee047ad92062a03af6ae94c0f8686ba2b3014823
- image: mcr.microsoft.com/playwright:v1.20.0-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand All @@ -403,7 +432,7 @@ jobs:
test_regressions:
<<: *defaults
docker:
- image: mcr.microsoft.com/playwright@sha256:f08e263c95e83334104e6e2fee047ad92062a03af6ae94c0f8686ba2b3014823
- image: mcr.microsoft.com/playwright:v1.20.0-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand Down Expand Up @@ -457,7 +486,7 @@ jobs:
<<: *defaults
working_directory: /tmp/material-ui/test/bundling/fixtures/next-webpack4/
docker:
- image: mcr.microsoft.com/playwright@sha256:f08e263c95e83334104e6e2fee047ad92062a03af6ae94c0f8686ba2b3014823
- image: mcr.microsoft.com/playwright:v1.20.0-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand All @@ -481,7 +510,7 @@ jobs:
<<: *defaults
working_directory: /tmp/material-ui/test/bundling/fixtures/next-webpack5/
docker:
- image: mcr.microsoft.com/playwright@sha256:f08e263c95e83334104e6e2fee047ad92062a03af6ae94c0f8686ba2b3014823
- image: mcr.microsoft.com/playwright:v1.20.0-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand All @@ -505,7 +534,7 @@ jobs:
<<: *defaults
working_directory: /tmp/material-ui/test/bundling/fixtures/create-react-app/
docker:
- image: mcr.microsoft.com/playwright@sha256:f08e263c95e83334104e6e2fee047ad92062a03af6ae94c0f8686ba2b3014823
- image: mcr.microsoft.com/playwright:v1.20.0-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand All @@ -529,7 +558,7 @@ jobs:
<<: *defaults
working_directory: /tmp/material-ui/test/bundling/fixtures/snowpack/
docker:
- image: mcr.microsoft.com/playwright@sha256:f08e263c95e83334104e6e2fee047ad92062a03af6ae94c0f8686ba2b3014823
- image: mcr.microsoft.com/playwright:v1.20.0-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand All @@ -553,7 +582,7 @@ jobs:
<<: *defaults
working_directory: /tmp/material-ui/test/bundling/fixtures/vite/
docker:
- image: mcr.microsoft.com/playwright@sha256:f08e263c95e83334104e6e2fee047ad92062a03af6ae94c0f8686ba2b3014823
- image: mcr.microsoft.com/playwright:v1.20.0-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand All @@ -577,7 +606,7 @@ jobs:
<<: *defaults
working_directory: /tmp/material-ui/test/bundling/fixtures/esbuild/
docker:
- image: mcr.microsoft.com/playwright@sha256:f08e263c95e83334104e6e2fee047ad92062a03af6ae94c0f8686ba2b3014823
- image: mcr.microsoft.com/playwright:v1.20.0-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand Down Expand Up @@ -605,7 +634,7 @@ jobs:
<<: *defaults
working_directory: /tmp/material-ui/test/bundling/fixtures/gatsby/
docker:
- image: mcr.microsoft.com/playwright@sha256:f08e263c95e83334104e6e2fee047ad92062a03af6ae94c0f8686ba2b3014823
- image: mcr.microsoft.com/playwright:v1.20.0-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand Down Expand Up @@ -652,17 +681,16 @@ jobs:
# "^pull/\d+" is not valid YAML
# "^pull/\\d+" matches neither 'pull/1' nor 'main'
# Note that we want to include 'pull/1', 'pull/1/head' and ''pull/1/merge'
pattern: "^pull/.+$"
pattern: '^pull/.+$'
value: << pipeline.git.branch >>
steps:
# Upload distributables to S3
- aws-s3/copy:
arguments: --acl public-read
aws-access-key-id: AWS_ACCESS_KEY_ID_ARTIFACTS
aws-region: AWS_REGION_ARTIFACTS
aws-secret-access-key: AWS_SECRET_ACCESS_KEY_ARTIFACTS
from: mui-material.tgz
to: s3://mui-org-material-ui/artifacts/$CIRCLE_BRANCH/$CIRCLE_SHA1/
to: s3://mui-org-ci/artifacts/$CIRCLE_BRANCH/$CIRCLE_SHA1/
- store_artifacts:
path: mui-material.tgz
destination: mui-material.tgz
Expand All @@ -681,34 +709,34 @@ jobs:
# "^pull/\d+" is not valid YAML
# "^pull/\\d+" matches neither 'pull/1' nor 'main'
# Note that we want to include 'pull/1', 'pull/1/head' and ''pull/1/merge'
pattern: "^pull/.+$"
pattern: '^pull/.+$'
value: << pipeline.git.branch >>
steps:
# persist size snapshot on S3
- aws-s3/copy:
arguments: --acl public-read --content-type application/json
arguments: --content-type application/json
aws-access-key-id: AWS_ACCESS_KEY_ID_ARTIFACTS
aws-region: AWS_REGION_ARTIFACTS
aws-secret-access-key: AWS_SECRET_ACCESS_KEY_ARTIFACTS
from: size-snapshot.json
to: s3://mui-org-material-ui/artifacts/$CIRCLE_BRANCH/$CIRCLE_SHA1/
to: s3://mui-org-ci/artifacts/$CIRCLE_BRANCH/$CIRCLE_SHA1/
# symlink size-snapshot to latest
- aws-s3/copy:
arguments: --acl public-read --content-type application/json
arguments: --content-type application/json
aws-access-key-id: AWS_ACCESS_KEY_ID_ARTIFACTS
aws-region: AWS_REGION_ARTIFACTS
aws-secret-access-key: AWS_SECRET_ACCESS_KEY_ARTIFACTS
from: size-snapshot.json
to: s3://mui-org-material-ui/artifacts/$CIRCLE_BRANCH/latest/
to: s3://mui-org-ci/artifacts/$CIRCLE_BRANCH/latest/
- run:
name: run danger on PRs
command: yarn danger ci
command: yarn danger ci --fail-on-errors
environment:
DANGER_COMMAND: 'reportBundleSize'
test_benchmark:
<<: *defaults
docker:
- image: mcr.microsoft.com/playwright@sha256:f08e263c95e83334104e6e2fee047ad92062a03af6ae94c0f8686ba2b3014823
- image: mcr.microsoft.com/playwright:v1.20.0-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand Down Expand Up @@ -751,6 +779,15 @@ workflows:
- test_bundle_size_monitor:
requires:
- checkout
e2e-website:
when:
equal: [e2e-website, << pipeline.parameters.workflow >>]
jobs:
- checkout
- test_e2e_website:
requires:
- checkout

bundling:
when:
equal: [bundling, << pipeline.parameters.workflow >>]
Expand Down
6 changes: 3 additions & 3 deletions .codesandbox/ci.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@
},
"sandboxes": [
"material-ui-issue-latest-s2dsx",
"github/mui-org/material-ui/tree/HEAD/examples/create-react-app",
"github/mui-org/material-ui/tree/HEAD/examples/create-react-app-with-typescript",
"github/mui-org/material-ui/tree/HEAD/examples/joy-cra-typescript"
"github/mui/material-ui/tree/HEAD/examples/create-react-app",
"github/mui/material-ui/tree/HEAD/examples/create-react-app-with-typescript",
"github/mui/material-ui/tree/HEAD/examples/joy-cra-typescript"
],
"silent": true
}
2 changes: 0 additions & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
/examples/gatsby/public/
/examples/preact/config
/examples/preact/scripts
# auto-generated by Framer
/framer/Material-UI.framerfx/design/document.json
/packages/mui-codemod/lib
/packages/mui-codemod/src/*/*.test/*
/packages/mui-icons-material/fixtures
Expand Down
19 changes: 10 additions & 9 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const path = require('path');

const forbidTopLevelMessage = [
'Prefer one level nested imports to avoid bundling everything in dev mode',
'See https://github.com/mui-org/material-ui/pull/24147 for the kind of win it can unlock.',
'See https://github.com/mui/material-ui/pull/24147 for the kind of win it can unlock.',
].join('\n');
// This only applies to packages published from this monorepo.
// If you build a library around `@mui/material` you can safely use `createStyles` without running into the same issue as we are.
Expand Down Expand Up @@ -239,11 +239,19 @@ module.exports = {
},
// demos
{
files: ['docs/src/pages/**/*.js', 'docs/src/pages/**/*.tsx'],
files: [
'docs/src/pages/**/*.js',
'docs/src/pages/**/*.tsx',
'docs/data/**/*.js',
'docs/data/**/*.tsx',
],
rules: {
// This most often reports data that is defined after the component definition.
// This is safe to do and helps readability of the demo code since the data is mostly irrelevant.
'@typescript-eslint/no-use-before-define': 'off',
'react/prop-types': 'off',
'no-alert': 'off',
'no-console': 'off',
},
},
{
Expand Down Expand Up @@ -337,13 +345,6 @@ module.exports = {
'react/static-property-placement': 'off',
},
},
{
files: ['framer/Material-UI.framerfx/code/**/*.tsx'],
rules: {
// framer requires named exports
'import/prefer-default-export': 'off',
},
},
{
files: ['packages/typescript-to-proptypes/src/**/*.ts'],
rules: {
Expand Down
Loading

0 comments on commit 73445c0

Please sign in to comment.