@splitsoftware/splitio 11.9.0 → 11.9.1-rc.0
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 +3 -0
- package/cjs/platform/getFetch/node.js +49 -11
- package/cjs/settings/defaults/version.js +1 -1
- package/esm/platform/getFetch/node.js +30 -11
- package/esm/settings/defaults/version.js +1 -1
- package/package.json +2 -2
- package/src/platform/getFetch/node.js +23 -10
- package/src/settings/defaults/version.js +1 -1
package/CHANGES.txt
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
11.9.1 (December XX, 2025)
|
|
2
|
+
- Updated node-fetch to version 3.3.2, which fixes some issues with the Fetch API implementation.
|
|
3
|
+
|
|
1
4
|
11.9.0 (November 26, 2025)
|
|
2
5
|
- Updated @splitsoftware/splitio-commons package to version 2.9.0, which:
|
|
3
6
|
- updates the SDK’s initial synchronization in Node.js (server-side) to use the `startup.requestTimeoutBeforeReady` and `startup.retriesOnFailureBeforeReady` options to control the timeout and retry behavior of segment requests.
|
|
@@ -1,19 +1,57 @@
|
|
|
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
|
+
};
|
|
2
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
22
|
exports.getFetch = exports.__setFetch = void 0;
|
|
4
|
-
var
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
23
|
+
var __setFetchCalled = false;
|
|
24
|
+
var nodeFetchImport;
|
|
25
|
+
var nodeFetch = function (url, options) {
|
|
26
|
+
try {
|
|
27
|
+
if (!nodeFetchImport) {
|
|
28
|
+
// lazy import, recommended for other runtimes than Node.js
|
|
29
|
+
nodeFetchImport = Promise.resolve().then(function () { return import('node-fetch'); }).then(function (_a) {
|
|
30
|
+
var fetch = _a.default;
|
|
31
|
+
if (!__setFetchCalled)
|
|
32
|
+
nodeFetch = fetch;
|
|
33
|
+
}).catch(function () {
|
|
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
|
+
};
|
|
15
52
|
// This function is only exposed for testing purposes.
|
|
16
53
|
function __setFetch(fetch) {
|
|
54
|
+
__setFetchCalled = true;
|
|
17
55
|
nodeFetch = fetch;
|
|
18
56
|
}
|
|
19
57
|
exports.__setFetch = __setFetch;
|
|
@@ -1,16 +1,35 @@
|
|
|
1
|
-
var
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
1
|
+
var __setFetchCalled = false;
|
|
2
|
+
var nodeFetchImport;
|
|
3
|
+
var nodeFetch = function (url, options) {
|
|
4
|
+
try {
|
|
5
|
+
if (!nodeFetchImport) {
|
|
6
|
+
// lazy import, recommended for other runtimes than Node.js
|
|
7
|
+
nodeFetchImport = import('node-fetch').then(function (_a) {
|
|
8
|
+
var fetch = _a.default;
|
|
9
|
+
if (!__setFetchCalled)
|
|
10
|
+
nodeFetch = fetch;
|
|
11
|
+
}).catch(function () {
|
|
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
|
+
};
|
|
12
30
|
// This function is only exposed for testing purposes.
|
|
13
31
|
export function __setFetch(fetch) {
|
|
32
|
+
__setFetchCalled = true;
|
|
14
33
|
nodeFetch = fetch;
|
|
15
34
|
}
|
|
16
35
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export var packageVersion = '11.9.0';
|
|
1
|
+
export var packageVersion = '11.9.1-rc.0';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@splitsoftware/splitio",
|
|
3
|
-
"version": "11.9.0",
|
|
3
|
+
"version": "11.9.1-rc.0",
|
|
4
4
|
"description": "Split SDK",
|
|
5
5
|
"files": [
|
|
6
6
|
"README.md",
|
|
@@ -42,7 +42,7 @@
|
|
|
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": "^3.3.2",
|
|
46
46
|
"tslib": "^2.3.1",
|
|
47
47
|
"unfetch": "^4.2.0"
|
|
48
48
|
},
|
|
@@ -1,18 +1,31 @@
|
|
|
1
|
-
let
|
|
1
|
+
let __setFetchCalled = false;
|
|
2
|
+
let nodeFetchImport;
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
|
|
4
|
+
let nodeFetch = (url, options) => {
|
|
5
|
+
try {
|
|
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
|
+
}
|
|
5
14
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
15
|
+
return nodeFetchImport.then(() => {
|
|
16
|
+
if (!nodeFetch) throw new Error('Fetch API not available');
|
|
17
|
+
return nodeFetch(url, options);
|
|
18
|
+
});
|
|
19
|
+
} catch (error) {
|
|
20
|
+
if (!__setFetchCalled) nodeFetch = typeof fetch === 'function' ? fetch : undefined;
|
|
21
|
+
if (!nodeFetch) throw new Error('Fetch API not available');
|
|
22
|
+
return nodeFetch(url, options);
|
|
23
|
+
}
|
|
24
|
+
};
|
|
13
25
|
|
|
14
26
|
// This function is only exposed for testing purposes.
|
|
15
27
|
export function __setFetch(fetch) {
|
|
28
|
+
__setFetchCalled = true;
|
|
16
29
|
nodeFetch = fetch;
|
|
17
30
|
}
|
|
18
31
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const packageVersion = '11.9.0';
|
|
1
|
+
export const packageVersion = '11.9.1-rc.0';
|