From 4b5158e64fd80df221bce1d736e530c7e5edec25 Mon Sep 17 00:00:00 2001 From: Ali Ijaz Sheikh Date: Wed, 12 Jul 2017 17:07:49 -0700 Subject: [PATCH] logging-winston: make winston a peerDependency (#2453) Users of this library need to depend on winston directly. There are scenarios where the user, or other libraries may depend on a semver incompatible version of winston. Not only does it end up installing an unnecessary copy of winston; it may also lead to our transport not being visible in `winston.transports` that the user has visibility to. --- packages/logging-winston/package.json | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/logging-winston/package.json b/packages/logging-winston/package.json index 4ce5501b0bf..e2a7d77d494 100644 --- a/packages/logging-winston/package.json +++ b/packages/logging-winston/package.json @@ -32,12 +32,15 @@ "@google-cloud/logging": "^1.0.0", "extend": "^3.0.0", "is": "^3.2.0", - "lodash.mapvalues": "^4.6.0", - "winston": "^2.2.0" + "lodash.mapvalues": "^4.6.0" + }, + "peerDependencies": { + "winston": "^2.x" }, "devDependencies": { "mocha": "^3.2.0", - "proxyquire": "^1.7.10" + "proxyquire": "^1.7.10", + "winston": "^2.2.0" }, "scripts": { "publish-module": "node ../../scripts/publish.js logging-winston",