Releases: launchdarkly/js-client-sdk
Releases · launchdarkly/js-client-sdk
2.17.4
[2.17.4] - 2020-04-30
Fixed:
- Some diagnostic event data was being sent twice, resulting in extra HTTP requests. This did not affect analytics events, so customer data on the dashboard and in data export would still be correct.
2.17.3
[2.17.3] - 2020-03-31
Fixed:
- The default logging implementation (
createConsoleLogger
) could throw errors in Internet Explorer 11 if log output (of an enabled level) happened while the developer tools were not open. This is because in IE 11, theconsole
object does not exist unless the tools are open. This has been fixed so the logger does not try to useconsole
unless it currently has a value. - Updated some dependency versions to resolve a security vulnerability in the transitive
acorn
dependency. This dependency is only used for development and as a result the security vulnerability did not affect customers.
2.17.2
[2.17.2] - 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 withapplication/json
. (#205) - Fixed incorrect usage of
Object.hasOwnProperty
which could have caused an error if a feature flag hadhasOwnProperty
as its flag key.
2.17.1
[2.17.1] - 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 callwaitForInitialization()
(any promise that might be rejected should have an error handler attached), it is inappropriate if the application did not callwaitForInitialization()
at all-- which is not mandatory, since the application could use events instead, orwaitUntilReady()
, 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 callswaitForInitialization()
; 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
oroff
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.
2.17.0
[2.17.0] - 2020-02-14
Note: if you are using the LaunchDarkly Relay Proxy to forward events, update the Relay to version 5.10.0 or later before updating to this Node SDK version.
Added:
- The SDK now periodically sends diagnostic data to LaunchDarkly, describing the version and configuration of the SDK, the architecture and version of the runtime platform, and performance statistics. No credentials, hostnames, or other identifiable values are included. This behavior can be disabled with the
diagnosticOptOut
option, or configured withdiagnosticRecordingInterval
.
Fixed:
- When using secure mode in conjunction with streaming mode, if an application specified a new
hash
parameter while changing the current user withidentify()
, the SDK was not using the newhash
value when recomputing the stream URL, causing the stream to fail. (Thanks, andrao!) - The
LICENSE.txt
file was accidentally replaced with an incomplete license in an earlier release. The standard Apache 2.0 license file has been restored. (#202)
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.