@splitsoftware/splitio 11.7.2-rc.1 → 11.7.2-rc.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGES.txt +5 -3
- package/cjs/platform/getFetch/node.js +11 -49
- package/cjs/settings/defaults/version.js +1 -1
- package/esm/platform/getFetch/node.js +11 -30
- package/esm/settings/defaults/version.js +1 -1
- package/package.json +3 -3
- package/src/platform/getFetch/node.js +10 -23
- package/src/settings/defaults/version.js +1 -1
package/CHANGES.txt
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
11.8.0 (October
|
|
2
|
-
-
|
|
3
|
-
-
|
|
1
|
+
11.8.0 (October 28, 2025)
|
|
2
|
+
- Added new configuration for Fallback Treatments, which allows setting a treatment value and optional config to be returned in place of "control", either globally or by flag. Read more in our docs.
|
|
3
|
+
- Added `client.whenReady()` and `client.whenReadyFromCache()` methods to replace the deprecated `client.ready()` method, which has an issue causing the returned promise to hang when using async/await syntax if it was rejected.
|
|
4
|
+
- Updated the SDK_READY_FROM_CACHE event to be emitted alongside the SDK_READY event if it hasn’t already been emitted.
|
|
5
|
+
- Updated @splitsoftware/splitio-commons package to version 2.8.0.
|
|
4
6
|
|
|
5
7
|
11.7.1 (October 8, 2025)
|
|
6
8
|
- Bugfix - Updated @splitsoftware/splitio-commons package to version 2.7.1, which fixes the `debug` option to support log levels when the `logger` option is used.
|
|
@@ -1,57 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
-
}) : function(o, v) {
|
|
12
|
-
o["default"] = v;
|
|
13
|
-
});
|
|
14
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
-
if (mod && mod.__esModule) return mod;
|
|
16
|
-
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
-
__setModuleDefault(result, mod);
|
|
19
|
-
return result;
|
|
20
|
-
};
|
|
21
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
3
|
exports.getFetch = exports.__setFetch = void 0;
|
|
23
|
-
var
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
if (!__setFetchCalled)
|
|
35
|
-
nodeFetch = typeof fetch === 'function' ? fetch : undefined;
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
return nodeFetchImport.then(function () {
|
|
39
|
-
if (!nodeFetch)
|
|
40
|
-
throw new Error('Fetch API not available');
|
|
41
|
-
return nodeFetch(url, options);
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
catch (error) {
|
|
45
|
-
if (!__setFetchCalled)
|
|
46
|
-
nodeFetch = typeof fetch === 'function' ? fetch : undefined;
|
|
47
|
-
if (!nodeFetch)
|
|
48
|
-
throw new Error('Fetch API not available');
|
|
49
|
-
return nodeFetch(url, options);
|
|
50
|
-
}
|
|
51
|
-
};
|
|
4
|
+
var nodeFetch;
|
|
5
|
+
try {
|
|
6
|
+
nodeFetch = require('node-fetch');
|
|
7
|
+
// Handle node-fetch issue https://github.com/node-fetch/node-fetch/issues/1037
|
|
8
|
+
if (typeof nodeFetch !== 'function')
|
|
9
|
+
nodeFetch = nodeFetch.default;
|
|
10
|
+
}
|
|
11
|
+
catch (error) {
|
|
12
|
+
// Try to access global fetch if `node-fetch` package couldn't be imported (e.g., not in a Node environment)
|
|
13
|
+
nodeFetch = typeof fetch === 'function' ? fetch : undefined;
|
|
14
|
+
}
|
|
52
15
|
// This function is only exposed for testing purposes.
|
|
53
16
|
function __setFetch(fetch) {
|
|
54
|
-
__setFetchCalled = true;
|
|
55
17
|
nodeFetch = fetch;
|
|
56
18
|
}
|
|
57
19
|
exports.__setFetch = __setFetch;
|
|
@@ -1,35 +1,16 @@
|
|
|
1
|
-
var
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
if (!__setFetchCalled)
|
|
13
|
-
nodeFetch = typeof fetch === 'function' ? fetch : undefined;
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
return nodeFetchImport.then(function () {
|
|
17
|
-
if (!nodeFetch)
|
|
18
|
-
throw new Error('Fetch API not available');
|
|
19
|
-
return nodeFetch(url, options);
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
catch (error) {
|
|
23
|
-
if (!__setFetchCalled)
|
|
24
|
-
nodeFetch = typeof fetch === 'function' ? fetch : undefined;
|
|
25
|
-
if (!nodeFetch)
|
|
26
|
-
throw new Error('Fetch API not available');
|
|
27
|
-
return nodeFetch(url, options);
|
|
28
|
-
}
|
|
29
|
-
};
|
|
1
|
+
var nodeFetch;
|
|
2
|
+
try {
|
|
3
|
+
nodeFetch = require('node-fetch');
|
|
4
|
+
// Handle node-fetch issue https://github.com/node-fetch/node-fetch/issues/1037
|
|
5
|
+
if (typeof nodeFetch !== 'function')
|
|
6
|
+
nodeFetch = nodeFetch.default;
|
|
7
|
+
}
|
|
8
|
+
catch (error) {
|
|
9
|
+
// Try to access global fetch if `node-fetch` package couldn't be imported (e.g., not in a Node environment)
|
|
10
|
+
nodeFetch = typeof fetch === 'function' ? fetch : undefined;
|
|
11
|
+
}
|
|
30
12
|
// This function is only exposed for testing purposes.
|
|
31
13
|
export function __setFetch(fetch) {
|
|
32
|
-
__setFetchCalled = true;
|
|
33
14
|
nodeFetch = fetch;
|
|
34
15
|
}
|
|
35
16
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export var packageVersion = '11.7.2-rc.
|
|
1
|
+
export var packageVersion = '11.7.2-rc.3';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@splitsoftware/splitio",
|
|
3
|
-
"version": "11.7.2-rc.
|
|
3
|
+
"version": "11.7.2-rc.3",
|
|
4
4
|
"description": "Split SDK",
|
|
5
5
|
"files": [
|
|
6
6
|
"README.md",
|
|
@@ -38,11 +38,11 @@
|
|
|
38
38
|
"node": ">=14.0.0"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@splitsoftware/splitio-commons": "2.7.
|
|
41
|
+
"@splitsoftware/splitio-commons": "2.7.9-rc.1",
|
|
42
42
|
"bloom-filters": "^3.0.4",
|
|
43
43
|
"ioredis": "^4.28.0",
|
|
44
44
|
"js-yaml": "^3.13.1",
|
|
45
|
-
"node-fetch": "^
|
|
45
|
+
"node-fetch": "^2.7.0",
|
|
46
46
|
"tslib": "^2.3.1",
|
|
47
47
|
"unfetch": "^4.2.0"
|
|
48
48
|
},
|
|
@@ -1,31 +1,18 @@
|
|
|
1
|
-
let
|
|
2
|
-
let nodeFetchImport;
|
|
1
|
+
let nodeFetch;
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
if (!nodeFetchImport) {
|
|
7
|
-
// lazy import, recommended for other runtimes than Node.js
|
|
8
|
-
nodeFetchImport = import('node-fetch').then(({ default: fetch }) => {
|
|
9
|
-
if (!__setFetchCalled) nodeFetch = fetch;
|
|
10
|
-
}).catch(() => {
|
|
11
|
-
if (!__setFetchCalled) nodeFetch = typeof fetch === 'function' ? fetch : undefined;
|
|
12
|
-
});
|
|
13
|
-
}
|
|
3
|
+
try {
|
|
4
|
+
nodeFetch = require('node-fetch');
|
|
14
5
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
return nodeFetch(url, options);
|
|
23
|
-
}
|
|
24
|
-
};
|
|
6
|
+
// Handle node-fetch issue https://github.com/node-fetch/node-fetch/issues/1037
|
|
7
|
+
if (typeof nodeFetch !== 'function') nodeFetch = nodeFetch.default;
|
|
8
|
+
|
|
9
|
+
} catch (error) {
|
|
10
|
+
// Try to access global fetch if `node-fetch` package couldn't be imported (e.g., not in a Node environment)
|
|
11
|
+
nodeFetch = typeof fetch === 'function' ? fetch : undefined;
|
|
12
|
+
}
|
|
25
13
|
|
|
26
14
|
// This function is only exposed for testing purposes.
|
|
27
15
|
export function __setFetch(fetch) {
|
|
28
|
-
__setFetchCalled = true;
|
|
29
16
|
nodeFetch = fetch;
|
|
30
17
|
}
|
|
31
18
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const packageVersion = '11.7.2-rc.
|
|
1
|
+
export const packageVersion = '11.7.2-rc.3';
|