@splitsoftware/splitio 11.7.2-rc.1 → 11.7.2-rc.2

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 CHANGED
@@ -1,9 +1,6 @@
1
- 11.8.0 (October XX, 2025)
2
- - Updated @splitsoftware/splitio-commons package to version 2.8.0, which 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.
3
- - Updated node-fetch to version 3.3.2, which fixes some issues with the Fetch API implementation.
4
-
5
- 11.7.1 (October 8, 2025)
6
- - 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
+ 11.8.0 (October 24, 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
+ - Updated @splitsoftware/splitio-commons package to version 2.8.0.
7
4
 
8
5
  11.7.0 (October 7, 2025)
9
6
  - Added support for custom loggers: added `logger` configuration option and `factory.Logger.setLogger` method to allow the SDK to use a custom logger.
@@ -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 __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
- };
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,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.packageVersion = void 0;
4
- exports.packageVersion = '11.7.2-rc.1';
4
+ exports.packageVersion = '11.7.2-rc.2';
@@ -1,35 +1,16 @@
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
- };
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';
1
+ export var packageVersion = '11.7.2-rc.2';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@splitsoftware/splitio",
3
- "version": "11.7.2-rc.1",
3
+ "version": "11.7.2-rc.2",
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.2-rc.0",
41
+ "@splitsoftware/splitio-commons": "2.7.9-rc.0",
42
42
  "bloom-filters": "^3.0.4",
43
43
  "ioredis": "^4.28.0",
44
44
  "js-yaml": "^3.13.1",
45
- "node-fetch": "^3.3.2",
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 __setFetchCalled = false;
2
- let nodeFetchImport;
1
+ let nodeFetch;
3
2
 
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
- }
3
+ try {
4
+ nodeFetch = require('node-fetch');
14
5
 
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
- };
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';
1
+ export const packageVersion = '11.7.2-rc.2';