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

Updated to standard v13 #683

Merged
merged 1 commit into from Jul 17, 2019
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
4 changes: 2 additions & 2 deletions benchmarks/utils/runbench.js
Expand Up @@ -54,8 +54,8 @@ function runBenchmark (name, done) {
benchmarkResults[name] = {}

const processor = through(function (line, enc, cb) {
const [ label, time ] = ('' + line).split(': ')
const [ target, iterations ] = label.split('*')
const [label, time] = ('' + line).split(': ')
const [target, iterations] = label.split('*')
const logger = target.replace('bench', '')

if (!benchmarkResults[name][logger]) benchmarkResults[name][logger] = []
Expand Down
12 changes: 6 additions & 6 deletions browser.js
Expand Up @@ -152,12 +152,12 @@ pino.levels = {
trace: 10
},
labels: {
'10': 'trace',
'20': 'debug',
'30': 'info',
'40': 'warn',
'50': 'error',
'60': 'fatal'
10: 'trace',
20: 'debug',
30: 'info',
40: 'warn',
50: 'error',
60: 'fatal'
}
}

Expand Down
3 changes: 3 additions & 0 deletions lib/proto.js
@@ -1,4 +1,7 @@
'use strict'

/* eslint no-prototype-builtins: 0 */

const { EventEmitter } = require('events')
const SonicBoom = require('sonic-boom')
const flatstr = require('flatstr')
Expand Down
2 changes: 2 additions & 0 deletions lib/tools.js
@@ -1,5 +1,7 @@
'use strict'

/* eslint no-prototype-builtins: 0 */

const format = require('quick-format-unescaped')
const { mapHttpRequest, mapHttpResponse } = require('pino-std-serializers')
const SonicBoom = require('sonic-boom')
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -77,7 +77,7 @@
"qodaa": "^1.0.1",
"snazzy": "^8.0.0",
"split2": "^3.1.1",
"standard": "^12.0.1",
"standard": "^13.0.2",
"steed": "^1.1.3",
"tap": "^12.6.0",
"tape": "^4.10.1",
Expand Down
4 changes: 2 additions & 2 deletions test/basic.test.js
Expand Up @@ -57,7 +57,7 @@ function levelTest (name, level) {
is(result.level, level)
is(result.hello, 'world')
is(result.v, 1)
same(Object.keys(obj), [ 'hello' ])
same(Object.keys(obj), ['hello'])
})

test(`passing an object and a string at level ${name}`, async ({ is, same }) => {
Expand All @@ -77,7 +77,7 @@ function levelTest (name, level) {
hello: 'world',
v: 1
})
same(Object.keys(obj), [ 'hello' ])
same(Object.keys(obj), ['hello'])
})

test(`overriding object key by string at level ${name}`, async ({ is, same }) => {
Expand Down
2 changes: 1 addition & 1 deletion test/browser-serializers.test.js
Expand Up @@ -257,7 +257,7 @@ test('children serializers get called', ({ end, is }) => {
}
})

const child = parent.child({ 'a': 'property', serializers: childSerializers })
const child = parent.child({ a: 'property', serializers: childSerializers })

child.fatal({ test: 'test' })
end()
Expand Down
14 changes: 7 additions & 7 deletions test/browser.test.js
Expand Up @@ -82,12 +82,12 @@ test('exposes levels object', ({ end, same }) => {
trace: 10
},
labels: {
'10': 'trace',
'20': 'debug',
'30': 'info',
'40': 'warn',
'50': 'error',
'60': 'fatal'
10: 'trace',
20: 'debug',
30: 'info',
40: 'warn',
50: 'error',
60: 'fatal'
}
})

Expand All @@ -103,7 +103,7 @@ test('exposes LOG_VERSION', ({ end, is }) => {
test('exposes faux stdSerializers', ({ end, ok, same }) => {
ok(pino.stdSerializers)
// make sure faux stdSerializers match pino-std-serializers
for (let serializer in pinoStdSerializers) {
for (const serializer in pinoStdSerializers) {
ok(pino.stdSerializers[serializer], `pino.stdSerializers.${serializer}`)
}
// confirm faux methods return empty objects
Expand Down
2 changes: 2 additions & 0 deletions test/custom-levels.test.js
@@ -1,5 +1,7 @@
'use strict'

/* eslint no-prototype-builtins: 0 */

const { test } = require('tap')
const { sink, once } = require('./helper')
const pino = require('../')
Expand Down
3 changes: 3 additions & 0 deletions test/error.test.js
@@ -1,4 +1,7 @@
'use strict'

/* eslint no-prototype-builtins: 0 */

const os = require('os')
const { test } = require('tap')
const { sink, once } = require('./helper')
Expand Down
2 changes: 1 addition & 1 deletion test/serializers.test.js
Expand Up @@ -130,7 +130,7 @@ test('children serializers get called', async ({ is }) => {
test: 'this'
}, stream)

const child = parent.child({ 'a': 'property', serializers: childSerializers })
const child = parent.child({ a: 'property', serializers: childSerializers })

child.fatal({ test: 'test' })
const o = await once(stream, 'data')
Expand Down
2 changes: 2 additions & 0 deletions test/timestamp.test.js
@@ -1,5 +1,7 @@
'use strict'

/* eslint no-prototype-builtins: 0 */

const { test } = require('tap')
const { sink, once } = require('./helper')
const pino = require('../')
Expand Down