Skip to content

Commit 279b0d3

Browse files
Merge pull request #747 from splitio/development
Release v10.22.5
2 parents e057088 + 1cc49d1 commit 279b0d3

29 files changed

+428
-390
lines changed

.eslintrc

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,22 @@
1414
},
1515

1616
"rules": {
17-
"indent": [2, 2, {"SwitchCase": 1}],
18-
"quotes": [1, "single", "avoid-escape"],
19-
"linebreak-style": [2, "unix"],
20-
"semi": [2, "always"],
21-
"no-underscore-dangle": 0,
22-
"eqeqeq": [2, "smart"],
23-
"no-unused-expressions": 0,
24-
"new-cap" : 0,
25-
"no-mixed-requires": 0,
26-
"camelcase": [2, {"properties": "never"}],
27-
"no-use-before-define": [2, "nofunc"],
28-
"no-trailing-spaces": "error"
17+
"indent": ["error", 2, {"SwitchCase": 1}],
18+
"quotes": ["warn", "single", "avoid-escape"],
19+
"linebreak-style": ["error", "unix"],
20+
"semi": ["error", "always"],
21+
"no-underscore-dangle": "off",
22+
"eqeqeq": ["error", "smart"],
23+
"no-unused-expressions": "off",
24+
"new-cap" : "off",
25+
"no-mixed-requires": "off",
26+
"camelcase": ["error", {"properties": "never"}],
27+
"no-use-before-define": ["error", "nofunc"],
28+
"eol-last": ["error", "always"],
29+
"keyword-spacing": "error",
30+
"comma-style": "error",
31+
"no-trailing-spaces": "error",
32+
"space-before-function-paren": ["error", {"named": "never"}]
2933
},
3034

