From 3b09fc0568aab4aabaf6fa1d8040a8fb401a4109 Mon Sep 17 00:00:00 2001 From: Andy Edwards Date: Tue, 19 Jun 2018 15:59:23 -0500 Subject: [PATCH] fix: use lodash instead of lodash.isobject, lodash.isstring fix #430 --- package.json | 6 ++---- src/client.ts | 3 +-- src/server.ts | 3 +-- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 570acf0d4..2eb111bc6 100644 --- a/package.json +++ b/package.json @@ -12,9 +12,6 @@ "backo2": "^1.0.2", "eventemitter3": "^3.1.0", "iterall": "^1.2.1", - "lodash.assign": "^4.2.0", - "lodash.isobject": "^3.0.2", - "lodash.isstring": "^4.0.1", "symbol-observable": "^1.0.4", "ws": "^5.2.0" }, @@ -44,11 +41,12 @@ "@types/node": "^8.0.8", "@types/sinon": "^2.3.0", "@types/ws": "^5.1.2", + "babel-plugin-lodash": "^3.3.4", "chai": "^4.0.2", "graphql": "^0.13.2", "graphql-subscriptions": "^0.5.7", "istanbul": "^1.0.0-alpha.2", - "lodash": "^4.17.1", + "lodash": "^4.17.10", "mocha": "^3.4.2", "mock-socket-with-protocol": "^7.1.0", "remap-istanbul": "^0.9.5", diff --git a/src/client.ts b/src/client.ts index 40043c8f1..3cecf744b 100644 --- a/src/client.ts +++ b/src/client.ts @@ -4,8 +4,7 @@ const NativeWebSocket = _global.WebSocket || _global.MozWebSocket; import * as Backoff from 'backo2'; import { default as EventEmitterType, EventEmitter, ListenerFn } from 'eventemitter3'; -import isString = require('lodash.isstring'); -import isObject = require('lodash.isobject'); +import {isString, isObject} from 'lodash'; import { ExecutionResult } from 'graphql/execution/execute'; import { print } from 'graphql/language/printer'; import { DocumentNode } from 'graphql/language/ast'; diff --git a/src/server.ts b/src/server.ts index c71f62d0b..1acdbc598 100644 --- a/src/server.ts +++ b/src/server.ts @@ -2,7 +2,7 @@ import * as WebSocket from 'ws'; import MessageTypes from './message-types'; import { GRAPHQL_WS, GRAPHQL_SUBSCRIPTIONS } from './protocol'; -import isObject = require('lodash.isobject'); +import {isObject} from 'lodash'; import { parse, ExecutionResult, @@ -475,4 +475,3 @@ export class SubscriptionServer { ); } } -