Skip to content

Commit

Permalink
Remove deprecated API and options in v7 option. (#1249)
Browse files Browse the repository at this point in the history
* Remove prettyPrint option.

100% code coverage back.

* Remove pino.final

* Fix jsdom TS issue

* Restore lost error

* Add link to pino-pretty

* Update Node.js in workflows

Co-authored-by: Igor Savin <iselwin@gmail.com>
  • Loading branch information
mcollina and kibertoad committed May 31, 2022
1 parent 22e0935 commit ff1546b
Show file tree
Hide file tree
Showing 39 changed files with 46 additions and 1,150 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 12
node-version: 16
- name: Install Modules
run: npm i
- name: Run Benchmark
Expand All @@ -46,7 +46,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 12
node-version: 16
- name: Install Modules
run: npm i
- name: Run Benchmark
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
fail-fast: false
matrix:
os: [macOS-latest, windows-latest, ubuntu-latest]
node-version: [12, 14, 16, 17]
node-version: [14, 16, 18]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/package-manager-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest]
node-version: [14]
node-version: [16]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
Expand All @@ -35,7 +35,7 @@ jobs:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest]
node-version: [14]
node-version: [16]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
Expand All @@ -62,7 +62,7 @@ jobs:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest]
node-version: [14]
node-version: [16]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
Expand Down
21 changes: 0 additions & 21 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -440,27 +440,6 @@ logger.info(thing)
In this way, logged objects' properties don't conflict with pino's standard logging properties,
and searching for logged objects can start from a consistent path.

<a id=prettyPrint></a>
#### `prettyPrint` (Boolean | Object)

Default: `false`

__DEPRECATED: look at [pino-pretty documentation](https://github.com/pinojs/pino-pretty)
for alternatives__. Using a [`transport`](#transport) is also an option.__

Enables pretty printing log logs. This is intended for non-production
configurations. This may be set to a configuration object as outlined in the
[`pino-pretty` documentation](https://github.com/pinojs/pino-pretty).

The options object may additionally contain a `prettifier` property to define
which prettifier module to use. When not present, `prettifier` defaults to
`'pino-pretty'`. Regardless of the value, the specified prettifier module
must be installed as a separate dependency:

```sh
npm install pino-pretty
```

#### `browser` (Object)

Browser only, may have `asObject` and `write` keys. This option is separately
Expand Down
6 changes: 2 additions & 4 deletions lib/deprecations.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
const warning = require('process-warning')()
module.exports = warning

const warnName = 'PinoWarning'
// const warnName = 'PinoWarning'

warning.create(warnName, 'PINODEP008', 'prettyPrint is deprecated, look at https://github.com/pinojs/pino-pretty for alternatives.')

warning.create(warnName, 'PINODEP009', 'The use of pino.final is discouraged in Node.js v14+ and not required. It will be removed in the next major version')
// warning.create(warnName, 'PINODEP010', 'A new deprecation')
2 changes: 0 additions & 2 deletions lib/symbols.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ const mixinSym = Symbol('pino.mixin')

const lsCacheSym = Symbol('pino.lsCache')
const chindingsSym = Symbol('pino.chindings')
const parsedChindingsSym = Symbol('pino.parsedChindings')

const asJsonSym = Symbol('pino.asJson')
const writeSym = Symbol('pino.write')
Expand Down Expand Up @@ -45,7 +44,6 @@ module.exports = {
mixinSym,
lsCacheSym,
chindingsSym,
parsedChindingsSym,
asJsonSym,
writeSym,
serializersSym,
Expand Down

0 comments on commit ff1546b

Please sign in to comment.