Releases: launchdarkly/js-client-sdk
Releases · launchdarkly/js-client-sdk
2.16.3
[2.16.3] - 2020-02-05
Fixed:
- Changed some exact version dependencies to "highest compatible" dependencies, to avoid having modules that are also used by the host application loaded twice by NPM. The dependency on
js-sdk-common
is still an exact version dependency so that each release ofjs-client-sdk
has well-defined behavior for that internal code.
Removed:
- Removed an unused transitive dependency on
@babel/polyfill
. (Thanks, bdwain!)
2.16.2
[2.16.2] - 2020-01-27
Fixed:
- If the user started to navigate away from the page, but then did not actually do so (for instance, if the application cancelled the
beforeunload
event, or if a nonstandard URL scheme caused the browser to launch an external app), the SDK could be left in a state where all of its HTTP requests would be made synchronously. This has been fixed so the only synchronous request the SDK makes is when it needs to flush events during abeforeunload
. (Thanks, edvinerikson!)
2.16.1
[2.16.1] - 2020-01-15
Note: If you use the Relay Proxy, and have configured it to forward events, please update it to version 5.9.4 or later before using this version of the browser SDK. Otherwise you may encounter CORS errors in the browser.
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.
2.16.0
[2.16.0] - 2019-12-16
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. - Configuration properties
wrapperName
andwrapperVersion
: used by the React SDK, and potentially by third-party libraries, to identify a JS SDK instance that is being used with a wrapper API.
Changed:
- The SDK now logs a warning if any configuration property has an inappropriate type, such as
baseUri:3
orsendEvents:"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.
Fixed:
- When calling
identify
, the current user (as reported bygetUser()
) 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!)
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.15.2
[2.15.2] - 2019-11-15
Fixed:
- Releases after 2.14.1 were continuing to report the
version
property as "2.14.1". This property will now once again be consistent with the actual release version.
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.