Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/next' into fix/relative-sandbox
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfauquette committed Aug 8, 2024
2 parents e64a8e6 + b9a041d commit f2ff725
Show file tree
Hide file tree
Showing 889 changed files with 23,188 additions and 11,308 deletions.
100 changes: 80 additions & 20 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,6 @@ commands:
description: 'Set to true if you intend to any browser (for example with playwright).'

steps:
- run:
name: Resolve React version
command: |
node scripts/useReactVersion.mjs
# log a patch for maintainers who want to check out this change
git --no-pager diff HEAD
- when:
condition: << parameters.browsers >>
steps:
Expand Down Expand Up @@ -106,6 +99,14 @@ commands:
command: |
node --version
pnpm --version
- run:
name: Resolve React version
command: |
pnpm use-react-version
# log a patch for maintainers who want to check out this change
git --no-pager diff HEAD
- run:
name: Install js dependencies
command: pnpm install
Expand Down Expand Up @@ -391,7 +392,7 @@ jobs:
<<: *default-job
resource_class: 'medium+'
docker:
- image: mcr.microsoft.com/playwright:v1.45.1-focal
- image: mcr.microsoft.com/playwright:v1.45.3-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand Down Expand Up @@ -421,7 +422,7 @@ jobs:
test_e2e:
<<: *default-job
docker:
- image: mcr.microsoft.com/playwright:v1.45.1-focal
- image: mcr.microsoft.com/playwright:v1.45.3-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand All @@ -435,7 +436,7 @@ jobs:
# NOTE: This workflow runs after successful docs deploy. See /test/e2e-website/README.md#ci
<<: *default-job
docker:
- image: mcr.microsoft.com/playwright:v1.45.1-focal
- image: mcr.microsoft.com/playwright:v1.45.3-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand All @@ -450,7 +451,7 @@ jobs:
test_profile:
<<: *default-job
docker:
- image: mcr.microsoft.com/playwright:v1.45.1-focal
- image: mcr.microsoft.com/playwright:v1.45.3-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand All @@ -477,7 +478,7 @@ jobs:
test_regressions:
<<: *default-job
docker:
- image: mcr.microsoft.com/playwright:v1.45.1-focal
- image: mcr.microsoft.com/playwright:v1.45.3-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand Down Expand Up @@ -531,7 +532,7 @@ jobs:
<<: *default-job
working_directory: /tmp/material-ui/test/bundling/fixtures/next-webpack4/
docker:
- image: mcr.microsoft.com/playwright:v1.45.1-focal
- image: mcr.microsoft.com/playwright:v1.45.3-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand All @@ -555,7 +556,7 @@ jobs:
<<: *default-job
working_directory: /tmp/material-ui/test/bundling/fixtures/next-webpack5/
docker:
- image: mcr.microsoft.com/playwright:v1.45.1-focal
- image: mcr.microsoft.com/playwright:v1.45.3-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand All @@ -579,7 +580,7 @@ jobs:
<<: *default-job
working_directory: /tmp/material-ui/test/bundling/fixtures/create-react-app/
docker:
- image: mcr.microsoft.com/playwright:v1.45.1-focal
- image: mcr.microsoft.com/playwright:v1.45.3-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand All @@ -603,7 +604,7 @@ jobs:
<<: *default-job
working_directory: /tmp/material-ui/test/bundling/fixtures/snowpack/
docker:
- image: mcr.microsoft.com/playwright:v1.45.1-focal
- image: mcr.microsoft.com/playwright:v1.45.3-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand All @@ -627,7 +628,7 @@ jobs:
<<: *default-job
working_directory: /tmp/material-ui/test/bundling/fixtures/vite/
docker:
- image: mcr.microsoft.com/playwright:v1.45.1-focal
- image: mcr.microsoft.com/playwright:v1.45.3-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand All @@ -651,7 +652,7 @@ jobs:
<<: *default-job
working_directory: /tmp/material-ui/test/bundling/fixtures/esbuild/
docker:
- image: mcr.microsoft.com/playwright:v1.45.1-focal
- image: mcr.microsoft.com/playwright:v1.45.3-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand Down Expand Up @@ -679,7 +680,7 @@ jobs:
<<: *default-job
working_directory: /tmp/material-ui/test/bundling/fixtures/gatsby/
docker:
- image: mcr.microsoft.com/playwright:v1.45.1-focal
- image: mcr.microsoft.com/playwright:v1.45.3-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand Down Expand Up @@ -780,7 +781,7 @@ jobs:
test_benchmark:
<<: *default-job
docker:
- image: mcr.microsoft.com/playwright:v1.45.1-focal
- image: mcr.microsoft.com/playwright:v1.45.3-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand Down Expand Up @@ -887,48 +888,106 @@ workflows:
jobs:
- test_profile:
<<: *default-context

# This workflow can be triggered manually on the PR
react-17:
when:
equal: [react-17, << pipeline.parameters.workflow >>]
jobs:
- test_unit:
<<: *default-context
react-version: ^17.0.0
name: test_unit-react@17
- test_browser:
<<: *default-context
react-version: ^17.0.0
name: test_browser-react@17
- test_regressions:
<<: *default-context
react-version: ^17.0.0
name: test_regressions-react@17
- test_e2e:
<<: *default-context
react-version: ^17.0.0
name: test_e2e-react@17

# This workflow is identical to react-17, but scheduled
react-17-cron:
triggers:
- schedule:
cron: '0 0 * * *'
filters:
branches:
only:
- master
- next
jobs:
- test_unit:
<<: *default-context
react-version: ^17.0.0
name: test_unit-react@17
- test_browser:
<<: *default-context
react-version: ^17.0.0
name: test_browser-react@17
- test_regressions:
<<: *default-context
react-version: ^17.0.0
name: test_regressions-react@17
- test_e2e:
<<: *default-context
react-version: ^17.0.0
name: test_e2e-react@17

