@splitsoftware/splitio-commons 2.4.2-rc.3 → 11.5.0-rc.0

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.
Files changed (884) hide show
  1. package/CHANGES.txt +895 -152
  2. package/CONTRIBUTORS-GUIDE.md +26 -16
  3. package/README.md +43 -5
  4. package/cjs/factory/browser.js +73 -0
  5. package/cjs/factory/node.js +79 -0
  6. package/cjs/factory/package.json +4 -0
  7. package/cjs/index.js +3 -16
  8. package/cjs/{utils/MinEvents.js → platform/EventEmitter.js} +153 -27
  9. package/cjs/platform/browser.js +15 -0
  10. package/cjs/platform/filter/bloomFilter.js +32 -0
  11. package/cjs/platform/getEventSource/browser.js +7 -0
  12. package/cjs/platform/getEventSource/eventsource.js +480 -0
  13. package/cjs/platform/getEventSource/node.js +25 -0
  14. package/cjs/platform/getEventSource/package.json +4 -0
  15. package/cjs/platform/getFetch/browser.js +9 -0
  16. package/cjs/platform/getFetch/node.js +26 -0
  17. package/cjs/platform/getFetch/package.json +4 -0
  18. package/cjs/platform/getOptions/node.js +25 -0
  19. package/cjs/platform/node.js +18 -0
  20. package/cjs/platform/package.json +4 -0
  21. package/cjs/settings/browser.js +21 -0
  22. package/cjs/settings/defaults/browser.js +21 -0
  23. package/cjs/settings/defaults/node.js +23 -0
  24. package/cjs/{listeners/types.js → settings/defaults/version.js} +2 -0
  25. package/cjs/settings/integrations/browser.js +9 -0
  26. package/cjs/settings/node.js +22 -0
  27. package/cjs/settings/package.json +4 -0
  28. package/cjs/settings/runtime/node.js +22 -0
  29. package/cjs/settings/storage/browser.js +35 -0
  30. package/cjs/settings/storage/node.js +67 -0
  31. package/cjs/sync/offline/LocalhostFromFile.js +8 -0
  32. package/cjs/sync/offline/splitsParserFromFile.js +148 -0
  33. package/cjs/umd.js +5 -0
  34. package/cjs/utils/ip.js +114 -0
  35. package/client/package.json +5 -0
  36. package/esm/factory/browser.js +69 -0
  37. package/esm/factory/node.js +75 -0
  38. package/esm/factory/package.json +4 -0
  39. package/esm/index.js +1 -10
  40. package/esm/{utils/MinEvents.js → platform/EventEmitter.js} +143 -17
  41. package/esm/platform/browser.js +12 -0
  42. package/esm/platform/filter/bloomFilter.js +28 -0
  43. package/esm/platform/getEventSource/browser.js +3 -0
  44. package/esm/platform/getEventSource/eventsource.js +480 -0
  45. package/esm/platform/getEventSource/node.js +19 -0
  46. package/esm/platform/getEventSource/package.json +4 -0
  47. package/esm/platform/getFetch/browser.js +4 -0
  48. package/esm/platform/getFetch/node.js +21 -0
  49. package/esm/platform/getFetch/package.json +4 -0
  50. package/esm/platform/getOptions/node.js +20 -0
  51. package/esm/platform/node.js +14 -0
  52. package/esm/platform/package.json +4 -0
  53. package/esm/settings/browser.js +17 -0
  54. package/esm/settings/defaults/browser.js +18 -0
  55. package/esm/settings/defaults/node.js +20 -0
  56. package/esm/settings/defaults/version.js +1 -0
  57. package/esm/settings/integrations/browser.js +5 -0
  58. package/esm/settings/node.js +18 -0
  59. package/esm/settings/package.json +4 -0
  60. package/esm/settings/runtime/node.js +17 -0
  61. package/esm/settings/storage/browser.js +31 -0
  62. package/esm/settings/storage/node.js +63 -0
  63. package/esm/sync/offline/LocalhostFromFile.js +5 -0
  64. package/esm/sync/offline/splitsParserFromFile.js +143 -0
  65. package/esm/umd.js +3 -0
  66. package/esm/utils/ip.js +109 -0
  67. package/package.json +99 -58
  68. package/server/package.json +5 -0
  69. package/src/factory/browser.js +85 -0
  70. package/src/factory/node.js +92 -0
  71. package/src/factory/package.json +4 -0
  72. package/src/index.js +1 -0
  73. package/src/{utils/MinEvents.ts → platform/EventEmitter.js} +164 -19
  74. package/src/platform/browser.js +14 -0
  75. package/src/platform/filter/bloomFilter.js +33 -0
  76. package/src/platform/getEventSource/browser.js +3 -0
  77. package/src/platform/getEventSource/eventsource.js +519 -0
  78. package/src/platform/getEventSource/node.js +20 -0
  79. package/src/platform/getEventSource/package.json +4 -0
  80. package/src/platform/getFetch/browser.js +5 -0
  81. package/src/platform/getFetch/node.js +24 -0
  82. package/src/platform/getFetch/package.json +4 -0
  83. package/src/platform/getOptions/node.js +23 -0
  84. package/src/platform/node.js +16 -0
  85. package/src/platform/package.json +4 -0
  86. package/src/settings/browser.js +20 -0
  87. package/src/settings/defaults/browser.js +21 -0
  88. package/src/settings/defaults/node.js +23 -0
  89. package/src/settings/defaults/version.js +1 -0
  90. package/src/settings/integrations/browser.js +6 -0
  91. package/src/settings/node.js +21 -0
  92. package/src/settings/package.json +4 -0
  93. package/src/settings/runtime/node.js +21 -0
  94. package/src/settings/storage/browser.js +47 -0
  95. package/src/settings/storage/node.js +84 -0
  96. package/src/sync/offline/LocalhostFromFile.js +6 -0
  97. package/src/sync/offline/splitsParserFromFile.js +173 -0
  98. package/src/umd.js +4 -0
  99. package/src/utils/ip.js +123 -0
  100. package/types/client/index.d.ts +15 -0
  101. package/types/index.d.ts +24 -1
  102. package/types/server/index.d.ts +21 -0
  103. package/types/splitio.d.ts +2 -2083
  104. package/cjs/consent/index.js +0 -10
  105. package/cjs/consent/sdkUserConsent.js +0 -60
  106. package/cjs/dtos/types.js +0 -2
  107. package/cjs/evaluator/Engine.js +0 -58
  108. package/cjs/evaluator/combiners/and.js +0 -25
  109. package/cjs/evaluator/combiners/ifelseif.js +0 -48
  110. package/cjs/evaluator/condition/engineUtils.js +0 -29
  111. package/cjs/evaluator/condition/index.js +0 -41
  112. package/cjs/evaluator/convertions/index.js +0 -11
  113. package/cjs/evaluator/index.js +0 -134
  114. package/cjs/evaluator/matchers/all.js +0 -9
  115. package/cjs/evaluator/matchers/between.js +0 -10
  116. package/cjs/evaluator/matchers/boolean.js +0 -10
  117. package/cjs/evaluator/matchers/cont_all.js +0 -23
  118. package/cjs/evaluator/matchers/cont_any.js +0 -18
  119. package/cjs/evaluator/matchers/cont_str.js +0 -11
  120. package/cjs/evaluator/matchers/dependency.js +0 -28
  121. package/cjs/evaluator/matchers/eq.js +0 -10
  122. package/cjs/evaluator/matchers/eq_set.js +0 -20
  123. package/cjs/evaluator/matchers/ew.js +0 -11
  124. package/cjs/evaluator/matchers/gte.js +0 -10
  125. package/cjs/evaluator/matchers/index.js +0 -66
  126. package/cjs/evaluator/matchers/large_segment.js +0 -10
  127. package/cjs/evaluator/matchers/lte.js +0 -10
  128. package/cjs/evaluator/matchers/matcherTypes.js +0 -46
  129. package/cjs/evaluator/matchers/part_of.js +0 -20
  130. package/cjs/evaluator/matchers/prerequisites.js +0 -22
  131. package/cjs/evaluator/matchers/rbsegment.js +0 -56
  132. package/cjs/evaluator/matchers/segment.js +0 -10
  133. package/cjs/evaluator/matchers/semver_between.js +0 -14
  134. package/cjs/evaluator/matchers/semver_eq.js +0 -13
  135. package/cjs/evaluator/matchers/semver_gte.js +0 -13
  136. package/cjs/evaluator/matchers/semver_inlist.js +0 -16
  137. package/cjs/evaluator/matchers/semver_lte.js +0 -13
  138. package/cjs/evaluator/matchers/string.js +0 -11
  139. package/cjs/evaluator/matchers/sw.js +0 -11
  140. package/cjs/evaluator/matchers/whitelist.js +0 -11
  141. package/cjs/evaluator/matchersTransform/index.js +0 -104
  142. package/cjs/evaluator/matchersTransform/segment.js +0 -12
  143. package/cjs/evaluator/matchersTransform/unaryNumeric.js +0 -10
  144. package/cjs/evaluator/matchersTransform/whitelist.js +0 -10
  145. package/cjs/evaluator/parser/index.js +0 -61
  146. package/cjs/evaluator/treatments/index.js +0 -42
  147. package/cjs/evaluator/types.js +0 -2
  148. package/cjs/evaluator/value/index.js +0 -37
  149. package/cjs/evaluator/value/sanitize.js +0 -94
  150. package/cjs/integrations/pluggable.js +0 -35
  151. package/cjs/integrations/types.js +0 -2
  152. package/cjs/listeners/browser.js +0 -121
  153. package/cjs/listeners/node.js +0 -68
  154. package/cjs/logger/browser/DebugLogger.js +0 -9
  155. package/cjs/logger/browser/ErrorLogger.js +0 -9
  156. package/cjs/logger/browser/InfoLogger.js +0 -9
  157. package/cjs/logger/browser/WarnLogger.js +0 -9
  158. package/cjs/logger/constants.js +0 -140
  159. package/cjs/logger/index.js +0 -100
  160. package/cjs/logger/messages/debug.js +0 -36
  161. package/cjs/logger/messages/error.js +0 -42
  162. package/cjs/logger/messages/info.js +0 -37
  163. package/cjs/logger/messages/warn.js +0 -42
  164. package/cjs/logger/sdkLogger.js +0 -45
  165. package/cjs/logger/types.js +0 -2
  166. package/cjs/readiness/constants.js +0 -13
  167. package/cjs/readiness/readinessManager.js +0 -154
  168. package/cjs/readiness/sdkReadinessManager.js +0 -104
  169. package/cjs/readiness/types.js +0 -2
  170. package/cjs/sdkClient/client.js +0 -183
  171. package/cjs/sdkClient/clientAttributesDecoration.js +0 -122
  172. package/cjs/sdkClient/clientCS.js +0 -30
  173. package/cjs/sdkClient/clientInputValidation.js +0 -147
  174. package/cjs/sdkClient/identity.js +0 -7
  175. package/cjs/sdkClient/sdkClient.js +0 -64
  176. package/cjs/sdkClient/sdkClientMethod.js +0 -22
  177. package/cjs/sdkClient/sdkClientMethodCS.js +0 -66
  178. package/cjs/sdkFactory/index.js +0 -108
  179. package/cjs/sdkFactory/types.js +0 -2
  180. package/cjs/sdkManager/index.js +0 -96
  181. package/cjs/services/decorateHeaders.js +0 -40
  182. package/cjs/services/splitApi.js +0 -131
  183. package/cjs/services/splitHttpClient.js +0 -82
  184. package/cjs/services/types.js +0 -2
  185. package/cjs/storages/AbstractMySegmentsCacheSync.js +0 -60
  186. package/cjs/storages/AbstractSplitsCacheAsync.js +0 -51
  187. package/cjs/storages/AbstractSplitsCacheSync.js +0 -75
  188. package/cjs/storages/KeyBuilder.js +0 -68
  189. package/cjs/storages/KeyBuilderCS.js +0 -65
  190. package/cjs/storages/KeyBuilderSS.js +0 -60
  191. package/cjs/storages/dataLoader.js +0 -50
  192. package/cjs/storages/findLatencyIndex.js +0 -18
  193. package/cjs/storages/inLocalStorage/MySegmentsCacheInLocal.js +0 -81
  194. package/cjs/storages/inLocalStorage/RBSegmentsCacheInLocal.js +0 -117
  195. package/cjs/storages/inLocalStorage/SplitsCacheInLocal.js +0 -204
  196. package/cjs/storages/inLocalStorage/constants.js +0 -5
  197. package/cjs/storages/inLocalStorage/index.js +0 -91
  198. package/cjs/storages/inLocalStorage/storageAdapter.js +0 -54
  199. package/cjs/storages/inLocalStorage/validateCache.js +0 -85
  200. package/cjs/storages/inMemory/AttributesCacheInMemory.js +0 -70
  201. package/cjs/storages/inMemory/EventsCacheInMemory.js +0 -63
  202. package/cjs/storages/inMemory/ImpressionCountsCacheInMemory.js +0 -65
  203. package/cjs/storages/inMemory/ImpressionsCacheInMemory.js +0 -51
  204. package/cjs/storages/inMemory/InMemoryStorage.js +0 -46
  205. package/cjs/storages/inMemory/InMemoryStorageCS.js +0 -63
  206. package/cjs/storages/inMemory/MySegmentsCacheInMemory.js +0 -46
  207. package/cjs/storages/inMemory/RBSegmentsCacheInMemory.js +0 -61
  208. package/cjs/storages/inMemory/SegmentsCacheInMemory.js +0 -61
  209. package/cjs/storages/inMemory/SplitsCacheInMemory.js +0 -121
  210. package/cjs/storages/inMemory/TelemetryCacheInMemory.js +0 -207
  211. package/cjs/storages/inMemory/UniqueKeysCacheInMemory.js +0 -72
  212. package/cjs/storages/inMemory/UniqueKeysCacheInMemoryCS.js +0 -71
  213. package/cjs/storages/inRedis/EventsCacheInRedis.js +0 -60
  214. package/cjs/storages/inRedis/ImpressionCountsCacheInRedis.js +0 -85
  215. package/cjs/storages/inRedis/ImpressionsCacheInRedis.js +0 -45
  216. package/cjs/storages/inRedis/RBSegmentsCacheInRedis.js +0 -64
  217. package/cjs/storages/inRedis/RedisAdapter.js +0 -195
  218. package/cjs/storages/inRedis/SegmentsCacheInRedis.js +0 -57
  219. package/cjs/storages/inRedis/SplitsCacheInRedis.js +0 -243
  220. package/cjs/storages/inRedis/TelemetryCacheInRedis.js +0 -124
  221. package/cjs/storages/inRedis/UniqueKeysCacheInRedis.js +0 -69
  222. package/cjs/storages/inRedis/constants.js +0 -7
  223. package/cjs/storages/inRedis/index.js +0 -73
  224. package/cjs/storages/pluggable/EventsCachePluggable.js +0 -64
  225. package/cjs/storages/pluggable/ImpressionCountsCachePluggable.js +0 -81
  226. package/cjs/storages/pluggable/ImpressionsCachePluggable.js +0 -48
  227. package/cjs/storages/pluggable/RBSegmentsCachePluggable.js +0 -64
  228. package/cjs/storages/pluggable/SegmentsCachePluggable.js +0 -80
  229. package/cjs/storages/pluggable/SplitsCachePluggable.js +0 -212
  230. package/cjs/storages/pluggable/TelemetryCachePluggable.js +0 -141
  231. package/cjs/storages/pluggable/UniqueKeysCachePluggable.js +0 -62
  232. package/cjs/storages/pluggable/constants.js +0 -4
  233. package/cjs/storages/pluggable/inMemoryWrapper.js +0 -141
  234. package/cjs/storages/pluggable/index.js +0 -135
  235. package/cjs/storages/pluggable/wrapperAdapter.js +0 -53
  236. package/cjs/storages/types.js +0 -2
  237. package/cjs/storages/utils.js +0 -74
  238. package/cjs/sync/offline/LocalhostFromObject.js +0 -8
  239. package/cjs/sync/offline/splitsParser/parseCondition.js +0 -55
  240. package/cjs/sync/offline/splitsParser/splitsParserFromSettings.js +0 -62
  241. package/cjs/sync/offline/splitsParser/types.js +0 -2
  242. package/cjs/sync/offline/syncManagerOffline.js +0 -52
  243. package/cjs/sync/offline/syncTasks/fromObjectSyncTask.js +0 -71
  244. package/cjs/sync/polling/fetchers/mySegmentsFetcher.js +0 -18
  245. package/cjs/sync/polling/fetchers/segmentChangesFetcher.js +0 -34
  246. package/cjs/sync/polling/fetchers/splitChangesFetcher.js +0 -68
  247. package/cjs/sync/polling/fetchers/types.js +0 -2
  248. package/cjs/sync/polling/pollingManagerCS.js +0 -100
  249. package/cjs/sync/polling/pollingManagerSS.js +0 -49
  250. package/cjs/sync/polling/syncTasks/mySegmentsSyncTask.js +0 -13
  251. package/cjs/sync/polling/syncTasks/segmentsSyncTask.js +0 -13
  252. package/cjs/sync/polling/syncTasks/splitsSyncTask.js +0 -13
  253. package/cjs/sync/polling/types.js +0 -2
  254. package/cjs/sync/polling/updaters/mySegmentsUpdater.js +0 -83
  255. package/cjs/sync/polling/updaters/segmentChangesUpdater.js +0 -80
  256. package/cjs/sync/polling/updaters/splitChangesUpdater.js +0 -190
  257. package/cjs/sync/streaming/AuthClient/index.js +0 -43
  258. package/cjs/sync/streaming/AuthClient/types.js +0 -2
  259. package/cjs/sync/streaming/SSEClient/index.js +0 -86
  260. package/cjs/sync/streaming/SSEClient/types.js +0 -2
  261. package/cjs/sync/streaming/SSEHandler/NotificationKeeper.js +0 -98
  262. package/cjs/sync/streaming/SSEHandler/NotificationParser.js +0 -41
  263. package/cjs/sync/streaming/SSEHandler/index.js +0 -97
  264. package/cjs/sync/streaming/SSEHandler/types.js +0 -16
  265. package/cjs/sync/streaming/UpdateWorkers/MySegmentsUpdateWorker.js +0 -124
  266. package/cjs/sync/streaming/UpdateWorkers/SegmentsUpdateWorker.js +0 -92
  267. package/cjs/sync/streaming/UpdateWorkers/SplitsUpdateWorker.js +0 -136
  268. package/cjs/sync/streaming/UpdateWorkers/constants.js +0 -6
  269. package/cjs/sync/streaming/UpdateWorkers/types.js +0 -2
  270. package/cjs/sync/streaming/constants.js +0 -43
  271. package/cjs/sync/streaming/parseUtils.js +0 -98
  272. package/cjs/sync/streaming/pushManager.js +0 -317
  273. package/cjs/sync/streaming/types.js +0 -2
  274. package/cjs/sync/submitters/eventsSubmitter.js +0 -28
  275. package/cjs/sync/submitters/impressionCountsSubmitter.js +0 -36
  276. package/cjs/sync/submitters/impressionsSubmitter.js +0 -54
  277. package/cjs/sync/submitters/submitter.js +0 -66
  278. package/cjs/sync/submitters/submitterManager.js +0 -46
  279. package/cjs/sync/submitters/telemetrySubmitter.js +0 -125
  280. package/cjs/sync/submitters/types.js +0 -2
  281. package/cjs/sync/submitters/uniqueKeysSubmitter.js +0 -27
  282. package/cjs/sync/syncManagerOnline.js +0 -176
  283. package/cjs/sync/syncTask.js +0 -84
  284. package/cjs/sync/types.js +0 -2
  285. package/cjs/trackers/eventTracker.js +0 -62
  286. package/cjs/trackers/impressionObserver/ImpressionObserver.js +0 -18
  287. package/cjs/trackers/impressionObserver/buildKey.js +0 -7
  288. package/cjs/trackers/impressionObserver/impressionObserverCS.js +0 -15
  289. package/cjs/trackers/impressionObserver/impressionObserverSS.js +0 -15
  290. package/cjs/trackers/impressionObserver/types.js +0 -2
  291. package/cjs/trackers/impressionsTracker.js +0 -78
  292. package/cjs/trackers/strategy/strategyDebug.js +0 -20
  293. package/cjs/trackers/strategy/strategyNone.js +0 -24
  294. package/cjs/trackers/strategy/strategyOptimized.js +0 -28
  295. package/cjs/trackers/telemetryTracker.js +0 -75
  296. package/cjs/trackers/types.js +0 -2
  297. package/cjs/trackers/uniqueKeysTracker.js +0 -40
  298. package/cjs/types.js +0 -2
  299. package/cjs/utils/Backoff.js +0 -41
  300. package/cjs/utils/LRUCache/LinkedList.js +0 -114
  301. package/cjs/utils/LRUCache/index.js +0 -42
  302. package/cjs/utils/MinEventEmitter.js +0 -100
  303. package/cjs/utils/Semver.js +0 -103
  304. package/cjs/utils/base64/index.js +0 -75
  305. package/cjs/utils/constants/index.js +0 -100
  306. package/cjs/utils/decompress/index.js +0 -427
  307. package/cjs/utils/env/isLocalStorageAvailable.js +0 -39
  308. package/cjs/utils/env/isNode.js +0 -9
  309. package/cjs/utils/inputValidation/apiKey.js +0 -54
  310. package/cjs/utils/inputValidation/attribute.js +0 -20
  311. package/cjs/utils/inputValidation/attributes.js +0 -25
  312. package/cjs/utils/inputValidation/event.js +0 -28
  313. package/cjs/utils/inputValidation/eventProperties.js +0 -74
  314. package/cjs/utils/inputValidation/eventValue.js +0 -12
  315. package/cjs/utils/inputValidation/index.js +0 -34
  316. package/cjs/utils/inputValidation/isOperational.js +0 -18
  317. package/cjs/utils/inputValidation/key.js +0 -51
  318. package/cjs/utils/inputValidation/preloadedData.js +0 -59
  319. package/cjs/utils/inputValidation/split.js +0 -30
  320. package/cjs/utils/inputValidation/splitExistence.js +0 -19
  321. package/cjs/utils/inputValidation/splits.js +0 -25
  322. package/cjs/utils/inputValidation/trafficType.js +0 -29
  323. package/cjs/utils/inputValidation/trafficTypeExistence.js +0 -31
  324. package/cjs/utils/jwt/index.js +0 -17
  325. package/cjs/utils/jwt/types.js +0 -2
  326. package/cjs/utils/key/index.js +0 -36
  327. package/cjs/utils/labels/index.js +0 -12
  328. package/cjs/utils/lang/binarySearch.js +0 -42
  329. package/cjs/utils/lang/getFnName.js +0 -12
  330. package/cjs/utils/lang/getGlobal.js +0 -18
  331. package/cjs/utils/lang/index.js +0 -281
  332. package/cjs/utils/lang/objectAssign.js +0 -20
  333. package/cjs/utils/lang/sets.js +0 -23
  334. package/cjs/utils/murmur3/common.js +0 -46
  335. package/cjs/utils/murmur3/legacy.js +0 -44
  336. package/cjs/utils/murmur3/murmur3.js +0 -62
  337. package/cjs/utils/murmur3/murmur3_128.js +0 -219
  338. package/cjs/utils/murmur3/murmur3_128_x86.js +0 -154
  339. package/cjs/utils/murmur3/murmur3_64.js +0 -36
  340. package/cjs/utils/murmur3/utfx.js +0 -108
  341. package/cjs/utils/promise/thenable.js +0 -8
  342. package/cjs/utils/promise/timeout.js +0 -20
  343. package/cjs/utils/promise/wrapper.js +0 -58
  344. package/cjs/utils/settingsValidation/consent.js +0 -16
  345. package/cjs/utils/settingsValidation/impressionsMode.js +0 -14
  346. package/cjs/utils/settingsValidation/index.js +0 -184
  347. package/cjs/utils/settingsValidation/integrations/common.js +0 -27
  348. package/cjs/utils/settingsValidation/integrations/configurable.js +0 -18
  349. package/cjs/utils/settingsValidation/integrations/pluggable.js +0 -15
  350. package/cjs/utils/settingsValidation/logger/builtinLogger.js +0 -46
  351. package/cjs/utils/settingsValidation/logger/commons.js +0 -28
  352. package/cjs/utils/settingsValidation/logger/pluggableLogger.js +0 -32
  353. package/cjs/utils/settingsValidation/mode.js +0 -20
  354. package/cjs/utils/settingsValidation/runtime.js +0 -11
  355. package/cjs/utils/settingsValidation/splitFilters.js +0 -188
  356. package/cjs/utils/settingsValidation/storage/storageCS.js +0 -49
  357. package/cjs/utils/settingsValidation/types.js +0 -2
  358. package/cjs/utils/settingsValidation/url.js +0 -31
  359. package/cjs/utils/time/index.js +0 -11
  360. package/cjs/utils/timeTracker/now/browser.js +0 -15
  361. package/cjs/utils/timeTracker/now/node.js +0 -9
  362. package/cjs/utils/timeTracker/timer.js +0 -10
  363. package/esm/consent/index.js +0 -6
  364. package/esm/consent/sdkUserConsent.js +0 -56
  365. package/esm/dtos/types.js +0 -1
  366. package/esm/evaluator/Engine.js +0 -54
  367. package/esm/evaluator/combiners/and.js +0 -21
  368. package/esm/evaluator/combiners/ifelseif.js +0 -44
  369. package/esm/evaluator/condition/engineUtils.js +0 -24
  370. package/esm/evaluator/condition/index.js +0 -37
  371. package/esm/evaluator/convertions/index.js +0 -6
  372. package/esm/evaluator/index.js +0 -128
  373. package/esm/evaluator/matchers/all.js +0 -5
  374. package/esm/evaluator/matchers/between.js +0 -6
  375. package/esm/evaluator/matchers/boolean.js +0 -6
  376. package/esm/evaluator/matchers/cont_all.js +0 -19
  377. package/esm/evaluator/matchers/cont_any.js +0 -14
  378. package/esm/evaluator/matchers/cont_str.js +0 -7
  379. package/esm/evaluator/matchers/dependency.js +0 -24
  380. package/esm/evaluator/matchers/eq.js +0 -6
  381. package/esm/evaluator/matchers/eq_set.js +0 -16
  382. package/esm/evaluator/matchers/ew.js +0 -7
  383. package/esm/evaluator/matchers/gte.js +0 -6
  384. package/esm/evaluator/matchers/index.js +0 -62
  385. package/esm/evaluator/matchers/large_segment.js +0 -6
  386. package/esm/evaluator/matchers/lte.js +0 -6
  387. package/esm/evaluator/matchers/matcherTypes.js +0 -42
  388. package/esm/evaluator/matchers/part_of.js +0 -16
  389. package/esm/evaluator/matchers/prerequisites.js +0 -18
  390. package/esm/evaluator/matchers/rbsegment.js +0 -52
  391. package/esm/evaluator/matchers/segment.js +0 -6
  392. package/esm/evaluator/matchers/semver_between.js +0 -10
  393. package/esm/evaluator/matchers/semver_eq.js +0 -9
  394. package/esm/evaluator/matchers/semver_gte.js +0 -9
  395. package/esm/evaluator/matchers/semver_inlist.js +0 -12
  396. package/esm/evaluator/matchers/semver_lte.js +0 -9
  397. package/esm/evaluator/matchers/string.js +0 -7
  398. package/esm/evaluator/matchers/sw.js +0 -7
  399. package/esm/evaluator/matchers/whitelist.js +0 -7
  400. package/esm/evaluator/matchersTransform/index.js +0 -100
  401. package/esm/evaluator/matchersTransform/segment.js +0 -8
  402. package/esm/evaluator/matchersTransform/unaryNumeric.js +0 -6
  403. package/esm/evaluator/matchersTransform/whitelist.js +0 -6
  404. package/esm/evaluator/parser/index.js +0 -57
  405. package/esm/evaluator/treatments/index.js +0 -39
  406. package/esm/evaluator/types.js +0 -1
  407. package/esm/evaluator/value/index.js +0 -33
  408. package/esm/evaluator/value/sanitize.js +0 -90
  409. package/esm/integrations/pluggable.js +0 -31
  410. package/esm/integrations/types.js +0 -1
  411. package/esm/listeners/browser.js +0 -118
  412. package/esm/listeners/node.js +0 -65
  413. package/esm/listeners/types.js +0 -1
  414. package/esm/logger/browser/DebugLogger.js +0 -5
  415. package/esm/logger/browser/ErrorLogger.js +0 -5
  416. package/esm/logger/browser/InfoLogger.js +0 -5
  417. package/esm/logger/browser/WarnLogger.js +0 -5
  418. package/esm/logger/constants.js +0 -135
  419. package/esm/logger/index.js +0 -95
  420. package/esm/logger/messages/debug.js +0 -32
  421. package/esm/logger/messages/error.js +0 -38
  422. package/esm/logger/messages/info.js +0 -33
  423. package/esm/logger/messages/warn.js +0 -38
  424. package/esm/logger/sdkLogger.js +0 -41
  425. package/esm/logger/types.js +0 -1
  426. package/esm/readiness/constants.js +0 -10
  427. package/esm/readiness/readinessManager.js +0 -150
  428. package/esm/readiness/sdkReadinessManager.js +0 -100
  429. package/esm/readiness/types.js +0 -1
  430. package/esm/sdkClient/client.js +0 -179
  431. package/esm/sdkClient/clientAttributesDecoration.js +0 -118
  432. package/esm/sdkClient/clientCS.js +0 -26
  433. package/esm/sdkClient/clientInputValidation.js +0 -143
  434. package/esm/sdkClient/identity.js +0 -3
  435. package/esm/sdkClient/sdkClient.js +0 -60
  436. package/esm/sdkClient/sdkClientMethod.js +0 -18
  437. package/esm/sdkClient/sdkClientMethodCS.js +0 -62
  438. package/esm/sdkFactory/index.js +0 -104
  439. package/esm/sdkFactory/types.js +0 -1
  440. package/esm/sdkManager/index.js +0 -92
  441. package/esm/services/decorateHeaders.js +0 -35
  442. package/esm/services/splitApi.js +0 -127
  443. package/esm/services/splitHttpClient.js +0 -78
  444. package/esm/services/types.js +0 -1
  445. package/esm/storages/AbstractMySegmentsCacheSync.js +0 -57
  446. package/esm/storages/AbstractSplitsCacheAsync.js +0 -48
  447. package/esm/storages/AbstractSplitsCacheSync.js +0 -70
  448. package/esm/storages/KeyBuilder.js +0 -63
  449. package/esm/storages/KeyBuilderCS.js +0 -61
  450. package/esm/storages/KeyBuilderSS.js +0 -57
  451. package/esm/storages/dataLoader.js +0 -46
  452. package/esm/storages/findLatencyIndex.js +0 -14
  453. package/esm/storages/inLocalStorage/MySegmentsCacheInLocal.js +0 -78
  454. package/esm/storages/inLocalStorage/RBSegmentsCacheInLocal.js +0 -114
  455. package/esm/storages/inLocalStorage/SplitsCacheInLocal.js +0 -201
  456. package/esm/storages/inLocalStorage/constants.js +0 -2
  457. package/esm/storages/inLocalStorage/index.js +0 -87
  458. package/esm/storages/inLocalStorage/storageAdapter.js +0 -50
  459. package/esm/storages/inLocalStorage/validateCache.js +0 -81
  460. package/esm/storages/inMemory/AttributesCacheInMemory.js +0 -67
  461. package/esm/storages/inMemory/EventsCacheInMemory.js +0 -60
  462. package/esm/storages/inMemory/ImpressionCountsCacheInMemory.js +0 -62
  463. package/esm/storages/inMemory/ImpressionsCacheInMemory.js +0 -48
  464. package/esm/storages/inMemory/InMemoryStorage.js +0 -42
  465. package/esm/storages/inMemory/InMemoryStorageCS.js +0 -59
  466. package/esm/storages/inMemory/MySegmentsCacheInMemory.js +0 -43
  467. package/esm/storages/inMemory/RBSegmentsCacheInMemory.js +0 -58
  468. package/esm/storages/inMemory/SegmentsCacheInMemory.js +0 -58
  469. package/esm/storages/inMemory/SplitsCacheInMemory.js +0 -118
  470. package/esm/storages/inMemory/TelemetryCacheInMemory.js +0 -202
  471. package/esm/storages/inMemory/UniqueKeysCacheInMemory.js +0 -68
  472. package/esm/storages/inMemory/UniqueKeysCacheInMemoryCS.js +0 -68
  473. package/esm/storages/inRedis/EventsCacheInRedis.js +0 -57
  474. package/esm/storages/inRedis/ImpressionCountsCacheInRedis.js +0 -82
  475. package/esm/storages/inRedis/ImpressionsCacheInRedis.js +0 -42
  476. package/esm/storages/inRedis/RBSegmentsCacheInRedis.js +0 -61
  477. package/esm/storages/inRedis/RedisAdapter.js +0 -192
  478. package/esm/storages/inRedis/SegmentsCacheInRedis.js +0 -54
  479. package/esm/storages/inRedis/SplitsCacheInRedis.js +0 -240
  480. package/esm/storages/inRedis/TelemetryCacheInRedis.js +0 -121
  481. package/esm/storages/inRedis/UniqueKeysCacheInRedis.js +0 -66
  482. package/esm/storages/inRedis/constants.js +0 -4
  483. package/esm/storages/inRedis/index.js +0 -69
  484. package/esm/storages/pluggable/EventsCachePluggable.js +0 -61
  485. package/esm/storages/pluggable/ImpressionCountsCachePluggable.js +0 -78
  486. package/esm/storages/pluggable/ImpressionsCachePluggable.js +0 -45
  487. package/esm/storages/pluggable/RBSegmentsCachePluggable.js +0 -61
  488. package/esm/storages/pluggable/SegmentsCachePluggable.js +0 -77
  489. package/esm/storages/pluggable/SplitsCachePluggable.js +0 -209
  490. package/esm/storages/pluggable/TelemetryCachePluggable.js +0 -138
  491. package/esm/storages/pluggable/UniqueKeysCachePluggable.js +0 -59
  492. package/esm/storages/pluggable/constants.js +0 -1
  493. package/esm/storages/pluggable/inMemoryWrapper.js +0 -137
  494. package/esm/storages/pluggable/index.js +0 -131
  495. package/esm/storages/pluggable/wrapperAdapter.js +0 -49
  496. package/esm/storages/types.js +0 -1
  497. package/esm/storages/utils.js +0 -66
  498. package/esm/sync/offline/LocalhostFromObject.js +0 -5
  499. package/esm/sync/offline/splitsParser/parseCondition.js +0 -51
  500. package/esm/sync/offline/splitsParser/splitsParserFromSettings.js +0 -58
  501. package/esm/sync/offline/splitsParser/types.js +0 -1
  502. package/esm/sync/offline/syncManagerOffline.js +0 -48
  503. package/esm/sync/offline/syncTasks/fromObjectSyncTask.js +0 -66
  504. package/esm/sync/polling/fetchers/mySegmentsFetcher.js +0 -14
  505. package/esm/sync/polling/fetchers/segmentChangesFetcher.js +0 -30
  506. package/esm/sync/polling/fetchers/splitChangesFetcher.js +0 -64
  507. package/esm/sync/polling/fetchers/types.js +0 -1
  508. package/esm/sync/polling/pollingManagerCS.js +0 -96
  509. package/esm/sync/polling/pollingManagerSS.js +0 -45
  510. package/esm/sync/polling/syncTasks/mySegmentsSyncTask.js +0 -9
  511. package/esm/sync/polling/syncTasks/segmentsSyncTask.js +0 -9
  512. package/esm/sync/polling/syncTasks/splitsSyncTask.js +0 -9
  513. package/esm/sync/polling/types.js +0 -1
  514. package/esm/sync/polling/updaters/mySegmentsUpdater.js +0 -79
  515. package/esm/sync/polling/updaters/segmentChangesUpdater.js +0 -76
  516. package/esm/sync/polling/updaters/splitChangesUpdater.js +0 -184
  517. package/esm/sync/streaming/AuthClient/index.js +0 -38
  518. package/esm/sync/streaming/AuthClient/types.js +0 -1
  519. package/esm/sync/streaming/SSEClient/index.js +0 -83
  520. package/esm/sync/streaming/SSEClient/types.js +0 -1
  521. package/esm/sync/streaming/SSEHandler/NotificationKeeper.js +0 -94
  522. package/esm/sync/streaming/SSEHandler/NotificationParser.js +0 -36
  523. package/esm/sync/streaming/SSEHandler/index.js +0 -93
  524. package/esm/sync/streaming/SSEHandler/types.js +0 -13
  525. package/esm/sync/streaming/UpdateWorkers/MySegmentsUpdateWorker.js +0 -120
  526. package/esm/sync/streaming/UpdateWorkers/SegmentsUpdateWorker.js +0 -88
  527. package/esm/sync/streaming/UpdateWorkers/SplitsUpdateWorker.js +0 -132
  528. package/esm/sync/streaming/UpdateWorkers/constants.js +0 -3
  529. package/esm/sync/streaming/UpdateWorkers/types.js +0 -1
  530. package/esm/sync/streaming/constants.js +0 -40
  531. package/esm/sync/streaming/parseUtils.js +0 -90
  532. package/esm/sync/streaming/pushManager.js +0 -313
  533. package/esm/sync/streaming/types.js +0 -1
  534. package/esm/sync/submitters/eventsSubmitter.js +0 -24
  535. package/esm/sync/submitters/impressionCountsSubmitter.js +0 -31
  536. package/esm/sync/submitters/impressionsSubmitter.js +0 -49
  537. package/esm/sync/submitters/submitter.js +0 -61
  538. package/esm/sync/submitters/submitterManager.js +0 -42
  539. package/esm/sync/submitters/telemetrySubmitter.js +0 -119
  540. package/esm/sync/submitters/types.js +0 -1
  541. package/esm/sync/submitters/uniqueKeysSubmitter.js +0 -23
  542. package/esm/sync/syncManagerOnline.js +0 -172
  543. package/esm/sync/syncTask.js +0 -80
  544. package/esm/sync/types.js +0 -1
  545. package/esm/trackers/eventTracker.js +0 -58
  546. package/esm/trackers/impressionObserver/ImpressionObserver.js +0 -15
  547. package/esm/trackers/impressionObserver/buildKey.js +0 -3
  548. package/esm/trackers/impressionObserver/impressionObserverCS.js +0 -10
  549. package/esm/trackers/impressionObserver/impressionObserverSS.js +0 -10
  550. package/esm/trackers/impressionObserver/types.js +0 -1
  551. package/esm/trackers/impressionsTracker.js +0 -74
  552. package/esm/trackers/strategy/strategyDebug.js +0 -16
  553. package/esm/trackers/strategy/strategyNone.js +0 -20
  554. package/esm/trackers/strategy/strategyOptimized.js +0 -24
  555. package/esm/trackers/telemetryTracker.js +0 -71
  556. package/esm/trackers/types.js +0 -1
  557. package/esm/trackers/uniqueKeysTracker.js +0 -36
  558. package/esm/types.js +0 -1
  559. package/esm/utils/Backoff.js +0 -38
  560. package/esm/utils/LRUCache/LinkedList.js +0 -111
  561. package/esm/utils/LRUCache/index.js +0 -39
  562. package/esm/utils/MinEventEmitter.js +0 -97
  563. package/esm/utils/Semver.js +0 -100
  564. package/esm/utils/base64/index.js +0 -70
  565. package/esm/utils/constants/index.js +0 -96
  566. package/esm/utils/decompress/index.js +0 -424
  567. package/esm/utils/env/isLocalStorageAvailable.js +0 -33
  568. package/esm/utils/env/isNode.js +0 -6
  569. package/esm/utils/inputValidation/apiKey.js +0 -48
  570. package/esm/utils/inputValidation/attribute.js +0 -16
  571. package/esm/utils/inputValidation/attributes.js +0 -20
  572. package/esm/utils/inputValidation/event.js +0 -24
  573. package/esm/utils/inputValidation/eventProperties.js +0 -69
  574. package/esm/utils/inputValidation/eventValue.js +0 -8
  575. package/esm/utils/inputValidation/index.js +0 -14
  576. package/esm/utils/inputValidation/isOperational.js +0 -13
  577. package/esm/utils/inputValidation/key.js +0 -47
  578. package/esm/utils/inputValidation/preloadedData.js +0 -55
  579. package/esm/utils/inputValidation/split.js +0 -26
  580. package/esm/utils/inputValidation/splitExistence.js +0 -15
  581. package/esm/utils/inputValidation/splits.js +0 -21
  582. package/esm/utils/inputValidation/trafficType.js +0 -25
  583. package/esm/utils/inputValidation/trafficTypeExistence.js +0 -27
  584. package/esm/utils/jwt/index.js +0 -13
  585. package/esm/utils/jwt/types.js +0 -1
  586. package/esm/utils/key/index.js +0 -30
  587. package/esm/utils/labels/index.js +0 -9
  588. package/esm/utils/lang/binarySearch.js +0 -38
  589. package/esm/utils/lang/getFnName.js +0 -8
  590. package/esm/utils/lang/getGlobal.js +0 -14
  591. package/esm/utils/lang/index.js +0 -258
  592. package/esm/utils/lang/objectAssign.js +0 -17
  593. package/esm/utils/lang/sets.js +0 -17
  594. package/esm/utils/murmur3/common.js +0 -39
  595. package/esm/utils/murmur3/legacy.js +0 -39
  596. package/esm/utils/murmur3/murmur3.js +0 -57
  597. package/esm/utils/murmur3/murmur3_128.js +0 -215
  598. package/esm/utils/murmur3/murmur3_128_x86.js +0 -150
  599. package/esm/utils/murmur3/murmur3_64.js +0 -32
  600. package/esm/utils/murmur3/utfx.js +0 -102
  601. package/esm/utils/promise/thenable.js +0 -4
  602. package/esm/utils/promise/timeout.js +0 -16
  603. package/esm/utils/promise/wrapper.js +0 -54
  604. package/esm/utils/settingsValidation/consent.js +0 -12
  605. package/esm/utils/settingsValidation/impressionsMode.js +0 -10
  606. package/esm/utils/settingsValidation/index.js +0 -180
  607. package/esm/utils/settingsValidation/integrations/common.js +0 -23
  608. package/esm/utils/settingsValidation/integrations/configurable.js +0 -14
  609. package/esm/utils/settingsValidation/integrations/pluggable.js +0 -11
  610. package/esm/utils/settingsValidation/logger/builtinLogger.js +0 -42
  611. package/esm/utils/settingsValidation/logger/commons.js +0 -24
  612. package/esm/utils/settingsValidation/logger/pluggableLogger.js +0 -28
  613. package/esm/utils/settingsValidation/mode.js +0 -15
  614. package/esm/utils/settingsValidation/runtime.js +0 -7
  615. package/esm/utils/settingsValidation/splitFilters.js +0 -183
  616. package/esm/utils/settingsValidation/storage/storageCS.js +0 -44
  617. package/esm/utils/settingsValidation/types.js +0 -1
  618. package/esm/utils/settingsValidation/url.js +0 -27
  619. package/esm/utils/time/index.js +0 -7
  620. package/esm/utils/timeTracker/now/browser.js +0 -12
  621. package/esm/utils/timeTracker/now/node.js +0 -5
  622. package/esm/utils/timeTracker/timer.js +0 -6
  623. package/src/consent/index.ts +0 -8
  624. package/src/consent/sdkUserConsent.ts +0 -60
  625. package/src/dtos/types.ts +0 -294
  626. package/src/evaluator/Engine.ts +0 -73
  627. package/src/evaluator/combiners/and.ts +0 -29
  628. package/src/evaluator/combiners/ifelseif.ts +0 -56
  629. package/src/evaluator/condition/engineUtils.ts +0 -31
  630. package/src/evaluator/condition/index.ts +0 -50
  631. package/src/evaluator/convertions/index.ts +0 -7
  632. package/src/evaluator/index.ts +0 -199
  633. package/src/evaluator/matchers/all.ts +0 -6
  634. package/src/evaluator/matchers/between.ts +0 -10
  635. package/src/evaluator/matchers/boolean.ts +0 -8
  636. package/src/evaluator/matchers/cont_all.ts +0 -18
  637. package/src/evaluator/matchers/cont_any.ts +0 -13
  638. package/src/evaluator/matchers/cont_str.ts +0 -9
  639. package/src/evaluator/matchers/dependency.ts +0 -32
  640. package/src/evaluator/matchers/eq.ts +0 -8
  641. package/src/evaluator/matchers/eq_set.ts +0 -15
  642. package/src/evaluator/matchers/ew.ts +0 -9
  643. package/src/evaluator/matchers/gte.ts +0 -8
  644. package/src/evaluator/matchers/index.ts +0 -70
  645. package/src/evaluator/matchers/large_segment.ts +0 -11
  646. package/src/evaluator/matchers/lte.ts +0 -8
  647. package/src/evaluator/matchers/matcherTypes.ts +0 -42
  648. package/src/evaluator/matchers/part_of.ts +0 -15
  649. package/src/evaluator/matchers/prerequisites.ts +0 -24
  650. package/src/evaluator/matchers/rbsegment.ts +0 -74
  651. package/src/evaluator/matchers/segment.ts +0 -11
  652. package/src/evaluator/matchers/semver_between.ts +0 -15
  653. package/src/evaluator/matchers/semver_eq.ts +0 -13
  654. package/src/evaluator/matchers/semver_gte.ts +0 -13
  655. package/src/evaluator/matchers/semver_inlist.ts +0 -16
  656. package/src/evaluator/matchers/semver_lte.ts +0 -13
  657. package/src/evaluator/matchers/string.ts +0 -9
  658. package/src/evaluator/matchers/sw.ts +0 -9
  659. package/src/evaluator/matchers/whitelist.ts +0 -9
  660. package/src/evaluator/matchersTransform/index.ts +0 -118
  661. package/src/evaluator/matchersTransform/segment.ts +0 -10
  662. package/src/evaluator/matchersTransform/unaryNumeric.ts +0 -8
  663. package/src/evaluator/matchersTransform/whitelist.ts +0 -8
  664. package/src/evaluator/parser/index.ts +0 -82
  665. package/src/evaluator/treatments/index.ts +0 -53
  666. package/src/evaluator/types.ts +0 -34
  667. package/src/evaluator/value/index.ts +0 -37
  668. package/src/evaluator/value/sanitize.ts +0 -106
  669. package/src/index.ts +0 -14
  670. package/src/integrations/pluggable.ts +0 -39
  671. package/src/integrations/types.ts +0 -21
  672. package/src/listeners/browser.ts +0 -138
  673. package/src/listeners/node.ts +0 -81
  674. package/src/listeners/types.ts +0 -4
  675. package/src/logger/browser/DebugLogger.ts +0 -6
  676. package/src/logger/browser/ErrorLogger.ts +0 -6
  677. package/src/logger/browser/InfoLogger.ts +0 -6
  678. package/src/logger/browser/WarnLogger.ts +0 -6
  679. package/src/logger/constants.ts +0 -139
  680. package/src/logger/index.ts +0 -110
  681. package/src/logger/messages/debug.ts +0 -33
  682. package/src/logger/messages/error.ts +0 -39
  683. package/src/logger/messages/info.ts +0 -36
  684. package/src/logger/messages/warn.ts +0 -40
  685. package/src/logger/sdkLogger.ts +0 -46
  686. package/src/logger/types.ts +0 -21
  687. package/src/readiness/constants.ts +0 -12
  688. package/src/readiness/readinessManager.ts +0 -170
  689. package/src/readiness/sdkReadinessManager.ts +0 -121
  690. package/src/readiness/types.ts +0 -85
  691. package/src/sdkClient/client.ts +0 -217
  692. package/src/sdkClient/clientAttributesDecoration.ts +0 -139
  693. package/src/sdkClient/clientCS.ts +0 -34
  694. package/src/sdkClient/clientInputValidation.ts +0 -178
  695. package/src/sdkClient/identity.ts +0 -5
  696. package/src/sdkClient/sdkClient.ts +0 -77
  697. package/src/sdkClient/sdkClientMethod.ts +0 -24
  698. package/src/sdkClient/sdkClientMethodCS.ts +0 -85
  699. package/src/sdkFactory/index.ts +0 -131
  700. package/src/sdkFactory/types.ts +0 -119
  701. package/src/sdkManager/index.ts +0 -114
  702. package/src/services/decorateHeaders.ts +0 -37
  703. package/src/services/splitApi.ts +0 -148
  704. package/src/services/splitHttpClient.ts +0 -84
  705. package/src/services/types.ts +0 -86
  706. package/src/storages/AbstractMySegmentsCacheSync.ts +0 -94
  707. package/src/storages/AbstractSplitsCacheAsync.ts +0 -63
  708. package/src/storages/AbstractSplitsCacheSync.ts +0 -94
  709. package/src/storages/KeyBuilder.ts +0 -81
  710. package/src/storages/KeyBuilderCS.ts +0 -79
  711. package/src/storages/KeyBuilderSS.ts +0 -74
  712. package/src/storages/dataLoader.ts +0 -55
  713. package/src/storages/findLatencyIndex.ts +0 -16
  714. package/src/storages/inLocalStorage/MySegmentsCacheInLocal.ts +0 -87
  715. package/src/storages/inLocalStorage/RBSegmentsCacheInLocal.ts +0 -137
  716. package/src/storages/inLocalStorage/SplitsCacheInLocal.ts +0 -241
  717. package/src/storages/inLocalStorage/constants.ts +0 -2
  718. package/src/storages/inLocalStorage/index.ts +0 -104
  719. package/src/storages/inLocalStorage/storageAdapter.ts +0 -62
  720. package/src/storages/inLocalStorage/validateCache.ts +0 -99
  721. package/src/storages/inMemory/AttributesCacheInMemory.ts +0 -74
  722. package/src/storages/inMemory/EventsCacheInMemory.ts +0 -76
  723. package/src/storages/inMemory/ImpressionCountsCacheInMemory.ts +0 -69
  724. package/src/storages/inMemory/ImpressionsCacheInMemory.ts +0 -58
  725. package/src/storages/inMemory/InMemoryStorage.ts +0 -50
  726. package/src/storages/inMemory/InMemoryStorageCS.ts +0 -69
  727. package/src/storages/inMemory/MySegmentsCacheInMemory.ts +0 -49
  728. package/src/storages/inMemory/RBSegmentsCacheInMemory.ts +0 -68
  729. package/src/storages/inMemory/SegmentsCacheInMemory.ts +0 -74
  730. package/src/storages/inMemory/SplitsCacheInMemory.ts +0 -130
  731. package/src/storages/inMemory/TelemetryCacheInMemory.ts +0 -263
  732. package/src/storages/inMemory/UniqueKeysCacheInMemory.ts +0 -79
  733. package/src/storages/inMemory/UniqueKeysCacheInMemoryCS.ts +0 -80
  734. package/src/storages/inRedis/EventsCacheInRedis.ts +0 -75
  735. package/src/storages/inRedis/ImpressionCountsCacheInRedis.ts +0 -95
  736. package/src/storages/inRedis/ImpressionsCacheInRedis.ts +0 -61
  737. package/src/storages/inRedis/RBSegmentsCacheInRedis.ts +0 -79
  738. package/src/storages/inRedis/RedisAdapter.ts +0 -209
  739. package/src/storages/inRedis/SegmentsCacheInRedis.ts +0 -70
  740. package/src/storages/inRedis/SplitsCacheInRedis.ts +0 -268
  741. package/src/storages/inRedis/TelemetryCacheInRedis.ts +0 -144
  742. package/src/storages/inRedis/UniqueKeysCacheInRedis.ts +0 -75
  743. package/src/storages/inRedis/constants.ts +0 -4
  744. package/src/storages/inRedis/index.ts +0 -85
  745. package/src/storages/package.json +0 -3
  746. package/src/storages/pluggable/EventsCachePluggable.ts +0 -79
  747. package/src/storages/pluggable/ImpressionCountsCachePluggable.ts +0 -92
  748. package/src/storages/pluggable/ImpressionsCachePluggable.ts +0 -63
  749. package/src/storages/pluggable/RBSegmentsCachePluggable.ts +0 -76
  750. package/src/storages/pluggable/SegmentsCachePluggable.ts +0 -90
  751. package/src/storages/pluggable/SplitsCachePluggable.ts +0 -230
  752. package/src/storages/pluggable/TelemetryCachePluggable.ts +0 -159
  753. package/src/storages/pluggable/UniqueKeysCachePluggable.ts +0 -67
  754. package/src/storages/pluggable/constants.ts +0 -1
  755. package/src/storages/pluggable/inMemoryWrapper.ts +0 -130
  756. package/src/storages/pluggable/index.ts +0 -152
  757. package/src/storages/pluggable/wrapperAdapter.ts +0 -58
  758. package/src/storages/types.ts +0 -538
  759. package/src/storages/utils.ts +0 -80
  760. package/src/sync/offline/LocalhostFromObject.ts +0 -6
  761. package/src/sync/offline/splitsParser/parseCondition.ts +0 -59
  762. package/src/sync/offline/splitsParser/splitsParserFromSettings.ts +0 -72
  763. package/src/sync/offline/splitsParser/types.ts +0 -5
  764. package/src/sync/offline/syncManagerOffline.ts +0 -66
  765. package/src/sync/offline/syncTasks/fromObjectSyncTask.ts +0 -97
  766. package/src/sync/polling/fetchers/mySegmentsFetcher.ts +0 -25
  767. package/src/sync/polling/fetchers/segmentChangesFetcher.ts +0 -41
  768. package/src/sync/polling/fetchers/splitChangesFetcher.ts +0 -85
  769. package/src/sync/polling/fetchers/types.ts +0 -25
  770. package/src/sync/polling/pollingManagerCS.ts +0 -116
  771. package/src/sync/polling/pollingManagerSS.ts +0 -56
  772. package/src/sync/polling/syncTasks/mySegmentsSyncTask.ts +0 -34
  773. package/src/sync/polling/syncTasks/segmentsSyncTask.ts +0 -30
  774. package/src/sync/polling/syncTasks/splitsSyncTask.ts +0 -35
  775. package/src/sync/polling/types.ts +0 -33
  776. package/src/sync/polling/updaters/mySegmentsUpdater.ts +0 -104
  777. package/src/sync/polling/updaters/segmentChangesUpdater.ts +0 -92
  778. package/src/sync/polling/updaters/splitChangesUpdater.ts +0 -220
  779. package/src/sync/streaming/AuthClient/index.ts +0 -42
  780. package/src/sync/streaming/AuthClient/types.ts +0 -20
  781. package/src/sync/streaming/SSEClient/index.ts +0 -103
  782. package/src/sync/streaming/SSEClient/types.ts +0 -13
  783. package/src/sync/streaming/SSEHandler/NotificationKeeper.ts +0 -107
  784. package/src/sync/streaming/SSEHandler/NotificationParser.ts +0 -40
  785. package/src/sync/streaming/SSEHandler/index.ts +0 -105
  786. package/src/sync/streaming/SSEHandler/types.ts +0 -73
  787. package/src/sync/streaming/UpdateWorkers/MySegmentsUpdateWorker.ts +0 -134
  788. package/src/sync/streaming/UpdateWorkers/SegmentsUpdateWorker.ts +0 -99
  789. package/src/sync/streaming/UpdateWorkers/SplitsUpdateWorker.ts +0 -145
  790. package/src/sync/streaming/UpdateWorkers/constants.ts +0 -3
  791. package/src/sync/streaming/UpdateWorkers/types.ts +0 -4
  792. package/src/sync/streaming/constants.ts +0 -44
  793. package/src/sync/streaming/parseUtils.ts +0 -100
  794. package/src/sync/streaming/pushManager.ts +0 -358
  795. package/src/sync/streaming/types.ts +0 -51
  796. package/src/sync/submitters/eventsSubmitter.ts +0 -35
  797. package/src/sync/submitters/impressionCountsSubmitter.ts +0 -44
  798. package/src/sync/submitters/impressionsSubmitter.ts +0 -66
  799. package/src/sync/submitters/submitter.ts +0 -76
  800. package/src/sync/submitters/submitterManager.ts +0 -48
  801. package/src/sync/submitters/telemetrySubmitter.ts +0 -148
  802. package/src/sync/submitters/types.ts +0 -241
  803. package/src/sync/submitters/uniqueKeysSubmitter.ts +0 -35
  804. package/src/sync/syncManagerOnline.ts +0 -195
  805. package/src/sync/syncTask.ts +0 -83
  806. package/src/sync/types.ts +0 -48
  807. package/src/trackers/eventTracker.ts +0 -72
  808. package/src/trackers/impressionObserver/ImpressionObserver.ts +0 -20
  809. package/src/trackers/impressionObserver/buildKey.ts +0 -5
  810. package/src/trackers/impressionObserver/impressionObserverCS.ts +0 -14
  811. package/src/trackers/impressionObserver/impressionObserverSS.ts +0 -14
  812. package/src/trackers/impressionObserver/types.ts +0 -5
  813. package/src/trackers/impressionsTracker.ts +0 -87
  814. package/src/trackers/strategy/strategyDebug.ts +0 -23
  815. package/src/trackers/strategy/strategyNone.ts +0 -28
  816. package/src/trackers/strategy/strategyOptimized.ts +0 -35
  817. package/src/trackers/telemetryTracker.ts +0 -73
  818. package/src/trackers/types.ts +0 -86
  819. package/src/trackers/uniqueKeysTracker.ts +0 -50
  820. package/src/types.ts +0 -79
  821. package/src/utils/Backoff.ts +0 -51
  822. package/src/utils/LRUCache/LinkedList.ts +0 -130
  823. package/src/utils/LRUCache/index.ts +0 -43
  824. package/src/utils/MinEventEmitter.ts +0 -102
  825. package/src/utils/Semver.ts +0 -111
  826. package/src/utils/base64/index.ts +0 -74
  827. package/src/utils/constants/index.ts +0 -116
  828. package/src/utils/decompress/index.ts +0 -429
  829. package/src/utils/env/isLocalStorageAvailable.ts +0 -32
  830. package/src/utils/env/isNode.ts +0 -6
  831. package/src/utils/inputValidation/apiKey.ts +0 -52
  832. package/src/utils/inputValidation/attribute.ts +0 -21
  833. package/src/utils/inputValidation/attributes.ts +0 -26
  834. package/src/utils/inputValidation/event.ts +0 -24
  835. package/src/utils/inputValidation/eventProperties.ts +0 -78
  836. package/src/utils/inputValidation/eventValue.ts +0 -11
  837. package/src/utils/inputValidation/index.ts +0 -14
  838. package/src/utils/inputValidation/isOperational.ts +0 -17
  839. package/src/utils/inputValidation/key.ts +0 -51
  840. package/src/utils/inputValidation/preloadedData.ts +0 -57
  841. package/src/utils/inputValidation/split.ts +0 -27
  842. package/src/utils/inputValidation/splitExistence.ts +0 -19
  843. package/src/utils/inputValidation/splits.ts +0 -21
  844. package/src/utils/inputValidation/trafficType.ts +0 -27
  845. package/src/utils/inputValidation/trafficTypeExistence.ts +0 -33
  846. package/src/utils/jwt/index.ts +0 -16
  847. package/src/utils/jwt/types.ts +0 -10
  848. package/src/utils/key/index.ts +0 -34
  849. package/src/utils/labels/index.ts +0 -9
  850. package/src/utils/lang/binarySearch.ts +0 -41
  851. package/src/utils/lang/getFnName.ts +0 -8
  852. package/src/utils/lang/getGlobal.ts +0 -17
  853. package/src/utils/lang/index.ts +0 -279
  854. package/src/utils/lang/objectAssign.ts +0 -25
  855. package/src/utils/lang/sets.ts +0 -17
  856. package/src/utils/murmur3/common.ts +0 -54
  857. package/src/utils/murmur3/legacy.ts +0 -48
  858. package/src/utils/murmur3/murmur3.ts +0 -74
  859. package/src/utils/murmur3/murmur3_128.ts +0 -273
  860. package/src/utils/murmur3/murmur3_128_x86.ts +0 -188
  861. package/src/utils/murmur3/murmur3_64.ts +0 -36
  862. package/src/utils/murmur3/utfx.ts +0 -109
  863. package/src/utils/promise/thenable.ts +0 -4
  864. package/src/utils/promise/timeout.ts +0 -17
  865. package/src/utils/promise/wrapper.ts +0 -60
  866. package/src/utils/settingsValidation/consent.ts +0 -16
  867. package/src/utils/settingsValidation/impressionsMode.ts +0 -14
  868. package/src/utils/settingsValidation/index.ts +0 -207
  869. package/src/utils/settingsValidation/integrations/common.ts +0 -27
  870. package/src/utils/settingsValidation/integrations/configurable.ts +0 -20
  871. package/src/utils/settingsValidation/integrations/pluggable.ts +0 -19
  872. package/src/utils/settingsValidation/logger/builtinLogger.ts +0 -54
  873. package/src/utils/settingsValidation/logger/commons.ts +0 -24
  874. package/src/utils/settingsValidation/logger/pluggableLogger.ts +0 -35
  875. package/src/utils/settingsValidation/mode.ts +0 -17
  876. package/src/utils/settingsValidation/runtime.ts +0 -9
  877. package/src/utils/settingsValidation/splitFilters.ts +0 -197
  878. package/src/utils/settingsValidation/storage/storageCS.ts +0 -52
  879. package/src/utils/settingsValidation/types.ts +0 -27
  880. package/src/utils/settingsValidation/url.ts +0 -30
  881. package/src/utils/time/index.ts +0 -8
  882. package/src/utils/timeTracker/now/browser.ts +0 -12
  883. package/src/utils/timeTracker/now/node.ts +0 -6
  884. package/src/utils/timeTracker/timer.ts +0 -7
