From c12f6b85c5b120a0c29bb3acaae6284d357f5d59 Mon Sep 17 00:00:00 2001 From: Betsun Vladyslav Date: Tue, 11 Jan 2022 15:19:00 +0200 Subject: [PATCH] fix: accept code-review suggestions --- .github/workflows/ci.yml | 6 +++--- index.d.ts | 11 ++++++++++- lib/consumer.js | 1 - package.json | 2 +- 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7024c89..45cf727 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,12 +24,12 @@ jobs: uses: actions/setup-node@v2 with: node-version: ${{ matrix.node-version }} - - name: Start Infrastructure - run: | - docker-compose up -d - name: Install Dependencies run: | npm install + - name: Start Infrastructure + run: | + docker-compose up -d - name: Run Tests run: | npm test diff --git a/index.d.ts b/index.d.ts index 0668cb4..506a1b8 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,6 +1,15 @@ import { FastifyPluginCallback } from 'fastify'; -import { ConsumerGlobalConfig, ConsumerTopicConfig, KafkaConsumer, Message, MetadataOptions, Producer, ProducerGlobalConfig, ProducerTopicConfig } from 'node-rdkafka'; +import { + ConsumerGlobalConfig, + ConsumerTopicConfig, + KafkaConsumer, + Message, + MetadataOptions, + Producer, + ProducerGlobalConfig, + ProducerTopicConfig +} from 'node-rdkafka'; declare module 'fastify' { interface FastifyKafkaMessage extends Pick { diff --git a/lib/consumer.js b/lib/consumer.js index 91218b8..98352f0 100644 --- a/lib/consumer.js +++ b/lib/consumer.js @@ -29,7 +29,6 @@ function Consumer (opts, log, next, topicConf, metadataOptions) { function onReady () { this._log.debug('kafka-consumer:onReady') - if (!calledNext) { calledNext = true return next() diff --git a/package.json b/package.json index b314676..6caf9f1 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "abstract-logging": "2.0.1", "fastify": "^3.0.0-rc.2", "standard": "^16.0.1", - "tap": "^15.1.2", + "tap": "^15.1.6", "tsd": "^0.19.1", "typescript": "^4.5.4" },