diff --git a/packages/babel-plugin-remove-graphql-queries/src/__tests__/__snapshots__/index.js.snap b/packages/babel-plugin-remove-graphql-queries/src/__tests__/__snapshots__/index.js.snap index 4d8912bf9ad22..b9eda9a6ab77d 100644 --- a/packages/babel-plugin-remove-graphql-queries/src/__tests__/__snapshots__/index.js.snap +++ b/packages/babel-plugin-remove-graphql-queries/src/__tests__/__snapshots__/index.js.snap @@ -14,8 +14,6 @@ export default (() => { exports[`babel-plugin-remove-graphql-queries Allow alternative import of useStaticQuery 2`] = ` "\\"use strict\\"; -var _interopRequireWildcard = require(\\"@babel/runtime/helpers/interopRequireWildcard\\"); - var _interopRequireDefault = require(\\"@babel/runtime/helpers/interopRequireDefault\\"); exports.__esModule = true; @@ -27,6 +25,10 @@ var React = _interopRequireWildcard(require(\\"react\\")); var Gatsby = _interopRequireWildcard(require(\\"gatsby\\")); +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \\"function\\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } + +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== \\"object\\" && typeof obj !== \\"function\\") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \\"default\\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } + var _default = () => { const query = \\"426988268\\"; const siteTitle = _.default.data; @@ -54,8 +56,6 @@ const fragment = \\"4176178832\\";" exports[`babel-plugin-remove-graphql-queries Doesn't add data import for non static queries 2`] = ` "\\"use strict\\"; -var _interopRequireWildcard = require(\\"@babel/runtime/helpers/interopRequireWildcard\\"); - var _interopRequireDefault = require(\\"@babel/runtime/helpers/interopRequireDefault\\"); exports.__esModule = true; @@ -67,6 +67,10 @@ var React = _interopRequireWildcard(require(\\"react\\")); var _gatsby = require(\\"gatsby\\"); +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \\"function\\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } + +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== \\"object\\" && typeof obj !== \\"function\\") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \\"default\\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } + const Test = () => /*#__PURE__*/React.createElement(_gatsby.StaticQuery, { query: \\"426988268\\", render: data => /*#__PURE__*/React.createElement(\\"div\\", null, data.site.siteMetadata.title), @@ -91,8 +95,6 @@ export default (() => /*#__PURE__*/React.createElement(StaticQuery, { exports[`babel-plugin-remove-graphql-queries Handles closing StaticQuery tag 2`] = ` "\\"use strict\\"; -var _interopRequireWildcard = require(\\"@babel/runtime/helpers/interopRequireWildcard\\"); - var _interopRequireDefault = require(\\"@babel/runtime/helpers/interopRequireDefault\\"); exports.__esModule = true; @@ -104,6 +106,10 @@ var React = _interopRequireWildcard(require(\\"react\\")); var _gatsby = require(\\"gatsby\\"); +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \\"function\\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } + +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== \\"object\\" && typeof obj !== \\"function\\") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \\"default\\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } + var _default = () => /*#__PURE__*/React.createElement(_gatsby.StaticQuery, { query: \\"426988268\\", data: _.default @@ -126,8 +132,6 @@ export const query = graphql\` exports[`babel-plugin-remove-graphql-queries Leaves other graphql tags alone 2`] = ` "\\"use strict\\"; -var _interopRequireWildcard = require(\\"@babel/runtime/helpers/interopRequireWildcard\\"); - exports.__esModule = true; exports.query = exports.default = void 0; @@ -135,6 +139,10 @@ var React = _interopRequireWildcard(require(\\"react\\")); var _relay = require(\\"relay\\"); +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \\"function\\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } + +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== \\"object\\" && typeof obj !== \\"function\\") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \\"default\\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } + var _default = () => /*#__PURE__*/React.createElement(\\"div\\", null, data.site.siteMetadata.title); exports.default = _default; @@ -158,13 +166,15 @@ export default (() => { exports[`babel-plugin-remove-graphql-queries Only runs transforms if useStaticQuery is imported from gatsby 2`] = ` "\\"use strict\\"; -var _interopRequireWildcard = require(\\"@babel/runtime/helpers/interopRequireWildcard\\"); - exports.__esModule = true; exports.default = void 0; var React = _interopRequireWildcard(require(\\"react\\")); +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \\"function\\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } + +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== \\"object\\" && typeof obj !== \\"function\\") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \\"default\\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } + var _default = () => { const query = \\"426988268\\"; const siteTitle = useStaticQuery(query); @@ -246,8 +256,6 @@ export const query = \\"426988268\\";" exports[`babel-plugin-remove-graphql-queries Transforms exported queries in useStaticQuery 2`] = ` "\\"use strict\\"; -var _interopRequireWildcard = require(\\"@babel/runtime/helpers/interopRequireWildcard\\"); - var _interopRequireDefault = require(\\"@babel/runtime/helpers/interopRequireDefault\\"); exports.__esModule = true; @@ -257,6 +265,10 @@ var _ = _interopRequireDefault(require(\\"../../public/static/d/426988268.json\\ var React = _interopRequireWildcard(require(\\"react\\")); +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \\"function\\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } + +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== \\"object\\" && typeof obj !== \\"function\\") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \\"default\\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } + var _default = () => { const data = _.default.data; return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(\\"h1\\", null, data.site.siteMetadata.title), /*#__PURE__*/React.createElement(\\"p\\", null, data.site.siteMetadata.description)); @@ -320,8 +332,6 @@ export default (() => { exports[`babel-plugin-remove-graphql-queries Transforms queries and preserves destructuring in useStaticQuery 2`] = ` "\\"use strict\\"; -var _interopRequireWildcard = require(\\"@babel/runtime/helpers/interopRequireWildcard\\"); - var _interopRequireDefault = require(\\"@babel/runtime/helpers/interopRequireDefault\\"); exports.__esModule = true; @@ -331,6 +341,10 @@ var _ = _interopRequireDefault(require(\\"../../public/static/d/426988268.json\\ var React = _interopRequireWildcard(require(\\"react\\")); +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \\"function\\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } + +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== \\"object\\" && typeof obj !== \\"function\\") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \\"default\\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } + var _default = () => { const query = \\"426988268\\"; const { @@ -357,8 +371,6 @@ export default (() => { exports[`babel-plugin-remove-graphql-queries Transforms queries and preserves variable type in useStaticQuery 2`] = ` "\\"use strict\\"; -var _interopRequireWildcard = require(\\"@babel/runtime/helpers/interopRequireWildcard\\"); - var _interopRequireDefault = require(\\"@babel/runtime/helpers/interopRequireDefault\\"); exports.__esModule = true; @@ -368,6 +380,10 @@ var _ = _interopRequireDefault(require(\\"../../public/static/d/426988268.json\\ var React = _interopRequireWildcard(require(\\"react\\")); +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \\"function\\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } + +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== \\"object\\" && typeof obj !== \\"function\\") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \\"default\\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } + var _default = () => { const query = \\"426988268\\"; let { @@ -394,8 +410,6 @@ export default (() => /*#__PURE__*/React.createElement(StaticQuery, { exports[`babel-plugin-remove-graphql-queries Transforms queries defined in own variable in 2`] = ` "\\"use strict\\"; -var _interopRequireWildcard = require(\\"@babel/runtime/helpers/interopRequireWildcard\\"); - var _interopRequireDefault = require(\\"@babel/runtime/helpers/interopRequireDefault\\"); exports.__esModule = true; @@ -407,6 +421,10 @@ var React = _interopRequireWildcard(require(\\"react\\")); var _gatsby = require(\\"gatsby\\"); +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \\"function\\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } + +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== \\"object\\" && typeof obj !== \\"function\\") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \\"default\\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } + const query = \\"426988268\\"; var _default = () => /*#__PURE__*/React.createElement(_gatsby.StaticQuery, { @@ -431,8 +449,6 @@ export default (() => { exports[`babel-plugin-remove-graphql-queries Transforms queries defined in own variable in useStaticQuery 2`] = ` "\\"use strict\\"; -var _interopRequireWildcard = require(\\"@babel/runtime/helpers/interopRequireWildcard\\"); - var _interopRequireDefault = require(\\"@babel/runtime/helpers/interopRequireDefault\\"); exports.__esModule = true; @@ -442,6 +458,10 @@ var _ = _interopRequireDefault(require(\\"../../public/static/d/426988268.json\\ var React = _interopRequireWildcard(require(\\"react\\")); +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \\"function\\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } + +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== \\"object\\" && typeof obj !== \\"function\\") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \\"default\\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } + var _default = () => { const query = \\"426988268\\"; const siteTitle = _.default.data; @@ -465,8 +485,6 @@ export default (() => /*#__PURE__*/React.createElement(StaticQuery, { exports[`babel-plugin-remove-graphql-queries Transforms queries in 2`] = ` "\\"use strict\\"; -var _interopRequireWildcard = require(\\"@babel/runtime/helpers/interopRequireWildcard\\"); - var _interopRequireDefault = require(\\"@babel/runtime/helpers/interopRequireDefault\\"); exports.__esModule = true; @@ -478,6 +496,10 @@ var React = _interopRequireWildcard(require(\\"react\\")); var _gatsby = require(\\"gatsby\\"); +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \\"function\\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } + +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== \\"object\\" && typeof obj !== \\"function\\") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \\"default\\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } + var _default = () => /*#__PURE__*/React.createElement(_gatsby.StaticQuery, { query: \\"426988268\\", render: data => /*#__PURE__*/React.createElement(\\"div\\", null, data.site.siteMetadata.title), @@ -507,8 +529,6 @@ export default (() => { exports[`babel-plugin-remove-graphql-queries Transforms queries in useStaticQuery 2`] = ` "\\"use strict\\"; -var _interopRequireWildcard = require(\\"@babel/runtime/helpers/interopRequireWildcard\\"); - var _interopRequireDefault = require(\\"@babel/runtime/helpers/interopRequireDefault\\"); exports.__esModule = true; @@ -518,6 +538,10 @@ var _ = _interopRequireDefault(require(\\"../../public/static/d/426988268.json\\ var React = _interopRequireWildcard(require(\\"react\\")); +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \\"function\\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } + +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== \\"object\\" && typeof obj !== \\"function\\") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \\"default\\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } + var _default = () => { const siteTitle = _.default.data; return /*#__PURE__*/React.createElement(\\"h1\\", null, siteTitle.site.siteMetadata.title); @@ -665,8 +689,6 @@ export default (() => /*#__PURE__*/React.createElement(StaticQuery, { exports[`babel-plugin-remove-graphql-queries transforms exported variable queries in 2`] = ` "\\"use strict\\"; -var _interopRequireWildcard = require(\\"@babel/runtime/helpers/interopRequireWildcard\\"); - var _interopRequireDefault = require(\\"@babel/runtime/helpers/interopRequireDefault\\"); exports.__esModule = true; @@ -678,6 +700,10 @@ var React = _interopRequireWildcard(require(\\"react\\")); var _gatsby = require(\\"gatsby\\"); +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \\"function\\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } + +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== \\"object\\" && typeof obj !== \\"function\\") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \\"default\\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } + const query = \\"426988268\\"; exports.query = query; diff --git a/packages/gatsby-plugin-offline/package.json b/packages/gatsby-plugin-offline/package.json index f808021c0cc69..16567a36d6134 100644 --- a/packages/gatsby-plugin-offline/package.json +++ b/packages/gatsby-plugin-offline/package.json @@ -8,7 +8,7 @@ }, "dependencies": { "@babel/runtime": "^7.12.5", - "cheerio": "^1.0.0-rc.3", + "cheerio": "^1.0.0-rc.9", "gatsby-core-utils": "^2.6.0-next.0", "glob": "^7.1.6", "idb-keyval": "^3.2.0", diff --git a/packages/gatsby-remark-copy-linked-files/package.json b/packages/gatsby-remark-copy-linked-files/package.json index aaed29cb5eb8a..03a027f629fe7 100644 --- a/packages/gatsby-remark-copy-linked-files/package.json +++ b/packages/gatsby-remark-copy-linked-files/package.json @@ -8,7 +8,7 @@ }, "dependencies": { "@babel/runtime": "^7.12.5", - "cheerio": "^1.0.0-rc.8", + "cheerio": "^1.0.0-rc.9", "fs-extra": "^8.1.0", "is-relative-url": "^3.0.0", "lodash": "^4.17.21", diff --git a/packages/gatsby-remark-graphviz/package.json b/packages/gatsby-remark-graphviz/package.json index 6efa441427668..d5c132fd3a101 100644 --- a/packages/gatsby-remark-graphviz/package.json +++ b/packages/gatsby-remark-graphviz/package.json @@ -8,7 +8,7 @@ }, "dependencies": { "@babel/runtime": "^7.12.5", - "cheerio": "^1.0.0-rc.3", + "cheerio": "^1.0.0-rc.9", "unist-util-visit": "^2.0.3", "viz.js": "^2.1.2" }, diff --git a/packages/gatsby-remark-images-contentful/package.json b/packages/gatsby-remark-images-contentful/package.json index c0a434fe3aa7c..df2c8837a3eb4 100644 --- a/packages/gatsby-remark-images-contentful/package.json +++ b/packages/gatsby-remark-images-contentful/package.json @@ -18,7 +18,7 @@ "@babel/runtime": "^7.12.5", "axios": "^0.21.1", "chalk": "^4.1.0", - "cheerio": "^1.0.0-rc.3", + "cheerio": "^1.0.0-rc.9", "is-relative-url": "^3.0.0", "lodash": "^4.17.21", "semver": "^7.3.2", diff --git a/packages/gatsby-remark-images-contentful/src/__tests__/__snapshots__/index.js.snap b/packages/gatsby-remark-images-contentful/src/__tests__/__snapshots__/index.js.snap index bc4324cb20f14..0ee01e5c9b343 100644 --- a/packages/gatsby-remark-images-contentful/src/__tests__/__snapshots__/index.js.snap +++ b/packages/gatsby-remark-images-contentful/src/__tests__/__snapshots__/index.js.snap @@ -3,8 +3,8 @@ exports[`it transforms HTML img tags 1`] = ` " - - \\"quwowooybuqbl6ntboz3\\" + + \\"quwowooybuqbl6ntboz3\\" " diff --git a/packages/gatsby-remark-images/package.json b/packages/gatsby-remark-images/package.json index 4d93492ed0a4f..403ef1d58690c 100644 --- a/packages/gatsby-remark-images/package.json +++ b/packages/gatsby-remark-images/package.json @@ -9,7 +9,7 @@ "dependencies": { "@babel/runtime": "^7.12.5", "chalk": "^4.1.0", - "cheerio": "^1.0.0-rc.3", + "cheerio": "^1.0.0-rc.9", "gatsby-core-utils": "^2.6.0-next.0", "is-relative-url": "^3.0.0", "lodash": "^4.17.21", diff --git a/packages/gatsby-remark-images/src/__tests__/__snapshots__/index.js.snap b/packages/gatsby-remark-images/src/__tests__/__snapshots__/index.js.snap index b14f4f8629d85..1a3328587d799 100644 --- a/packages/gatsby-remark-images/src/__tests__/__snapshots__/index.js.snap +++ b/packages/gatsby-remark-images/src/__tests__/__snapshots__/index.js.snap @@ -167,7 +167,7 @@ exports[`it leaves images that are already linked alone 1`] = ` exports[`it leaves linked HTML img tags alone 1`] = ` " - + \\"this " @@ -175,7 +175,7 @@ exports[`it leaves linked HTML img tags alone 1`] = ` exports[`it leaves single-line linked HTML img tags alone 1`] = ` " - + \\"this " `; @@ -183,7 +183,7 @@ exports[`it leaves single-line linked HTML img tags alone 1`] = ` exports[`it transforms HTML img tags 1`] = ` " - + \\"my " @@ -192,7 +192,7 @@ exports[`it transforms HTML img tags 1`] = ` exports[`it transforms HTML img tags with query strings 1`] = ` " - + \\"my " diff --git a/packages/gatsby-remark-prismjs/package.json b/packages/gatsby-remark-prismjs/package.json index a06b65603d80c..6ff038c2debf8 100644 --- a/packages/gatsby-remark-prismjs/package.json +++ b/packages/gatsby-remark-prismjs/package.json @@ -15,7 +15,7 @@ "@babel/cli": "^7.12.1", "@babel/core": "^7.12.3", "babel-preset-gatsby-package": "^1.6.0-next.0", - "cheerio": "^1.0.0-rc.3", + "cheerio": "^1.0.0-rc.9", "cross-env": "^7.0.3", "prismjs": "^1.21.0", "remark": "^13.0.0" diff --git a/packages/gatsby-remark-responsive-iframe/package.json b/packages/gatsby-remark-responsive-iframe/package.json index 980dd74a7baa9..a8e2157fd63dc 100644 --- a/packages/gatsby-remark-responsive-iframe/package.json +++ b/packages/gatsby-remark-responsive-iframe/package.json @@ -8,7 +8,7 @@ }, "dependencies": { "@babel/runtime": "^7.12.5", - "cheerio": "^1.0.0-rc.3", + "cheerio": "^1.0.0-rc.9", "common-tags": "^1.8.0", "lodash": "^4.17.21", "unist-util-visit": "^2.0.3" diff --git a/packages/gatsby-source-wordpress/package.json b/packages/gatsby-source-wordpress/package.json index c0d5a999fa64a..1e6811ee7bc33 100644 --- a/packages/gatsby-source-wordpress/package.json +++ b/packages/gatsby-source-wordpress/package.json @@ -19,7 +19,7 @@ "cache-manager": "^3.4.0", "cache-manager-fs-hash": "^0.0.9", "chalk": "^4.1.0", - "cheerio": "^1.0.0-rc.3", + "cheerio": "^1.0.0-rc.9", "clipboardy": "^2.1.0", "diff": "^5.0.0", "dumper.js": "^1.3.1", diff --git a/packages/gatsby/src/bootstrap/__tests__/__snapshots__/resolve-module-exports.js.snap b/packages/gatsby/src/bootstrap/__tests__/__snapshots__/resolve-module-exports.js.snap index c8dfef2a87567..02d9bcc058879 100644 --- a/packages/gatsby/src/bootstrap/__tests__/__snapshots__/resolve-module-exports.js.snap +++ b/packages/gatsby/src/bootstrap/__tests__/__snapshots__/resolve-module-exports.js.snap @@ -3,7 +3,7 @@ exports[`Resolve module exports Show meaningful error message for invalid JavaScript 1`] = ` Array [ "Syntax error in \\"/bad/file\\": -Const declarations require an initialization value (1:13) +'Const declarations' require an initialization value. (1:13) > 1 | const exports.blah = () = }}} | ^", ] diff --git a/yarn.lock b/yarn.lock index e4ad9836482e0..630fedfb63179 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7856,7 +7856,7 @@ cheerio@^0.22.0: lodash.reject "^4.4.0" lodash.some "^4.4.0" -cheerio@^1.0.0-rc.3, cheerio@^1.0.0-rc.8: +cheerio@^1.0.0-rc.9: version "1.0.0-rc.9" resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-1.0.0-rc.9.tgz#a3ae6b7ce7af80675302ff836f628e7cb786a67f" integrity sha512-QF6XVdrLONO6DXRF5iaolY+odmhj2CLj+xzNod7INPWMi/x9X4SOylH0S/vaPpX+AUU6t04s34SQNh7DbkuCng==