Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
0.9.5 (May 15, 2023)
- Updated @splitsoftware/splitio-commons package to version 1.8.2 that includes minor improvements.
- 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.
- Updated split storage modules to optimize some operations when using Redis and pluggable storages.
- Updated some transitive dependencies for vulnerability fixes.

0.9.4 (May 4, 2023)
- Updated some transitive dependencies for vulnerability fixes.
- Bugfixing - Updated `unfetch` package as a runtime dependency, required when using the "full" entrypoint (`import { SplitFactory } from '@splitsoftware/splitio-browserjs/full'`).
Expand All @@ -16,7 +22,7 @@
0.9.0 (October 5, 2022)
- 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.
- Updated default value of `scheduler.featuresRefreshRate` config parameter from 30 seconds to 60 seconds.
- 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.
- 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.

0.8.0 (July 22, 2022)
- Added `autoRequire` configuration option to the Google Analytics to Split integration, which takes care of requiring the splitTracker plugin on trackers dynamically created by Google tag managers (See https://help.split.io/hc/en-us/articles/360040838752#set-up-with-gtm-and-gtag.js).
Expand All @@ -25,7 +31,7 @@
- Updated some dependencies for vulnerability fixes.

0.7.0 (June 29, 2022)
- Added a new config option to control the tasks that listen or poll for updates on feature flags and segments, via the new config sync.enabled . Running online Split will always pull the most recent updates upon initialization, this only affects updates fetching on a running instance. Useful when a consistent session experience is a must or to save resources when updates are not being used.
- Added a new config option to control the tasks that listen or poll for updates on feature flags and segments, via the new config sync.enabled . Running online, Split will always pull the most recent updates upon initialization, this only affects updates fetching on a running instance. Useful when a consistent session experience is a must or to save resources when updates are not being used.
- Updated telemetry logic to track the anonymous config for user consent flag set to declined or unknown.
- Updated submitters logic, to avoid duplicating the post of impressions to Split cloud when the SDK is destroyed while its periodic post of impressions is running.
- Bugfixing - Updated submitters logic, to avoid dropping impressions and events that are being tracked while POST request is pending.
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![npm version](https://badge.fury.io/js/%40splitsoftware%2Fsplitio-browserjs.svg)](https://badge.fury.io/js/%40splitsoftware%2Fsplitio-browserjs) [![Build Status](https://github.com/splitio/javascript-browser-client/actions/workflows/ci-cd.yml/badge.svg)](https://github.com/splitio/javascript-browser-client/actions/workflows/ci-cd.yml)

## Overview
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.
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.

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

Expand All @@ -21,7 +21,7 @@ import { SplitFactory } from '@splitsoftware/splitio-browserjs';
// Instantiate the SDK
var factory = SplitFactory({
core: {
authorizationKey: 'YOUR_SDK_API_KEY',
authorizationKey: 'YOUR_SDK_KEY',
key: 'CUSTOMER_ID'
}
});
Expand All @@ -31,7 +31,7 @@ var client = factory.client();

// Set a callback to listen for the SDK_READY event, to make sure the SDK is properly loaded before asking for a treatment
client.on(client.Event.SDK_READY, function() {
var treatment = client.getTreatment('SPLIT_NAME');
var treatment = client.getTreatment('FEATURE_FLAG_NAME');
if (treatment == 'on') {
// insert code here for on treatment
} else if (treatment == 'off') {
Expand Down
18 changes: 9 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@splitsoftware/splitio-browserjs",
"version": "0.9.4",
"version": "0.9.5",
"description": "Split SDK for JavaScript on Browser",
"main": "cjs/index.js",
"module": "esm/index.js",
Expand Down Expand Up @@ -64,7 +64,7 @@
"bugs": "https://github.com/splitio/javascript-browser-client/issues",
"homepage": "https://github.com/splitio/javascript-browser-client#readme",
"dependencies": {
"@splitsoftware/splitio-commons": "1.8.1",
"@splitsoftware/splitio-commons": "1.8.2",
"@types/google.analytics": "0.0.40",
"unfetch": "^4.2.0"
},
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/consumer/browser_consumer.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const timeFrame = Date.now();
/** @type SplitIO.IBrowserAsyncSettings */
const config = {
core: {
authorizationKey: 'SOME API KEY', // in consumer mode, api key is only used to identify the sdk instance
authorizationKey: 'SOME SDK KEY', // in consumer mode, SDK key is only used to identify the sdk instance
key: 'UT_Segment_member'
},
mode: 'consumer',
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/consumer/browser_consumer_partial.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const TOTAL_EVENTS = 5;
/** @type SplitIO.IBrowserAsyncSettings */
const config = {
core: {
authorizationKey: 'SOME API KEY', // in consumer mode, api key is only used to identify the sdk instance
authorizationKey: 'SOME SDK KEY', // in consumer mode, SDK key is only used to identify the sdk instance
key: 'UT_Segment_member'
},
mode: 'consumer_partial',
Expand Down
16 changes: 0 additions & 16 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
/**
Copyright 2022 Split Software

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
**/

export { SplitFactory } from './splitFactory';
export { InLocalStorage } from '@splitsoftware/splitio-commons/src/storages/inLocalStorage/index';
export { GoogleAnalyticsToSplit } from '@splitsoftware/splitio-commons/src/integrations/ga/GoogleAnalyticsToSplit';
Expand Down
2 changes: 1 addition & 1 deletion src/settings/defaults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { LogLevels, isLogLevelString } from '@splitsoftware/splitio-commons/src/
import { ConsentStatus, LogLevel } from '@splitsoftware/splitio-commons/src/types';
import { CONSENT_GRANTED } from '@splitsoftware/splitio-commons/src/utils/constants';

const packageVersion = '0.9.4';
const packageVersion = '0.9.5';

/**
* In browser, the default debug level, can be set via the `localStorage.splitio_debug` item.
Expand Down
2 changes: 1 addition & 1 deletion ts-tests/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ browserSettings = {
// For browser with async storage
browserAsyncSettings = {
core: {
authorizationKey: 'api-key',
authorizationKey: 'sdk-key',
key: 'customer-key'
},
mode: 'consumer',
Expand Down
Loading