diff --git a/README.md b/README.md index 0f1020d..2873c96 100644 --- a/README.md +++ b/README.md @@ -95,15 +95,21 @@ exports[`snapshot difference between 2 React components state 1`] = ` ## Custom serializers -By default, `snapshot-diff` uses a built in React serializer based on `react-test-renderer`. The -[serializers](https://jestjs.io/docs/en/configuration#snapshotserializers-array-string) used can be set by calling -`setSerializers` with an array of serializers to use. The order of serializers in this array may be important to you as -serializers are tested in order until a match is found. +By default, `snapshot-diff` uses a built in React component serializer based on `react-test-renderer`. The serializers +used can be set by calling `setSerializers` with an array of serializers to use. The order of serializers in this array +may be important to you as serializers are tested in order until a match is found. -`setSerializers` can be used to add new serializers for unsupported data types, or to set a different serializer -for React components. If you want to keep the default React serializer in place, don't forget to add the default +`setSerializers` can be used to add new serializers for unsupported data types, or to set a different serializer for +React components. If you want to keep the default React component serializer in place, don't forget to add the default serializers to your list of serializers! +ℹ️ **Note:** Serializers are independent; once a serializer is matched no further serializers will be run for that +input. This would be expected when adding a different serializer for React components (e.g. enzyme's serializer instead +of the built in React component serializer) or adding a new serializer for unsupported data types. It may not be as +expected when you need serializers to work together (e.g. rendering a React component which makes use of CSS-in-JS, like +Emotion). If you need a serializer to work with the existing React component serializer, see the "_Enhancing the React +component serializer_" section below. + ### Adding a new custom serializer ```js @@ -111,15 +117,16 @@ const snapshotDiff = require('snapshot-diff'); const myCustomSerializer = require('./my-custom-serializer'); snapshotDiff.setSerializers([ - ...snapshotDiff.defaultSerializers, // use default React serializer - add this if you want to serialise React components! + // Use the default React component serializer. Don't forget to add this if you + ...snapshotDiff.defaultSerializers, // want to continue to serialize React components myCustomSerializer ]); ``` ### Serializing React components with a different serializer -You can replace the default React serializer by omitting it from the serializer list. The following uses enzymes to-json -serializer instead: +You can replace the default React component serializer by omitting it from the serializer list. The following uses +Enzyme's `to-json` serializer instead: ```js const snapshotDiff = require('snapshot-diff'); @@ -127,11 +134,43 @@ const enzymeToJson = require('enzyme-to-json/serializer'); const myCustomSerializer = require('./my-custom-serializer'); snapshotDiff.setSerializers([ - enzymeToJson, // using enzymes serializer instead + // Use Enzyme's React component serializer. Add this instead of the default React + enzymeToJson, // component serializer if you want to replace how React components are serialized myCustomSerializer ]); ``` +## Enhancing the React component serializer + +`snapshot-diff` uses a built in React component serializer based on `react-test-renderer`. Internally, this makes use of +the default Jest serializers which are passed to `pretty-format`. However, you may wish to use a different configuration +of internal serializers when serializing a React component, e.g. Adding a new internal serializer to deal with using a +CSS-in-JS solution, such as Emotion. + +The React component serializer is exposed at `snapshotDiff.reactSerializer` + +The API for adding new internal serializers to the React component serializer is similar to how top level serializers +are added to `snapshot-diff`. The React component serializer has a `setSerializers` function which can be used to +change the internal serializers used for serializing a React component. If you want to keep using the default internal +serializers, don't forget to add them too! + +ℹ️ **Note:** Internal serializers added to the React component serializer are only used by the React component +serializer. i.e. + - `snapshotDiff.setSerializers` is **not** the same as `snapshotDiff.reactSerializer.setSerializers` + - `snapshotDiff.defaultSerializers` is **not** the same as `snapshotDiff.reactSerializer.defaultSerializers` + +### Adding a new serializer + +```js +const snapshotDiff = require('snapshot-diff'); +const emotionSerializer = require('jest-emotion'); + +snapshotDiff.reactSerializer.setSerializers([ + emotionSerializer, + ...snapshotDiff.reactSerializer.defaultSerializers +]); +``` + ## Snapshot serializer By default Jest adds extra quotes around strings so it makes diff snapshots of objects too noisy. diff --git a/__tests__/__snapshots__/setSerializers.test.js.snap b/__tests__/__snapshots__/setSerializers.test.js.snap index cad4c59..6ebf8ec 100644 --- a/__tests__/__snapshots__/setSerializers.test.js.snap +++ b/__tests__/__snapshots__/setSerializers.test.js.snap @@ -1,5 +1,43 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP +exports[`components using CSS-in-JS can use contextLines 1`] = ` +"Snapshot Diff: +- <NestedComponent css=\\"unknown styles\\" test=\\"say\\" /> ++ <NestedComponent css=\\"unknown styles\\" test=\\"my name\\" /> + +@@ -2,1 +2,1 @@ +- color: green; ++ color: red; +@@ -10,1 +10,1 @@ +- say ++ my name" +`; + +exports[`components using CSS-in-JS diffs components 1`] = ` +"Snapshot Diff: +- <NestedComponent css=\\"unknown styles\\" test=\\"say\\" /> ++ <NestedComponent css=\\"unknown styles\\" test=\\"my name\\" /> + +@@ -1,15 +1,15 @@ + .emotion-0 { +- color: green; ++ color: red; + } + + <div + className=\\"emotion-0\\" + > + <span> + Hello World - +- say ++ my name + </span> + <div> + I have value + 1234 + </div>" +`; + exports[`default rendered components can use contextLines 1`] = ` "Snapshot Diff: - <NestedComponent test=\\"say\\" /> diff --git a/__tests__/setSerializers.test.js b/__tests__/setSerializers.test.js index bb1ea72..7c0a3a1 100644 --- a/__tests__/setSerializers.test.js +++ b/__tests__/setSerializers.test.js @@ -1,9 +1,11 @@ // @flow const React = require('react'); +const { jsx, css } = require('@emotion/core'); const { configure, shallow: enzymeShallow } = require('enzyme'); const ReactShallowRenderer = require('react-test-renderer/shallow'); const Adapter = require('enzyme-adapter-react-16'); const enzymeToJson = require('enzyme-to-json/serializer'); +const emotionSerializer = require('jest-emotion'); const snapshotDiff = require('../src/index'); configure({ adapter: new Adapter() }); @@ -18,7 +20,7 @@ type Props = { const Component = ({ value }) => <div>I have value {value}</div>; const NestedComponent = (props: Props) => ( - <div> + <div className={props.className}> <span>Hello World - {props.test}</span> <Component value={1234} /> </div> @@ -115,3 +117,53 @@ describe('values which are not components', () => { ).toMatchSnapshot(); }); }); + +describe('components using CSS-in-JS', () => { + beforeEach(() => { + snapshotDiff.reactSerializer.setSerializers([ + emotionSerializer, + ...snapshotDiff.reactSerializer.defaultSerializers, + ]); + }); + + test('diffs components', () => { + expect( + snapshotDiff( + jsx(NestedComponent, { + css: css` + color: green; + `, + test: 'say', + }), + jsx(NestedComponent, { + css: css` + color: red; + `, + test: 'my name', + }) + ) + ).toMatchSnapshot(); + }); + + test('can use contextLines', () => { + expect( + snapshotDiff( + jsx(NestedComponent, { + css: css` + color: green; + `, + test: 'say', + }), + jsx(NestedComponent, { + css: css` + color: red; + `, + test: 'my name', + }), + { + contextLines: 0, + } + ) + ).toMatchSnapshot(); + }); +}); diff --git a/index.d.ts b/index.d.ts index 98f68c5..a7f1472 100644 --- a/index.d.ts +++ b/index.d.ts @@ -27,6 +27,8 @@ interface Serializer { test: (value: any) => boolean; print: (value: any, _serializer?: any) => any; diffOptions?: (valueA: any, valueB: any) => DiffOptions; + setSerializers?: (serializers: Array<Serializer>) => void; + defaultSerializers?: Array<Serializer>; } declare module 'snapshot-diff' { @@ -54,6 +56,7 @@ declare module 'snapshot-diff' { */ setSerializers: (serializers: Array<Serializer>) => void; defaultSerializers: Array<Serializer>; + reactSerializer: Serializer; } const diff: SnapshotDiff; export = diff; diff --git a/package.json b/package.json index cc0b400..9ed43db 100644 --- a/package.json +++ b/package.json @@ -33,12 +33,14 @@ "@babel/preset-flow": "^7.0.0", "@babel/preset-react": "^7.7.0", "@callstack/eslint-config": "^10.0.0", + "@emotion/core": "^10.0.28", "enzyme": "^3.10.0", "enzyme-adapter-react-16": "^1.14.0", "enzyme-to-json": "^3.4.0", "eslint": "^7.0.0", "flow-bin": "^0.129.0", "jest": "^26.1.0", + "jest-emotion": "^10.0.32", "react": "^16.13.1", "react-dom": "16.13.1", "react-test-renderer": "^16.13.1" diff --git a/src/index.js b/src/index.js index dd89933..9e76329 100644 --- a/src/index.js +++ b/src/index.js @@ -112,3 +112,4 @@ module.exports.toMatchDiffSnapshot = toMatchDiffSnapshot; module.exports.getSnapshotDiffSerializer = getSnapshotDiffSerializer; module.exports.setSerializers = setSerializers; module.exports.defaultSerializers = defaultSerializers; +module.exports.reactSerializer = reactSerializer; diff --git a/src/react-serializer.js b/src/react-serializer.js index 20232df..015a48b 100644 --- a/src/react-serializer.js +++ b/src/react-serializer.js @@ -5,7 +5,8 @@ const prettyFormat = require('pretty-format'); const snapshot = require('jest-snapshot'); -const serializers = snapshot.getSerializers(); +const defaultSerializers = snapshot.getSerializers(); +let serializers = defaultSerializers; const reactElement = Symbol.for('react.element'); @@ -25,7 +26,11 @@ function getReactComponentSerializer() { throw error; } return (value) => - prettyFormat(renderer.create(value), { plugins: serializers }); + prettyFormat(renderer.create(value).toJSON(), { plugins: serializers }); +} + +function setSerializers(customSerializers) { + serializers = customSerializers; } const reactSerializer = { @@ -41,6 +46,8 @@ const reactSerializer = { bAnnotation: prettyFormat(valueB, prettyFormatOptions), }; }, + setSerializers, + defaultSerializers, }; module.exports = reactSerializer; diff --git a/yarn.lock b/yarn.lock index 7e98c30..8134a1b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -174,6 +174,13 @@ dependencies: "@babel/types" "^7.8.3" +"@babel/helper-module-imports@^7.0.0": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.10.4.tgz#4c5c54be04bd31670a7382797d75b9fa2e5b5620" + integrity sha512-nEQJHqYavI217oD9+s5MUBzk6x1IlvoS9WTPfgG43CbMEeStE0v+r+TucWdx8KFGowPGvyOkDT9+7DHedIDnVw== + dependencies: + "@babel/types" "^7.10.4" + "@babel/helper-module-imports@^7.7.0": version "7.7.0" resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.7.0.tgz#99c095889466e5f7b6d66d98dffc58baaf42654d" @@ -295,6 +302,11 @@ dependencies: "@babel/types" "^7.8.3" +"@babel/helper-validator-identifier@^7.10.4": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz#a78c7a7251e01f616512d31b10adcf52ada5e0d2" + integrity sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw== + "@babel/helper-validator-identifier@^7.9.5": version "7.9.5" resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.5.tgz#90977a8e6fbf6b431a7dc31752eee233bf052d80" @@ -868,6 +880,13 @@ "@babel/plugin-transform-react-jsx-self" "^7.0.0" "@babel/plugin-transform-react-jsx-source" "^7.0.0" +"@babel/runtime@^7.5.5", "@babel/runtime@^7.7.2": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.10.4.tgz#a6724f1a6b8d2f6ea5236dbfe58c7d7ea9c5eb99" + integrity sha512-UpTN5yUJr9b4EX2CnGNWIvER7Ab83ibv0pcvvHc4UOdrBI5jb8bj+32cCwPX6xu0mt2daFNjYhoi+X7beH0RSw== + dependencies: + regenerator-runtime "^0.13.4" + "@babel/runtime@^7.9.2": version "7.9.6" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.9.6.tgz#a9102eb5cadedf3f31d08a9ecf294af7827ea29f" @@ -908,6 +927,15 @@ lodash "^4.17.13" to-fast-properties "^2.0.0" +"@babel/types@^7.10.4": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.10.4.tgz#369517188352e18219981efd156bfdb199fff1ee" + integrity sha512-UTCFOxC3FsFHb7lkRMVvgLzaRVamXuAs2Tz4wajva4WxtVY82eZeaUBtC2Zt95FU9TiznuC0Zk35tsim8jeVpg== + dependencies: + "@babel/helper-validator-identifier" "^7.10.4" + lodash "^4.17.13" + to-fast-properties "^2.0.0" + "@bcoe/v8-coverage@^0.2.3": version "0.2.3" resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" @@ -942,6 +970,83 @@ exec-sh "^0.3.2" minimist "^1.2.0" +"@emotion/cache@^10.0.27": + version "10.0.29" + resolved "https://registry.yarnpkg.com/@emotion/cache/-/cache-10.0.29.tgz#87e7e64f412c060102d589fe7c6dc042e6f9d1e0" + integrity sha512-fU2VtSVlHiF27empSbxi1O2JFdNWZO+2NFHfwO0pxgTep6Xa3uGb+3pVKfLww2l/IBGLNEZl5Xf/++A4wAYDYQ== + dependencies: + "@emotion/sheet" "0.9.4" + "@emotion/stylis" "0.8.5" + "@emotion/utils" "0.11.3" + "@emotion/weak-memoize" "0.2.5" + +"@emotion/core@^10.0.28": + version "10.0.28" + resolved "https://registry.yarnpkg.com/@emotion/core/-/core-10.0.28.tgz#bb65af7262a234593a9e952c041d0f1c9b9bef3d" + integrity sha512-pH8UueKYO5jgg0Iq+AmCLxBsvuGtvlmiDCOuv8fGNYn3cowFpLN98L8zO56U0H1PjDIyAlXymgL3Wu7u7v6hbA== + dependencies: + "@babel/runtime" "^7.5.5" + "@emotion/cache" "^10.0.27" + "@emotion/css" "^10.0.27" + "@emotion/serialize" "^0.11.15" + "@emotion/sheet" "0.9.4" + "@emotion/utils" "0.11.3" + +"@emotion/css@^10.0.27": + version "10.0.27" + resolved "https://registry.yarnpkg.com/@emotion/css/-/css-10.0.27.tgz#3a7458198fbbebb53b01b2b87f64e5e21241e14c" + integrity sha512-6wZjsvYeBhyZQYNrGoR5yPMYbMBNEnanDrqmsqS1mzDm1cOTu12shvl2j4QHNS36UaTE0USIJawCH9C8oW34Zw== + dependencies: + "@emotion/serialize" "^0.11.15" + "@emotion/utils" "0.11.3" + babel-plugin-emotion "^10.0.27" + +"@emotion/hash@0.8.0": + version "0.8.0" + resolved "https://registry.yarnpkg.com/@emotion/hash/-/hash-0.8.0.tgz#bbbff68978fefdbe68ccb533bc8cbe1d1afb5413" + integrity sha512-kBJtf7PH6aWwZ6fka3zQ0p6SBYzx4fl1LoZXE2RrnYST9Xljm7WfKJrU4g/Xr3Beg72MLrp1AWNUmuYJTL7Cow== + +"@emotion/memoize@0.7.4": + version "0.7.4" + resolved "https://registry.yarnpkg.com/@emotion/memoize/-/memoize-0.7.4.tgz#19bf0f5af19149111c40d98bb0cf82119f5d9eeb" + integrity sha512-Ja/Vfqe3HpuzRsG1oBtWTHk2PGZ7GR+2Vz5iYGelAw8dx32K0y7PjVuxK6z1nMpZOqAFsRUPCkK1YjJ56qJlgw== + +"@emotion/serialize@^0.11.15", "@emotion/serialize@^0.11.16": + version "0.11.16" + resolved "https://registry.yarnpkg.com/@emotion/serialize/-/serialize-0.11.16.tgz#dee05f9e96ad2fb25a5206b6d759b2d1ed3379ad" + integrity sha512-G3J4o8by0VRrO+PFeSc3js2myYNOXVJ3Ya+RGVxnshRYgsvErfAOglKAiy1Eo1vhzxqtUvjCyS5gtewzkmvSSg== + dependencies: + "@emotion/hash" "0.8.0" + "@emotion/memoize" "0.7.4" + "@emotion/unitless" "0.7.5" + "@emotion/utils" "0.11.3" + csstype "^2.5.7" + +"@emotion/sheet@0.9.4": + version "0.9.4" + resolved "https://registry.yarnpkg.com/@emotion/sheet/-/sheet-0.9.4.tgz#894374bea39ec30f489bbfc3438192b9774d32e5" + integrity sha512-zM9PFmgVSqBw4zL101Q0HrBVTGmpAxFZH/pYx/cjJT5advXguvcgjHFTCaIO3enL/xr89vK2bh0Mfyj9aa0ANA== + +"@emotion/stylis@0.8.5": + version "0.8.5" + resolved "https://registry.yarnpkg.com/@emotion/stylis/-/stylis-0.8.5.tgz#deacb389bd6ee77d1e7fcaccce9e16c5c7e78e04" + integrity sha512-h6KtPihKFn3T9fuIrwvXXUOwlx3rfUvfZIcP5a6rh8Y7zjE3O06hT5Ss4S/YI1AYhuZ1kjaE/5EaOOI2NqSylQ== + +"@emotion/unitless@0.7.5": + version "0.7.5" + resolved "https://registry.yarnpkg.com/@emotion/unitless/-/unitless-0.7.5.tgz#77211291c1900a700b8a78cfafda3160d76949ed" + integrity sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg== + +"@emotion/utils@0.11.3": + version "0.11.3" + resolved "https://registry.yarnpkg.com/@emotion/utils/-/utils-0.11.3.tgz#a759863867befa7e583400d322652a3f44820924" + integrity sha512-0o4l6pZC+hI88+bzuaX/6BgOvQVhbt2PfmxauVaYOGgbsAw14wdKyvMCZXnsnsHys94iadcF+RG/wZyx6+ZZBw== + +"@emotion/weak-memoize@0.2.5": + version "0.2.5" + resolved "https://registry.yarnpkg.com/@emotion/weak-memoize/-/weak-memoize-0.2.5.tgz#8eed982e2ee6f7f4e44c253e12962980791efd46" + integrity sha512-6U71C2Wp7r5XtFtQzYrW5iKFT67OixrSxjI4MptCHzdSVlgabczzqLe0ZSgnub/5Kp4hSbpDB1tMytZY9pwxxA== + "@istanbuljs/load-nyc-config@^1.0.0": version "1.0.0" resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.0.0.tgz#10602de5570baea82f8afbfa2630b24e7a8cfe5b" @@ -1218,6 +1323,11 @@ "@types/istanbul-lib-coverage" "*" "@types/istanbul-lib-report" "*" +"@types/jest@^23.0.2": + version "23.3.14" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-23.3.14.tgz#37daaf78069e7948520474c87b80092ea912520a" + integrity sha512-Q5hTcfdudEL2yOmluA1zaSyPbzWPmJ3XfSWeP3RyoYvS9hnje1ZyagrZOuQ6+1nQC1Gw+7gap3pLNL3xL6UBug== + "@types/json-schema@^7.0.3": version "7.0.3" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.3.tgz#bdfd69d61e464dcc81b25159c270d75a73c1a636" @@ -1233,6 +1343,11 @@ resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz#e486d0d97396d79beedd0a6e33f4534ff6b4973e" integrity sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA== +"@types/parse-json@^4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.0.tgz#2f8bb441434d163b35fb8ffdccd7138927ffb8c0" + integrity sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA== + "@types/prettier@^2.0.0": version "2.0.0" resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.0.0.tgz#dc85454b953178cc6043df5208b9e949b54a3bc4" @@ -1543,7 +1658,7 @@ asynckit@^0.4.0: resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= -atob@^2.1.1: +atob@^2.1.1, atob@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== @@ -1591,6 +1706,22 @@ babel-plugin-dynamic-import-node@^2.3.0: dependencies: object.assign "^4.1.0" +babel-plugin-emotion@^10.0.27: + version "10.0.33" + resolved "https://registry.yarnpkg.com/babel-plugin-emotion/-/babel-plugin-emotion-10.0.33.tgz#ce1155dcd1783bbb9286051efee53f4e2be63e03" + integrity sha512-bxZbTTGz0AJQDHm8k6Rf3RQJ8tX2scsfsRyKVgAbiUPUNIRtlK+7JxP+TAd1kRLABFxe0CFm2VdK4ePkoA9FxQ== + dependencies: + "@babel/helper-module-imports" "^7.0.0" + "@emotion/hash" "0.8.0" + "@emotion/memoize" "0.7.4" + "@emotion/serialize" "^0.11.16" + babel-plugin-macros "^2.0.0" + babel-plugin-syntax-jsx "^6.18.0" + convert-source-map "^1.5.0" + escape-string-regexp "^1.0.5" + find-root "^1.1.0" + source-map "^0.5.7" + babel-plugin-istanbul@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-6.0.0.tgz#e159ccdc9af95e0b570c75b4573b7c34d671d765" @@ -1612,6 +1743,20 @@ babel-plugin-jest-hoist@^26.1.0: "@types/babel__core" "^7.0.0" "@types/babel__traverse" "^7.0.6" +babel-plugin-macros@^2.0.0: + version "2.8.0" + resolved "https://registry.yarnpkg.com/babel-plugin-macros/-/babel-plugin-macros-2.8.0.tgz#0f958a7cc6556b1e65344465d99111a1e5e10138" + integrity sha512-SEP5kJpfGYqYKpBrj5XU3ahw5p5GOHJ0U5ssOSQ/WBVdwkD2Dzlce95exQTs3jOVWPPKLBN2rlEWkCK7dSmLvg== + dependencies: + "@babel/runtime" "^7.7.2" + cosmiconfig "^6.0.0" + resolve "^1.12.0" + +babel-plugin-syntax-jsx@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz#0af32a9a6e13ca7a3fd5069e62d7b0f58d0d8946" + integrity sha1-CvMqmm4Tyno/1QaeYtew9Y0NiUY= + babel-preset-current-node-syntax@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-0.1.2.tgz#fb4a4c51fe38ca60fede1dc74ab35eb843cb41d6" @@ -1774,7 +1919,7 @@ caseless@~0.12.0: resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= -chalk@^2.0.0, chalk@^2.4.2: +chalk@^2.0.0, chalk@^2.4.1, chalk@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== @@ -1956,7 +2101,7 @@ contains-path@^0.1.0: resolved "https://registry.yarnpkg.com/contains-path/-/contains-path-0.1.0.tgz#fe8cf184ff6670b6baef01a9d4861a5cbec4120a" integrity sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo= -convert-source-map@^1.1.0, convert-source-map@^1.4.0, convert-source-map@^1.6.0, convert-source-map@^1.7.0: +convert-source-map@^1.1.0, convert-source-map@^1.4.0, convert-source-map@^1.5.0, convert-source-map@^1.6.0, convert-source-map@^1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.7.0.tgz#17a2cb882d7f77d3490585e2ce6c524424a3a442" integrity sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA== @@ -1981,6 +2126,17 @@ core-util-is@1.0.2, core-util-is@~1.0.0: resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= +cosmiconfig@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-6.0.0.tgz#da4fee853c52f6b1e6935f41c1a2fc50bd4a9982" + integrity sha512-xb3ZL6+L8b9JLLCx3ZdoZy4+2ECphCMo2PwqgP1tlfVq6M6YReyzBJtvWWtbDSpNr9hn96pkCiZqUcFEc+54Qg== + dependencies: + "@types/parse-json" "^4.0.0" + import-fresh "^3.1.0" + parse-json "^5.0.0" + path-type "^4.0.0" + yaml "^1.7.2" + cross-spawn@^6.0.0: version "6.0.5" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" @@ -2016,6 +2172,16 @@ css-what@2.1: resolved "https://registry.yarnpkg.com/css-what/-/css-what-2.1.3.tgz#a6d7604573365fe74686c3f311c56513d88285f2" integrity sha512-a+EPoD+uZiNfh+5fxw2nO9QwFa6nJe2Or35fGY6Ipw1R3R4AGz1d1TEZrCegvw2YTmZ0jXirGYlzxxpYSHwpEg== +css@^2.2.1: + version "2.2.4" + resolved "https://registry.yarnpkg.com/css/-/css-2.2.4.tgz#c646755c73971f2bba6a601e2cf2fd71b1298929" + integrity sha512-oUnjmWpy0niI3x/mPL8dVEI1l7MnG3+HHyRPHf+YFSbK+svOhXpmSOcDURUh2aOCgl2grzrOPt1nHLuCVFULLw== + dependencies: + inherits "^2.0.3" + source-map "^0.6.1" + source-map-resolve "^0.5.2" + urix "^0.1.0" + cssom@^0.4.4: version "0.4.4" resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.4.4.tgz#5a66cf93d2d0b661d80bf6a44fb65f5c2e4e0a10" @@ -2033,6 +2199,11 @@ cssstyle@^2.2.0: dependencies: cssom "~0.3.6" +csstype@^2.5.7: + version "2.6.10" + resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.6.10.tgz#e63af50e66d7c266edb6b32909cfd0aabe03928b" + integrity sha512-D34BqZU4cIlMCY93rZHbrq9pjTAQJ3U8S8rfBqjwHxkGPThWFjzZDQpgMJY0QViLxth6ZKYiwFBo14RdN44U/w== + dashdash@^1.12.0: version "1.14.1" resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" @@ -2840,6 +3011,11 @@ fill-range@^7.0.1: dependencies: to-regex-range "^5.0.1" +find-root@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/find-root/-/find-root-1.1.0.tgz#abcfc8ba76f708c42a97b3d685b7e9450bfb9ce4" + integrity sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng== + find-up@^2.0.0, find-up@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" @@ -3215,6 +3391,14 @@ import-fresh@^3.0.0: parent-module "^1.0.0" resolve-from "^4.0.0" +import-fresh@^3.1.0: + version "3.2.1" + resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.2.1.tgz#633ff618506e793af5ac91bf48b72677e15cbe66" + integrity sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ== + dependencies: + parent-module "^1.0.0" + resolve-from "^4.0.0" + import-local@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.0.2.tgz#a8cfd0431d1de4a2199703d003e3e62364fa6db6" @@ -3668,6 +3852,16 @@ jest-each@^26.1.0: jest-util "^26.1.0" pretty-format "^26.1.0" +jest-emotion@^10.0.32: + version "10.0.32" + resolved "https://registry.yarnpkg.com/jest-emotion/-/jest-emotion-10.0.32.tgz#8e36a871911f78841701224a95b7c535c65b70b6" + integrity sha512-hW3IwWc47qRuxnGsWFGY6uIMX8F4YBzq+Qci3LAYUCUqUBNP+1DU1L5Nudo9Ry0NHVFOqDnDeip1p2UR0kVMwA== + dependencies: + "@babel/runtime" "^7.5.5" + "@types/jest" "^23.0.2" + chalk "^2.4.1" + css "^2.2.1" + jest-environment-jsdom@^26.1.0: version "26.1.0" resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-26.1.0.tgz#9dc7313ffe1b59761dad1fedb76e2503e5d37c5b" @@ -4802,6 +4996,11 @@ path-type@^2.0.0: dependencies: pify "^2.0.0" +path-type@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" + integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== + performance-now@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" @@ -5499,6 +5698,17 @@ source-map-resolve@^0.5.0: source-map-url "^0.4.0" urix "^0.1.0" +source-map-resolve@^0.5.2: + version "0.5.3" + resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.3.tgz#190866bece7553e1f8f267a2ee82c606b5509a1a" + integrity sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw== + dependencies: + atob "^2.1.2" + decode-uri-component "^0.2.0" + resolve-url "^0.2.1" + source-map-url "^0.4.0" + urix "^0.1.0" + source-map-support@^0.5.6: version "0.5.16" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.16.tgz#0ae069e7fe3ba7538c64c98515e35339eac5a042" @@ -5512,7 +5722,7 @@ source-map-url@^0.4.0: resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3" integrity sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM= -source-map@^0.5.0, source-map@^0.5.6: +source-map@^0.5.0, source-map@^0.5.6, source-map@^0.5.7: version "0.5.7" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= @@ -6261,6 +6471,11 @@ yallist@^3.0.0, yallist@^3.0.3: resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== +yaml@^1.7.2: + version "1.10.0" + resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.0.tgz#3b593add944876077d4d683fee01081bd9fff31e" + integrity sha512-yr2icI4glYaNG+KWONODapy2/jDdMSDnrONSjblABjD9B4Z5LgiircSt8m8sRZFNi08kG9Sm0uSHtEmP3zaEGg== + yargs-parser@^18.1.1: version "18.1.3" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-18.1.3.tgz#be68c4975c6b2abf469236b0c870362fab09a7b0"