Skip to content

Commit

Permalink
Merge branch 'master' into pr/38135
Browse files Browse the repository at this point in the history
  • Loading branch information
danilo-leal committed Nov 27, 2023
2 parents 68277f2 + 553cf82 commit fa0a76a
Show file tree
Hide file tree
Showing 5,654 changed files with 185,391 additions and 166,804 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
60 changes: 33 additions & 27 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
version: 2.1
orbs:
aws-s3: circleci/aws-s3@3.0.0
aws-cli: circleci/aws-cli@4.1
aws-s3: circleci/aws-s3@4.0

parameters:
browserstack-force:
Expand Down Expand Up @@ -44,7 +45,7 @@ defaults: &defaults
AWS_REGION_ARTIFACTS: eu-central-1
working_directory: /tmp/material-ui
docker:
- image: cimg/node:18.16
- image: cimg/node:18.18

# CircleCI has disabled the cache across forks for security reasons.
# Following their official statement, it was a quick solution, they
Expand Down Expand Up @@ -103,8 +104,14 @@ commands:
- run:
name: Install js dependencies
command: yarn install
environment:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: <<# parameters.browsers >>0<</ parameters.browsers >><<^ parameters.browsers >>1<</ parameters.browsers >>
- when:
condition: << parameters.browsers >>
steps:
- run:
name: Install playwright browsers
command: yarn playwright install --with-deps
environment:
PLAYWRIGHT_BROWSERS_PATH: /tmp/pw-browsers
- save_cache:
name: Save yarn cache
key: v8-yarn-{{ checksum "yarn.lock" }}
Expand Down Expand Up @@ -227,7 +234,7 @@ jobs:
name: 'Write "use client" directive'
command: yarn rsc:build
- run:
name: '`yarn rsc:build` changes detected, "use client" missing from exports'
name: '`yarn rsc:build` changes committed?'
command: git add -A && git diff --exit-code --staged
- run:
name: Generate the documentation
Expand Down Expand Up @@ -344,7 +351,7 @@ jobs:
<<: *defaults
resource_class: 'medium+'
docker:
- image: mcr.microsoft.com/playwright:v1.36.1-focal
- image: mcr.microsoft.com/playwright:v1.40.0-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand Down Expand Up @@ -374,7 +381,7 @@ jobs:
test_e2e:
<<: *defaults
docker:
- image: mcr.microsoft.com/playwright:v1.36.1-focal
- image: mcr.microsoft.com/playwright:v1.40.0-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand All @@ -393,7 +400,7 @@ jobs:
test_e2e_website:
<<: *defaults
docker:
- image: mcr.microsoft.com/playwright:v1.36.1-focal
- image: mcr.microsoft.com/playwright:v1.40.0-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand All @@ -408,7 +415,7 @@ jobs:
test_profile:
<<: *defaults
docker:
- image: mcr.microsoft.com/playwright:v1.36.1-focal
- image: mcr.microsoft.com/playwright:v1.40.0-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand All @@ -435,7 +442,7 @@ jobs:
test_regressions:
<<: *defaults
docker:
- image: mcr.microsoft.com/playwright:v1.36.1-focal
- image: mcr.microsoft.com/playwright:v1.40.0-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand Down Expand Up @@ -489,7 +496,7 @@ jobs:
<<: *defaults
working_directory: /tmp/material-ui/test/bundling/fixtures/next-webpack4/
docker:
- image: mcr.microsoft.com/playwright:v1.36.1-focal
- image: mcr.microsoft.com/playwright:v1.40.0-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand All @@ -513,7 +520,7 @@ jobs:
<<: *defaults
working_directory: /tmp/material-ui/test/bundling/fixtures/next-webpack5/
docker:
- image: mcr.microsoft.com/playwright:v1.36.1-focal
- image: mcr.microsoft.com/playwright:v1.40.0-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand All @@ -537,7 +544,7 @@ jobs:
<<: *defaults
working_directory: /tmp/material-ui/test/bundling/fixtures/create-react-app/
docker:
- image: mcr.microsoft.com/playwright:v1.36.1-focal
- image: mcr.microsoft.com/playwright:v1.40.0-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand All @@ -561,7 +568,7 @@ jobs:
<<: *defaults
working_directory: /tmp/material-ui/test/bundling/fixtures/snowpack/
docker:
- image: mcr.microsoft.com/playwright:v1.36.1-focal
- image: mcr.microsoft.com/playwright:v1.40.0-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand All @@ -585,7 +592,7 @@ jobs:
<<: *defaults
working_directory: /tmp/material-ui/test/bundling/fixtures/vite/
docker:
- image: mcr.microsoft.com/playwright:v1.36.1-focal
- image: mcr.microsoft.com/playwright:v1.40.0-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand All @@ -609,7 +616,7 @@ jobs:
<<: *defaults
working_directory: /tmp/material-ui/test/bundling/fixtures/esbuild/
docker:
- image: mcr.microsoft.com/playwright:v1.36.1-focal
- image: mcr.microsoft.com/playwright:v1.40.0-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand Down Expand Up @@ -637,7 +644,7 @@ jobs:
<<: *defaults
working_directory: /tmp/material-ui/test/bundling/fixtures/gatsby/
docker:
- image: mcr.microsoft.com/playwright:v1.36.1-focal
- image: mcr.microsoft.com/playwright:v1.40.0-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand Down Expand Up @@ -687,11 +694,12 @@ jobs:
pattern: '^pull/.+$'
value: << pipeline.git.branch >>
steps:
- aws-cli/setup:
aws_access_key_id: AWS_ACCESS_KEY_ID_ARTIFACTS
aws_secret_access_key: AWS_SECRET_ACCESS_KEY_ARTIFACTS
region: ${AWS_REGION_ARTIFACTS}
# Upload distributables to S3
- aws-s3/copy:
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-ci/artifacts/$CIRCLE_BRANCH/$CIRCLE_SHA1/
- store_artifacts:
Expand All @@ -715,20 +723,18 @@ jobs:
pattern: '^pull/.+$'
value: << pipeline.git.branch >>
steps:
- aws-cli/setup:
aws_access_key_id: AWS_ACCESS_KEY_ID_ARTIFACTS
aws_secret_access_key: AWS_SECRET_ACCESS_KEY_ARTIFACTS
region: ${AWS_REGION_ARTIFACTS}
# persist size snapshot on S3
- aws-s3/copy:
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-ci/artifacts/$CIRCLE_BRANCH/$CIRCLE_SHA1/
# symlink size-snapshot to latest
- aws-s3/copy:
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-ci/artifacts/$CIRCLE_BRANCH/latest/
- run:
Expand All @@ -739,7 +745,7 @@ jobs:
test_benchmark:
<<: *defaults
docker:
- image: mcr.microsoft.com/playwright:v1.36.1-focal
- image: mcr.microsoft.com/playwright:v1.40.0-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand Down
8 changes: 4 additions & 4 deletions .codesandbox/ci.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@
},
"sandboxes": [
"material-ui-issue-latest-s2dsx",
"/examples/material-cra",
"/examples/material-cra-ts",
"/examples/joy-cra-ts",
"/examples/base-cra-ts"
"/examples/material-ui-cra",
"/examples/material-ui-cra-ts",
"/examples/joy-ui-cra-ts",
"/examples/base-ui-cra-ts"
],
"silent": true
}
9 changes: 5 additions & 4 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
/coverage
/docs/export
/docs/pages/playground/
/examples/material-cra*/src/serviceWorker.js
/examples/material-gatsby/public/
/examples/material-preact/config
/examples/material-preact/scripts
/examples/material-ui-cra*/src/serviceWorker.js
/examples/material-ui-gatsby/public/
/examples/material-ui-preact/config
/examples/material-ui-preact/scripts
/examples/material-ui-nextjs/src
/packages/mui-codemod/lib
/packages/mui-codemod/src/*/*.test/*
/packages/mui-icons-material/fixtures
Expand Down
78 changes: 51 additions & 27 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,20 +67,14 @@ module.exports = {
{
patterns: [
'@mui/*/*/*',
// Begin block: Packages with files instead of packages in the top level
// Importing from the top level pulls in CommonJS instead of ES modules
// Allowing /icons as to reduce cold-start of dev builds significantly.
// There's nothing to tree-shake when importing from /icons this way:
// '@mui/icons-material/*/',
'@mui/utils/*',
// End block
// Macros are fine since their import path is transpiled away
'!@mui/utils/macros',
'@mui/utils/macros/*',
'!@mui/utils/macros/*.macro',
],
},
],
'no-continue': 'off',
'no-constant-condition': 'error',
// Use the proptype inheritance chain
'no-prototype-builtins': 'off',
Expand All @@ -90,6 +84,16 @@ module.exports = {
// Destructuring harm grep potential.
'prefer-destructuring': 'off',

'@typescript-eslint/no-use-before-define': [
'error',
{
functions: false,
classes: true,
variables: true,
},
],
'no-use-before-define': 'off',

// disabled type-aware linting due to performance considerations
'@typescript-eslint/dot-notation': 'off',
'dot-notation': 'error',
Expand Down Expand Up @@ -125,6 +129,8 @@ module.exports = {

'material-ui/docgen-ignore-before-comment': 'error',
'material-ui/rules-of-use-theme-variants': 'error',
'material-ui/no-empty-box': 'error',
'material-ui/straight-quotes': 'error',

'react-hooks/exhaustive-deps': ['error', { additionalHooks: 'useEnhancedEffect' }],
'react-hooks/rules-of-hooks': 'error',
Expand Down Expand Up @@ -217,15 +223,6 @@ module.exports = {
rules: {
// does not work with wildcard imports. Mistakes will throw at runtime anyway
'import/named': 'off',
'no-restricted-imports': [
'error',
{
// Use named import from `test/utils` instead.
// The other files are private.
patterns: ['test/utils/*'],
},
],

'material-ui/disallow-active-element-as-key-event-target': 'error',

// upgraded level from recommended
Expand Down Expand Up @@ -276,6 +273,21 @@ module.exports = {
],
},
},
// Next.js plugin
{
files: ['docs/**/*'],
extends: ['plugin:@next/next/recommended'],
settings: {
next: {
rootDir: 'docs',
},
},
rules: {
// We're not using the Image component at the moment
'@next/next/no-img-element': 'off',
},
},
// Next.js entry points pages
{
files: ['docs/pages/**/*.js'],
rules: {
Expand All @@ -284,12 +296,7 @@ module.exports = {
},
// demos
{
files: [
'docs/src/pages/**/*.js',
'docs/src/pages/**/*.tsx',
'docs/data/**/*.js',
'docs/data/**/*.tsx',
],
files: ['docs/src/pages/**/*{.tsx,.js}', 'docs/data/**/*{.tsx,.js}'],
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.
Expand All @@ -299,13 +306,23 @@ module.exports = {
'no-console': 'off',
},
},
// demos - proptype generation
{
files: ['docs/data/base/components/modal/UseModal.js'],
rules: {
'consistent-return': 'off',
'func-names': 'off',
'no-else-return': 'off',
'prefer-template': 'off',
},
},
{
files: ['docs/data/**/*.tsx'],
files: ['docs/data/**/*{.tsx,.js}'],
excludedFiles: [
'docs/data/joy/getting-started/templates/**/*.tsx',
'docs/data/**/css/*.tsx',
'docs/data/**/system/*.tsx',
'docs/data/**/tailwind/*.tsx',
'docs/data/**/css/*{.tsx,.js}',
'docs/data/**/system/*{.tsx,.js}',
'docs/data/**/tailwind/*{.tsx,.js}',
],
rules: {
'filenames/match-exported': ['error'],
Expand All @@ -326,7 +343,7 @@ module.exports = {
'error',
{
patterns: [
// Allow deeper imports for TypeScript types. TODO?
// Allow deeper imports for TypeScript types. TODO remove
'@mui/*/*/*/*',
// Macros are fine since they're transpiled into something else
'!@mui/utils/macros/*.macro',
Expand Down Expand Up @@ -460,5 +477,12 @@ module.exports = {
'import/extensions': ['error', 'ignorePackages'],
},
},
{
files: ['packages/mui-base/src/**/**{.ts,.tsx}'],
rules: {
'import/no-default-export': 'error',
'import/prefer-default-export': 'off',
},
},
],
};
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: mui
open_collective: mui-org
ko_fi: # Replace with a single Ko-fi username
tidelift: npm/@mui/material
custom: # Replace with a single custom sponsorship URL
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/5.priority-support.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 'Priority support: SLA ⏰'
name: 'Priority Support: SLA ⏰'
description: I'm an MUI X Premium user and we have purchased the Priority Support add-on. I can't find a solution to my problem with MUI Core (Material UI, Base UI, MUI System, and Joy UI).
title: '[question] '
labels: ['status: needs triage', 'support: unknown']
Expand Down
Loading

0 comments on commit fa0a76a

Please sign in to comment.