@splitsoftware/splitio 11.0.0-rc.5 → 11.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGES.txt CHANGED
@@ -1,10 +1,16 @@
1
+ 11.0.1 (November 8, 2024)
2
+ - Bugfixing - 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';`.
3
+
1
4
  11.0.0 (November 1, 2024)
2
- - Added support for targeting rules based on large segments for browsers.
5
+ - Added support for targeting rules based on large segments for browsers (client-side API).
3
6
  - Added `factory.destroy()` method, which invokes the `destroy` method of all clients created by the factory.
4
7
  - Updated @splitsoftware/splitio-commons package to version 2.0.0 that includes major updates and updated some transitive dependencies for vulnerability fixes.
5
8
  - Renamed distribution folders from `/lib` to `/cjs` for CommonJS build, and `/es` to `/esm` for ECMAScript Modules build.
6
9
  - BREAKING CHANGES:
7
- - Dropped support for NodeJS v6. The SDK now requires NodeJS v14 or above.
10
+ - NOTE: Refer to ./MIGRATION-GUIDE.md for instructions on how to migrate your codebase from version 0.x to 1.0.0.
11
+ - Dropped support for Split Proxy below version 5.9.0, when using in the browser (client-side API). The SDK now requires Split Proxy 5.9.0 or above.
12
+ - Dropped support for Node.js v6. The SDK now requires Node.js v14 or above.
13
+ - Removed TypeScript `SplitIO` namespace from `@splitsoftware/splitio/types/splitio`. Reverted in 11.0.1.
8
14
  - 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.
9
15
  - 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.
10
16
  - 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.
@@ -15,12 +21,12 @@
15
21
  - Updated some transitive dependencies for vulnerability fixes.
16
22
 
17
23
  10.27.0 (June 25, 2024)
18
- - Added `sync.requestOptions.agent` option to SDK configuration for NodeJS. This allows passing a custom NodeJS 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).
24
+ - 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).
19
25
  - Updated some transitive dependencies for vulnerability fixes.
20
26
 
21
27
  10.26.1 (June 14, 2024)
22
- - Updated the internal imports of 'os' and 'ioredis' modules for NodeJS, 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.
23
- - Updated eventsource dependency for NodeJS. 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.
28
+ - 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.
29
+ - 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.
24
30
  - Updated @splitsoftware/splitio-commons package to version 1.16.0 that includes some vulnerability and bug fixes.
25
31
  - Bugfixing - 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.
26
32
  - Bugfixing - 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).
@@ -39,7 +45,7 @@
39
45
  - Updated @splitsoftware/splitio-commons package to version 1.13.1 and some transitive dependencies for vulnerability fixes.
40
46
 
41
47
  10.25.0 (January 4, 2024)
42
- - Updated SDK to support URLs without TLS protocol in NodeJS, to simplify proxy usage inside private networks.
48
+ - Updated SDK to support URLs without TLS protocol in Node.js, to simplify proxy usage inside private networks.
43
49
 
44
50
  10.24.1 (December 12, 2023)
45
51
  - 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.
@@ -57,7 +63,7 @@
57
63
  - Updated @splitsoftware/splitio-commons package to version 1.12.0 that includes vulnerability fixes, flag sets support, and other improvements.
58
64
  - Updated Redis adapter to handle timeouts and queueing of some missing commands: 'hincrby', 'popNRaw', and 'pipeline.exec'.
59
65
  - Bugfixing - Fixed manager methods in consumer modes to return results in a promise when the SDK is not operational (not ready or destroyed).
60
- - Bugfixing - Fixed SDK key validation in NodeJS 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).
66
+ - Bugfixing - 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).
61
67
 
62
68
  10.23.1 (September 22, 2023)
63
69
  - 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).
@@ -86,14 +92,14 @@
86
92
  - Bugfixing - 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.
87
93
 
88
94
  10.22.2 (November 3, 2022)
89
- - Bugfixing - Replaced bloom filter dependency that caused dependency conflicts (with farmhash lib) in AWS Lambda. This change only affects Node flavor.
95
+ - Bugfixing - Replaced bloom filter dependency that caused dependency conflicts (with farmhash lib) in AWS Lambda. This change only affects Node.js flavor.
90
96
 
