Skip to content

Commit

Permalink
Bump pino version from 6.0.0 to 7.0.0 (#144)
Browse files Browse the repository at this point in the history
* Bump pino from 6.0.0 to 7.0.0

* remove Node 10, add Node 16

* remove hapi 18 and 19

* upgrade lab to pass tests on Node 16

* update README.md

* get caller file?
  • Loading branch information
arty-name committed Nov 3, 2021
1 parent 7e9e699 commit 61e5d3e
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
9 changes: 2 additions & 7 deletions .github/workflows/test.yml
Expand Up @@ -15,13 +15,8 @@ jobs:

strategy:
matrix:
node: [10, 12, 14]
hapi: ["@hapi/hapi@18", "@hapi/hapi@19", "@hapi/hapi@20"]
exclude:
- node: 10
hapi: "@hapi/hapi@19"
- node: 10
hapi: "@hapi/hapi@20"
node: [12, 14, 16]
hapi: ["@hapi/hapi@20"]

steps:
- uses: actions/checkout@v2
Expand Down
3 changes: 2 additions & 1 deletion README.md
Expand Up @@ -6,7 +6,8 @@ post-processing.

## Supported Hapi versions

- hapi-pino v7.x and v8.x supports Hapi v18 and v19.
- hapi-pino v8.x supports Hapi v20. (Known to work on v18 and v19, not tested anymore.)
- hapi-pino v7.x supports Hapi v18 and v19.
- hapi-pino v6.x supports Hapi v17, v18 and v19
- hapi-pino v5.x supports Hapi v17 and v18
- hapi-pino v3.x
Expand Down
4 changes: 4 additions & 0 deletions index.js
Expand Up @@ -5,6 +5,7 @@ const pino = require('pino')
const { stdSerializers } = pino
const serializersSym = Symbol.for('pino.serializers')
const nullLogger = require('abstract-logging')
const getCallerFile = require('get-caller-file')

const levelTags = {
trace: 'trace',
Expand Down Expand Up @@ -46,6 +47,9 @@ async function register (server, options) {
logger[serializersSym].err = options.serializers.err
}
} else {
if (options.transport && !options.transport.caller) {
options.transport.caller = getCallerFile()
}
options.stream = options.stream || process.stdout
var stream = options.stream || process.stdout
logger = pino(options, stream)
Expand Down
5 changes: 3 additions & 2 deletions package.json
Expand Up @@ -21,7 +21,7 @@
"devDependencies": {
"@hapi/code": "^8.0.0",
"@hapi/hapi": "^20.0.0",
"@hapi/lab": "^23.0.0",
"@hapi/lab": "^24.3.2",
"coveralls": "^3.0.11",
"flush-write-stream": "^2.0.0",
"make-promises-safe": "^5.1.0",
Expand All @@ -32,7 +32,8 @@
"dependencies": {
"@hapi/hoek": "^9.0.0",
"abstract-logging": "^2.0.0",
"pino": "^6.0.0",
"get-caller-file": "^2.0.5",
"pino": "^7.0.0",
"pino-pretty": "^4.0.0"
},
"repository": {
Expand Down

0 comments on commit 61e5d3e

Please sign in to comment.