diff --git a/lib/tools.js b/lib/tools.js index 296e13558..eff5f17f0 100644 --- a/lib/tools.js +++ b/lib/tools.js @@ -363,9 +363,6 @@ function createArgsNormalizer (defaultOptions) { } opts = Object.assign({}, defaultOptions, opts) opts.serializers = Object.assign({}, defaultOptions.serializers, opts.serializers) - if ('extreme' in opts) { - throw Error('The extreme option has been removed, use pino.destination({ sync: false }) instead') - } if ('onTerminated' in opts) { throw Error('The onTerminated option has been removed, use pino.final instead') } diff --git a/pino.js b/pino.js index 1e46add68..1b77014d7 100644 --- a/pino.js +++ b/pino.js @@ -172,14 +172,6 @@ function pino (...args) { module.exports = pino -module.exports.extreme = (dest = process.stdout.fd) => { - process.emitWarning( - 'The pino.extreme() option is deprecated and will be removed in v7. Use pino.destination({ sync: false }) instead.', - { code: 'extreme_deprecation' } - ) - return buildSafeSonicBoom({ dest, minLength: 4096, sync: false }) -} - module.exports.destination = (dest = process.stdout.fd) => { if (typeof dest === 'object') { dest.dest = dest.dest || process.stdout.fd diff --git a/test/syncfalse.test.js b/test/syncfalse.test.js index 8171c9b93..cf169882e 100644 --- a/test/syncfalse.test.js +++ b/test/syncfalse.test.js @@ -112,31 +112,7 @@ test('sync false with child', async ({ equal, teardown }) => { }) }) -test('throw an error if extreme is passed', async ({ throws }) => { - const pino = require('..') - throws(() => { - pino({ extreme: true }) - }) -}) - test('flush does nothing with sync true (default)', async () => { const instance = require('..')() instance.flush() }) - -test('pino.extreme() emits a warning', async ({ equal }) => { - const pino = require('..') - process.removeAllListeners('warning') - process.nextTick(() => pino.extreme(0)) - const warning = await once(process, 'warning') - const expected = 'The pino.extreme() option is deprecated and will be removed in v7. Use pino.destination({ sync: false }) instead.' - equal(expected, warning.message) - equal('extreme_deprecation', warning.code) -}) - -test('pino.extreme() defaults to stdout', async ({ equal }) => { - const pino = require('..') - process.removeAllListeners('warning') - const dest = pino.extreme() - equal(dest.fd, process.stdout.fd) -})