Skip to content

Releases: launchdarkly/js-client-sdk

2.7.3

09 Nov 22:03
47db0f2
Compare
Choose a tag to compare

[2.7.3] - 2018-11-09

Fixed:

  • The TypeScript definitions were incorrectly restricting the possible values for event types in on() and off(). Also, added documentation for event types which were not documented before. (#122)

2.7.2

17 Oct 18:40
5567117
Compare
Choose a tag to compare

[2.7.2] - 2018-10-17

Fixed:

  • Disconnecting from the stream does not close the browser tab anymore.
    (Thanks, Sawtaytoes.)
  • The configuration property evaluationReasons was misnamed as evaluationExplanations in the TypeScript definitions.

2.7.1

28 Sep 00:10
8e9b460
Compare
Choose a tag to compare

[2.7.1] - 2018-09-27

Fixed:

  • Event posts did not include the HTTP header that specifies the SDK version. They now do again. Note that the sendLDHeaders option does not affect this; if the header is turned off for flag requests, it should still be sent in events, since events always require a CORS preflight check anyway (and are delivered asynchronously, so the OPTIONS request does not slow down page loads).

2.7.0

27 Sep 01:13
1bf9087
Compare
Choose a tag to compare

[2.7.0] - 2018-09-19

Added:

  • New client method waitForInitialization returns a Promise, like waitUntilReady; but while waitUntilReady will be resolved as soon as client initialization either succeeds or fails, waitForInitialization will be resolved only if initialization succeeds, and will be rejected (with an error object) if it fails.
  • New config option fetchGoals (default: true) allows you to control whether the client will request A/B testing parameters from LaunchDarkly. If you do not use A/B testing, you may wish to disable this to reduce the number of HTTP requests.
  • New config option sendLDHeaders (default: true) allows you to control whether the client will add a custom header to LaunchDarkly HTTP requests (to indicate the SDK version). You may wish to disable this behavior if you have performance concerns, as it causes browsers to make an additional CORS preflight check (since it is no longer a simple request).

2.6.0

07 Sep 19:58
3160bd4
Compare
Choose a tag to compare

[2.6.0] - 2018-09-07

Added:

  • The new configuration option evaluationReasons causes LaunchDarkly to report information about how each feature flag value was determined; you can access this information with the new client method variationDetail. The new method returns an object that contains both the flag value and a "reason" object which will tell you, for instance, if the user was individually targeted for the flag or was matched by one of the flag's rules, or if the flag returned the default value due to an error.

Changed:

  • In streaming mode, the client will attempt to reconnect if it receives an HTTP error status from LaunchDarkly. Previously, it would only retry if the connection was lost.

2.5.0

27 Aug 20:50
85940ba
Compare
Choose a tag to compare

[2.5.0] - 2018-08-27

Changed:

  • Starting in version 2.0.0, there was a problem where analytics events would not be generated correctly if you initialized the client with bootstrap data, because the bootstrap data did not include some flag metadata that the front end uses for events. The client now supports an extended format for bootstrap data that fixes this problem; this is generated by calling a new method that has been added to the server-side SDKs, allFlagsState/all_flags_state (previously allFlags/all_flags). Therefore, if you want analytics event data and you are using bootstrap data from the back end, you should upgrade both your JavaScript SDK and your server-side SDK, and use allFlagsState on the back end. This does not require any changes in your JavaScript code. If you use bootstrap data in the old format, the SDK will still be usable but events will not work correctly.
  • When posting events to LaunchDarkly, if a request fails, it will be retried once.
  • The TypeScript mappings for the SDK were omitted from the distribution in the previous release. They are now in the distribution again, in the root folder instead of in src, and have been renamed from index.d.ts to typings.d.ts.

2.4.1

15 Aug 00:31
Compare
Choose a tag to compare

[2.4.1] - 2018-08-14

Fixed:

  • The result value of identify() (provided by either a promise or a callback, once the flag values for the new user have been retrieved) used to be a simple map of flag keys to values, until it was accidentally changed to an internal data structure in version 2.0.0. It is now a map of flag keys to values again, consistent with what is returned by allFlags().
  • Added TypeScript definitions for the result values of identify(). (Thanks, 1999!)
  • Documented all optional compatibility polyfills in README.md.

2.4.0

13 Jul 22:47
Compare
Choose a tag to compare

[2.4.0] - 2018-07-12

Added:

  • Named exports for the initialize method and version number exports.

Deprecated:

  • Default exports, use named exports instead.

Changed:

  • Updated package.json to only export minified files.

2.3.1

29 Jun 19:06
Compare
Choose a tag to compare

[2.3.1] - 2018-06-29

Fixed:

  • If a polling request has failed due to an invalid environment key, calling variation now returns the default value; previously, it sometimes caused a null reference error.

2.3.0

27 Jun 18:26
Compare
Choose a tag to compare

[2.3.0] - 2018-06-26

Changed:

The client will now stop trying to send analytics events if it receives almost any HTTP 4xx error from LaunchDarkly; such errors indicate either a configuration problem (invalid SDK key) or a bug, which is not likely to resolve without a restart or an upgrade. This does not apply if the error is 400, 408, or 429.