Releases: launchdarkly/js-client-sdk
2.11.0
[2.11.0] - 2019-06-06
Added:
- Added support for hooks to the React SDK.
2.10.4
[2.10.4] - 2019-05-22
Added:
unpkg
entry topackage.json
to specify primary build artifact to simplify the unpkg snippet URL.
Fixed:
- Streaming updates did not work if
useReport
was enabled, or if the SDK was connecting through the LaunchDarkly relay proxy. This bug was introduced in version 2.10.0.
2.10.3
[2.10.3] - 2019-05-08
Changed:
- Changed the package names from
ldclient-js
,ldclient-react
, andldclient-js-common
tolaunchdarkly-js-client-sdk
,launchdarkly-react-client-sdk
, andlaunchdarkly-js-sdk-common
, respectively.
There are no other changes in this release. Substituting ldclient-js
, ldclient-react
, and ldclient-js-common
version 2.10.2 with launchdarkly-js-client-sdk
, launchdarkly-react-client-sdk
, and launchdarkly-js-sdk-common
version 2.10.3 will not affect functionality.
Fixed:
- Fixed some broken links in the package READMEs.
2.10.2
[2.10.2] - 2019-05-01
Fixed:
- Fixed a problem that prevented the Electron and client-side Node SDKs from reporting their own version strings correctly. This fix does not affect the browser JS SDK, so there is no need to upgrade if you are using that.
Note on future releases:
The LaunchDarkly SDK repositories are being renamed for consistency. This repository is now js-client-sdk
rather than js-client
.
The package names will also change. In the 2.10.2 release, there were packages for ldclient-js
, ldclient-react
and ldclient-js-common
; in all future releases, they will be launchdarkly-js-client-sdk
, launchdarkly-react-client-sdk
, and launchdarkly-js-sdk-common
, respectively.
2.10.1
2.10.0
[2.10.0] - 2019-04-19
Added:
- Generated TypeDoc documentation for all types, properties, and methods is now available online at https://launchdarkly.github.io/js-client-sdk/. Currently this will only be for the latest released version.
- The SDK now allows you to specify an anonymous user without a key (i.e. the
anonymous
property istrue
, and there is nokey
property). In that case, the SDK will generate a UUID and send that as the user key. It will also cache this generated key in local storage (if local storage is available) so that anonymous users in the same browser will always get the same key.
Fixed:
- Setting user attributes to non-string values when a string was expected would prevent evaluations and analytics events from working. The SDK will now convert attribute values to strings as needed.
2.9.7
[2.9.7] - 2019-04-16
Fixed:
- If there are pending analytics events when the page is being closed, the SDK normally attempts to deliver them by making a synchronous HTTP request. Chrome, as of version 73, does not allow this and logs an error. An upcoming release will change how events are sent, but as a temporary measure to avoid these errors, the SDK will now simply discard any pending events when the page is being closed if the browser is Chrome version 73 or higher. In other browsers, there is no change. Note that this means that in Chrome 73, some events may be lost; that was already the case. The purpose of this patch is simply to avoid triggering errors. (#178)
(The 2.9.6 release was an error and has been removed.)
2.9.5
[2.9.5] - 2019-03-12
Fixed:
- In React, when using the
bootstrap
property to preload the SDK client with flag values, the client will now become ready immediately and make the flags available to other components as soon as it is initialized; previously this did not happen until aftercomponentDidMount
. - The user attribute
secondary
was not included in the TypeScript declarations and therefore could not be used from TypeScript code.
2.9.4
[2.9.4] - 2019-02-22
Fixed:
- Running inside an iframe on Chrome with third-party cookies disabled-- which also disables HTML5 local storage-- would cause a security exception (due to the SDK attempting to check whether
window.localStorage
exists). This was a long-standing problem, but became worse in the 2.9.0 release since the SDK now checks for browser capabilities like this regardless of whether you've attempted to use them yet. It should now simply log a warning if you try to usebootstrap: "localstorage"
when local storage is disabled. (#138) - If the SDK received streaming updates out of order (rare, but possible) such that it received "flag X was deleted" prior to "flag X was created", an uncaught exception would be logged in the browser console (but would not otherwise affect anything).
- A supported user property,
privateAttributeNames
, was not usable from TypeScript because it was omitted from the TypeScript declarations. - Several TypeScript declarations had been changed from
interface
totype
. They all now useinterface
, except forLDFlagValue
which is a type alias. This should not affect regular usage of the SDK in TypeScript, but it is easier to extend aninterface
than atype
if desired. - Removed a window message listener that was previously used for integration with the LaunchDarkly dashboard, but is no longer used.
2.9.3
[2.9.3] - 2019-02-12
Fixed:
- The React SDK was pulling in the entire
lodash
package. This has been improved to only require the much smallercamelcase
tool fromlodash
. - The React SDK now lists React itself as a peer dependency rather than a regular dependency, so it will not included twice in an application that already requires React.
- Corrected the TypeScript declaration for the
identify
method to indicate that its asynchronous result type isLDFlagSet
, notvoid
. (Thanks, impressiver!) - Corrected and expanded many documentation comments in the TypeScript declarations.
(The 2.9.2 release was broken and has been removed.)