Skip to content

Commit

Permalink
Merge pull request #20 from pinojs/updated-deps
Browse files Browse the repository at this point in the history
Updated dependencies, Elastic 6 support
  • Loading branch information
mcollina authored Oct 6, 2018
2 parents 05d6fb0 + 77d3499 commit ea380ea
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 18 deletions.
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
language: node_js
sudo: false
node_js:
- '4'
- '6'
- '8'
- '10'
env:
matrix:
- ELASTIC_VERSION="2.3.0" ELASTIC_URL=https://download.elasticsearch.org/elasticsearch/release/org/elasticsearch/distribution/tar/elasticsearch/2.3.0/elasticsearch-2.3.0.tar.gz
- ELASTIC_VERSION="5.0.1" ELASTIC_URL=https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.0.1.tar.gz
- ELASTIC_VERSION="5.6.12" ELASTIC_URL=https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.6.12.tar.gz
- ELASTIC_VERSION="6.4.1" ELASTIC_URL=https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.4.1.tar.gz
global:
- secure: lXGEsFYLLYpo+Snw4brEQQT2cHD3tZYCcgI9XPzWlzQ7gQ1dy8/IN9eeGgGZ4naplT8i3+UtT2gNtmZoRwzjkDUqYBk5jC/UQj0w/3GYbZ5prMb5/YrQsJSyZbUNSiMTHIu+z8A4S7PSHkJuLU3QznkWhMOle8Bx2TY9DmjybBAnQLpGtqeYTXeUoaMX+qZJVOQZh9o63lSVLn30cTPP+tNqk7cbBJrLbj9cl2wsyWPqXSZZwy4p0cu/dx3t8LrFDVnsjJylPtY5bWzj0cdJO/FRP5bU2QWopJ+Nqs9EauCCX9k3qHvWIFT3WInyQ+FGLnFDb6qtg8a21oXDUC2JaX2kw5XEnlbyka0pRKk7nrf9JglAiNMkUjQz9/7FvZoL/AiGdR2w88GEwE4Bno1bKI1MxAPXeAvNQT+TmqrUUyBDtNQsegsqD6dxoJuUBfqb8m2Kli2F1YRFA/zQ98gJSdpO7ho07CH5MGcOzQZ0O3Nz5Hl5OhMhaVB6jvQCnEsPu8OZZUN2XkpypeDQ8blzlSVvwSejWMkRVaf9313HDCTa2m9tgxa8ZOxQTfotgIwAnBCKCYRxNn4ZMIO2aW01d36cnZ2GHXQLjqL/mQC2MbDc4tdXD9zpFvNK7XcfHRtZ4hl/h9d8TJe92vjQxAMgnEzXpZRTfLLmwKI+YY0ImIY=
before_install:
Expand Down
13 changes: 13 additions & 0 deletions docker-compose-v6.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
version: '3.6'
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:6.4.1
container_name: elasticsearch
ports: ['9200:9200']

kibana:
image: docker.elastic.co/kibana/kibana:6.4.1
container_name: kibana
ports: ['5601:5601']
depends_on: ['elasticsearch']
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,21 @@
"author": "Matteo Collina <[email protected]>",
"license": "MIT",
"devDependencies": {
"pino": "^4.7.2",
"pino": "^5.0.0",
"pre-commit": "^1.2.2",
"proxyquire": "^1.8.0",
"standard": "^10.0.0",
"tap": "^10.7.2"
"proxyquire": "^2.1.0",
"standard": "^12.0.1",
"tap": "^12.0.1"
},
"dependencies": {
"aws-sdk": "^2.133.0",
"elasticsearch": "^13.3.1",
"aws-sdk": "^2.329.0",
"elasticsearch": "^15.1.1",
"fast-json-parse": "^1.0.3",
"http-aws-es": "^3.1.0",
"http-aws-es": "^6.0.0",
"minimist": "^1.2.0",
"pump": "^1.0.2",
"readable-stream": "^2.3.3",
"split2": "^2.2.0"
"pump": "^3.0.0",
"readable-stream": "^3.0.6",
"split2": "^3.0.0"
},
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion pino-elasticsearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ function pinoElasticSearch (opts) {
})
},
write: function (body, enc, cb) {
const obj = {index, type, body}
const obj = { index, type, body }
client.index(obj, function (err, data) {
if (!err) {
splitter.emit('insert', data, body)
Expand Down
10 changes: 5 additions & 5 deletions test/acceptance.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ tap.tearDown(() => {
})

tap.beforeEach((done) => {
client.indices.delete({index}, () => {
client.indices.create({index}, done)
client.indices.delete({ index }, () => {
client.indices.create({ index }, done)
})
})

Expand All @@ -33,7 +33,7 @@ setTimeout(function () {
process.exit(1)
}, 60 * 1000).unref()

test('store a log line', {timeout}, (t) => {
test('store a log line', { timeout }, (t) => {
t.plan(3)

const instance = elastic({ index, type, consistency, host, port })
Expand All @@ -55,7 +55,7 @@ test('store a log line', {timeout}, (t) => {
})
})

test('store an deeply nested log line', {timeout}, (t) => {
test('store an deeply nested log line', { timeout }, (t) => {
t.plan(4)

const instance = elastic({ index, type, consistency, host, port })
Expand Down Expand Up @@ -85,7 +85,7 @@ test('store an deeply nested log line', {timeout}, (t) => {
})
})

test('store lines in bulk', {timeout}, (t) => {
test('store lines in bulk', { timeout }, (t) => {
t.plan(15)

const instance = elastic({ index, type, consistency, host, port })
Expand Down

0 comments on commit ea380ea

Please sign in to comment.