Skip to content

Commit 9a787a8

Browse files
Upgrade JS-commons. Updated type definitions & tests
1 parent 32002c7 commit 9a787a8

21 files changed

Lines changed: 44 additions & 1445 deletions

CHANGES.txt

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
0.16.0 (September XX, 2024)
2-
- Added `factory.destroy()` method, which invokes the `destroy` method on all SDK clients created by the factory.
3-
- Updated @splitsoftware/splitio-commons package to version 1.18.0 that includes minor updates:
4-
- Added support for targeting rules based on large segments for browsers.
5-
- Updated some transitive dependencies for vulnerability fixes.
1+
1.0.0 (October XX, 2024)
2+
- Added support for targeting rules based on large segments for browsers.
3+
- Added `factory.destroy()` method, which invokes the `destroy` method of all clients created by the factory.
4+
- Updated @splitsoftware/splitio-commons package to version 2.0.0 that includes major updates and updated some transitive dependencies for vulnerability fixes.
5+
- BREAKING CHANGES:
6+
- Removed internal ponyfills for the `Map` and `Set` global objects, dropping support for IE and other outdated browsers. The SDK now requires the runtime environment to support these features natively or provide a polyfill.
7+
- Removed the deprecated `GoogleAnalyticsToSplit` and `SplitToGoogleAnalytics` pluggable integration modules, along with the related interfaces in the TypeScript definitions.
68

79
0.15.0 (September 13, 2024)
810
- Updated @splitsoftware/splitio-commons package to version 1.17.0 that includes minor updates:
@@ -58,7 +60,7 @@
5860
- Updated some transitive dependencies for vulnerability fixes.
5961
- Updated @splitsoftware/splitio-commons package to version 1.8.3 that includes:
6062
- Updated SDK_READY_TIMED_OUT event to be emitted immediately when a connection error occurs using pluggable storage (i.e., when the wrapper `connect` promise is rejected) in consumer and partial consumer modes.
61-
- Bugfixing - The `destroy` method has been updated to immediately flag the SDK client as destroyed, to prevent unexpected behaviours when `getTreatment` and `track` methods are called synchronously after `destroy` method is called.
63+
- Bugfixing - The `destroy` method has been updated to immediately flag the SDK client as destroyed, to prevent unexpected behaviors when `getTreatment` and `track` methods are called synchronously after `destroy` method is called.
6264

6365
0.9.5 (May 15, 2023)
6466
- Updated @splitsoftware/splitio-commons package to version 1.8.2 that includes minor improvements.

karma/e2e.gaIntegration.karma.conf.js

Lines changed: 0 additions & 20 deletions
This file was deleted.

package-lock.json

