Skip to content

Commit 4b4782d

Browse files
Merge pull request #101 from splitio/development
Release v0.11.0
2 parents 1f521ff + aed92aa commit 4b4782d

18 files changed

Lines changed: 169 additions & 126 deletions

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @splitio/sdk

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,4 +114,6 @@ dist
114114
## IDEs
115115
/.vscode
116116
/.idea
117-
.DS_Store
117+
118+
.DS_Store
119+
/karma/bundle.js

CHANGES.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
0.11.0 (October 31, 2023)
2+
- Added `defaultTreatment` property to the `SplitView` object returned by the `split` and `splits` methods of the SDK manager (Related to issue https://github.com/splitio/javascript-commons/issues/225).
3+
- Updated @splitsoftware/splitio-commons package to version 1.10.0 that includes vulnerability fixes, and adds the `defaultTreatment` property to the `SplitView` object.
4+
15
0.10.1 (September 22, 2023)
26
- Updated @splitsoftware/splitio-commons package to version 1.9.1. This update removes the handler for 'unload' DOM events, that can prevent browsers from being able to put pages in the back/forward cache for faster back and forward loads (Related to issue https://github.com/splitio/javascript-client/issues/759).
37

karma/config.debug.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ module.exports = merge({}, require('./config'), {
88
],
99
rollupPreprocessor: {
1010
output: {
11+
file: 'karma/bundle.js',
1112
sourcemap: 'inline',
1213
},
1314
},

karma/config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ module.exports = {
3636
rollupPreprocessor: {
3737
// `input` is handled by karma-rollup-preprocessor.
3838
output: {
39+
file: 'karma/bundle.js',
3940
format: 'umd',
4041
name: 'splitio',
4142
// sourcemap: 'inline', // Uncomment for debugging

package-lock.json

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

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@splitsoftware/splitio-browserjs",
3-
"version": "0.10.1",
3+
"version": "0.11.0",
44
"description": "Split SDK for JavaScript on Browser",
55
"main": "cjs/index.js",
66
"module": "esm/index.js",
@@ -30,7 +30,7 @@
3030
"build:ga-to-split-autorequire": "terser ./node_modules/@splitsoftware/splitio-commons/src/integrations/ga/autoRequire.js --mangle --output ./scripts/ga-to-split-autorequire.js",
3131
"test": "npm run test:unit && npm run test:e2e",
3232
"test:unit": "jest",
33-
"test:e2e": "npm run test:e2e-logger && npm run test:e2e-offline && npm run test:e2e-online && npm run test:e2e-destroy && npm run test:e2e-errorCatching && npm run test:e2e-push && npm run test:e2e-gaIntegration && npm run test:e2e-consumer",
33+
"test:e2e": "npm run test:e2e-logger && npm run test:e2e-offline && npm run test:e2e-online && npm run test:e2e-destroy && npm run test:e2e-errorCatching && npm run test:e2e-push && npm run test:e2e-consumer",
3434
"test:e2e-logger": "karma start karma/e2e.logger.karma.conf.js",
3535
"test:e2e-offline": "karma start karma/e2e.offline.karma.conf.js",
3636
"test:e2e-online": "karma start karma/e2e.online.karma.conf.js",
@@ -64,7 +64,7 @@
6464
"bugs": "https://github.com/splitio/javascript-browser-client/issues",
6565
"homepage": "https://github.com/splitio/javascript-browser-client#readme",
6666
"dependencies": {
67-
"@splitsoftware/splitio-commons": "1.9.1",
67+
"@splitsoftware/splitio-commons": "1.10.0",
6868
"@types/google.analytics": "0.0.40",
6969
"unfetch": "^4.2.0"
7070
},

src/__tests__/browserSuites/manager.spec.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ export default async function (settings, fetchMock, assert) {
3939
'killed': mockSplits.splits[index].killed,
4040
'changeNumber': mockSplits.splits[index].changeNumber,
4141
'treatments': map(mockSplits.splits[index].conditions[0].partitions, partition => partition.treatment),
42-
'configs': mockSplits.splits[index].configurations || {}
42+
'configs': mockSplits.splits[index].configurations || {},
43+
'defaultTreatment': mockSplits.splits[index].defaultTreatment
4344
});
4445

4546
assert.equal(manager.split('non_existent'), null, 'Trying to get a manager.split() of a Split that does not exist returns null.');

src/__tests__/browserSuites/ready-promise.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ function assertGetTreatmentWhenReady(assert, client) {
3131
function assertGetTreatmentControlNotReady(assert, client) {
3232
consoleSpy.log.resetHistory();
3333
assert.equal(client.getTreatment('hierarchical_splits_test'), 'control', 'We should get control if client is not ready.');
34-
assert.true(consoleSpy.log.calledWithExactly('[WARN] splitio => getTreatment: the SDK is not ready, results may be incorrect. Make sure to wait for SDK readiness before using this method.'), 'Telling us that calling getTreatment would return CONTROL since SDK is not ready at this point.');
34+
assert.true(consoleSpy.log.calledWithExactly('[WARN] splitio => getTreatment: the SDK is not ready, results may be incorrect for feature flag hierarchical_splits_test. Make sure to wait for SDK readiness before using this method.'), 'Telling us that calling getTreatment would return CONTROL since SDK is not ready at this point.');
3535
}
3636

3737
function assertGetTreatmentControlNotReadyOnDestroy(assert, client) {

src/__tests__/consumer/browser_consumer.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { version } from '../../../package.json';
1010
import { SplitFactory, PluggableStorage } from '../../';
1111

1212
const expectedSplitName = 'hierarchical_splits_testing_on';
13-
const expectedSplitView = { name: 'hierarchical_splits_testing_on', trafficType: 'user', killed: false, changeNumber: 1487277320548, treatments: ['on', 'off'], configs: {} };
13+
const expectedSplitView = { name: 'hierarchical_splits_testing_on', trafficType: 'user', killed: false, changeNumber: 1487277320548, treatments: ['on', 'off'], configs: {}, defaultTreatment: 'off' };
1414

1515
const wrapperPrefix = 'PLUGGABLE_STORAGE_UT';
1616
const wrapperInstance = inMemoryWrapperFactory();

0 commit comments

Comments
 (0)