launchdarkly-js-sdk-common
Advanced tools
Comparing version 5.0.0 to 5.0.1
@@ -5,2 +5,22 @@ # Change log | ||
## [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 on `LDContext`. | ||
### Changed: | ||
- `LDClient.getUser` has been replaced with `LDClient.getContext`. | ||
- `privateAttributeNames` has been replaced with `privateAttributes`. 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 from `LDClient`. | ||
- Support for the `secondary` attribute has been removed from `LDUser`. 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 from `LDOptions`. 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 from `LDOptions`. This functionality has been superseded by multi-context support. | ||
- `inlineUsersInEvents` has been removed from `LDOptions`. Changes associated with contexts has removed the needed for this option. | ||
### Deprecated: | ||
- The `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`. | ||
## [4.3.2] - 2022-10-20 | ||
@@ -7,0 +27,0 @@ ### Added: |
{ | ||
"name": "launchdarkly-js-sdk-common", | ||
"version": "5.0.0", | ||
"version": "5.0.1", | ||
"description": "LaunchDarkly SDK for JavaScript - common code", | ||
@@ -5,0 +5,0 @@ "author": "LaunchDarkly <team@launchdarkly.com>", |
@@ -340,3 +340,3 @@ /** | ||
*/ | ||
interface LDContextCommon { | ||
export interface LDContextCommon { | ||
/** | ||
@@ -390,3 +390,3 @@ * If true, the context will _not_ appear on the Contexts page in the LaunchDarkly dashboard. | ||
*/ | ||
interface LDSingleKindContext extends LDContextCommon { | ||
export interface LDSingleKindContext extends LDContextCommon { | ||
/** | ||
@@ -429,3 +429,3 @@ * The kind of the context. | ||
*/ | ||
interface LDMultiKindContext { | ||
export interface LDMultiKindContext { | ||
/** | ||
@@ -561,3 +561,3 @@ * The kind of the context. | ||
*/ | ||
interface LDEvaluationReason { | ||
export interface LDEvaluationReason { | ||
/** | ||
@@ -1003,3 +1003,3 @@ * The general category of the reason: | ||
*/ | ||
interface LDInspectionFlagUsedHandler { | ||
export interface LDInspectionFlagUsedHandler { | ||
type: 'flag-used', | ||
@@ -1031,3 +1031,3 @@ | ||
*/ | ||
interface LDInspectionFlagDetailsChangedHandler { | ||
export interface LDInspectionFlagDetailsChangedHandler { | ||
type: 'flag-details-changed', | ||
@@ -1058,3 +1058,3 @@ | ||
*/ | ||
interface LDInspectionFlagDetailChangedHandler { | ||
export interface LDInspectionFlagDetailChangedHandler { | ||
type: 'flag-detail-changed', | ||
@@ -1082,3 +1082,3 @@ | ||
*/ | ||
interface LDInspectionIdentifyHandler { | ||
export interface LDInspectionIdentifyHandler { | ||
type: 'client-identity-changed', | ||
@@ -1097,4 +1097,4 @@ | ||
type LDInspection = LDInspectionFlagUsedHandler | LDInspectionFlagDetailsChangedHandler | ||
export type LDInspection = LDInspectionFlagUsedHandler | LDInspectionFlagDetailsChangedHandler | ||
| LDInspectionFlagDetailChangedHandler | LDInspectionIdentifyHandler; | ||
} |
439830