Lines changed: 9 additions & 20 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 & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@splitsoftware/splitio-browserjs",
3-
"version": "0.15.1-rc.0",
3+
"version": "1.0.0-rc.0",
44
"description": "Split SDK for JavaScript on Browser",
55
"main": "cjs/index.js",
66
"module": "esm/index.js",
@@ -14,8 +14,7 @@
1414
"esm",
1515
"src",
1616
"types",
17-
"full",
18-
"scripts/ga-to-split-autorequire.js"
17+
"full"
1918
],
2019
"scripts": {
2120
"check": "npm run check:lint && npm run check:types && npm run check:version",
@@ -27,7 +26,6 @@
2726
"build:cjs": "rimraf cjs && tsc -outDir cjs -m CommonJS && ./scripts/build_cjs_replace_imports.sh",
2827
"build:umd-visualizer": "rimraf umd && rollup --config rollup.visualizer.config.js",
2928
"build:umd": "rimraf umd && rollup --config rollup.ci.config.js --branch=$BUILD_BRANCH",
30-
"build:ga-to-split-autorequire": "terser ./node_modules/@splitsoftware/splitio-commons/src/integrations/ga/autoRequire.js --mangle --output ./scripts/ga-to-split-autorequire.js",
3129
"test": "npm run test:unit && npm run test:e2e",
3230
"test:unit": "jest",
3331
"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",
@@ -37,7 +35,6 @@
3735
"test:e2e-destroy": "karma start karma/e2e.destroy.karma.conf.js",
3836
"test:e2e-errorCatching": "karma start karma/e2e.errorCatching.karma.conf.js",
3937
"test:e2e-push": "karma start karma/e2e.push.karma.conf.js",
40-
"test:e2e-gaIntegration": "karma start karma/e2e.gaIntegration.karma.conf.js",
4138
"test:e2e-consumer": "karma start karma/e2e.consumer.karma.conf.js",
4239
"pretest-ts-decls": "npm run build:esm && npm run build:cjs && npm link",
4340
"test-ts-decls": "./scripts/ts-tests.sh",
@@ -64,8 +61,7 @@
6461
"bugs": "https://github.com/splitio/javascript-browser-client/issues",
6562
"homepage": "https://github.com/splitio/javascript-browser-client#readme",
6663
"dependencies": {
67-
"@splitsoftware/splitio-commons": "1.17.1-rc.1",
68-
"@types/google.analytics": "0.0.40",
64+
"@splitsoftware/splitio-commons": "2.0.0-rc.0",
6965
"tslib": "^2.3.1",
7066
"unfetch": "^4.2.0"
7167
},

scripts/ga-to-split-autorequire.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/__tests__/browserSuites/user-consent.spec.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ function mockSubmittersRequests(fetchMock, assert, impressionFeature, eventTypeI
7272

7373
export default function userConsent(fetchMock, t) {
7474

75-
// Validate trackers, submitters and browser listener behaviour on different consent status transitions
75+
// Validate trackers, submitters and browser listener behavior on different consent status transitions
7676
t.test(async (assert) => {
7777
const sendBeaconSpy = sinon.spy(window.navigator, 'sendBeacon');
7878
let expectedTrackedImpressions = 0;
@@ -97,7 +97,7 @@ export default function userConsent(fetchMock, t) {
9797
], ['on', 'on', 'on', 'on', 'on', 'on', 'on', 'on'], 'evaluating on SDK ready');
9898
if (isTracking) expectedTrackedImpressions += 8;
9999

100-
// Trigger pagehide event to validate browser listener behaviour
100+
// Trigger pagehide event to validate browser listener behavior
101101
// Beacon API is used only if user consent is GRANTED
102102
triggerPagehideEvent();
103103
if (factory.UserConsent.getStatus() === factory.UserConsent.Status.GRANTED) {
@@ -137,9 +137,9 @@ export default function userConsent(fetchMock, t) {
137137
assert.equal(trackedImpressions.length, expectedTrackedImpressions, 'Tracked impressions are the expected');
138138
sendBeaconSpy.restore();
139139
assert.end();
140-
}, 'Validate trackers, submitters and browser listener behaviour on different consent status transitions');
140+
}, 'Validate trackers, submitters and browser listener behavior on different consent status transitions');
141141

142-
// Validate submitter's behaviour with full queues and with events first push window
142+
// Validate submitter's behavior with full queues and with events first push window
143143
t.test(async (assert) => {
144144
const config = {
145145
...baseConfig,
@@ -182,6 +182,6 @@ export default function userConsent(fetchMock, t) {
182182
await client.destroy();
183183

184184
assert.end();
185-
}, 'Validate submitter\'s behaviour with full queues and with events first push window');
185+
}, 'Validate submitter\'s behavior with full queues and with events first push window');
186186

187187
}

src/__tests__/gaIntegration/both-integrations.spec.js

Lines changed: 0 additions & 134 deletions
This file was deleted.

src/__tests__/gaIntegration/browser.spec.js

Lines changed: 0 additions & 31 deletions
This file was deleted.

0 commit comments

Comments
 (0)