Skip to content

Commit

Permalink
chore(gatsby-plugin-mdx): Upgrade MDX and snapshots (gatsbyjs#26143)
Browse files Browse the repository at this point in the history
Starting in version 1.6.16, the makeShortcode function
is only added to compiled MDX when it is needed. This
caused the gatsby-plugin-mdx snapshots to fall out of
date. MDX is no bumped to 1.6.16 with the snapshots
updated.

Related:

- gatsbyjs#24595 (comment)
- mdx-js/mdx#1088
  • Loading branch information
johno authored Jul 30, 2020
1 parent f1bfd53 commit d421cf8
Show file tree
Hide file tree
Showing 3 changed files with 293 additions and 104 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,6 @@ import { mdx } from "@mdx-js/react";
/* @jsx mdx */
export const _frontmatter = {};
const makeShortcode = (name) =>
function MDXDefaultShortcode(props) {
console.warn(
"Component " +
name +
" was not imported, exported, or provided by MDXProvider as global scope"
);
return <div {...props} />;
};
const layoutProps = {
_frontmatter,
};
Expand Down Expand Up @@ -51,17 +40,6 @@ export const _frontmatter = {
three: 4,
array: [1, 2, 3],
};
const makeShortcode = (name) =>
function MDXDefaultShortcode(props) {
console.warn(
"Component " +
name +
" was not imported, exported, or provided by MDXProvider as global scope"
);
return <div {...props} />;
};
const layoutProps = {
_frontmatter,
};
Expand Down Expand Up @@ -95,17 +73,6 @@ export const _frontmatter = {
three: 4,
array: [1, 2, 3],
};
const makeShortcode = (name) =>
function MDXDefaultShortcode(props) {
console.warn(
"Component " +
name +
" was not imported, exported, or provided by MDXProvider as global scope"
);
return <div {...props} />;
};
const layoutProps = {
_frontmatter,
};
Expand Down Expand Up @@ -144,17 +111,6 @@ export const _frontmatter = {
three: 4,
array: [1, 2, 3],
};
const makeShortcode = (name) =>
function MDXDefaultShortcode(props) {
console.warn(
"Component " +
name +
" was not imported, exported, or provided by MDXProvider as global scope"
);
return <div {...props} />;
};
const layoutProps = {
meta,
_frontmatter,
Expand Down Expand Up @@ -194,17 +150,6 @@ export const _frontmatter = {
three: 4,
array: [1, 2, 3],
};
const makeShortcode = (name) =>
function MDXDefaultShortcode(props) {
console.warn(
"Component " +
name +
" was not imported, exported, or provided by MDXProvider as global scope"
);
return <div {...props} />;
};
const layoutProps = {
meta,
_frontmatter,
Expand Down Expand Up @@ -235,17 +180,6 @@ import { mdx } from "@mdx-js/react";
/* @jsx mdx */
export const _frontmatter = {};
const makeShortcode = (name) =>
function MDXDefaultShortcode(props) {
console.warn(
"Component " +
name +
" was not imported, exported, or provided by MDXProvider as global scope"
);
return <div {...props} />;
};
const layoutProps = {
_frontmatter,
};
Expand Down Expand Up @@ -280,17 +214,6 @@ export const meta = {
author: "chris",
};
export const _frontmatter = {};
const makeShortcode = (name) =>
function MDXDefaultShortcode(props) {
console.warn(
"Component " +
name +
" was not imported, exported, or provided by MDXProvider as global scope"
);
return <div {...props} />;
};
const layoutProps = {
meta,
_frontmatter,
Expand Down Expand Up @@ -326,17 +249,6 @@ export const meta = {
author: "chris",
};
export const _frontmatter = {};
const makeShortcode = (name) =>
function MDXDefaultShortcode(props) {
console.warn(
"Component " +
name +
" was not imported, exported, or provided by MDXProvider as global scope"
);
return <div {...props} />;
};
const layoutProps = {
meta,
_frontmatter,
Expand Down
4 changes: 2 additions & 2 deletions packages/gatsby-plugin-mdx/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@
"unist-util-visit": "^1.4.1"
},
"devDependencies": {
"@mdx-js/mdx": "^1.6.6",
"@mdx-js/react": "^1.6.6",
"@mdx-js/mdx": "^1.6.16",
"@mdx-js/react": "^1.6.16",
"jest": "^24.9.0",
"js-combinatorics": "^0.5.5",
"react-test-renderer": "^16.13.1"
Expand Down
Loading

0 comments on commit d421cf8

Please sign in to comment.