@splitsoftware/splitio 10.21.1-rc.0 → 10.21.2-rc.1

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.
@@ -11,6 +11,7 @@ import { integrationsManagerFactory } from '@splitsoftware/splitio-commons/esm/i
11
11
  import { __InLocalStorageMockFactory } from '@splitsoftware/splitio-commons/esm/utils/settingsValidation/storage/storageCS';
12
12
  import { sdkFactory } from '@splitsoftware/splitio-commons/esm/sdkFactory';
13
13
  import { LOCALHOST_MODE, STORAGE_LOCALSTORAGE } from '@splitsoftware/splitio-commons/esm/utils/constants';
14
+ import { shouldAddPt } from '@splitsoftware/splitio-commons/esm/trackers/impressionObserver/utils';
14
15
  import { createUserConsentAPI } from '@splitsoftware/splitio-commons/esm/consent/sdkUserConsent';
15
16
  import { settingsFactory } from '../settings/browser';
16
17
  import { platform, SignalListener } from '../platform';
@@ -37,7 +38,7 @@ function getModules(settings) {
37
38
  sdkClientMethodFactory: sdkClientMethodCSFactory,
38
39
  SignalListener: SignalListener,
39
40
  integrationsManagerFactory: settings.integrations && settings.integrations.length > 0 ? integrationsManagerFactory.bind(null, settings.integrations) : undefined,
40
- impressionsObserverFactory: impressionObserverCSFactory,
41
+ impressionsObserverFactory: shouldAddPt(settings) ? impressionObserverCSFactory : undefined,
41
42
  extraProps: function (params) {
42
43
  return {
43
44
  UserConsent: createUserConsentAPI(params)
@@ -9,9 +9,9 @@ import { sdkClientMethodFactory } from '@splitsoftware/splitio-commons/esm/sdkCl
9
9
  import { impressionObserverSSFactory } from '@splitsoftware/splitio-commons/esm/trackers/impressionObserver/impressionObserverSS';
10
10
  import { sdkFactory } from '@splitsoftware/splitio-commons/esm/sdkFactory';
11
11
  import { CONSUMER_MODE, LOCALHOST_MODE } from '@splitsoftware/splitio-commons/esm/utils/constants';
12
+ import { shouldAddPt } from '@splitsoftware/splitio-commons/esm/trackers/impressionObserver/utils';
12
13
  import { settingsFactory } from '../settings/node';
13
14
  import { platform, SignalListener } from '../platform';
14
- import { bloomFilterFactory } from '../platform/filter/bloomFilter';
15
15
  var syncManagerOnlineSSFactory = syncManagerOnlineFactory(pollingManagerSSFactory, pushManagerFactory);
16
16
  function getStorage(settings) {
17
17
  return settings.storage.type === 'REDIS' ?
@@ -32,8 +32,7 @@ function getModules(settings) {
32
32
  sdkManagerFactory: sdkManagerFactory,
33
33
  sdkClientMethodFactory: sdkClientMethodFactory,
34
34
  SignalListener: SignalListener,
35
- impressionsObserverFactory: impressionObserverSSFactory,
36
- filterAdapterFactory: bloomFilterFactory
35
+ impressionsObserverFactory: shouldAddPt(settings) ? impressionObserverSSFactory : undefined,
37
36
  };
38
37
  switch (settings.mode) {
39
38
  case LOCALHOST_MODE:
@@ -1 +1 @@
1
- export var packageVersion = '10.21.1-rc.0';
1
+ export var packageVersion = '10.21.2-rc.1';
@@ -14,6 +14,7 @@ var browser_1 = require("@splitsoftware/splitio-commons/cjs/integrations/browser
14
14
  var storageCS_1 = require("@splitsoftware/splitio-commons/cjs/utils/settingsValidation/storage/storageCS");
15
15
  var sdkFactory_1 = require("@splitsoftware/splitio-commons/cjs/sdkFactory");
16
16
  var constants_1 = require("@splitsoftware/splitio-commons/cjs/utils/constants");
17
+ var utils_1 = require("@splitsoftware/splitio-commons/cjs/trackers/impressionObserver/utils");
17
18
  var sdkUserConsent_1 = require("@splitsoftware/splitio-commons/cjs/consent/sdkUserConsent");
18
19
  var browser_2 = require("../settings/browser");
19
20
  var platform_1 = require("../platform");
@@ -40,7 +41,7 @@ function getModules(settings) {
40
41
  sdkClientMethodFactory: sdkClientMethodCSWithTT_1.sdkClientMethodCSFactory,
41
42
  SignalListener: platform_1.SignalListener,
42
43
  integrationsManagerFactory: settings.integrations && settings.integrations.length > 0 ? browser_1.integrationsManagerFactory.bind(null, settings.integrations) : undefined,
43
- impressionsObserverFactory: impressionObserverCS_1.impressionObserverCSFactory,
44
+ impressionsObserverFactory: (0, utils_1.shouldAddPt)(settings) ? impressionObserverCS_1.impressionObserverCSFactory : undefined,
44
45
  extraProps: function (params) {
45
46
  return {
46
47
  UserConsent: (0, sdkUserConsent_1.createUserConsentAPI)(params)
@@ -12,9 +12,9 @@ var sdkClientMethod_1 = require("@splitsoftware/splitio-commons/cjs/sdkClient/sd
12
12
  var impressionObserverSS_1 = require("@splitsoftware/splitio-commons/cjs/trackers/impressionObserver/impressionObserverSS");
13
13
  var sdkFactory_1 = require("@splitsoftware/splitio-commons/cjs/sdkFactory");
14
14
  var constants_1 = require("@splitsoftware/splitio-commons/cjs/utils/constants");
15
+ var utils_1 = require("@splitsoftware/splitio-commons/cjs/trackers/impressionObserver/utils");
15
16
  var node_1 = require("../settings/node");
16
17
  var platform_1 = require("../platform");
17
- var bloomFilter_1 = require("../platform/filter/bloomFilter");
18
18
  var syncManagerOnlineSSFactory = (0, syncManagerOnline_1.syncManagerOnlineFactory)(pollingManagerSS_1.pollingManagerSSFactory, pushManager_1.pushManagerFactory);
19
19
  function getStorage(settings) {
20
20
  return settings.storage.type === 'REDIS' ?
@@ -35,8 +35,7 @@ function getModules(settings) {
35
35
  sdkManagerFactory: sdkManager_1.sdkManagerFactory,
36
36
  sdkClientMethodFactory: sdkClientMethod_1.sdkClientMethodFactory,
37
37
  SignalListener: platform_1.SignalListener,
38
- impressionsObserverFactory: impressionObserverSS_1.impressionObserverSSFactory,
39
- filterAdapterFactory: bloomFilter_1.bloomFilterFactory
38
+ impressionsObserverFactory: (0, utils_1.shouldAddPt)(settings) ? impressionObserverSS_1.impressionObserverSSFactory : undefined,
40
39
  };
41
40
  switch (settings.mode) {
42
41
  case constants_1.LOCALHOST_MODE:
@@ -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.1-rc.0';
4
+ exports.packageVersion = '10.21.2-rc.1';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@splitsoftware/splitio",
3
- "version": "10.21.1-rc.0",
3
+ "version": "10.21.2-rc.1",
4
4
  "description": "Split SDK",
5
5
  "files": [
6
6
  "README.md",
@@ -33,8 +33,7 @@
33
33
  "node": ">=6"
34
34
  },
35
35
  "dependencies": {
36
- "@ably/bloomit": "^1.4.2",
37
- "@splitsoftware/splitio-commons": "1.6.2-rc.2",
36
+ "@splitsoftware/splitio-commons": "1.6.2-rc.4",
38
37
  "@types/google.analytics": "0.0.40",
39
38
  "@types/ioredis": "^4.28.0",
40
39
  "ioredis": "^4.28.0",
@@ -90,27 +89,25 @@
90
89
  "check": "npm run check:lint && npm run check:version",
91
90
  "check:lint": "eslint src",
92
91
  "check:version": "cross-env NODE_ENV=test tape -r ./ts-node.register src/settings/__tests__/defaults.spec.js",
93
- "test-browser": "npm run test-browser-unit && npm run test-browser-e2e",
94
- "test-browser-unit": "cross-env NODE_ENV=test karma start karma/unit.karma.conf.js",
95
- "test-browser-e2e": "npm run test-browser-e2e-online && npm run test-browser-e2e-offline && npm run test-browser-e2e-destroy && npm run test-browser-e2e-errorCatching && npm run test-browser-e2e-push && npm run test-browser-e2e-gaIntegration",
96
- "test-browser-e2e-online": "cross-env NODE_ENV=test karma start karma/e2e.online.karma.conf.js",
97
- "test-browser-e2e-offline": "cross-env NODE_ENV=test karma start karma/e2e.offline.karma.conf.js",
98
- "test-browser-e2e-destroy": "cross-env NODE_ENV=test karma start karma/e2e.destroy.karma.conf.js",
99
- "test-browser-e2e-errorCatching": "cross-env NODE_ENV=test karma start karma/e2e.errorCatching.karma.conf.js",
100
- "test-browser-e2e-push": "cross-env NODE_ENV=test karma start karma/e2e.push.karma.conf.js",
101
- "test-browser-e2e-gaIntegration": "cross-env NODE_ENV=test karma start karma/e2e.gaIntegration.karma.conf.js",
102
- "test-node": "npm run test-node-unit && npm run test-node-e2e",
92
+ "test-browser-local": "cross-env NODE_ENV=test karma start karma/local.karma.conf.js",
93
+ "test-browser-e2e-local": "cross-env NODE_ENV=test karma start karma/e2e.local.karma.conf.js",
94
+ "test-browser": "npm run test-browser-unit && npm run test-browser-online && npm run test-browser-offline && npm run test-browser-destroy && npm run test-browser-errors && npm run test-browser-push && npm run test-browser-gaintegration",
95
+ "test-browser-unit": "cross-env NODE_ENV=test karma start karma/ci.karma.conf.js",
96
+ "test-browser-online": "cross-env NODE_ENV=test karma start karma/e2e.ci.karma.conf.js",
97
+ "test-browser-offline": "cross-env NODE_ENV=test karma start karma/offline.karma.conf.js",
98
+ "test-browser-destroy": "cross-env NODE_ENV=test karma start karma/destroy.ci.karma.conf.js",
99
+ "test-browser-errors": "cross-env NODE_ENV=test karma start karma/errors.ci.karma.conf.js",
100
+ "test-browser-gaintegration": "cross-env NODE_ENV=test karma start karma/gaintegration.ci.karma.conf.js",
101
+ "test-browser-push": "cross-env NODE_ENV=test karma start karma/push.ci.karma.conf.js",
102
+ "test-node": "npm run test-node-unit && npm run test-node-online && npm run test-node-redis && npm run test-node-offline && npm run test-node-destroy && npm run test-node-errors && npm run test-node-push",
103
103
  "test-node-unit": "cross-env NODE_ENV=test tape -r ./ts-node.register \"src/*/**/__tests__/**/!(browser).spec.js\" | tap-min",
104
- "test-node-e2e": "npm run test-node-e2e-online && npm run test-node-e2e-offline && npm run test-node-e2e-destroy && npm run test-node-e2e-errorCatching && npm run test-node-e2e-push && npm run test-node-e2e-redis",
105
- "test-node-e2e-online": "cross-env NODE_ENV=test tape -r ./ts-node.register src/__tests__/online/node.spec.js | tap-min",
106
- "test-node-e2e-offline": "cross-env NODE_ENV=test tape -r ./ts-node.register src/__tests__/offline/node.spec.js | tap-min",
107
- "test-node-e2e-destroy": "cross-env NODE_ENV=test tape -r ./ts-node.register src/__tests__/destroy/node.spec.js | tap-min",
108
- "test-node-e2e-errorCatching": "cross-env NODE_ENV=test tape -r ./ts-node.register src/__tests__/errorCatching/node.spec.js | tap-min",
109
- "test-node-e2e-push": "cross-env NODE_ENV=test tape -r ./ts-node.register src/__tests__/push/node.spec.js | tap-min",
110
- "test-node-e2e-redis": "cross-env NODE_ENV=test tape -r ./ts-node.register src/__tests__/consumer/node_redis.spec.js | tap-min",
111
- "pretest-ts-decls": "npm run build-esm && npm run build-cjs && npm link",
112
- "test-ts-decls": "./scripts/ts-tests.sh",
113
- "posttest-ts-decls": "npm unlink && npm install",
104
+ "test-node-online": "cross-env NODE_ENV=test tape -r ./ts-node.register src/__tests__/node.spec.js | tap-min",
105
+ "test-node-destroy": "cross-env NODE_ENV=test tape -r ./ts-node.register src/__tests__/destroy/node.spec.js | tap-min",
106
+ "test-node-errors": "cross-env NODE_ENV=test tape -r ./ts-node.register src/__tests__/errorCatching/node.spec.js | tap-min",
107
+ "test-node-offline": "cross-env NODE_ENV=test tape -r ./ts-node.register src/__tests__/offline/node.spec.js | tap-min",
108
+ "test-node-redis": "cross-env NODE_ENV=test tape -r ./ts-node.register src/__tests__/node_redis.spec.js | tap-min",
109
+ "test-node-push": "cross-env NODE_ENV=test tape -r ./ts-node.register src/__tests__/push/node.spec.js | tap-min",
110
+ "test-ts-decls": "tsc --build ts-tests",
114
111
  "test": "npm run test-node && npm run test-browser",
115
112
  "publish:rc": "npm run check && npm run build && npm publish --tag canary",
116
113
  "publish:stable": "npm run check && npm run build && npm publish"
package/src/.DS_Store CHANGED
Binary file
@@ -11,6 +11,7 @@ import { integrationsManagerFactory } from '@splitsoftware/splitio-commons/src/i
11
11
  import { __InLocalStorageMockFactory } from '@splitsoftware/splitio-commons/src/utils/settingsValidation/storage/storageCS';
12
12
  import { sdkFactory } from '@splitsoftware/splitio-commons/src/sdkFactory';
13
13
  import { LOCALHOST_MODE, STORAGE_LOCALSTORAGE } from '@splitsoftware/splitio-commons/src/utils/constants';
14
+ import { shouldAddPt } from '@splitsoftware/splitio-commons/src/trackers/impressionObserver/utils';
14
15
  import { createUserConsentAPI } from '@splitsoftware/splitio-commons/src/consent/sdkUserConsent';
15
16
 
16
17
  import { settingsFactory } from '../settings/browser';
@@ -51,7 +52,7 @@ function getModules(settings) {
51
52
 
52
53
  integrationsManagerFactory: settings.integrations && settings.integrations.length > 0 ? integrationsManagerFactory.bind(null, settings.integrations) : undefined,
53
54
 
54
- impressionsObserverFactory: impressionObserverCSFactory,
55
+ impressionsObserverFactory: shouldAddPt(settings) ? impressionObserverCSFactory : undefined,
55
56
 
56
57
  extraProps: (params) => {
57
58
  return {
@@ -9,10 +9,10 @@ import { sdkClientMethodFactory } from '@splitsoftware/splitio-commons/src/sdkCl
9
9
  import { impressionObserverSSFactory } from '@splitsoftware/splitio-commons/src/trackers/impressionObserver/impressionObserverSS';
10
10
  import { sdkFactory } from '@splitsoftware/splitio-commons/src/sdkFactory';
11
11
  import { CONSUMER_MODE, LOCALHOST_MODE } from '@splitsoftware/splitio-commons/src/utils/constants';
12
+ import { shouldAddPt } from '@splitsoftware/splitio-commons/src/trackers/impressionObserver/utils';
12
13
 
13
14
  import { settingsFactory } from '../settings/node';
14
15
  import { platform, SignalListener } from '../platform';
15
- import { bloomFilterFactory } from '../platform/filter/bloomFilter';
16
16
 
17
17
  const syncManagerOnlineSSFactory = syncManagerOnlineFactory(pollingManagerSSFactory, pushManagerFactory);
18
18
 
@@ -45,9 +45,7 @@ function getModules(settings) {
45
45
 
46
46
  SignalListener,
47
47
 
48
- impressionsObserverFactory: impressionObserverSSFactory,
49
-
50
- filterAdapterFactory: bloomFilterFactory
48
+ impressionsObserverFactory: shouldAddPt(settings) ? impressionObserverSSFactory : undefined,
51
49
  };
52
50
 
53
51
  switch (settings.mode) {
Binary file
@@ -1 +1 @@
1
- export const packageVersion = '10.21.1-rc.0';
1
+ export const packageVersion = '10.21.2-rc.1';
package/types/index.d.ts CHANGED
@@ -2,11 +2,9 @@
2
2
  // Project: http://www.split.io/
3
3
  // Definitions by: Nico Zelaya <https://github.com/NicoZelaya/>
4
4
 
5
- /// <reference path="./splitio.d.ts" />
5
+ /// <reference types="./splitio" />
6
6
 
7
- export = JsSdk;
8
-
9
- declare module JsSdk {
7
+ declare module '@splitsoftware/splitio' {
10
8
  /**
11
9
  * Split.io sdk factory function.
12
10
  * The settings parameter should be an object that complies with the SplitIO.INodeAsyncSettings.