From cd9e295ec8b98c552c0d5fb307cb15878958ed03 Mon Sep 17 00:00:00 2001 From: Sam Lord Date: Thu, 2 Dec 2021 12:35:36 +0000 Subject: [PATCH] @tryghost/bootstrap-socket: Switch to @tryghost/logging from injected arg refs: https://github.com/TryGhost/Toolbox/issues/146 --- ghost/bootstrap-socket/lib/bootstrap-socket.js | 4 +++- ghost/bootstrap-socket/package.json | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ghost/bootstrap-socket/lib/bootstrap-socket.js b/ghost/bootstrap-socket/lib/bootstrap-socket.js index db66145395..7b00df3d9c 100644 --- a/ghost/bootstrap-socket/lib/bootstrap-socket.js +++ b/ghost/bootstrap-socket/lib/bootstrap-socket.js @@ -1,4 +1,6 @@ -module.exports.connectAndSend = (socketAddress, logging, message) => { +const logging = require('@tryghost/logging'); + +module.exports.connectAndSend = (socketAddress, message) => { // Very basic guard against bad calls if (!socketAddress || !socketAddress.host || !socketAddress.port || !logging || !logging.info || !logging.warn || !message) { return Promise.resolve(); diff --git a/ghost/bootstrap-socket/package.json b/ghost/bootstrap-socket/package.json index 30578c5f04..5b5a70744c 100644 --- a/ghost/bootstrap-socket/package.json +++ b/ghost/bootstrap-socket/package.json @@ -23,5 +23,8 @@ "mocha": "9.1.3", "should": "13.2.3", "sinon": "11.1.2" + }, + "dependencies": { + "@tryghost/logging": "^1.0.2" } }