5.0.0
·
41 commits
to main
since this release
[5.0.0] - 2022-11-30
This major version release of js-sdk-common
corresponds to the upcoming releases of the js-client-sdk
v3 and react-client-sdk
v3, and cannot be used with earlier SDK versions.
Added:
- Replaced users with contexts. A context is a generalized way of referring to the people, services, machines, or other resources that encounter feature flags in your product. All methods which previously operated on
LDUser
now operate onLDContext
.
Changed:
LDClient.getUser
has been replaced withLDClient.getContext
.privateAttributeNames
has been replaced withprivateAttributes
. Private attributes now allow using attribute references, which allow for marking nodes in nested JSON private.
Removed:
- Alias events are no longer supported and the
alias
method has been removed fromLDClient
. - Support for the
secondary
attribute has been removed fromLDUser
. If a secondary attribute is included in a context, then it is a normal attribute that can be used in rule evaluation, but it will not affect bucketing. allowFrequentDuplicateEvents
has been removed fromLDOptions
. This had been deprecated in a previous version. The default behavior is as if this option had been set to true.autoAliasingOptOut
has been removed fromLDOptions
. This functionality has been superseded by multi-context support.inlineUsersInEvents
has been removed fromLDOptions
. Changes associated with contexts has removed the needed for this option.
Deprecated:
- The
LDUser
object has been deprecated. Support forLDUser
is maintained to simplify the upgrade process, but it is recommended to useLDContext
in the shape of eitherLDSingleKindContext
orLDMultiKindContext
.