diff --git a/lib/utils.js b/lib/utils.js index 17b0e6cb..7320948c 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -1,6 +1,6 @@ 'use strict' -const fastCopy = require('fast-copy') +const { createCopier } = require('fast-copy') const dateformat = require('dateformat') const SonicBoom = require('sonic-boom') const stringifySafe = require('fast-safe-stringify') @@ -18,6 +18,8 @@ const { DATE_FORMAT_SIMPLE } = require('./constants') +const fastCopy = createCopier({}) + module.exports = { isObject, prettifyErrorLog, diff --git a/package.json b/package.json index dd9d607d..2e859721 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "dependencies": { "colorette": "^2.0.7", "dateformat": "^4.6.3", - "fast-copy": "^2.1.1", + "fast-copy": "^3.0.0", "fast-safe-stringify": "^2.1.1", "joycon": "^3.1.1", "help-me": "^4.0.1", diff --git a/test/lib/utils.internals.test.js b/test/lib/utils.internals.test.js index 5de2aeb7..e82f410b 100644 --- a/test/lib/utils.internals.test.js +++ b/test/lib/utils.internals.test.js @@ -3,9 +3,10 @@ process.env.TZ = 'UTC' const tap = require('tap') -const fastCopy = require('fast-copy') +const { createCopier } = require('fast-copy') const stringifySafe = require('fast-safe-stringify') const { internals } = require('../../lib/utils') +const fastCopy = createCopier({}) tap.test('#joinLinesWithIndentation', t => { t.test('joinLinesWithIndentation adds indentation to beginning of subsequent lines', async t => {