From e6d805b886a04aea70c2033a82b44179292e83a6 Mon Sep 17 00:00:00 2001 From: robertsLando Date: Mon, 28 Sep 2026 16:15:01 +0200 Subject: [PATCH] test: pin node-opcua to 2.181.0 in test-80 node-opcua 2.184.0 ships ESM and uses import.meta.dirname. The test's esbuild CJS bundle turns that into undefined, so node-opcua-nodesets calls path.join(undefined) at startup and test_host fails on every PR. --- test/test-80-compression-node-opcua/main.js | 4 ++++ test/test-80-compression-node-opcua/package.json | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/test/test-80-compression-node-opcua/main.js b/test/test-80-compression-node-opcua/main.js index 304beea70..7d2d7f1ae 100644 --- a/test/test-80-compression-node-opcua/main.js +++ b/test/test-80-compression-node-opcua/main.js @@ -6,6 +6,10 @@ * A test with a large number of modules with symlinks * (installed with npm) and compress * + * node-opcua is pinned to 2.181.0 in package.json: 2.184.0 made the packages + * ESM ("type": "module", import.meta.dirname), which esbuild's CJS bundle + * resolves to undefined — node-opcua-nodesets then calls path.join(undefined). + * Unpin only together with an esbuild config that emits ESM. */ const fs = require('fs'); diff --git a/test/test-80-compression-node-opcua/package.json b/test/test-80-compression-node-opcua/package.json index 6a60ac5fb..463968bb4 100644 --- a/test/test-80-compression-node-opcua/package.json +++ b/test/test-80-compression-node-opcua/package.json @@ -12,9 +12,9 @@ "author": "", "license": "ISC", "dependencies": { - "node-opcua-address-space": "^2.36.0", + "node-opcua-address-space": "2.181.0", "node-opcua-crypto": "^1.7.1", - "node-opcua-nodesets": "^2.36.0" + "node-opcua-nodesets": "2.181.0" }, "devDependencies": { "esbuild": "^0.20.0"