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
13 changes: 10 additions & 3 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
1.1.0 (January 11, 2022)
- Added support for the SDK to run in "consumer" and "partial consumer" modes, with a pluggable implementation of it's internal storage, enabling
customers to implement this caching with any storage technology of choice and connect it to the SDK instance to be used instead of its default in-memory storage.
- Updated multiple modules due to general polishing and improvements, including the replacement of default exports with named exports, to avoid runtime errors with some particular configurations of Webpack projects.
- Updated ioredis dependency for vulnerability fixes.
- Bugfixing - Fixed issue returning dynamic configs if treatment name contains a dot (".").

1.0.0 (October 20, 2021)
- BREAKING CHANGE on multiple modules due to general polishing, improvements and bug fixes. In most cases the change is to use named exports. This affected mostly modules related with synchronization and storages.
- BREAKING CHANGE on multiple modules due to general polishing, improvements and bug fixes. In most cases the change is to use named exports. This affected mostly modules related with synchronization and storages.
- Updated streaming logic to use the newest version of our streaming service, including:
- Integration with Auth service V2, connecting to the new channels and applying the received connection delay.
- Implemented handling of the new MySegmentsV2 notification types (SegmentRemoval, KeyList, Bounded and Unbounded)
- New control notification for environment scoped streaming reset.
- Updated localhost mode to emit SDK_READY_FROM_CACHE event in Browser when using localStorage (Related to issue https://github.com/splitio/react-client/issues/34).
- Updated dependencies for vulnerability fixes.
- Updated localhost mode to emit SDK_READY_FROM_CACHE event in Browser when using localStorage (Related to issue https://github.com/splitio/react-client/issues/34).
- Updated dependencies for vulnerability fixes.

0.1.0 (March 30, 2021)
- Initial public release. It includes common modules to be consumed by the different Split implementations written in JavaScript. Based on the original JS SDK in the `javascript-client` repository.
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright © 2021 Split Software, Inc.
Copyright © 2022 Split Software, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Split Javascript SDK common components

[![npm version](https://badge.fury.io/js/%40splitsoftware%2Fsplitio-commons.svg)](https://badge.fury.io/js/%40splitsoftware%2Fsplitio) [![Build Status](https://travis-ci.com/splitio/javascript-commons.svg?branch=main)](https://travis-ci.com/splitio/javascript-commons)
[![npm version](https://badge.fury.io/js/%40splitsoftware%2Fsplitio-commons.svg)](https://badge.fury.io/js/%40splitsoftware%2Fsplitio-commons) [![Build Status](https://github.com/splitio/javascript-commons/actions/workflows/ci.yml/badge.svg)](https://github.com/splitio/javascript-commons/actions/workflows/ci.yml)

## Overview
This library 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.
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@splitsoftware/splitio-commons",
"version": "1.0.1-rc.6",
"version": "1.1.0",
"description": "Split Javascript SDK common components",
"main": "cjs/index.js",
"module": "esm/index.js",
Expand Down
4 changes: 2 additions & 2 deletions src/sdkFactory/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ export function sdkFactory(params: ISdkFactoryParams): SplitIO.ICsSDK | SplitIO.
// ATM, only used by PluggableStorage
mode: settings.mode,

// Callback used to emit SDK_READY in consumer mode, where `syncManagerFactory` is undefined
// or only instantiates submitters, and therefore it is not able to emit readiness events.
// Callback used to emit SDK_READY in consumer mode, where `syncManagerFactory` is undefined,
// or partial consumer mode, where it only has submitters, and therefore it doesn't emit readiness events.
onReadyCb: (error) => {
if (error) return; // Don't emit SDK_READY if storage failed to connect. Error message is logged by wrapperAdapter
readinessManager.splits.emit(SDK_SPLITS_ARRIVED);
Expand Down
7 changes: 5 additions & 2 deletions src/sync/polling/updaters/splitChangesUpdater.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,12 @@ export function splitChangesUpdaterFactory(
return false;
});

// After triggering the requests, if we have cached splits information let's notify that.
// After triggering the requests, if we have cached splits information let's notify that to emit SDK_READY_FROM_CACHE.
// Wrapping in a promise since checkCache can be async.
if (splitsEventEmitter && startingUp) {
Promise.resolve(splits.checkCache()).then(cacheReady => { if (cacheReady) splitsEventEmitter.emit(SDK_SPLITS_CACHE_LOADED); });
Promise.resolve(splits.checkCache()).then(isCacheReady => {
if (isCacheReady) splitsEventEmitter.emit(SDK_SPLITS_CACHE_LOADED);
});
}
return fetcherPromise;
}
Expand Down