3135
"parserOptions": {
@@ -38,7 +42,6 @@
3842
"files": ["src/**/*.js"],
3943
"excludedFiles": ["src/**/__tests__/**"],
4044
"extends": [
41-
"eslint:recommended",
4245
"plugin:compat/recommended"
4346
],
4447
"rules": {

CHANGES.txt

Lines changed: 25 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
10.22.5 (May 15, 2023)
2+
- Updated @splitsoftware/splitio-commons package to version 1.8.2 that includes minor improvements.
3+
- Updated terminology on the SDKs codebase to be more aligned with current standard without causing a breaking change. The core change is the term split for feature flag on things like logs and IntelliSense comments.
4+
- Updated split storage modules to optimize some operations when using Redis and pluggable storages.
5+
- Updated some transitive dependencies for vulnerability fixes.
6+
17
10.22.4 (March 9, 2023)
28
- Updated @splitsoftware/splitio-commons package to version 1.8.1 that includes minor improvements.
39
- Updated some transitive dependencies for vulnerability fixes.
@@ -15,7 +21,7 @@
1521
10.22.0 (October 5, 2022)
1622
- Added a new impressions mode for the SDK called NONE, to be used in factory when there is no desire to capture impressions on an SDK factory to feed Split's analytics engine. Running NONE mode, the SDK will only capture unique keys evaluated for a particular feature flag instead of full blown impressions.
1723
- Updated default value of `scheduler.featuresRefreshRate` config parameter from 5 seconds to 60 seconds for NodeJS and from 30 seconds to 60 seconds for Browser.
18-
- Updated @splitsoftware/splitio-commons package to version 1.7.1, that improves the performance of split evaluations (i.e., `getTreatment(s)` method calls) when using the default storage in memory, among other improvements.
24+
- Updated @splitsoftware/splitio-commons package to version 1.7.1, that improves the performance of feature flag evaluations (i.e., `getTreatment(s)` method calls) when using the default storage in memory, among other improvements.
1925

2026
10.21.1 (July 25, 2022)
2127
- Bugfixing - Added missed type definitions `enabled` from `sync`.
@@ -84,7 +90,7 @@
8490
- Bugfixing - Fixed an issue returning dynamic configs when the treatment name contains a dot (".").
8591

8692
10.16.1 (October 25, 2021)
87-
- Updated some internal modules to optimize the time efficiency of split evaluations (i.e., `getTreatment(s)` method calls).
93+
- Updated some internal modules to optimize the time efficiency of feature flag evaluations (i.e., `getTreatment(s)` method calls).
8894
- Updated some dependencies for vulnerability fixes (ioredis, @babel/cli, eslint, eslint-plugin-compat).
8995
- Bugfixing - Fixed localhost mode with localStorage, to use a mock in memory instead of localStorage API directly but keep emitting emit SDK_READY_FROM_CACHE event.
9096

@@ -171,8 +177,8 @@
171177
- Bugfixing - Replaced the use of `for...in` statements since it iterates over enumerable properties on the prototype chain, which might be polluted by code external to the library.
172178

173179
10.14.0 (Jul 31, 2020)
174-
- Added `sync.splitFilters` property to SDK configuration to pass a list of filters for the splits that will be downloaded. Read more in our docs.
175-
- Added expiration policy to split cache for browsers using localStorage: cache is cleared after 10 days of the last successful update.
180+
- Added `sync.splitFilters` property to SDK configuration to pass a list of filters for the feature flags that will be downloaded. Read more in our docs.
181+
- Added expiration policy to SDK cache for browsers using localStorage: cache is cleared after 10 days of the last successful update.
176182
- Updated babel configuration to remove core-js dependency and refactored code in favor of size reduction of UMD, ESM and CommonJS builds.
177183
- NOTE: removed some polyfills of global objects not available in some builds of IE10.
178184

@@ -205,7 +211,7 @@
205211
- Bugfixing - Emit SDK_UPDATE in localhost only when mock was actually updated.
206212

207213
10.10.0 (Jan 10, 2020)
208-
- Added SDK_READY_FROM_CACHE event, which will be emitted in LocalStorage mode when the SDK finds split cache in the storage of the browser.
214+
- Added SDK_READY_FROM_CACHE event, which will be emitted in LocalStorage mode when the SDK finds feature flag definitions in the storage of the browser.
209215
- Updated a dependency to fix a vulnerability (serialize-javascript).
210216
- Updated multiple dependencies and dev dependencies (@types/node, axios, core-js, events, sinon, tape and the babel cli, core, preset-env, register and plugin-transform-runtime)
211217

@@ -220,14 +226,14 @@
220226
10.9.0 (Oct 24, 2019)
221227
- Added listener for 'unload' DOM events to push remaining impressions and events when the browser page is closed or reloaded.
222228
- Added setting core.IPAddressesEnabled to disable reporting IP Addresses and Machine name back to Split cloud.
223-
- Updated Redis storage to fetch multiple splits at once for getTreatments/getTreatmentsWithConfig.
229+
- Updated Redis storage to fetch multiple feature flags at once for getTreatments/getTreatmentsWithConfig.
224230
- Updated most dependencies to their latest versions. Biggest change is babel (from 6 to 7), Webpack 3 to 4, Karma and ioredis.
225231

226232
10.8.4 (Sep 24, 2019)
227233
- Added module "events" as optional dependency.
228234
- Removed dependency on "util" module.
229235
- Updated transport module to use a local axios instance instead of the global one, to avoid polluting the shared one.
230-
- Updated input validation log when trying to get data of a non-existent split to have level WARN instead of ERROR.
236+
- Updated input validation log when trying to get data of a non-existent feature flag to have level WARN instead of ERROR.
231237

232238
10.8.3 (Sep 16, 2019)
233239
- Updated two default values on startup configuration for Browsers:
@@ -350,7 +356,7 @@
350356
- Updated SDK labels.
351357
- Bugfixing - Shared clients (browser) were ready even if the main client was not.
352358
- Bugfixing - Shared clients (browser) from different SDK instances should be separate.
353-
- Bugfixing - When using API key with wrong permissions, Node was throwing a false ready event (without segments).
359+
- Bugfixing - When using SDK key with wrong permissions, Node was throwing a false ready event (without segments).
354360
- Bugfixing - Localhost mode was trying to flush impressions when client.destroy was invoked.
355361

356362
9.3.7 (Dec 22, 2017)
@@ -407,7 +413,7 @@
407413

408414
var settings = {
409415
core: {
410-
authorizationKey: 'YOUR_API_KEY',
416+
authorizationKey: 'YOUR_SDK_KEY',
411417
key: 'CUSTOMER_KEY' // If on the browser.
412418
},
413419
debug: true // Boolean flag for enabling logs. Default value is false.
@@ -423,7 +429,7 @@
423429

424430
var sdk = splitio({
425431
core: {
426-
authorizationKey: 'YOUR_API_KEY',
432+
authorizationKey: 'YOUR_SDK_KEY',
427433
key: 'CUSTOMER_KEY' // If on the browser.
428434
}
429435
});
@@ -460,13 +466,13 @@
460466
- Adding getTreatments method to client API. For example:
461467

462468
```js
463-
var treatmentsMap = client.getTreatments('CUSTOMER_KEY', ['Split_1', 'Split_2']);
469+
var treatmentsMap = client.getTreatments('CUSTOMER_KEY', ['Feature_flag_1', 'Feature_flag_2']);
464470

465471
/*
466-
* treatmentsMap will be an object mapping splits with treatments. For example:
472+
* treatmentsMap will be an object mapping feature flags with treatments. For example:
467473
* {
468-
* Split_1: 'on',
469-
* Split_2: 'off
474+
* Feature_flag_1: 'on',
475+
* Feature_flag_2: 'off
470476
* }
471477
*/
472478
```
@@ -633,7 +639,7 @@ var treatmentsMap = client.getTreatments('CUSTOMER_KEY', ['Split_1', 'Split_2'])
633639

634640
6.0.0 (June 24, 2016)
635641
- In the browser land we allow quick retries before start using the refresh
636-
rates defined for segments and splits, plus the possibility of receive an
642+
rates defined for segments and feature flags, plus the possibility of receive an
637643
event when the SDK is taking to much time to startup.
638644

639645
```html
@@ -698,8 +704,8 @@ var treatmentsMap = client.getTreatments('CUSTOMER_KEY', ['Split_1', 'Split_2'])
698704
});
699705

700706
// usage
701-
var t1 = dynamic1.getTreatment('split-name');
702-
var t2 = dynamic2.getTreatment('another-split-name');
707+
var t1 = dynamic1.getTreatment('feature-flag-name');
708+
var t2 = dynamic2.getTreatment('another-feature-flag-name');
703709

704710
// stop SDK
705711
dynamic1.destroy();
@@ -776,7 +782,7 @@ var treatmentsMap = client.getTreatments('CUSTOMER_KEY', ['Split_1', 'Split_2'])
776782
```js
777783
var sdk = splitio({
778784
core: {
779-
authorizationKey: 'c1l5vkd50gimccout3c03pntbu', // your API key
785+
authorizationKey: 'c1l5vkd50gimccout3c03pntbu', // your SDK key
780786
key: '4a2c4490-ced1-11e5-9b97-d8a25e8b1578' // your customer id
781787
}
782788
});
@@ -805,7 +811,7 @@ seconds:
805811
```js
806812
var sdk = splitio({
807813
core: {
808-
authorizationKey: 'c1l5vkd50gimccout3c03pntbu', // your API key
814+
authorizationKey: 'c1l5vkd50gimccout3c03pntbu', // your SDK key
809815
key: '4a2c4490-ced1-11e5-9b97-d8a25e8b1578' // your customer id
810816
},
811817
scheduler: {

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
# Split SDK for Javascript
1+
# Split SDK for JavaScript
22

33
[![npm version](https://badge.fury.io/js/%40splitsoftware%2Fsplitio.svg)](https://badge.fury.io/js/%40splitsoftware%2Fsplitio) [![Build Status](https://github.com/splitio/javascript-client/actions/workflows/ci-cd.yml/badge.svg)](https://github.com/splitio/javascript-client/actions/workflows/ci-cd.yml) [![Greenkeeper badge](https://badges.greenkeeper.io/splitio/javascript-client.svg)](https://greenkeeper.io/)
44

55
## Overview
6-
This SDK is designed to work with Split, the platform for controlled rollouts, which serves features to your users via a Split feature flag to manage your complete customer experience.
6+
This SDK is designed to work with Split, the platform for controlled rollouts, which serves features to your users via feature flags to manage your complete customer experience.
77

88
[![Twitter Follow](https://img.shields.io/twitter/follow/splitsoftware.svg?style=social&label=Follow&maxAge=1529000)](https://twitter.com/intent/follow?screen_name=splitsoftware)
99

@@ -23,7 +23,7 @@ var SplitFactory = require('@splitsoftware/splitio').SplitFactory;
2323
// Instantiate the SDK
2424
var factory = SplitFactory({
2525
core: {
26-
authorizationKey: 'YOUR_SDK_API_KEY'
26+
authorizationKey: 'YOUR_SDK_KEY'
2727
}
2828
});
2929

@@ -32,7 +32,7 @@ var client = factory.client();
3232

3333
// Set a callback to listen for the SDK_READY event, to make sure the SDK is properly loaded before asking for a treatment
3434
client.on(client.Event.SDK_READY, function() {
35-
var treatment = client.getTreatment('CUSTOMER_ID', 'SPLIT_NAME');
35+
var treatment = client.getTreatment('CUSTOMER_ID', 'FEATURE_FLAG_NAME');
3636
if (treatment == 'on') {
3737
// insert code here for on treatment
3838
} else if (treatment == 'off') {
@@ -67,8 +67,8 @@ Split has built and maintains SDKs for:
6767
* GO [Github](https://github.com/splitio/go-client) [Docs](https://help.split.io/hc/en-us/articles/360020093652-Go-SDK)
6868
* iOS [Github](https://github.com/splitio/ios-client) [Docs](https://help.split.io/hc/en-us/articles/360020401491-iOS-SDK)
6969
* Java [Github](https://github.com/splitio/java-client) [Docs](https://help.split.io/hc/en-us/articles/360020405151-Java-SDK)
70-
* Javascript [Github](https://github.com/splitio/javascript-client) [Docs](https://help.split.io/hc/en-us/articles/360020448791-JavaScript-SDK)
71-
* Javascript for Browser [Github](https://github.com/splitio/javascript-browser-client) [Docs](https://help.split.io/hc/en-us/articles/360058730852-Browser-SDK)
70+
* JavaScript [Github](https://github.com/splitio/javascript-client) [Docs](https://help.split.io/hc/en-us/articles/360020448791-JavaScript-SDK)
71+
* JavaScript for Browser [Github](https://github.com/splitio/javascript-browser-client) [Docs](https://help.split.io/hc/en-us/articles/360058730852-Browser-SDK)
7272
* Node [Github](https://github.com/splitio/javascript-client) [Docs](https://help.split.io/hc/en-us/articles/360020564931-Node-js-SDK)
7373
* PHP [Github](https://github.com/splitio/php-client) [Docs](https://help.split.io/hc/en-us/articles/360020350372-PHP-SDK)
7474
* Python [Github](https://github.com/splitio/python-client) [Docs](https://help.split.io/hc/en-us/articles/360020359652-Python-SDK)

0 commit comments

Comments
 (0)