Skip to content

Commit f5b6960

Browse files
update changes file
1 parent 57e244f commit f5b6960

File tree

6 files changed

+11
-26
lines changed

6 files changed

+11
-26
lines changed

CHANGES.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
2.9.0
2+
- Added property `impressionsDisabled` in getTreatment(s) `evaluationOptions` parameter, to disable impressions per evaluations.
3+
14
2.8.0 (October 30, 2025)
25
- 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.
36
- Added `client.getStatus()` method to retrieve the client readiness status properties (`isReady`, `isReadyFromCache`, etc).

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@splitsoftware/splitio-commons",
3-
"version": "2.8.0",
3+
"version": "2.8.1-rc.1",
44
"description": "Split JavaScript SDK common components",
55
"main": "cjs/index.js",
66
"module": "esm/index.js",

src/sdkClient/__tests__/clientInputValidation.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,11 +112,11 @@ describe('clientInputValidationDecorator', () => {
112112
expect(clientWithValidation.getTreatment('key', 'ff', undefined, { impressionsDisabled: true })).toBe(EVALUATION_RESULT);
113113
expect(client.getTreatment).toHaveBeenLastCalledWith('key', 'ff', undefined, { impressionsDisabled: true });
114114

115-
expect(clientWithValidation.getTreatment('key', 'ff', undefined, { impressionsDisabled: {} })).toBe(EVALUATION_RESULT);
115+
expect(clientWithValidation.getTreatment('key', 'ff', undefined, { impressionsDisabled: false })).toBe(EVALUATION_RESULT);
116116
expect(client.getTreatment).toHaveBeenLastCalledWith('key', 'ff', undefined, undefined);
117117

118-
expect(clientWithValidation.getTreatment('key', 'ff', undefined, { impressionsDisabled: 'true' })).toBe(EVALUATION_RESULT);
119-
expect(client.getTreatment).toHaveBeenLastCalledWith('key', 'ff', undefined, undefined);
118+
expect(clientWithValidation.getTreatment('key', 'ff', undefined, { impressionsDisabled: true })).toBe(EVALUATION_RESULT);
119+
expect(client.getTreatment).toHaveBeenLastCalledWith('key', 'ff', undefined, { impressionsDisabled: true });
120120

121121
expect(clientWithValidation.getTreatment('key', 'ff', undefined, { impressionsDisabled: null })).toBe(EVALUATION_RESULT);
122122
expect(client.getTreatment).toHaveBeenLastCalledWith('key', 'ff', undefined, undefined);

src/utils/inputValidation/__tests__/eventProperties.spec.ts

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ERROR_NOT_BOOLEAN, ERROR_NOT_PLAIN_OBJECT, ERROR_SIZE_EXCEEDED, WARN_SETTING_NULL, WARN_TRIMMING_PROPERTIES } from '../../../logger/constants';
1+
import { ERROR_NOT_PLAIN_OBJECT, ERROR_SIZE_EXCEEDED, WARN_SETTING_NULL, WARN_TRIMMING_PROPERTIES } from '../../../logger/constants';
22
import { loggerMock } from '../../../logger/__tests__/sdkLogger.mock';
33

44
import { validateEventProperties } from '../eventProperties';
@@ -193,21 +193,3 @@ describe('INPUT VALIDATION for Event Properties', () => {
193193
expect(loggerMock.error).toBeCalledWith(ERROR_SIZE_EXCEEDED, ['some_method_eventProps']); // Should log an error.
194194
});
195195
});
196-
197-
describe('INPUT VALIDATION for Impressions disabled', () => {
198-
199-
afterEach(() => { loggerMock.mockClear(); });
200-
201-
const impressionsDisabledInvalidValues = [
202-
[],
203-
() => { },
204-
'something',
205-
NaN,
206-
-Infinity,
207-
Infinity,
208-
new Promise(res => res),
209-
Symbol('asd'),
210-
new Map()
211-
];
212-
213-
});

src/utils/inputValidation/eventProperties.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { isObject, isString, isFiniteNumber, isBoolean } from '../lang';
22
import { objectAssign } from '../lang/objectAssign';
33
import SplitIO from '../../../types/splitio';
44
import { ILogger } from '../../logger/types';
5-
import { ERROR_NOT_PLAIN_OBJECT, ERROR_NOT_BOOLEAN, ERROR_SIZE_EXCEEDED, WARN_SETTING_NULL, WARN_TRIMMING_PROPERTIES } from '../../logger/constants';
5+
import { ERROR_NOT_PLAIN_OBJECT, ERROR_SIZE_EXCEEDED, WARN_SETTING_NULL, WARN_TRIMMING_PROPERTIES } from '../../logger/constants';
66

77
const ECMA_SIZES = {
88
NULL: 0, // While on the JSON it's going to occupy more space, we'll take it as 0 for the approximation.

0 commit comments

Comments
 (0)