From f3c715c12412224be815e0d1bc3e2285f275df26 Mon Sep 17 00:00:00 2001 From: streamich Date: Mon, 8 Jun 2020 11:10:03 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20bump=20fast-deep-equal,?= =?UTF-8?q?=20and=20consume=20it=20through=20ES=20import?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- src/util.ts | 4 +++- yarn.lock | 5 +++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 5993c3fa4c..d74756dc91 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "@types/js-cookie": "2.2.6", "@xobotyi/scrollbar-width": "1.9.5", "copy-to-clipboard": "^3.2.0", - "fast-deep-equal": "^3.1.1", + "fast-deep-equal": "^3.1.3", "fast-shallow-equal": "^1.0.0", "js-cookie": "^2.2.1", "nano-css": "^5.2.1", diff --git a/src/util.ts b/src/util.ts index 99f72b2106..842be3a83e 100644 --- a/src/util.ts +++ b/src/util.ts @@ -1,3 +1,5 @@ +import isDeepEqualReact from 'fast-deep-equal/react'; + export const isClient = typeof window === 'object'; export const on = (obj: any, ...args: any[]) => obj.addEventListener(...args); @@ -8,4 +10,4 @@ export type FnReturningPromise = (...args: any[]) => Promise; export type PromiseType

> = P extends Promise ? T : never; -export const isDeepEqual: (a: any, b: any) => boolean = require('fast-deep-equal/react'); +export const isDeepEqual: (a: any, b: any) => boolean = isDeepEqualReact; diff --git a/yarn.lock b/yarn.lock index ecd9526b8a..7c7952232f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7405,6 +7405,11 @@ fast-deep-equal@^3.1.1: resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz#545145077c501491e33b15ec408c294376e94ae4" integrity sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA== +fast-deep-equal@^3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" + integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== + fast-glob@^2.0.2: version "2.2.7" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-2.2.7.tgz#6953857c3afa475fff92ee6015d52da70a4cd39d"