Skip to content

Commit ea5e43a

Browse files
Merge pull request #827 from splitio/breaking_changes
Breaking changes
2 parents 2e5d502 + 8d92ba9 commit ea5e43a

32 files changed

+100
-3245
lines changed

.eslintrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
],
4747
"rules": {
4848
"no-restricted-syntax": ["error", "ForOfStatement", "ForInStatement", "ArrayPattern"],
49-
"compat/compat": ["error", "defaults, ie 10, node 6"],
49+
"compat/compat": ["error", "defaults, node >=14"],
5050
"no-throw-literal": "error",
5151
"import/no-default-export": "error",
5252
"import/no-self-import": "error"

.github/workflows/ci-cd.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
run: BUILD_BRANCH=$(echo "${GITHUB_REF#refs/heads/}") npm run build
5959

6060
- name: Store assets
61-
if: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/development' || github.ref == 'refs/heads/master') }}
61+
if: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/refactor_type_definitions' || github.ref == 'refs/heads/master') }}
6262
uses: actions/upload-artifact@v3
6363
with:
6464
name: assets
@@ -69,7 +69,7 @@ jobs:
6969
name: Upload assets
7070
runs-on: ubuntu-20.04
7171
needs: build
72-
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/development' }}
72+
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/refactor_type_definitions' }}
7373
strategy:
7474
matrix:
7575
environment:

CHANGES.txt

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1-
11.0.0 (October XX, 2024)
1+
11.0.0 (November 1, 2024)
22
- Added support for targeting rules based on large segments for browsers.
33
- Added `factory.destroy()` method, which invokes the `destroy` method of all clients created by the factory.
44
- Updated @splitsoftware/splitio-commons package to version 2.0.0 that includes major updates and updated some transitive dependencies for vulnerability fixes.
5-
- Bugfixing - Removed an overloaded `client` method in the `SplitIO.ISDK` interface that accepted a key and trafficType parameters. This interface corresponds to the SDK factory instance in NodeJS, which, unlike `SplitIO.IBrowserSDK` for the Browser, does not handle multiple client instances based on keys or traffic types.
5+
- Renamed distribution folders from `/lib` to `/cjs` for CommonJS build, and `/es` to `/esm` for ECMAScript Modules build.
66
- BREAKING CHANGES:
7-
- Renamed distribution folders from `/lib` to `/cjs` for CommonJS build, and `/es` to `/esm` for EcmaScript Modules build.
7+
- Dropped support for NodeJS v6. The SDK now requires NodeJS v14 or above.
8+
- 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.
9+
- Removed the deprecated `GOOGLE_ANALYTICS_TO_SPLIT` and `SPLIT_TO_GOOGLE_ANALYTICS` integrations. The `integrations` configuration option has been removed from the SDK factory configuration, along with the associated interfaces in the TypeScript definitions.
10+
- Removed the `core.trafficType` configuration option (`SplitIO.IBrowserSettings['core']['trafficType]`) and the `trafficType` parameter from the SDK `client()` method in Browser (`SplitIO.IBrowserSDK['client']`). As a result, traffic types can no longer be bound to SDK clients, and the traffic type must be provided in the `track` method.
811

912
10.28.0 (September 6, 2024)
1013
- Updated @splitsoftware/splitio-commons package to version 1.17.0 that includes minor updates:
@@ -515,7 +518,7 @@
515518
- Bugfixing - Return correct label when consulted Split is not found.
516519

517520
9.1.1 (May 03, 2017)
518-
- Bugfixing - Fixed invalid behaviour when using native Fetch API and comparing statusText
521+
- Bugfixing - Fixed invalid behavior when using native Fetch API and comparing statusText
519522
instead of resp.ok
520523

521524
9.1.0 (April 21, 2017)

karma/e2e.gaIntegration.karma.conf.js

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

package-lock.json

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

package.json

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@splitsoftware/splitio",
3-
"version": "10.28.1-rc.4",
3+
"version": "11.0.0-rc.5",
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
],
@@ -36,13 +35,10 @@
3635
"module": "esm/index.js",
3736
"types": "types",
3837
"engines": {
39-
"npm": ">=3",
40-
"node": ">=6"
38+
"node": ">=14.0.0"
4139
},
4240
"dependencies": {
43-
"@splitsoftware/splitio-commons": "1.17.1-rc.4",
44-
"@types/google.analytics": "0.0.40",
45-
"@types/ioredis": "^4.28.0",
41+
"@splitsoftware/splitio-commons": "2.0.0-rc.6",
4642
"bloom-filters": "^3.0.0",
4743
"ioredis": "^4.28.0",
4844
"js-yaml": "^3.13.1",
@@ -91,7 +87,6 @@
9187
"postbuild-cjs": "cross-env NODE_ENV=cjs node scripts/copy.packages.json.js && ./scripts/build_cjs_replace_imports.sh",
9288
"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",
9389
"build:npm": "npm run build-cjs && npm run build-esm",
94-
"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",
9590
"build": "npm run build-cjs && npm run build-esm && npm run build-umd",
9691
"check": "npm run check:lint && npm run check:version",
9792
"check:lint": "eslint src",
@@ -104,7 +99,6 @@
10499
"test-browser-e2e-destroy": "cross-env NODE_ENV=test karma start karma/e2e.destroy.karma.conf.js",
105100
"test-browser-e2e-errorCatching": "cross-env NODE_ENV=test karma start karma/e2e.errorCatching.karma.conf.js",
106101
"test-browser-e2e-push": "cross-env NODE_ENV=test karma start karma/e2e.push.karma.conf.js",
107-
"test-browser-e2e-gaIntegration": "cross-env NODE_ENV=test karma start karma/e2e.gaIntegration.karma.conf.js",
108102
"test-node": "npm run test-node-unit && npm run test-node-e2e",
109103
"test-node-unit": "cross-env NODE_ENV=test tape -r ./ts-node.register \"src/*/**/__tests__/**/!(browser).spec.js\" | tap-min",
110104
"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",
@@ -114,9 +108,7 @@
114108
"test-node-e2e-errorCatching": "cross-env NODE_ENV=test tape -r ./ts-node.register src/__tests__/errorCatching/node.spec.js | tap-min",
115109
"test-node-e2e-push": "cross-env NODE_ENV=test tape -r ./ts-node.register src/__tests__/push/node.spec.js | tap-min",
116110
"test-node-e2e-redis": "cross-env NODE_ENV=test tape -r ./ts-node.register src/__tests__/consumer/node_redis.spec.js | tap-min",
117-
"pretest-ts-decls": "npm run build-esm && npm run build-cjs && npm link",
118-
"test-ts-decls": "./scripts/ts-tests.sh",
119-
"posttest-ts-decls": "npm rm --location=global @splitsoftware/splitio && npm install",
111+
"test-ts-decls": "tsc --build ts-tests",
120112
"test": "npm run test-node && npm run test-browser",
121113
"all": "npm run check && npm run build && npm run test-ts-decls && npm run test",
122114
"publish:rc": "npm run check && npm run build && npm publish --tag canary",

scripts/ga-to-split-autorequire.js

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

scripts/ts-tests.sh

Lines changed: 0 additions & 28 deletions
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)