package/CHANGES.txt CHANGED
@@ -1,220 +1,963 @@
1
- 2.5.0 (August XX, 2025)
2
- - Added `storage.wrapper` configuration option to allow the SDK to use a custom storage wrapper for the storage type `LOCALSTORAGE`. Default value is `window.localStorage`.
1
+ 11.5.0 (August XX, 2025)
2
+ - Added `factory.getCache()` method for standalone server-side SDKs, which returns the rollout plan snapshot from the storage.
3
+ - Added `preloadedData` configuration option for standalone client-side SDKs, which allows preloading the SDK storage with a snapshot of the rollout plan.
3
4
 
4
- 2.4.1 (June 3, 2025)
5
- - Bugfix - Improved the Proxy fallback to flag spec version 1.2 to handle cases where the Proxy does not return an end-of-stream marker in 400 status code responses.
5
+ 11.4.1 (June 3, 2025)
6
+ - Updated @splitsoftware/splitio-commons package to version 2.4.1, which improves the Proxy fallback to flag spec version 1.2 by handling the case when the Proxy does not return an end-of-stream marker in 400 status code responses.
6
7
 
7
- 2.4.0 (May 27, 2025)
8
+ 11.4.0 (May 28, 2025)
8
9
  - Added support for rule-based segments. These segments determine membership at runtime by evaluating their configured rules against the user attributes provided to the SDK.
