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: update dependencies #158

Merged
merged 1 commit into from Mar 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 8 additions & 8 deletions index.js
Expand Up @@ -37,7 +37,7 @@ async function register (server, options) {
options.logEvents = ['onPostStart', 'onPostStop', 'response', 'request-error']
}

var logger
let logger
if (options.instance) {
logger = options.instance
const overrideDefaultErrorSerializer =
Expand All @@ -51,7 +51,7 @@ async function register (server, options) {
options.transport.caller = getCallerFile()
}
options.stream = options.stream || process.stdout
var stream = options.stream || process.stdout
const stream = options.stream || process.stdout
logger = pino(options, stream)
}

Expand All @@ -69,7 +69,7 @@ async function register (server, options) {
tagToLevelValue[tag] = logger.levels.values[tagToLevels[tag]]
}

var ignoreTable = {}
const ignoreTable = {}
if (options.ignorePaths) {
for (let i = 0; i < options.ignorePaths.length; i++) {
ignoreTable[options.ignorePaths[i]] = true
Expand Down Expand Up @@ -215,7 +215,7 @@ async function register (server, options) {
return false
}

for (var index = ignoreTags.length; index >= 0; index--) {
for (let index = ignoreTags.length; index >= 0; index--) {
if (routeTags.includes(ignoreTags[index])) {
return true
}
Expand All @@ -229,7 +229,7 @@ async function register (server, options) {
}

function tryAddEvent (server, options, type, event, cb) {
var name = typeof event === 'string' ? event : event.name
const name = typeof event === 'string' ? event : event.name
if (isEnabledLogEvent(options, name)) {
if (type === 'on') {
server.events.on(event, cb)
Expand All @@ -247,10 +247,10 @@ async function register (server, options) {
return
}

var tags = event.tags
var data = event.data
const tags = event.tags
let data = event.data

var logObject
let logObject
if (mergeHapiLogData) {
if (typeof data === 'string') {
data = { [messageKey]: data }
Expand Down
22 changes: 11 additions & 11 deletions package.json
Expand Up @@ -20,24 +20,24 @@
],
"license": "MIT",
"devDependencies": {
"@hapi/code": "^8.0.0",
"@hapi/code": "^8.0.7",
"@hapi/hapi": "^20.2.1",
"@hapi/lab": "^24.3.2",
"coveralls": "^3.0.11",
"@hapi/lab": "^24.5.1",
"coveralls": "^3.1.1",
"flush-write-stream": "^2.0.0",
"make-promises-safe": "^5.1.0",
"pino-pretty": "^7.2.0",
"pino-pretty": "^7.5.3",
"pre-commit": "^1.2.2",
"split2": "^3.1.1",
"standard": "^14.3.3",
"tsd": "^0.18.0"
"split2": "^4.1.0",
"standard": "^16.0.4",
"tsd": "^0.19.1"
},
"dependencies": {
"@hapi/hoek": "^9.0.0",
"@types/hapi__hapi": "^20.0.9",
"abstract-logging": "^2.0.0",
"@hapi/hoek": "^9.2.1",
"@types/hapi__hapi": "^20.0.10",
"abstract-logging": "^2.0.1",
"get-caller-file": "^2.0.5",
"pino": "^7.0.0"
"pino": "^7.8.1"
},
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion test.js
Expand Up @@ -49,7 +49,7 @@ function getServer () {
}

function sink (func) {
var result = split(JSON.parse)
const result = split(JSON.parse)
result.pipe(writeStream.obj(func))
return result
}
Expand Down