diff --git a/loaders/utils/__mocks__/requireIt.js b/loaders/utils/__mocks__/requireIt.js deleted file mode 100644 index 21ed26e1a..000000000 --- a/loaders/utils/__mocks__/requireIt.js +++ /dev/null @@ -1,16 +0,0 @@ -'use strict'; - -const path = require('path'); - -class RequireStatement { - constructor(filepath) { - this.filepath = filepath.replace( - new RegExp(path.resolve(__dirname, '../../..'), 'g'), - '' - ); - } -} - -module.exports = function requireIt(filepath) { - return new RequireStatement(filepath); -}; diff --git a/loaders/utils/__tests__/__snapshots__/getComponents.spec.js.snap b/loaders/utils/__tests__/__snapshots__/getComponents.spec.js.snap index 91fb8637b..26a200fd0 100644 --- a/loaders/utils/__tests__/__snapshots__/getComponents.spec.js.snap +++ b/loaders/utils/__tests__/__snapshots__/getComponents.spec.js.snap @@ -6,12 +6,12 @@ Array [ "filepath": "../Foo.js", "hasExamples": false, "metadata": Object {}, - "module": RequireStatement { - "filepath": "Foo.js", + "module": Object { + "require": "Foo.js", }, "pathLine": "../Foo.js", - "props": RequireStatement { - "filepath": "!!/loaders/props-loader.js!Foo.js", + "props": Object { + "require": "!!~/loaders/props-loader.js!Foo.js", }, "slug": "foo", }, @@ -19,12 +19,12 @@ Array [ "filepath": "../Bar.js", "hasExamples": false, "metadata": Object {}, - "module": RequireStatement { - "filepath": "Bar.js", + "module": Object { + "require": "Bar.js", }, "pathLine": "../Bar.js", - "props": RequireStatement { - "filepath": "!!/loaders/props-loader.js!Bar.js", + "props": Object { + "require": "!!~/loaders/props-loader.js!Bar.js", }, "slug": "bar", }, diff --git a/loaders/utils/__tests__/__snapshots__/getProps.spec.js.snap b/loaders/utils/__tests__/__snapshots__/getProps.spec.js.snap index 4580d82c2..78b7653e4 100644 --- a/loaders/utils/__tests__/__snapshots__/getProps.spec.js.snap +++ b/loaders/utils/__tests__/__snapshots__/getProps.spec.js.snap @@ -136,8 +136,8 @@ Object { ", "displayName": "Button", "doclets": Object {}, - "example": RequireStatement { - "filepath": "!!/loaders/examples-loader.js!../../../test/components/Placeholder/examples.md", + "example": Object { + "require": "!!~/loaders/examples-loader.js!../../../test/components/Placeholder/examples.md", }, "methods": Array [], "tags": Object { diff --git a/loaders/utils/__tests__/__snapshots__/getSections.spec.js.snap b/loaders/utils/__tests__/__snapshots__/getSections.spec.js.snap index bf6a36f7b..4aeb213b5 100644 --- a/loaders/utils/__tests__/__snapshots__/getSections.spec.js.snap +++ b/loaders/utils/__tests__/__snapshots__/getSections.spec.js.snap @@ -4,8 +4,8 @@ exports[`getSections() should return an array 1`] = ` Array [ Object { "components": Array [], - "content": RequireStatement { - "filepath": "!!/loaders/examples-loader.js!/test/components/Button/Readme.md", + "content": Object { + "require": "!!~/loaders/examples-loader.js!~/test/components/Button/Readme.md", }, "name": "Readme", "sections": Array [], @@ -17,12 +17,12 @@ Array [ "filepath": "components/Annotation/Annotation.js", "hasExamples": true, "metadata": Object {}, - "module": RequireStatement { - "filepath": "/test/components/Annotation/Annotation.js", + "module": Object { + "require": "~/test/components/Annotation/Annotation.js", }, "pathLine": "components/Annotation/Annotation.js", - "props": RequireStatement { - "filepath": "!!/loaders/props-loader.js!/test/components/Annotation/Annotation.js", + "props": Object { + "require": "!!~/loaders/props-loader.js!~/test/components/Annotation/Annotation.js", }, "slug": "annotation-1", }, @@ -30,27 +30,27 @@ Array [ "filepath": "components/Button/Button.js", "hasExamples": true, "metadata": Object {}, - "module": RequireStatement { - "filepath": "/test/components/Button/Button.js", + "module": Object { + "require": "~/test/components/Button/Button.js", }, "pathLine": "components/Button/Button.js", - "props": RequireStatement { - "filepath": "!!/loaders/props-loader.js!/test/components/Button/Button.js", + "props": Object { + "require": "!!~/loaders/props-loader.js!~/test/components/Button/Button.js", }, "slug": "button-2", }, Object { "filepath": "components/Placeholder/Placeholder.js", "hasExamples": true, - "metadata": RequireStatement { - "filepath": "!!json-loader!/test/components/Placeholder/Placeholder.json", + "metadata": Object { + "require": "!!json-loader!~/test/components/Placeholder/Placeholder.json", }, - "module": RequireStatement { - "filepath": "/test/components/Placeholder/Placeholder.js", + "module": Object { + "require": "~/test/components/Placeholder/Placeholder.js", }, "pathLine": "components/Placeholder/Placeholder.js", - "props": RequireStatement { - "filepath": "!!/loaders/props-loader.js!/test/components/Placeholder/Placeholder.js", + "props": Object { + "require": "!!~/loaders/props-loader.js!~/test/components/Placeholder/Placeholder.js", }, "slug": "placeholder-2", }, @@ -58,12 +58,12 @@ Array [ "filepath": "components/RandomButton/RandomButton.js", "hasExamples": true, "metadata": Object {}, - "module": RequireStatement { - "filepath": "/test/components/RandomButton/RandomButton.js", + "module": Object { + "require": "~/test/components/RandomButton/RandomButton.js", }, "pathLine": "components/RandomButton/RandomButton.js", - "props": RequireStatement { - "filepath": "!!/loaders/props-loader.js!/test/components/RandomButton/RandomButton.js", + "props": Object { + "require": "!!~/loaders/props-loader.js!~/test/components/RandomButton/RandomButton.js", }, "slug": "randombutton-2", }, @@ -79,27 +79,27 @@ Array [ "filepath": "components/Button/Button.js", "hasExamples": true, "metadata": Object {}, - "module": RequireStatement { - "filepath": "/test/components/Button/Button.js", + "module": Object { + "require": "~/test/components/Button/Button.js", }, "pathLine": "components/Button/Button.js", - "props": RequireStatement { - "filepath": "!!/loaders/props-loader.js!/test/components/Button/Button.js", + "props": Object { + "require": "!!~/loaders/props-loader.js!~/test/components/Button/Button.js", }, "slug": "button-3", }, Object { "filepath": "components/Placeholder/Placeholder.js", "hasExamples": true, - "metadata": RequireStatement { - "filepath": "!!json-loader!/test/components/Placeholder/Placeholder.json", + "metadata": Object { + "require": "!!json-loader!~/test/components/Placeholder/Placeholder.json", }, - "module": RequireStatement { - "filepath": "/test/components/Placeholder/Placeholder.js", + "module": Object { + "require": "~/test/components/Placeholder/Placeholder.js", }, "pathLine": "components/Placeholder/Placeholder.js", - "props": RequireStatement { - "filepath": "!!/loaders/props-loader.js!/test/components/Placeholder/Placeholder.js", + "props": Object { + "require": "!!~/loaders/props-loader.js!~/test/components/Placeholder/Placeholder.js", }, "slug": "placeholder-3", }, @@ -107,12 +107,12 @@ Array [ "filepath": "components/RandomButton/RandomButton.js", "hasExamples": true, "metadata": Object {}, - "module": RequireStatement { - "filepath": "/test/components/RandomButton/RandomButton.js", + "module": Object { + "require": "~/test/components/RandomButton/RandomButton.js", }, "pathLine": "components/RandomButton/RandomButton.js", - "props": RequireStatement { - "filepath": "!!/loaders/props-loader.js!/test/components/RandomButton/RandomButton.js", + "props": Object { + "require": "!!~/loaders/props-loader.js!~/test/components/RandomButton/RandomButton.js", }, "slug": "randombutton-3", }, @@ -132,12 +132,12 @@ Object { "filepath": "components/Annotation/Annotation.js", "hasExamples": true, "metadata": Object {}, - "module": RequireStatement { - "filepath": "/test/components/Annotation/Annotation.js", + "module": Object { + "require": "~/test/components/Annotation/Annotation.js", }, "pathLine": "components/Annotation/Annotation.js", - "props": RequireStatement { - "filepath": "!!/loaders/props-loader.js!/test/components/Annotation/Annotation.js", + "props": Object { + "require": "!!~/loaders/props-loader.js!~/test/components/Annotation/Annotation.js", }, "slug": "annotation", }, @@ -145,27 +145,27 @@ Object { "filepath": "components/Button/Button.js", "hasExamples": true, "metadata": Object {}, - "module": RequireStatement { - "filepath": "/test/components/Button/Button.js", + "module": Object { + "require": "~/test/components/Button/Button.js", }, "pathLine": "components/Button/Button.js", - "props": RequireStatement { - "filepath": "!!/loaders/props-loader.js!/test/components/Button/Button.js", + "props": Object { + "require": "!!~/loaders/props-loader.js!~/test/components/Button/Button.js", }, "slug": "button", }, Object { "filepath": "components/Placeholder/Placeholder.js", "hasExamples": true, - "metadata": RequireStatement { - "filepath": "!!json-loader!/test/components/Placeholder/Placeholder.json", + "metadata": Object { + "require": "!!json-loader!~/test/components/Placeholder/Placeholder.json", }, - "module": RequireStatement { - "filepath": "/test/components/Placeholder/Placeholder.js", + "module": Object { + "require": "~/test/components/Placeholder/Placeholder.js", }, "pathLine": "components/Placeholder/Placeholder.js", - "props": RequireStatement { - "filepath": "!!/loaders/props-loader.js!/test/components/Placeholder/Placeholder.js", + "props": Object { + "require": "!!~/loaders/props-loader.js!~/test/components/Placeholder/Placeholder.js", }, "slug": "placeholder", }, @@ -173,12 +173,12 @@ Object { "filepath": "components/RandomButton/RandomButton.js", "hasExamples": true, "metadata": Object {}, - "module": RequireStatement { - "filepath": "/test/components/RandomButton/RandomButton.js", + "module": Object { + "require": "~/test/components/RandomButton/RandomButton.js", }, "pathLine": "components/RandomButton/RandomButton.js", - "props": RequireStatement { - "filepath": "!!/loaders/props-loader.js!/test/components/RandomButton/RandomButton.js", + "props": Object { + "require": "!!~/loaders/props-loader.js!~/test/components/RandomButton/RandomButton.js", }, "slug": "randombutton", }, @@ -193,8 +193,8 @@ Object { exports[`processSection() should return an object for section with content 1`] = ` Object { "components": Array [], - "content": RequireStatement { - "filepath": "!!/loaders/examples-loader.js!/test/components/Button/Readme.md", + "content": Object { + "require": "!!~/loaders/examples-loader.js!~/test/components/Button/Readme.md", }, "name": "Readme", "sections": Array [], @@ -209,27 +209,27 @@ Object { "filepath": "components/Button/Button.js", "hasExamples": true, "metadata": Object {}, - "module": RequireStatement { - "filepath": "/test/components/Button/Button.js", + "module": Object { + "require": "~/test/components/Button/Button.js", }, "pathLine": "components/Button/Button.js", - "props": RequireStatement { - "filepath": "!!/loaders/props-loader.js!/test/components/Button/Button.js", + "props": Object { + "require": "!!~/loaders/props-loader.js!~/test/components/Button/Button.js", }, "slug": "button-1", }, Object { "filepath": "components/Placeholder/Placeholder.js", "hasExamples": true, - "metadata": RequireStatement { - "filepath": "!!json-loader!/test/components/Placeholder/Placeholder.json", + "metadata": Object { + "require": "!!json-loader!~/test/components/Placeholder/Placeholder.json", }, - "module": RequireStatement { - "filepath": "/test/components/Placeholder/Placeholder.js", + "module": Object { + "require": "~/test/components/Placeholder/Placeholder.js", }, "pathLine": "components/Placeholder/Placeholder.js", - "props": RequireStatement { - "filepath": "!!/loaders/props-loader.js!/test/components/Placeholder/Placeholder.js", + "props": Object { + "require": "!!~/loaders/props-loader.js!~/test/components/Placeholder/Placeholder.js", }, "slug": "placeholder-1", }, @@ -237,12 +237,12 @@ Object { "filepath": "components/RandomButton/RandomButton.js", "hasExamples": true, "metadata": Object {}, - "module": RequireStatement { - "filepath": "/test/components/RandomButton/RandomButton.js", + "module": Object { + "require": "~/test/components/RandomButton/RandomButton.js", }, "pathLine": "components/RandomButton/RandomButton.js", - "props": RequireStatement { - "filepath": "!!/loaders/props-loader.js!/test/components/RandomButton/RandomButton.js", + "props": Object { + "require": "!!~/loaders/props-loader.js!~/test/components/RandomButton/RandomButton.js", }, "slug": "randombutton-1", }, diff --git a/loaders/utils/__tests__/__snapshots__/processComponent.spec.js.snap b/loaders/utils/__tests__/__snapshots__/processComponent.spec.js.snap index 9a9c40417..0d610e1bf 100644 --- a/loaders/utils/__tests__/__snapshots__/processComponent.spec.js.snap +++ b/loaders/utils/__tests__/__snapshots__/processComponent.spec.js.snap @@ -5,12 +5,12 @@ Object { "filepath": "../../../pizza.js", "hasExamples": true, "metadata": Object {}, - "module": RequireStatement { - "filepath": "pizza.js", + "module": Object { + "require": "pizza.js", }, "pathLine": "../../../pizza.js", - "props": RequireStatement { - "filepath": "!!/loaders/props-loader.js!pizza.js", + "props": Object { + "require": "!!~/loaders/props-loader.js!pizza.js", }, "slug": "pizza", } diff --git a/loaders/utils/__tests__/getComponentFiles.spec.js b/loaders/utils/__tests__/getComponentFiles.spec.js index 85009b3d9..97b0ed1f8 100644 --- a/loaders/utils/__tests__/getComponentFiles.spec.js +++ b/loaders/utils/__tests__/getComponentFiles.spec.js @@ -1,11 +1,12 @@ import path from 'path'; +import deabsDeep from 'deabsdeep'; import getComponentFiles from '../getComponentFiles'; const configDir = path.resolve(__dirname, '../../../test'); const components = ['one.js', 'two.js']; const glob = 'components/**/[A-Z]*.js'; -const absolutize = files => files.map(file => path.join(configDir, file)); +const deabs = x => deabsDeep(x, { root: configDir }); it('getComponentFiles() should return an empty array if components is null', () => { const result = getComponentFiles(); @@ -14,31 +15,31 @@ it('getComponentFiles() should return an empty array if components is null', () it('getComponentFiles() should accept components as a function that returns file names', () => { const result = getComponentFiles(() => components, configDir); - expect(result).toEqual(absolutize(components)); + expect(deabs(result)).toEqual(['~/one.js', '~/two.js']); }); it('getComponentFiles() should accept components as a function that returns absolute paths', () => { + const absolutize = files => files.map(file => path.join(configDir, file)); const result = getComponentFiles(() => absolutize(components), configDir); - expect(result).toEqual(absolutize(components)); + expect(deabs(result)).toEqual(['~/one.js', '~/two.js']); }); it('getComponentFiles() should accept components as a glob', () => { const result = getComponentFiles(glob, configDir); - expect(result).toEqual( - absolutize([ - 'components/Annotation/Annotation.js', - 'components/Button/Button.js', - 'components/Placeholder/Placeholder.js', - 'components/RandomButton/RandomButton.js', - ]) - ); + expect(deabs(result)).toEqual([ + '~/components/Annotation/Annotation.js', + '~/components/Button/Button.js', + '~/components/Placeholder/Placeholder.js', + '~/components/RandomButton/RandomButton.js', + ]); }); it('getComponentFiles() should ignore specified patterns', () => { const result = getComponentFiles(glob, configDir, ['**/*Button*']); - expect(result).toEqual( - absolutize(['components/Annotation/Annotation.js', 'components/Placeholder/Placeholder.js']) - ); + expect(deabs(result)).toEqual([ + '~/components/Annotation/Annotation.js', + '~/components/Placeholder/Placeholder.js', + ]); }); it('getComponentFiles() should throw if components is not a function or a string', () => { diff --git a/loaders/utils/__tests__/getComponentFilesFromSections.spec.js b/loaders/utils/__tests__/getComponentFilesFromSections.spec.js index c83f3a40c..54da82b0d 100644 --- a/loaders/utils/__tests__/getComponentFilesFromSections.spec.js +++ b/loaders/utils/__tests__/getComponentFilesFromSections.spec.js @@ -1,4 +1,5 @@ import path from 'path'; +import deabsDeep from 'deabsdeep'; import getComponentFilesFromSections from '../getComponentFilesFromSections'; const configDir = path.resolve(__dirname, '../../../test'); @@ -22,16 +23,17 @@ const sections = [ }, ]; -const absolutize = files => files.map(file => path.join(configDir, file)); +const deabs = x => deabsDeep(x, { root: configDir }); it('getComponentFilesFromSections() should return a list of files', () => { const result = getComponentFilesFromSections(sections, configDir); - expect(result).toEqual( - absolutize(['components/Button/Button.js', 'components/Placeholder/Placeholder.js']) - ); + expect(deabs(result)).toEqual([ + '~/components/Button/Button.js', + '~/components/Placeholder/Placeholder.js', + ]); }); it('getComponentFilesFromSections() should ignore specified patterns', () => { const result = getComponentFilesFromSections(sections, configDir, ['**/*Button*']); - expect(result).toEqual(absolutize(['components/Placeholder/Placeholder.js'])); + expect(deabs(result)).toEqual(['~/components/Placeholder/Placeholder.js']); }); diff --git a/loaders/utils/__tests__/getComponents.spec.js b/loaders/utils/__tests__/getComponents.spec.js index 7c8b6807d..b81cf5bda 100644 --- a/loaders/utils/__tests__/getComponents.spec.js +++ b/loaders/utils/__tests__/getComponents.spec.js @@ -2,8 +2,6 @@ import path from 'path'; import identity from 'lodash/identity'; import getComponents from '../getComponents'; -jest.mock('../requireIt'); - it('getComponents() should return an object for components', () => { const result = getComponents(['Foo.js', 'Bar.js'], { configDir: path.resolve(__dirname, '../../../test'), diff --git a/loaders/utils/__tests__/getExamples.spec.js b/loaders/utils/__tests__/getExamples.spec.js index 33191c043..97b8e835b 100644 --- a/loaders/utils/__tests__/getExamples.spec.js +++ b/loaders/utils/__tests__/getExamples.spec.js @@ -4,8 +4,8 @@ it('getExamples() should return require with examples-loader is component ha exa const examplesFile = __filename; const result = getExamples(examplesFile); - expect(result.filepath.includes(examplesFile)).toBe(true); - expect(result.filepath.includes('componentName=')).toBe(false); + expect(result.require.includes(examplesFile)).toBe(true); + expect(result.require.includes('componentName=')).toBe(false); }); it('getExamples() should return require with examples-loader is component has examples', () => { @@ -14,10 +14,10 @@ it('getExamples() should return require with examples-loader is component has ex const defaultExample = 'foo.js'; const result = getExamples(examplesFile, fallbackName, defaultExample); - expect(result.filepath.includes(__filename)).toBe(false); - expect(result.filepath.includes(fallbackName)).toBe(true); - expect(result.filepath.includes(defaultExample)).toBe(true); - expect(result.filepath.includes('componentName=')).toBe(true); + expect(result.require.includes(__filename)).toBe(false); + expect(result.require.includes(fallbackName)).toBe(true); + expect(result.require.includes(defaultExample)).toBe(true); + expect(result.require.includes('componentName=')).toBe(true); }); it('getExamples() should return an empty array if component has no example file', () => { diff --git a/loaders/utils/__tests__/getProps.spec.js b/loaders/utils/__tests__/getProps.spec.js index 4f31b0616..30aa8639c 100644 --- a/loaders/utils/__tests__/getProps.spec.js +++ b/loaders/utils/__tests__/getProps.spec.js @@ -1,8 +1,6 @@ import path from 'path'; import getProps from '../getProps'; -jest.mock('../requireIt'); - it('should return an object for props', () => { const result = getProps({ displayName: 'Button', diff --git a/loaders/utils/__tests__/getSections.spec.js b/loaders/utils/__tests__/getSections.spec.js index d5a07ea35..346d4d55e 100644 --- a/loaders/utils/__tests__/getSections.spec.js +++ b/loaders/utils/__tests__/getSections.spec.js @@ -1,8 +1,6 @@ import path from 'path'; import getSections, { processSection } from '../getSections'; -jest.mock('../requireIt'); - const configDir = path.resolve(__dirname, '../../../test'); const sections = [ { diff --git a/loaders/utils/__tests__/processComponent.spec.js b/loaders/utils/__tests__/processComponent.spec.js index f07d92a91..59e74eb9a 100644 --- a/loaders/utils/__tests__/processComponent.spec.js +++ b/loaders/utils/__tests__/processComponent.spec.js @@ -1,8 +1,6 @@ import path from 'path'; import processComponent from '../processComponent'; -jest.mock('../requireIt'); - const config = { configDir: __dirname, getExampleFilename: componentpath => path.join(path.dirname(componentpath), 'Readme.md'), diff --git a/loaders/utils/requireIt.js b/loaders/utils/requireIt.js index fda16e747..3938db455 100644 --- a/loaders/utils/requireIt.js +++ b/loaders/utils/requireIt.js @@ -2,15 +2,6 @@ const b = require('ast-types').builders; -class RequireStatement { - constructor(filepath) { - this.filepath = filepath; - } - toAST() { - return b.callExpression(b.identifier('require'), [b.literal(this.filepath)]); - } -} - /** * Return a require() statement AST. * @@ -18,5 +9,12 @@ class RequireStatement { * @returns {object} */ module.exports = function requireIt(filepath) { - return new RequireStatement(filepath); + const obj = { require: filepath }; + Object.defineProperty(obj, 'toAST', { + enumerable: false, + value() { + return b.callExpression(b.identifier('require'), [b.literal(filepath)]); + }, + }); + return obj; }; diff --git a/package-lock.json b/package-lock.json index eb928d80e..e9555a6a4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2877,6 +2877,15 @@ "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=", "dev": true }, + "deabsdeep": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/deabsdeep/-/deabsdeep-1.0.3.tgz", + "integrity": "sha512-dLBandy3WOKTovHux+DN4ayOrJ2yLwDL0B6wk4MZ2F2EaRQX0Y0fGy0k4WFthKYRhtrGGjmy4qUhConD7YuHuQ==", + "dev": true, + "requires": { + "is-plain-obj": "1.1.0" + } + }, "debug": { "version": "2.6.8", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz", @@ -3294,13 +3303,14 @@ "integrity": "sha1-blwtClYhtdra7O+AuQ7ftc13cvA=" }, "enzyme": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/enzyme/-/enzyme-3.1.1.tgz", - "integrity": "sha512-+Lj90HE3c6Jgtpha3kYfB/mTdD1GNWqSh7q8AcA8d+/CRJojRT+3yABHqKpfRx71qeEACjuvXU3Eu5UP//p/mA==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/enzyme/-/enzyme-3.2.0.tgz", + "integrity": "sha512-l0HcjycivXjB4IXkwuRc1K5z8hzWIVZB2b/Y/H2bao9eFTpBz4ACOwAQf44SgG5Nu3d1jF41LasxDgFWZeeysA==", "dev": true, "requires": { "cheerio": "1.0.0-rc.2", "function.prototype.name": "1.0.3", + "has": "1.0.1", "is-subset": "0.1.1", "lodash": "4.17.4", "object-is": "1.0.1", @@ -3312,12 +3322,12 @@ } }, "enzyme-adapter-react-16": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/enzyme-adapter-react-16/-/enzyme-adapter-react-16-1.0.4.tgz", - "integrity": "sha512-MCjuwrCE5yhTJxaBhd6zTVdm8T01Ydjys5JaFm9ILkxP7oYb3N4i+nytKlzhI7rVouPdAuUVI8mO5UcEbEFAmw==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/enzyme-adapter-react-16/-/enzyme-adapter-react-16-1.1.0.tgz", + "integrity": "sha512-OlZJn5PJUJ91EOQQRuISZpXgPlqT9fYR2yBZQPu9UYok+wS19Rn4teXywF34LMcyw2AzE1s0ZRDtcI952/vQHg==", "dev": true, "requires": { - "enzyme-adapter-utils": "1.1.1", + "enzyme-adapter-utils": "1.2.0", "lodash": "4.17.4", "object.assign": "4.0.4", "object.values": "1.0.4", @@ -3326,9 +3336,9 @@ } }, "enzyme-adapter-utils": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/enzyme-adapter-utils/-/enzyme-adapter-utils-1.1.1.tgz", - "integrity": "sha512-XU41nEiTl7O2JJvRA7JoCMhkDYRW9mQAgiy67Yz9BqTiRP/ldwuJYX8Gkom2LlihKIb9wy96IDuayR3RQspSNg==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/enzyme-adapter-utils/-/enzyme-adapter-utils-1.2.0.tgz", + "integrity": "sha512-6CeIrmymLWoQgvH5m/ixJLaCsa6pSoWU2nlMeO0nHCZR8LQ+tKzP/jPh4qceTPlB4oFfyMRFeqr0+IryY4gAxg==", "dev": true, "requires": { "lodash": "4.17.4", @@ -3337,9 +3347,9 @@ } }, "enzyme-to-json": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/enzyme-to-json/-/enzyme-to-json-3.2.1.tgz", - "integrity": "sha512-VVRySA8dIRapdUjcvCakCk9sPTzlxVaxjIowLyXHSBoM56eLX2A9VLN7ZCsg7cHXNP63AG8Eecq7QcNKJM60Aw==", + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/enzyme-to-json/-/enzyme-to-json-3.2.2.tgz", + "integrity": "sha512-Paym79t9PFsTxvazN5+k9aZfoZO+lul/qDLspL1UlNwhbg+RUczVuuP4SO/RZ/sFRxal3dPCl+5VmqtCE1bxBw==", "dev": true, "requires": { "lodash": "4.17.4" diff --git a/package.json b/package.json index 0ddd918fa..910397640 100644 --- a/package.json +++ b/package.json @@ -102,11 +102,12 @@ "babel-preset-react": "^6.24.1", "cheerio": "^1.0.0-rc.2", "danger": "^2.0.1", + "deabsdeep": "^1.0.3", "deepfreeze": "^2.0.0", "dog-names": "^1.0.2", - "enzyme": "^3.1.1", - "enzyme-adapter-react-16": "^1.0.4", - "enzyme-to-json": "^3.2.1", + "enzyme": "^3.2.0", + "enzyme-adapter-react-16": "^1.1.0", + "enzyme-to-json": "^3.2.2", "eslint": "^4.10.0", "eslint-config-tamia": "^4.2.3", "eslint-plugin-compat": "^2.1.0", @@ -186,7 +187,8 @@ "/test/jestsetup.js" ], "snapshotSerializers": [ - "/node_modules/enzyme-to-json/serializer" + "deabsdeep/serializer", + "enzyme-to-json/serializer" ] }, "keywords": [