From 2d02665cc57aa4fee5ab224bc3070532613fede6 Mon Sep 17 00:00:00 2001 From: Derek Ju Date: Mon, 6 Nov 2017 23:59:07 -0800 Subject: [PATCH 1/2] Pin the version, set noKey to true --- package.json | 2 +- src/snapshotter.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 14500c5..33d82d4 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "url": "https://github.com/cdlewis/snapshotter.git" }, "dependencies": { - "enzyme-to-json": "^3.1.3", + "enzyme-to-json": "3.1.3", "jest-diff": "^18.1.0", "jest-file-exists": "^17.0.0", "lodash": "^4.0.0", diff --git a/src/snapshotter.js b/src/snapshotter.js index 41de965..9f0fc6d 100644 --- a/src/snapshotter.js +++ b/src/snapshotter.js @@ -34,7 +34,7 @@ const maybeUpdateSnapshot = (snapshotPath, relativeSnapshotPath, component) => { } module.exports = (assert, component, id, outputBuffer = process.stdout) => { - const serialisedComponent = JSON.parse(stringify(shallowToJson(component))) + const serialisedComponent = JSON.parse(stringify(shallowToJson(component, { noKey: true }))) const { snapshotPath, relativeSnapshotPath } = getSnapshotPath(id) try { From dd0b1bb7b7779f9dd5783c3641a6355adfc4c8ad Mon Sep 17 00:00:00 2001 From: Derek Ju Date: Tue, 7 Nov 2017 00:02:37 -0800 Subject: [PATCH 2/2] 2.0.1 --- dist/snapshotter.js | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/snapshotter.js b/dist/snapshotter.js index d2789ce..f016bbe 100644 --- a/dist/snapshotter.js +++ b/dist/snapshotter.js @@ -52,7 +52,7 @@ var maybeUpdateSnapshot = function maybeUpdateSnapshot(snapshotPath, relativeSna module.exports = function (assert, component, id) { var outputBuffer = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : _process2.default.stdout; - var serialisedComponent = JSON.parse(stringify((0, _enzymeToJson.shallowToJson)(component))); + var serialisedComponent = JSON.parse(stringify((0, _enzymeToJson.shallowToJson)(component, { noKey: true }))); var _getSnapshotPath = (0, _getSnapshotPath3.default)(id), snapshotPath = _getSnapshotPath.snapshotPath, diff --git a/package.json b/package.json index 33d82d4..72f22a9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "snapshotter", - "version": "2.0.0", + "version": "2.0.1", "description": "Snapshot testing for Tape", "main": "dist/snapshotter.js", "scripts": {