From f637efdd688955410783c5fad452462d29d3c4aa Mon Sep 17 00:00:00 2001 From: Daniel Ruf Date: Sun, 28 Apr 2019 21:45:35 +0200 Subject: [PATCH 1/2] chore: replace date-fns with dayjs --- package.json | 2 +- src/lib/logger.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index f0ac30a7d..5dd9c8d97 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "compression": "1.7.4", "cookies": "0.7.3", "cors": "2.8.5", - "date-fns": "1.30.1", + "dayjs": "1.8.13", "express": "4.16.4", "global": "4.3.2", "handlebars": "4.1.2", diff --git a/src/lib/logger.js b/src/lib/logger.js index b1b4f721a..3ad2276fb 100644 --- a/src/lib/logger.js +++ b/src/lib/logger.js @@ -10,7 +10,7 @@ const Stream = require('stream'); const chalk = require('chalk'); const pkgJSON = require('../../package.json'); const _ = require('lodash'); -const { format } = require('date-fns'); +const dayjs = require('dayjs'); /** * Match the level based on buyan severity scale @@ -114,7 +114,7 @@ function setup(logs) { } else if (target.format === 'pretty-timestamped') { // making fake stream for pretty printing stream.write = obj => { - destination.write(`[${format(obj.time, 'YYYY-MM-DD HH:mm:ss')}] ${print(obj.level, obj.msg, obj, destinationIsTTY)}\n`); + destination.write(`[${dayjs(obj.time).format('YYYY-MM-DD HH:mm:ss')}] ${print(obj.level, obj.msg, obj, destinationIsTTY)}\n`); }; } else { stream.write = obj => { From 46ca898103adda35b43cb6bba8498fff353d9b10 Mon Sep 17 00:00:00 2001 From: Daniel Ruf Date: Sun, 28 Apr 2019 21:46:57 +0200 Subject: [PATCH 2/2] build: add updated lockfile --- yarn.lock | Bin 349702 -> 349933 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/yarn.lock b/yarn.lock index 00e63344867baf8a0cc2b9dcf49e8db5093fe2bd..dc99ffe587cf9dbda28d373df2588c2b778bc2b1 100644 GIT binary patch delta 234 zcmZo$Bl>o&Xu}r9!0+3WzB95j$tG526+0N}S?C!WTX88Ul%*CGXXfWAD1n702g)mW z)8v%I6eHuLL{kHcq~z2@OJmDK3sd7H z6HBAC)U+h?w3K9%$%3cELcO9440H4Yd_yh#3(HGGi;Z&q1NEIlQnP(a@+161gDZ2= zvI?`(U8<5Yf`Tgw+&qf{@;ve^A}taPa?