From 54f8195f11bbb68aa8e2f0b69b48fc62e147c308 Mon Sep 17 00:00:00 2001 From: Isaac Hinman Date: Wed, 29 Jul 2020 21:01:08 +0100 Subject: [PATCH] refactor: Remove detect-node (#777) --- examples/simple/yarn.lock | 5 ----- package.json | 1 - src/utils/is-server.ts | 4 +--- yarn.lock | 5 ----- 4 files changed, 1 insertion(+), 14 deletions(-) diff --git a/examples/simple/yarn.lock b/examples/simple/yarn.lock index 5d25d857..9c4902f4 100644 --- a/examples/simple/yarn.lock +++ b/examples/simple/yarn.lock @@ -2587,11 +2587,6 @@ des.js@^1.0.0: inherits "^2.0.1" minimalistic-assert "^1.0.0" -detect-node@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/detect-node/-/detect-node-2.0.4.tgz#014ee8f8f669c5c58023da64b8179c083a28c46c" - integrity sha512-ZIzRpLJrOj7jjP2miAtgqIfmzbxa4ZOr5jJc601zklsfEx9oTzmmj2nVpIPRpNlRTIh8lc1kyViIY7BWSGNmKw== - diffie-hellman@^5.0.0: version "5.0.3" resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz#40e8ee98f55a2149607146921c63e1ae5f3d2875" diff --git a/package.json b/package.json index e13eacbc..33d0d6f3 100644 --- a/package.json +++ b/package.json @@ -101,7 +101,6 @@ "dependencies": { "@types/express": "^4.16.1", "core-js": "^3", - "detect-node": "^2.0.4", "hoist-non-react-statics": "^3.2.0", "i18next": "^19.6.3", "i18next-browser-languagedetector": "^5.0.0", diff --git a/src/utils/is-server.ts b/src/utils/is-server.ts index 3f654f7b..61b864ed 100644 --- a/src/utils/is-server.ts +++ b/src/utils/is-server.ts @@ -1,3 +1 @@ -import isNode from 'detect-node' - -export const isServer = () => isNode && typeof window === 'undefined' +export const isServer = () => typeof window === 'undefined' diff --git a/yarn.lock b/yarn.lock index 1131859c..b967144c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3866,11 +3866,6 @@ detect-newline@^2.1.0: resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-2.1.0.tgz#f41f1c10be4b00e87b5f13da680759f2c5bfd3e2" integrity sha1-9B8cEL5LAOh7XxPaaAdZ8sW/0+I= -detect-node@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/detect-node/-/detect-node-2.0.4.tgz#014ee8f8f669c5c58023da64b8179c083a28c46c" - integrity sha512-ZIzRpLJrOj7jjP2miAtgqIfmzbxa4ZOr5jJc601zklsfEx9oTzmmj2nVpIPRpNlRTIh8lc1kyViIY7BWSGNmKw== - diff-sequences@^24.0.0: version "24.0.0" resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-24.0.0.tgz#cdf8e27ed20d8b8d3caccb4e0c0d8fe31a173013"