Skip to content

Commit 9eefd1b

Browse files
Upgrade JS-commons. Updated type definitions & tests
1 parent 4a58e9e commit 9eefd1b

23 files changed

Lines changed: 226 additions & 1675 deletions

karma/e2e.gaIntegration.karma.conf.js

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

package-lock.json

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

package.json

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@splitsoftware/splitio",
3-
"version": "10.28.1-rc.2",
3+
"version": "11.0.0-rc.0",
44
"description": "Split SDK",
55
"files": [
66
"README.md",
@@ -11,7 +11,6 @@
1111
"types",
1212
"esm",
1313
"src",
14-
"scripts/ga-to-split-autorequire.js",
1514
"client",
1615
"server"
1716
],
@@ -39,8 +38,7 @@
3938
"node": ">=14.0.0"
4039
},
4140
"dependencies": {
42-
"@splitsoftware/splitio-commons": "1.17.1-rc.1",
43-
"@types/google.analytics": "0.0.40",
41+
"@splitsoftware/splitio-commons": "2.0.0-rc.0",
4442
"@types/ioredis": "^4.28.0",
4543
"bloom-filters": "^3.0.0",
4644
"ioredis": "^4.28.0",
@@ -90,7 +88,6 @@
9088
"postbuild-cjs": "cross-env NODE_ENV=cjs node scripts/copy.packages.json.js && ./scripts/build_cjs_replace_imports.sh",
9189
"build-umd": "rimraf umd && webpack --config webpack.dev.js --env branch=$BUILD_BRANCH && webpack --config webpack.prod.js --env branch=$BUILD_BRANCH && ./scripts/clean_umd_build.sh",
9290
"build:npm": "npm run build-cjs && npm run build-esm",
93-
"build:ga-to-split-autorequire": "terser ./node_modules/@splitsoftware/splitio-commons/src/integrations/ga/autoRequire.js --mangle --output ./scripts/ga-to-split-autorequire.js && cp ./scripts/ga-to-split-autorequire.js umd/ga-to-split-autorequire.js",
9491
"build": "npm run build-cjs && npm run build-esm && npm run build-umd",
9592
"check": "npm run check:lint && npm run check:version",
9693
"check:lint": "eslint src",
@@ -103,7 +100,6 @@
103100
"test-browser-e2e-destroy": "cross-env NODE_ENV=test karma start karma/e2e.destroy.karma.conf.js",
104101
"test-browser-e2e-errorCatching": "cross-env NODE_ENV=test karma start karma/e2e.errorCatching.karma.conf.js",
105102
"test-browser-e2e-push": "cross-env NODE_ENV=test karma start karma/e2e.push.karma.conf.js",
106-
"test-browser-e2e-gaIntegration": "cross-env NODE_ENV=test karma start karma/e2e.gaIntegration.karma.conf.js",
107103
"test-node": "npm run test-node-unit && npm run test-node-e2e",
108104
"test-node-unit": "cross-env NODE_ENV=test tape -r ./ts-node.register \"src/*/**/__tests__/**/!(browser).spec.js\" | tap-min",
109105
"test-node-e2e": "npm run test-node-e2e-online && npm run test-node-e2e-offline && npm run test-node-e2e-destroy && npm run test-node-e2e-errorCatching && npm run test-node-e2e-push && npm run test-node-e2e-redis",

scripts/ga-to-split-autorequire.js

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

src/__tests__/browserSuites/telemetry.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ export default async function telemetryBrowserSuite(fetchMock, t) {
111111
oM: 0, st: 'memory', aF: 1, rF: 0, sE: false,
112112
rR: { sp: 99999, ms: 60, im: 300, ev: 60, te: 1 } /* override featuresRefreshRate */,
113113
uO: { s: true, e: true, a: false, st: false, t: true } /* override sdk, events and telemetry URLs */,
114-
iQ: 30000, eQ: 500, iM: 0, iL: false, hP: false, nR: 1 /* 1 non ready usage */, t: [], i: [], uC: 2 /* Default GRANTED */,
114+
iQ: 30000, eQ: 500, iM: 0, iL: false, hP: false, nR: 1 /* 1 non ready usage */, t: [], uC: 2 /* Default GRANTED */,
115115
fsT: 0, fsI: 0
116116
}, 'metrics/config JSON payload should be the expected');
117117

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
}

0 commit comments

Comments
 (0)