Skip to content

Commit

Permalink
Update dependencies & workflows (#997)
Browse files Browse the repository at this point in the history
  • Loading branch information
GaryWilber authored Jan 20, 2023
1 parent ba62039 commit 5f0fa56
Show file tree
Hide file tree
Showing 9 changed files with 1,223 additions and 417 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ jobs:
submodules: recursive
- uses: actions/setup-node@v3
with:
node-version: 10
node-version: 18
registry-url: https://registry.npmjs.org/
cache: 'npm'
cache: "npm"
- run: npm ci
- run: npm publish
env:
Expand Down
14 changes: 5 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages

name: Test node-rdkafka

on:
push:
branches: [ "master" ]
branches: ["master"]
pull_request:
branches: [ "master" ]
branches: ["master"]

jobs:
build:
strategy:
matrix:
# 8, 10, 12, 14, 15, 16
version: [12]
version: [14, 16, 18, 19]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -23,7 +19,7 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.version }}
cache: 'npm'
cache: "npm"
- run: npm ci
- run: npm test
name: test
name: test
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@ deps/*

.DS_Store

package-lock.json
.vscode
.vscode
6 changes: 6 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,3 +220,9 @@ Steps to update:
1. Run end to end tests: `npm run test:e2e`. This requires running kafka & zookeeper locally.
1. Update the version numbers referenced in the [`README.md`](https://github.com/Blizzard/node-rdkafka/blob/master/README.md) file to the new version.
## Publishing new npm version
1. Increment the `version` in `package.json` and merge that change in.
1. Create a new github release. Set the tag & release title to the same string as `version` in `package.json`.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,13 @@ $(CONFIG_OUTPUTS): node_modules/.dirstamp binding.gyp
@$(NODE-GYP) configure

test: node_modules/.dirstamp
@./node_modules/.bin/mocha $(TEST_REPORTER) $(TESTS) $(TEST_OUTPUT)
@./node_modules/.bin/mocha --ui exports $(TEST_REPORTER) $(TESTS) $(TEST_OUTPUT)

check: node_modules/.dirstamp
@$(NODE) util/test-compile.js

e2e: $(E2E_TESTS)
@./node_modules/.bin/mocha --exit --timeout 120000 $(TEST_REPORTER) $(E2E_TESTS) $(TEST_OUTPUT)
@./node_modules/.bin/mocha --exit --timeout 120000 --ui exports $(TEST_REPORTER) $(E2E_TESTS) $(TEST_OUTPUT)

define release
NEXT_VERSION=$(shell node -pe 'require("semver").inc("$(VERSION)", "$(1)")')
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Using Alpine Linux? Check out the [docs](https://github.com/Blizzard/node-rdkafk
Windows build **is not** compiled from `librdkafka` source but it is rather linked against the appropriate version of [NuGet librdkafka.redist](https://www.nuget.org/packages/librdkafka.redist/) static binary that gets downloaded from `https://globalcdn.nuget.org/packages/librdkafka.redist.1.9.2.nupkg` during installation. This download link can be changed using the environment variable `NODE_RDKAFKA_NUGET_BASE_URL` that defaults to `https://globalcdn.nuget.org/packages/` when it's no set.

Requirements:
* [node-gyp for Windows](https://github.com/nodejs/node-gyp#on-windows) (the easies way to get it: `npm install --global --production windows-build-tools`, if your node version is 6.x or below, please use `npm install --global --production windows-build-tools@3.1.0`)
* [node-gyp for Windows](https://github.com/nodejs/node-gyp#on-windows)

**Note:** I _still_ do not recommend using `node-rdkafka` in production on Windows. This feature was in high demand and is provided to help develop, but we do not test against Windows, and windows support may lag behind Linux/Mac support because those platforms are the ones used to develop this library. Contributors are welcome if any Windows issues are found :)

Expand Down Expand Up @@ -267,7 +267,7 @@ To see the configuration options available to you, see the [Configuration](#conf
|`producer.beginTransaction(callback)`| Starts a new transaction. |
|`producer.sendOffsetsToTransaction(offsets, consumer, timeout, callback)`| Sends consumed topic-partition-offsets to the broker, which will get committed along with the transaction. |
|`producer.abortTransaction(timeout, callback)`| Aborts the ongoing transaction. |
|`producer.commitTransaction(timeout, callback)`| Commits the ongoing transaction. |
|`producer.commitTransaction(timeout, callback)`| Commits the ongoing transaction. |

##### Events

Expand Down
6 changes: 3 additions & 3 deletions binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
}
],
'cflags_cc' : [
'-std=c++14'
'-std=c++17'
],
'msvs_settings': {
'VCLinkerTool': {
Expand Down Expand Up @@ -122,7 +122,7 @@
'OS=="linux"',
{
'cflags_cc' : [
'-std=c++14'
'-std=c++17'
],
'cflags_cc!': [
'-fno-rtti'
Expand All @@ -140,7 +140,7 @@
],
'OTHER_CPLUSPLUSFLAGS': [
'-I/usr/local/opt/openssl/include',
'-std=c++14'
'-std=c++17'
],
},
}
Expand Down
Loading

0 comments on commit 5f0fa56

Please sign in to comment.