@splitsoftware/splitio 10.26.0 → 10.26.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 +5 -1
- package/es/settings/defaults/version.js +1 -1
- package/es/settings/runtime/node.js +2 -2
- package/es/utils/ip.js +3 -5
- package/lib/settings/defaults/version.js +1 -1
- package/lib/settings/runtime/node.js +2 -2
- package/lib/utils/ip.js +9 -6
- package/package.json +2 -2
- package/src/settings/defaults/version.js +1 -1
- package/src/settings/runtime/node.js +2 -2
- package/src/utils/ip.js +3 -6
package/CHANGES.txt
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
10.26.1 (June XX, 2024)
|
|
2
|
+
- Updated the internal import of the 'os' module in NodeJS to use ES modules when bundling and running a .mjs file with the SDK code.
|
|
3
|
+
- Updated @splitsoftware/splitio-commons package to version 1.15.1 that includes updates on input validation logs.
|
|
4
|
+
|
|
1
5
|
10.26.0 (May 6, 2024)
|
|
2
6
|
- Updated @splitsoftware/splitio-commons package to version 1.14.0 that includes minor updates:
|
|
3
7
|
- Added support for targeting rules based on semantic versions (https://semver.org/).
|
|
@@ -80,7 +84,7 @@
|
|
|
80
84
|
- Bugfixing - Moved js-yaml dependency from @splitsoftware/splitio-commons to avoid resolution to an incompatible version on certain npm versions when installing third-party dependencies that also define js-yaml as transitive dependency (Related to issue https://github.com/splitio/javascript-client/issues/662).
|
|
81
85
|
|
|
82
86
|
10.20.0 (June 29, 2022)
|
|
83
|
-
- Added a new config option to control the tasks that listen or poll for updates on feature flags and segments, via the new config sync.enabled
|
|
87
|
+
- Added a new config option to control the tasks that listen or poll for updates on feature flags and segments, via the new config `sync.enabled`. Running online Split will always pull the most recent updates upon initialization, this only affects updates fetching on a running instance. Useful when a consistent session experience is a must or to save resources when updates are not being used.
|
|
84
88
|
- Updated telemetry logic to track the anonymous config for user consent flag set to declined or unknown.
|
|
85
89
|
- Updated submitters logic, to avoid duplicating the post of impressions to Split cloud when the SDK is destroyed while its periodic post of impressions is running.
|
|
86
90
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export var packageVersion = '10.26.0';
|
|
1
|
+
export var packageVersion = '10.26.1-rc.0';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import osFunction from 'os';
|
|
2
|
-
import
|
|
2
|
+
import { address } from '../../utils/ip';
|
|
3
3
|
import { UNKNOWN, NA, CONSUMER_MODE } from '@splitsoftware/splitio-commons/esm/utils/constants';
|
|
4
4
|
export function validateRuntime(settings) {
|
|
5
5
|
var isIPAddressesEnabled = settings.core.IPAddressesEnabled === true;
|
|
6
6
|
var isConsumerMode = settings.mode === CONSUMER_MODE;
|
|
7
7
|
// If the values are not available, default to false (for standalone) or "unknown" (for consumer mode, to be used on Redis keys)
|
|
8
|
-
var ip =
|
|
8
|
+
var ip = address() || (isConsumerMode ? UNKNOWN : false);
|
|
9
9
|
var hostname = osFunction.hostname() || (isConsumerMode ? UNKNOWN : false);
|
|
10
10
|
if (!isIPAddressesEnabled) { // If IPAddresses setting is not enabled, set as false (for standalone) or "NA" (for consumer mode, to be used on Redis keys)
|
|
11
11
|
ip = hostname = isConsumerMode ? NA : false;
|
package/es/utils/ip.js
CHANGED
|
@@ -12,9 +12,7 @@ The above copyright notice and this permission notice shall be included in all c
|
|
|
12
12
|
|
|
13
13
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
14
14
|
*/
|
|
15
|
-
|
|
16
|
-
var ip = exports;
|
|
17
|
-
var os = require('os');
|
|
15
|
+
import os from 'os';
|
|
18
16
|
function _resolveFamily(family) {
|
|
19
17
|
return typeof family === 'number' ? 'ipv' + family : family.toLowerCase();
|
|
20
18
|
}
|
|
@@ -69,7 +67,7 @@ function loopback(family) {
|
|
|
69
67
|
// * 'private': the first private ip address of family.
|
|
70
68
|
// * undefined: First address with `ipv4` or loopback address `127.0.0.1`.
|
|
71
69
|
//
|
|
72
|
-
|
|
70
|
+
export function address(name, family) {
|
|
73
71
|
var interfaces = os.networkInterfaces();
|
|
74
72
|
var all;
|
|
75
73
|
//
|
|
@@ -108,4 +106,4 @@ ip.address = function (name, family) {
|
|
|
108
106
|
return addresses.length ? addresses[0].address : undefined;
|
|
109
107
|
}).filter(Boolean);
|
|
110
108
|
return !all.length ? loopback(family) : all[0];
|
|
111
|
-
}
|
|
109
|
+
}
|
|
@@ -3,13 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.validateRuntime = void 0;
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
5
|
var os_1 = (0, tslib_1.__importDefault)(require("os"));
|
|
6
|
-
var ip_1 =
|
|
6
|
+
var ip_1 = require("../../utils/ip");
|
|
7
7
|
var constants_1 = require("@splitsoftware/splitio-commons/cjs/utils/constants");
|
|
8
8
|
function validateRuntime(settings) {
|
|
9
9
|
var isIPAddressesEnabled = settings.core.IPAddressesEnabled === true;
|
|
10
10
|
var isConsumerMode = settings.mode === constants_1.CONSUMER_MODE;
|
|
11
11
|
// If the values are not available, default to false (for standalone) or "unknown" (for consumer mode, to be used on Redis keys)
|
|
12
|
-
var ip = ip_1.
|
|
12
|
+
var ip = (0, ip_1.address)() || (isConsumerMode ? constants_1.UNKNOWN : false);
|
|
13
13
|
var hostname = os_1.default.hostname() || (isConsumerMode ? constants_1.UNKNOWN : false);
|
|
14
14
|
if (!isIPAddressesEnabled) { // If IPAddresses setting is not enabled, set as false (for standalone) or "NA" (for consumer mode, to be used on Redis keys)
|
|
15
15
|
ip = hostname = isConsumerMode ? constants_1.NA : false;
|
package/lib/utils/ip.js
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.address = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
1
5
|
/* eslint-disable no-redeclare */
|
|
2
6
|
/*
|
|
3
7
|
Trimmed version of "ip" package (https://www.npmjs.com/package/ip) that fixes an error when running in Node v18.
|
|
@@ -12,9 +16,7 @@ The above copyright notice and this permission notice shall be included in all c
|
|
|
12
16
|
|
|
13
17
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
14
18
|
*/
|
|
15
|
-
|
|
16
|
-
var ip = exports;
|
|
17
|
-
var os = require('os');
|
|
19
|
+
var os_1 = (0, tslib_1.__importDefault)(require("os"));
|
|
18
20
|
function _resolveFamily(family) {
|
|
19
21
|
return typeof family === 'number' ? 'ipv' + family : family.toLowerCase();
|
|
20
22
|
}
|
|
@@ -69,8 +71,8 @@ function loopback(family) {
|
|
|
69
71
|
// * 'private': the first private ip address of family.
|
|
70
72
|
// * undefined: First address with `ipv4` or loopback address `127.0.0.1`.
|
|
71
73
|
//
|
|
72
|
-
|
|
73
|
-
var interfaces =
|
|
74
|
+
function address(name, family) {
|
|
75
|
+
var interfaces = os_1.default.networkInterfaces();
|
|
74
76
|
var all;
|
|
75
77
|
//
|
|
76
78
|
// Default to `ipv4`
|
|
@@ -108,4 +110,5 @@ ip.address = function (name, family) {
|
|
|
108
110
|
return addresses.length ? addresses[0].address : undefined;
|
|
109
111
|
}).filter(Boolean);
|
|
110
112
|
return !all.length ? loopback(family) : all[0];
|
|
111
|
-
}
|
|
113
|
+
}
|
|
114
|
+
exports.address = address;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@splitsoftware/splitio",
|
|
3
|
-
"version": "10.26.0",
|
|
3
|
+
"version": "10.26.1-rc.0",
|
|
4
4
|
"description": "Split SDK",
|
|
5
5
|
"files": [
|
|
6
6
|
"README.md",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"node": ">=6"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@splitsoftware/splitio-commons": "1.
|
|
43
|
+
"@splitsoftware/splitio-commons": "1.15.1-rc.0",
|
|
44
44
|
"@types/google.analytics": "0.0.40",
|
|
45
45
|
"@types/ioredis": "^4.28.0",
|
|
46
46
|
"bloom-filters": "^3.0.0",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const packageVersion = '10.26.0';
|
|
1
|
+
export const packageVersion = '10.26.1-rc.0';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import osFunction from 'os';
|
|
2
|
-
import
|
|
2
|
+
import { address } from '../../utils/ip';
|
|
3
3
|
|
|
4
4
|
import { UNKNOWN, NA, CONSUMER_MODE } from '@splitsoftware/splitio-commons/src/utils/constants';
|
|
5
5
|
|
|
@@ -8,7 +8,7 @@ export function validateRuntime(settings) {
|
|
|
8
8
|
const isConsumerMode = settings.mode === CONSUMER_MODE;
|
|
9
9
|
|
|
10
10
|
// If the values are not available, default to false (for standalone) or "unknown" (for consumer mode, to be used on Redis keys)
|
|
11
|
-
let ip =
|
|
11
|
+
let ip = address() || (isConsumerMode ? UNKNOWN : false);
|
|
12
12
|
let hostname = osFunction.hostname() || (isConsumerMode ? UNKNOWN : false);
|
|
13
13
|
|
|
14
14
|
if (!isIPAddressesEnabled) { // If IPAddresses setting is not enabled, set as false (for standalone) or "NA" (for consumer mode, to be used on Redis keys)
|
package/src/utils/ip.js
CHANGED
|
@@ -12,10 +12,7 @@ The above copyright notice and this permission notice shall be included in all c
|
|
|
12
12
|
|
|
13
13
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
14
14
|
*/
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
var ip = exports;
|
|
18
|
-
var os = require('os');
|
|
15
|
+
import os from 'os';
|
|
19
16
|
|
|
20
17
|
function _resolveFamily(family) {
|
|
21
18
|
return typeof family === 'number' ? 'ipv' + family : family.toLowerCase();
|
|
@@ -79,7 +76,7 @@ function loopback(family) {
|
|
|
79
76
|
// * 'private': the first private ip address of family.
|
|
80
77
|
// * undefined: First address with `ipv4` or loopback address `127.0.0.1`.
|
|
81
78
|
//
|
|
82
|
-
|
|
79
|
+
export function address(name, family) {
|
|
83
80
|
var interfaces = os.networkInterfaces();
|
|
84
81
|
var all;
|
|
85
82
|
|
|
@@ -123,4 +120,4 @@ ip.address = function (name, family) {
|
|
|
123
120
|
}).filter(Boolean);
|
|
124
121
|
|
|
125
122
|
return !all.length ? loopback(family) : all[0];
|
|
126
|
-
}
|
|
123
|
+
}
|