From abe2886a9e8f768740d02e1a4cf5da03f805587e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 14 Oct 2026 08:33:45 +0000 Subject: [PATCH 1/4] build(deps-dev): bump nock from 14.0.17 to 15.0.1 Bumps [nock](https://github.com/nock/nock) from 14.0.17 to 15.0.1. - [Release notes](https://github.com/nock/nock/releases) - [Changelog](https://github.com/nock/nock/blob/main/CHANGELOG.md) - [Commits](https://github.com/nock/nock/compare/v14.0.17...v15.0.1) --- updated-dependencies: - dependency-name: nock dependency-version: 15.0.1 dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- package-lock.json | 76 ++++++++++++++--------------------------------- package.json | 2 +- 2 files changed, 24 insertions(+), 54 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6dc4298bb..7b39c8231 100644 --- a/package-lock.json +++ b/package-lock.json @@ -30,7 +30,7 @@ "globals": "17.13.0", "jest": "30.5.2", "jest-junit": "17.0.0", - "nock": "14.0.17", + "nock": "15.0.1", "prettier": "3.9.9", "sinon": "22.1.0", "ts-jest": "29.4.14", @@ -2567,20 +2567,20 @@ } }, "node_modules/@mswjs/interceptors": { - "version": "0.41.9", - "integrity": "sha512-VVPPgHyQ6ShqnrmDWuxjmUIsO9gWyOZFmuOfLd9LfBGQJwZfy0gvv9pbHSJuoFNIYC7ZDX9aoFwowjcdSC4E8w==", + "version": "0.44.0", + "integrity": "sha512-IYHevRStF4ijM20GI9c9Ndhw483NSAjCydQhUr4/zIB0BNLsTVw3vFAxTo6TlvX4QnV60wEHttUa9539TTAq+A==", "dev": true, "license": "MIT", "dependencies": { - "@open-draft/deferred-promise": "^2.2.0", - "@open-draft/logger": "^0.3.0", - "@open-draft/until": "^2.0.0", + "@open-draft/until": "^3.0.1", + "@types/debug": "^4.1.13", + "debug": "^4.4.3", "is-node-process": "^1.2.0", "outvariant": "^1.4.3", - "strict-event-emitter": "^0.5.1" + "rettime": "^0.11.11" }, "engines": { - "node": ">=18" + "node": ">=22" } }, "node_modules/@napi-rs/wasm-runtime": { @@ -2604,28 +2604,15 @@ "@emnapi/runtime": "^1.7.1 || ^2.0.0-alpha.4" } }, - "node_modules/@open-draft/deferred-promise": { - "version": "2.2.0", - "integrity": "sha512-CecwLWx3rhxVQF6V4bAgPS5t+So2sTbPgAzafKkVizyi7tlwpcFpdFqq+wqF2OwNBmqFuu6tOyouTuxgpMfzmA==", - "dev": true, - "license": "MIT" - }, - "node_modules/@open-draft/logger": { - "version": "0.3.0", - "integrity": "sha512-X2g45fzhxH238HKO4xbSr7+wBS8Fvw6ixhTDuvLd5mqh6bJJCFAPwU9mPDxbcrRtfxv4u5IHCEH77BmxvXmmxQ==", + "node_modules/@open-draft/until": { + "version": "3.0.1", + "integrity": "sha512-s7/9ELP4aP9YZtW7RJaa0Xf3RISaRH9+EFN18FtykJYRHGNrl8f9ymvoNXzjhrjmftFvkQudtuDU9RYhk0xs3A==", "dev": true, "license": "MIT", - "dependencies": { - "is-node-process": "^1.2.0", - "outvariant": "^1.4.0" + "funding": { + "url": "https://github.com/sponsors/kettanaito" } }, - "node_modules/@open-draft/until": { - "version": "2.1.0", - "integrity": "sha512-U69T3ItWHvLwGg5eJ0n3I62nWuE6ilHlmz7zM0npLBRvPRd7e6NYmg54vvRtP5mZG7kZqZCFVdsTWo7BPtBujg==", - "dev": true, - "license": "MIT" - }, "node_modules/@parcel/watcher": { "version": "2.6.0", "integrity": "sha512-7FNeNl8NCE7aINx7WXiKQrPYZWC/hvrTsmk6zmxbI7LTXE7hVek/n8AfVgpe2y82zl3w0HvCHN0bVKMBoJcC0w==", @@ -9253,12 +9240,6 @@ "dev": true, "license": "MIT" }, - "node_modules/json-stringify-safe": { - "version": "5.0.1", - "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", - "dev": true, - "license": "ISC" - }, "node_modules/json5": { "version": "2.2.3", "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", @@ -9661,17 +9642,15 @@ "license": "MIT" }, "node_modules/nock": { - "version": "14.0.17", - "integrity": "sha512-EjRr1weMa4ALQX35AgZTEnP+weJJjlW1KGDiNM2IQC2069YDHas4f4B4UUYR+TTLyKWxJvOz2wObDKQs/LNreA==", + "version": "15.0.1", + "integrity": "sha512-Mjx5Xl4t9vP13eUZPWqwwpjjXNjvhUTo1qTdryVM3+7t6Z2w6WHZ9GVZk/zQ8Ym1vbmloWaglye3cloyHAJ8FA==", "dev": true, "license": "MIT", "dependencies": { - "@mswjs/interceptors": "^0.41.0", - "json-stringify-safe": "^5.0.1", - "propagate": "^2.0.0" + "@mswjs/interceptors": "^0.44.0" }, "engines": { - "node": ">=18.20.0 <20 || >=20.12.1" + "node": ">=20.12.1" } }, "node_modules/node-addon-api": { @@ -10213,15 +10192,6 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/propagate": { - "version": "2.0.1", - "integrity": "sha512-vGrhOavPSTz4QVNuBNdcNXePNdNMaO1xj9yBeH1ScQPjk/rhg9sSlCXPhMkFuaNNW/syTvYqsnbIJxMBfRbbag==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, "node_modules/proxy-from-env": { "version": "2.1.0", "integrity": "sha512-cJ+oHTW1VAEa8cJslgmUZrc+sjRKgAKl3Zyse6+PV38hZe/V6Z14TbCuXcan9F9ghlz4QrFr2c92TNF82UkYHA==", @@ -10411,6 +10381,12 @@ "axios": "*" } }, + "node_modules/rettime": { + "version": "0.11.12", + "integrity": "sha512-5ExtR1ppiDBQkVoPw5NAqdbfH4Iq2VOmQKHMtUoaFxA9bo2krzFYBtyq6K40xxbYp+2w/YOr6D+1ToF6tTN53A==", + "dev": true, + "license": "MIT" + }, "node_modules/safe-array-concat": { "version": "1.1.4", "integrity": "sha512-wtZlHyOje6OZTGqAoaDKxFkgRtkF9CnHAVnCHKfuj200wAgL+bSJhdsCD2l0Qx/2ekEXjPWcyKkfGb5CPboslg==", @@ -10740,12 +10716,6 @@ "node": ">= 0.4" } }, - "node_modules/strict-event-emitter": { - "version": "0.5.1", - "integrity": "sha512-vMgjE/GGEPEFnhFub6pa4FmJBRBVOLpIII2hvCZ8Kzb7K0hlHo7mQv6xYrBvCL2LtAIBwFUK8wvuJgTVSQ5MFQ==", - "dev": true, - "license": "MIT" - }, "node_modules/string-length": { "version": "4.0.2", "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", diff --git a/package.json b/package.json index f301743e9..c8b81c8ab 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,7 @@ "globals": "17.13.0", "jest": "30.5.2", "jest-junit": "17.0.0", - "nock": "14.0.17", + "nock": "15.0.1", "prettier": "3.9.9", "sinon": "22.1.0", "ts-jest": "29.4.14", From 3a3ca3686c10005a795119dc144a2a265b2eb6aa Mon Sep 17 00:00:00 2001 From: Rich Ellis Date: Wed, 14 Oct 2026 09:36:07 +0100 Subject: [PATCH 2/4] test: fix require ESM for nock 15 --- test/unit/errorResponseInterceptor.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/unit/errorResponseInterceptor.test.js b/test/unit/errorResponseInterceptor.test.js index 01624ff2f..c3427a12a 100644 --- a/test/unit/errorResponseInterceptor.test.js +++ b/test/unit/errorResponseInterceptor.test.js @@ -15,7 +15,7 @@ */ const assert = require('assert'); -const nock = require('nock'); +const { default: nock } = require('nock'); const { getClient } = require('./features/testDataProviders.js'); const { errorResponseInterceptor, From e5ea293d47796dd2f1db407d86137ac1c4068ef7 Mon Sep 17 00:00:00 2001 From: Rich Ellis Date: Wed, 14 Oct 2026 12:50:01 +0100 Subject: [PATCH 3/4] ci: update test scripts for jest ESM require Jest needs --experimental-vm-modules to be able to do ESM require since it doesn't use Node's own package loader --- package.json | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index c8b81c8ab..0a60ebe3a 100644 --- a/package.json +++ b/package.json @@ -26,13 +26,11 @@ "postbuild": "npm run copymeta", "version": "bump-my-version bump patch --allow-dirty --new-version $npm_package_version && git add README.md .bumpversion.toml docs/*.md", "postversion": "npm run copymeta", - "jest": "jest --runInBand", - "test": "npm run build && npm run lint && jest --runInBand test/", - "test-unit": "npm run build && jest --runInBand test/unit/", - "test-integration": "npm run build && jest --runInBand test/integration", - "test-ci": "jest --runInBand --testNamePattern='^((?!@slow).)*$' test/", - "test-unit-ci": "jest --runInBand test/unit/", - "test-integration-ci": "jest --runInBand --no-colors --testNamePattern='^((?!@slow).)*$' --json test/integration > test-output.log", + "jest": "NODE_OPTIONS=--experimental-vm-modules jest --runInBand", + "test": "npm run build && npm run lint && npm run jest --", + "test-unit": "npm test -- test/unit/", + "test-integration": "npm test -- test/integration", + "test-ci": "npm test -- --testNamePattern='^((?!@slow).)*$' test/", "typedoc": "typedoc" }, "license": "Apache-2.0", From 3caadd4ea55e8e8c470f5f3863269e1a1d79f9a6 Mon Sep 17 00:00:00 2001 From: Rich Ellis Date: Wed, 14 Oct 2026 13:58:20 +0100 Subject: [PATCH 4/4] test: disable nock based tests for Node 22 The Jest require ESM support only works on Node 24+. Since Nock 15 is ESM only the errorReeponseInterceptor tests will not trivially work with Nock 15 and Node 22. Since Node 22 is EOL in Apr 27 we can skip the tests in this version combination and just keep testing on 24/26. --- jest.config.js | 36 ++++++++++++++++++++++++++++++++++++ package.json | 10 ---------- 2 files changed, 36 insertions(+), 10 deletions(-) create mode 100644 jest.config.js diff --git a/jest.config.js b/jest.config.js new file mode 100644 index 000000000..a1e5d9039 --- /dev/null +++ b/jest.config.js @@ -0,0 +1,36 @@ +/** + * © Copyright IBM Corporation 2024. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +const isNode22 = process.versions.node.startsWith('22.'); + +/** @type {import('jest').Config} */ +const config = { + collectCoverage: true, + coverageDirectory: './coverage/', + coveragePathIgnorePatterns: ['/test/'], + preset: 'ts-jest', + testEnvironment: 'node', + testResultsProcessor: 'jest-junit', +}; + +if (isNode22) { + config.testPathIgnorePatterns = [ + '/node_modules/', + 'test/unit/errorResponseInterceptor.test.js', + ]; +} + +module.exports = config; diff --git a/package.json b/package.json index 0a60ebe3a..b0c49a007 100644 --- a/package.json +++ b/package.json @@ -70,16 +70,6 @@ "extend": "^3.0.2", "tough-cookie": "^6.0.0" }, - "jest": { - "collectCoverage": true, - "coverageDirectory": "./coverage/", - "coveragePathIgnorePatterns": [ - "/test/" - ], - "preset": "ts-jest", - "testEnvironment": "node", - "testResultsProcessor": "jest-junit" - }, "jest-junit": { "suiteName": "Generated unit tests", "outputDirectory": "./junitreports/",