launchdarkly-js-client-sdk
Advanced tools
Changelog
[3.4.0] - 2024-06-20
Changelog
[3.3.0] - 2024-05-01
waitForInitialization
method. When a timeout is specified the returned promise will be rejected after the timeout elapses if the client has not finished initializing within that time. When no timeout is specified the returned promise will not be resolved or rejected until the initialization either completes or fails.evaluationReasons
for the identify
method.Changelog
[3.2.0] - 2024-03-19
Changelog
[3.1.4] - 2023-09-06
Changelog
[3.1.3] - 2023-04-12
Changelog
[3.1.2] - 2023-03-21
LDContext
to allow for key to be optional. This is used when making an anonymous context with a generated key.Changelog
[3.1.1] - 2023-02-15
js-sdk-common
version 5.0.2
. This removes usage of optional chaining (?.
) to allow for use with older transpilers.Changelog
[3.1.0] - 2023-01-18
launchdarkly-js-sdk-common
to version 5.0.1 for improved documentation generation.Changelog
[3.0.0] - 2022-12-07
The latest version of this SDK supports LaunchDarkly's new custom contexts feature. Contexts are an evolution of a previously-existing concept, "users." Contexts let you create targeting rules for feature flags based on a variety of different information, including attributes pertaining to users, organizations, devices, and more. You can even combine contexts to create "multi-contexts."
For detailed information about this version, please refer to the list below. For information on how to upgrade from the previous version, please read the migration guide.
LDContext
, LDSingleKindContext
, and LDMultiKindContext
define the new "context" model.LDUser
parameter now take an LDContext
. LDUser
is now a subset of LDContext
, so existing code based on users will still work.secondary
meta-attribute that affects percentage rollouts. If you set an attribute with that name in LDContext
, it will simply be a custom attribute like any other.anonymous
attribute as a simple boolean, with no distinction between a false state and an undefined state.LDClient.getUser
has been replaced with LDClient.getContext
.privateAttributeNames
has been replaced with privateAttributes
in LDOptions
. Private attributes now allow using attribute references.secondary
meta-attribute in LDUser
.alias
method no longer exists because alias events are not needed in the new context model.autoAliasingOptOut
and inlineUsersInEvents
options no longer exist because they are not relevant in the new context model.LDUser
object has been deprecated. Support for LDUser
is maintained to simplify the upgrade process, but it is recommended to use LDContext
in the shape of either LDSingleKindContext
or LDMultiKindContext
.