Skip to content

Commit a678e26

Browse files
Fix some typos
1 parent 45b7980 commit a678e26

File tree

8 files changed

+31
-31
lines changed

8 files changed

+31
-31
lines changed

CHANGES.txt

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@
107107
- Bugfixing - Fixed an issue with `connectionTimeout` options params of Redis storage, that was being ignored and not passed down to the underlying ioredis client.
108108
- Bugfixing - Updated the validation of some SDK configuration params to log errors and throw exceptions with clear descriptions of the invalid setup:
109109
- If passing a non-string value to `sync.impressionsMode`, the SDK logs the error: "you passed an invalid impressionsMode config param. It should be one of the following values: 'OPTIMIZED', 'DEBUG'. Defaulting to 'OPTIMIZED'.".
110-
- If passing 'REDIS' storage type without setting `mode` to 'consumer', the SDK logs the error: "The provided REDIS storage is invalid for this mode. It requires 'consumer' mode. Fallbacking into default MEMORY storage.".
110+
- If passing 'REDIS' storage type without setting `mode` to 'consumer', the SDK logs the error: "The provided REDIS storage is invalid for this mode. It requires 'consumer' mode. Fallback into default MEMORY storage.".
111111
- If passing 'consumer' mode without setting `storage.type` to 'REDIS', the SDK throws an exception with message: "A REDIS storage is required on consumer mode.".
112112

113113
- NOTABLE CHANGE: since version 10.18.0, the SDK has been refactored to use @splitsoftware/splitio-commons package in order to reuse core modules shared across all JavaScript-based SDKs. Most internal modules have been moved and renamed,
@@ -175,7 +175,7 @@
175175
10.15.4 (Mar 17, 2021)
176176
- Updated Streaming logic with some improvements and fixes, including:
177177
- Updated SSE error handling.
178-
- Extended publishers tracking to support multiregion infrastructure.
178+
- Extended publishers tracking to support multi-region infrastructure.
179179
- Enforced revalidation for requests stored in local caches, like proxies or browsers.
180180
- Bugfixing - In NodeJS, fetch new segments captured due to streaming notifications.
181181
- Updated some dependencies, including a vulnerability fix.
@@ -300,11 +300,11 @@
300300
- Added Block Until Ready functionality support for consumer clients (Redis mode on Node) to make integration code work the same between modes.
301301
- Added more Input and Usage Validation rules, including an extra label for impressions when the SDK is not ready.
302302
- Updated the SDK Redis adapter to handle pending commands when disconnecting from the Redis server.
303-
- Bugfixing - Clearing up readyTimeout after we don't need it anymore. It also fixes the missleading SDK_READY_TIMED_OUT error log when using Redis.
303+
- Bugfixing - Clearing up readyTimeout after we don't need it anymore. It also fixes the misleading SDK_READY_TIMED_OUT error log when using Redis.
304304

305305
10.7.0 (Apr 30, 2019)
306306
- Added Block Until Ready functionality to the manager, shared with the main client. Now you can subscribe to SDK events or use the .ready() promise from the manager as well.
307-
- Added Dynamic Configurations support through two new methods that mimick the regular ones, changing the type of what is returned.
307+
- Added Dynamic Configurations support through two new methods that mimic the regular ones, changing the type of what is returned.
308308
- getTreatmentWithConfig: Same as getTreatment, but instead of a string it returns a map with treatment and config as a stringified JSON.
309309
- getTreatmentWithConfig: Same as getTreatments, but instead of a map of string it returns a map of objects with treatment and config as a stringified JSON.
310310
- Added configs to SplitViews returned by the manager module.
@@ -318,7 +318,7 @@
318318

319319
10.6.0 (Feb 12, 2019)
320320
- BREAKING CHANGE: Updated impressions cache for Redis storage to reduce the amount of Redis operations by using a single queue (Must use Synchronizer 2.x or above with this or newer SDK versions).
321-
- Added stricter validations to the input of the SDK api to provide better and faster feedback in case of missuse. We want our users to be able to diagnose issues sooner,
321+
- Added stricter validations to the input of the SDK api to provide better and faster feedback in case of misuse. We want our users to be able to diagnose issues sooner,
322322
instead of when you can't find the data you're looking for. As part of this, some error logs (just logs) will be visible even with the SDK Logger disabled.
323323
- Updated getTreatments to have it's own latency metric for the whole operation, instead of one per each feature evaluation.
324324
- Updated default values on configuration for NodeJS.
@@ -385,13 +385,13 @@
385385
- Migrated source code to es modules.
386386
- Localhost mode uses fewer dependencies now.
387387
- Removed flowtype since it was not used anymore.
388-
- Udpated to last node LTS.
388+
- Updated to last node LTS.
389389
- Added package-lock.json.
390390
- Fixed eslint configuration.
391391

