Releases: launchdarkly/js-client-sdk
Releases · launchdarkly/js-client-sdk
2.15.1
[2.15.1] - 2019-11-06
Fixed:
- A runtime dependency on
typedoc
was mistakenly added in the 2.15.0 release. This has been removed.
2.15.0
[2.15.0] - 2019-11-05
Changed:
- Changed the behavior of the warning message that is logged on failing to establish a streaming connection. Rather than the current behavior where the warning message appears upon each failed attempt, it will now only appear on the first failure in each series of attempts. Also, the message has been changed to mention that retries will occur. (#182)
- The source code for the
launchdarkly-js-sdk-common
package has been moved out of this repository intojs-sdk-common
, and will now be versioned separately. Applications should never refer to the common package directly; it is brought in automatically bylaunchdarkly-js-client-sdk
. Changes made in the common code that affect JS SDK functionality will be noted in the main changelog here. - There is a new, much fuller-featured demo application in the
example
directory, which may be useful for testing not only of the JS SDK but of feature flag evaluation in general.
Fixed:
- The
beforeunload
event handler no longer callsclose
on the client, which was causing the SDK to become unusable if the page did not actually close after this event fired (for instance if the browser navigated to a URL that launched an external application, or if anotherbeforeunload
handler cancelled leaving the page). Instead, it now only flushes events. There is also anunload
handler that flushes any additional events that might have been created by any code that ran during thebeforeunload
stage. (#181) - Removed uses of
Object.assign
that caused errors in Internet Explorer unless a polyfill for that function was present. These were removed earlier in the 2.1.1 release, but had been mistakenly added again.
Deprecated:
- The
samplingInterval
configuration property is deprecated and will be removed in a future version. The intended use case for thesamplingInterval
feature was to reduce analytics event network usage in high-traffic applications. This feature is being deprecated in favor of summary counters, which are meant to track all events.
2.14.0
[2.14.0] - 2019-10-10
Added:
- Added support for upcoming LaunchDarkly experimentation features. See
LDClient.track()
. - The
createConsoleLogger()
function now has an optional second parameter for customizing the log prefix.
Changed:
- Log messages now include the level ("[warn]", "[error]", etc.) and have a prefix of "LD:" by default.
Removed:
- The source code for the
launchdarkly-react-client-sdk
package is no longer part of this monorepo. It is now in its own repository,react-client-sdk
. Future updates to the LaunchDarkly React interface will be tracked there.
2.13.0
[2.13.0] - 2019-08-15
Added:
- A
jsdelivr
entry topackage.json
to specify the primary build artifact and simplify the jsDelivr snippet URL. - In the React SDK, the new
reactOptions
parameter towithLDProvider
provides React-specific options that do not affect the underlying JavaScript SDK. Currently, the only such option isuseCamelCaseFlagKeys
, which is true by default but can be set to false to disable the automatic camel-casing of flag keys.
Changed:
- In the React SDK, when omitting the
user
parameter towithLDProvider
, an anonymous user will be created. This user will remain constant across browser sessions. Previously a new user was generated on each page load.
2.12.5
[2.12.5] - 2019-07-29
Changed:
- The error messages logged upon having an invalid environment/client-side ID have been updated to better clarify what went wrong. (#165)
Fixed:
- The React SDK was incompatible with Internet Explorer 11 due to using
String.startsWith()
. (Thanks, cvetanov!) - There was a broken documentation link in the error message logged when initially sending an event without identifying a user. The broken link has been fixed.
2.12.4
[2.12.4] - 2019-07-10
Changed:
- The
useReport
property, which tells the SDK to use the REPORT method for HTTP requests so that user data will not appear in the URL path, was only actually using REPORT for requesting all flags at once— not for streaming updates, because streaming uses the EventSource API which normally can only use the GET method; so, to avoid exposing user data in the URL for the streaming connection, the SDK had to use a different and slower mechanism (in which all of the flags are reloaded whenever there is a change) ifuseReport
was true. That is still the case by default; but, if you load the specific EventSource polyfill implementationlaunchdarkly-eventsource
(v1.1.0 or later), the SDK can now use REPORT for streaming connections.
Fixed:
- The
homepage
attribute in thelaunchdarkly-react-client-sdk
andlaunchdarkly-react-client-sdk-example
packages has been updated to the correct value.
2.12.3
[2.12.3] - 2019-07-08
Added:
- The SDK now logs a message at
info
level when the stream connection is started or stopped. It also logs a message atwarn
level if it detects that the stream had to be restarted due to a connection failure; however, in browsers that have native support for EventSource, connection restarts may be handled internally by the browser in which case there will be no log message.
Changed:
- When providing precomputed flag values to the SDK via the
bootstrap
option, these values will now be immediately available as soon asinitialize()
returns. That was already the behavior in earlier versions of the SDK, but ever since version 2.10.0 the values only became available once the client was officially ready (i.e. theready
event had fired or thewaitUntilInitialized()
promise had resolved), so they could not be used in non-asynchronous application code. The correct behavior had never been explicitly defined, so this had not been documented as a change. The behavior is now as it was prior to 2.10.0, and is now documented as such. (#162)
Fixed:
- Under some circumstances, the SDK would fail to restart a streaming connection if it had already been dropped and restarted before. This normally would not happen when using a built-in browser implementation of EventSource, but could happen with some EventSource polyfills.
- Fixed a broken link in the project README.
2.12.2
[2.1.2] - 2019-06-28
Fixed:
- The
eventUrlTransformer
property that was added in 2.12.0 had no effect. It now works.
2.12.1
[2.12.1] - 2019-06-28
Added:
- The SDK now logs a message at
info
level when the stream connection is started or stopped. It also logs a message atwarn
level if it detects that the stream had to be restarted due to a connection failure; however, in browsers that have native support for EventSource, connection restarts may be handled internally by the browser in which case there will be no log message.
Fixed:
- Under some circumstances, the SDK would fail to restart a streaming connection if it had already been dropped and restarted before. This normally would not happen when using a built-in browser implementation of EventSource, but could happen with some EventSource polyfills.
- Fixed a broken link in the project README.
2.12.0
[2.12.0] - 2019-06-18
Added:
- Configuration property
eventUrlTransformer
allows application code to modify the URL that is sent in analytics events.
Fixed:
- If the SDK receives data from the service that does not have the expected JSON content type, it will now log an appropriate error message, rather than "Error fetching flags: 200".