9
10
  - Added support for feature flag prerequisites. This allows customers to define dependency conditions between flags, which are evaluated before any allowlists or targeting rules.
11
+ - Updated @splitsoftware/splitio-commons package to version 2.4.0.
10
12
 
11
- 2.3.0 (May 16, 2025)
12
- - Updated the Redis storage to:
13
+ 11.3.0 (May 16, 2025)
14
+ - Updated @splitsoftware/splitio-commons package to version 2.3.0, which optimizes the Redis storage to:
13
15
  - Avoid lazy require of the `ioredis` dependency when the SDK is initialized, and
14
- - Flag the SDK as ready from cache immediately to allow queueing feature flag evaluations before SDK_READY event is emitted (Reverted in v1.7.0).
15
- - Bugfix - Enhanced HTTP client module to implement timeouts for failing requests that might otherwise remain pending indefinitely on some Fetch API implementations, pausing the SDK synchronization process.
16
+ - Flag the SDK as ready from cache immediately to allow queueing feature flag evaluations before SDK_READY event is emitted.
17
+ - Bugfix - Enhanced HTTP client module to implement timeouts for failing requests that might otherwise remain pending indefinitely on some Fetch API implementations.
16
18
 
17
- 2.2.0 (March 28, 2025)
19
+ 11.2.0 (March 28, 2025)
18
20
  - Added a new optional argument to the client `getTreatment` methods to allow passing additional evaluation options, such as a map of properties to append to the generated impressions sent to Split backend. Read more in our docs.
