Skip to content

Commit 6c9cd48

Browse files
Merge pull request #121 from splitio/SDKS-8407_baseline
Upgrade JS commons v1.18.0: large segments and factory `destroy` method
2 parents bc2a6cf + ed16252 commit 6c9cd48

File tree

91 files changed

+1040
-3886
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+1040
-3886
lines changed

.eslintrc

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"parser": "@typescript-eslint/parser",
66
"plugins": [
77
"@typescript-eslint",
8+
"eslint-plugin-tsdoc",
89
"import"
910
],
1011

@@ -44,7 +45,7 @@
4445
],
4546
"rules": {
4647
"no-restricted-syntax": ["error", "ForOfStatement", "ForInStatement", "ArrayPattern"],
47-
"compat/compat": ["error", "defaults, ie 10"],
48+
"compat/compat": ["error", "defaults"],
4849
"no-throw-literal": "error",
4950
"import/no-default-export": "error",
5051
"import/no-self-import": "error",
@@ -60,7 +61,14 @@
6061
"files": ["types/**"],
6162
"rules": {
6263
"no-use-before-define": "off",
63-
"no-undef": "off" // turned off to avoid issue with triple-slash path directive
64+
"no-undef": "off" // turned off to avoid issue with SplitIO namespace not defined
65+
}
66+
},
67+
{
68+
// Enable TSDoc rules for TypeScript files, allowing the use of JSDoc in JS files.
69+
"files": ["**/*.ts"],
70+
"rules": {
71+
"tsdoc/syntax": "warn"
6472
}
6573
}
6674
],

CHANGES.txt

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
1.0.0 (November 1, 2024)
2+
- Added support for targeting rules based on large segments.
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+
- Dropped support for Split Proxy below version 5.9.0. The SDK now requires Split Proxy 5.9.0 or above.
7+
- 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.
8+
- Removed the deprecated `GoogleAnalyticsToSplit` and `SplitToGoogleAnalytics` pluggable integration modules, along with the related interfaces in the TypeScript definitions.
9+
- Removed the `LocalhostFromObject` export from the default import (`import { LocalhostFromObject } from '@splitsoftware/splitio-browserjs'`). It is no longer necessary to manually import and configure it in the `sync.localhostMode` option to enable localhost mode.
10+
111
0.15.0 (September 13, 2024)
212
- Updated @splitsoftware/splitio-commons package to version 1.17.0 that includes minor updates:
313
- Added `sync.requestOptions.getHeaderOverrides` configuration option to enhance SDK HTTP request Headers for Authorization Frameworks.
@@ -52,7 +62,7 @@
5262
- Updated some transitive dependencies for vulnerability fixes.
5363
- Updated @splitsoftware/splitio-commons package to version 1.8.3 that includes:
5464
- 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.
55-
- 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.
65+
- 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.
5666

5767
0.9.5 (May 15, 2023)
5868
- Updated @splitsoftware/splitio-commons package to version 1.8.2 that includes minor improvements.
@@ -62,7 +72,7 @@
6272

6373
0.9.4 (May 4, 2023)
6474
- Updated some transitive dependencies for vulnerability fixes.
65-
- Bugfixing - Updated `unfetch` package as a runtime dependency, required when using the "full" entrypoint (`import { SplitFactory } from '@splitsoftware/splitio-browserjs/full'`).
75+
- Bugfixing - Updated `unfetch` package as a runtime dependency, required when using the "full" import (`import { SplitFactory } from '@splitsoftware/splitio-browserjs/full'`).
6676

6777
0.9.3 (March 20, 2023)
6878
- Updated @splitsoftware/splitio-commons package to version 1.8.1 that includes minor improvements.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This SDK is designed to work with Split, the platform for controlled rollouts, w
1010
## Compatibility
1111
The JS Browser SDK is a library for Web browser environments.
1212

13-
The library was build to support ES5 syntax and all major browsers. *However, there are a few polyfills that would be required when targeting old browsers that don't have native support for Promises and Fetch Web API. You should include a Promise polyfill like [es6-promise](https://github.com/stefanpenner/es6-promise), and a Fetch polyfill such as [whatwg-fetch](https://cdn.jsdelivr.net/npm/whatwg-fetch@3.5.0/dist/fetch.umd.min.js) or the lightweight [unfetch](https://unpkg.com/unfetch/polyfill).*
13+
The library was build to support ES5 syntax and all major browsers. *However, there are a few polyfills that would be required when targeting old browsers that don't have native support for Promises, Maps, Sets and Fetch Web API. You should include a polyfill, like [es6-promise](https://github.com/stefanpenner/es6-promise) for Promises, and [whatwg-fetch](https://cdn.jsdelivr.net/npm/whatwg-fetch@3.5.0/dist/fetch.umd.min.js) or the lightweight [unfetch](https://unpkg.com/unfetch/polyfill) for the Fetch API.*
1414

1515
## Getting started
1616
Below is a simple index.js example that describes the instantiation and most basic usage of our SDK:

karma/e2e.gaIntegration.karma.conf.js

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

0 commit comments

Comments
 (0)