From d25613ffc2af2d11b7d55dab10b26c339d7123bf Mon Sep 17 00:00:00 2001 From: Siim Kallas Date: Thu, 16 Nov 2023 10:32:19 +0200 Subject: [PATCH 1/7] feat: support node21 for prebuilds --- .github/workflows/ci.yml | 6 ++++-- package-lock.json | 28 ++++++++++++++-------------- package.json | 4 ++-- scripts/prebuild-os.js | 11 ++++++++++- 4 files changed, 30 insertions(+), 19 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 72c3298f..b69e7d90 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,6 +15,8 @@ jobs: include: - container: 'node:16.0.0' node_api_target: '20.0.0' + - container: 'node:16.0.0' + node_api_target: '21.0.0' container: ${{ matrix.container }} steps: - name: Checkout @@ -35,7 +37,7 @@ jobs: fail-fast: false matrix: os: [windows-2019, macos-11] - node_api_target: ['14.0.0', '15.0.0', '16.0.0', '17.0.1', '18.0.0', '20.0.0'] + node_api_target: ['14.0.0', '15.0.0', '16.0.0', '17.0.1', '18.0.0', '20.0.0', '21.0.0'] runs-on: ${{ matrix.os }} steps: - name: Checkout @@ -89,7 +91,7 @@ jobs: fail-fast: false matrix: os: ['ubuntu-latest', 'windows-2019', 'macos-latest'] - nodejs: ['14', '16', '17', '18', '20'] + nodejs: ['14', '16', '17', '18', '20', '21'] steps: - name: Checkout uses: actions/checkout@v3 diff --git a/package-lock.json b/package-lock.json index 02738f56..7720ba51 100644 --- a/package-lock.json +++ b/package-lock.json @@ -59,8 +59,8 @@ "@opentelemetry/sdk-trace-node": "1.17.1", "@opentelemetry/semantic-conventions": "1.17.1", "is-promise": "^4.0.0", - "nan": "^2.17.0", - "node-gyp-build": "^4.6.0", + "nan": "^2.18.0", + "node-gyp-build": "^4.6.1", "protobufjs": "^7.2.4", "semver": "^7.5.4" }, @@ -7001,9 +7001,9 @@ } }, "node_modules/nan": { - "version": "2.17.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.17.0.tgz", - "integrity": "sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ==" + "version": "2.18.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.18.0.tgz", + "integrity": "sha512-W7tfG7vMOGtD30sHoZSSc/JVYiyDPEyQVso/Zz+/uQd0B0L46gtC+pHha5FFMRpil6fm/AoEcRWyOVi4+E/f8w==" }, "node_modules/nanoid": { "version": "3.3.3", @@ -7108,9 +7108,9 @@ } }, "node_modules/node-gyp-build": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.6.0.tgz", - "integrity": "sha512-NTZVKn9IylLwUzaKjkas1e4u2DLNcV4rdYagA4PWdPwW87Bi7z+BznyKSRwS/761tV/lzCGXplWsiaMjLqP2zQ==", + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.6.1.tgz", + "integrity": "sha512-24vnklJmyRS8ViBNI8KbtK/r/DmXQMRiOMXTNz2nrTnAYUwjmEEbnnpB/+kt+yWRv73bPsSPRFddrcIbAxSiMQ==", "bin": { "node-gyp-build": "bin.js", "node-gyp-build-optional": "optional.js", @@ -15526,9 +15526,9 @@ } }, "nan": { - "version": "2.17.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.17.0.tgz", - "integrity": "sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ==" + "version": "2.18.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.18.0.tgz", + "integrity": "sha512-W7tfG7vMOGtD30sHoZSSc/JVYiyDPEyQVso/Zz+/uQd0B0L46gtC+pHha5FFMRpil6fm/AoEcRWyOVi4+E/f8w==" }, "nanoid": { "version": "3.3.3", @@ -15609,9 +15609,9 @@ } }, "node-gyp-build": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.6.0.tgz", - "integrity": "sha512-NTZVKn9IylLwUzaKjkas1e4u2DLNcV4rdYagA4PWdPwW87Bi7z+BznyKSRwS/761tV/lzCGXplWsiaMjLqP2zQ==" + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.6.1.tgz", + "integrity": "sha512-24vnklJmyRS8ViBNI8KbtK/r/DmXQMRiOMXTNz2nrTnAYUwjmEEbnnpB/+kt+yWRv73bPsSPRFddrcIbAxSiMQ==" }, "node-preload": { "version": "0.2.1", diff --git a/package.json b/package.json index a6d7bcdf..731fbcd4 100644 --- a/package.json +++ b/package.json @@ -150,8 +150,8 @@ "@opentelemetry/sdk-trace-node": "1.17.1", "@opentelemetry/semantic-conventions": "1.17.1", "is-promise": "^4.0.0", - "nan": "^2.17.0", - "node-gyp-build": "^4.6.0", + "nan": "^2.18.0", + "node-gyp-build": "^4.6.1", "protobufjs": "^7.2.4", "semver": "^7.5.4" }, diff --git a/scripts/prebuild-os.js b/scripts/prebuild-os.js index 253d9d63..f5e28afa 100644 --- a/scripts/prebuild-os.js +++ b/scripts/prebuild-os.js @@ -3,7 +3,16 @@ const prebuildify = require('prebuildify'); let targets = process.argv.slice(2); if (targets.length == 0) { - targets = ['14.0.0', '15.0.0', '16.0.0', '17.0.1', '18.0.0', '19.0.0', '20.0.0']; + targets = [ + '14.0.0', + '15.0.0', + '16.0.0', + '17.0.1', + '18.0.0', + '19.0.0', + '20.0.0', + '21.0.0' + ]; } prebuildify({ From cc25ce193773a5b5180b25cefda28843e8838d9a Mon Sep 17 00:00:00 2001 From: Siim Kallas Date: Thu, 16 Nov 2023 10:47:37 +0200 Subject: [PATCH 2/7] fix node21 api target --- .github/workflows/ci.yml | 4 ++-- scripts/prebuild-os.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b69e7d90..78c7084f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ jobs: - container: 'node:16.0.0' node_api_target: '20.0.0' - container: 'node:16.0.0' - node_api_target: '21.0.0' + node_api_target: '21.2.0' container: ${{ matrix.container }} steps: - name: Checkout @@ -37,7 +37,7 @@ jobs: fail-fast: false matrix: os: [windows-2019, macos-11] - node_api_target: ['14.0.0', '15.0.0', '16.0.0', '17.0.1', '18.0.0', '20.0.0', '21.0.0'] + node_api_target: ['14.0.0', '15.0.0', '16.0.0', '17.0.1', '18.0.0', '20.0.0', '21.2.0'] runs-on: ${{ matrix.os }} steps: - name: Checkout diff --git a/scripts/prebuild-os.js b/scripts/prebuild-os.js index f5e28afa..bef76f80 100644 --- a/scripts/prebuild-os.js +++ b/scripts/prebuild-os.js @@ -11,7 +11,7 @@ if (targets.length == 0) { '18.0.0', '19.0.0', '20.0.0', - '21.0.0' + '21.2.0' ]; } From d916c27297979a0006e83637df647151d5235ffb Mon Sep 17 00:00:00 2001 From: Siim Kallas Date: Thu, 16 Nov 2023 10:58:33 +0200 Subject: [PATCH 3/7] use python 3.11 for CI --- .github/workflows/ci.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 78c7084f..96ba379a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,6 +42,9 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: '3.11' - uses: actions/setup-node@v3 with: node-version: '16' @@ -61,6 +64,9 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: '3.11' - uses: actions/setup-node@v3 with: node-version: '16' @@ -95,6 +101,9 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: '3.11' - uses: actions/setup-node@v3 with: node-version: ${{ matrix.nodejs }} From b4f953a4674839aa576beb6a59ab74efbd484380 Mon Sep 17 00:00:00 2001 From: Siim Kallas Date: Thu, 16 Nov 2023 10:58:48 +0200 Subject: [PATCH 4/7] update node-abi --- package-lock.json | 12 ++++++------ package.json | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7720ba51..31c20840 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7076,9 +7076,9 @@ } }, "node_modules/node-abi": { - "version": "3.45.0", - "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.45.0.tgz", - "integrity": "sha512-iwXuFrMAcFVi/ZoZiqq8BzAdsLw9kxDfTC0HMyjXfSL/6CSDAGD5UmR7azrAgWV1zKYq7dUUMj4owusBWKLsiQ==", + "version": "3.51.0", + "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.51.0.tgz", + "integrity": "sha512-SQkEP4hmNWjlniS5zdnfIXTk1x7Ome85RDzHlTbBtzE97Gfwz/Ipw4v/Ryk20DWIy3yCNVLVlGKApCnmvYoJbA==", "dev": true, "dependencies": { "semver": "^7.3.5" @@ -15591,9 +15591,9 @@ } }, "node-abi": { - "version": "3.45.0", - "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.45.0.tgz", - "integrity": "sha512-iwXuFrMAcFVi/ZoZiqq8BzAdsLw9kxDfTC0HMyjXfSL/6CSDAGD5UmR7azrAgWV1zKYq7dUUMj4owusBWKLsiQ==", + "version": "3.51.0", + "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.51.0.tgz", + "integrity": "sha512-SQkEP4hmNWjlniS5zdnfIXTk1x7Ome85RDzHlTbBtzE97Gfwz/Ipw4v/Ryk20DWIy3yCNVLVlGKApCnmvYoJbA==", "dev": true, "requires": { "semver": "^7.3.5" diff --git a/package.json b/package.json index 731fbcd4..f171ed00 100644 --- a/package.json +++ b/package.json @@ -80,10 +80,10 @@ "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^4.2.1", "gts": "^5.0.0", - "kafkajs": "^2.2.4", + "kafkajs": "^2.2.4", "mocha": "^10.2.0", "mysql2": "^2.2.5", - "nock": "^13.3.1", + "nock": "^13.3.1", "nyc": "15.1.0", "octokit": "^2.0.14", "pg": "^8.4.2", From 5f7a75dc235f87b1c8f1c4c03509db9ee6bc8984 Mon Sep 17 00:00:00 2001 From: Siim Kallas Date: Thu, 16 Nov 2023 11:08:04 +0200 Subject: [PATCH 5/7] use another python version for macos prebuilds --- .github/workflows/ci.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 96ba379a..dd1ef499 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,13 +38,16 @@ jobs: matrix: os: [windows-2019, macos-11] node_api_target: ['14.0.0', '15.0.0', '16.0.0', '17.0.1', '18.0.0', '20.0.0', '21.2.0'] + include: + - os: macos-11 + python_version: '3.11' runs-on: ${{ matrix.os }} steps: - name: Checkout uses: actions/checkout@v3 - uses: actions/setup-python@v4 with: - python-version: '3.11' + python-version: ${{ matrix.python_version }} - uses: actions/setup-node@v3 with: node-version: '16' From 58ff63b3cab17789ae0e016586066e4704c093ee Mon Sep 17 00:00:00 2001 From: Siim Kallas Date: Thu, 16 Nov 2023 11:16:25 +0200 Subject: [PATCH 6/7] use python 3.11 on macos for unit tests --- .github/workflows/ci.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dd1ef499..531fdd5c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -101,12 +101,15 @@ jobs: matrix: os: ['ubuntu-latest', 'windows-2019', 'macos-latest'] nodejs: ['14', '16', '17', '18', '20', '21'] + include: + - os: 'macos-latest' + python_version: '3.11' steps: - name: Checkout uses: actions/checkout@v3 - uses: actions/setup-python@v4 with: - python-version: '3.11' + python-version: ${{ matrix.python_version }} - uses: actions/setup-node@v3 with: node-version: ${{ matrix.nodejs }} From 615c541682e92f8bc7a770ad6a6efed05bd78d97 Mon Sep 17 00:00:00 2001 From: Siim Kallas Date: Thu, 16 Nov 2023 11:24:56 +0200 Subject: [PATCH 7/7] more better macos pythons --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 531fdd5c..ef7bfe98 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -104,6 +104,9 @@ jobs: include: - os: 'macos-latest' python_version: '3.11' + - os: 'macos-latest' + nodejs: '14' + python_version: '3.10' steps: - name: Checkout uses: actions/checkout@v3