mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-11-08 23:25:51 +01:00
chore: replace date-fns with dayjs
This commit is contained in:
parent
e6690aadbe
commit
f637efdd68
@ -27,7 +27,7 @@
|
|||||||
"compression": "1.7.4",
|
"compression": "1.7.4",
|
||||||
"cookies": "0.7.3",
|
"cookies": "0.7.3",
|
||||||
"cors": "2.8.5",
|
"cors": "2.8.5",
|
||||||
"date-fns": "1.30.1",
|
"dayjs": "1.8.13",
|
||||||
"express": "4.16.4",
|
"express": "4.16.4",
|
||||||
"global": "4.3.2",
|
"global": "4.3.2",
|
||||||
"handlebars": "4.1.2",
|
"handlebars": "4.1.2",
|
||||||
|
@ -10,7 +10,7 @@ const Stream = require('stream');
|
|||||||
const chalk = require('chalk');
|
const chalk = require('chalk');
|
||||||
const pkgJSON = require('../../package.json');
|
const pkgJSON = require('../../package.json');
|
||||||
const _ = require('lodash');
|
const _ = require('lodash');
|
||||||
const { format } = require('date-fns');
|
const dayjs = require('dayjs');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Match the level based on buyan severity scale
|
* Match the level based on buyan severity scale
|
||||||
@ -114,7 +114,7 @@ function setup(logs) {
|
|||||||
} else if (target.format === 'pretty-timestamped') {
|
} else if (target.format === 'pretty-timestamped') {
|
||||||
// making fake stream for pretty printing
|
// making fake stream for pretty printing
|
||||||
stream.write = obj => {
|
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 {
|
} else {
|
||||||
stream.write = obj => {
|
stream.write = obj => {
|
||||||
|
Loading…
Reference in New Issue
Block a user