Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update monorepo #4624

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,9 @@ module.exports = {
'react-compiler/react-compiler': 'error',
},
overrides: [
...baseline.overrides,
...baseline.overrides.filter(
(override) => !override.rules['material-ui/disallow-react-api-in-server-components'],
),
{
files: ['**/*.test.js', '**/*.test.ts', '**/*.test.tsx'],
extends: ['plugin:testing-library/react'],
Expand Down Expand Up @@ -216,5 +218,12 @@ module.exports = {
],
},
},
{
files: ['packages/toolpad-core/src/*/*.?(c|m)[jt]s?(x)'],
excludedFiles: ['*.spec.*', '*.test.*'],
rules: {
'material-ui/disallow-react-api-in-server-components': 'error',
},
},
],
};
1 change: 0 additions & 1 deletion docs/config.js

This file was deleted.

1 change: 1 addition & 0 deletions docs/config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from '@mui/monorepo/docs/config';
9 changes: 4 additions & 5 deletions docs/next.config.mjs → docs/next.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@
import * as path from 'path';
import * as url from 'url';
import { createRequire } from 'module';
import { LANGUAGES, LANGUAGES_IGNORE_PAGES, LANGUAGES_IN_PROGRESS } from './config.js';
import { LANGUAGES, LANGUAGES_IGNORE_PAGES, LANGUAGES_IN_PROGRESS } from './config';

const currentDirectory = url.fileURLToPath(new URL('.', import.meta.url));

const require = createRequire(import.meta.url);

const withDocsInfra = require('@mui/monorepo/docs/nextConfigDocsInfra');

const pkg = require('../package.json');
const { findPages } = require('./src/modules/utils/find');

const WORKSPACE_ROOT = path.resolve(currentDirectory, '../');
Expand All @@ -22,6 +21,8 @@ const MONOREPO_PACKAGES = {
const toolpadCorePkg = require('../packages/toolpad-core/package.json');
const toolpadStudioPkg = require('../packages/toolpad-studio/package.json');

const mdLoader = require.resolve('@mui/monorepo/packages/markdown/loader');

export default withDocsInfra({
transpilePackages: [
// TODO, those shouldn't be needed in the first place
Expand Down Expand Up @@ -53,9 +54,7 @@ export default withDocsInfra({
...config.resolveLoader,
alias: {
...config.resolveLoader.alias,
'@mui/internal-markdown/loader': require.resolve(
'@mui/monorepo/packages/markdown/loader',
),
'@mui/internal-markdown/loader': mdLoader,
},
},
resolve: {
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/_app.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { DocsProvider } from '@mui/docs/DocsProvider';
import { mapTranslations } from '@mui/docs/i18n';
import toolpadStudioPages from '../data/toolpad/studio/pages';
import toolpadCorePages from '../data/toolpad/core/pages';
import config from '../config';
import * as config from '../config';

// Remove the license warning from demonstration purposes
LicenseInfo.setLicenseKey(process.env.NEXT_PUBLIC_MUI_LICENSE);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"@mui/internal-docs-utils": "1.0.16",
"@mui/internal-markdown": "1.0.24",
"@mui/internal-scripts": "1.0.32",
"@mui/monorepo": "github:mui/material-ui#dd69cf07e7aace1efad91e5b8e733c7efcf6c02c",
"@mui/monorepo": "github:mui/material-ui#e6c9d992604880c1eb3294f9c96109b519f4d8e9",
"@mui/x-charts": "7.23.6",
"@next/eslint-plugin-next": "14.2.23",
"@playwright/test": "1.47.2",
Expand Down
1 change: 1 addition & 0 deletions packages/toolpad-core/src/Account/Account.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import * as React from 'react';
import PropTypes from 'prop-types';
import Button, { ButtonProps } from '@mui/material/Button';
Expand Down
1 change: 1 addition & 0 deletions packages/toolpad-core/src/internal/context.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import * as React from 'react';

export const DocsContext = React.createContext<boolean>(false);
1 change: 1 addition & 0 deletions packages/toolpad-core/src/internal/demo.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import * as React from 'react';
import { Router } from '../AppProvider';

Expand Down
1 change: 1 addition & 0 deletions packages/toolpad-core/src/shared/context.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import * as React from 'react';
import type { PaletteMode } from '@mui/material';
import type { Branding, Navigation, Router } from '../AppProvider';
Expand Down
1 change: 1 addition & 0 deletions packages/toolpad-core/src/useDialogs/DialogsContext.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import * as React from 'react';
import type { CloseDialog, OpenDialog } from './useDialogs';

Expand Down
1 change: 1 addition & 0 deletions packages/toolpad-core/src/useDialogs/DialogsProvider.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import invariant from 'invariant';
import * as React from 'react';
import { DialogsContext } from './DialogsContext';
Expand Down
1 change: 1 addition & 0 deletions packages/toolpad-core/src/useDialogs/useDialogs.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import { LoadingButton } from '@mui/lab';
import {
Dialog,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import * as React from 'react';
import type { ShowNotification, CloseNotification } from './useNotifications';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import * as React from 'react';
import {
Alert,
Expand Down
22 changes: 11 additions & 11 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading