From 5281d89e4da2cc4fa3720d5ed460b4f6b532c929 Mon Sep 17 00:00:00 2001 From: Antoine Berger <64917674+antoine-berger@users.noreply.github.com> Date: Wed, 11 Nov 2026 00:03:14 +0000 Subject: [PATCH 1/8] fix(deps): move the axios example to axios 1.21 [SAP-4717] examples/axios declared axios ^1.7.9 and locked 1.13.2, which the open Dependabot alerts on examples/axios/package-lock.json flag up to a first patched 1.20.0. The example now declares ^1.21.0 and locks axios 1.21.0. The lockfile was regenerated from main with `npm install --package-lock-only --before=2026-11-08` (3-day release-age floor). Besides axios it moves: - follow-redirects 1.15.11 -> 1.16.2 (alert 100, patched 1.16.0) - form-data 4.0.5 -> 4.0.6 (alert 182, patched 4.0.6) - proxy-from-env 1.1.0 -> 2.1.0 and new https-proxy-agent 5.0.1, agent-base 6.0.2, debug 4.4.3, ms 2.1.3: axios 1.20+ dependencies - hasown 2.0.2 -> 2.0.4: form-data 4.0.6 requires ^2.0.4 - es-object-atoms 1.1.1 -> 1.1.2: re-resolved by npm 10.9.9 and 11.19.1 alike, no range requires it Co-Authored-By: Claude Opus 5.5 --- examples/axios/package-lock.json | 103 +++++++++++++++++++++++-------- examples/axios/package.json | 2 +- 2 files changed, 78 insertions(+), 27 deletions(-) diff --git a/examples/axios/package-lock.json b/examples/axios/package-lock.json index dbeb90fff..68238e80c 100644 --- a/examples/axios/package-lock.json +++ b/examples/axios/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "dependencies": { "@sapiom/axios": "latest", - "axios": "^1.7.9", + "axios": "^1.21.0", "dotenv": "^16.4.5" }, "devDependencies": { @@ -494,6 +494,18 @@ "undici-types": "~6.21.0" } }, + "node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "license": "MIT", + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", @@ -501,15 +513,15 @@ "license": "MIT" }, "node_modules/axios": { - "version": "1.13.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.13.2.tgz", - "integrity": "sha512-VPk9ebNqPcy5lRGuSlKx752IlDatOjT9paPlm8A7yOuW2Fbvp4X3JznJtT4f0GzGLLiWE9W8onz51SqLYwzGaA==", + "version": "1.21.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.21.0.tgz", + "integrity": "sha512-YCzXMB53Q9PZBsh7yN7wtapit4WepwcHS2fP8QhGsBxSz5YtgYobV7GGlWlAJi+RxfU77GQTQi2DSLUma42EYA==", "license": "MIT", - "peer": true, "dependencies": { - "follow-redirects": "^1.15.6", - "form-data": "^4.0.4", - "proxy-from-env": "^1.1.0" + "follow-redirects": "^1.16.0", + "form-data": "^4.0.6", + "https-proxy-agent": "^5.0.1", + "proxy-from-env": "^2.1.0" } }, "node_modules/call-bind-apply-helpers": { @@ -537,6 +549,23 @@ "node": ">= 0.8" } }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, "node_modules/delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -591,9 +620,9 @@ } }, "node_modules/es-object-atoms": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", - "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.2.tgz", + "integrity": "sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==", "license": "MIT", "dependencies": { "es-errors": "^1.3.0" @@ -660,9 +689,9 @@ } }, "node_modules/follow-redirects": { - "version": "1.15.11", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.11.tgz", - "integrity": "sha512-deG2P0JfjrTxl50XGCDyfI97ZGVCxIpfKYmfyrQ54n5FO/0gfIES8C/Psl6kWVDolizcaaxZJnTS0QSMxvnsBQ==", + "version": "1.16.2", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.16.2.tgz", + "integrity": "sha512-/kVP2U8z596Ia0gwFrwyIeo74ta5aVmSeU1FfAUMAmcEP5EP7zydmag3SLiN64NaRKef3lxsq7i/g7ltJQDGow==", "funding": [ { "type": "individual", @@ -680,16 +709,16 @@ } }, "node_modules/form-data": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.5.tgz", - "integrity": "sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w==", + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.6.tgz", + "integrity": "sha512-vKatAh4SlVfgbv+YtmhiRjhEMJsYpsG1Y2rMQtR+SVSbytsSD1YGzDIcrAJmdFec88u/+VoGmxnl+80gL1tRCQ==", "license": "MIT", "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", "es-set-tostringtag": "^2.1.0", - "hasown": "^2.0.2", - "mime-types": "^2.1.12" + "hasown": "^2.0.4", + "mime-types": "^2.1.35" }, "engines": { "node": ">= 6" @@ -809,9 +838,9 @@ } }, "node_modules/hasown": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", - "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.4.tgz", + "integrity": "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==", "license": "MIT", "dependencies": { "function-bind": "^1.1.2" @@ -820,6 +849,19 @@ "node": ">= 0.4" } }, + "node_modules/https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "license": "MIT", + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/math-intrinsics": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", @@ -850,12 +892,21 @@ "node": ">= 0.6" } }, - "node_modules/proxy-from-env": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", - "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "license": "MIT" }, + "node_modules/proxy-from-env": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-2.1.0.tgz", + "integrity": "sha512-cJ+oHTW1VAEa8cJslgmUZrc+sjRKgAKl3Zyse6+PV38hZe/V6Z14TbCuXcan9F9ghlz4QrFr2c92TNF82UkYHA==", + "license": "MIT", + "engines": { + "node": ">=10" + } + }, "node_modules/resolve-pkg-maps": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", diff --git a/examples/axios/package.json b/examples/axios/package.json index b3fc7faaa..9ee950043 100644 --- a/examples/axios/package.json +++ b/examples/axios/package.json @@ -10,7 +10,7 @@ }, "dependencies": { "@sapiom/axios": "latest", - "axios": "^1.7.9", + "axios": "^1.21.0", "dotenv": "^16.4.5" }, "devDependencies": { From c32ba5d6181fb1231360bbea115c692b80036b00 Mon Sep 17 00:00:00 2001 From: Antoine Berger <64917674+antoine-berger@users.noreply.github.com> Date: Wed, 11 Nov 2026 00:06:03 +0000 Subject: [PATCH 2/8] fix(deps): move news-roundup and support-desk to vitest 4.1.12 [SAP-4717] vitest below 4.1.11 and @vitest/mocker below 4.1.12 carry GHSA-82fw-gwwq-j7x9 and GHSA-qxg6-89mg-rqv8 (Dependabot alerts 333, 334 and 447 on news-roundup, 419 on support-desk). Both examples now declare vitest ^4.1.12, the first release patched against both. news-roundup was on ^4.1.10; support-desk was on ^3.2.4, and no 3.x release is patched. vitest 4.1.12 supports Node ^20.0.0 || ^22.0.0 || >=24.0.0 and accepts @types/node ^20, so @types/node stays at ^20.11.30. news-roundup's lockfile moves only vitest and its seven @vitest/* packages, 4.1.10 -> 4.1.12. It was regenerated from main with every other package held at its main version through temporary npm overrides, which were then removed; a plain `npm install` leaves the result unchanged. support-desk commits no lockfile. Co-Authored-By: Claude Opus 5.5 --- examples/news-roundup/package-lock.json | 90 ++++++++++++------------- examples/news-roundup/package.json | 2 +- examples/support-desk/package.json | 2 +- 3 files changed, 47 insertions(+), 47 deletions(-) diff --git a/examples/news-roundup/package-lock.json b/examples/news-roundup/package-lock.json index 1b32ceee6..3059ad267 100644 --- a/examples/news-roundup/package-lock.json +++ b/examples/news-roundup/package-lock.json @@ -16,7 +16,7 @@ "@types/node": "^20.11.30", "prettier": "^3.2.5", "typescript": "^5.4.2", - "vitest": "^4.1.10" + "vitest": "^4.1.12" } }, "node_modules/@emnapi/core": { @@ -461,16 +461,16 @@ } }, "node_modules/@vitest/expect": { - "version": "4.1.10", - "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-4.1.10.tgz", - "integrity": "sha512-YsCn+qAk1GWjQOWFEsEcL2gNQ0zmVmQu3T03qP6UyjhtmdtwtbuI+DASn/7iQB3HGTXkdBwGddzxPlmiql5vlA==", + "version": "4.1.12", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-4.1.12.tgz", + "integrity": "sha512-vFlTt+YEu9WBpNjdGayNmlMVzrWPi1+sv853/7t2FU7hpO5gAFBKHzQmkCq5Xjpr+evegF2994LQT3hF3mRlqQ==", "dev": true, "license": "MIT", "dependencies": { "@standard-schema/spec": "^1.1.0", "@types/chai": "^5.2.2", - "@vitest/spy": "4.1.10", - "@vitest/utils": "4.1.10", + "@vitest/spy": "4.1.12", + "@vitest/utils": "4.1.12", "chai": "^6.2.2", "tinyrainbow": "^3.1.0" }, @@ -479,13 +479,13 @@ } }, "node_modules/@vitest/mocker": { - "version": "4.1.10", - "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-4.1.10.tgz", - "integrity": "sha512-v0xaezt+DKEmKfaxg133ldzADrwLGd7Ze1MfQQTYfvs8OqZIwbxyxaYURivwV7sWy5fqn3rH5uOrSp07bp44Ow==", + "version": "4.1.12", + "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-4.1.12.tgz", + "integrity": "sha512-fKShNpKZzupWZuY0z7egydvL0sqW4INEZBEExMBMAa6izlENEVHwoXgdaTCaBZ5fwlr4xf2o1wXC83n9RpO+NA==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/spy": "4.1.10", + "@vitest/spy": "4.1.12", "estree-walker": "^3.0.3", "magic-string": "^0.30.21" }, @@ -506,9 +506,9 @@ } }, "node_modules/@vitest/pretty-format": { - "version": "4.1.10", - "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-4.1.10.tgz", - "integrity": "sha512-W1HsjSH4MXQ9YfmmhLAoIYf1HRfekQCGngeIgcei6MP5QQGWUe0gkopdZQaVCFO+JDJMrAJGwa5pRpNpvy4P8Q==", + "version": "4.1.12", + "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-4.1.12.tgz", + "integrity": "sha512-XW9O8+Mxx4VpCtkYdMJLZQQwsVryP9wk7cPKDxtXFfwSak6yRh5+2fep/Y0XF/ElBvJHq8bcYdi6aeuai0opZA==", "dev": true, "license": "MIT", "dependencies": { @@ -519,13 +519,13 @@ } }, "node_modules/@vitest/runner": { - "version": "4.1.10", - "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-4.1.10.tgz", - "integrity": "sha512-IKI6kpIH+LmpROplyLwBBaCfMgOZOMsygVa6BARD6ahA04VRuJSa6OaVG7kRvSEMD870Vd91rSSw0eegtWyLGg==", + "version": "4.1.12", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-4.1.12.tgz", + "integrity": "sha512-NKlVKCr5QnCe8jijdMnmkpHHU+WTqiLFR6G0pHji9uRjXK9xJl1k1nTw6F3pOOj2PDcsDt2GKQMI7wIsaT491w==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/utils": "4.1.10", + "@vitest/utils": "4.1.12", "pathe": "^2.0.3" }, "funding": { @@ -533,14 +533,14 @@ } }, "node_modules/@vitest/snapshot": { - "version": "4.1.10", - "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-4.1.10.tgz", - "integrity": "sha512-xRkfOT1qpTAi/Ti4Y1LtfRc3kEuqxGw59eN2jN9pRWMtS/XDevekhcFSqvQqjUNGksfjMJu3Y+oJ+4Ypn2OaJw==", + "version": "4.1.12", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-4.1.12.tgz", + "integrity": "sha512-ko1y1Qgb/slzQ9mr+b89Cuqud8WG1TKtsPD8r7ZUBdvVOGt85Af2HwCqHujrhwJq95hs/9RM7fcAPg57o1vlzw==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/pretty-format": "4.1.10", - "@vitest/utils": "4.1.10", + "@vitest/pretty-format": "4.1.12", + "@vitest/utils": "4.1.12", "magic-string": "^0.30.21", "pathe": "^2.0.3" }, @@ -549,9 +549,9 @@ } }, "node_modules/@vitest/spy": { - "version": "4.1.10", - "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-4.1.10.tgz", - "integrity": "sha512-PLf/Ugvoq5wO/b4rwYCR1h2PSIdXz7wnkQFMiUpLdtM7l6pqVFcQIBEHyT1+l+cj7mNwAfZHzqXqDyjvOuwbDw==", + "version": "4.1.12", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-4.1.12.tgz", + "integrity": "sha512-RGq9x4JNGNTZHEJxvN0oSiJjeSCExm0n2gZKKJZHY9cX5AVA6M7VJILBT3ZJ/tJ/0J9uWT7fETV9/btoi//vSg==", "dev": true, "license": "MIT", "funding": { @@ -559,13 +559,13 @@ } }, "node_modules/@vitest/utils": { - "version": "4.1.10", - "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-4.1.10.tgz", - "integrity": "sha512-fy9am/HWxbaGt/Sawrp90vt6Y6jQwf1RX77cz3uwoJwJVMli/e1IEwRPnMNJ7vKfPTwo0diXifkpPvwH9v7nGA==", + "version": "4.1.12", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-4.1.12.tgz", + "integrity": "sha512-Q3awXrwOfEV+qc3WmO5ONyE0yO7Q1gQ9/oyHxGLZ/pl7N3NO/ZztqQwKLuwMkV+CA1JYSIeO3gkHnRDIo4AVaA==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/pretty-format": "4.1.10", + "@vitest/pretty-format": "4.1.12", "convert-source-map": "^2.0.0", "tinyrainbow": "^3.1.0" }, @@ -1275,19 +1275,19 @@ } }, "node_modules/vitest": { - "version": "4.1.10", - "resolved": "https://registry.npmjs.org/vitest/-/vitest-4.1.10.tgz", - "integrity": "sha512-R9jUTe5S4Qb0HCd4TNqpC7oGcrMssMRGXLW80ubjWsW9VH5GF8y1Y0SFLY9AbqSk6nt0PnOx4H4WNJYZ13GUPw==", + "version": "4.1.12", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-4.1.12.tgz", + "integrity": "sha512-5eWdz2yb3ajxWF3C8C4TjkXl7FGm3n2E/VlazALrQHzK7nYMSGFnCZto0bbPNl77AwkOZVLk0YnBAejUu0NiWA==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/expect": "4.1.10", - "@vitest/mocker": "4.1.10", - "@vitest/pretty-format": "4.1.10", - "@vitest/runner": "4.1.10", - "@vitest/snapshot": "4.1.10", - "@vitest/spy": "4.1.10", - "@vitest/utils": "4.1.10", + "@vitest/expect": "4.1.12", + "@vitest/mocker": "4.1.12", + "@vitest/pretty-format": "4.1.12", + "@vitest/runner": "4.1.12", + "@vitest/snapshot": "4.1.12", + "@vitest/spy": "4.1.12", + "@vitest/utils": "4.1.12", "es-module-lexer": "^2.0.0", "expect-type": "^1.3.0", "magic-string": "^0.30.21", @@ -1315,12 +1315,12 @@ "@edge-runtime/vm": "*", "@opentelemetry/api": "^1.9.0", "@types/node": "^20.0.0 || ^22.0.0 || >=24.0.0", - "@vitest/browser-playwright": "4.1.10", - "@vitest/browser-preview": "4.1.10", - "@vitest/browser-webdriverio": "4.1.10", - "@vitest/coverage-istanbul": "4.1.10", - "@vitest/coverage-v8": "4.1.10", - "@vitest/ui": "4.1.10", + "@vitest/browser-playwright": "4.1.12", + "@vitest/browser-preview": "4.1.12", + "@vitest/browser-webdriverio": "^4.1.11", + "@vitest/coverage-istanbul": "4.1.12", + "@vitest/coverage-v8": "4.1.12", + "@vitest/ui": "4.1.12", "happy-dom": "*", "jsdom": "*", "vite": "^6.0.0 || ^7.0.0 || ^8.0.0" diff --git a/examples/news-roundup/package.json b/examples/news-roundup/package.json index 4a017ab34..98f0d0291 100644 --- a/examples/news-roundup/package.json +++ b/examples/news-roundup/package.json @@ -18,6 +18,6 @@ "@types/node": "^20.11.30", "prettier": "^3.2.5", "typescript": "^5.4.2", - "vitest": "^4.1.10" + "vitest": "^4.1.12" } } diff --git a/examples/support-desk/package.json b/examples/support-desk/package.json index e7c844c7a..10795d60f 100644 --- a/examples/support-desk/package.json +++ b/examples/support-desk/package.json @@ -28,6 +28,6 @@ "esbuild": "^0.28.2", "tsx": "^4.19.0", "typescript": "^5.4.2", - "vitest": "^3.2.4" + "vitest": "^4.1.12" } } From 6c63cc3ed5bf38bd4e67950c0025e2606f3a6763 Mon Sep 17 00:00:00 2001 From: Antoine Berger <64917674+antoine-berger@users.noreply.github.com> Date: Wed, 11 Nov 2026 00:23:42 +0000 Subject: [PATCH 3/8] fix(deps): hold support-desk's vitest peer chain on vitest 4 [SAP-4717] support-desk commits no lockfile, so every install resolves its ranges fresh. With vitest ^4.1.12, npm picks vite 8.3, whose optional peer @vitejs/devtools reaches @vitejs/devtools-vitest 0.8.1+ (published 2026-11-04), which peers vitest@*. npm then loads vitest 5.1.0 into that peer set next to the root vitest 4.1.12, and npm 10.9.9 (the npm in Node 22.23.4, which the examples CI job uses) crashes with "Cannot read properties of null (reading 'edgesOut')". npm 10.8.2 and 11.19.1 install the same manifest. An override that repeats the devDependency range keeps every vitest edge, peers included, on vitest 4, and npm 10.9.9, 10.8.2 and 11.19.1 all install it. npm rejects an override that differs from a direct dependency's range (EOVERRIDE), so the two cannot drift apart silently. The `$vitest` reference form fails on npm 10.8.2 ("Unable to resolve reference $vitest"). Co-Authored-By: Claude Opus 5.5 --- examples/support-desk/package.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/support-desk/package.json b/examples/support-desk/package.json index 10795d60f..1d41fd3b6 100644 --- a/examples/support-desk/package.json +++ b/examples/support-desk/package.json @@ -29,5 +29,8 @@ "tsx": "^4.19.0", "typescript": "^5.4.2", "vitest": "^4.1.12" + }, + "overrides": { + "vitest": "^4.1.12" } } From 8cb2e6fa24e032b27dbeaaf6bd4cc91a6524c527 Mon Sep 17 00:00:00 2001 From: Antoine Berger <64917674+antoine-berger@users.noreply.github.com> Date: Wed, 11 Nov 2026 00:10:17 +0000 Subject: [PATCH 4/8] fix(deps): lift vite, postcss, source-map-js and nanoid in news-roundup's lockfile [SAP-4717] news-roundup locks vite 8.1.5, postcss 8.5.22, source-map-js 1.2.1 and nanoid 3.3.16. vitest ^4.1.12 accepts any vite 8, so moving vitest alone leaves them in place and these advisories on news-roundup/package-lock.json unfixed: - vite <= 8.1.5: Dependabot alerts 433, 434, 435, 445, 446 (patched 8.1.6) - postcss <= 8.5.22: alert 266 (patched 8.5.23) - source-map-js < 1.2.2: alert 420 (patched 1.2.2) - nanoid < 3.3.18: GHSA-2v37-7h3g-55p8, high, alert 322, which GitHub auto-dismissed as a development dependency (patched 3.3.18) The lockfile now resolves each at its first patched release: vite 8.1.6 (the 8.1 backport, same dependency ranges as 8.1.5), postcss 8.5.23, source-map-js 1.2.2 and nanoid 3.3.18. No package.json change and no other package moves. Regenerated like the previous commit, with these four as the only lifts; a plain `npm install` leaves the result unchanged. Co-Authored-By: Claude Opus 5.5 --- examples/news-roundup/package-lock.json | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/examples/news-roundup/package-lock.json b/examples/news-roundup/package-lock.json index 3059ad267..07193c61a 100644 --- a/examples/news-roundup/package-lock.json +++ b/examples/news-roundup/package-lock.json @@ -954,9 +954,9 @@ } }, "node_modules/nanoid": { - "version": "3.3.16", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.16.tgz", - "integrity": "sha512-bzlKTyNJ7+LdGIIwy8ijFpIqEQIvafahV7eYykJ8Cvh42EdJeODoJ6gUJXpQJvej1BddH8OqTXZNE/KfbWAu8Q==", + "version": "3.3.18", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.18.tgz", + "integrity": "sha512-DTg4MJbGMWkfi6VZFdNt2/caMbQy4Ou+Op/hJQvGEWcnVfoA1QA+xzRKAzw9jD6+GVOOeYr/mIcuDSdug6F6+w==", "dev": true, "funding": [ { @@ -1014,9 +1014,9 @@ } }, "node_modules/postcss": { - "version": "8.5.22", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.22.tgz", - "integrity": "sha512-KBDEIpLrvpv16pp3K0Fw+UCoZfopFjjgeB+0tA/aaThfEE74kKDLrgg603YvOWJyg3+WYtyq3xYsQWsIyZlPqQ==", + "version": "8.5.23", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.23.tgz", + "integrity": "sha512-g50586zr4bZmwFiTlflMu8E0bDTb5I5gertgwAKmsdUlTQIhZtunzUlD1WSzwcVWPoAVpsrA6vlfCD7oXvRwgg==", "dev": true, "funding": [ { @@ -1100,9 +1100,9 @@ "license": "ISC" }, "node_modules/source-map-js": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", - "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.2.tgz", + "integrity": "sha512-KGj/8Y43x35aZVDtt+J4mK1hoLGHULMYfSkODJNQjNDC3oW1PqPoxMwo0pLUsWM/UEGzON/NxeHywEfNXNP3Vw==", "dev": true, "license": "BSD-3-Clause", "engines": { @@ -1197,9 +1197,9 @@ "license": "MIT" }, "node_modules/vite": { - "version": "8.1.5", - "resolved": "https://registry.npmjs.org/vite/-/vite-8.1.5.tgz", - "integrity": "sha512-7ULLwsCdYx/nRyrpiEwvqb5TFHrMVZyBt+rg/OAXT7rgj/z+DtTDyKFeLAdDkubDVDKD8jOsndmy7m55XcfUsw==", + "version": "8.1.6", + "resolved": "https://registry.npmjs.org/vite/-/vite-8.1.6.tgz", + "integrity": "sha512-aRAHIxx5SW5zc1sMqFwJU/t5qaFfXb5Hj0J7W0VXihu/X99+346tz6080tO1T1xVIJORX/b3zVTXGFqUXh35uw==", "dev": true, "license": "MIT", "dependencies": { From e8dcabc0cd16f3dc94adf129f3d1a69aa4136e31 Mon Sep 17 00:00:00 2001 From: Antoine Berger <64917674+antoine-berger@users.noreply.github.com> Date: Wed, 11 Nov 2026 00:07:15 +0000 Subject: [PATCH 5/8] fix(deps): pin langchain-classic's @langchain/openai to 0.6.17 [SAP-4717] The example declares @langchain/openai ^1.2.2 next to @langchain/core ^0.3.0, which @sapiom/langchain-classic and @langchain/anthropic 0.3 require. Every @langchain/openai 1.x peer-requires @langchain/core ^1, so any npm install that re-resolves the tree fails with ERESOLVE, and the lockfile cannot be regenerated to take the security overrides in the next commit. @sapiom/langchain-classic loads @langchain/openai at import, so it cannot be dropped. @langchain/openai 0.6.17 is the last release whose peer range (>=0.3.68 <0.4.0) accepts @langchain/core 0.3. It depends on openai 5.12.2 exactly, so the lockfile replaces openai 6.16.0 with 5.12.2. No other package moves; a plain `npm install` leaves the result unchanged. Co-Authored-By: Claude Opus 5.5 --- examples/langchain-classic/package-lock.json | 58 ++++++++++---------- examples/langchain-classic/package.json | 2 +- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/examples/langchain-classic/package-lock.json b/examples/langchain-classic/package-lock.json index ceb1fdfa9..9c1ac9de6 100644 --- a/examples/langchain-classic/package-lock.json +++ b/examples/langchain-classic/package-lock.json @@ -11,7 +11,7 @@ "@langchain/anthropic": "^0.3.0", "@langchain/core": "^0.3.0", "@langchain/langgraph": "^0.2.0", - "@langchain/openai": "^1.2.2", + "@langchain/openai": "^0.6.17", "@sapiom/langchain-classic": "latest", "dotenv": "^16.4.5", "zod": "^3.22.4" @@ -619,20 +619,41 @@ } }, "node_modules/@langchain/openai": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@langchain/openai/-/openai-1.2.2.tgz", - "integrity": "sha512-ByGtj9nJlyL2UPR7BAxtM34g8JA0qEfDKZq7ZisLW23ju+da1ZRAKogoEqoEHHSxl5fAt2LXcydsIYx0qgCDgg==", + "version": "0.6.17", + "resolved": "https://registry.npmjs.org/@langchain/openai/-/openai-0.6.17.tgz", + "integrity": "sha512-JVSzD+FL5v/2UQxKd+ikB1h4PQOtn0VlK8nqW2kPp0fshItCv4utrjBKXC/rubBnSXoRTyonBINe8QRZ6OojVQ==", "license": "MIT", "dependencies": { "js-tiktoken": "^1.0.12", - "openai": "^6.10.0", - "zod": "^3.25.76 || ^4" + "openai": "5.12.2", + "zod": "^3.25.32" }, "engines": { - "node": ">=20" + "node": ">=18" }, "peerDependencies": { - "@langchain/core": "^1.0.0" + "@langchain/core": ">=0.3.68 <0.4.0" + } + }, + "node_modules/@langchain/openai/node_modules/openai": { + "version": "5.12.2", + "resolved": "https://registry.npmjs.org/openai/-/openai-5.12.2.tgz", + "integrity": "sha512-xqzHHQch5Tws5PcKR2xsZGX9xtch+JQFz5zb14dGqlshmmDAFBFEWmeIpf7wVqWV+w7Emj7jRgkNJakyKE0tYQ==", + "license": "Apache-2.0", + "bin": { + "openai": "bin/cli" + }, + "peerDependencies": { + "ws": "^8.18.0", + "zod": "^3.23.8" + }, + "peerDependenciesMeta": { + "ws": { + "optional": true + }, + "zod": { + "optional": true + } } }, "node_modules/@sapiom/core": { @@ -979,27 +1000,6 @@ "mustache": "bin/mustache" } }, - "node_modules/openai": { - "version": "6.16.0", - "resolved": "https://registry.npmjs.org/openai/-/openai-6.16.0.tgz", - "integrity": "sha512-fZ1uBqjFUjXzbGc35fFtYKEOxd20kd9fDpFeqWtsOZWiubY8CZ1NAlXHW3iathaFvqmNtCWMIsosCuyeI7Joxg==", - "license": "Apache-2.0", - "bin": { - "openai": "bin/cli" - }, - "peerDependencies": { - "ws": "^8.18.0", - "zod": "^3.25 || ^4.0" - }, - "peerDependenciesMeta": { - "ws": { - "optional": true - }, - "zod": { - "optional": true - } - } - }, "node_modules/p-finally": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", diff --git a/examples/langchain-classic/package.json b/examples/langchain-classic/package.json index 06a7bf07f..d6890108f 100644 --- a/examples/langchain-classic/package.json +++ b/examples/langchain-classic/package.json @@ -11,7 +11,7 @@ "@langchain/anthropic": "^0.3.0", "@langchain/core": "^0.3.0", "@langchain/langgraph": "^0.2.0", - "@langchain/openai": "^1.2.2", + "@langchain/openai": "^0.6.17", "@sapiom/langchain-classic": "latest", "dotenv": "^16.4.5", "zod": "^3.22.4" From 75b69f21b987384aae4027c60a940b39bfc7e98b Mon Sep 17 00:00:00 2001 From: Antoine Berger <64917674+antoine-berger@users.noreply.github.com> Date: Wed, 11 Nov 2026 00:07:53 +0000 Subject: [PATCH 6/8] fix(deps): override langsmith, uuid and fast-xml-parser in langchain-classic [SAP-4717] The example stays on @langchain/core 0.3, which @sapiom/langchain-classic requires. That line pins its transitive langsmith, uuid and fast-xml-parser below their patched releases, so npm overrides raise each to its first patched version: - langsmith ^0.6.0 (alerts 17, 94, 102, 138; highest first patched 0.6.0). Resolves 0.6.3. - uuid ^11.1.1 (alert 145, patched 11.1.1). Resolves 11.1.1 for @langchain/core, langgraph, langgraph-checkpoint and langsmith, and replaces the uuid 9.0.1 nested under @langchain/langgraph-sdk. - fast-xml-parser ^5.12.0 (alerts 37, 39, 52, 66, 92, 110, first patched up to 5.7.0; GHSA-474x-hrwr-fgx4, published 2026-11-10, covers every release through 5.11.2 and is patched in 5.12.0). The newest @langchain/anthropic 0.3 (0.3.34) still asks for ^4.4.1, so only an override closes them. Resolves 5.12.0. uuid 11, langsmith 0.6 and fast-xml-parser 5 still publish CommonJS entry points, so the example loads on Node versions without require(esm). langsmith 0.6.0 and later generate ids from the global `crypto`, which Node 18 lacks without --experimental-global-webcrypto, so on Node 18 the example now fails at its first runnable call (ReferenceError: crypto is not defined). Alert 138 needs langsmith 0.6.0 or later. The rest of the lockfile change is those three packages' own trees: fast-xml-parser 5's dependencies (strnum 2.5.1, fast-xml-builder, @nodable/entities, anynum, is-unsafe, path-expression-matcher, xml-naming) come in, and the dependencies langsmith 0.6 no longer has (chalk and its tree, console-table-printer, simple-wcswidth, semver, @types/uuid) go. Regenerated with a plain `npm install --package-lock-only --before=2026-11-08`; a second plain `npm install` leaves it unchanged. Co-Authored-By: Claude Opus 5.5 --- examples/langchain-classic/package-lock.json | 241 ++++++++----------- examples/langchain-classic/package.json | 5 + 2 files changed, 112 insertions(+), 134 deletions(-) diff --git a/examples/langchain-classic/package-lock.json b/examples/langchain-classic/package-lock.json index 9c1ac9de6..4edb1e1c7 100644 --- a/examples/langchain-classic/package-lock.json +++ b/examples/langchain-classic/package-lock.json @@ -605,19 +605,6 @@ } } }, - "node_modules/@langchain/langgraph-sdk/node_modules/uuid": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", - "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", - "funding": [ - "https://github.com/sponsors/broofa", - "https://github.com/sponsors/ctavan" - ], - "license": "MIT", - "bin": { - "uuid": "dist/bin/uuid" - } - }, "node_modules/@langchain/openai": { "version": "0.6.17", "resolved": "https://registry.npmjs.org/@langchain/openai/-/openai-0.6.17.tgz", @@ -656,6 +643,18 @@ } } }, + "node_modules/@nodable/entities": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@nodable/entities/-/entities-3.1.0.tgz", + "integrity": "sha512-LsS/DjHr+uDM647Gru/cA8+J3a3HfhttwCKLyuoyN7yXTFCxKBtSgMQBvrW9yNPa2/zDRUNuGPaH5QUFoa4arQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/nodable" + } + ], + "license": "MIT" + }, "node_modules/@sapiom/core": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/@sapiom/core/-/core-0.2.1.tgz", @@ -703,12 +702,6 @@ "integrity": "sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA==", "license": "MIT" }, - "node_modules/@types/uuid": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-10.0.0.tgz", - "integrity": "sha512-7gqG38EyHgyP1S+7+xomFtL+ZNHcKv6DwNaCZmJmo1vgMugyF3TCnXVg4t1uk89mLNwnLtnY3TpOpCOyp1/xHQ==", - "license": "MIT" - }, "node_modules/ansi-styles": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", @@ -721,6 +714,18 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/anynum": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/anynum/-/anynum-1.0.1.tgz", + "integrity": "sha512-N6//FLET/tXYNM/F6ABca1oH6fWB+KlTt909Le28WMDBk8oaT4vY17DCrwg2MvmuqUKt3Ni4N5dGJ/EoBgcO6A==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + } + ], + "license": "MIT" + }, "node_modules/base64-js": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", @@ -753,64 +758,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/chalk/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "license": "MIT" - }, - "node_modules/console-table-printer": { - "version": "2.15.0", - "resolved": "https://registry.npmjs.org/console-table-printer/-/console-table-printer-2.15.0.tgz", - "integrity": "sha512-SrhBq4hYVjLCkBVOWaTzceJalvn5K1Zq5aQA6wXC/cYjI3frKWNPEMK3sZsJfNNQApvCQmgBcc13ZKmFj8qExw==", - "license": "MIT", - "dependencies": { - "simple-wcswidth": "^1.1.2" - } - }, "node_modules/decamelize": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", @@ -880,10 +827,26 @@ "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==", "license": "MIT" }, + "node_modules/fast-xml-builder": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/fast-xml-builder/-/fast-xml-builder-1.3.1.tgz", + "integrity": "sha512-pIM/1n3ntFXKYrUZwW7QCK0gAW7XY+wzj1YMIV3tLDvPj/V+zTGJK5e3/4WJfwj0qWw2ElNXiTixda/R+3YSug==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + } + ], + "license": "MIT", + "dependencies": { + "path-expression-matcher": "^1.6.2", + "xml-naming": "^0.3.0" + } + }, "node_modules/fast-xml-parser": { - "version": "4.5.3", - "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.5.3.tgz", - "integrity": "sha512-RKihhV+SHsIUGXObeVy9AXiBbFwkVk7Syp8XgwN5U3JV416+Gwp/GO9i0JYKmikykgz/UHRrrV4ROuZEo/T0ig==", + "version": "5.12.0", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-5.12.0.tgz", + "integrity": "sha512-/pXxRBtwxY9w8z7YbgsvIPPcPvFDsTbIkWwTQJhzNJPokj+TbN6ftmcv4j/pEQDvOCNnKGDzuk5Bo2oogIOiFg==", "funding": [ { "type": "github", @@ -892,7 +855,12 @@ ], "license": "MIT", "dependencies": { - "strnum": "^1.1.1" + "@nodable/entities": "^3.1.0", + "fast-xml-builder": "^1.3.1", + "is-unsafe": "^2.0.3", + "path-expression-matcher": "^1.6.2", + "strnum": "^2.5.1", + "xml-naming": "^0.3.0" }, "bin": { "fxparser": "src/cli/cli.js" @@ -926,14 +894,17 @@ "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" } }, - "node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "license": "MIT", - "engines": { - "node": ">=8" - } + "node_modules/is-unsafe": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-unsafe/-/is-unsafe-2.0.3.tgz", + "integrity": "sha512-ZBllczCCO267vgdFb6Tq3pv+LhHaCiGMdr+ZsuL+OopruAg7S+3ZDs1vD0RPC0uSrkjzbraxaGjtX1YBxjPeFQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + } + ], + "license": "MIT" }, "node_modules/js-tiktoken": { "version": "1.0.21", @@ -958,23 +929,19 @@ } }, "node_modules/langsmith": { - "version": "0.3.87", - "resolved": "https://registry.npmjs.org/langsmith/-/langsmith-0.3.87.tgz", - "integrity": "sha512-XXR1+9INH8YX96FKWc5tie0QixWz6tOqAsAKfcJyPkE0xPep+NDz0IQLR32q4bn10QK3LqD2HN6T3n6z1YLW7Q==", + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/langsmith/-/langsmith-0.6.3.tgz", + "integrity": "sha512-pXrQ4/4myQvjFFOAUmt5pWRrLEZR20gzIJD7MNdUH+5/S5nLI4ZRBo/SYKC6coaYj9pYTfQdBIzcs+3kfJ5uDA==", "license": "MIT", "dependencies": { - "@types/uuid": "^10.0.0", - "chalk": "^4.1.2", - "console-table-printer": "^2.12.1", - "p-queue": "^6.6.2", - "semver": "^7.6.3", - "uuid": "^10.0.0" + "p-queue": "6.6.2" }, "peerDependencies": { "@opentelemetry/api": "*", "@opentelemetry/exporter-trace-otlp-proto": "*", "@opentelemetry/sdk-trace-base": "*", - "openai": "*" + "openai": "*", + "ws": ">=7" }, "peerDependenciesMeta": { "@opentelemetry/api": { @@ -988,6 +955,9 @@ }, "openai": { "optional": true + }, + "ws": { + "optional": true } } }, @@ -1050,6 +1020,21 @@ "node": ">=8" } }, + "node_modules/path-expression-matcher": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/path-expression-matcher/-/path-expression-matcher-1.6.2.tgz", + "integrity": "sha512-enSlaiat05iasnzmgNxRj8reFdj3puY2QpNgP1aPIaVfT6nn9ICuPoFlKHk8EN22HcwewshO+mN2DGbkCEOtqQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + } + ], + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/resolve-pkg-maps": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", @@ -1069,46 +1054,19 @@ "node": ">= 4" } }, - "node_modules/semver": { - "version": "7.7.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", - "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/simple-wcswidth": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/simple-wcswidth/-/simple-wcswidth-1.1.2.tgz", - "integrity": "sha512-j7piyCjAeTDSjzTSQ7DokZtMNwNlEAyxqSZeCS+CXH7fJ4jx3FuJ/mTW3mE+6JLs4VJBbcll0Kjn+KXI5t21Iw==", - "license": "MIT" - }, "node_modules/strnum": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/strnum/-/strnum-1.1.2.tgz", - "integrity": "sha512-vrN+B7DBIoTTZjnPNewwhx6cBA/H+IS7rfW68n7XxC1y7uoiGQBxaKzqucGUgavX15dJgiGztLJ8vxuEzwqBdA==", + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/strnum/-/strnum-2.5.1.tgz", + "integrity": "sha512-UM4nTLWzQiDBseVxUGxN0wJzIk0UU89Qi7pKXz9qISo+lhviJikTuikBsK/oFRlpvYHvSdz0TVoLyQ+sEpYwxA==", "funding": [ { "type": "github", "url": "https://github.com/sponsors/NaturalIntelligence" } ], - "license": "MIT" - }, - "node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "license": "MIT", "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" + "anynum": "^1.0.1" } }, "node_modules/ts-algebra": { @@ -1159,16 +1117,31 @@ "license": "MIT" }, "node_modules/uuid": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-10.0.0.tgz", - "integrity": "sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==", + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-11.1.1.tgz", + "integrity": "sha512-vIYxrBCC/N/K+Js3qSN88go7kIfNPssr/hHCesKCQNAjmgvYS2oqr69kIufEG+O4+PfezOH4EbIeHCfFov8ZgQ==", "funding": [ "https://github.com/sponsors/broofa", "https://github.com/sponsors/ctavan" ], "license": "MIT", "bin": { - "uuid": "dist/bin/uuid" + "uuid": "dist/esm/bin/uuid" + } + }, + "node_modules/xml-naming": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/xml-naming/-/xml-naming-0.3.0.tgz", + "integrity": "sha512-ghig2TBE/H11aOVgmahA3MhimvkBr6JIYknH/Dhdk10nXwdbIqBJsbfMxpvFPG8bAw77gN29aQWvKpmVoPlvPQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + } + ], + "license": "MIT", + "engines": { + "node": ">=16.0.0" } }, "node_modules/zod": { diff --git a/examples/langchain-classic/package.json b/examples/langchain-classic/package.json index d6890108f..57e7838a3 100644 --- a/examples/langchain-classic/package.json +++ b/examples/langchain-classic/package.json @@ -20,5 +20,10 @@ "@types/node": "^20.11.30", "tsx": "^4.7.0", "typescript": "^5.4.2" + }, + "overrides": { + "fast-xml-parser": "^5.12.0", + "langsmith": "^0.6.0", + "uuid": "^11.1.1" } } From f4dac16dcbcf2d991d3c1e97e8fa608262de1262 Mon Sep 17 00:00:00 2001 From: Antoine Berger <64917674+antoine-berger@users.noreply.github.com> Date: Fri, 13 Nov 2026 22:30:54 +0000 Subject: [PATCH 7/8] test(examples): run langchain-classic's npm start without the global crypto [SAP-4717] The langsmith 0.6 override made the example fail on Node 18 with "ReferenceError: crypto is not defined", and nothing in CI ran the example. This test runs `npm start` against a local stub of the Anthropic API and expects the demo to complete. CI tests the examples on Node 22, which defines the global `crypto`. So the test deletes it in the child processes through NODE_OPTIONS, which gives the same failure as Node 18. On Node 18 the delete changes nothing. `pnpm examples:test` runs every example that has a `test` script, so the new script puts this in the examples job. It fails until the next commit defines the global. Co-Authored-By: Claude Fable 5.2 --- examples/langchain-classic/node18.test.mjs | 57 ++++++++++++++++++++++ examples/langchain-classic/package.json | 3 +- 2 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 examples/langchain-classic/node18.test.mjs diff --git a/examples/langchain-classic/node18.test.mjs b/examples/langchain-classic/node18.test.mjs new file mode 100644 index 000000000..df4feee21 --- /dev/null +++ b/examples/langchain-classic/node18.test.mjs @@ -0,0 +1,57 @@ +import assert from "node:assert/strict"; +import { execFile } from "node:child_process"; +import { once } from "node:events"; +import { createServer } from "node:http"; +import { test } from "node:test"; +import { promisify } from "node:util"; + +const anthropicReply = JSON.stringify({ + id: "msg_test", + type: "message", + role: "assistant", + model: "claude-haiku-4-5", + content: [{ type: "text", text: "ok" }], + stop_reason: "end_turn", + stop_sequence: null, + usage: { input_tokens: 1, output_tokens: 1 }, +}); + +test("npm start completes without the global crypto, as on Node 18", async () => { + // Answers the model calls. Sapiom calls get a 404, and the SDK then runs + // the agent without tracking. + const server = createServer((req, res) => { + req.resume(); + if (req.url !== "/v1/messages") return res.writeHead(404).end(); + res.writeHead(200, { "content-type": "application/json" }); + res.end(anthropicReply); + }).listen(0, "127.0.0.1"); + await once(server, "listening"); + const url = `http://127.0.0.1:${server.address().port}`; + + try { + const { stdout } = await promisify(execFile)("npm", ["start"], { + cwd: new URL(".", import.meta.url), + timeout: 60_000, + env: { + // Drops any LangSmith tracing set in the caller's shell, so every + // request stays on the local stub. + ...Object.fromEntries( + Object.entries(process.env).filter( + ([key]) => !/^LANG(CHAIN|SMITH)_/.test(key), + ), + ), + // Node 20+ defines the global `crypto`, so delete it before anything + // loads. On Node 18 this changes nothing. + NODE_OPTIONS: + "--import data:text/javascript,delete%20globalThis.crypto", + SAPIOM_API_KEY: "test", + SAPIOM_API_URL: url, + ANTHROPIC_API_KEY: "test", + ANTHROPIC_BASE_URL: url, + }, + }); + assert.match(stdout, /Demo Complete/); + } finally { + server.close(); + } +}); diff --git a/examples/langchain-classic/package.json b/examples/langchain-classic/package.json index 57e7838a3..3f578d212 100644 --- a/examples/langchain-classic/package.json +++ b/examples/langchain-classic/package.json @@ -5,7 +5,8 @@ "description": "Sapiom SDK example using LangChain with tool wrappers", "scripts": { "start": "npx tsx index.ts", - "dev": "npx tsx index.ts" + "dev": "npx tsx index.ts", + "test": "node --test node18.test.mjs" }, "dependencies": { "@langchain/anthropic": "^0.3.0", From 86d17c18db538c16781a022bde10b49326ea2cfe Mon Sep 17 00:00:00 2001 From: Antoine Berger <64917674+antoine-berger@users.noreply.github.com> Date: Fri, 13 Nov 2026 22:30:54 +0000 Subject: [PATCH 8/8] fix(examples): define the global crypto for langchain-classic on Node 18 [SAP-4717] langsmith 0.6.0 and later generate run ids with the global `crypto.getRandomValues`. Node 18 does not define that global, so the example failed at its first agent call with "ReferenceError: crypto is not defined". Every langsmith release that closes alert 138 reads the global, so the override stays. index.ts is the only entry point (`npm start` and `npm run dev` both run it). It now imports node18-crypto.ts first, which sets `globalThis.crypto` from `node:crypto`'s `webcrypto` when the global is missing. Node 20 and later already define it, and the import does nothing there. Co-Authored-By: Claude Fable 5.2 --- examples/langchain-classic/index.ts | 2 ++ examples/langchain-classic/node18-crypto.ts | 4 ++++ 2 files changed, 6 insertions(+) create mode 100644 examples/langchain-classic/node18-crypto.ts diff --git a/examples/langchain-classic/index.ts b/examples/langchain-classic/index.ts index 549c9575e..0e22d2daf 100644 --- a/examples/langchain-classic/index.ts +++ b/examples/langchain-classic/index.ts @@ -9,6 +9,8 @@ * * Run: npm start */ +import "./node18-crypto"; + import { SapiomClient } from "@sapiom/langchain-classic"; import dotenv from "dotenv"; diff --git a/examples/langchain-classic/node18-crypto.ts b/examples/langchain-classic/node18-crypto.ts new file mode 100644 index 000000000..31cd68893 --- /dev/null +++ b/examples/langchain-classic/node18-crypto.ts @@ -0,0 +1,4 @@ +// langsmith 0.6+ reads the global `crypto`, which Node 18 does not define. +import { webcrypto } from "node:crypto"; + +globalThis.crypto ??= webcrypto as typeof globalThis.crypto;