91
97
  10.22.1 (October 14, 2022)
92
98
  - Bugfixing - 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.
93
99
 
94
100
  10.22.0 (October 5, 2022)
95
101
  - 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.
96
- - Updated default value of `scheduler.featuresRefreshRate` config parameter from 5 seconds to 60 seconds for NodeJS and from 30 seconds to 60 seconds for Browser.
102
+ - 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.
97
103
  - Updated @splitsoftware/splitio-commons package to version 1.7.1, that improves the performance of feature flag evaluations (i.e., `getTreatment(s)` method calls) when using the default storage in memory, among other improvements.
98
104
 
99
105
  10.21.1 (July 25, 2022)
@@ -119,10 +125,10 @@
119
125
  - Added `scheduler.telemetryRefreshRate` property to SDK configuration, and deprecated `scheduler.metricsRefreshRate` property.
120
126
  - Updated SDK telemetry storage, metrics and updater to be more effective and send less often.
121
127
  - Bugfixing - Updated default values for `scheduler.impressionsRefreshRate` config parameter: 300s for OPTIMIZED impression mode and 60s for DEBUG impression mode,
122
- in both Browser and NodeJS (previously it was 60s and 300s in Browser and NodeJS respectively, equal for DEBUG and OPTIMIZED impression modes).
128
+ 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).
123
129
 
124
130
  10.18.2 (May 6, 2022)
125
- - Bugfixing - Removed "ip" dependency to use an inline copy of it that fixes an error when using it in Node v18 (https://github.com/indutny/node-ip/issues/113).
131
+ - Bugfixing - 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).
126
132
 
127
133
  10.18.1 (April 20, 2022)
128
134
  - Updated some dependencies for vulnerability fixes.
@@ -132,8 +138,8 @@
132
138
  10.18.0 (April 7, 2022)
133
139
  - 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.
134
140
  - Added `scheduler.impressionsQueueSize` property to SDK configuration to limit the amount of impressions tracked in memory. Read more in our docs.
135
- - Added support to accept TLS configuration options to the Redis storage in NodeJS. Read more in our docs.
136
- - Updated type definitions to specialize the type of the `storage.options` object for Redis storage in NodeJS.
141
+ - Added support to accept TLS configuration options to the Redis storage in Node.js. Read more in our docs.
142
+ - Updated type definitions to specialize the type of the `storage.options` object for Redis storage in Node.js.
137
143
  - Updated some dependencies for vulnerability fixes.
138
144
  - Bugfixing - Updated internal isObject utility function, to avoid unexpected behaviors on frameworks and libraries that uses multiple VM contexts, like NuxtJS dev server.
139
145
  - Bugfixing - Logging settings (i.e., the `debug` SDK configuration param and factory logger methods) are configurable per factory instance, instead of affecting all factories globally.
@@ -197,7 +203,7 @@
197
203
 
198
204
  10.15.6 (May 21, 2021)
199
205
  - Updated error handling following the recommended practice of throwing only Error objects.
200
- - Updated ioredis version now that their incompatibility with Node <10 was already fixed.
206
+ - Updated ioredis version now that their incompatibility with Node.js <10 was already fixed.
201
207
  - Updated Karma and a transitive dependency with vulnerabilities.
202
208
  - Updated dev dependency on redis-dump to redis-dumpz package to be able to fix a vulnerability on Redis transitive dependency.
