diff --git a/CHANGES.txt b/CHANGES.txt
index 7cd078dd3..dcc52ef76 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,3 +1,6 @@
+11.0.4 (January 9, 2025)
+ - Bugfixing - Updated @splitsoftware/splitio-commons package to version 2.0.3, which properly handles rejected promises when using targeting rules with segment matchers in consumer modes (e.g., Redis and Pluggable storages).
+
11.0.3 (December 4, 2024)
- Bugfixing - Updated @splitsoftware/splitio-commons package to version 2.0.2 that sanitizes the `SplitSDKMachineName` header value to avoid exceptions on HTTP/S requests when it contains non ISO-8859-1 characters (Related to issue https://github.com/splitio/javascript-client/issues/847).
diff --git a/README.md b/README.md
index 13c1eea80..77ad5b5fa 100644
--- a/README.md
+++ b/README.md
@@ -84,4 +84,4 @@ For a comprehensive list of open source projects visit our [Github page](https:/
**Learn more about Split:**
-Visit [split.io/product](https://www.split.io/product) for an overview of Split, or visit our documentation at [help.split.io](http://help.split.io) for more detailed information.
+Visit [split.io/product](https://www.split.io/product) for an overview of Split, or visit our documentation at [help.split.io](https://help.split.io) for more detailed information.
diff --git a/package-lock.json b/package-lock.json
index a6959f97e..a7b829acb 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,15 +1,15 @@
{
"name": "@splitsoftware/splitio",
- "version": "11.0.3",
+ "version": "11.0.4",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@splitsoftware/splitio",
- "version": "11.0.3",
+ "version": "11.0.4",
"license": "Apache-2.0",
"dependencies": {
- "@splitsoftware/splitio-commons": "2.0.2",
+ "@splitsoftware/splitio-commons": "2.0.3",
"bloom-filters": "^3.0.4",
"ioredis": "^4.28.0",
"js-yaml": "^3.13.1",
@@ -351,9 +351,9 @@
"dev": true
},
"node_modules/@splitsoftware/splitio-commons": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/@splitsoftware/splitio-commons/-/splitio-commons-2.0.2.tgz",
- "integrity": "sha512-r2m3kwWnSuROT+7zTzhWBrM0DMRBGJNQcTyvXw8zLPPmBs/PnmAnxCy7uRpfMHOGbP9Q3Iju0bU/H5dG8svyiw==",
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/@splitsoftware/splitio-commons/-/splitio-commons-2.0.3.tgz",
+ "integrity": "sha512-weOdbLCBImBD9napQyDdACi35GrKJvh7nYLOYklStJZcNmdSWb7vMk+AFWdKdVjv8Ee23myo6/+1segDiCRJ8g==",
"dependencies": {
"@types/ioredis": "^4.28.0",
"tslib": "^2.3.1"
@@ -7537,9 +7537,9 @@
"dev": true
},
"@splitsoftware/splitio-commons": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/@splitsoftware/splitio-commons/-/splitio-commons-2.0.2.tgz",
- "integrity": "sha512-r2m3kwWnSuROT+7zTzhWBrM0DMRBGJNQcTyvXw8zLPPmBs/PnmAnxCy7uRpfMHOGbP9Q3Iju0bU/H5dG8svyiw==",
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/@splitsoftware/splitio-commons/-/splitio-commons-2.0.3.tgz",
+ "integrity": "sha512-weOdbLCBImBD9napQyDdACi35GrKJvh7nYLOYklStJZcNmdSWb7vMk+AFWdKdVjv8Ee23myo6/+1segDiCRJ8g==",
"requires": {
"@types/ioredis": "^4.28.0",
"tslib": "^2.3.1"
diff --git a/package.json b/package.json
index d62fd35b1..1b7e916f0 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "@splitsoftware/splitio",
- "version": "11.0.3",
+ "version": "11.0.4",
"description": "Split SDK",
"files": [
"README.md",
@@ -38,7 +38,7 @@
"node": ">=14.0.0"
},
"dependencies": {
- "@splitsoftware/splitio-commons": "2.0.2",
+ "@splitsoftware/splitio-commons": "2.0.3",
"bloom-filters": "^3.0.4",
"ioredis": "^4.28.0",
"js-yaml": "^3.13.1",
diff --git a/src/__tests__/browserSuites/ready-from-cache.spec.js b/src/__tests__/browserSuites/ready-from-cache.spec.js
index b0ffd6706..0e9cdd90f 100644
--- a/src/__tests__/browserSuites/ready-from-cache.spec.js
+++ b/src/__tests__/browserSuites/ready-from-cache.spec.js
@@ -564,7 +564,7 @@ export default function (fetchMock, assert) {
});
client.once(client.Event.SDK_READY, () => {
- t.deepEqual(manager.names(), ['p1__split', 'p2__split'], 'p1__split should be added for evaluation');
+ t.deepEqual(manager.names().sort(), ['p1__split', 'p2__split'], 'p1__split should be added for evaluation');
client.destroy().then(() => {
t.equal(localStorage.getItem('readyFromCache_5B.SPLITIO.splits.till'), '1457552620999', 'splits.till must correspond to the till of the last successfully fetched Splits');
@@ -610,11 +610,11 @@ export default function (fetchMock, assert) {
const manager = splitio.manager();
client.once(client.Event.SDK_READY_FROM_CACHE, () => {
- t.deepEqual(manager.names(), ['p2__split', 'p1__split'], 'splits shouldn\'t be removed for evaluation');
+ t.deepEqual(manager.names().sort(), ['p1__split', 'p2__split'], 'splits shouldn\'t be removed for evaluation');
});
client.once(client.Event.SDK_READY, () => {
- t.deepEqual(manager.names(), ['p2__split', 'p1__split'], 'active splits should be present for evaluation');
+ t.deepEqual(manager.names().sort(), ['p1__split', 'p2__split'], 'active splits should be present for evaluation');
client.destroy().then(() => {
t.equal(localStorage.getItem('some_user_item'), 'user_item', 'user items at localStorage must not be changed');
@@ -667,7 +667,7 @@ export default function (fetchMock, assert) {
});
client.once(client.Event.SDK_READY, () => {
- t.deepEqual(manager.names(), ['p2__split', 'p1__split'], 'active splits should be present for evaluation');
+ t.deepEqual(manager.names().sort(), ['p1__split', 'p2__split'], 'active splits should be present for evaluation');
client.destroy().then(() => {
t.equal(localStorage.getItem('some_user_item'), 'user_item', 'user items at localStorage must not be changed');
@@ -780,7 +780,7 @@ export default function (fetchMock, assert) {
const manager = splitio.manager();
client.once(client.Event.SDK_READY, () => {
- t.deepEqual(manager.names(), ['p3__split', 'p2__split'], 'active splits should be present for evaluation');
+ t.deepEqual(manager.names().sort(), ['p2__split', 'p3__split'], 'active splits should be present for evaluation');
client.destroy().then(() => {
t.equal(localStorage.getItem('some_user_item'), 'user_item', 'user items at localStorage must not be changed');
diff --git a/src/__tests__/consumer/node_redis.spec.js b/src/__tests__/consumer/node_redis.spec.js
index 8092f1910..457631bac 100644
--- a/src/__tests__/consumer/node_redis.spec.js
+++ b/src/__tests__/consumer/node_redis.spec.js
@@ -181,7 +181,7 @@ tape('Node.js Redis', function (t) {
assert.deepEqual(trackedImpressionsAndEvents, [TOTAL_RAW_IMPRESSIONS, TOTAL_EVENTS], 'Tracked impressions and events should be stored in Redis');
// Validate stored telemetry
- exec(`echo "HLEN ${config.storage.prefix}.SPLITIO.telemetry.latencies \n HLEN ${config.storage.prefix}.SPLITIO.telemetry.exceptions \n HGET ${config.storage.prefix}.SPLITIO.telemetry.init nodejs-${version}/${HOSTNAME_VALUE}/${IP_VALUE}" | redis-cli -p ${redisPort}`, (error, stdout) => {
+ exec(`echo "HLEN ${config.storage.prefix}.SPLITIO.telemetry.latencies \n HLEN ${config.storage.prefix}.SPLITIO.telemetry.exceptions \n HGET ${config.storage.prefix}.SPLITIO.telemetry.init 'nodejs-${version}/${HOSTNAME_VALUE}/${IP_VALUE}'" | redis-cli -p ${redisPort}`, (error, stdout) => {
if (error) assert.fail('Redis server should be reachable');
const [latencies, exceptions, configValue] = stdout.split('\n').filter(line => line !== '').map(JSON.parse);
@@ -304,7 +304,7 @@ tape('Node.js Redis', function (t) {
assert.deepEqual(trackedImpressionsAndEvents, [TOTAL_RAW_IMPRESSIONS - DEDUPED_IMPRESSIONS, TOTAL_EVENTS], 'Tracked impressions and events should be stored in Redis');
// Validate stored telemetry
- exec(`echo "HLEN ${config.storage.prefix}.SPLITIO.telemetry.latencies \n HLEN ${config.storage.prefix}.SPLITIO.telemetry.exceptions \n HGET ${config.storage.prefix}.SPLITIO.telemetry.init nodejs-${version}/${HOSTNAME_VALUE}/${IP_VALUE}" | redis-cli -p ${redisPort}`, (error, stdout) => {
+ exec(`echo "HLEN ${config.storage.prefix}.SPLITIO.telemetry.latencies \n HLEN ${config.storage.prefix}.SPLITIO.telemetry.exceptions \n HGET ${config.storage.prefix}.SPLITIO.telemetry.init 'nodejs-${version}/${HOSTNAME_VALUE}/${IP_VALUE}'" | redis-cli -p ${redisPort}`, (error, stdout) => {
if (error) assert.fail('Redis server should be reachable');
const [latencies, exceptions, configValue] = stdout.split('\n').filter(line => line !== '').map(JSON.parse);
@@ -406,7 +406,7 @@ tape('Node.js Redis', function (t) {
assert.deepEqual(trackedImpressionsAndEvents, [0, TOTAL_EVENTS], 'No impressions are stored in Redis in NONE impressions mode');
// Validate stored telemetry
- exec(`echo "HLEN ${config.storage.prefix}.SPLITIO.telemetry.latencies \n HLEN ${config.storage.prefix}.SPLITIO.telemetry.exceptions \n HGET ${config.storage.prefix}.SPLITIO.telemetry.init nodejs-${version}/${HOSTNAME_VALUE}/${IP_VALUE}" | redis-cli -p ${redisPort}`, (error, stdout) => {
+ exec(`echo "HLEN ${config.storage.prefix}.SPLITIO.telemetry.latencies \n HLEN ${config.storage.prefix}.SPLITIO.telemetry.exceptions \n HGET ${config.storage.prefix}.SPLITIO.telemetry.init 'nodejs-${version}/${HOSTNAME_VALUE}/${IP_VALUE}'" | redis-cli -p ${redisPort}`, (error, stdout) => {
if (error) assert.fail('Redis server should be reachable');
const [latencies, exceptions, configValue] = stdout.split('\n').filter(line => line !== '').map(JSON.parse);
diff --git a/src/__tests__/testUtils/index.js b/src/__tests__/testUtils/index.js
index 5994a3c30..35c601fd1 100644
--- a/src/__tests__/testUtils/index.js
+++ b/src/__tests__/testUtils/index.js
@@ -18,8 +18,8 @@ export function nearlyEqual(actual, expected, epsilon = DEFAULT_ERROR_MARGIN) {
* - when `?since=-1`, it returns the given segment `keys` in `added` list.
* - otherwise, it returns empty `added` and `removed` lists, and the same since and till values.
*
- * @param {Object} fetchMock see http://www.wheresrhys.co.uk/fetch-mock
- * @param {string|RegExp|...} matcher see http://www.wheresrhys.co.uk/fetch-mock/#api-mockingmock_matcher
+ * @param {Object} fetchMock see https://www.wheresrhys.co.uk/fetch-mock
+ * @param {string|RegExp|...} matcher see https://www.wheresrhys.co.uk/fetch-mock/#api-mockingmock_matcher
* @param {string[]} keys array of segment keys to fetch
* @param {number} changeNumber optional changeNumber
*/
diff --git a/src/settings/defaults/version.js b/src/settings/defaults/version.js
index c1fb40805..563a20863 100644
--- a/src/settings/defaults/version.js
+++ b/src/settings/defaults/version.js
@@ -1 +1 @@
-export const packageVersion = '11.0.3';
+export const packageVersion = '11.0.4';
diff --git a/types/client/index.d.ts b/types/client/index.d.ts
index efa3a8f03..d37238859 100644
--- a/types/client/index.d.ts
+++ b/types/client/index.d.ts
@@ -1,5 +1,5 @@
// Declaration file for JavaScript Split Software SDK
-// Project: http://www.split.io/
+// Project: https://www.split.io/
import '@splitsoftware/splitio-commons';
diff --git a/types/index.d.ts b/types/index.d.ts
index 159df53d3..1d2c64470 100644
--- a/types/index.d.ts
+++ b/types/index.d.ts
@@ -1,5 +1,5 @@
// Declaration file for JavaScript and Node.js Split Software SDK v8.1.0
-// Project: http://www.split.io/
+// Project: https://www.split.io/
// Definitions by: Nico Zelaya
///
diff --git a/types/server/index.d.ts b/types/server/index.d.ts
index fcbc2bd59..35514aaa1 100644
--- a/types/server/index.d.ts
+++ b/types/server/index.d.ts
@@ -1,5 +1,5 @@
// Declaration file for JavaScript Split Software SDK
-// Project: http://www.split.io/
+// Project: https://www.split.io/
import '@splitsoftware/splitio-commons';