19
- - Added two new configuration options for the SDK storage in browsers when using storage type `LOCALSTORAGE`:
20
- - `storage.expirationDays` to specify the validity period of the rollout cache.
21
- - `storage.clearOnInit` to clear the rollout cache on SDK initialization.
21
+ - Added two new configuration options for the SDK's `LOCALSTORAGE` storage type to control the behavior of the persisted rollout plan cache in the browser:
22
+ - `storage.expirationDays` to specify the validity period of the rollout plan cache in days.
23
+ - `storage.clearOnInit` to clear the rollout plan cache on SDK initialization.
22
24
  - Updated SDK_READY_FROM_CACHE event when using the `LOCALSTORAGE` storage type to be emitted alongside the SDK_READY event if it has not already been emitted.
25
+ - Updated @splitsoftware/splitio-commons package to version 2.2.0.
23
26
 
24
- 2.1.0 (January 17, 2025)
27
+ 11.1.0 (January 17, 2025)
25
28
  - Added support for the new impressions tracking toggle available on feature flags, both respecting the setting and including the new field being returned on `SplitView` type objects. Read more in our docs.
29
+ - Updated @splitsoftware/splitio-commons package to version 2.1.0.
26
30
 
27
- 2.0.3 (January 9, 2025)
28
- - Bugfix - Properly handle rejected promises when using targeting rules with segment matchers in consumer modes (e.g., Redis and Pluggable storages).
31
+ 11.0.4 (January 9, 2025)
32
+ - Bugfix - Updated @splitsoftware/splitio-commons package to version 2.0.3, which properly handles rejected promises when using targeting rules with segment matchers in consumer modes (e.g., Redis and Pluggable storages).
29
33
 
