From 1dacaed9ae1211931c1df86b8bad1948935cef8e Mon Sep 17 00:00:00 2001 From: Emiliano Sanchez Date: Wed, 23 Sep 2026 12:44:48 -0300 Subject: [PATCH 1/4] Prepare release v2.12.2 --- CHANGES.txt | 3 + package-lock.json | 168 +++++++++++++++++++++++++--------------------- package.json | 4 +- 3 files changed, 95 insertions(+), 80 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 1d69d5df..39429ada 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,6 @@ +2.12.2 (September 23, 2026) + - Updated some transitive dependencies for vulnerability fixes. + 2.12.1 (June 25, 2026) - Updated internal modules to handle `null` values from `/splitChanges` response. - Updated some dependencies for vulnerability fixes. diff --git a/package-lock.json b/package-lock.json index 2216e68b..77254a00 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@splitsoftware/splitio-commons", - "version": "2.12.1", + "version": "2.12.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@splitsoftware/splitio-commons", - "version": "2.12.1", + "version": "2.12.2", "license": "Apache-2.0", "dependencies": { "@types/ioredis": "^4.28.0", @@ -576,9 +576,9 @@ } }, "node_modules/@eslint/eslintrc/node_modules/js-yaml": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.2.0.tgz", - "integrity": "sha512-ePWsvanv0DWuDRsW8dnt+R4jQ31SCRCQ7hhNcPXZPsoBZiemuZNYGf7adZdqX2D86j6rvKp3RpCxVTSb8WQlOw==", + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.2.tgz", + "integrity": "sha512-SFNOvSJ+Dgf/9An904Yx+CgSlIPCkIpao4qo51lpee25TIRejdH3rhR4EZMGoNx3/TP3O+wzWuiTFl4sqbltzA==", "dev": true, "funding": [ { @@ -659,9 +659,9 @@ "license": "BSD-3-Clause" }, "node_modules/@ioredis/commands": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@ioredis/commands/-/commands-1.5.0.tgz", - "integrity": "sha512-eUgLqrMf8nJkZxT24JvVRrQya1vZkQh8BBeYNwGDqa5I0VUi8ACx7uFvAaLxintokpTenkK6DASvo/bvNbBGow==", + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/@ioredis/commands/-/commands-1.10.0.tgz", + "integrity": "sha512-UmeW7z4LfctwoQ5wkhVzgq8tXkreED2xZGpX+Bg+zA+WJFZCT6c062AfCK/Dfk81xZnnwdhJCUMkitihRaoC2Q==", "dev": true, "license": "MIT" }, @@ -1731,9 +1731,9 @@ } }, "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.0.tgz", - "integrity": "sha512-TN1kCZAgdgweJhWWpgKYrQaMNHcDULHkWwQIspdtjV4Y5aurRdZpjAqn6yX3FPqTA9ngHCc4hJxMAMgGfve85w==", + "version": "2.1.7", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.7.tgz", + "integrity": "sha512-uZbew1NqdmPDTMJ8ah1y+b+9QEJrfkXFk3RcTQw3X0jW/xRUvFKsg1CfQdSYGdTbXZWExtU3J3ccxtnfw1Fi0g==", "dev": true, "license": "MIT", "dependencies": { @@ -2170,10 +2170,23 @@ "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", "dev": true }, + "node_modules/baseline-browser-mapping": { + "version": "2.11.25", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.11.25.tgz", + "integrity": "sha512-gMmEShwwq7FJqMwvfRwvCl00v4kN+KOfJqXn+f4nrufak5gNHJOksd/60Dvjuz7sI8Y5WiSFBa8FEYr+zoyqCw==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "baseline-browser-mapping": "dist/cli.cjs" + }, + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/brace-expansion": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.14.tgz", - "integrity": "sha512-MWPGfDxnyzKU7rNOW9SP/c50vi3xrmrua/+6hfPbCS2ABNWfx24vPidzvC7krjU/RTo235sV776ymlsMtGKj8g==", + "version": "1.1.21", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.21.tgz", + "integrity": "sha512-9zeA+KLZNNzglF2TPKRQEDyx6Yby7daAkuy8MiPzpXPsYDWi/DRM8jmwUDxokQjYqBpv5DgPiwD4h4ZZSy1Ujw==", "dev": true, "license": "MIT", "dependencies": { @@ -2200,9 +2213,9 @@ "dev": true }, "node_modules/browserslist": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.0.tgz", - "integrity": "sha512-Rmb62sR1Zpjql25eSanFGEhAxcFwfA1K0GuQcLoaJBAcENegrQut3hYdhXFF1obQfiDyqIW/cLM5HSJ/9k884A==", + "version": "4.29.0", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.29.0.tgz", + "integrity": "sha512-3GSvyjvDI4Dur1Meg2BekJquu5uF+9R9a1+5M1Mde192eZoXbeXjzgOsgqPS2V8D5wrrip0gR5Hf/GhWQ9ZzaA==", "dev": true, "funding": [ { @@ -2218,12 +2231,14 @@ "url": "https://github.com/sponsors/ai" } ], + "license": "MIT", "peer": true, "dependencies": { - "caniuse-lite": "^1.0.30001663", - "electron-to-chromium": "^1.5.28", - "node-releases": "^2.0.18", - "update-browserslist-db": "^1.1.0" + "baseline-browser-mapping": "^2.11.23", + "caniuse-lite": "^1.0.30001810", + "electron-to-chromium": "^1.5.427", + "node-releases": "^2.0.55", + "update-browserslist-db": "^1.3.3" }, "bin": { "browserslist": "cli.js" @@ -2304,9 +2319,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001667", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001667.tgz", - "integrity": "sha512-7LTwJjcRkzKFmtqGsibMeuXmvFDfZq/nzIjnmgCGzKKRVzjD72selLDK1oPF/Oxzmt4fNcPvTDvGqSDG4tCALw==", + "version": "1.0.30001810", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001810.tgz", + "integrity": "sha512-TITQPUkaz+aVk5GL6NhOdwk1aEaNTSDPsGFWrTuhKGtjTF70jL/Oht2W4c6rXUe5fu7Ie19VIahAXHIIiWWNeg==", "dev": true, "funding": [ { @@ -2321,7 +2336,8 @@ "type": "github", "url": "https://github.com/sponsors/ai" } - ] + ], + "license": "CC-BY-4.0" }, "node_modules/char-regex": { "version": "1.0.2", @@ -2365,10 +2381,11 @@ } }, "node_modules/cluster-key-slot": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/cluster-key-slot/-/cluster-key-slot-1.1.0.tgz", - "integrity": "sha512-2Nii8p3RwAPiFwsnZvukotvow2rIHM+yQ6ZcBXGHdniadkYGZYiGmkHJIbZPIV9nfv7m/U1IPMVVcAhoWFeklw==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/cluster-key-slot/-/cluster-key-slot-1.1.1.tgz", + "integrity": "sha512-rwHwUfXL40Chm1r08yrhU3qpUvdVlgkKNeyeGPOxnW8/SyVDvgRaed/Uz54AqWNaTCAThlj6QAs3TZcKI0xDEw==", "dev": true, + "license": "Apache-2.0", "engines": { "node": ">=0.10.0" } @@ -2498,12 +2515,13 @@ } }, "node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", "dev": true, + "license": "MIT", "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -2652,10 +2670,11 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.5.33", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.33.tgz", - "integrity": "sha512-+cYTcFB1QqD4j4LegwLfpCNxifb6dDFUAwk6RsLusCwIaZI6or2f+q8rs5tTB2YC53HhOlIbEaqHMAAC8IOIwA==", - "dev": true + "version": "1.5.438", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.438.tgz", + "integrity": "sha512-AN9xMU1hJiT65LkCUPL1DZm5TCbOPb2Qsm5pYwFLEXp6/qj9SdT4yMiqs7Qqstwvkn1zF7l36SRGt+s6XcJ0FA==", + "dev": true, + "license": "ISC" }, "node_modules/emittery": { "version": "0.8.1", @@ -3348,9 +3367,9 @@ } }, "node_modules/eslint/node_modules/js-yaml": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.2.0.tgz", - "integrity": "sha512-ePWsvanv0DWuDRsW8dnt+R4jQ31SCRCQ7hhNcPXZPsoBZiemuZNYGf7adZdqX2D86j6rvKp3RpCxVTSb8WQlOw==", + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.2.tgz", + "integrity": "sha512-SFNOvSJ+Dgf/9An904Yx+CgSlIPCkIpao4qo51lpee25TIRejdH3rhR4EZMGoNx3/TP3O+wzWuiTFl4sqbltzA==", "dev": true, "funding": [ { @@ -4200,21 +4219,19 @@ } }, "node_modules/ioredis": { - "version": "5.9.2", - "resolved": "https://registry.npmjs.org/ioredis/-/ioredis-5.9.2.tgz", - "integrity": "sha512-tAAg/72/VxOUW7RQSX1pIxJVucYKcjFjfvj60L57jrZpYCHC3XN0WCQ3sNYL4Gmvv+7GPvTAjc+KSdeNuE8oWQ==", + "version": "5.11.1", + "resolved": "https://registry.npmjs.org/ioredis/-/ioredis-5.11.1.tgz", + "integrity": "sha512-ehuGcf94bQXhfagULNXrJdfnWO38v070jxSx/qE87Kjzmu2fU7ro5EFAb+OPituLqgfyuQaym5DlrNydW2sJ9A==", "dev": true, "license": "MIT", "dependencies": { - "@ioredis/commands": "1.5.0", - "cluster-key-slot": "^1.1.0", - "debug": "^4.3.4", - "denque": "^2.1.0", - "lodash.defaults": "^4.2.0", - "lodash.isarguments": "^3.1.0", - "redis-errors": "^1.2.0", - "redis-parser": "^3.0.0", - "standard-as-callback": "^2.1.0" + "@ioredis/commands": "1.10.0", + "cluster-key-slot": "1.1.1", + "debug": "4.4.3", + "denque": "2.1.0", + "redis-errors": "1.2.0", + "redis-parser": "3.0.0", + "standard-as-callback": "2.1.0" }, "engines": { "node": ">=12.22.0" @@ -6284,10 +6301,11 @@ "dev": true }, "node_modules/js-yaml": { - "version": "3.14.2", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.2.tgz", - "integrity": "sha512-PMSmkqxr106Xa156c2M265Z+FTrPl+oxd/rgOQy2tijQeK5TxQ43psO1ZCwhVOSdnn+RzkzlRz/eY4BgJBYVpg==", + "version": "3.15.2", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.15.2.tgz", + "integrity": "sha512-6EuL879VkRA+1Cz578mKMiKvjPNEuk6+r1JaFzoSWejZmtf7xWbIyw1e3KkxlkzTIt9Taw6JBhEppG7utc1P+w==", "dev": true, + "license": "MIT", "dependencies": { "argparse": "^1.0.7", "esprima": "^4.0.0" @@ -6454,18 +6472,6 @@ "dev": true, "license": "MIT" }, - "node_modules/lodash.defaults": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz", - "integrity": "sha512-qjxPLHd3r5DnsdGacqOMU6pb/avJzdh9tFX2ymgoZE27BmjXrNy/y4LoaiTeAb+O3gL8AfpJGtqfX/ae2leYYQ==", - "dev": true - }, - "node_modules/lodash.isarguments": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz", - "integrity": "sha512-chi4NHZlZqZD18a0imDHnZPrDeBbTtVN7GXMwuGdRH9qotxAjYs3aVLKc7zNOG9eddR5Ksd8rvFEBc9SsggPpg==", - "dev": true - }, "node_modules/lodash.isequal": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", @@ -6621,10 +6627,11 @@ "dev": true }, "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" }, "node_modules/natural-compare": { "version": "1.4.0", @@ -6682,10 +6689,14 @@ "dev": true }, "node_modules/node-releases": { - "version": "2.0.18", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.18.tgz", - "integrity": "sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==", - "dev": true + "version": "2.0.57", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.57.tgz", + "integrity": "sha512-kQK9LGGFiHtrWiNhZtA7Qbw17AQz+dmsEKODRIVTXA9+e5MS/2gZEBhYJt13GrAz5/IOZKddH/0Z3TP/Zgo+yw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } }, "node_modules/normalize-path": { "version": "3.0.0", @@ -7804,9 +7815,9 @@ } }, "node_modules/update-browserslist-db": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.1.tgz", - "integrity": "sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A==", + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.3.3.tgz", + "integrity": "sha512-pJ2sYawQS0R/WI928Gj5GlPhTGzbMelq0+4INtSYNDV9ErKJcX6xjGWkoG/VnB3dpUm00zALaqkrUD77pO5TDQ==", "dev": true, "funding": [ { @@ -7822,9 +7833,10 @@ "url": "https://github.com/sponsors/ai" } ], + "license": "MIT", "dependencies": { "escalade": "^3.2.0", - "picocolors": "^1.1.0" + "picocolors": "^1.1.1" }, "bin": { "update-browserslist-db": "cli.js" diff --git a/package.json b/package.json index 074c7298..32f19348 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@splitsoftware/splitio-commons", - "version": "2.12.1", + "version": "2.12.2", "description": "Split JavaScript SDK common components", "main": "cjs/index.js", "module": "esm/index.js", @@ -26,7 +26,7 @@ "test:coverage": "jest --coverage", "all": "npm run check && npm run build && npm run test", "publish:rc": "npm run check && npm run test && npm run build && npm publish --tag rc", - "publish:stable": "npm run check && npm run test && npm run build && npm publish" + "publish:stable": "npm run check && npm run test && npm run build && npm publish --tag release-2.x" }, "repository": { "type": "git", From 3f64eb43e4d34e3fdfa19b3bafd19d06f3e0505a Mon Sep 17 00:00:00 2001 From: Emiliano Sanchez Date: Wed, 23 Sep 2026 15:25:12 -0300 Subject: [PATCH 2/4] Add support for ioredis v6 --- .../pipelines/javascript-commons.yaml | 14 +++++++ CHANGES.txt | 3 ++ package-lock.json | 40 +++++++------------ package.json | 6 +-- src/storages/inRedis/RedisAdapter.ts | 13 +++--- .../inRedis/__tests__/RedisAdapter.spec.ts | 6 +-- 6 files changed, 45 insertions(+), 37 deletions(-) diff --git a/.harness/orgs/PROD/projects/Harness_Split/pipelines/javascript-commons.yaml b/.harness/orgs/PROD/projects/Harness_Split/pipelines/javascript-commons.yaml index 09c4b888..1bf82775 100644 --- a/.harness/orgs/PROD/projects/Harness_Split/pipelines/javascript-commons.yaml +++ b/.harness/orgs/PROD/projects/Harness_Split/pipelines/javascript-commons.yaml @@ -73,6 +73,20 @@ pipeline: spec: shell: Sh command: npm run test + - step: + type: Run + name: ioredis peer dependency matrix + identifier: ioredis_matrix + spec: + shell: Sh + command: |- + set -e + for version in 4 5; do + echo "--- Testing against ioredis v$version ---" + npm install --no-save --no-audit --no-fund "ioredis@$version" + npx jest src/storages/inRedis + done + npm ci - step: type: Run name: npm run build diff --git a/CHANGES.txt b/CHANGES.txt index 39429ada..7d527108 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,6 @@ +2.13.0 (September 23, 2026) + - Added support for ioredis v6 (Related to issue https://github.com/splitio/javascript-client/issues/951). Note that ioredis v6 requires Node.js 20 or above; stay on ioredis v4 or v5 for older Node.js versions. + 2.12.2 (September 23, 2026) - Updated some transitive dependencies for vulnerability fixes. diff --git a/package-lock.json b/package-lock.json index 77254a00..3a0b6ba0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@splitsoftware/splitio-commons", - "version": "2.12.2", + "version": "2.12.3-rc.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@splitsoftware/splitio-commons", - "version": "2.12.2", + "version": "2.12.3-rc.0", "license": "Apache-2.0", "dependencies": { "@types/ioredis": "^4.28.0", @@ -24,7 +24,7 @@ "eslint-plugin-import": "^2.25.3", "eslint-plugin-tsdoc": "^0.3.0", "fetch-mock": "^9.11.0", - "ioredis": "^5.0.0", + "ioredis": "^6.0.0", "jest": "^27.2.3", "jest-localstorage-mock": "^2.4.3", "lodash": "^4.17.21", @@ -35,7 +35,7 @@ "typescript": "4.7.4" }, "peerDependencies": { - "ioredis": "^4.28.0 || ^5.0.0" + "ioredis": "^4.28.0 || ^5.0.0 || ^6.0.0" }, "peerDependenciesMeta": { "ioredis": { @@ -659,9 +659,9 @@ "license": "BSD-3-Clause" }, "node_modules/@ioredis/commands": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/@ioredis/commands/-/commands-1.10.0.tgz", - "integrity": "sha512-UmeW7z4LfctwoQ5wkhVzgq8tXkreED2xZGpX+Bg+zA+WJFZCT6c062AfCK/Dfk81xZnnwdhJCUMkitihRaoC2Q==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@ioredis/commands/-/commands-2.0.0.tgz", + "integrity": "sha512-vrx0AE/T0h7cRZwfo1M39Cr+ZhZrkf0V8mQN75wucKCxCLD9l/VX6no3gFvrLqD1IlG/1LtzWovqEw3t0Vr9zg==", "dev": true, "license": "MIT" }, @@ -4219,22 +4219,21 @@ } }, "node_modules/ioredis": { - "version": "5.11.1", - "resolved": "https://registry.npmjs.org/ioredis/-/ioredis-5.11.1.tgz", - "integrity": "sha512-ehuGcf94bQXhfagULNXrJdfnWO38v070jxSx/qE87Kjzmu2fU7ro5EFAb+OPituLqgfyuQaym5DlrNydW2sJ9A==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/ioredis/-/ioredis-6.0.0.tgz", + "integrity": "sha512-f+Dtubxfpf6KYFq7WVXJoOLn0bk4TJrMrN9SzeE+jrWrCWj7XX3fA6vkryafhADX+GMymRxgDJDOI33COkJc0w==", "dev": true, "license": "MIT", "dependencies": { - "@ioredis/commands": "1.10.0", + "@ioredis/commands": "2.0.0", "cluster-key-slot": "1.1.1", "debug": "4.4.3", "denque": "2.1.0", "redis-errors": "1.2.0", - "redis-parser": "3.0.0", "standard-as-callback": "2.1.0" }, "engines": { - "node": ">=12.22.0" + "node": ">=20.0.0" }, "funding": { "type": "opencollective", @@ -7099,20 +7098,9 @@ "node_modules/redis-errors": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/redis-errors/-/redis-errors-1.2.0.tgz", - "integrity": "sha1-62LSrbFeTq9GEMBK/hUpOEJQq60=", + "integrity": "sha512-1qny3OExCf0UvUV/5wpYKf2YwPcOqXzkwKKSmKHiE6ZMQs5heeE/c8eXK+PNllPvmjgAbfnsbpkGZWy8cBpn9w==", "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/redis-parser": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/redis-parser/-/redis-parser-3.0.0.tgz", - "integrity": "sha1-tm2CjNyv5rS4pCin3vTGvKwxyLQ=", - "dev": true, - "dependencies": { - "redis-errors": "^1.0.0" - }, + "license": "MIT", "engines": { "node": ">=4" } diff --git a/package.json b/package.json index 32f19348..53e68f6e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@splitsoftware/splitio-commons", - "version": "2.12.2", + "version": "2.12.3-rc.0", "description": "Split JavaScript SDK common components", "main": "cjs/index.js", "module": "esm/index.js", @@ -49,7 +49,7 @@ "tslib": "^2.3.1" }, "peerDependencies": { - "ioredis": "^4.28.0 || ^5.0.0" + "ioredis": "^4.28.0 || ^5.0.0 || ^6.0.0" }, "peerDependenciesMeta": { "ioredis": { @@ -68,7 +68,7 @@ "eslint-plugin-import": "^2.25.3", "eslint-plugin-tsdoc": "^0.3.0", "fetch-mock": "^9.11.0", - "ioredis": "^5.0.0", + "ioredis": "^6.0.0", "jest": "^27.2.3", "jest-localstorage-mock": "^2.4.3", "lodash": "^4.17.21", diff --git a/src/storages/inRedis/RedisAdapter.ts b/src/storages/inRedis/RedisAdapter.ts index c3d3ab8e..7fa48b63 100644 --- a/src/storages/inRedis/RedisAdapter.ts +++ b/src/storages/inRedis/RedisAdapter.ts @@ -1,12 +1,12 @@ // Dynamically require ioredis to prevent strict TypeScript binding -// and handle module export differences between v4 and v5. +// and handle module export differences between v4 and later major versions. let RedisConstructor: any; try { const ioredisLib = require('ioredis'); RedisConstructor = ioredisLib.default || ioredisLib; } catch (e) { // If we reach here, the peer dependency is missing - throw new Error('ioredis is missing. Please install ioredis v4 or v5.'); + throw new Error('ioredis is missing. Please install ioredis v4, v5 or v6.'); } import { ILogger } from '../../logger/types'; @@ -31,9 +31,12 @@ const DEFAULT_LIBRARY_OPTIONS = { enableOfflineQueue: false, connectTimeout: DEFAULT_OPTIONS.connectionTimeout, lazyConnect: false, - // CRITICAL: v5 defaults this to 0 (disabled), which breaks dynamic clusters. - // v4 defaulted to 5000. We explicitly set it here to ensure v5 works like v4. + // CRITICAL: v5 and v6 default this to 0 (disabled), which breaks dynamic clusters. + // v4 defaulted to 5000. We explicitly set it here to ensure v5 and v6 work like v4. slotsRefreshInterval: 5000, + // v6 defaults to RESP3 (`protocol: 3`). The SDK doesn't use any RESP3 feature, + // so we stick to RESP2 to keep the v4 and v5 behavior. Ignored by v4 and v5. + protocol: 2, }; interface IRedisCommand { @@ -45,7 +48,7 @@ interface IRedisCommand { /** * Redis adapter on top of the library of choice (written with ioredis) for some extra control. - * Refactored to use Composition instead of Inheritance to support both v4 and v5. + * Refactored to use Composition instead of Inheritance to support v4, v5 and v6. */ export class RedisAdapter { // eslint-disable-next-line no-undef -- Index signature to allow proxying dynamic ioredis methods without TS errors diff --git a/src/storages/inRedis/__tests__/RedisAdapter.spec.ts b/src/storages/inRedis/__tests__/RedisAdapter.spec.ts index ec0742ba..40174e4b 100644 --- a/src/storages/inRedis/__tests__/RedisAdapter.spec.ts +++ b/src/storages/inRedis/__tests__/RedisAdapter.spec.ts @@ -110,7 +110,7 @@ describe('STORAGE Redis Adapter', () => { // Keep in mind we're storing the arguments object, not a true array. expect(constructorParams.length).toBe(2); // In this signature, the constructor receives two params. expect(constructorParams[0]).toBe(redisUrl); // When we use the Redis URL, that should be the first parameter passed to ioredis constructor - expect(constructorParams[1]).toEqual({ enableOfflineQueue: false, connectTimeout: 123, lazyConnect: false, slotsRefreshInterval: 5000, tls: { ca: 'ca' } }); // and the second parameter would be the default settings for the lib. + expect(constructorParams[1]).toEqual({ enableOfflineQueue: false, connectTimeout: 123, lazyConnect: false, slotsRefreshInterval: 5000, protocol: 2, tls: { ca: 'ca' } }); // and the second parameter would be the default settings for the lib. new RedisAdapter(loggerMock, { ...redisParams, @@ -121,7 +121,7 @@ describe('STORAGE Redis Adapter', () => { expect(constructorParams.length).toBe(1); // In this signature, the constructor receives one param. // we keep "pass" instead of "password" on our settings API to be backwards compatible. - expect(constructorParams[0]).toEqual({ host: redisParams.host, port: redisParams.port, db: redisParams.db, password: redisParams.pass, enableOfflineQueue: false, connectTimeout: 123, lazyConnect: false, slotsRefreshInterval: 5000, tls: { ca: 'ca' } }); // If we send all the redis params separate, it will pass one object to the library containing that and the rest of the options. + expect(constructorParams[0]).toEqual({ host: redisParams.host, port: redisParams.port, db: redisParams.db, password: redisParams.pass, enableOfflineQueue: false, connectTimeout: 123, lazyConnect: false, slotsRefreshInterval: 5000, protocol: 2, tls: { ca: 'ca' } }); // If we send all the redis params separate, it will pass one object to the library containing that and the rest of the options. new RedisAdapter(loggerMock, { ...redisParams, @@ -133,7 +133,7 @@ describe('STORAGE Redis Adapter', () => { expect(constructorParams.length).toBe(2); // In this signature, the constructor receives two params. expect(constructorParams[0]).toBe(redisUrl); // When we use the Redis URL, even if we specified all the other params one by one the URL takes precedence, so that should be the first parameter passed to ioredis constructor - expect(constructorParams[1]).toEqual({ enableOfflineQueue: false, connectTimeout: 10000, lazyConnect: false, slotsRefreshInterval: 5000, tls: { ca: 'ca' } }); // and the second parameter would be the default settings for the lib. + expect(constructorParams[1]).toEqual({ enableOfflineQueue: false, connectTimeout: 10000, lazyConnect: false, slotsRefreshInterval: 5000, protocol: 2, tls: { ca: 'ca' } }); // and the second parameter would be the default settings for the lib. }); test('static method - _defineOptions', () => { From ebe8032df49bcea7049565425f5829245f1234b1 Mon Sep 17 00:00:00 2001 From: Emiliano Sanchez Date: Wed, 23 Sep 2026 16:29:10 -0300 Subject: [PATCH 3/4] Remove @types/ioredis dep --- CHANGES.txt | 1 + package-lock.json | 15 ++------------- package.json | 4 +--- types/splitio.d.ts | 4 ++-- 4 files changed, 6 insertions(+), 18 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 7d527108..42abb731 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,5 +1,6 @@ 2.13.0 (September 23, 2026) - Added support for ioredis v6 (Related to issue https://github.com/splitio/javascript-client/issues/951). Note that ioredis v6 requires Node.js 20 or above; stay on ioredis v4 or v5 for older Node.js versions. + - Removed the `@types/ioredis` dependency, which is no longer required since the public type definitions don't depend on ioredis types anymore. The `tls` storage option keeps the same type (`tls.ConnectionOptions` from Node.js). 2.12.2 (September 23, 2026) - Updated some transitive dependencies for vulnerability fixes. diff --git a/package-lock.json b/package-lock.json index 3a0b6ba0..4d2e23d0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,19 +1,17 @@ { "name": "@splitsoftware/splitio-commons", - "version": "2.12.3-rc.0", + "version": "2.12.3-rc.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@splitsoftware/splitio-commons", - "version": "2.12.3-rc.0", + "version": "2.12.3-rc.1", "license": "Apache-2.0", "dependencies": { - "@types/ioredis": "^4.28.0", "tslib": "^2.3.1" }, "devDependencies": { - "@types/ioredis": "^4.28.0", "@types/jest": "^27.0.0", "@types/lodash": "^4.14.162", "@typescript-eslint/eslint-plugin": "^7.18.0", @@ -1488,15 +1486,6 @@ "@types/node": "*" } }, - "node_modules/@types/ioredis": { - "version": "4.28.1", - "resolved": "https://registry.npmjs.org/@types/ioredis/-/ioredis-4.28.1.tgz", - "integrity": "sha512-raYHPqRWrfnEoym94BY28mG1+tcZqh3dsp2q7x5IyMAAEvIdu+H0X8diASMpncIm+oHyH9dalOeOnGOL/YnuOA==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, "node_modules/@types/istanbul-lib-coverage": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.3.tgz", diff --git a/package.json b/package.json index 53e68f6e..2f298055 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@splitsoftware/splitio-commons", - "version": "2.12.3-rc.0", + "version": "2.12.3-rc.1", "description": "Split JavaScript SDK common components", "main": "cjs/index.js", "module": "esm/index.js", @@ -45,7 +45,6 @@ "bugs": "https://github.com/splitio/javascript-commons/issues", "homepage": "https://github.com/splitio/javascript-commons#readme", "dependencies": { - "@types/ioredis": "^4.28.0", "tslib": "^2.3.1" }, "peerDependencies": { @@ -57,7 +56,6 @@ } }, "devDependencies": { - "@types/ioredis": "^4.28.0", "@types/jest": "^27.0.0", "@types/lodash": "^4.14.162", "@typescript-eslint/eslint-plugin": "^7.18.0", diff --git a/types/splitio.d.ts b/types/splitio.d.ts index 489a4bab..64bba008 100644 --- a/types/splitio.d.ts +++ b/types/splitio.d.ts @@ -1,7 +1,7 @@ // Type definitions for Split Software SDKs // Project: https://www.split.io/ -import type { RedisOptions } from 'ioredis'; +import type { ConnectionOptions } from 'tls'; import type { RequestOptions } from 'http'; export as namespace SplitIO; @@ -1713,7 +1713,7 @@ declare namespace SplitIO { * * @defaultValue `undefined` */ - tls?: RedisOptions['tls']; + tls?: ConnectionOptions; }; /** * Optional prefix to prevent any kind of data collision between SDK versions. From 3582b736b02c0cddca1bf7e501db0b468bcd674a Mon Sep 17 00:00:00 2001 From: Emiliano Sanchez Date: Thu, 24 Sep 2026 13:05:49 -0300 Subject: [PATCH 4/4] Added @types/node for public type definitions --- CHANGES.txt | 4 ++-- package-lock.json | 8 ++++---- package.json | 3 ++- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 42abb731..d854a85e 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,6 +1,6 @@ -2.13.0 (September 23, 2026) +2.13.0 (September 24, 2026) - Added support for ioredis v6 (Related to issue https://github.com/splitio/javascript-client/issues/951). Note that ioredis v6 requires Node.js 20 or above; stay on ioredis v4 or v5 for older Node.js versions. - - Removed the `@types/ioredis` dependency, which is no longer required since the public type definitions don't depend on ioredis types anymore. The `tls` storage option keeps the same type (`tls.ConnectionOptions` from Node.js). + - Removed the `@types/ioredis` dependency, which is no longer required since the public type definitions don't depend on ioredis types. The `@types/node` dependency, previously installed transitively by `@types/ioredis`, is now declared explicitly, since the public type definitions use Node.js types for the `agent` and `tls` options. 2.12.2 (September 23, 2026) - Updated some transitive dependencies for vulnerability fixes. diff --git a/package-lock.json b/package-lock.json index 4d2e23d0..2340954a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,14 +1,15 @@ { "name": "@splitsoftware/splitio-commons", - "version": "2.12.3-rc.1", + "version": "2.13.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@splitsoftware/splitio-commons", - "version": "2.12.3-rc.1", + "version": "2.13.0", "license": "Apache-2.0", "dependencies": { + "@types/node": ">=14.0.0", "tslib": "^2.3.1" }, "devDependencies": { @@ -1536,8 +1537,7 @@ "node_modules/@types/node": { "version": "14.14.7", "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.7.tgz", - "integrity": "sha512-Zw1vhUSQZYw+7u5dAwNbIA9TuTotpzY/OF7sJM9FqPOF3SPjKnxrjoTktXDZgUjybf4cWVBP7O8wvKdSaGHweg==", - "dev": true + "integrity": "sha512-Zw1vhUSQZYw+7u5dAwNbIA9TuTotpzY/OF7sJM9FqPOF3SPjKnxrjoTktXDZgUjybf4cWVBP7O8wvKdSaGHweg==" }, "node_modules/@types/prettier": { "version": "2.7.3", diff --git a/package.json b/package.json index 2f298055..a35ab55b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@splitsoftware/splitio-commons", - "version": "2.12.3-rc.1", + "version": "2.13.0", "description": "Split JavaScript SDK common components", "main": "cjs/index.js", "module": "esm/index.js", @@ -45,6 +45,7 @@ "bugs": "https://github.com/splitio/javascript-commons/issues", "homepage": "https://github.com/splitio/javascript-commons#readme", "dependencies": { + "@types/node": ">=14.0.0", "tslib": "^2.3.1" }, "peerDependencies": {