Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): update dependency pino to v7 #3565

Merged
merged 1 commit into from
Nov 23, 2021
Merged

fix(deps): update dependency pino to v7 #3565

merged 1 commit into from
Nov 23, 2021

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Oct 14, 2021

WhiteSource Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
pino (source) 6.13.3 -> 7.4.0 age adoption passing confidence

Release Notes

pinojs/pino

v7.4.0

Compare Source

What's Changed

Full Changelog: pinojs/pino@v7.3.0...v7.4.0

v7.3.0

Compare Source

What's Changed

New Contributors

Full Changelog: pinojs/pino@v7.2.0...v7.3.0

v7.2.0

Compare Source

What's Changed

New Contributors

Full Changelog: pinojs/pino@v7.1.0...v7.2.0

v7.1.0

Compare Source

What's Changed

New Contributors

Full Changelog: pinojs/pino@v7.0.5...v7.1.0

v7.0.5

Compare Source

What's Changed

Full Changelog: pinojs/pino@v7.0.4...v7.0.5

v7.0.4

Compare Source

What's Changed

New Contributors

Full Changelog: pinojs/pino@v7.0.3...v7.0.4

v7.0.3

Compare Source

What's Changed

New Contributors

Full Changelog: pinojs/pino@v7.0.2...v7.0.3

v7.0.2

Compare Source

What's Changed

New Contributors

Full Changelog: pinojs/pino@v7.0.1...v7.0.2

v7.0.1

Compare Source

Updated install instructions

Full Changelog: pinojs/pino@v7.0.0...v7.0.1

v7.0.0

Compare Source

New Features

pino.transport()

Create a a stream that routes logs to a worker thread that
wraps around a Pino Transport.

const pino = require('pino')
const transport = pino.transport({
  target: 'some-transport',
  options: { some: 'options for', the: 'transport' }
})
pino(transport)

Multiple transports may also be defined, and specific levels can be logged to each transport:

const pino = require('pino')
const transports = pino.transport({
  targets: [{
    level: 'info',
    target: 'pino-pretty'
  }, {
    level: 'trace',
    target: 'pino/file',
    options: { destination: '/path/to/store/logs' }
  }]
})
pino(transports)

Transports may alternatively be arranged in a pipeline:

const logger = pino({
  transport: {
    pipeline: [{
      target: './my-transform.js'
    }, {
      // Use target: 'pino/file' to write to stdout
      // without any change.
      target: 'pino-pretty'
    }]
  }
})

logger.info('hello world')

For more on transports, how they work, and how to create them see the Transports documentation.

The internal implementation is based on thread-stream.

`pino.multistream()``

We have embedded a part of pino-multi-stream into pino itself, so you would be able to write to multiple streams from the same pino instance:

var fs = require('fs')
var pino = require('pino')
var streams = [
  {stream: fs.createWriteStream('/tmp/info.stream.out')},
  {level: 'debug', stream: fs.createWriteStream('/tmp/debug.stream.out')},
  {level: 'fatal', stream: fs.createWriteStream('/tmp/fatal.stream.out')}
]

var log = pino({
  level: 'debug' // this MUST be set at the lowest level of all the destinations
}, pino.multistream(streams))

log.debug('this will be written to /tmp/debug.stream.out')
log.info('this will be written to /tmp/debug.stream.out and /tmp/info.stream.out')
log.fatal('this will be written to /tmp/debug.stream.out, /tmp/info.stream.out and /tmp/fatal.stream.out')

This differs from pino.transport() as all the streams will be executed within the main thread, i.e. the one that created the pino instance.

Added TypeScript types

Types have been added to the the project, so you can now use pino with TypeScript without downloading any additional types: you should remove @types/pino from your project. The following typescript example would now work correctly:

import { pino } from "pino";

const log = pino();

log.info("hello world");
log.error("this is at error level");
log.info("the answer is %d", 42);
log.info({ obj: 42 }, "hello world");
log.info({ obj: 42, b: 2 }, "hello world");
log. info({ obj: { aa: "bbb" } }, "another");
Updated sonic-boom

sonic-boom, our fs.createWriteStream() replacement has become safer to use in v2.x.

A few selected changes:

Solved "exit" problem for sync: false destinations and transports

Thanks to the addition of WeakRef and FinalizationRegistry to JavaScript (available in Node.js v14+) we can automatically flush asynchronous streams when the processes exits without leaking memory.

Check out https://github.com/mcollina/on-exit-leak-free.

Breaking Changes

Deprecation of prettyPrint option

The prettyPrint option has been deprecated in favor of the new transport system.

Dropped Node.js v10.x

Node.js v10 went out of LTS/Maintenance in April 2021.
We are dropping support.

Apply err serializer everywhere

We will start applying the err serializer also to Error objects passed in as first argument to log methods, e.g. log.info(new Error('kaboom')) will pass through the serializer.

Removal of extreme mode

Extreme mode has been deprecated in previous release cycle and it has now been removed.

Pull Requests


Configuration

📅 Schedule: At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, click this checkbox.

This PR has been generated by WhiteSource Renovate. View repository job log here.

@renovate renovate bot requested a review from hongbo-miao as a code owner October 14, 2021 08:54
@codecov
Copy link

codecov bot commented Oct 14, 2021

Codecov Report

Merging #3565 (829ab26) into main (9a063c2) will decrease coverage by 0.19%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3565      +/-   ##
==========================================
- Coverage   48.95%   48.75%   -0.20%     
==========================================
  Files          77       77              
  Lines         478      482       +4     
  Branches       78       76       -2     
==========================================
+ Hits          234      235       +1     
- Misses        244      247       +3     
Impacted Files Coverage Δ
api-node/src/reliability/utils/meter.ts 83.33% <ø> (ø)
web/src/App/components/App.tsx 100.00% <ø> (ø)
web/src/Lab/components/Lab.tsx 0.00% <0.00%> (ø)
web/src/Lab/components/Menu.tsx 0.00% <0.00%> (ø)
web/src/Lab/queries/adoptDog.ts 0.00% <0.00%> (ø)
web/src/Lab/queries/getDog.ts 0.00% <0.00%> (ø)
web/src/Lab/queries/getOPADecision.ts 0.00% <ø> (ø)
web/src/Lab/queries/getOPALDecision.ts 0.00% <ø> (ø)
web/src/SignIn/components/SignIn.tsx 0.00% <0.00%> (ø)
web/src/auth/hooks/useAuth.ts 0.00% <0.00%> (ø)
... and 5 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7f78dd3...829ab26. Read the comment docs.

@renovate renovate bot force-pushed the renovate/pino-7.x branch 3 times, most recently from 2df9a3c to 3ce4403 Compare October 19, 2021 16:34
@renovate renovate bot force-pushed the renovate/pino-7.x branch 2 times, most recently from 51ae7a4 to 3e77a46 Compare November 3, 2021 18:57
@hongbo-miao
Copy link
Owner

Waiting pinojs/pino-http#175

@renovate renovate bot force-pushed the renovate/pino-7.x branch 2 times, most recently from 19ff92f to 65af548 Compare November 22, 2021 20:33
@codeclimate
Copy link

codeclimate bot commented Nov 23, 2021

Code Climate has analyzed commit 829ab26 and detected 0 issues on this pull request.

View more on Code Climate.

@sonarcloud
Copy link

sonarcloud bot commented Nov 23, 2021

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@mergify mergify bot merged commit c89048f into main Nov 23, 2021
@mergify mergify bot deleted the renovate/pino-7.x branch November 23, 2021 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants