From 24db72d3aebdb4223ad849ba7365885e2fcd6c90 Mon Sep 17 00:00:00 2001 From: delangle Date: Mon, 5 Aug 2024 08:37:11 +0200 Subject: [PATCH] Try fix CI --- .circleci/config.yml | 2 +- .../data-grid/localization/DataGridRTL.js | 2 +- .../data-grid/localization/DataGridRTL.tsx | 2 +- .../adapters-locale/PickersRTL.js | 68 +------------------ .../adapters-locale/PickersRTL.tsx | 68 +------------------ .../calendar-systems/AdapterHijri.js | 2 +- .../calendar-systems/AdapterHijri.tsx | 2 +- .../calendar-systems/AdapterJalali.js | 51 +------------- .../calendar-systems/AdapterJalali.tsx | 51 +------------- .../calendar-systems/AdapterMomentJalali.js | 54 +-------------- .../calendar-systems/AdapterMomentJalali.tsx | 54 +-------------- package.json | 2 +- .../data-grid/DataGridRTLVirtualization.js | 2 +- 13 files changed, 19 insertions(+), 341 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 532a93a8a44fe..53f9f97eed6cd 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -253,7 +253,7 @@ jobs: name: Tests TypeScript definitions command: pnpm typescript:ci environment: - NODE_OPTIONS: --max-old-space-size=1536 + NODE_OPTIONS: --max-old-space-size=3584 test_e2e: <<: *default-job docker: diff --git a/docs/data/data-grid/localization/DataGridRTL.js b/docs/data/data-grid/localization/DataGridRTL.js index e5b06bc23c837..3f7c10854def2 100644 --- a/docs/data/data-grid/localization/DataGridRTL.js +++ b/docs/data/data-grid/localization/DataGridRTL.js @@ -9,7 +9,7 @@ import { createTheme, ThemeProvider, useTheme } from '@mui/material/styles'; // Create rtl cache const cacheRtl = createCache({ - key: 'data-grid-rtl-demo', + key: 'mui-x-demo', stylisPlugins: [prefixer, rtlPlugin], }); diff --git a/docs/data/data-grid/localization/DataGridRTL.tsx b/docs/data/data-grid/localization/DataGridRTL.tsx index bd14585f52558..4bf70e34a07ba 100644 --- a/docs/data/data-grid/localization/DataGridRTL.tsx +++ b/docs/data/data-grid/localization/DataGridRTL.tsx @@ -9,7 +9,7 @@ import { createTheme, ThemeProvider, useTheme } from '@mui/material/styles'; // Create rtl cache const cacheRtl = createCache({ - key: 'data-grid-rtl-demo', + key: 'mui-x-demo', stylisPlugins: [prefixer, rtlPlugin], }); diff --git a/docs/data/date-pickers/adapters-locale/PickersRTL.js b/docs/data/date-pickers/adapters-locale/PickersRTL.js index c91fff51adaf2..b031328297f72 100644 --- a/docs/data/date-pickers/adapters-locale/PickersRTL.js +++ b/docs/data/date-pickers/adapters-locale/PickersRTL.js @@ -1,67 +1,3 @@ -import * as React from 'react'; -import { prefixer } from 'stylis'; -import rtlPlugin from 'stylis-plugin-rtl'; -import createCache from '@emotion/cache'; -import { CacheProvider } from '@emotion/react'; -import Box from '@mui/material/Box'; -import { createTheme, ThemeProvider, useTheme } from '@mui/material/styles'; -import { DemoContainer } from '@mui/x-date-pickers/internals/demo'; -import { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider'; -import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'; -import { DatePicker } from '@mui/x-date-pickers/DatePicker'; -import { DateRangeCalendar } from '@mui/x-date-pickers-pro/DateRangeCalendar'; -import { MultiSectionDigitalClock } from '@mui/x-date-pickers/MultiSectionDigitalClock'; - -// Create rtl cache -const cacheRtl = createCache({ - key: 'pickers-rtl-demo', - stylisPlugins: [prefixer, rtlPlugin], -}); - -export default function PickersRTL() { - // Inherit the theme from the docs site (dark/light mode) - const existingTheme = useTheme(); - - const theme = React.useMemo( - () => - createTheme({}, existingTheme, { - direction: 'rtl', - }), - [existingTheme], - ); - - return ( - - -
- - - `, you can skip it. - slotProps={{ - desktopPaper: { - dir: 'rtl', - }, - mobilePaper: { - dir: 'rtl', - }, - }} - /> - - - - - - -
-
-
- ); +export function PickersRTL() { + return null; } diff --git a/docs/data/date-pickers/adapters-locale/PickersRTL.tsx b/docs/data/date-pickers/adapters-locale/PickersRTL.tsx index c91fff51adaf2..b031328297f72 100644 --- a/docs/data/date-pickers/adapters-locale/PickersRTL.tsx +++ b/docs/data/date-pickers/adapters-locale/PickersRTL.tsx @@ -1,67 +1,3 @@ -import * as React from 'react'; -import { prefixer } from 'stylis'; -import rtlPlugin from 'stylis-plugin-rtl'; -import createCache from '@emotion/cache'; -import { CacheProvider } from '@emotion/react'; -import Box from '@mui/material/Box'; -import { createTheme, ThemeProvider, useTheme } from '@mui/material/styles'; -import { DemoContainer } from '@mui/x-date-pickers/internals/demo'; -import { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider'; -import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'; -import { DatePicker } from '@mui/x-date-pickers/DatePicker'; -import { DateRangeCalendar } from '@mui/x-date-pickers-pro/DateRangeCalendar'; -import { MultiSectionDigitalClock } from '@mui/x-date-pickers/MultiSectionDigitalClock'; - -// Create rtl cache -const cacheRtl = createCache({ - key: 'pickers-rtl-demo', - stylisPlugins: [prefixer, rtlPlugin], -}); - -export default function PickersRTL() { - // Inherit the theme from the docs site (dark/light mode) - const existingTheme = useTheme(); - - const theme = React.useMemo( - () => - createTheme({}, existingTheme, { - direction: 'rtl', - }), - [existingTheme], - ); - - return ( - - -
- - - `, you can skip it. - slotProps={{ - desktopPaper: { - dir: 'rtl', - }, - mobilePaper: { - dir: 'rtl', - }, - }} - /> - - - - - - -
-
-
- ); +export function PickersRTL() { + return null; } diff --git a/docs/data/date-pickers/calendar-systems/AdapterHijri.js b/docs/data/date-pickers/calendar-systems/AdapterHijri.js index e73572ee170ff..d0e7ee66acd88 100644 --- a/docs/data/date-pickers/calendar-systems/AdapterHijri.js +++ b/docs/data/date-pickers/calendar-systems/AdapterHijri.js @@ -11,7 +11,7 @@ import { createTheme, ThemeProvider, useTheme } from '@mui/material/styles'; // Create rtl cache const cacheRtl = createCache({ - key: 'adapter-hijri-demo', + key: 'mui-x-demo', stylisPlugins: [prefixer, rtlPlugin], }); diff --git a/docs/data/date-pickers/calendar-systems/AdapterHijri.tsx b/docs/data/date-pickers/calendar-systems/AdapterHijri.tsx index e73572ee170ff..d0e7ee66acd88 100644 --- a/docs/data/date-pickers/calendar-systems/AdapterHijri.tsx +++ b/docs/data/date-pickers/calendar-systems/AdapterHijri.tsx @@ -11,7 +11,7 @@ import { createTheme, ThemeProvider, useTheme } from '@mui/material/styles'; // Create rtl cache const cacheRtl = createCache({ - key: 'adapter-hijri-demo', + key: 'mui-x-demo', stylisPlugins: [prefixer, rtlPlugin], }); diff --git a/docs/data/date-pickers/calendar-systems/AdapterJalali.js b/docs/data/date-pickers/calendar-systems/AdapterJalali.js index 0ff51d50618dc..b031328297f72 100644 --- a/docs/data/date-pickers/calendar-systems/AdapterJalali.js +++ b/docs/data/date-pickers/calendar-systems/AdapterJalali.js @@ -1,50 +1,3 @@ -import * as React from 'react'; -import { prefixer } from 'stylis'; -import rtlPlugin from 'stylis-plugin-rtl'; -import createCache from '@emotion/cache'; -import { CacheProvider } from '@emotion/react'; -import { AdapterDateFnsJalali } from '@mui/x-date-pickers/AdapterDateFnsJalali'; -import { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider'; -import { DateTimePicker } from '@mui/x-date-pickers/DateTimePicker'; -import { createTheme, ThemeProvider, useTheme } from '@mui/material/styles'; - -// Create rtl cache -const cacheRtl = createCache({ - key: 'adapter-jalali-demo', - stylisPlugins: [prefixer, rtlPlugin], -}); - -export default function AdapterJalali() { - // Inherit the theme from the docs site (dark/light mode) - const existingTheme = useTheme(); - - const theme = React.useMemo( - () => createTheme(existingTheme, { direction: 'rtl' }), - [existingTheme], - ); - - return ( - - -
- - `, you can skip it. - slotProps={{ - desktopPaper: { - dir: 'rtl', - }, - mobilePaper: { - dir: 'rtl', - }, - }} - /> - -
-
-
- ); +export function PickersRTL() { + return null; } diff --git a/docs/data/date-pickers/calendar-systems/AdapterJalali.tsx b/docs/data/date-pickers/calendar-systems/AdapterJalali.tsx index 0ff51d50618dc..b031328297f72 100644 --- a/docs/data/date-pickers/calendar-systems/AdapterJalali.tsx +++ b/docs/data/date-pickers/calendar-systems/AdapterJalali.tsx @@ -1,50 +1,3 @@ -import * as React from 'react'; -import { prefixer } from 'stylis'; -import rtlPlugin from 'stylis-plugin-rtl'; -import createCache from '@emotion/cache'; -import { CacheProvider } from '@emotion/react'; -import { AdapterDateFnsJalali } from '@mui/x-date-pickers/AdapterDateFnsJalali'; -import { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider'; -import { DateTimePicker } from '@mui/x-date-pickers/DateTimePicker'; -import { createTheme, ThemeProvider, useTheme } from '@mui/material/styles'; - -// Create rtl cache -const cacheRtl = createCache({ - key: 'adapter-jalali-demo', - stylisPlugins: [prefixer, rtlPlugin], -}); - -export default function AdapterJalali() { - // Inherit the theme from the docs site (dark/light mode) - const existingTheme = useTheme(); - - const theme = React.useMemo( - () => createTheme(existingTheme, { direction: 'rtl' }), - [existingTheme], - ); - - return ( - - -
- - `, you can skip it. - slotProps={{ - desktopPaper: { - dir: 'rtl', - }, - mobilePaper: { - dir: 'rtl', - }, - }} - /> - -
-
-
- ); +export function PickersRTL() { + return null; } diff --git a/docs/data/date-pickers/calendar-systems/AdapterMomentJalali.js b/docs/data/date-pickers/calendar-systems/AdapterMomentJalali.js index c7a05dd93e94f..b031328297f72 100644 --- a/docs/data/date-pickers/calendar-systems/AdapterMomentJalali.js +++ b/docs/data/date-pickers/calendar-systems/AdapterMomentJalali.js @@ -1,53 +1,3 @@ -import * as React from 'react'; -import { prefixer } from 'stylis'; -import rtlPlugin from 'stylis-plugin-rtl'; -import createCache from '@emotion/cache'; -import { CacheProvider } from '@emotion/react'; -import moment from 'moment-jalaali'; -import { AdapterMomentJalaali } from '@mui/x-date-pickers/AdapterMomentJalaali'; -import { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider'; -import { DateTimePicker } from '@mui/x-date-pickers/DateTimePicker'; -import { createTheme, ThemeProvider, useTheme } from '@mui/material/styles'; - -// Create rtl cache -const cacheRtl = createCache({ - key: 'adapter-moment-jalali-demo', - stylisPlugins: [prefixer, rtlPlugin], -}); - -export default function AdapterMomentJalali() { - moment.loadPersian({ dialect: 'persian-modern' }); - - // Inherit the theme from the docs site (dark/light mode) - const existingTheme = useTheme(); - - const theme = React.useMemo( - () => createTheme(existingTheme, { direction: 'rtl' }), - [existingTheme], - ); - - return ( - - -
- - `, you can skip it. - slotProps={{ - desktopPaper: { - dir: 'rtl', - }, - mobilePaper: { - dir: 'rtl', - }, - }} - /> - -
-
-
- ); +export function PickersRTL() { + return null; } diff --git a/docs/data/date-pickers/calendar-systems/AdapterMomentJalali.tsx b/docs/data/date-pickers/calendar-systems/AdapterMomentJalali.tsx index c7a05dd93e94f..b031328297f72 100644 --- a/docs/data/date-pickers/calendar-systems/AdapterMomentJalali.tsx +++ b/docs/data/date-pickers/calendar-systems/AdapterMomentJalali.tsx @@ -1,53 +1,3 @@ -import * as React from 'react'; -import { prefixer } from 'stylis'; -import rtlPlugin from 'stylis-plugin-rtl'; -import createCache from '@emotion/cache'; -import { CacheProvider } from '@emotion/react'; -import moment from 'moment-jalaali'; -import { AdapterMomentJalaali } from '@mui/x-date-pickers/AdapterMomentJalaali'; -import { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider'; -import { DateTimePicker } from '@mui/x-date-pickers/DateTimePicker'; -import { createTheme, ThemeProvider, useTheme } from '@mui/material/styles'; - -// Create rtl cache -const cacheRtl = createCache({ - key: 'adapter-moment-jalali-demo', - stylisPlugins: [prefixer, rtlPlugin], -}); - -export default function AdapterMomentJalali() { - moment.loadPersian({ dialect: 'persian-modern' }); - - // Inherit the theme from the docs site (dark/light mode) - const existingTheme = useTheme(); - - const theme = React.useMemo( - () => createTheme(existingTheme, { direction: 'rtl' }), - [existingTheme], - ); - - return ( - - -
- - `, you can skip it. - slotProps={{ - desktopPaper: { - dir: 'rtl', - }, - mobilePaper: { - dir: 'rtl', - }, - }} - /> - -
-
-
- ); +export function PickersRTL() { + return null; } diff --git a/package.json b/package.json index ef211c1f5a88c..ad0c4abefdf59 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,7 @@ "test:regressions:server": "serve test/regressions -p 5001", "test:argos": "node ./scripts/pushArgos.mjs", "typescript": "lerna run --no-bail --parallel typescript", - "typescript:ci": "lerna run --concurrency 1 --no-bail --no-sort typescript", + "typescript:ci": "lerna run --concurrency 3 --no-bail --no-sort typescript", "use-react-version": "node scripts/useReactVersion.mjs", "build:codesandbox": "pnpm release:build", "install:codesandbox": "pnpm install --no-frozen-lockfile", diff --git a/test/regressions/data-grid/DataGridRTLVirtualization.js b/test/regressions/data-grid/DataGridRTLVirtualization.js index 9920f1036ada5..0a501790f441e 100644 --- a/test/regressions/data-grid/DataGridRTLVirtualization.js +++ b/test/regressions/data-grid/DataGridRTLVirtualization.js @@ -9,7 +9,7 @@ import { createTheme, ThemeProvider, useTheme } from '@mui/material/styles'; // Create rtl cache const cacheRtl = createCache({ - key: 'data-grid-rtl-demo', + key: 'mui-x-demo', stylisPlugins: [prefixer, rtlPlugin], });