@splitsoftware/splitio 10.24.1 → 10.24.2-rc.1
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/LICENSE +1 -1
- package/es/platform/getFetch/node.js +18 -1
- package/es/platform/node.js +0 -2
- package/es/settings/defaults/version.js +1 -1
- package/lib/platform/getFetch/node.js +19 -1
- package/lib/platform/node.js +4 -6
- package/lib/settings/defaults/version.js +1 -1
- package/package.json +4 -4
- package/src/platform/getFetch/node.js +20 -1
- package/src/platform/node.js +0 -2
- package/src/settings/defaults/version.js +1 -1
- package/es/platform/request/options/node.js +0 -13
- package/lib/platform/request/options/node.js +0 -18
- package/src/platform/request/options/node.js +0 -15
package/CHANGES.txt
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
10.25.0 (January 4, 2024)
|
|
2
|
+
- Updated SDK to support URLs without TLS protocol in NodeJS, to simplify proxy usage inside private networks.
|
|
3
|
+
|
|
1
4
|
10.24.1 (December 12, 2023)
|
|
2
5
|
- Updated SDK cache for browsers using localStorage, to clear cached feature flag definitions before initiating the synchronization process if the cache was previously synchronized with a different SDK key (i.e., a different environment) or different Split Filter criteria, to avoid using invalid cached data when the SDK is ready from cache.
|
|
3
6
|
- Updated @splitsoftware/splitio-commons package to version 1.12.1.
|
package/LICENSE
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
/* eslint-disable compat/compat */
|
|
2
|
+
import https from 'https';
|
|
3
|
+
// @TODO
|
|
4
|
+
// 1- handle multiple protocols automatically
|
|
5
|
+
// 2- destroy it once the sdk is destroyed
|
|
6
|
+
var agent = new https.Agent({
|
|
7
|
+
keepAlive: true,
|
|
8
|
+
keepAliveMsecs: 1500
|
|
9
|
+
});
|
|
1
10
|
var nodeFetch;
|
|
2
11
|
try {
|
|
3
12
|
nodeFetch = require('node-fetch');
|
|
@@ -13,6 +22,14 @@ catch (error) {
|
|
|
13
22
|
export function __setFetch(fetch) {
|
|
14
23
|
nodeFetch = fetch;
|
|
15
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* Retrieves 'node-fetch', a Fetch API polyfill for NodeJS, with fallback to global 'fetch' if available.
|
|
27
|
+
* It passes an https agent with keepAlive enabled if URL is https.
|
|
28
|
+
*/
|
|
16
29
|
export function getFetch() {
|
|
17
|
-
|
|
30
|
+
if (nodeFetch) {
|
|
31
|
+
return function (url, options) {
|
|
32
|
+
return nodeFetch(url, Object.assign({ agent: url.startsWith('https:') ? agent : undefined }, options));
|
|
33
|
+
};
|
|
34
|
+
}
|
|
18
35
|
}
|
package/es/platform/node.js
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import EventEmitter from 'events';
|
|
2
2
|
import { getFetch } from '../platform/getFetch/node';
|
|
3
3
|
import { getEventSource } from '../platform/getEventSource/node';
|
|
4
|
-
import { getOptions } from '../platform/request/options/node';
|
|
5
4
|
import { NodeSignalListener } from '@splitsoftware/splitio-commons/esm/listeners/node';
|
|
6
5
|
import { now } from '@splitsoftware/splitio-commons/esm/utils/timeTracker/now/node';
|
|
7
6
|
export var platform = {
|
|
8
|
-
getOptions: getOptions,
|
|
9
7
|
getFetch: getFetch,
|
|
10
8
|
getEventSource: getEventSource,
|
|
11
9
|
EventEmitter: EventEmitter,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export var packageVersion = '10.24.1';
|
|
1
|
+
export var packageVersion = '10.24.2-rc.1';
|
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getFetch = exports.__setFetch = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
/* eslint-disable compat/compat */
|
|
6
|
+
var https_1 = (0, tslib_1.__importDefault)(require("https"));
|
|
7
|
+
// @TODO
|
|
8
|
+
// 1- handle multiple protocols automatically
|
|
9
|
+
// 2- destroy it once the sdk is destroyed
|
|
10
|
+
var agent = new https_1.default.Agent({
|
|
11
|
+
keepAlive: true,
|
|
12
|
+
keepAliveMsecs: 1500
|
|
13
|
+
});
|
|
4
14
|
var nodeFetch;
|
|
5
15
|
try {
|
|
6
16
|
nodeFetch = require('node-fetch');
|
|
@@ -17,7 +27,15 @@ function __setFetch(fetch) {
|
|
|
17
27
|
nodeFetch = fetch;
|
|
18
28
|
}
|
|
19
29
|
exports.__setFetch = __setFetch;
|
|
30
|
+
/**
|
|
31
|
+
* Retrieves 'node-fetch', a Fetch API polyfill for NodeJS, with fallback to global 'fetch' if available.
|
|
32
|
+
* It passes an https agent with keepAlive enabled if URL is https.
|
|
33
|
+
*/
|
|
20
34
|
function getFetch() {
|
|
21
|
-
|
|
35
|
+
if (nodeFetch) {
|
|
36
|
+
return function (url, options) {
|
|
37
|
+
return nodeFetch(url, Object.assign({ agent: url.startsWith('https:') ? agent : undefined }, options));
|
|
38
|
+
};
|
|
39
|
+
}
|
|
22
40
|
}
|
|
23
41
|
exports.getFetch = getFetch;
|
package/lib/platform/node.js
CHANGED
|
@@ -5,14 +5,12 @@ var tslib_1 = require("tslib");
|
|
|
5
5
|
var events_1 = (0, tslib_1.__importDefault)(require("events"));
|
|
6
6
|
var node_1 = require("../platform/getFetch/node");
|
|
7
7
|
var node_2 = require("../platform/getEventSource/node");
|
|
8
|
-
var node_3 = require("
|
|
9
|
-
var node_4 = require("@splitsoftware/splitio-commons/cjs/
|
|
10
|
-
var node_5 = require("@splitsoftware/splitio-commons/cjs/utils/timeTracker/now/node");
|
|
8
|
+
var node_3 = require("@splitsoftware/splitio-commons/cjs/listeners/node");
|
|
9
|
+
var node_4 = require("@splitsoftware/splitio-commons/cjs/utils/timeTracker/now/node");
|
|
11
10
|
exports.platform = {
|
|
12
|
-
getOptions: node_3.getOptions,
|
|
13
11
|
getFetch: node_1.getFetch,
|
|
14
12
|
getEventSource: node_2.getEventSource,
|
|
15
13
|
EventEmitter: events_1.default,
|
|
16
|
-
now:
|
|
14
|
+
now: node_4.now
|
|
17
15
|
};
|
|
18
|
-
exports.SignalListener =
|
|
16
|
+
exports.SignalListener = node_3.NodeSignalListener;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@splitsoftware/splitio",
|
|
3
|
-
"version": "10.24.1",
|
|
3
|
+
"version": "10.24.2-rc.1",
|
|
4
4
|
"description": "Split SDK",
|
|
5
5
|
"files": [
|
|
6
6
|
"README.md",
|
|
@@ -40,20 +40,20 @@
|
|
|
40
40
|
"node": ">=6"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@splitsoftware/splitio-commons": "1.
|
|
43
|
+
"@splitsoftware/splitio-commons": "1.13.0",
|
|
44
44
|
"@types/google.analytics": "0.0.40",
|
|
45
45
|
"@types/ioredis": "^4.28.0",
|
|
46
46
|
"bloom-filters": "^3.0.0",
|
|
47
47
|
"ioredis": "^4.28.0",
|
|
48
48
|
"js-yaml": "^3.13.1",
|
|
49
|
-
"node-fetch": "^2.
|
|
49
|
+
"node-fetch": "^2.7.0",
|
|
50
50
|
"unfetch": "^4.2.0"
|
|
51
51
|
},
|
|
52
52
|
"optionalDependencies": {
|
|
53
53
|
"eventsource": "^1.1.2"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"@types/node-fetch": "^2.
|
|
56
|
+
"@types/node-fetch": "^2.6.10",
|
|
57
57
|
"@types/seedrandom": "^3.0.2",
|
|
58
58
|
"copyfiles": "^2.4.1",
|
|
59
59
|
"cross-env": "^7.0.3",
|
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
/* eslint-disable compat/compat */
|
|
2
|
+
import https from 'https';
|
|
3
|
+
|
|
4
|
+
// @TODO
|
|
5
|
+
// 1- handle multiple protocols automatically
|
|
6
|
+
// 2- destroy it once the sdk is destroyed
|
|
7
|
+
const agent = new https.Agent({
|
|
8
|
+
keepAlive: true,
|
|
9
|
+
keepAliveMsecs: 1500
|
|
10
|
+
});
|
|
11
|
+
|
|
1
12
|
let nodeFetch;
|
|
2
13
|
|
|
3
14
|
try {
|
|
@@ -16,6 +27,14 @@ export function __setFetch(fetch) {
|
|
|
16
27
|
nodeFetch = fetch;
|
|
17
28
|
}
|
|
18
29
|
|
|
30
|
+
/**
|
|
31
|
+
* Retrieves 'node-fetch', a Fetch API polyfill for NodeJS, with fallback to global 'fetch' if available.
|
|
32
|
+
* It passes an https agent with keepAlive enabled if URL is https.
|
|
33
|
+
*/
|
|
19
34
|
export function getFetch() {
|
|
20
|
-
|
|
35
|
+
if (nodeFetch) {
|
|
36
|
+
return (url, options) => {
|
|
37
|
+
return nodeFetch(url, Object.assign({ agent: url.startsWith('https:') ? agent : undefined }, options));
|
|
38
|
+
};
|
|
39
|
+
}
|
|
21
40
|
}
|
package/src/platform/node.js
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import EventEmitter from 'events';
|
|
2
2
|
import { getFetch } from '../platform/getFetch/node';
|
|
3
3
|
import { getEventSource } from '../platform/getEventSource/node';
|
|
4
|
-
import { getOptions } from '../platform/request/options/node';
|
|
5
4
|
import { NodeSignalListener } from '@splitsoftware/splitio-commons/src/listeners/node';
|
|
6
5
|
import { now } from '@splitsoftware/splitio-commons/src/utils/timeTracker/now/node';
|
|
7
6
|
|
|
8
7
|
export const platform = {
|
|
9
|
-
getOptions,
|
|
10
8
|
getFetch,
|
|
11
9
|
getEventSource,
|
|
12
10
|
EventEmitter,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const packageVersion = '10.24.1';
|
|
1
|
+
export const packageVersion = '10.24.2-rc.1';
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
// @TODO
|
|
2
|
-
// 1- handle multiple protocols automatically
|
|
3
|
-
// 2- destroy it once the sdk is destroyed
|
|
4
|
-
import https from 'https';
|
|
5
|
-
var agent = new https.Agent({
|
|
6
|
-
keepAlive: true,
|
|
7
|
-
keepAliveMsecs: 1500
|
|
8
|
-
});
|
|
9
|
-
export function getOptions() {
|
|
10
|
-
return {
|
|
11
|
-
agent: agent
|
|
12
|
-
};
|
|
13
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getOptions = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
|
-
// @TODO
|
|
6
|
-
// 1- handle multiple protocols automatically
|
|
7
|
-
// 2- destroy it once the sdk is destroyed
|
|
8
|
-
var https_1 = (0, tslib_1.__importDefault)(require("https"));
|
|
9
|
-
var agent = new https_1.default.Agent({
|
|
10
|
-
keepAlive: true,
|
|
11
|
-
keepAliveMsecs: 1500
|
|
12
|
-
});
|
|
13
|
-
function getOptions() {
|
|
14
|
-
return {
|
|
15
|
-
agent: agent
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
exports.getOptions = getOptions;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
// @TODO
|
|
2
|
-
// 1- handle multiple protocols automatically
|
|
3
|
-
// 2- destroy it once the sdk is destroyed
|
|
4
|
-
import https from 'https';
|
|
5
|
-
|
|
6
|
-
const agent = new https.Agent({
|
|
7
|
-
keepAlive: true,
|
|
8
|
-
keepAliveMsecs: 1500
|
|
9
|
-
});
|
|
10
|
-
|
|
11
|
-
export function getOptions() {
|
|
12
|
-
return {
|
|
13
|
-
agent
|
|
14
|
-
};
|
|
15
|
-
}
|