launchdarkly-js-sdk-common 3.2.10 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/dist/ldclient-common.cjs.js +1 -1
- package/dist/ldclient-common.cjs.js.map +1 -1
- package/dist/ldclient-common.es.js +1 -1
- package/dist/ldclient-common.es.js.map +1 -1
- package/dist/ldclient-common.min.js +1 -1
- package/dist/ldclient-common.min.js.map +1 -1
- package/package.json +2 -2
- package/typings.d.ts +36 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "launchdarkly-js-sdk-common",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.0",
|
|
4
4
|
"description": "LaunchDarkly SDK for JavaScript - common code",
|
|
5
5
|
"author": "LaunchDarkly <team@launchdarkly.com>",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"eslint-formatter-pretty": "^1.3.0",
|
|
54
54
|
"eslint-plugin-babel": "^5.0.0",
|
|
55
55
|
"eslint-plugin-prettier": "^2.6.0",
|
|
56
|
-
"jest": "^25.
|
|
56
|
+
"jest": "^25.5.4",
|
|
57
57
|
"jsdom": "^11.11.0",
|
|
58
58
|
"launchdarkly-js-test-helpers": "1.1.0",
|
|
59
59
|
"prettier": "1.11.1",
|
package/typings.d.ts
CHANGED
|
@@ -259,6 +259,14 @@ declare module 'launchdarkly-js-sdk-common' {
|
|
|
259
259
|
* If `wrapperName` is unset, this field will be ignored.
|
|
260
260
|
*/
|
|
261
261
|
wrapperVersion?: string;
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* Whether to disable the automatic sending of an alias event when [[identify]] is
|
|
265
|
+
* called with a non-anonymous user when the previous user is anonymous.
|
|
266
|
+
*
|
|
267
|
+
* The default value is `false`.
|
|
268
|
+
*/
|
|
269
|
+
autoAliasingOptOut?: boolean;
|
|
262
270
|
}
|
|
263
271
|
|
|
264
272
|
/**
|
|
@@ -349,8 +357,12 @@ declare module 'launchdarkly-js-sdk-common' {
|
|
|
349
357
|
/**
|
|
350
358
|
* Describes the reason that a flag evaluation produced a particular value. This is
|
|
351
359
|
* part of the [[LDEvaluationDetail]] object returned by [[LDClient.variationDetail]].
|
|
360
|
+
*
|
|
361
|
+
* This type is separate from `[[LDEvaluationReason]]` for backwards compatibility. In
|
|
362
|
+
* earlier versions of this SDK, `[[LDEvaluationReason]]` was incorrectly defined as
|
|
363
|
+
* being non-nullable.
|
|
352
364
|
*/
|
|
353
|
-
|
|
365
|
+
interface NonNullableLDEvaluationReason {
|
|
354
366
|
/**
|
|
355
367
|
* The general category of the reason:
|
|
356
368
|
*
|
|
@@ -386,6 +398,14 @@ declare module 'launchdarkly-js-sdk-common' {
|
|
|
386
398
|
prerequisiteKey?: string;
|
|
387
399
|
}
|
|
388
400
|
|
|
401
|
+
/**
|
|
402
|
+
* Describes the reason that a flag evaluation produced a particular value. This is
|
|
403
|
+
* part of the [[LDEvaluationDetail]] object returned by [[LDClient.variationDetail]].
|
|
404
|
+
*
|
|
405
|
+
* Will be null when `[[LDOptions.evaluationReasons]]` is `false`.
|
|
406
|
+
*/
|
|
407
|
+
export type LDEvaluationReason = NonNullableLDEvaluationReason | null;
|
|
408
|
+
|
|
389
409
|
/**
|
|
390
410
|
* An object that combines the result of a feature flag evaluation with information about
|
|
391
411
|
* how it was calculated.
|
|
@@ -659,6 +679,21 @@ declare module 'launchdarkly-js-sdk-common' {
|
|
|
659
679
|
*/
|
|
660
680
|
track(key: string, data?: any, metricValue?: number): void;
|
|
661
681
|
|
|
682
|
+
/**
|
|
683
|
+
* Associates two users for analytics purposes.
|
|
684
|
+
*
|
|
685
|
+
* This can be helpful in the situation where a person is represented by multiple
|
|
686
|
+
* LaunchDarkly users. This may happen, for example, when a person initially logs into
|
|
687
|
+
* an application-- the person might be represented by an anonymous user prior to logging
|
|
688
|
+
* in and a different user after logging in, as denoted by a different user key.
|
|
689
|
+
*
|
|
690
|
+
* @param user
|
|
691
|
+
* The newly identified user.
|
|
692
|
+
* @param previousUser
|
|
693
|
+
* The previously identified user.
|
|
694
|
+
*/
|
|
695
|
+
alias(user: LDUser, previousUser: LDUser): void;
|
|
696
|
+
|
|
662
697
|
/**
|
|
663
698
|
* Returns a map of all available flags to the current user's values.
|
|
664
699
|
*
|