From e60c1ca06f3bfac3c122320e8ead8f305ef66ba5 Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Tue, 9 Nov 2021 08:17:21 +0100 Subject: [PATCH] Update dev-dependencies --- package.json | 6 +++--- readme.md | 4 ++-- test/core.js | 10 ++++------ test/evaluate.js | 1 + 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index 94bea52..59a140d 100644 --- a/package.json +++ b/package.json @@ -73,8 +73,8 @@ "@babel/core": "^7.0.0", "@babel/plugin-transform-react-jsx": "^7.0.0", "@emotion/react": "^11.0.0", - "@mdx-js/react": "2.0.0-next.8", - "@theme-ui/preset-base": "^0.11.0", + "@mdx-js/react": "2.0.0-rc.1", + "@theme-ui/preset-base": "^0.12.0", "@types/babel__core": "^7.0.0", "@types/node": "^16.0.0", "@types/react": "^17.0.0", @@ -109,7 +109,7 @@ "typescript": "^4.0.0", "vue": "^3.0.0", "webpack": "^5.0.0", - "xo": "^0.45.0" + "xo": "^0.46.0" }, "scripts": { "prepack": "npm run build && npm run format", diff --git a/readme.md b/readme.md index c9d6bd1..85204d6 100644 --- a/readme.md +++ b/readme.md @@ -938,7 +938,7 @@ These do not adhere to semver and could break at any time! ### Importing `.mdx` files directly -[ESM loaders](https://nodejs.org/api/esm.html#esm\_loaders) are an experimental +[ESM loaders](https://nodejs.org/api/esm.html#esm_loaders) are an experimental feature in Node, slated to change. Still, they let projects “hijack” imports, to do all sorts of fancy things! **xdm** comes with experimental support for importing `.mdx` files with @@ -986,7 +986,7 @@ multiple loaders with ### Requiring `.mdx` files directly -[`require.extensions`](https://nodejs.org/api/modules.html#modules\_require\_extensions) +[`require.extensions`](https://nodejs.org/api/modules.html#modules_require_extensions) is a deprecated feature in Node. Still, it lets projects “hijack” `require` calls to do fancy things. **xdm** comes with support for requiring `.mdx` files with on-the-fly diff --git a/test/core.js b/test/core.js index 31167f1..0937ed7 100644 --- a/test/core.js +++ b/test/core.js @@ -117,9 +117,7 @@ test('xdm', async (t) => { render( h( // @ts-expect-error: React and Preact interferring. - await run(compileSync('?', {jsxImportSource: 'preact'}), { - keepImport: true - }), + await run(compileSync('?', {jsxImportSource: 'preact'})), {}, [] ) @@ -151,9 +149,7 @@ test('xdm', async (t) => { render( h( // @ts-expect-error: Preact types do not accept `JSX.Element`. - await run(compileSync('<>1', {jsxImportSource: 'preact'}), { - keepImport: true - }), + await run(compileSync('<>1', {jsxImportSource: 'preact'})), {} ) ), @@ -303,6 +299,7 @@ test('xdm', async (t) => { MDXProvider, { components: { + // @ts-expect-error: React and Preact interferring. Y() { return React.createElement('span', {}, '!') } @@ -545,6 +542,7 @@ export default function Layout({children}) { /** * @param {Object.} props */ + // @ts-expect-error: React and Preact interferring. em(props) { return React.createElement('i', props) } diff --git a/test/evaluate.js b/test/evaluate.js index ea83548..88c1e10 100644 --- a/test/evaluate.js +++ b/test/evaluate.js @@ -357,6 +357,7 @@ test('xdm (evaluate)', async (t) => { provider.MDXProvider, { components: { + // @ts-expect-error: React and Preact interferring. X() { return React.createElement('span', {}, '!') }