From dbc0e02c6ffa9e97c6ab5c4df87294457e0a2f2e Mon Sep 17 00:00:00 2001 From: qevolg <2227465945@qq.com> Date: Tue, 6 Jan 2026 14:50:33 +0800 Subject: [PATCH 1/2] chore: add compatibility ci --- .github/workflows/compatibility.yaml | 56 ++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 .github/workflows/compatibility.yaml diff --git a/.github/workflows/compatibility.yaml b/.github/workflows/compatibility.yaml new file mode 100644 index 00000000..ee4cd02f --- /dev/null +++ b/.github/workflows/compatibility.yaml @@ -0,0 +1,56 @@ +name: nodejs Compatibility + +on: + push: + branches: + - "main" + - "3.0" + pull_request: + branches: + - "main" + - "3.0" + +jobs: + build: + runs-on: ubuntu-22.04 + strategy: + matrix: + node-version: [16.x, 20.x] + steps: + - name: Get TDengine + run: wget https://github.com/taosdata/TDengine/releases/download/ver-3.3.6.0/TDengine-server-3.3.6.0-Linux-x64.tar.gz + + - name: Install TDengine + run: | + tar -zxf TDengine-server-3.3.6.0-Linux-x64.tar.gz + rm -rf TDengine-server-3.3.6.0-Linux-x64.tar.gz + cd TDengine-server-3.3.6.0 + sudo ./install.sh -e no + + - name: Start TDengine + run: | + nohup sudo taosd & + nohup sudo taosadapter & + + - name: Checkout + uses: actions/checkout@v4 + with: + path: "nodejs-connector" + clean: true + set-safe-directory: true + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + + - name: Run tests + working-directory: nodejs-connector/nodejs + env: + TDENGINE_CLOUD_URL: ${{ secrets.TDENGINE_CLOUD_URL }} + TDENGINE_CLOUD_TOKEN: ${{ secrets.TDENGINE_CLOUD_TOKEN }} + run: | + npm install + npm list + npm run example + npm run test From 2486f91f94730c594114d9d109491230ad3645ba Mon Sep 17 00:00:00 2001 From: qevolg <2227465945@qq.com> Date: Tue, 6 Jan 2026 16:11:25 +0800 Subject: [PATCH 2/2] fix: update error code expectation in Tmq() test --- nodejs/test/bulkPulling/tmq.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nodejs/test/bulkPulling/tmq.test.ts b/nodejs/test/bulkPulling/tmq.test.ts index 13397f92..4df7010b 100644 --- a/nodejs/test/bulkPulling/tmq.test.ts +++ b/nodejs/test/bulkPulling/tmq.test.ts @@ -298,7 +298,7 @@ describe("TDWebSocket.Tmq()", () => { await consumer.subscribe(topics); } catch (e: any) { console.log(e); - expect(e.code).toBe(280); + expect([280, 65535]).toContain(e.code); } finally { if (consumer) { await consumer.close();