From 3144e24188d8b4ade01ab918da8cdabaa5f2e2a4 Mon Sep 17 00:00:00 2001 From: Sean Matheson Date: Fri, 28 Jun 2019 22:47:40 +0100 Subject: [PATCH] Updates to stable immer-peasy --- package.json | 2 +- src/index.js | 7 ++----- yarn.lock | 8 ++++---- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 65dce96d2..a9076294d 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "react": "^16.8.0" }, "dependencies": { - "immer-peasy": "^4.0.0-beta.0", + "immer-peasy": "3.1.3", "memoizerific": "^1.11.3", "redux": "^4.0.1", "redux-thunk": "^2.3.0", diff --git a/src/index.js b/src/index.js index 04dacce7a..d4e37dacf 100644 --- a/src/index.js +++ b/src/index.js @@ -29,11 +29,8 @@ import { } from './helpers'; /** - * immer is an implementation detail, so we are not going to use its auto freeze - * behaviour, which throws errors if trying to mutate state. It's also risky - * for production builds as has a perf overhead. - * - * @see https://github.com/mweststrate/immer#auto-freezing + * The auto freeze feature of immer doesn't seem to work in our testing. We have + * explicitly disabled it to avoid perf issues. */ setAutoFreeze(false); diff --git a/yarn.lock b/yarn.lock index ea4600044..513c30337 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3455,10 +3455,10 @@ iltorb@^2.0.5: prebuild-install "^5.2.1" which-pm-runs "^1.0.0" -immer-peasy@^4.0.0-beta.0: - version "4.0.0-beta.0" - resolved "https://registry.yarnpkg.com/immer-peasy/-/immer-peasy-4.0.0-beta.0.tgz#d1ba5297bcf4cb6b42089653f61c80252ba51c4a" - integrity sha512-DazOrbz+fToZ3DC1kf3PI7YVa47fElgA4nc7G5JHYkGwfWEzk0b0Hiix+oQjMoRnLOuKZm6P3C+9uPtzIeMjJw== +immer-peasy@3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/immer-peasy/-/immer-peasy-3.1.3.tgz#d0ea8d388f47ec6b15ab2ca19ffb9f0bf4310110" + integrity sha512-WzoZ96A93jOmcDOLNChMWAqy+ZU8vEYQx2DcKjgo7P5SToiJs+GL+5yQbWzH8X02Lhvv6xrGgVNa1xbki66Eow== import-fresh@^2.0.0: version "2.0.0"