Skip to content

Commit

Permalink
Updated to standard v13 (#683)
Browse files Browse the repository at this point in the history
  • Loading branch information
mcollina committed Jul 17, 2019
1 parent 3c7f301 commit c5c996d
Show file tree
Hide file tree
Showing 12 changed files with 32 additions and 20 deletions.
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

0 comments on commit c5c996d

Please sign in to comment.