203
209
  - Bugfixing - Name two anonymous functions that generate warnings when transpiling for IE11 (issue #535)
@@ -210,18 +216,18 @@
210
216
  - Updated SSE error handling.
211
217
  - Extended publishers tracking to support multi-region infrastructure.
212
218
  - Enforced revalidation for requests stored in local caches, like proxies or browsers.
213
- - Bugfixing - In NodeJS, fetch new segments captured due to streaming notifications.
219
+ - Bugfixing - In Node.js, fetch new segments captured due to streaming notifications.
214
220
  - Updated some dependencies, including a vulnerability fix.
215
221
 
216
222
  10.15.3 (Feb 10, 2021)
217
- - Updated type definitions to remove `@types/node` dependency and avoid conflicts between Node and DOM type definitions.
223
+ - Updated type definitions to remove `@types/node` dependency and avoid conflicts between Node.js and DOM type definitions.
218
224
  - Bugfixing - Handle issue importing node-fetch library (issue #505).
219
225
 
220
226
  10.15.2 (Dec 3, 2020)
221
227
  - Updated requests for `/testImpressions/beacon` to include the impressions mode.
222
228
 
223
229
  10.15.1 (Nov 12, 2020)
224
- - Updated the version for ioredis in the package.json to be fixed to 4.18.0 given after 4.19.0 it requires Node 10, in case this SDK is installed without considering our package-lock.json file on an old Node.
230
+ - 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.
225
231
  - 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.
226
232
  - Bugfixing - Updating some imports of hashing utilities to use safe relative paths and avoid module resolution issues.
227
233
  - Bugfixing - Updating logic to avoid a corner case issue with the sendHitTask callback handling of the GOOGLE_ANALYTICS_TO_SPLIT integration.
@@ -233,7 +239,7 @@
233
239
  - Added `ImpressionObserver` to detect previous generated impression.
234
240
  - Added new endpoint (`testImpressions/count`) to send all the generated impressions in a time frame.
235
241
  - Added beacon endpoint for ImpressionsCount.
236
- - Added murmur3 128 bits hashing and splitted logic between browser and node.
242
+ - Added murmur3 128 bits hashing and splitted logic between browser and Node.js.
237
243
  - Added `OPTIMIZED` and `DEBUG` modes in order to enabling/disabling how impressions are going to be sent into Split servers,
238
244
  - `OPTIMIZED`: will send unique impressions in a timeframe in order to reduce how many times impressions are posted to Split.
239
245
  - `DEBUG`: will send every impression generated to Split.
@@ -246,7 +252,7 @@
246
252
  - Bugfixing - updated the feature detection of Set global constructor to avoid possible reference errors.
247
253
 
248
254
  10.14.1 (Aug 13, 2020)
249
- - Updated push streaming support for Node to optimize requests to Split services.
255
+ - Updated push streaming support for Node.js to optimize requests to Split services.
250
256
  - Bugfixing - 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.
251
257
 
252
258
  10.14.0 (Jul 31, 2020)
@@ -264,7 +270,7 @@
264
270
  10.12.1 (May 18, 2020)
265
271
  - Updated logging messages for streaming notifications to DEBUG log level.
266
272
  - Updated asynchronous logic handling to avoid async/await syntax in order to remove regenerator-runtime dependency.
267
- - Removed axios HTTP library in favor of fetch for browsers (with XHR as fallback) and node-fetch for Node JS.
273
+ - Removed axios HTTP library in favor of fetch for browsers (with XHR as fallback) and node-fetch for Node.js.
268
274
 
269
275
  10.12.0 (April 30, 2020)
270
276
  - 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,
@@ -330,7 +336,7 @@
330
336
  - Bugfixing - Fixing ES6 import syntax for LabelConstants module.
331
337
 
332
338
  10.7.1 (May 10, 2019)
333
- - Added Block Until Ready functionality support for consumer clients (Redis mode on Node) to make integration code work the same between modes.
339
+ - Added Block Until Ready functionality support for consumer clients (Redis mode on Node.js) to make integration code work the same between modes.
334
340
  - Added more Input and Usage Validation rules, including an extra label for impressions when the SDK is not ready.
335
341
  - Updated the SDK Redis adapter to handle pending commands when disconnecting from the Redis server.
336
342
  - Bugfixing - Clearing up readyTimeout after we don't need it anymore. It also fixes the misleading SDK_READY_TIMED_OUT error log when using Redis.
@@ -347,14 +353,14 @@
347
353
  - Updated how we handle timeout per request, setting startup.requestTimeoutBeforeReady to less than 1 applies no timeout per request.
348
354
 
349
355
  10.6.1 (Mar 15, 2019)
350
- - Updated default value for scheduler.featuresRefreshRate on NodeJS. New default is 5 seconds.
356
+ - Updated default value for scheduler.featuresRefreshRate on Node.js. New default is 5 seconds.
351
357
 
352
358
  10.6.0 (Feb 12, 2019)
353
359
  - 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).
354
360
  - 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,
355
361
  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.
356
362
  - Updated getTreatments to have it's own latency metric for the whole operation, instead of one per each feature evaluation.
357
- - Updated default values on configuration for NodeJS.
363
+ - Updated default values on configuration for Node.js.
358
364
  - startup.readyTimeout default value went up from 0s (no timeout limit) to 15s.
359
365
  - startup.retriesOnFailureBeforeReady default value went up from 0 (no retries) to 1.
360
366
  - Bugfixing - Preventing "Uncaught in promise (undefined)" error for .ready() promise when no error handlers are attached to it.
@@ -367,7 +373,7 @@
367
373
  - Added custom impression listener feature, so customers can receive all the impressions data on a callback to handle as they place.
368
374
  Completely optional, the only requirement is that the element being set as impression listener should have a method called `logImpression`
369
375
  where they'll receive all the data. Read more in our docs!
370
- - Added Redis support for track events. Now if you're running the `split-synchronizer` and the Node SDK on `consumer mode`, your track events
376
+ - 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
371
377
  will go to Redis and be sent to Split by the synchronizer.
372
378
  - Added a wrapper on top of ioredis to better handle operations and reduce unwanted library effects.
373
379
  - Removed unnecessary keys/scans on Redis.
@@ -379,7 +385,7 @@
379
385
  - Removed dependency on lodash.
380
386
  - Added log level support for SDK logs using our own Logger implementation. Now besides just enable/disable,
381
387
  you can set the log level as a string (more information on our docs or on Detailed-README.md).
382
- - Added automatic cleanup and data flush for NodeJS on SIGTERM signals.
388
+ - Added automatic cleanup and data flush for Node.js on SIGTERM signals.
383
389
  - Updated default value for startup.requestTimeoutBeforeReady on the Browser from 0.8 seconds to 1.5 seconds to match startup.readyTimeout.
384
390
  - Updated dependency versions.
385
391
  - Bugfixing - Capturing uncaught exception on some http and network errors.
@@ -389,17 +395,17 @@
389
395
  - Removing logplease dependency hosted on GitHub.
390
396
 
391
397
  10.3.2 (Jun 19, 2018)
392
- - Updating logging utility check for Node environments.
398
+ - Updating logging utility check for Node.js environments.
393
399
 
394
400
  10.3.1 (Jun 4, 2018)
395
401
  - Added events npm package as a dependency.
396
402
 
397
403
  10.3.0 (May 10, 2018)
398
404
  - Input and output validations.
399
- - Improved how the sdk parse the key.
405
+ - Improved how the SDK parse the key.
400
406
  - Not push impressions if matchingKey is invalid.
401
407
  - Fixed memory leak on events factory.
402
- - Improved UT for the node sdk.
408
+ - Improved UT for the Node.js SDK.
403
409
  - TS declarations now accept boolean properties on Attributes.
404
410
 
405
411
  10.2.0 (April 3, 2018)
@@ -418,7 +424,7 @@
418
424
  - Migrated source code to es modules.
419
425
  - Localhost mode uses fewer dependencies now.
420
426
  - Removed flowtype since it was not used anymore.
421
- - Updated to last node LTS.
427
+ - Updated to last Node.js LTS.
422
428
  - Added package-lock.json.
423
429
  - Fixed eslint configuration.
424
430
 
@@ -429,7 +435,7 @@
429
435
  - Updated SDK labels.
430
436
  - Bugfixing - Shared clients (browser) were ready even if the main client was not.
431
437
  - Bugfixing - Shared clients (browser) from different SDK instances should be separate.
432
- - Bugfixing - When using SDK key with wrong permissions, Node was throwing a false ready event (without segments).
438
+ - Bugfixing - When using SDK key with wrong permissions, Node.js was throwing a false ready event (without segments).
433
439
  - Bugfixing - Localhost mode was trying to flush impressions when client.destroy was invoked.
434
440
 
435
441
  9.3.7 (Dec 22, 2017)
@@ -439,7 +445,7 @@
439
445
  - Fixed an issue that was not rejecting client.ready() on SDK_READY_TIMED_OUT event.
440
446
  - Fixed an issue where the SDK required a key even on localhost mode.
441
447
  - Added custom message for 404 errors.
442
- - Updated TypeScript declaration files for exposing startup settings on NodeJS.
448
+ - Updated TypeScript declaration files for exposing startup settings on Node.js.
443
449
 
444
450
  9.3.5 (Sep 13, 2017)
445
451
  - Internal context module added.
@@ -453,7 +459,7 @@
453
459
  - Improved metrics collection.
454
460
 
455
461
  9.3.2 (Aug 9, 2017)
456
- - Adding support for Node v0.10.X
462
+ - Adding support for Node.js v0.10.X
457
463
 
458
464
  9.3.1 (Jul 28, 2017)
459
465
  - Bugfixing - Fixed a bug on Manager API which was not retrieving the right treatments for a Split on some cases.
@@ -469,14 +475,14 @@
469
475
 
470
476
  9.2.1 (May 19, 2017)
471
477
  - Bugfixing - Issue with dependency that exposes untranspiled code through cjs require, causes
472
- problems on IE and Node 3.
478
+ problems on IE and Node.js 3.
473
479
 
474
480
  9.2.0 (May 11, 2017)
475
481
  - Dropped migration build. Migration packages will no longer receive updates.
476
482
  - Updated logging functionality. SDK will handle logging with a minimalistic enable/disable approach.
477
483
  Now you have three ways to enable/disable SDK logging:
478
484
 
479
- 1. By setting the localStorage.splitio_debug (browser) or SPLITIO_DEBUG environment var (node)
485
+ 1. By setting the localStorage.splitio_debug (browser) or SPLITIO_DEBUG environment var (Node.js)
480
486
  with 'on', 'enable' or 'enabled'.
481
487
 
482
488
  2. By passing an extra setting when instantiating the SDK.
@@ -589,7 +595,7 @@ var treatmentsMap = client.getTreatments('CUSTOMER_KEY', ['Feature_flag_1', 'Fea
589
595
  <script src="//cdn.split.io/sdk/split-migration-8.0.0.min.js"></script>
590
596
  ```
591
597
 
592
- In NodeJS or CommonJS environments:
598
+ In Node.js or CommonJS environments:
593
599
 
594
600
  ```js
595
601
  var sdk = require('@splitsoftware/splitio');
@@ -601,7 +607,7 @@ var treatmentsMap = client.getTreatments('CUSTOMER_KEY', ['Feature_flag_1', 'Fea
601
607
  var sdk = require('@splitsoftware/splitio/migration');
602
608
  ```
603
609
 
604
- - NodeJS now added support for Redis to keep consistency across multiple SDK
610
+ - Node.js now added support for Redis to keep consistency across multiple SDK
605
611
  instances.
606
612
 
607
613
  We have added a new setting parameter to control which storage use, and how
@@ -625,7 +631,7 @@ var treatmentsMap = client.getTreatments('CUSTOMER_KEY', ['Feature_flag_1', 'Fea
625
631
 
626
632
  const client = SplitFactory(config);
627
633
 
628
- // Redis in NodeJS is async so we can use async/await syntax
634
+ // Redis in Node.js is async so we can use async/await syntax
629
635
  const treatment = await client.getTreatment('my-feature-coming-from-localstorage');
630
636
 
631
637
  // or just use the returned promise
@@ -661,7 +667,7 @@ var treatmentsMap = client.getTreatments('CUSTOMER_KEY', ['Feature_flag_1', 'Fea
661
667
  ```
662
668
 
663
669
  - Added support for offline changes release to improve development experience,
664
- specially in NodeJS where we used to have a server running and spin it up each
670
+ specially in Node.js where we used to have a server running and spin it up each
665
671
  time we change a treatment is a headache.
666
672
 
667
673
  ```js
@@ -7,7 +7,7 @@ Split SDK is an open source project and we welcome feedback and contribution. Th
7
7
  ### Development process
8
8
 
9
9
  1. Fork the repository and create a topic branch from `development` branch. Please use a descriptive name for your branch.
10
- 2. Run `nvm use` to ensure that you are using the right npm and node version, and `npm install` to have the dependencies up to date.
10
+ 2. Run `nvm use` to ensure that you are using the right npm and Node.js version, and `npm install` to have the dependencies up to date.
11
11
  3. While developing, use descriptive messages in your commits. Avoid short or meaningless sentences like: "fix bug".
12
12
  4. Make sure to add tests for both positive and negative cases.
13
13
  5. If your changes have any impact on the public API, make sure you update the TypeScript declarations as well as it's related test file.
@@ -46,7 +46,7 @@ Consider running the linter script (`npm run check:lint`) and fixing any issues
46
46
 
47
47
  If you want to debug your changes consuming it from a test application, you could:
48
48
  - For browsers, import the **UMD** bundle from an HTML document. To debug you can use the browser dev tools.
49
- - For Node, you could use symlinks via [npm link command](https://docs.npmjs.com/cli/link.html) and then import the package as usual. To debug you could use the [Node inspector](https://nodejs.org/en/docs/guides/debugging-getting-started/).
49
+ - For Node.js, you could use symlinks via [npm link command](https://docs.npmjs.com/cli/link.html) and then import the package as usual. To debug you could use the [Node.js inspector](https://nodejs.org/en/docs/guides/debugging-getting-started/).
50
50
 
51
51
  # Contact
52
52
 
package/README.md CHANGED
@@ -10,9 +10,9 @@ This SDK is designed to work with Split, the platform for controlled rollouts, w
10
10
  ## Compatibility
11
11
  The JavaScript SDK is an isomorphic library for both Node.js and Web browser environments.
12
12
 
13
- It supports **Node.js version 6.x and npm 3.x or later**.
13
+ It supports **Node.js version 14.x or later**.
14
14
 
15
- For browsers it supports **IE10+ and all the other major browsers**. *However, IE doesn't have native support for Promises, which we require to properly work. If you're targeting IE it's up to you to provide Promises support. You should include a polyfill like [es6-promise](https://github.com/stefanpenner/es6-promise).*
15
+ For browsers, the library was build to support ES5 syntax and all major browsers. *However, there are a few polyfills that would be required when targeting old browsers that don't have native support for Promises, Map and Set global objects. You should include polyfills for those, like [es6-promise](https://github.com/stefanpenner/es6-promise) for promises.*
16
16
 
17
17
  ## Getting started
18
18
  Below is a simple Node.js example that describes the instantiation and most basic usage of our SDK:
@@ -71,7 +71,7 @@ Split has built and maintains SDKs for:
71
71
  * Java [Github](https://github.com/splitio/java-client) [Docs](https://help.split.io/hc/en-us/articles/360020405151-Java-SDK)
72
72
  * JavaScript [Github](https://github.com/splitio/javascript-client) [Docs](https://help.split.io/hc/en-us/articles/360020448791-JavaScript-SDK)
73
73
  * JavaScript for Browser [Github](https://github.com/splitio/javascript-browser-client) [Docs](https://help.split.io/hc/en-us/articles/360058730852-Browser-SDK)
74
- * Node [Github](https://github.com/splitio/javascript-client) [Docs](https://help.split.io/hc/en-us/articles/360020564931-Node-js-SDK)
74
+ * Node.js [Github](https://github.com/splitio/javascript-client) [Docs](https://help.split.io/hc/en-us/articles/360020564931-Node-js-SDK)
75
75
  * PHP [Github](https://github.com/splitio/php-client) [Docs](https://help.split.io/hc/en-us/articles/360020350372-PHP-SDK)
76
76
  * PHP thin-client [Github](https://github.com/splitio/php-thin-client) [Docs](https://help.split.io/hc/en-us/articles/18305128673933-PHP-Thin-Client-SDK)
77
77
  * Python [Github](https://github.com/splitio/python-client) [Docs](https://help.split.io/hc/en-us/articles/360020359652-Python-SDK)
@@ -122,7 +122,7 @@ EventEmitter.prototype.emit = function emit(type) {
122
122
  er = args[0];
123
123
  if (er instanceof Error) {
124
124
  // Note: The comments on the `throw` lines are intentional, they show
125
- // up in Node's output if this results in an unhandled exception.
125
+ // up in Node.js output if this results in an unhandled exception.
126
126
  throw er; // Unhandled 'error' event
127
127
  }
128
128
  // At least give some kind of context to the user
@@ -18,7 +18,7 @@ function __setFetch(fetch) {
18
18
  }
19
19
  exports.__setFetch = __setFetch;
20
20
  /**
21
- * Retrieves 'node-fetch', a Fetch API polyfill for NodeJS, with fallback to global 'fetch' if available.
21
+ * Retrieves 'node-fetch', a Fetch API polyfill for Node.js, with fallback to global 'fetch' if available.
22
22
  */
23
23
  function getFetch() {
24
24
  return nodeFetch;
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.packageVersion = void 0;
4
- exports.packageVersion = '11.0.0-rc.5';
4
+ exports.packageVersion = '11.0.1';
@@ -48,7 +48,7 @@ function validateStorage(settings) {
48
48
  options: newOpts
49
49
  };
50
50
  }
51
- // For now, we don't have modifiers or settings for MEMORY in NodeJS
51
+ // For now, we don't have modifiers or settings for MEMORY in Node.js
52
52
  case constants_1.STORAGE_MEMORY:
53
53
  default: {
54
54
  // If passing MEMORY storage in consumer mode, throw an error (no way to fallback to REDIS storage)
@@ -4,5 +4,5 @@ exports.localhostFromFileFactory = void 0;
4
4
  var splitsParserFromFile_1 = require("./splitsParserFromFile");
5
5
  var syncManagerOffline_1 = require("@splitsoftware/splitio-commons/cjs/sync/offline/syncManagerOffline");
6
6
  // Singleton instance of the factory function for offline SyncManager from YAML file
7
- // It uses NodeJS APIs.
7
+ // It uses Node.js APIs.
8
8
  exports.localhostFromFileFactory = (0, syncManagerOffline_1.syncManagerOfflineFactory)(splitsParserFromFile_1.splitsParserFromFileFactory);
package/cjs/utils/ip.js CHANGED
@@ -4,7 +4,7 @@ exports.address = void 0;
4
4
  var tslib_1 = require("tslib");
5
5
  /* eslint-disable no-redeclare */
6
6
  /*
7
- Trimmed version of "ip" package (https://www.npmjs.com/package/ip) that fixes an error when running in Node v18.
7
+ Trimmed version of "ip" package (https://www.npmjs.com/package/ip) that fixes an error when running in Node.js v18.
8
8
 
9
9
  This software is licensed under the MIT License.
10
10
 
@@ -118,7 +118,7 @@ EventEmitter.prototype.emit = function emit(type) {
118
118
  er = args[0];
119
119
  if (er instanceof Error) {
120
120
  // Note: The comments on the `throw` lines are intentional, they show
121
- // up in Node's output if this results in an unhandled exception.
121
+ // up in Node.js output if this results in an unhandled exception.
122
122
  throw er; // Unhandled 'error' event
123
123
  }
124
124
  // At least give some kind of context to the user
@@ -14,7 +14,7 @@ export function __setFetch(fetch) {
14
14
  nodeFetch = fetch;
15
15
  }
16
16
  /**
17
- * Retrieves 'node-fetch', a Fetch API polyfill for NodeJS, with fallback to global 'fetch' if available.
17
+ * Retrieves 'node-fetch', a Fetch API polyfill for Node.js, with fallback to global 'fetch' if available.
18
18
  */
19
19
  export function getFetch() {
20
20
  return nodeFetch;
@@ -1 +1 @@
1
- export var packageVersion = '11.0.0-rc.5';
1
+ export var packageVersion = '11.0.1';
@@ -45,7 +45,7 @@ export function validateStorage(settings) {
45
45
  options: newOpts
46
46
  };
47
47
  }
48
- // For now, we don't have modifiers or settings for MEMORY in NodeJS
48
+ // For now, we don't have modifiers or settings for MEMORY in Node.js
49
49
  case STORAGE_MEMORY:
50
50
  default: {
51
51
  // If passing MEMORY storage in consumer mode, throw an error (no way to fallback to REDIS storage)
@@ -1,5 +1,5 @@
1
1
  import { splitsParserFromFileFactory } from './splitsParserFromFile';
2
2
  import { syncManagerOfflineFactory } from '@splitsoftware/splitio-commons/esm/sync/offline/syncManagerOffline';
3
3
  // Singleton instance of the factory function for offline SyncManager from YAML file
4
- // It uses NodeJS APIs.
4
+ // It uses Node.js APIs.
5
5
  export var localhostFromFileFactory = syncManagerOfflineFactory(splitsParserFromFileFactory);
package/esm/utils/ip.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /* eslint-disable no-redeclare */
2
2
  /*
3
- Trimmed version of "ip" package (https://www.npmjs.com/package/ip) that fixes an error when running in Node v18.
3
+ Trimmed version of "ip" package (https://www.npmjs.com/package/ip) that fixes an error when running in Node.js v18.
4
4
 
5
5
  This software is licensed under the MIT License.
6
6
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@splitsoftware/splitio",
3
- "version": "11.0.0-rc.5",
3
+ "version": "11.0.1",
4
4
  "description": "Split SDK",
5
5
  "files": [
6
6
  "README.md",
@@ -38,7 +38,7 @@
38
38
  "node": ">=14.0.0"
39
39
  },
40
40
  "dependencies": {
41
- "@splitsoftware/splitio-commons": "2.0.0-rc.6",
41
+ "@splitsoftware/splitio-commons": "2.0.0",
42
42
  "bloom-filters": "^3.0.0",
43
43
  "ioredis": "^4.28.0",
44
44
  "js-yaml": "^3.13.1",
@@ -133,7 +133,7 @@ EventEmitter.prototype.emit = function emit(type) {
133
133
  er = args[0];
134
134
  if (er instanceof Error) {
135
135
  // Note: The comments on the `throw` lines are intentional, they show
136
- // up in Node's output if this results in an unhandled exception.
136
+ // up in Node.js output if this results in an unhandled exception.
137
137
  throw er; // Unhandled 'error' event
138
138
  }
139
139
  // At least give some kind of context to the user
@@ -17,7 +17,7 @@ export function __setFetch(fetch) {
17
17
  }
18
18
 
19
19
  /**
20
- * Retrieves 'node-fetch', a Fetch API polyfill for NodeJS, with fallback to global 'fetch' if available.
20
+ * Retrieves 'node-fetch', a Fetch API polyfill for Node.js, with fallback to global 'fetch' if available.
21
21
  */
22
22
  export function getFetch() {
23
23
  return nodeFetch;
@@ -1 +1 @@
1
- export const packageVersion = '11.0.0-rc.5';
1
+ export const packageVersion = '11.0.1';
@@ -68,7 +68,7 @@ export function validateStorage(settings) {
68
68
  };
69
69
  }
70
70
 
71
- // For now, we don't have modifiers or settings for MEMORY in NodeJS
71
+ // For now, we don't have modifiers or settings for MEMORY in Node.js
72
72
  case STORAGE_MEMORY:
73
73
  default: {
74
74
  // If passing MEMORY storage in consumer mode, throw an error (no way to fallback to REDIS storage)
@@ -2,5 +2,5 @@ import { splitsParserFromFileFactory } from './splitsParserFromFile';
2
2
  import { syncManagerOfflineFactory } from '@splitsoftware/splitio-commons/src/sync/offline/syncManagerOffline';
3
3
 
4
4
  // Singleton instance of the factory function for offline SyncManager from YAML file
5
- // It uses NodeJS APIs.
5
+ // It uses Node.js APIs.
6
6
  export const localhostFromFileFactory = syncManagerOfflineFactory(splitsParserFromFileFactory);
package/src/utils/ip.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /* eslint-disable no-redeclare */
2
2
  /*
3
- Trimmed version of "ip" package (https://www.npmjs.com/package/ip) that fixes an error when running in Node v18.
3
+ Trimmed version of "ip" package (https://www.npmjs.com/package/ip) that fixes an error when running in Node.js v18.
4
4
 
5
5
  This software is licensed under the MIT License.
6
6
 
package/types/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- // Declaration file for JavaScript and Node Split Software SDK v8.1.0
1
+ // Declaration file for JavaScript and Node.js Split Software SDK v8.1.0
2
2
  // Project: http://www.split.io/
3
3
  // Definitions by: Nico Zelaya <https://github.com/NicoZelaya/>
4
4
 
5
- import '@splitsoftware/splitio-commons';
5
+ /// <reference path="./splitio.d.ts" />
6
6
 
7
7
  export = JsSdk;
8
8
 
@@ -0,0 +1,6 @@
1
+ // Type definitions for JavaScript and NodeJS Split Software SDK
2
+
3
+ import '@splitsoftware/splitio-commons';
4
+
5
+ export as namespace SplitIO;
6
+ export = SplitIO;