# This workflow can be triggered manually on the PR
react-next:
when:
equal: [react-next, << pipeline.parameters.workflow >>]
jobs:
- test_unit:
<<: *default-context
react-version: next
name: test_unit-react@next
- test_browser:
<<: *default-context
react-version: next
name: test_browser-react@next
- test_regressions:
<<: *default-context
react-version: next
name: test_regressions-react@next
- test_e2e:
<<: *default-context
react-version: next
name: test_e2e-react@next
# This workflow is identical to react-next, but scheduled
react-next-cron:
triggers:
- schedule:
cron: '0 0 * * *'
filters:
branches:
only:
- master
- next
jobs:
- test_unit:
<<: *default-context
react-version: next
name: test_unit-react@next
- test_browser:
<<: *default-context
react-version: next
name: test_browser-react@next
- test_regressions:
<<: *default-context
react-version: next
name: test_regressions-react@next
- test_e2e:
<<: *default-context
react-version: next
name: test_e2e-react@next

typescript-next:
triggers:
- schedule:
Expand All @@ -937,6 +996,7 @@ workflows:
branches:
only:
- master
- next
jobs:
- test_types_next:
<<: *default-context
Expand Down
2 changes: 2 additions & 0 deletions .codesandbox/ci.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"packages/mui-lab",
"packages/mui-material-nextjs",
"packages/mui-material",
"packages/mui-material-pigment-css",
"packages/mui-private-theming",
"packages/mui-styled-engine-sc",
"packages/mui-styled-engine",
Expand All @@ -38,6 +39,7 @@
"@mui/lab": "packages/mui-lab/build",
"@mui/material-nextjs": "packages/mui-material-nextjs/build",
"@mui/material": "packages/mui-material/build",
"@mui/material-pigment-css": "packages/mui-material-pigment-css/build",
"@mui/private-theming": "packages/mui-private-theming/build",
"@mui/styled-engine": "packages/mui-styled-engine/build",
"@mui/styled-engine-sc": "packages/mui-styled-engine-sc/build",
Expand Down
75 changes: 41 additions & 34 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,32 @@ const forbidCreateStylesMessage =

const ENABLE_REACT_COMPILER_PLUGIN = false;

const NO_RESTRICTED_IMPORTS_PATHS_TOP_LEVEL_PACKAGES = [
{
name: '@mui/material',
message: OneLevelImportMessage,
},
{
name: '@mui/lab',
message: OneLevelImportMessage,
},
];

const NO_RESTRICTED_IMPORTS_PATTERNS_DEEPLY_NESTED = [
{
group: [
'@mui/*/*/*',
'@pigment-css/*/*/*',
'@base_ui/*/*/*',
// Allow any import depth with any internal packages
'!@mui/internal-*/**',
// TODO delete, @mui/docs should be @mui/internal-docs
'!@mui/docs/**',
],
message: OneLevelImportMessage,
},
];

module.exports = {
root: true, // So parent files don't get applied
env: {
Expand Down Expand Up @@ -67,20 +93,7 @@ module.exports = {
'no-restricted-imports': [
'error',
{
patterns: [
{
group: [
'@mui/*/*/*',
'@pigment-css/*/*/*',
'@base_ui/*/*/*',
// Allow any import depth with any internal packages
'!@mui/internal-*/**',
// TODO delete, @mui/docs should be @mui/internal-docs
'!@mui/docs/**',
],
message: OneLevelImportMessage,
},
],
patterns: NO_RESTRICTED_IMPORTS_PATTERNS_DEEPLY_NESTED,
},
],
'no-continue': 'off',
Expand Down Expand Up @@ -417,23 +430,26 @@ module.exports = {
'no-bitwise': 'off',
},
},
{
files: ['docs/**/*{.ts,.tsx,.js}'],
rules: {
'no-restricted-imports': [
'error',
{
paths: NO_RESTRICTED_IMPORTS_PATHS_TOP_LEVEL_PACKAGES,
patterns: NO_RESTRICTED_IMPORTS_PATTERNS_DEEPLY_NESTED,
},
],
},
},
{
files: ['packages/*/src/**/*{.ts,.tsx,.js}'],
excludedFiles: ['*.d.ts', '*.spec.ts', '*.spec.tsx'],
rules: {
'no-restricted-imports': [
'error',
{
paths: [
{
name: '@mui/material',
message: OneLevelImportMessage,
},
{
name: '@mui/lab',
message: OneLevelImportMessage,
},
],
paths: NO_RESTRICTED_IMPORTS_PATHS_TOP_LEVEL_PACKAGES,
},
],
// TODO: Consider setting back to `ignoreExternal: true` when the expected behavior is fixed:
Expand All @@ -446,16 +462,7 @@ module.exports = {
files: ['packages/*/src/**/*{.ts,.tsx,.js}'],
excludedFiles: ['*.d.ts', '*.spec.ts', '*.spec.tsx', 'packages/mui-joy/**/*{.ts,.tsx,.js}'],
rules: {
'material-ui/mui-name-matches-component-name': [
'error',
{
customHooks: [
'useDatePickerDefaultizedProps',
'useDateTimePickerDefaultizedProps',
'useTimePickerDefaultizedProps',
],
},
],
'material-ui/mui-name-matches-component-name': 'error',
},
},
{
Expand Down
Loading

0 comments on commit f2ff725

Please sign in to comment.