Releases: launchdarkly/js-client-sdk
Releases · launchdarkly/js-client-sdk
2.2.0
[2.2.0] - 2018-06-22
Added:
- New event
goalsReady
(and new methodwaitUntilGoalsReady
, which returns a Promise based on that event) indicates when the client has loaded goals-- i.e. when it is possible for pageview events and click events to be triggered.
Fixed:
- Fixed a bug where calling
variation
would throw an error if the client was bootstrapped from local storage and there were no flags in local storage yet, and the initial HTTP request for flags from LaunchDarkly had not yet completed. (thanks, mpcowan!)
2.1.2
2.1.1
[2.1.1] - 2018-06-05
Fixed:
- Removed two function calls that are not supported in Internet Explorer:
string.startsWith()
andObject.assign()
.
2.1.0
[2.1.0] - 2018-05-31
Added:
- The client now sends the current SDK version to LaunchDarkly in an HTTP header. This information will be visible in a future version of the LaunchDarkly UI.
Fixed:
- Fixed a bug that caused summary events to combine the counts for flag evaluations that produced the flag's first variation (variation index 0) with the counts for flag evaluations that fell through to the default value.
2.0.0
[2.0.0] - 2018-05-25
Changed
- To reduce the network bandwidth used for analytics events, feature request events are now sent as counters rather than individual events, and user details are now sent only at intervals rather than in each event. These behaviors can be modified through the LaunchDarkly UI and with the new configuration option
inlineUsersInEvents
. For more details, see Analytics Data Stream Reference. - In every function that takes an optional callback parameter, if you provide a callback, the function will not return a promise; a promise will be returned only if you omit the callback. Previously, it would always return a promise which would be resolved/rejected at the same time that the callback (if any) was called; this caused problems if you had not registered an error handler for the promise.
- When sending analytics events, if there is a connection error or an HTTP 5xx response, the client will try to send the events again one more time after a one-second delay.
- Analytics are now sent with an HTTP
POST
request if the browser supports CORS, or via image loading if it does not. Previously, they were always sent via image loading.
Added
- The new configuration option
sendEventsOnlyForVariation
, if set totrue
, causes analytics events for feature flags to be sent only when you callvariation
. Otherwise, the default behavior is to also send events when you callallFlags
, and whenever a changed flag value is detected in streaming mode. - The new configuration option
allowFrequentDuplicateEvents
, if set totrue
, turns off throttling for feature flag events. Otherwise, the default behavior is to block the sending of an analytics event if another event with the same flag key, flag value, and user key was generated within the last five minutes.
Fixed
- If
identify
is called with a null user, or a user with no key, the function no longer tries to do an HTTP request to the server (which would always fail); instead, it just returns an error.
Deprecated
- The configuration options
all_attributes_private
andprivate_attribute_names
are deprecated. UseallAttributesPrivate
andprivateAttributeNames
instead.
1.7.4
1.7.3
[1.7.3] - 2018-05-08
Fixed
- The client no longer creates an empty
XMLHttpRequest
at startup time (which could interfere with unit tests).
1.7.2
[1.7.2] - 2018-05-07
Fixed
- The client no longer creates an empty
XMLHttpRequest
at startup time (which could interfere with unit tests).
1.7.0
Changed
- The build now uses Rollup, Babel and Jest.
Fixed
- Fixed a bug that caused a syntax error when running in Internet Explorer 11.
- Fixed an IE 11 incompatibility in the example page index.html.
- Fixed a bug that caused the SDK to send events on beforeunload even if it should not send events.