From 0c5c399f946ccd6a88c533e6c8c0e2b86b6a041c Mon Sep 17 00:00:00 2001 From: Matteo Collina Date: Tue, 21 Sep 2021 10:56:21 +0200 Subject: [PATCH 1/2] Switch to @matteo.collina/dateformat The dateformat maintainers decided that the v5.0.0 release would be ESM-only. Give the current stance of keeping the pino ecosystem to CJS for the time being, I do not think it is a safe long-term to depend on this library. Therefore I forked it. --- lib/utils.js | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/utils.js b/lib/utils.js index be0e5259..60bacd16 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -1,7 +1,7 @@ 'use strict' const clone = require('rfdc')({ circles: true }) -const dateformat = require('dateformat') +const dateformat = require('@matteo.collina/dateformat') const stringifySafe = require('fast-safe-stringify') const defaultColorizer = require('./colors')() const { diff --git a/package.json b/package.json index 044543da..c493f8b7 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "dependencies": { "args": "^5.0.1", "colorette": "^2.0.0", - "dateformat": "^4.5.1", + "@matteo.collina/dateformat": "^5.0.1", "fast-safe-stringify": "^2.0.7", "joycon": "^3.0.0", "pino-abstract-transport": "^0.3.0", From c2936837f48a7e3c60ca2e96bae92b35c625d053 Mon Sep 17 00:00:00 2001 From: Matteo Collina Date: Tue, 21 Sep 2021 11:05:02 +0200 Subject: [PATCH 2/2] Fixed tests --- test/basic.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/basic.test.js b/test/basic.test.js index 1fb2c030..7aaf3c0d 100644 --- a/test/basic.test.js +++ b/test/basic.test.js @@ -4,7 +4,7 @@ const { Writable } = require('readable-stream') const os = require('os') const test = require('tap').test const pino = require('pino') -const dateformat = require('dateformat') +const dateformat = require('@matteo.collina/dateformat') const pinoPretty = require('..') const _prettyFactory = pinoPretty.prettyFactory