Skip to content

Commit c13d16f

Browse files
committed
chore(deps): Bumb dependencies and switch back to mdx from xdm
1 parent d58d015 commit c13d16f

File tree

4 files changed

+491
-584
lines changed

4 files changed

+491
-584
lines changed

context/MDXComponentProvider.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ import type { FC } from 'react';
33
import { Link, Typography } from '@material-ui/core';
44
import { MDXProvider } from '@mdx-js/react';
55

6-
// We use mdx-js here because, despite using xdm now for rendering, it has the same API.
7-
86
export const MDXComponentProvider: FC = ({ children }) => {
97
return (
108
<MDXProvider

next.config.js

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,14 @@ const withTM = require('next-transpile-modules')(
1010
{ debug: false }, // Log which files get transpiled
1111
);
1212

13+
const withMDX = require('@next/mdx')({
14+
extension: /\.mdx?$/,
15+
options: {
16+
jsxImportSource: '@emotion/react',
17+
providerImportSource: '@mdx-js/react',
18+
},
19+
});
20+
1321
const resolvePackage = (packageName) => path.resolve(__dirname, '.', 'node_modules', packageName);
1422

1523
/**
@@ -29,21 +37,6 @@ const nextConfig = {
2937
},
3038
// Allow mdx content and mdx files as pages
3139
webpack(config) {
32-
config.module.rules.push({
33-
test: /\.mdx$/,
34-
use: [
35-
{
36-
loader: 'xdm/webpack.cjs',
37-
options: {
38-
// This line allows a configurable provider to configure transformed components
39-
providerImportSource: '@mdx-js/react',
40-
// This line provides compatibility with the emotion css prop jsx pragma
41-
jsxImportSource: '@emotion/react',
42-
},
43-
},
44-
],
45-
});
46-
4740
if (process.env.MONOREPO) {
4841
const packages = ['react', '@material-ui/core', 'react-query'];
4942
packages.forEach(
@@ -62,4 +55,4 @@ const sentryWebpackPluginOptions = {
6255

6356
const moduleExports = process.env.MONOREPO ? withTM(nextConfig) : nextConfig;
6457

65-
module.exports = withSentryConfig(moduleExports, sentryWebpackPluginOptions);
58+
module.exports = withMDX(withSentryConfig(moduleExports, sentryWebpackPluginOptions));

package.json

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,20 @@
2525
},
2626
"dependencies": {
2727
"@auth0/nextjs-auth0": "1.7.0",
28-
"@emotion/react": "11.8.1",
28+
"@emotion/react": "11.8.2",
2929
"@emotion/styled": "11.8.1",
3030
"@material-ui/core": "4.12.3",
3131
"@material-ui/icons": "4.11.2",
3232
"@material-ui/lab": "4.0.0-alpha.60",
33+
"@mdx-js/loader": "^2.1.0",
34+
"@next/mdx": "^12.1.0",
3335
"@rjsf/core": "3.2.1",
3436
"@rjsf/material-ui": "3.2.1",
3537
"@squonk/account-server-client": "0.1.20-rc.1",
36-
"@squonk/data-manager-client": "0.7.0-beta.5",
38+
"@squonk/data-manager-client": "0.7.0-beta.6",
3739
"@squonk/mui-theme": "2.0.1",
38-
"axios": "0.26.0",
39-
"dayjs": "1.10.8",
40+
"axios": "0.26.1",
41+
"dayjs": "1.11.0",
4042
"filesize": "8.0.7",
4143
"formik": "2.2.9",
4244
"formik-material-ui": "3.0.1",
@@ -45,14 +47,14 @@
4547
"lodash-es": "4.17.21",
4648
"material-ui-popup-state": "1.9.3",
4749
"next": "12.1.0",
48-
"next-http-proxy-middleware": "1.2.2",
50+
"next-http-proxy-middleware": "1.2.4",
4951
"next-transpile-modules": "9.0.0",
50-
"node-fetch": "3.2.1",
52+
"node-fetch": "3.2.3",
5153
"notistack": "1.0.10",
52-
"plotly.js-basic-dist": "2.9.0",
54+
"plotly.js-basic-dist": "2.11.1",
5355
"react": "17.0.2",
5456
"react-dom": "17.0.2",
55-
"react-dropzone": "11.7.1",
57+
"react-dropzone": "12.0.4",
5658
"react-plotly.js": "2.5.1",
5759
"react-query": "3.34.16",
5860
"react-table": "7.7.0",
@@ -65,33 +67,32 @@
6567
"@emotion/babel-preset-css-prop": "11.2.0",
6668
"@mdx-js/react": "1.6.22",
6769
"@next/eslint-plugin-next": "12.1.0",
68-
"@playwright/test": "1.19.2",
69-
"@sentry/nextjs": "6.18.1",
70+
"@playwright/test": "1.20.0",
71+
"@sentry/nextjs": "6.19.1",
7072
"@squonk/eslint-config": "0.2.0",
7173
"@types/lodash-es": "4.17.6",
7274
"@types/mdx-js__react": "1.5.5",
7375
"@types/node": "16.11.26",
7476
"@types/plotly.js-basic-dist": "1.54.0",
75-
"@types/react": "17.0.39",
77+
"@types/react": "17.0.41",
7678
"@types/react-plotly.js": "2.5.0",
77-
"@types/react-table": "7.7.9",
79+
"@types/react-table": "7.7.10",
7880
"@types/react-virtualized": "9.21.20",
7981
"@types/uuid": "8.3.4",
80-
"@typescript-eslint/eslint-plugin": "5.13.0",
81-
"@typescript-eslint/parser": "5.13.0",
82-
"eslint": "8.10.0",
82+
"@typescript-eslint/eslint-plugin": "5.16.0",
83+
"@typescript-eslint/parser": "5.16.0",
84+
"eslint": "8.11.0",
8385
"eslint-config-prettier": "8.5.0",
8486
"eslint-plugin-prettier": "4.0.0",
85-
"eslint-plugin-react": "7.29.2",
87+
"eslint-plugin-react": "7.29.4",
8688
"eslint-plugin-react-hooks": "4.3.0",
8789
"eslint-plugin-simple-import-sort": "7.0.0",
8890
"eslint-plugin-unused-imports": "2.0.0",
8991
"husky": "7.0.4",
9092
"identity-obj-proxy": "3.0.0",
91-
"lint-staged": "12.3.4",
92-
"prettier": "2.5.1",
93+
"lint-staged": "12.3.7",
94+
"prettier": "2.6.0",
9395
"sass": "1.49.9",
94-
"typescript": "4.6.2",
95-
"xdm": "3.3.4"
96+
"typescript": "4.6.2"
9697
}
9798
}

0 commit comments

Comments
 (0)