From e060cf30cf15eac75ad21c2716fed6c247ecf0e1 Mon Sep 17 00:00:00 2001 From: Frazer Smith Date: Fri, 26 Mar 2021 10:23:52 +0000 Subject: [PATCH 01/10] docs(readme): add badges --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9c64e01..a7873a8 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,9 @@ # fastify-kafka -[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](http://standardjs.com/) [![Build Status](https://travis-ci.org/fastify/fastify-kafka.svg?branch=master)](https://travis-ci.org/fastify/fastify-kafka) +![CI](https://github.com/fastify/fastify-kafka/workflows/CI/badge.svg) +[![NPM version](https://img.shields.io/npm/v/fastify-kafka.svg?style=flat)](https://www.npmjs.com/package/fastify-kafka) +[![Known Vulnerabilities](https://snyk.io/test/github/fastify/fastify-kafka/badge.svg)](https://snyk.io/test/github/fastify/fastify-kafka) +[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://standardjs.com/) Fastify plugin to interact with [Apache Kafka](http://kafka.apache.org/). Supports Kafka producer and consumer. To achieve the best performances internally uses [`node-rdkafka`](https://github.com/Blizzard/node-rdkafka). From d4f8368dd8db0df8288ee957f4184ccd276309e6 Mon Sep 17 00:00:00 2001 From: Frazer Smith Date: Fri, 26 Mar 2021 10:24:08 +0000 Subject: [PATCH 02/10] docs(readme): update http link to https --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a7873a8..a4b0718 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,7 @@ This module exposes the following apis: ## Acknowledgements This project is kindly sponsored by: -- [LetzDoIt](http://www.letzdoitapp.com/) +- [LetzDoIt](https://www.letzdoitapp.com/) ## License From c37f184763e63df59dc31d3fed0c3b4326557c1e Mon Sep 17 00:00:00 2001 From: Frazer Smith Date: Fri, 26 Mar 2021 10:27:26 +0000 Subject: [PATCH 03/10] chore: remove old dependabot v1 config --- .dependabot/config.yml | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 .dependabot/config.yml diff --git a/.dependabot/config.yml b/.dependabot/config.yml deleted file mode 100644 index cae63e3..0000000 --- a/.dependabot/config.yml +++ /dev/null @@ -1,5 +0,0 @@ -version: 1 -update_configs: - - package_manager: "javascript" - directory: "/" - update_schedule: "daily" From 79f57f8b45261b4a85a4e7ec8a93aadc1b339635 Mon Sep 17 00:00:00 2001 From: Frazer Smith Date: Fri, 26 Mar 2021 10:28:03 +0000 Subject: [PATCH 04/10] ci(dependabot): add github-actions --- .github/dependabot.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 646cb17..5e48d4e 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,6 +1,12 @@ version: 2 updates: - - package-ecosystem: "npm" - directory: "/" + - package-ecosystem: github-actions + directory: '/' schedule: - interval: "daily" + interval: daily + open-pull-requests-limit: 10 + - package-ecosystem: npm + directory: '/' + schedule: + interval: daily + open-pull-requests-limit: 10 From 2b5e7024e6c23cedd76a9a3c73977d45bddca3c2 Mon Sep 17 00:00:00 2001 From: Frazer Smith Date: Fri, 26 Mar 2021 10:29:57 +0000 Subject: [PATCH 05/10] ci: ignore documentation updates --- .github/workflows/ci.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fad5461..8c0a210 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,9 +3,13 @@ name: CI on: push: - branches: [ master ] + paths-ignore: + - 'docs/**' + - '*.md' pull_request: - branches: [ master ] + paths-ignore: + - 'docs/**' + - '*.md' jobs: test: From bdcd80fe55dd2059abfb5b811189efb23316e120 Mon Sep 17 00:00:00 2001 From: Frazer Smith Date: Fri, 26 Mar 2021 10:31:15 +0000 Subject: [PATCH 06/10] style(ci): use standardized template --- .github/workflows/ci.yml | 43 ++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8c0a210..01355fa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,3 @@ - name: CI on: @@ -14,31 +13,31 @@ on: jobs: test: runs-on: ubuntu-latest + strategy: matrix: node-version: [10.x, 12.x, 14.x] - services: - kafka: - image: confluentinc/cp-kafka - ports: - - 9092:9092 + steps: - - uses: actions/checkout@v2 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2.1.5 - with: - node-version: ${{ matrix.node-version }} - - name: Install Dependencies - run: npm install --ignore-scripts - - name: Test - run: npm test + - uses: actions/checkout@v2 + + - name: Use Node.js + uses: actions/setup-node@v2.1.5 + with: + node-version: ${{ matrix.node-version }} + - name: Install Dependencies + run: | + npm install --ignore-scripts + + - name: Run Tests + run: | + npm run test automerge: - needs: test - runs-on: ubuntu-latest - steps: - - uses: fastify/github-action-merge-dependabot@v2.0.0 - if: ${{ github.actor == 'dependabot[bot]' && github.event_name == 'pull_request' }} - with: - github-token: ${{secrets.github_token}} + needs: test + runs-on: ubuntu-latest + steps: + - uses: fastify/github-action-merge-dependabot@v2.0.0 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} From 1015da1e914881fc24b9cf6c9631aec5d258087e Mon Sep 17 00:00:00 2001 From: Frazer Smith Date: Fri, 26 Mar 2021 10:41:26 +0000 Subject: [PATCH 07/10] chore: remove travis config file --- .travis.yml | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 8f0b6b1..0000000 --- a/.travis.yml +++ /dev/null @@ -1,25 +0,0 @@ -language: node_js - -node_js: - - "14" - - "12" - - "10" - -services: - - docker - -before_script: - - docker-compose up -d - - sleep 60 - - docker-compose ps - -script: - - npm test - -after_script: - - docker-compose down - -notifications: - email: - on_success: never - on_failure: always From 5ad4a56b7a4a3a100e0ecfd76ec417e2318891f5 Mon Sep 17 00:00:00 2001 From: Frazer Smith Date: Fri, 26 Mar 2021 10:49:57 +0000 Subject: [PATCH 08/10] build(docker): fix to adhere to docker-compose spec --- docker-compose.yml | 41 +++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index fd9d07b..355c21d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,20 +1,21 @@ ---- -zookeeper: - image: confluentinc/cp-zookeeper - ports: - - "2181:2181" - environment: - ZOOKEEPER_CLIENT_PORT: 2181 - ZOOKEEPER_TICK_TIME: 2000 -kafka: - image: confluentinc/cp-kafka - links: - - zookeeper - ports: - - "9092:9092" - environment: - KAFKA_BROKER_ID: 1 - KAFKA_ZOOKEEPER_CONNECT: 'zookeeper:2181' - KAFKA_ADVERTISED_LISTENERS: 'PLAINTEXT://localhost:9092' - KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1 - KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0 +version: "3.9" +services: + zookeeper: + image: confluentinc/cp-zookeeper + ports: + - "2181:2181" + environment: + ZOOKEEPER_CLIENT_PORT: 2181 + ZOOKEEPER_TICK_TIME: 2000 + kafka: + image: confluentinc/cp-kafka + links: + - zookeeper + ports: + - "9092:9092" + environment: + KAFKA_BROKER_ID: 1 + KAFKA_ZOOKEEPER_CONNECT: 'zookeeper:2181' + KAFKA_ADVERTISED_LISTENERS: 'PLAINTEXT://localhost:9092' + KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1 + KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0 From 7a67af0bf52c02a9c7ff55577e2343b6160a4862 Mon Sep 17 00:00:00 2001 From: Frazer Smith Date: Fri, 26 Mar 2021 10:54:29 +0000 Subject: [PATCH 09/10] docs(readme): grammar fix --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a4b0718..6908711 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://standardjs.com/) Fastify plugin to interact with [Apache Kafka](http://kafka.apache.org/). Supports Kafka producer and consumer. -To achieve the best performances internally uses [`node-rdkafka`](https://github.com/Blizzard/node-rdkafka). +To achieve the best performance, the plugin uses [`node-rdkafka`](https://github.com/Blizzard/node-rdkafka). ### Install From 44ce2f3b4da9aad5f02b40c992613fbe8ba92147 Mon Sep 17 00:00:00 2001 From: Frazer Smith Date: Fri, 26 Mar 2021 11:12:51 +0000 Subject: [PATCH 10/10] chore(package): add detach command option to docker-compose --- .github/workflows/ci.yml | 1 + package.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 01355fa..db83e65 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,6 +32,7 @@ jobs: - name: Run Tests run: | + npm run infra:start npm run test automerge: diff --git a/package.json b/package.json index 1b545c4..32c542b 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "main": "index.js", "types": "index.d.ts", "scripts": { - "infra:start": "docker-compose up", + "infra:start": "docker-compose up -d", "infra:stop": "docker-compose stop", "test": "standard && tsd && tap -j=1 test/*.js" },