@splitsoftware/splitio-commons 2.4.0 → 2.4.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
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
2.4.1 (June 3, 2025)
|
|
2
|
+
- Bugfix - Improved the Proxy fallback to flag spec version 1.2 to handle cases where the Proxy does not return an end-of-stream marker in 400 status code responses.
|
|
3
|
+
|
|
1
4
|
2.4.0 (May 27, 2025)
|
|
2
5
|
- Added support for rule-based segments. These segments determine membership at runtime by evaluating their configured rules against the user attributes provided to the SDK.
|
|
3
6
|
- Added support for feature flag prerequisites. This allows customers to define dependency conditions between flags, which are evaluated before any allowlists or targeting rules.
|
|
@@ -26,9 +26,9 @@ function splitChangesFetcherFactory(fetchSplitChanges, settings, storage) {
|
|
|
26
26
|
settings.sync.flagSpecVersion = constants_1.FLAG_SPEC_VERSION;
|
|
27
27
|
}
|
|
28
28
|
var splitsPromise = fetchSplitChanges(since, noCache, till, settings.sync.flagSpecVersion === constants_1.FLAG_SPEC_VERSION ? rbSince : undefined)
|
|
29
|
-
// Handle proxy error with spec 1.3
|
|
30
29
|
.catch(function (err) {
|
|
31
|
-
|
|
30
|
+
// Handle proxy error with spec 1.3
|
|
31
|
+
if ((!err.statusCode || err.statusCode === 400) && sdkEndpointOverridden(settings) && settings.sync.flagSpecVersion === constants_1.FLAG_SPEC_VERSION) {
|
|
32
32
|
log.error(constants_2.LOG_PREFIX_SYNC_SPLITS + 'Proxy error detected. Retrying with spec 1.2. If you are using Split Proxy, please upgrade to latest version');
|
|
33
33
|
lastProxyCheckTimestamp = Date.now();
|
|
34
34
|
settings.sync.flagSpecVersion = '1.2'; // fallback to 1.2 spec
|
|
@@ -23,9 +23,9 @@ export function splitChangesFetcherFactory(fetchSplitChanges, settings, storage)
|
|
|
23
23
|
settings.sync.flagSpecVersion = FLAG_SPEC_VERSION;
|
|
24
24
|
}
|
|
25
25
|
var splitsPromise = fetchSplitChanges(since, noCache, till, settings.sync.flagSpecVersion === FLAG_SPEC_VERSION ? rbSince : undefined)
|
|
26
|
-
// Handle proxy error with spec 1.3
|
|
27
26
|
.catch(function (err) {
|
|
28
|
-
|
|
27
|
+
// Handle proxy error with spec 1.3
|
|
28
|
+
if ((!err.statusCode || err.statusCode === 400) && sdkEndpointOverridden(settings) && settings.sync.flagSpecVersion === FLAG_SPEC_VERSION) {
|
|
29
29
|
log.error(LOG_PREFIX_SYNC_SPLITS + 'Proxy error detected. Retrying with spec 1.2. If you are using Split Proxy, please upgrade to latest version');
|
|
30
30
|
lastProxyCheckTimestamp = Date.now();
|
|
31
31
|
settings.sync.flagSpecVersion = '1.2'; // fallback to 1.2 spec
|
package/package.json
CHANGED
|
@@ -40,9 +40,9 @@ export function splitChangesFetcherFactory(fetchSplitChanges: IFetchSplitChanges
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
let splitsPromise = fetchSplitChanges(since, noCache, till, settings.sync.flagSpecVersion === FLAG_SPEC_VERSION ? rbSince : undefined)
|
|
43
|
-
// Handle proxy error with spec 1.3
|
|
44
43
|
.catch((err) => {
|
|
45
|
-
|
|
44
|
+
// Handle proxy error with spec 1.3
|
|
45
|
+
if ((!err.statusCode || err.statusCode === 400) && sdkEndpointOverridden(settings) && settings.sync.flagSpecVersion === FLAG_SPEC_VERSION) {
|
|
46
46
|
log.error(LOG_PREFIX_SYNC_SPLITS + 'Proxy error detected. Retrying with spec 1.2. If you are using Split Proxy, please upgrade to latest version');
|
|
47
47
|
lastProxyCheckTimestamp = Date.now();
|
|
48
48
|
settings.sync.flagSpecVersion = '1.2'; // fallback to 1.2 spec
|