30
- 2.0.2 (December 3, 2024)
31
- - Updated the factory `init` and `destroy` methods to support re-initialization after destruction. This update ensures compatibility of the React SDK with React Strict Mode, where the factory's `init` and `destroy` effects are executed an extra time to validate proper resource cleanup.
32
- - Bugfix - Sanitize the `SplitSDKMachineName` header value to avoid exceptions on HTTP/S requests when it contains non ISO-8859-1 characters (Related to issue https://github.com/splitio/javascript-client/issues/847).
34
+ 11.0.3 (December 4, 2024)
35
+ - Bugfix - Updated @splitsoftware/splitio-commons package to version 2.0.2 that sanitizes the `SplitSDKMachineName` header value to avoid exceptions on HTTP/S requests when it contains non ISO-8859-1 characters (Related to issue https://github.com/splitio/javascript-client/issues/847).
33
36
 
34
- 2.0.1 (November 25, 2024)
35
- - Bugfix - Fixed an issue with the SDK_UPDATE event on server-side, where it was not being emitted if there was an empty segment and the SDK received a feature flag update notification.
37
+ 11.0.2 (November 25, 2024)
38
+ - Updated bloom-filters and fetch-mock dependencies for vulnerability fixes.
39
+ - Bugfix - Updated @splitsoftware/splitio-commons package to version 2.0.1 that fixes an issue with the SDK_UPDATE event on Node.js, where it was not being emitted if there was an empty segment and the SDK received a feature flag update notification.
36
40
 
37
- 2.0.0 (November 1, 2024)
38
- - Added support for targeting rules based on large segments.
39
- - Added `factory.destroy()` method, which invokes the `destroy` method on all SDK clients created by the factory.
40
- - Added `SplitIO` namespace with the public TypeScript definitions to be reused by the SDKs.
41
- - Updated the handling of timers and async operations inside an `init` factory method to enable lazy initialization of the SDK in standalone mode. This update is intended for the React SDK.
42
- - Bugfix - Fixed an issue with the server-side polling manager that caused dangling timers when the SDK was destroyed before it was ready.
41
+ 11.0.1 (November 11, 2024)
42
+ - Bugfix - Revert removal of TypeScript `SplitIO` namespace at `/types/splitio.d.ts` to allow explicit imports of types from the JavaScript SDK package. E.g., `import type { IBrowserSettings } from '@splitsoftware/splitio/types/splitio';`.
43
+
44
+ 11.0.0 (November 1, 2024)
45
+ - Added support for targeting rules based on large segments for browsers (client-side API).
46
+ - Added `factory.destroy()` method, which invokes the `destroy` method of all clients created by the factory.
47
+ - Updated @splitsoftware/splitio-commons package to version 2.0.0 that includes major updates and updated some transitive dependencies for vulnerability fixes.
48
+ - Renamed distribution folders from `/lib` to `/cjs` for CommonJS build, and `/es` to `/esm` for ECMAScript Modules build.
43
49
  - BREAKING CHANGES:
44
- - Updated default flag spec version to 1.2, which requires Split Proxy v5.9.0 or higher.
45
- - Removed `/mySegments` endpoint from SplitAPI module, as it is replaced by `/memberships` endpoint.
46
- - Removed support for MY_SEGMENTS_UPDATE and MY_SEGMENTS_UPDATE_V2 notification types, as they are replaced by MEMBERSHIPS_MS_UPDATE and MEMBERSHIPS_LS_UPDATE notification types.
47
- - Removed the deprecated `GOOGLE_ANALYTICS_TO_SPLIT` and `SPLIT_TO_GOOGLE_ANALYTICS` integrations.
48
- - Removed the migration logic for the old format of MySegments keys in LocalStorage introduced in JavaScript SDK v10.17.3.
49
- - Removed the `sdkClientMethodCSWithTT` function, which handled the logic to bound an optional traffic type to SDK clients. Client-side SDK implementations must use `sdkClientMethodCS` module, which, unlike the previous function, does not allow passing a traffic type but simplifies the SDK API.
50
- - Removed internal ponyfills for `Map` and `Set` global objects, dropping support for IE and other outdated browsers. The SDK now requires the runtime environment to support these features natively or to provide a polyfill.
51
- - Removed the `sync.localhostMode` configuration option to plug the LocalhostMode module.
52
-
53
- 1.17.1 (July 25, 2025)
54
- - Updated the Redis storage to avoid lazy require of the `ioredis` dependency when the SDK is initialized.
55
- - Updated some transitive dependencies for vulnerability fixes.
56
- - Bugfix - Enhanced HTTP client module to implement timeouts for failing requests that might otherwise remain pending indefinitely on some Fetch API implementations, pausing the SDK synchronization process.
57
- - Bugfix - Properly handle rejected promises when using targeting rules with segment matchers in consumer modes (e.g., Redis and Pluggable storages).
58
- - Bugfix - Sanitize the `SplitSDKMachineName` header value to avoid exceptions on HTTP/S requests when it contains non ISO-8859-1 characters (Related to issue https://github.com/splitio/javascript-client/issues/847).
59
- - Bugfix - Fixed an issue with the SDK_UPDATE event on server-side, where it was not being emitted if there was an empty segment and the SDK received a feature flag update notification.
60
- - Bugfix - Fixed an issue with the server-side polling manager that caused dangling timers when the SDK was destroyed before it was ready.
61
-
62
- 1.17.0 (September 6, 2024)
63
- - Added `sync.requestOptions.getHeaderOverrides` configuration option to enhance SDK HTTP request Headers for Authorization Frameworks.
64
- - Added `isTimedout` and `lastUpdate` properties to IStatusInterface to keep track of the timestamp of the last SDK event, used on React and Redux SDKs.
50
+ - NOTE: Refer to ./MIGRATION-GUIDE.md for instructions on how to migrate your codebase from version 0.x to 1.0.0.
51
+ - Dropped support for Split Proxy below version 5.9.0 when the SDK runs in the browser (client-side API). The SDK now requires Split Proxy 5.9.0 or above for browser usage.
52
+ - Dropped support for Node.js v6. The SDK now requires Node.js v14 or above.
53
+ - Removed TypeScript `SplitIO` namespace from `@splitsoftware/splitio/types/splitio`. Reverted in 11.0.1.
54
+ - Removed internal ponyfills for the `Map` and `Set` global objects, dropping support for IE and other outdated browsers. The SDK now requires the runtime environment to support these features natively or provide a polyfill.
55
+ - Removed the deprecated `GOOGLE_ANALYTICS_TO_SPLIT` and `SPLIT_TO_GOOGLE_ANALYTICS` integrations. The `integrations` configuration option has been removed from the SDK factory configuration, along with the associated interfaces in the TypeScript definitions.
56
+ - Removed the `core.trafficType` configuration option (`SplitIO.IBrowserSettings['core']['trafficType]`) and the `trafficType` parameter from the SDK `client()` method in Browser (`SplitIO.IBrowserSDK['client']`). As a result, traffic types can no longer be bound to SDK clients, and the traffic type must be provided in the `track` method.
57
+
58
+ 10.28.0 (September 6, 2024)
59
+ - Updated @splitsoftware/splitio-commons package to version 1.17.0 that includes minor updates:
60
+ - Added `sync.requestOptions.getHeaderOverrides` configuration option to enhance SDK HTTP request Headers for Authorization Frameworks.
61
+ - Updated some transitive dependencies for vulnerability fixes.
62
+
63
+ 10.27.0 (June 25, 2024)
64
+ - Added `sync.requestOptions.agent` option to SDK configuration for Node.js. This allows passing a custom Node.js HTTP(S) Agent with specific configurations for the SDK requests, like custom TLS settings or a network proxy (See https://help.split.io/hc/en-us/articles/360020564931-Node-js-SDK#proxy).
65
65
  - Updated some transitive dependencies for vulnerability fixes.
66
66
 
67
- 1.16.0 (June 13, 2024)
68
- - Added the `getOptions` method to the `IPlatform` interface to allow the SDK to pass request options to the `fetch` function and `EventSource` constructor when fetching data from the Split servers. The method is optional and, if provided, it is called twice: first for the `fetch` options and then for the `EventSource` options. Useful for advanced use cases like configuring a proxy or validating HTTPS certificates in Node.js.
69
- - Updated the Redis storage to lazily import the `ioredis` dependency when the storage is created. This prevents errors when the SDK is imported or bundled in a .mjs file, as `ioredis` is a CommonJS module.
70
- - Bugfix - Restored some input validation error logs that were removed in version 1.12.0. The logs inform the user when the `getTreatment(s)` methods are called with an invalid value as feature flag name or flag set name.
67
+ 10.26.1 (June 14, 2024)
68
+ - Updated the internal imports of 'os' and 'ioredis' modules for Node.js, to use EcmaScript 'import' rather than CommonJS 'require' for the ES modules build. This avoids runtime errors on some scenarios when bundling the SDK into a .mjs file or importing it from a .mjs file.
69
+ - Updated eventsource dependency for Node.js. The eventsource v1.1.2 dependency was removed, and the SDK now uses an embedded adaptation that can accept an HTTP(S) agent option, like other HTTP(S) requests.
70
+ - Updated @splitsoftware/splitio-commons package to version 1.16.0 that includes some vulnerability and bug fixes.
71
+ - Bugfix - Restored some input validation error logs that were removed in version 10.24.0. The logs inform the user when the `getTreatment(s)` methods are called with an invalid value as feature flag name or flag set name.
71
72
  - Bugfix - Fixed localhost mode to emit SDK_UPDATE when mocked feature flags are updated in the `features` object map of the config object (Related to issue https://github.com/splitio/javascript-browser-client/issues/119).
72
73
 
73
- 1.15.0 (May 13, 2024)
74
- - Added an optional settings validation parameter to let overwrite the default flag spec version, used by the JS Synchronizer.
74
+ 10.26.0 (May 6, 2024)
75
+ - Updated @splitsoftware/splitio-commons package to version 1.14.0 that includes minor updates:
76
+ - Added support for targeting rules based on semantic versions (https://semver.org/).
77
+ - Added special impression label "targeting rule type unsupported by sdk" when the matcher type is not supported by the SDK, which returns 'control' treatment.
78
+ - Updated Split API client to include the flags spec version query parameter for the `splitChanges` and `auth` endpoints.
75
79
 
76
- 1.14.0 (May 6, 2024)
77
- - Added support for targeting rules based on semantic versions (https://semver.org/).
78
- - Added special impression label "targeting rule type unsupported by sdk" when the matcher type is not supported by the SDK, which returns 'control' treatment.
79
- - Updated Split API client to include the flags spec version query parameter for the `splitChanges` and `auth` endpoints.
80
+ 10.25.2 (March 26, 2024)
81
+ - Updated some transitive dependencies for vulnerability fixes.
82
+ - Bugfix - Added tslib as an explicit dependency to avoid issues with some package managers that don't resolve it automatically as a transitive dependency from @splitsoftware/splitio-commons (Related to issue https://github.com/splitio/javascript-client/issues/795).
80
83
 
81
- 1.13.1 (January 10, 2024)
82
- - Updated client `destroy` method to release SDK key immediately and avoid unexpected warning logs when a factory is created with the same SDK key after the previous one was destroyed.
84
+ 10.25.1 (January 16, 2024)
85
+ - Updated @splitsoftware/splitio-commons package to version 1.13.1 and some transitive dependencies for vulnerability fixes.
83
86
 
84
- 1.13.0 (January 4, 2024)
85
- - Removed the `getOptions` method from the `IPlatform` interface to simplify implementation. Request options can be handled within the `getFetch` method.
87
+ 10.25.0 (January 4, 2024)
88
+ - Updated SDK to support URLs without TLS protocol in Node.js, to simplify proxy usage inside private networks.
86
89
 
87
- 1.12.1 (December 12, 2023)
88
- - Updated PluggableStorage, for producer mode, and LocalStorage, for standalone mode, to clear the storage before initiating the synchronization process if it was previously synchronized with a different SDK key (i.e., a different environment) or different Split Filter criteria.
89
- - Bugfix - Fixed an issue when tracking telemetry latencies for the new `getTreatmentsByFlagSet(s)` methods in Redis and Pluggable storages, which was causing the SDK to not track those stats.
90
+ 10.24.1 (December 12, 2023)
91
+ - Updated SDK cache for browsers using localStorage, to clear cached feature flag definitions before initiating the synchronization process if the cache was previously synchronized with a different SDK key (i.e., a different environment) or different Split Filter criteria, to avoid using invalid cached data when the SDK is ready from cache.
92
+ - Updated @splitsoftware/splitio-commons package to version 1.12.1.
90
93
 
91
- 1.12.0 (December 4, 2023)
92
- - Added support for Flag Sets in "consumer" and "partial consumer" modes for Pluggable and Redis storages.
93
- - Updated evaluation flow to log a warning when using flag sets that don't contain cached feature flags.
94
+ 10.24.0 (December 4, 2023)
95
+ - Added support for Flag Sets on the SDK, which enables grouping feature flags and interacting with the group rather than individually (more details in our documentation):
96
+ - Added new variations of the get treatment methods to support evaluating flags in given flag set/s.
97
+ - getTreatmentsByFlagSet and getTreatmentsByFlagSets
98
+ - getTreatmentsWithConfigByFlagSets and getTreatmentsWithConfigByFlagSets
99
+ - Added a new optional Split Filter configuration option. This allows the SDK and Split services to only synchronize the flags in the specified flag sets, avoiding unused or unwanted flags from being synced on the SDK instance, bringing all the benefits from a reduced payload.
100
+ - Note: Only applicable when the SDK is in charge of the rollout data synchronization. When not applicable, the SDK will log a warning on init.
101
+ - Added `sets` property to the `SplitView` object returned by the `split` and `splits` methods of the SDK manager to expose flag sets on flag views.
102
+ - Added `defaultTreatment` property to the `SplitView` object returned by the `split` and `splits` methods of the SDK manager (Related to issue https://github.com/splitio/javascript-commons/issues/225).
103
+ - Updated @splitsoftware/splitio-commons package to version 1.12.0 that includes vulnerability fixes, flag sets support, and other improvements.
94
104
  - Updated Redis adapter to handle timeouts and queueing of some missing commands: 'hincrby', 'popNRaw', and 'pipeline.exec'.
95
105
  - Bugfix - Fixed manager methods in consumer modes to return results in a promise when the SDK is not operational (not ready or destroyed).
96
-
97
- 1.11.0 (November 3, 2023)
98
- - Added support for Flag Sets on the SDK, which enables grouping feature flags and interacting with the group rather than individually (more details in our documentation):
99
- - Added new variations of the get treatment methods to support evaluating flags in given flag set/s.
100
- - getTreatmentsByFlagSet and getTreatmentsByFlagSets
101
- - getTreatmentsWithConfigByFlagSets and getTreatmentsWithConfigByFlagSets
102
- - Added a new optional Split Filter configuration option. This allows the SDK and Split services to only synchronize the flags in the specified flag sets, avoiding unused or unwanted flags from being synced on the SDK instance, bringing all the benefits from a reduced payload.
103
- - Note: Only applicable when the SDK is in charge of the rollout data synchronization. When not applicable, the SDK will log a warning on init.
104
- - Added `sets` property to the `SplitView` object returned by the `split` and `splits` methods of the SDK manager to expose flag sets on flag views.
105
106
  - Bugfix - Fixed SDK key validation in Node.js to ensure the SDK_READY_TIMED_OUT event is emitted when a client-side type SDK key is provided instead of a server-side one (Related to issue https://github.com/splitio/javascript-client/issues/768).
106
107
 
107
- 1.10.0 (October 20, 2023)
108
- - Added `defaultTreatment` property to the `SplitView` object returned by the `split` and `splits` methods of the SDK manager (Related to issue https://github.com/splitio/javascript-commons/issues/225).
109
- - Updated log warning message to include the feature flag name when `getTreatment` method is called and the SDK client is not ready.
110
-
111
- 1.9.2 (October 19, 2023)
112
- - Updated client module to support the Split Suite.
113
- - Updated some transitive dependencies for vulnerability fixes.
114
-
115
- 1.9.1 (September 21, 2023)
116
- - Updated browser listener to avoid registering a handler for 'unload' DOM events, that can prevent browsers from being able to put pages in the back/forward cache for faster back and forward loads (Related to issue https://github.com/splitio/javascript-client/issues/759).
108
+ 10.23.1 (September 22, 2023)
109
+ - Updated @splitsoftware/splitio-commons package to version 1.9.1. This update removes the handler for 'unload' DOM events, that can prevent browsers from being able to put pages in the back/forward cache for faster back and forward loads (Related to issue https://github.com/splitio/javascript-client/issues/759).
117
110
 
118
- 1.9.0 (July 18, 2023)
119
- - Updated streaming architecture implementation to apply feature flag updates from the notification received which is now enhanced, improving efficiency and reliability of the whole update system.
111
+ 10.23.0 (July 18, 2023)
112
+ - Updated @splitsoftware/splitio-commons package to version 1.9.0 that includes minor improvements:
113
+ - Updated streaming architecture implementation to apply feature flag updates from the notification received which is now enhanced, improving efficiency and reliability of the whole update system.
120
114
 
121
- 1.8.3 (June 29, 2023)
115
+ 10.22.6 (July 6, 2023)
122
116
  - Updated some transitive dependencies for vulnerability fixes.
123
- - Updated SDK_READY_TIMED_OUT event to be emitted immediately when a connection error occurs using pluggable storage (i.e., when the wrapper `connect` promise is rejected) in consumer and partial consumer modes.
124
- - Bugfix - The `destroy` method has been updated to immediately flag the SDK client as destroyed, to prevent unexpected behaviours when `getTreatment` and `track` methods are called synchronously after `destroy` method is called.
117
+ - Updated @splitsoftware/splitio-commons package to version 1.8.3 that includes the following bug fix:
118
+ - Bugfix - The `destroy` method has been updated to immediately flag the SDK client as destroyed, to prevent access to the storage when `getTreatment` and `track` methods are called after the SDK is destroyed.
125
119
 
126
- 1.8.2 (May 15, 2023)
127
- - 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.
128
- - Updated split storage modules to optimize some operations when using Redis and pluggable storages.
120
+ 10.22.5 (May 15, 2023)
121
+ - Updated @splitsoftware/splitio-commons package to version 1.8.2 that includes minor improvements.
122
+ - 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.
123
+ - Updated split storage modules to optimize some operations when using Redis and pluggable storages.
129
124
  - Updated some transitive dependencies for vulnerability fixes.
130
125
 
131
- 1.8.1 (February 7, 2023)
132
- - Updated a module import to remove a trailing comma that can cause issues with some bundlers.
133
-
134
- 1.8.0 (February 3, 2023)
135
- - Added flush data method to client.
126
+ 10.22.4 (March 9, 2023)
127
+ - Updated @splitsoftware/splitio-commons package to version 1.8.1 that includes minor improvements.
128
+ - Updated some transitive dependencies for vulnerability fixes.
136
129
 
137
- 1.7.3 (December 16, 2022)
138
- - Updated unique keys cache for Redis and Pluggable storages to optimize the usage of the underlying storage.
130
+ 10.22.3 (December 16, 2022)
139
131
  - Updated some transitive dependencies for vulnerability fixes.
140
- - Bugfix - Updated events and impressions cache in localhost mode in order to avoid memory leaks (Related to issue https://github.com/splitio/javascript-commons/issues/181).
132
+ - Bugfix - Upgrade @splitsoftware/splitio-commons package to version 1.7.3 which includes a memory leak fix for localhost mode (Related to issue https://github.com/splitio/javascript-commons/issues/181) among other improvements.
141
133
 
142
- 1.7.2 (October 14, 2022)
143
- - Bugfix - Handle `Navigator.sendBeacon` API exceptions in the browser, and fallback to regular Fetch/XHR transport in case of error.
134
+ 10.22.2 (November 3, 2022)
135
+ - Bugfix - Replaced bloom filter dependency that caused dependency conflicts (with farmhash lib) in AWS Lambda. This change only affects Node.js flavor.
144
136
 
145
- 1.7.1 (October 5, 2022)
146
- - Updated default value of `scheduler.featuresRefreshRate` config parameter to 60 seconds.
137
+ 10.22.1 (October 14, 2022)
138
+ - Bugfix - Upgrade @splitsoftware/splitio-commons package to version 1.7.2, that handles `Navigator.sendBeacon` API exceptions in the browser, and fallback to regular Fetch/XHR transport in case of error.
147
139
 
148
- 1.7.0 (October 4, 2022)
140
+ 10.22.0 (October 5, 2022)
149
141
  - 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.
150
- - Updated SDK telemetry to support pluggable storage, partial consumer mode, and synchronizer.
151
- - Updated storage implementations to improve the performance of feature flag evaluations (i.e., `getTreatment(s)` method calls) when using the default storage in memory.
152
- - Updated evaluation flow (i.e., `getTreatment(s)` method calls) to avoid calling the storage for cached feature flags when the SDK is not ready or ready from cache. It applies to all SDK modes.
142
+ - Updated default value of `scheduler.featuresRefreshRate` config parameter from 5 seconds to 60 seconds for Node.js and from 30 seconds to 60 seconds for Browser.
143
+ - 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,
144
+ and avoid calling the storage for cached feature flags when the SDK is not ready or ready from cache, among other improvements.
153
145
 
154
- 1.6.1 (July 22, 2022)
155
- - Updated GoogleAnalyticsToSplit integration to validate `autoRequire` config parameter and avoid some wrong warning logs when mapping GA hit fields to Split event properties.
146
+ 10.21.1 (July 25, 2022)
147
+ - Bugfix - Added missed type definitions `enabled` from `sync`.
156
148
 
157
- 1.6.0 (July 21, 2022)
149
+ 10.21.0 (July 22, 2022)
158
150
  - 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).
159
151
  - Updated browser listener to push remaining impressions and events on 'visibilitychange' and 'pagehide' DOM events, instead of 'unload', which is not reliable in modern mobile and desktop Web browsers.
160
152
  - Updated the synchronization flow to be more reliable in the event of an edge case generating delay in cache purge propagation, keeping the SDK cache properly synced.
161
- - Bugfix - Removed js-yaml dependency to avoid resolution to an incompatible version on certain npm versions when installing third-party dependencies that also define js-yaml as transitive dependency (Related to issue https://github.com/splitio/javascript-client/issues/662).
153
+ - Updated some dependencies for vulnerability fixes.
154
+ - Bugfix - Moved js-yaml dependency from @splitsoftware/splitio-commons to avoid resolution to an incompatible version on certain npm versions when installing third-party dependencies that also define js-yaml as transitive dependency (Related to issue https://github.com/splitio/javascript-client/issues/662).
162
155
 
163
- 1.5.0 (June 29, 2022)
164
- - 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 SDK 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.
156
+ 10.20.0 (June 29, 2022)
157
+ - 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.
165
158
  - Updated telemetry logic to track the anonymous config for user consent flag set to declined or unknown.
166
159
  - 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.
167
160
 
168
- 1.4.1 (June 13, 2022)
161
+ 10.19.1 (Jun 13, 2022)
162
+ - Updated eventsource dependency range to ^1.1.2 to avoid a vulnerability and dependency resolution to a vulnerable version of url-parse transitive dependency.
169
163
  - Bugfix - Updated submitters logic, to avoid dropping impressions and events that are being tracked while POST request is pending.
170
164
 
171
- 1.4.0 (May 24, 2022)
165
+ 10.19.0 (May 24, 2022)
172
166
  - Added `scheduler.telemetryRefreshRate` property to SDK configuration, and deprecated `scheduler.metricsRefreshRate` property.
173
167
  - Updated SDK telemetry storage, metrics and updater to be more effective and send less often.
174
- - Bugfix - Updated default values for `scheduler.impressionsRefreshRate` config parameter: 300s for OPTIMIZED impression mode and 60s for DEBUG impression mode.
168
+ - Bugfix - Updated default values for `scheduler.impressionsRefreshRate` config parameter: 300s for OPTIMIZED impression mode and 60s for DEBUG impression mode,
169
+ in both Browser and Node.js (previously it was 60s and 300s in Browser and Node.js respectively, equal for DEBUG and OPTIMIZED impression modes).
175
170
 
176
- 1.3.1 (April 19, 2022)
177
- - Bugfix - Added peer dependencies to avoid issues when requiring some third-party dependencies used by modules of the package (Related to issue https://github.com/splitio/javascript-client/issues/662).
171
+ 10.18.2 (May 6, 2022)
172
+ - Bugfix - Removed "ip" dependency to use an inline copy of it that fixes an error when using it in Node.js v18 (https://github.com/indutny/node-ip/issues/113).
173
+
174
+ 10.18.1 (April 20, 2022)
175
+ - Updated some dependencies for vulnerability fixes.
176
+ - Bugfix - Updated @splitsoftware/splitio-commons package to avoid an error when requiring some third-party dependencies used by the package (Related to issue https://github.com/splitio/javascript-client/issues/662).
178
177
  - Bugfix - Updated `ready` method to rejects the promise with an Error object instead of a string value (Related to issue https://github.com/splitio/javascript-client/issues/654).
179
178
 
180
- 1.3.0 (April 6, 2022)
179
+ 10.18.0 (April 7, 2022)
181
180
  - Added user consent feature to allow delaying or disabling the data tracking from SDK until user consent is explicitly granted or declined. Read more in our docs.
182
181
  - Added `scheduler.impressionsQueueSize` property to SDK configuration to limit the amount of impressions tracked in memory. Read more in our docs.
183
182
  - Added support to accept TLS configuration options to the Redis storage in Node.js. Read more in our docs.
184
- - Updated format for MySegments keys in LocalStorage, keeping backwards compatibility (issue https://github.com/splitio/javascript-client/issues/638).
185
- - Updated some modules due to general polishing and refactors, including updates in some log messages.
183
+ - Updated type definitions to specialize the type of the `storage.options` object for Redis storage in Node.js.
186
184
  - Updated some dependencies for vulnerability fixes.
187
185
  - Bugfix - Updated internal isObject utility function, to avoid unexpected behaviors on frameworks and libraries that uses multiple VM contexts, like NuxtJS dev server.
188
- - Bugfix - Fixed validation of `core.key` SDK configuration param, to parse it into a string and log a warning when passing a number (Related to issue https://github.com/splitio/react-native-client/issues/19).
189
- - Bugfix - Fixed validation of `sync.impressionsMode` SDK configuration param, to avoid an exception on SplitFactory instantiation when passing a non-string value.
186
+ - Bugfix - Logging settings (i.e., the `debug` SDK configuration param and factory logger methods) are configurable per factory instance, instead of affecting all factories globally.
190
187
  - Bugfix - Fixed an issue with `connectionTimeout` options params of Redis storage, that was being ignored and not passed down to the underlying ioredis client.
191
- - Bugfix - Fixed streaming synchronization issue with multiple clients.
192
- - Bugfix - Fixed issue with internal Map ponyfill that results in logger not working properly on IE11 browser.
188
+ - Bugfix - Updated the validation of some SDK configuration params to log errors and throw exceptions with clear descriptions of the invalid setup:
189
+ - 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'.".
190
+ - 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.".
191
+ - 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.".
192
+
193
+ - 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,
194
+ but it does not imply a breaking change as long as the library is imported via its main entrypoint (e.g., `const { SplitFactory } = require('@splitsoftware/splitio')` or `import { SplitFactory } from '@splitsoftware/splitio'`).
195
+
196
+ 10.17.3 (February 25, 2022)
197
+ - Updated format for MySegments keys in LocalStorage, keeping backwards compatibility (issue https://github.com/splitio/javascript-client/issues/638).
198
+ - Updated some dependencies for vulnerability fixes.
193
199
 
194
- 1.2.0 (January 19, 2022)
200
+ 10.17.2 (January 31, 2022)
201
+ - Updated some dependencies for vulnerability fixes.
202
+ - Bugfix - Fixed internal handling of Fetch API promise rejection, to avoid unhandled exceptions on some Web browsers (issue https://github.com/splitio/javascript-client/issues/621)
203
+
204
+ 10.17.1 (January 13, 2022)
205
+ - Updated some transitive dependencies for vulnerability fixes.
206
+ - Bugfix - Fixed internal handling of SDK_READY_FROM_CACHE event, to avoid CSP issues in browsers.
207
+
208
+ 10.17.0 (January 3, 2022)
195
209
  - Added support to SDK clients on browser to optionally bind attributes to the client, keeping these loaded within the SDK along with the user ID, for easier usage when requesting flag.
210
+ - Bugfix - Fixed an issue returning dynamic configs when the treatment name contains a dot (".").
196
211
 
197
- 1.1.0 (January 11, 2022)
198
- - Added support for the SDK to run in "consumer" and "partial consumer" modes, with a pluggable implementation of it's internal storage, enabling
199
- 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.
200
- - 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.
201
- - Updated ioredis dependency for vulnerability fixes.
202
- - Bugfix - Fixed issue returning dynamic configs if treatment name contains a dot (".").
212
+ 10.16.1 (October 25, 2021)
213
+ - Updated some internal modules to optimize the time efficiency of feature flag evaluations (i.e., `getTreatment(s)` method calls).
214
+ - Updated some dependencies for vulnerability fixes (ioredis, @babel/cli, eslint, eslint-plugin-compat).
215
+ - Bugfix - Fixed localhost mode with localStorage, to use a mock in memory instead of localStorage API directly but keep emitting emit SDK_READY_FROM_CACHE event.
203
216
 
204
- 1.0.0 (October 20, 2021)
205
- - 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.
217
+ 10.16.0 (September 28, 2021)
218
+ - Updated localhost mode to emit SDK_READY_FROM_CACHE event in Browser when using localStorage (issue https://github.com/splitio/react-client/issues/34).
206
219
  - Updated streaming logic to use the newest version of our streaming service, including:
207
- - Integration with Auth service V2, connecting to the new channels and applying the received connection delay.
208
- - Implemented handling of the new MySegmentsV2 notification types (SegmentRemoval, KeyList, Bounded and Unbounded)
209
- - New control notification for environment scoped streaming reset.
210
- - 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).
211
- - Updated dependencies for vulnerability fixes.
212
-
213
- 0.1.0 (March 30, 2021)
214
- - Initial public release. It includes common modules to be consumed by the different Split SDK implementations written in JavaScript. Based on the original JS SDK in the `javascript-client` repository.
215
- - It's designed with a modular approach, with the following goals in mind:
216
- - Dependents should be able to include the modules that are needed for, as an example, a storage.
217
- - Dependents should be able to use the module that's specific for their runtime environment, allowing for better usage of native APIs as well as to build optimizations targeted by each platform.
218
- - Size reduction should be applicable when possible.
219
- - Design should be extensible, specially for modules that act as an orchestrator.
220
- - Code reusability.
220
+ - Integration with Auth service V2, connecting to the new channels and applying the received connection delay.
221
+ - Implemented handling of the new MySegmentsV2 notification types (SegmentRemoval, KeyList, Bounded and Unbounded)
222
+ - New control notification for environment scoped streaming reset.
223
+ - Updated some dependencies to their latest versions, including Webpack 4 to 5, to build a more optimized UMD bundle.
224
+ - NOTE: build script is configured to transpile to ES5 with Babel loose mode (https://2ality.com/2015/12/babel6-loose-mode.html). It results in a smaller bundle size and faster code execution but with some differences in the transpiled code, that may affect old browser versions like some builds of IE10.
225
+
226
+ 10.15.9 (Aug 13, 2021)
227
+ - Updated some dependencies with vulnerability fixes.
228
+ - Updated some log messages related to HTTP request errors.
229
+ - Bugfix - Fixed internal promise wrapper to avoid an error with Meteor framework.
230
+ - Bugfix - Fixed type definitions for `ISettings['features']` (issue #560).
231
+ - Bugfix - Name remaining anonymous functions that generate warnings when transpiling for IE11 (issue #557)
232
+
233
+ 10.15.8 (June 11, 2021)
234
+ - Updated listener for 'unload' DOM events to close any remaining streaming connections.
235
+ - Added telemetry headers in form of query params to SSE connection.
236
+
237
+ 10.15.7 (June 3, 2021)
238
+ - Updated some dependencies with vulnerability fixes.
239
+ - Removed "utfx" dependency to use an inline copy of it with the minimum features used by the SDK (issue #544).
240
+ - Bugfix - Fixed some issues of localhost mode:
241
+ - Support localhost mode on multiple SDK instances. Each instance handles its own mocked features, instead of sharing the same mock.
242
+ - SDK_UPDATE is emitted only once if mocked features changes.
243
+ - On shared clients, SDK_UPDATE event is now emitted if mocked features changes.
244
+
245
+ 10.15.6 (May 21, 2021)
246
+ - Updated error handling following the recommended practice of throwing only Error objects.
247
+ - Updated ioredis version now that their incompatibility with Node.js <10 was already fixed.
248
+ - Updated Karma and a transitive dependency with vulnerabilities.
249
+ - Updated dev dependency on redis-dump to redis-dumpz package to be able to fix a vulnerability on Redis transitive dependency.
250
+ - Bugfix - Name two anonymous functions that generate warnings when transpiling for IE11 (issue #535)
251
+
252
+ 10.15.5 (Apr 29, 2021)
253
+ - Updated some dependencies, including a vulnerability fix.
254
+
255
+ 10.15.4 (Mar 17, 2021)
256
+ - Updated Streaming logic with some improvements and fixes, including:
257
+ - Updated SSE error handling.
258
+ - Extended publishers tracking to support multi-region infrastructure.
259
+ - Enforced revalidation for requests stored in local caches, like proxies or browsers.
260
+ - Bugfix - In Node.js, fetch new segments captured due to streaming notifications.
261
+ - Updated some dependencies, including a vulnerability fix.
262
+
263
+ 10.15.3 (Feb 10, 2021)
264
+ - Updated type definitions to remove `@types/node` dependency and avoid conflicts between Node.js and DOM type definitions.
265
+ - Bugfix - Handle issue importing node-fetch library (issue #505).
266
+
267
+ 10.15.2 (Dec 3, 2020)
268
+ - Updated requests for `/testImpressions/beacon` to include the impressions mode.
269
+
270
+ 10.15.1 (Nov 12, 2020)
271
+ - Updated the version for ioredis in the package.json to be fixed to 4.18.0 given after 4.19.0 it requires Node.js 10, in case this SDK is installed without considering our package-lock.json file on an old Node.js.
272
+ - Updated TypeScript declarations to include the `urls` settings object (to connect to Split Synchronizer in proxy mode) for the non-async settings where it would be applicable.
273
+ - Bugfix - Updating some imports of hashing utilities to use safe relative paths and avoid module resolution issues.
274
+ - Bugfix - Updating logic to avoid a corner case issue with the sendHitTask callback handling of the GOOGLE_ANALYTICS_TO_SPLIT integration.
275
+ - Bugfix - Updating the package.json version import to be compatible with latest standards (Related to issue https://github.com/splitio/javascript-client/pull/495, thanks @andrew-t-james-hm).
276
+
277
+ 10.15.0 (Oct 6, 2020)
278
+ - Added impressions dedupe logic to avoid sending duplicated impressions:
279
+ - Added `ImpressionsCount` cache to count impressions generated per feature.
280
+ - Added `ImpressionObserver` to detect previous generated impression.
281
+ - Added new endpoint (`testImpressions/count`) to send all the generated impressions in a time frame.
282
+ - Added beacon endpoint for ImpressionsCount.
283
+ - Added murmur3 128 bits hashing and splitted logic between browser and Node.js.
284
+ - Added `OPTIMIZED` and `DEBUG` modes in order to enabling/disabling how impressions are going to be sent into Split servers,
285
+ - `OPTIMIZED`: will send unique impressions in a timeframe in order to reduce how many times impressions are posted to Split.
286
+ - `DEBUG`: will send every impression generated to Split.
287
+ - Updated JSON bulk properties for Impressions to decrease the payload size.
288
+ - Updated `ImpressionsTracker` and `ImpressionTracker` to be only one and be used for both type of evaluations: `getTreatment` and `getTreatments`.
289
+ - Bugfix - added URI encoding of user keys to avoid HTTP errors when fetching MySegments for keys with special characters.
290
+
291
+ 10.14.2 (Sep 18, 2020)
292
+ - Updated `node-fetch` dependency to fix a vulnerability.
293
+ - Bugfix - updated the feature detection of Set global constructor to avoid possible reference errors.
294
+
295
+ 10.14.1 (Aug 13, 2020)
296
+ - Updated push streaming support for Node.js to optimize requests to Split services.
297
+ - Bugfix - Replaced the use of `for...in` statements since it iterates over enumerable properties on the prototype chain, which might be polluted by code external to the library.
298
+
299
+ 10.14.0 (Jul 31, 2020)
300
+ - Added `sync.splitFilters` property to SDK configuration to pass a list of filters for the feature flags that will be downloaded. Read more in our docs.
301
+ - Added expiration policy to SDK cache for browsers using localStorage: cache is cleared after 10 days of the last successful update.
302
+ - Updated babel configuration to remove core-js dependency and refactored code in favor of size reduction of UMD, ESM and CommonJS builds.
303
+ - NOTE: removed some polyfills of global objects not available in some builds of IE10.
304
+
305
+ 10.13.0 (Jun 25, 2020)
306
+ - Updated client.ready() and manager.ready() functions to be consumed on demand and return a promise reflecting the current status of the SDK at the time the method was invoked.
307
+ - Updated readiness events on consumer mode: the SDK emits SDK_READY event once the connection to Redis cache is successful.
308
+ - Updated streamingEnabled default value from false to true, to use streaming synchronization by default.
309
+ - Removed the use of Promise.prototype.finally to avoid issues with some promise polyfills.
310
+
311
+ 10.12.1 (May 18, 2020)
312
+ - Updated logging messages for streaming notifications to DEBUG log level.
313
+ - Updated asynchronous logic handling to avoid async/await syntax in order to remove regenerator-runtime dependency.
314
+ - Removed axios HTTP library in favor of fetch for browsers (with XHR as fallback) and node-fetch for Node.js.
315
+
316
+ 10.12.0 (April 30, 2020)
317
+ - Added support for the new Split streaming architecture. When enabled, the SDK will not poll for updates but instead receive notifications every time there's a change in your environments,
318
+ allowing to process those much quicker. If disabled (default) or in the event of an issue, the SDK will fallback to the known polling mechanism to provide a seamless experience.
319
+
320
+ 10.11.1 (Mar 19, 2020)
321
+ - Updated @babel/runtime-corejs3, @types/node and several dev dependencies.
322
+ - Updated the name of the "events" config of GOOGLE_ANALYTICS_TO_SPLIT integration to "hits".
323
+
324
+ 10.11.0 (Mar 13, 2020)
325
+ - Added integrations property to configuration which could receive a list of valid integrations.
326
+ - Added support of inbound and outbound SDK to SDK integrations for Google Analytics. Read more in our documentation's integrations section.
327
+ - Updated logging logic to avoid calling console.error in the client side.
328
+ - Updated logging error messages priority to significantly reduce the amount of error level logs that can't be silenced.
329
+ - Updated axios to 0.19.2 and few other minor updates on dev dependencies.
330
+ - Updated default metricsRefreshRate from 60s to 120s and reduced the log level from ERROR to INFO for telemetry post failures.
331
+ - Bugfix - Emit SDK_UPDATE in localhost only when mock was actually updated.
332
+
333
+ 10.10.0 (Jan 10, 2020)
334
+ - Added SDK_READY_FROM_CACHE event, which will be emitted in LocalStorage mode when the SDK finds feature flag definitions in the storage of the browser.
335
+ - Updated a dependency to fix a vulnerability (serialize-javascript).
336
+ - Updated multiple dependencies and dev dependencies (@types/node, axios, core-js, events, sinon, tape and the babel cli, core, preset-env, register and plugin-transform-runtime)
337
+
338
+ 10.9.2 (Nov 20, 2019)
339
+ - Sonar - Removed extra parameter from function invocation to remove the only bug highlighted by Sonar.
340
+ - Bugfix - When using Redis, return expire result to avoid race condition with redis disconnection due to a client destroy.
341
+
342
+ 10.9.1 (Nov 7, 2019)
343
+ - Added SonarQube integration.
344
+ - Bugfix - Avoid certain keys (containing one of three keywords) on the browser to generate a request to the wrong endpoint.
345
+
346
+ 10.9.0 (Oct 24, 2019)
347
+ - Added listener for 'unload' DOM events to push remaining impressions and events when the browser page is closed or reloaded.
348
+ - Added setting core.IPAddressesEnabled to disable reporting IP Addresses and Machine name back to Split cloud.
349
+ - Updated Redis storage to fetch multiple feature flags at once for getTreatments/getTreatmentsWithConfig.
350
+ - Updated most dependencies to their latest versions. Biggest change is babel (from 6 to 7), Webpack 3 to 4, Karma and ioredis.
351
+
352
+ 10.8.4 (Sep 24, 2019)
353
+ - Added module "events" as optional dependency.
354
+ - Removed dependency on "util" module.
355
+ - Updated transport module to use a local axios instance instead of the global one, to avoid polluting the shared one.
356
+ - Updated input validation log when trying to get data of a non-existent feature flag to have level WARN instead of ERROR.
357
+
358
+ 10.8.3 (Sep 16, 2019)
359
+ - Updated two default values on startup configuration for Browsers:
360
+ - startup.readyTimeout default value went up from 1.5s to 10s.
361
+ - startup.retriesOnFailureBeforeReady default value went up from 1.5s to 5s.
362
+ - Updated trafficType from manager to 'localhost' when the SDK is running in localhost mode.
363
+ - Updated polling logic to stop and restart mySegments data synchronization (on browsers) when not currently used on Splits.
364
+
365
+ 10.8.2 (Jul 26, 2019)
366
+ - Added `/src` folder to the npm package distribution for users that needs to transpile the package themselves.
367
+ - Updated three dev dependencies to remove vulnerability warnings when running npm audit (lodash, set-value, mixin-deep).
368
+ - Bugfix - Incorrect warnings caused by TrafficType storage counter when a Split is updated for inMemory and LocalStorage mode.
369
+
370
+ 10.8.1 (May 31, 2019)
371
+ - Updated axios version to 0.19.0 to remove a DoS vulnerability (not affecting the SDK but worth updating).
372
+
373
+ 10.8.0 (May 23, 2019)
374
+ - Added support for optional event properties via our client.track() method. Read more in our docs!
375
+
376
+ 10.7.2 (May 15, 2019)
377
+ - Bugfix - Fixing ES6 import syntax for LabelConstants module.
378
+
379
+ 10.7.1 (May 10, 2019)
380
+ - Added Block Until Ready functionality support for consumer clients (Redis mode on Node.js) to make integration code work the same between modes.
381
+ - Added more Input and Usage Validation rules, including an extra label for impressions when the SDK is not ready.
382
+ - Updated the SDK Redis adapter to handle pending commands when disconnecting from the Redis server.
383
+ - Bugfix - Clearing up readyTimeout after we don't need it anymore. It also fixes the misleading SDK_READY_TIMED_OUT error log when using Redis.
384
+
385
+ 10.7.0 (Apr 30, 2019)
386
+ - 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.
387
+ - Added Dynamic Configurations support through two new methods that mimic the regular ones, changing the type of what is returned.
388
+ - getTreatmentWithConfig: Same as getTreatment, but instead of a string it returns a map with treatment and config as a stringified JSON.
389
+ - 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.
390
+ - Added configs to SplitViews returned by the manager module.
391
+ - Updated localhost mode. Now besides supporting the old text files with `.split` extension (to be deprecated soon), we support YAML (.yaml/.yml) files where you can
392
+ define configurations for your treatments and also whitelisted keys. Read more in our docs!
393
+ - Updated manager method to avoid creating more than one instance.
394
+ - Updated how we handle timeout per request, setting startup.requestTimeoutBeforeReady to less than 1 applies no timeout per request.
395
+
396
+ 10.6.1 (Mar 15, 2019)
397
+ - Updated default value for scheduler.featuresRefreshRate on Node.js. New default is 5 seconds.
398
+
399
+ 10.6.0 (Feb 12, 2019)
400
+ - 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).
401
+ - 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,
402
+ 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.
403
+ - Updated getTreatments to have it's own latency metric for the whole operation, instead of one per each feature evaluation.
404
+ - Updated default values on configuration for Node.js.
405
+ - startup.readyTimeout default value went up from 0s (no timeout limit) to 15s.
406
+ - startup.retriesOnFailureBeforeReady default value went up from 0 (no retries) to 1.
407
+ - Bugfix - Preventing "Uncaught in promise (undefined)" error for .ready() promise when no error handlers are attached to it.
408
+ - Bugfix - Always throw JS errors inside callbacks attached to the SDK, so developers don't miss them.
409
+
410
+ 10.5.1 (Dec 20, 2018)
411
+ - Bugfix - Fixing an issue where a Split with Traffic Allocation set to one would return the default treatment for 100% of the traffic (instead of 99%).
412
+
413
+ 10.5.0 (Nov 7, 2018)
414
+ - Added custom impression listener feature, so customers can receive all the impressions data on a callback to handle as they place.
415
+ Completely optional, the only requirement is that the element being set as impression listener should have a method called `logImpression`
416
+ where they'll receive all the data. Read more in our docs!
417
+ - Added Redis support for track events. Now if you're running the `split-synchronizer` and the Node.js SDK on `consumer mode`, your track events
418
+ will go to Redis and be sent to Split by the synchronizer.
419
+ - Added a wrapper on top of ioredis to better handle operations and reduce unwanted library effects.
420
+ - Removed unnecessary keys/scans on Redis.
421
+ - Bugfix - Calling factory.client on the browser with the same key used on configuration created a new unnecessary instance.
422
+ - Bugfix - Fixing multiple instances of the client without specific scheduler configurations cause overflow on timeout values.
423
+
424
+ 10.4.0 (Oct 4, 2018)
425
+ - Removed dependency for logging library.
426
+ - Removed dependency on lodash.
427
+ - Added log level support for SDK logs using our own Logger implementation. Now besides just enable/disable,
428
+ you can set the log level as a string (more information on our docs or on Detailed-README.md).
429
+ - Added automatic cleanup and data flush for Node.js on SIGTERM signals.
430
+ - Updated default value for startup.requestTimeoutBeforeReady on the Browser from 0.8 seconds to 1.5 seconds to match startup.readyTimeout.
431
+ - Updated dependency versions.
432
+ - Bugfix - Capturing uncaught exception on some http and network errors.
433
+ - Bugfix - IE - Producer names logged as undefined.
434
+
435
+ 10.3.3 (Aug 8, 2018)
436
+ - Removing logplease dependency hosted on GitHub.
437
+
438
+ 10.3.2 (Jun 19, 2018)
439
+ - Updating logging utility check for Node.js environments.
440
+
441
+ 10.3.1 (Jun 4, 2018)
442
+ - Added events npm package as a dependency.
443
+
444
+ 10.3.0 (May 10, 2018)
445
+ - Input and output validations.
446
+ - Improved how the SDK parse the key.
447
+ - Not push impressions if matchingKey is invalid.
448
+ - Fixed memory leak on events factory.
449
+ - Improved UT for the Node.js SDK.
450
+ - TS declarations now accept boolean properties on Attributes.
451
+
452
+ 10.2.0 (April 3, 2018)
453
+ - Added greenkeeper configuration within package.json.
454
+ - Updated several libraries versions.
455
+ - Removed global polyfills.
456
+
457
+ 10.1.1 (March 20, 2018)
458
+ - Bugfix - getTreatment will return 'control' and the impression registered
459
+ will have label 'exception' when there is a Redis Exception.
460
+
461
+ 10.1.0 (March 8, 2018)
462
+ - Replaced isomorphic-fetch with axios.
463
+
464
+ 10.0.0 (Feb 26, 2018)
465
+ - Migrated source code to es modules.
466
+ - Localhost mode uses fewer dependencies now.
467
+ - Removed flowtype since it was not used anymore.
468
+ - Updated to last Node.js LTS.
469
+ - Added package-lock.json.
470
+ - Fixed eslint configuration.
471
+
472
+ 9.4.0 (Jan 12, 2018)
473
+ - Adding support for client.track method, for tracking custom events.
474
+ - Adding trafficType as an optional core setting. If provided on the browser it will be bound to the client as the key.
475
+ - TypeScript declarations polishing.
476
+ - Updated SDK labels.
477
+ - Bugfix - Shared clients (browser) were ready even if the main client was not.
478
+ - Bugfix - Shared clients (browser) from different SDK instances should be separate.
479
+ - Bugfix - When using SDK key with wrong permissions, Node.js was throwing a false ready event (without segments).
480
+ - Bugfix - Localhost mode was trying to flush impressions when client.destroy was invoked.
481
+
482
+ 9.3.7 (Dec 22, 2017)
483
+ - Updated SDK labels.
484
+
485
+ 9.3.6 (Oct 12, 2017)
486
+ - Fixed an issue that was not rejecting client.ready() on SDK_READY_TIMED_OUT event.
487
+ - Fixed an issue where the SDK required a key even on localhost mode.
488
+ - Added custom message for 404 errors.
489
+ - Updated TypeScript declaration files for exposing startup settings on Node.js.
490
+
491
+ 9.3.5 (Sep 13, 2017)
492
+ - Internal context module added.
493
+ - Removed /src folder and some misc files from NPM package.
494
+ - Dependencies update & cleanup.
495
+
496
+ 9.3.4 (Aug 23, 2017)
497
+ - Removed FullStory integration
498
+
499
+ 9.3.3 (Aug 15, 2017)
500
+ - Improved metrics collection.
501
+
502
+ 9.3.2 (Aug 9, 2017)
503
+ - Adding support for Node.js v0.10.X
504
+
505
+ 9.3.1 (Jul 28, 2017)
506
+ - Bugfix - Fixed a bug on Manager API which was not retrieving the right treatments for a Split on some cases.
507
+
508
+ 9.3.0 (Jul 25, 2017)
509
+ - Several new matchers have been released:
510
+ - Dependency Matchers
511
+ - Boolean Matchers
512
+ - Regex Matchers
513
+
514
+ 9.2.2 (Jul 20, 2017)
515
+ - Bugfix - Added support into the SDK to flush impressions before destroy the instance.
516
+
517
+ 9.2.1 (May 19, 2017)
518
+ - Bugfix - Issue with dependency that exposes untranspiled code through cjs require, causes
519
+ problems on IE and Node.js 3.
520
+
521
+ 9.2.0 (May 11, 2017)
522
+ - Dropped migration build. Migration packages will no longer receive updates.
523
+ - Updated logging functionality. SDK will handle logging with a minimalistic enable/disable approach.
524
+ Now you have three ways to enable/disable SDK logging:
525
+
526
+ 1. By setting the localStorage.splitio_debug (browser) or SPLITIO_DEBUG environment var (Node.js)
527
+ with 'on', 'enable' or 'enabled'.
528
+
529
+ 2. By passing an extra setting when instantiating the SDK.
530
+
531
+ ```js
532
+ var splitio = require('@splitsoftware/splitio');
533
+
534
+ var settings = {
535
+ core: {
536
+ authorizationKey: 'YOUR_SDK_KEY',
537
+ key: 'CUSTOMER_KEY' // If on the browser.
538
+ },
539
+ debug: true // Boolean flag for enabling logs. Default value is false.
540
+ };
541
+
542
+ var sdk = splitio(settings);
543
+ ```
544
+
545
+ 3. By calling the SDK Logger API (no need for browser refresh):
546
+
547
+ ```js
548
+ var splitio = require('@splitsoftware/splitio');
549
+
550
+ var sdk = splitio({
551
+ core: {
552
+ authorizationKey: 'YOUR_SDK_KEY',
553
+ key: 'CUSTOMER_KEY' // If on the browser.
554
+ }
555
+ });
556
+
557
+ // Logger API.
558
+ sdk.Logger.enable();
559
+ sdk.Logger.disable();
560
+ ```
561
+
562
+ - Added Time Tracker logs. When logs are enabled, we log how much time takes to complete
563
+ SDK important tasks, like getting ready, downloading important information or pushing
564
+ metrics and impressions to Split.
565
+ - Bugfix - Return correct label when consulted Split is not found.
566
+
567
+ 9.1.1 (May 03, 2017)
568
+ - Bugfix - Fixed invalid behavior when using native Fetch API and comparing statusText
569
+ instead of resp.ok
570
+
571
+ 9.1.0 (April 21, 2017)
572
+ - Adding support for STRING matchers.
573
+ - client.destroy() will disconnect from Redis instance, if you are using that storage.
574
+ - Improved support for multiple SDK instances working at the same time.
575
+ - Improved attribute values type coercion.
576
+ - No API changes.
577
+
578
+ 9.0.0 (April 17, 2017)
579
+ - Adding support for SET matchers.
580
+ - Added some type coercion for attribute values, in case we don't receive a value of the expected type.
581
+ - No API changes.
582
+
583
+ 8.2.0 (April 12, 2017)
584
+ - Adding traffic allocation support.
585
+ - Adding support for murmur hashing algorithm.
586
+ - Adding getTreatments method to client API. For example:
587
+
588
+ ```js
589
+ var treatmentsMap = client.getTreatments('CUSTOMER_KEY', ['Feature_flag_1', 'Feature_flag_2']);
590
+
591
+ /*
592
+ * treatmentsMap will be an object mapping feature flags with treatments. For example:
593
+ * {
594
+ * Feature_flag_1: 'on',
595
+ * Feature_flag_2: 'off
596
+ * }
597
+ */
598
+ ```
599
+
600
+ - Bugfixing on manager API for localhost.
601
+
602
+ 8.1.3 (April 11, 2017)
603
+ - No API changes. Bug fixing release.
604
+
605
+ 8.1.2 (April 6, 2017)
606
+ - Bug fixing release to improve startup performance.
607
+
608
+ 8.1.1 (March 31, 2017)
609
+ - Small fix on declaration files.
610
+
611
+ 8.1.0 (March 30, 2017)
612
+ - No API changes.
613
+ - Added typescript support. SplitSDK custom types live on the SplitIO namespace.
614
+
615
+ For example:
616
+
617
+ ```ts
618
+ const myTreatment: SplitIO.Treatment;
619
+ const myBrowserSettings: SplitIO.IBrowserSettings;
620
+ ```
621
+
622
+ 8.0.0 (March 10, 2017)
623
+ - New API to improve development experience. We added a migration layer so you
624
+ could use the new version of the SDK and make the migration when you have
625
+ time.
626
+
627
+ In the browser we only need:
628
+
629
+ ```html
630
+ <script src="//cdn.split.io/sdk/split-7.4.0.min.js"></script>
631
+ ```
632
+
633
+ Change by:
634
+
635
+ ```html
636
+ <script src="//cdn.split.io/sdk/split-migration-8.0.0.min.js"></script>
637
+ ```
638
+
639
+ In Node.js or CommonJS environments:
640
+
641
+ ```js
642
+ var sdk = require('@splitsoftware/splitio');
643
+ ```
644
+
645
+ Change with:
646
+
647
+ ```js
648
+ var sdk = require('@splitsoftware/splitio/migration');
649
+ ```
650
+
651
+ - Node.js now added support for Redis to keep consistency across multiple SDK
652
+ instances.
653
+
654
+ We have added a new setting parameter to control which storage use, and how
655
+ the SDK works internally:
656
+
657
+ ```js
658
+ const SplitFactory = require('@splitsoftware/splitio');
659
+ const config = {
660
+ mode: 'consumer',
661
+ core: {
662
+ authorizationKey: '<your-api-token>'
663
+ },
664
+ storage: {
665
+ type: 'REDIS',
666
+ options: {
667
+ url: 'redis://<your-redis-server>:<your-redis-server-port>/0'
668
+ },
669
+ prefix: 'nodejs' // Optional prefix to prevent any kind of data collision between SDK versions.
670
+ }
671
+ };
672
+
673
+ const client = SplitFactory(config);
674
+
675
+ // Redis in Node.js is async so we can use async/await syntax
676
+ const treatment = await client.getTreatment('my-feature-coming-from-localstorage');
677
+
678
+ // or just use the returned promise
679
+ client.getTreatment('my-feature-coming-from-localstorage').then(treatment => {
680
+ // do something with the treatment
681
+ });
682
+ ```
683
+
684
+ - Added Manager API to query the state of the SDK. Please check the official
685
+ documentation for details.
686
+
687
+ - In Browser land, we can now enable localStorage as backend so we can reload
688
+ the SDK quickly without downloading all the data again.
689
+
690
+ This should improve the ready event significantly when you have a good amount
691
+ of Splits in your setup.
692
+
693
+ ```js
694
+ const config = {
695
+ core: {
696
+ authorizationKey: '<your-api-token>',
697
+ key: '<user-key>'
698
+ },
699
+ storage: {
700
+ type: 'LOCALSTORAGE'
701
+ }
702
+ };
703
+
704
+ const factory = splitio(config);
705
+ const client = factory.client();
706
+
707
+ const treatment = client.getTreatment('my-feature-comming-from-localstorage');
708
+ ```
709
+
710
+ - Added support for offline changes release to improve development experience,
711
+ specially in Node.js where we used to have a server running and spin it up each
712
+ time we change a treatment is a headache.
713
+
714
+ ```js
715
+ const config = {
716
+ core: {
717
+ authorizationKey: '<your-api-token>',
718
+ key: '<user-key>'
719
+ },
720
+ scheduler: {
721
+ offlineRefreshRate: 15 // update internal SDK state each 15 sec
722
+ },
723
+ features: {
724
+ mySplit: 'on'
725
+ }
726
+ };
727
+
728
+ const factory = splitio(config);
729
+ const client = factory.client();
730
+
731
+ await client.ready();
732
+
733
+ client.getTreatment('my_feature') === 'on'; // true
734
+
735
+ factory.settings.features.my_feature = 'off'; // Apply this cache programmatically
736
+
737
+ client.getTreatment('my_feature') === 'off'; // Some time after you will be able to verify this
738
+ ```
739
+
740
+ 7.4.0 (January 23, 2017)
741
+ - None API changes. Bug fixing release.
742
+
743
+ 7.3.0 (January 19, 2017)
744
+ - Small addition to SDK configurations so you can inject bucketing key and labels.
745
+
746
+ 7.1.1 (November 16, 2016)
747
+ - None API changes. Bug fixing release.
748
+
749
+ 7.1.0 (November 15, 2016)
750
+ - None API changes. Bug fixing release.
751
+
752
+ 7.0.1 (September 16, 2016)
753
+ - Huge project refactoring, specially focus on simplicity. We have replaced the
754
+ library building system to get more power while we generate the release.
755
+ - Improved documentation.
756
+
757
+ 6.0.1 (June 24, 2016)
758
+ - Critical bug fixed which prevent ready state of the SDK.
759
+
760
+ 6.0.0 (June 24, 2016)
761
+ - In the browser land we allow quick retries before start using the refresh
762
+ rates defined for segments and feature flags, plus the possibility of receive an
763
+ event when the SDK is taking to much time to startup.
764
+
765
+ ```html
766
+ <script src="//cdn.split.io/sdk/split-6.0.0.min.js"></script>
767
+ <script>
768
+ var sdk = splitio({
769
+ core: {
770
+ authorizationKey: '<your-token>',
771
+ key: 'myuser@domain.com'
772
+ },
773
+ startup: {
774
+ // timeout an *initial* request after 0.8 seconds (only affects startup)
775
+ requestTimeoutBeforeReady: 0.8,
776
+ // how many quick retries are allowed before use the schedulers refresh
777
+ // rates (only affects startup)
778
+ retriesOnFailureBeforeReady: 1,
779
+ // maximum amount of seconds we are going to wait for the ready event
780
+ readyTimeout: 1.5
781
+ }
782
+ });
783
+
784
+ sdk.on(sdk.Event.SDK_READY_TIMED_OUT, function () {
785
+ // this callback will be called after 1.5 seconds if and only if the SDK
786
+ // is not ready for that time
787
+ });
788
+
789
+ sdk.on(sdk.Event.SDK_READY, function () {
790
+ // the SDK is ready for start making evaluations with your data
791
+ });
792
+
793
+ sdk.on(sdk.Event.SDK_UPDATE, function () {
794
+ // fired each time the SDK state change
795
+ });
796
+ </script>
797
+ ```
798
+
799
+ 5.1.1 (June 13, 2016)
800
+ - None API changes. Bug fixing release.
801
+
802
+ 5.1.0 (June 9, 2016)
803
+ - Bug fixing release.
804
+
805
+ 5.0.0 (June 6, 2016)
806
+ - Added support for multiple instances.
807
+
808
+ ```html
809
+ <script src="//cdn.split.io/sdk/split-5.0.0.min.js"></script>
810
+ <script>
811
+ // instantiation
812
+ var dynamic1 = splitio({
813
+ core: {
814
+ authorizationKey: '<your-token>',
815
+ key: 'myuser@domain.com'
816
+ }
817
+ });
818
+
819
+ var dynamic2 = splitio({
820
+ core: {
821
+ authorizationKey: '<your-token>',
822
+ key: 'annoy@domain.com'
823
+ }
824
+ });
825
+
826
+ // usage
827
+ var t1 = dynamic1.getTreatment('feature-flag-name');
828
+ var t2 = dynamic2.getTreatment('another-feature-flag-name');
829
+
830
+ // stop SDK
831
+ dynamic1.destroy();
832
+ dynamic2.destroy();
833
+
834
+ // unreference
835
+ dynamic1 = null;
836
+ dynamic2 = null;
837
+ </script>
838
+ ```
839
+
840
+ - SDK instances inherit from EventEmitter.
841
+
842
+ ```html
843
+ <script src="//cdn.split.io/sdk/split-5.0.0.min.js"></script>
844
+ <script>
845
+ var sdk = splitio({
846
+ core: {
847
+ authorizationKey: '<your-token>',
848
+ key: 'myuser@domain.com'
849
+ }
850
+ });
851
+
852
+ sdk.on(sdk.Event.SDK_READY, function sdkReadyEvent() {
853
+ // This event will be fired once
854
+ });
855
+
856
+ sdk.on(sdk.Event.SDK_UPDATE, function sdkUpdateEvent() {
857
+ // This event will be fired each time the SDK downloads an update
858
+ });
859
+ </script>
860
+ ```
861
+
862
+ 4.0.0 (April 13, 2016)
863
+ - No more url changes required to switch to development mode.
864
+
865
+ - Before (3.0.0 or earlier)
866
+ ```html
867
+ <script src="https://cdn.split.io/sdk/offline-3.0.0.js"></script>
868
+ <script>
869
+ var sdk = splitio({
870
+ features: {
871
+ feature_name_1: 'treatment_value_1',
872
+ feature_name_2: 'treatment_value_2',
873
+ ...
874
+ }
875
+ });
876
+ </script>
877
+ ```
878
+
879
+ - After (4+)
880
+ ```html
881
+ <script src="https://cdn.split.io/sdk/split-4.0.0.js"></script>
882
+ <script>
883
+ var sdk = splitio({
884
+ core: {
885
+ authorizationKey: 'localhost'
886
+ },
887
+ features: {
888
+ feature_name_1: 'treatment_value_1',
889
+ feature_name_2: 'treatment_value_2',
890
+ ...
891
+ }
892
+ });
893
+ </script>
894
+ ```
895
+
896
+ Now you can forget the switch between urls, everything is bundled into the same
897
+ package!
898
+
899
+ 3.0.0 (April 10, 2016)
900
+ - Added support for attributes.
901
+
902
+ ```js
903
+ var sdk = splitio({
904
+ core: {
905
+ authorizationKey: 'c1l5vkd50gimccout3c03pntbu', // your SDK key
906
+ key: '4a2c4490-ced1-11e5-9b97-d8a25e8b1578' // your customer id
907
+ }
908
+ });
909
+
910
+ var treatment = sdk.getTreatment('my_feature', {
911
+ age: 24,
912
+ likes: ['apple', 'orange'],
913
+ dob: new Date('1991-05-22').getTime()
914
+ });
915
+ ```
916
+
917
+ - Minor bug fixes and code clean up.
918
+
919
+ 2.1.0 (March 29, 2016)
920
+ - Added better handling of possible error situations when:
921
+
922
+ 1. If there is none defaultTreatment present, use 'control' treatment.
923
+ 2. Unexpected matcher structures should produce a 'control' treatment.
924
+
925
+ 2.0.0 (March 21, 2016)
926
+ - Breaking Changes
927
+
928
+ - If you are using custom refresh rates, please change them from milliseconds to
929
+ seconds:
930
+
931
+ ```js
932
+ var sdk = splitio({
933
+ core: {
934
+ authorizationKey: 'c1l5vkd50gimccout3c03pntbu', // your SDK key
935
+ key: '4a2c4490-ced1-11e5-9b97-d8a25e8b1578' // your customer id
936
+ },
937
+ scheduler: {
938
+ featuresRefreshRate: 60, // in 2.x 60 sec, in 1.x 60000 milliseconds
939
+ segmentsRefreshRate: 60, // in 2.x 60 sec, in 1.x 60000 milliseconds
940
+ metricsRefreshRate: 30, // in 2.x 30 sec, in 1.x 30000 milliseconds
941
+ impressionsRefreshRate: 30 // in 2.x 30 sec, in 1.x 30000 milliseconds
942
+ }
943
+ });
944
+ ```
945
+
946
+ - New features
947
+
948
+ - Based on users feedback, the new recommended values for all the refresh rates are:
949
+
950
+ ```js
951
+ scheduler: {
952
+ featuresRefreshRate: 30, // in 2.x 30 sec, in 1.x 60000 milliseconds (1min)
953
+ segmentsRefreshRate: 60, // in 2.x 60 sec, in 1.x 60000 milliseconds (1min)
954
+ metricsRefreshRate: 60, // in 2.x 60 sec, in 1.x 300000 milliseconds (5min)
955
+ impressionsRefreshRate: 60 // in 2.x 60 sec, in 1.x 300000 milliseconds (5min)
956
+ }
957
+ ```
958
+
959
+ 1.0.1 (March 16, 2016)
960
+ - Make it public in npm
961
+
962
+ 1.0.0 (March 15, 2016)
963
+ - Initial public release