diff --git a/.travis.yml b/.travis.yml index 363f1b1..88f1b68 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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: diff --git a/docker-compose-v6.yml b/docker-compose-v6.yml new file mode 100644 index 0000000..18bfeb6 --- /dev/null +++ b/docker-compose-v6.yml @@ -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'] diff --git a/package.json b/package.json index 5e48400..c7b741b 100644 --- a/package.json +++ b/package.json @@ -22,21 +22,21 @@ "author": "Matteo Collina ", "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", diff --git a/pino-elasticsearch.js b/pino-elasticsearch.js index 3f32656..394b4e8 100644 --- a/pino-elasticsearch.js +++ b/pino-elasticsearch.js @@ -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) diff --git a/test/acceptance.test.js b/test/acceptance.test.js index 64ed9ac..a9be444 100644 --- a/test/acceptance.test.js +++ b/test/acceptance.test.js @@ -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) }) }) @@ -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 }) @@ -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 }) @@ -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 })