392392
9.4.0 (Jan 12, 2018)
393393
- Adding support for client.track method, for tracking custom events.
394-
- Adding trafficType as an optional core setting. If provided on the browser it will be binded to the client as the key.
394+
- Adding trafficType as an optional core setting. If provided on the browser it will be bound to the client as the key.
395395
- TypeScript declarations polishing.
396396
- Updated SDK labels.
397397
- Bugfixing - Shared clients (browser) were ready even if the main client was not.
@@ -593,10 +593,10 @@ var treatmentsMap = client.getTreatments('CUSTOMER_KEY', ['Feature_flag_1', 'Fea
593593
const client = SplitFactory(config);
594594

595595
// Redis in NodeJS is async so we can use async/await syntax
596-
const treatment = await client.getTreatment('my-feature-comming-from-localstorage');
596+
const treatment = await client.getTreatment('my-feature-coming-from-localstorage');
597597

598598
// or just use the returned promise
599-
client.getTreatment('my-feature-comming-from-localstorage').then(treatment => {
599+
client.getTreatment('my-feature-coming-from-localstorage').then(treatment => {
600600
// do something with the treatment
601601
});
602602
```
@@ -652,7 +652,7 @@ var treatmentsMap = client.getTreatments('CUSTOMER_KEY', ['Feature_flag_1', 'Fea
652652

653653
client.getTreatment('my_feature') === 'on'; // true
654654

655-
factory.settings.features.my_feature = 'off'; // Apply this cache programatically
655+
factory.settings.features.my_feature = 'off'; // Apply this cache programmatically
656656

657657
client.getTreatment('my_feature') === 'off'; // Some time after you will be able to verify this
658658
```
@@ -728,7 +728,7 @@ var treatmentsMap = client.getTreatments('CUSTOMER_KEY', ['Feature_flag_1', 'Fea
728728
```html
729729
<script src="//cdn.split.io/sdk/split-5.0.0.min.js"></script>
730730
<script>
731-
// instanciation
731+
// instantiation
732732
var dynamic1 = splitio({
733733
core: {
734734
authorizationKey: '<your-token>',

src/__tests__/browserSuites/events.spec.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export function withoutBindingTT(fetchMock, assert) {
6969
assert.ok(client.track, 'client.track should be defined.');
7070
assert.equal(typeof client.track, 'function', 'client.track should be a function.');
7171

72-
// Key binded as with getTreatment.
72+
// Key bound as with getTreatment.
7373
tsStart = Date.now();
7474
assert.ok(client.track('sometraffictype', 'someEvent', 10), 'client.track returns true if an event is added to the queue.');
7575
assert.ok(client.track('othertraffictype', 'genericEvent', 25), 'client.track returns true if event value is null and is added to the queue.');
@@ -96,7 +96,7 @@ export function withoutBindingTT(fetchMock, assert) {
9696
// Not for JS Browser SDK, because it doesn't let bind traffic types to clients
9797
export function bindingTT(fetchMock, assert) {
9898
const localSettings = Object.assign({}, baseSettings);
99-
localSettings.core.trafficType = 'binded_tt';
99+
localSettings.core.trafficType = 'bound_tt';
100100
const splitio = SplitFactory(localSettings);
101101
const client = splitio.client();
102102

@@ -113,20 +113,20 @@ export function bindingTT(fetchMock, assert) {
113113

114114
assert.equal(firstEvent.key, 'facundo@split.io', 'Key should match received value.');
115115
assert.equal(firstEvent.eventTypeId, 'someEvent', 'EventTypeId should match received value.');
116-
assert.equal(firstEvent.trafficTypeName, 'binded_tt', 'TrafficTypeName should match the binded value.');
116+
assert.equal(firstEvent.trafficTypeName, 'bound_tt', 'TrafficTypeName should match the bound value.');
117117
assert.equal(firstEvent.value, 10, 'Value should match the value received on the .track() function.');
118118
assert.equal(typeof firstEvent.timestamp, 'number', 'The timestamp should be a number.');
119119

120120
assert.equal(midEvent.key, 'facundo@split.io', 'Key should match received value.');
121121
assert.equal(midEvent.eventTypeId, 'genericEvent', 'EventTypeId should match received value.');
122-
assert.equal(midEvent.trafficTypeName, 'binded_tt', 'TrafficTypeName should match received value in lowercases.');
122+
assert.equal(midEvent.trafficTypeName, 'bound_tt', 'TrafficTypeName should match received value in lowercases.');
123123
assert.equal(midEvent.value, 24, 'Value should match the value received on the .track() function.');
124124
assert.true(midEvent.timestamp >= tsStart && midEvent.timestamp <= tsEnd, 'The timestamp should be a number with the right value.');
125125
assert.deepEqual(midEvent.properties, { prop1: true, prop2: 'a', prop3: 2, prop4: null, willBeNulled: null }, 'The properties should be correct.');
126126

127127
assert.equal(lastEvent.key, 'facundo@split.io', 'Key should match received value.');
128128
assert.equal(lastEvent.eventTypeId, 'my.checkout.event', 'EventTypeId should match received value.');
129-
assert.equal(lastEvent.trafficTypeName, 'binded_tt', 'TrafficTypeName should match the binded value.');
129+
assert.equal(lastEvent.trafficTypeName, 'bound_tt', 'TrafficTypeName should match the bound value.');
130130
assert.equal(lastEvent.value, null, 'Should have null as value.');
131131
assert.equal(typeof lastEvent.timestamp, 'number', 'The timestamp should be a number.');
132132

@@ -139,7 +139,7 @@ export function bindingTT(fetchMock, assert) {
139139
assert.ok(client.track, 'client.track should be defined.');
140140
assert.equal(typeof client.track, 'function', 'client.track should be a function.');
141141

142-
// Key binded as with getTreatment.
142+
// Key bound as with getTreatment.
143143
tsStart = Date.now();
144144
assert.ok(client.track('someEvent', 10), 'client.track returns true if an event is added to the queue.');
145145
assert.ok(client.track('genericEvent', 25), 'client.track returns true if an event is added to the queue');

src/__tests__/browserSuites/shared-instantiation.spec.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,9 @@ export default function sharedInstantiationSuite(startWithTT, sdkIgnoresTT, fetc
107107
const events = JSON.parse(opts.body);
108108

109109
assert.equal(events.length, sdkIgnoresTT ? 2 : 3, 'Tracked only valid events');
110-
assert.equal(events[0].trafficTypeName, `${startWithTT && !sdkIgnoresTT ? 'start' : 'main'}_tt`, 'matching traffic types both binded and provided through client.track()');
111-
assert.equal(events[1].trafficTypeName, 'marcio_tt', 'matching traffic types both binded and provided through client.track()');
112-
if (!sdkIgnoresTT) assert.equal(events[2].trafficTypeName, 'nico_tt', 'matching traffic types both binded and provided through client.track()');
110+
assert.equal(events[0].trafficTypeName, `${startWithTT && !sdkIgnoresTT ? 'start' : 'main'}_tt`, 'matching traffic type provided through client.track()');
111+
assert.equal(events[1].trafficTypeName, 'marcio_tt', 'matching traffic type provided through client.track()');
112+
if (!sdkIgnoresTT) assert.equal(events[2].trafficTypeName, 'nico_tt', 'matching traffic type provided through client.track()');
113113

114114
finished.next();
115115

@@ -124,14 +124,14 @@ export default function sharedInstantiationSuite(startWithTT, sdkIgnoresTT, fetc
124124
}
125125

126126
// Shared instance without TT on instantiation
127-
assert.false(marcioClient.track('marcioEvent'), 'If a shared client was created passing only key, no traffic type is binded so we need to provide one for client.track()');
128-
assert.true(marcioClient.track('marcio_tt', 'marcioEvent', 10), 'If a shared client was created passing only key, no traffic type is binded so we need to provide one for client.track()');
127+
assert.false(marcioClient.track('marcioEvent'), 'If a shared client was created passing only key, no traffic type is bound so we need to provide one for client.track()');
128+
assert.true(marcioClient.track('marcio_tt', 'marcioEvent', 10), 'If a shared client was created passing only key, no traffic type is bound so we need to provide one for client.track()');
129129

130130
// Shared instance with TT on instantiation
131131
if (sdkIgnoresTT) {
132-
assert.false(nicolasClient.track('nicoEvent', 10), 'If a shared client was created passing both key and TT but the SDK ignores TT, the latter doesn\'t get binded to it so it is necessary to provide the traffic type to client.track()');
132+
assert.false(nicolasClient.track('nicoEvent', 10), 'If a shared client was created passing both key and TT but the SDK ignores TT, the latter doesn\'t get bound to it so it is necessary to provide the traffic type to client.track()');
133133
} else {
134-
assert.true(nicolasClient.track('nicoEvent', 10), 'If a shared client was created passing both key and TT, the latter gets binded to it so it is not necessary to provide the traffic type to client.track()');
134+
assert.true(nicolasClient.track('nicoEvent', 10), 'If a shared client was created passing both key and TT, the latter gets bound to it so it is not necessary to provide the traffic type to client.track()');
135135
}
136136
};
137137

src/__tests__/browserSuites/use-beacon-api.debug.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const assertImpressionSent = (assert, impression) => {
3737
const assertEventSent = (assert, event) => {
3838
assert.equal(event.key, 'facundo@split.io', 'Key should match received value.');
3939
assert.equal(event.eventTypeId, 'someEvent', 'EventTypeId should match received value.');
40-
assert.equal(event.trafficTypeName, 'sometraffictype', 'TrafficTypeName should match the binded value.');
40+
assert.equal(event.trafficTypeName, 'sometraffictype', 'TrafficTypeName should match the bound value.');
4141
};
4242

4343
const assertCallsToBeaconAPI = (assert) => {

src/__tests__/browserSuites/use-beacon-api.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const assertImpressionSent = (assert, impression) => {
3434
const assertEventSent = (assert, event) => {
3535
assert.equal(event.key, 'facundo@split.io', 'Key should match received value.');
3636
assert.equal(event.eventTypeId, 'someEvent', 'EventTypeId should match received value.');
37-
assert.equal(event.trafficTypeName, 'sometraffictype', 'TrafficTypeName should match the binded value.');
37+
assert.equal(event.trafficTypeName, 'sometraffictype', 'TrafficTypeName should match the bound value.');
3838
};
3939

4040
const assertImpressionsCountSent = (assert, impressionCount) => {

src/__tests__/nodeSuites/events.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export default function trackAssertions(fetchMock, assert) {
7575
assert.equal(typeof client.track, 'function', 'client.track should be a function.');
7676

7777
tsStart = Date.now();
78-
// Key binded as with getTreatment.
78+
// Key bound as with getTreatment.
7979
assert.ok(client.track('nicolas@split.io', 'sometraffictype', 'someEvent', 10), 'client.track returns true if an event is added to the queue.');
8080
assert.ok(client.track('nicolas@split.io', 'othertraffictype', 'genericEvent', 25), 'client.track returns true if event value is null and is added to the queue.');
8181
assert.ok(client.track('nicolas@split.io', 'othertraffictype', 'genericEvent', 25, null), 'client.track returns true if event properties is null and is added to the queue.');

src/__tests__/online/browser.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ tape('## E2E CI Tests ##', function (assert) {
110110
assert.test('E2E / Telemetry', telemetrySuite.bind(null, fetchMock));
111111
/* Check events */
112112
assert.test('E2E / Events', withoutBindingTT.bind(null, fetchMock));
113-
assert.test('E2E / Events with TT binded', bindingTT.bind(null, fetchMock));
113+
assert.test('E2E / Events with TT bound', bindingTT.bind(null, fetchMock));
114114
/* Check shared clients */
115115
assert.test('E2E / Shared instances', sharedInstantiationSuite.bind(null, false, false, fetchMock));
116116
assert.test('E2E / Shared instances with Traffic Type on factory settings', sharedInstantiationSuite.bind(null, true, false, fetchMock));

ts-tests/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -301,10 +301,10 @@ treatmentsWithConfig = client.getTreatmentsWithConfigByFlagSets(['set_a']);
301301
treatmentsWithConfig = client.getTreatmentsWithConfigByFlagSets(splitKey, ['set_a'], attributes);
302302
treatmentsWithConfig = client.getTreatmentsWithConfigByFlagSets(['set_a'], attributes);
303303

304-
// We can call track with or without a key. Traffic type can also be binded to the client.
304+
// We can call track with or without a key. Traffic type can also be bound to the client.
305305
tracked = client.track(splitKey, 'myTrafficType', 'myEventType'); // all params
306-
tracked = client.track('myTrafficType', 'myEventType'); // key binded, tt provided.
307-
tracked = client.track('myEventType'); // key and tt binded.
306+
tracked = client.track('myTrafficType', 'myEventType'); // key bound, tt provided.
307+
tracked = client.track('myEventType'); // key and tt bound.
308308
// Value parameter is optional on all signatures.
309309
tracked = client.track(splitKey, 'myTrafficType', 'myEventType', 10);
310310
tracked = client.track('myTrafficType', 'myEventType', 10);

0 commit comments

Comments
 (0)