Skip to content

Releases: launchdarkly/js-sdk-common

3.2.4

18 Mar 18:37
Compare
Choose a tag to compare

[3.2.4] - 2020-03-18

Fixed:

  • Some users reported an error where the SDK said that the content type of a response was "application/json, application/json; charset=utf8". It is invalid to have multiple Content-Type values in a response and the LaunchDarkly service does not do this, but an improperly configured proxy/gateway might add such a header. Now the SDK will tolerate a value like this as long as it starts with "application/json".

3.2.3

06 Mar 20:34
Compare
Choose a tag to compare

[3.2.3] - 2020-03-06

Fixed:

  • At client initialization time, if the initial flag polling request failed, it would cause an unhandled promise rejection unless the application had called waitForInitialization() and provided an error handler for the promise that was returned by that method. While that is correct behavior if the application did call waitForInitialization() (any promise that might be rejected should have an error handler attached), it is highly undesirable if the application did not call waitForInitialization() at all-- which is not mandatory, since the application could use events instead, or waitUntilReady(), or might simply not care about waiting for initialization. This has been fixed so that no such promise is created until the first time the application calls waitForInitialization(); subsequent calls to the same method will return the same promise (since initialization can only happen once).
  • A bug in the event emitter made its behavior unpredictable if an event handler called on or off while handling an event. This has been fixed so that all event handlers that were defined at the time the event was fired will be called; any changes made will not take effect until the next event.

3.2.2

14 Feb 02:16
Compare
Choose a tag to compare

[3.2.2] - 2020-02-13

Fixed:

  • When sending stream connection statistics in diagnostic event data, always specify the failed property even if it is false. This only affects LaunchDarkly's internal analytics.

3.2.1

13 Feb 23:40
Compare
Choose a tag to compare

[3.2.1] - 2020-02-13

Fixed:

  • When using secure mode in conjunction with streaming mode, if an application specified a new hash parameter while changing the current user with identify(), the SDK was not using the new hash value when recomputing the stream URL, causing the stream to fail. (#13)

3.2.0

12 Feb 19:54
Compare
Choose a tag to compare

[3.2.0] - 2020-02-12

Added:

  • The SDKs now periodically send diagnostic data to LaunchDarkly, describing the version and configuration of the SDK, the architecture and version of the runtime platform (provided by the platform-specific SDK packages), and performance statistics. No credentials, hostnames, or other identifiable values are included. This behavior can be disabled with the diagnosticOptOut option or configured with diagnosticRecordingInterval.

3.1.2

01 Feb 03:20
Compare
Choose a tag to compare

[3.1.2] - 2020-01-31

Removed:

  • Removed an unused dependency on @babel/polyfill. (Thanks, bdwain!)
  • Changed exact version dependencies to "highest compatible" dependencies, to avoid having modules that are also used by the host application loaded twice by NPM. (#8)

3.1.1

15 Jan 18:59
Compare
Choose a tag to compare

[3.1.1] - 2020-01-15

Fixed:

  • The SDK now specifies a uniquely identifiable request header when sending events to LaunchDarkly to ensure that events are only processed once, even if the SDK sends them two times due to a failed initial attempt.

3.1.0

13 Dec 22:14
Compare
Choose a tag to compare

[3.1.0] - 2019-12-13

Added:

  • Configuration options wrapperName and wrapperVersion.
  • Platform option httpFallbackPing (to be used for the browser image mechanism - see below).

Fixed:

  • When calling identify, the current user (as reported by getUser()) was being updated before the SDK had received the new flag values for that user, causing the client to be temporarily in an inconsistent state where flag evaluations would be associated with the wrong user in analytics events. Now, the current-user state will stay in sync with the flags and change only when they have finished changing. (Thanks, edvinerikson!)

Removed:

  • Logic for sending a one-way HTTP request in a browser by creating an image has been moved to the browser-specific code (js-client-sdk).

3.0.0

13 Dec 19:18
Compare
Choose a tag to compare

[3.0.0] - 2019-12-13

Added:

  • Configuration property eventCapacity: the maximum number of analytics events (not counting evaluation counters) that can be held at once, to prevent the SDK from consuming unexpected amounts of memory in case an application generates events unusually rapidly. In JavaScript code this would not normally be an issue, since the SDK flushes events every two seconds by default, but you may wish to increase this value if you will intentionally be generating a high volume of custom or identify events. The default value is 100.

Changed:

  • (Breaking change) The extraDefaults parameter to the internal common initialize method is now extraOptionDefs and has a different format, allowing for more flexible validation.
  • The SDK now logs a warning if any configuration property has an inappropriate type, such as baseUri:3 or sendEvents:"no". For boolean properties, the SDK will still interpret the value in terms of truthiness, which was the previous behavior. For all other types, since there's no such commonly accepted way to coerce the type, it will fall back to the default setting for that property; previously, the behavior was undefined but most such mistakes would have caused the SDK to throw an exception at some later point.
  • Removed or updated some development dependencies that were causing vulnerability warnings.

Deprecated:

  • The samplingInterval configuration property was deprecated in the code in the previous minor version release, and in the changelog, but the deprecation notice was accidentally omitted from the documentation comments. It is hereby deprecated again.

2.14.1

04 Nov 20:11
Compare
Choose a tag to compare

[2.14.1] - 2019-11-04

Fixed:

  • Removed uses of Object.assign that caused errors in Internet Explorer unless a polyfill for that function was present.