0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2025-01-13 22:48:31 -05:00

Merge pull request #1290 from DanielRuf/chore/replace-date-fns-with-dayjs

chore: replace date-fns with dayjs
This commit is contained in:
Juan Picado @jotadeveloper 2019-04-29 07:27:56 +02:00 committed by GitHub
commit 40c4b40c77
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 4 deletions

View file

@ -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",

View file

@ -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 => {

View file

@ -2892,7 +2892,7 @@ data-urls@^1.0.0:
whatwg-mimetype "^2.2.0"
whatwg-url "^7.0.0"
date-fns@1.30.1, date-fns@^1.27.2:
date-fns@^1.27.2:
version "1.30.1"
resolved "https://registry.verdaccio.org/date-fns/-/date-fns-1.30.1.tgz#2e71bf0b119153dbb4cc4e88d9ea5acfb50dc05c"
integrity sha512-hBSVCvSmWC+QypYObzwGOd9wqdDpOt+0wl0KbU+R+uuZBS1jN8VsD1ss3irQDknRj5NvxiTF6oj/nDRnN/UQNw==
@ -2902,6 +2902,11 @@ dateformat@^3.0.0:
resolved "https://registry.verdaccio.org/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae"
integrity sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==
dayjs@1.8.13:
version "1.8.13"
resolved "https://registry.npmjs.org/dayjs/-/dayjs-1.8.13.tgz#51b5cdad23ba508bcea939a853b492fefb7fdc47"
integrity sha512-JZ01l/PMU8OqwuUs2mOQ/CTekMtoXOUSylfjqjgDzbhRSxpFIrPnHn8Y8a0lfocNgAdBNZb8y0/gbzJ2riQ4WQ==
debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.8, debug@^2.6.9:
version "2.6.9"
resolved "https://registry.verdaccio.org/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"