@splitsoftware/splitio 10.21.2-rc.2 → 10.21.2-rc.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGES.txt CHANGED
@@ -1,3 +1,6 @@
1
+ 10.21.2 (September XXX, 2022)
2
+ - Updated @splitsoftware/splitio-commons package to version 1.6.2, that improves the performance of split evaluations (i.e., `getTreatment(s)` method calls) when using the default storage in memory.
3
+
1
4
  10.21.1 (July 25, 2022)
2
5
  - Bugfixing - Added missed type definitions `enabled` from `sync`.
3
6
 
@@ -1,11 +1,14 @@
1
1
  import { BloomFilter } from '@ably/bloomit';
2
2
  var EXPECTED_INSERTIONS = 10000000;
3
3
  var ERROR_RATE = 0.01;
4
- export function bloomFilterFactory(expectedInsertions, errorRate) {
4
+ var REFRESH_RATE = 24 * 60 * 60000; // 24HS
5
+ export function bloomFilterFactory(expectedInsertions, errorRate, refreshRate) {
5
6
  if (expectedInsertions === void 0) { expectedInsertions = EXPECTED_INSERTIONS; }
6
7
  if (errorRate === void 0) { errorRate = ERROR_RATE; }
8
+ if (refreshRate === void 0) { refreshRate = REFRESH_RATE; }
7
9
  var filter = BloomFilter.create(expectedInsertions, errorRate);
8
10
  return {
11
+ refreshRate: refreshRate,
9
12
  add: function (key, value) {
10
13
  var data = key + ":" + value;
11
14
  if (filter.has(data)) {
@@ -1 +1 @@
1
- export var packageVersion = '10.21.2-rc.2';
1
+ export var packageVersion = '10.21.2-rc.4';
@@ -4,11 +4,14 @@ exports.bloomFilterFactory = void 0;
4
4
  var bloomit_1 = require("@ably/bloomit");
5
5
  var EXPECTED_INSERTIONS = 10000000;
6
6
  var ERROR_RATE = 0.01;
7
- function bloomFilterFactory(expectedInsertions, errorRate) {
7
+ var REFRESH_RATE = 24 * 60 * 60000; // 24HS
8
+ function bloomFilterFactory(expectedInsertions, errorRate, refreshRate) {
8
9
  if (expectedInsertions === void 0) { expectedInsertions = EXPECTED_INSERTIONS; }
9
10
  if (errorRate === void 0) { errorRate = ERROR_RATE; }
11
+ if (refreshRate === void 0) { refreshRate = REFRESH_RATE; }
10
12
  var filter = bloomit_1.BloomFilter.create(expectedInsertions, errorRate);
11
13
  return {
14
+ refreshRate: refreshRate,
12
15
  add: function (key, value) {
13
16
  var data = key + ":" + value;
14
17
  if (filter.has(data)) {
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.packageVersion = void 0;
4
- exports.packageVersion = '10.21.2-rc.2';
4
+ exports.packageVersion = '10.21.2-rc.4';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@splitsoftware/splitio",
3
- "version": "10.21.2-rc.2",
3
+ "version": "10.21.2-rc.4",
4
4
  "description": "Split SDK",
5
5
  "files": [
6
6
  "README.md",
@@ -34,7 +34,7 @@
34
34
  },
35
35
  "dependencies": {
36
36
  "@ably/bloomit": "^1.4.2",
37
- "@splitsoftware/splitio-commons": "1.6.2-rc.5",
37
+ "@splitsoftware/splitio-commons": "1.6.2-rc.10",
38
38
  "@types/google.analytics": "0.0.40",
39
39
  "@types/ioredis": "^4.28.0",
40
40
  "ioredis": "^4.28.0",
package/src/.DS_Store CHANGED
Binary file
Binary file
@@ -2,11 +2,14 @@ import { BloomFilter } from '@ably/bloomit';
2
2
 
3
3
  const EXPECTED_INSERTIONS = 10000000;
4
4
  const ERROR_RATE = 0.01;
5
+ const REFRESH_RATE = 24 * 60 * 60000; // 24HS
5
6
 
6
- export function bloomFilterFactory(expectedInsertions = EXPECTED_INSERTIONS, errorRate = ERROR_RATE) {
7
+ export function bloomFilterFactory(expectedInsertions = EXPECTED_INSERTIONS, errorRate = ERROR_RATE, refreshRate = REFRESH_RATE) {
7
8
  let filter = BloomFilter.create(expectedInsertions, errorRate);
8
9
 
9
10
  return {
11
+
12
+ refreshRate: refreshRate,
10
13
 
11
14
  add(key, value) {
12
15
  const data = `${key}:${value}`;
@@ -1 +1 @@
1
- export const packageVersion = '10.21.2-rc.2';
1
+ export const packageVersion = '10.21.2-rc.4';