@atlaskit/tmp-editor-statsig 8.2.0 → 8.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 +9 -0
- package/dist/cjs/exp-val-equals-no-exposure.js +5 -1
- package/dist/cjs/exp-val-equals.js +5 -1
- package/dist/es2019/exp-val-equals-no-exposure.js +5 -2
- package/dist/es2019/exp-val-equals.js +5 -2
- package/dist/esm/exp-val-equals-no-exposure.js +5 -1
- package/dist/esm/exp-val-equals.js +5 -1
- package/dist/types/exp-val-equals-no-exposure.d.ts +4 -1
- package/dist/types/exp-val-equals.d.ts +4 -1
- package/dist/types-ts4.5/exp-val-equals-no-exposure.d.ts +4 -1
- package/dist/types-ts4.5/exp-val-equals.d.ts +4 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/editor-statsig-tmp
|
|
2
2
|
|
|
3
|
+
## 8.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#177692](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/177692)
|
|
8
|
+
[`19ab0513e027f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/19ab0513e027f) -
|
|
9
|
+
Add defaultValue parameter to expValEq and expValEqNoExposure to allow for checking default state
|
|
10
|
+
(e.g. false state) and avoid issue when experiment is not defined
|
|
11
|
+
|
|
3
12
|
## 8.2.0
|
|
4
13
|
|
|
5
14
|
### Minor Changes
|
|
@@ -10,6 +10,8 @@ var _expValEqualsInternal = require("./exp-val-equals-internal");
|
|
|
10
10
|
*
|
|
11
11
|
* !!! Note: This method never fires exposure. !!!
|
|
12
12
|
*
|
|
13
|
+
* IMPORTANT: If experiment is not defined default value will be null, unless provided otherwise.
|
|
14
|
+
*
|
|
13
15
|
* @example Boolean experiment
|
|
14
16
|
* if (expValEqualsNoExposure('example-boolean', 'isEnabled', true)) {
|
|
15
17
|
* // Run code for on variant
|
|
@@ -27,9 +29,11 @@ var _expValEqualsInternal = require("./exp-val-equals-internal");
|
|
|
27
29
|
* @param experimentName - experiment key
|
|
28
30
|
* @param experimentParam - the name of the parameter to fetch from the experiment config
|
|
29
31
|
* @param experimentExpectedValue - expected value to compare with
|
|
32
|
+
* @param experimentDefaultValue - default value to use if the experiment is not defined.
|
|
30
33
|
*
|
|
31
34
|
* @returns boolean
|
|
32
35
|
*/
|
|
33
36
|
function expValEqualsNoExposure(experimentName, experimentParam, experimentExpectedValue) {
|
|
34
|
-
|
|
37
|
+
var experimentDefaultValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
|
|
38
|
+
return (0, _expValEqualsInternal.expValEqualsInternal)(experimentName, experimentParam, experimentExpectedValue, experimentDefaultValue, false);
|
|
35
39
|
}
|
|
@@ -10,6 +10,8 @@ var _expValEqualsInternal = require("./exp-val-equals-internal");
|
|
|
10
10
|
*
|
|
11
11
|
* !!! Note: This method always fires exposure. !!!
|
|
12
12
|
*
|
|
13
|
+
* IMPORTANT: If experiment is not defined default value will be null, unless provided otherwise.
|
|
14
|
+
*
|
|
13
15
|
* @example Boolean experiment
|
|
14
16
|
* if (expValEquals('example-boolean', 'isEnabled', true)) {
|
|
15
17
|
* // Run code for on variant
|
|
@@ -27,9 +29,11 @@ var _expValEqualsInternal = require("./exp-val-equals-internal");
|
|
|
27
29
|
* @param experimentName - experiment key
|
|
28
30
|
* @param experimentParam - the name of the parameter to fetch from the experiment config
|
|
29
31
|
* @param experimentExpectedValue - expected value to compare with
|
|
32
|
+
* @param experimentDefaultValue - default value to use if the experiment is not defined.
|
|
30
33
|
*
|
|
31
34
|
* @returns boolean
|
|
32
35
|
*/
|
|
33
36
|
function expValEquals(experimentName, experimentParam, experimentExpectedValue) {
|
|
34
|
-
|
|
37
|
+
var experimentDefaultValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
|
|
38
|
+
return (0, _expValEqualsInternal.expValEqualsInternal)(experimentName, experimentParam, experimentExpectedValue, experimentDefaultValue, true);
|
|
35
39
|
}
|
|
@@ -4,6 +4,8 @@ import { expValEqualsInternal } from './exp-val-equals-internal';
|
|
|
4
4
|
*
|
|
5
5
|
* !!! Note: This method never fires exposure. !!!
|
|
6
6
|
*
|
|
7
|
+
* IMPORTANT: If experiment is not defined default value will be null, unless provided otherwise.
|
|
8
|
+
*
|
|
7
9
|
* @example Boolean experiment
|
|
8
10
|
* if (expValEqualsNoExposure('example-boolean', 'isEnabled', true)) {
|
|
9
11
|
* // Run code for on variant
|
|
@@ -21,9 +23,10 @@ import { expValEqualsInternal } from './exp-val-equals-internal';
|
|
|
21
23
|
* @param experimentName - experiment key
|
|
22
24
|
* @param experimentParam - the name of the parameter to fetch from the experiment config
|
|
23
25
|
* @param experimentExpectedValue - expected value to compare with
|
|
26
|
+
* @param experimentDefaultValue - default value to use if the experiment is not defined.
|
|
24
27
|
*
|
|
25
28
|
* @returns boolean
|
|
26
29
|
*/
|
|
27
|
-
export function expValEqualsNoExposure(experimentName, experimentParam, experimentExpectedValue) {
|
|
28
|
-
return expValEqualsInternal(experimentName, experimentParam, experimentExpectedValue,
|
|
30
|
+
export function expValEqualsNoExposure(experimentName, experimentParam, experimentExpectedValue, experimentDefaultValue = null) {
|
|
31
|
+
return expValEqualsInternal(experimentName, experimentParam, experimentExpectedValue, experimentDefaultValue, false);
|
|
29
32
|
}
|
|
@@ -4,6 +4,8 @@ import { expValEqualsInternal } from './exp-val-equals-internal';
|
|
|
4
4
|
*
|
|
5
5
|
* !!! Note: This method always fires exposure. !!!
|
|
6
6
|
*
|
|
7
|
+
* IMPORTANT: If experiment is not defined default value will be null, unless provided otherwise.
|
|
8
|
+
*
|
|
7
9
|
* @example Boolean experiment
|
|
8
10
|
* if (expValEquals('example-boolean', 'isEnabled', true)) {
|
|
9
11
|
* // Run code for on variant
|
|
@@ -21,9 +23,10 @@ import { expValEqualsInternal } from './exp-val-equals-internal';
|
|
|
21
23
|
* @param experimentName - experiment key
|
|
22
24
|
* @param experimentParam - the name of the parameter to fetch from the experiment config
|
|
23
25
|
* @param experimentExpectedValue - expected value to compare with
|
|
26
|
+
* @param experimentDefaultValue - default value to use if the experiment is not defined.
|
|
24
27
|
*
|
|
25
28
|
* @returns boolean
|
|
26
29
|
*/
|
|
27
|
-
export function expValEquals(experimentName, experimentParam, experimentExpectedValue) {
|
|
28
|
-
return expValEqualsInternal(experimentName, experimentParam, experimentExpectedValue,
|
|
30
|
+
export function expValEquals(experimentName, experimentParam, experimentExpectedValue, experimentDefaultValue = null) {
|
|
31
|
+
return expValEqualsInternal(experimentName, experimentParam, experimentExpectedValue, experimentDefaultValue, true);
|
|
29
32
|
}
|
|
@@ -4,6 +4,8 @@ import { expValEqualsInternal } from './exp-val-equals-internal';
|
|
|
4
4
|
*
|
|
5
5
|
* !!! Note: This method never fires exposure. !!!
|
|
6
6
|
*
|
|
7
|
+
* IMPORTANT: If experiment is not defined default value will be null, unless provided otherwise.
|
|
8
|
+
*
|
|
7
9
|
* @example Boolean experiment
|
|
8
10
|
* if (expValEqualsNoExposure('example-boolean', 'isEnabled', true)) {
|
|
9
11
|
* // Run code for on variant
|
|
@@ -21,9 +23,11 @@ import { expValEqualsInternal } from './exp-val-equals-internal';
|
|
|
21
23
|
* @param experimentName - experiment key
|
|
22
24
|
* @param experimentParam - the name of the parameter to fetch from the experiment config
|
|
23
25
|
* @param experimentExpectedValue - expected value to compare with
|
|
26
|
+
* @param experimentDefaultValue - default value to use if the experiment is not defined.
|
|
24
27
|
*
|
|
25
28
|
* @returns boolean
|
|
26
29
|
*/
|
|
27
30
|
export function expValEqualsNoExposure(experimentName, experimentParam, experimentExpectedValue) {
|
|
28
|
-
|
|
31
|
+
var experimentDefaultValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
|
|
32
|
+
return expValEqualsInternal(experimentName, experimentParam, experimentExpectedValue, experimentDefaultValue, false);
|
|
29
33
|
}
|
|
@@ -4,6 +4,8 @@ import { expValEqualsInternal } from './exp-val-equals-internal';
|
|
|
4
4
|
*
|
|
5
5
|
* !!! Note: This method always fires exposure. !!!
|
|
6
6
|
*
|
|
7
|
+
* IMPORTANT: If experiment is not defined default value will be null, unless provided otherwise.
|
|
8
|
+
*
|
|
7
9
|
* @example Boolean experiment
|
|
8
10
|
* if (expValEquals('example-boolean', 'isEnabled', true)) {
|
|
9
11
|
* // Run code for on variant
|
|
@@ -21,9 +23,11 @@ import { expValEqualsInternal } from './exp-val-equals-internal';
|
|
|
21
23
|
* @param experimentName - experiment key
|
|
22
24
|
* @param experimentParam - the name of the parameter to fetch from the experiment config
|
|
23
25
|
* @param experimentExpectedValue - expected value to compare with
|
|
26
|
+
* @param experimentDefaultValue - default value to use if the experiment is not defined.
|
|
24
27
|
*
|
|
25
28
|
* @returns boolean
|
|
26
29
|
*/
|
|
27
30
|
export function expValEquals(experimentName, experimentParam, experimentExpectedValue) {
|
|
28
|
-
|
|
31
|
+
var experimentDefaultValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
|
|
32
|
+
return expValEqualsInternal(experimentName, experimentParam, experimentExpectedValue, experimentDefaultValue, true);
|
|
29
33
|
}
|
|
@@ -4,6 +4,8 @@ import { type EditorExperimentsConfig } from './experiments-config';
|
|
|
4
4
|
*
|
|
5
5
|
* !!! Note: This method never fires exposure. !!!
|
|
6
6
|
*
|
|
7
|
+
* IMPORTANT: If experiment is not defined default value will be null, unless provided otherwise.
|
|
8
|
+
*
|
|
7
9
|
* @example Boolean experiment
|
|
8
10
|
* if (expValEqualsNoExposure('example-boolean', 'isEnabled', true)) {
|
|
9
11
|
* // Run code for on variant
|
|
@@ -21,7 +23,8 @@ import { type EditorExperimentsConfig } from './experiments-config';
|
|
|
21
23
|
* @param experimentName - experiment key
|
|
22
24
|
* @param experimentParam - the name of the parameter to fetch from the experiment config
|
|
23
25
|
* @param experimentExpectedValue - expected value to compare with
|
|
26
|
+
* @param experimentDefaultValue - default value to use if the experiment is not defined.
|
|
24
27
|
*
|
|
25
28
|
* @returns boolean
|
|
26
29
|
*/
|
|
27
|
-
export declare function expValEqualsNoExposure<ExperimentName extends keyof EditorExperimentsConfig>(experimentName: ExperimentName, experimentParam: EditorExperimentsConfig[ExperimentName]['param'], experimentExpectedValue: EditorExperimentsConfig[ExperimentName]['defaultValue']): boolean;
|
|
30
|
+
export declare function expValEqualsNoExposure<ExperimentName extends keyof EditorExperimentsConfig>(experimentName: ExperimentName, experimentParam: EditorExperimentsConfig[ExperimentName]['param'], experimentExpectedValue: EditorExperimentsConfig[ExperimentName]['defaultValue'], experimentDefaultValue?: EditorExperimentsConfig[ExperimentName]['defaultValue'] | null): boolean;
|
|
@@ -4,6 +4,8 @@ import { type EditorExperimentsConfig } from './experiments-config';
|
|
|
4
4
|
*
|
|
5
5
|
* !!! Note: This method always fires exposure. !!!
|
|
6
6
|
*
|
|
7
|
+
* IMPORTANT: If experiment is not defined default value will be null, unless provided otherwise.
|
|
8
|
+
*
|
|
7
9
|
* @example Boolean experiment
|
|
8
10
|
* if (expValEquals('example-boolean', 'isEnabled', true)) {
|
|
9
11
|
* // Run code for on variant
|
|
@@ -21,7 +23,8 @@ import { type EditorExperimentsConfig } from './experiments-config';
|
|
|
21
23
|
* @param experimentName - experiment key
|
|
22
24
|
* @param experimentParam - the name of the parameter to fetch from the experiment config
|
|
23
25
|
* @param experimentExpectedValue - expected value to compare with
|
|
26
|
+
* @param experimentDefaultValue - default value to use if the experiment is not defined.
|
|
24
27
|
*
|
|
25
28
|
* @returns boolean
|
|
26
29
|
*/
|
|
27
|
-
export declare function expValEquals<ExperimentName extends keyof EditorExperimentsConfig>(experimentName: ExperimentName, experimentParam: EditorExperimentsConfig[ExperimentName]['param'], experimentExpectedValue: EditorExperimentsConfig[ExperimentName]['defaultValue']): boolean;
|
|
30
|
+
export declare function expValEquals<ExperimentName extends keyof EditorExperimentsConfig>(experimentName: ExperimentName, experimentParam: EditorExperimentsConfig[ExperimentName]['param'], experimentExpectedValue: EditorExperimentsConfig[ExperimentName]['defaultValue'], experimentDefaultValue?: EditorExperimentsConfig[ExperimentName]['defaultValue'] | null): boolean;
|
|
@@ -4,6 +4,8 @@ import { type EditorExperimentsConfig } from './experiments-config';
|
|
|
4
4
|
*
|
|
5
5
|
* !!! Note: This method never fires exposure. !!!
|
|
6
6
|
*
|
|
7
|
+
* IMPORTANT: If experiment is not defined default value will be null, unless provided otherwise.
|
|
8
|
+
*
|
|
7
9
|
* @example Boolean experiment
|
|
8
10
|
* if (expValEqualsNoExposure('example-boolean', 'isEnabled', true)) {
|
|
9
11
|
* // Run code for on variant
|
|
@@ -21,7 +23,8 @@ import { type EditorExperimentsConfig } from './experiments-config';
|
|
|
21
23
|
* @param experimentName - experiment key
|
|
22
24
|
* @param experimentParam - the name of the parameter to fetch from the experiment config
|
|
23
25
|
* @param experimentExpectedValue - expected value to compare with
|
|
26
|
+
* @param experimentDefaultValue - default value to use if the experiment is not defined.
|
|
24
27
|
*
|
|
25
28
|
* @returns boolean
|
|
26
29
|
*/
|
|
27
|
-
export declare function expValEqualsNoExposure<ExperimentName extends keyof EditorExperimentsConfig>(experimentName: ExperimentName, experimentParam: EditorExperimentsConfig[ExperimentName]['param'], experimentExpectedValue: EditorExperimentsConfig[ExperimentName]['defaultValue']): boolean;
|
|
30
|
+
export declare function expValEqualsNoExposure<ExperimentName extends keyof EditorExperimentsConfig>(experimentName: ExperimentName, experimentParam: EditorExperimentsConfig[ExperimentName]['param'], experimentExpectedValue: EditorExperimentsConfig[ExperimentName]['defaultValue'], experimentDefaultValue?: EditorExperimentsConfig[ExperimentName]['defaultValue'] | null): boolean;
|
|
@@ -4,6 +4,8 @@ import { type EditorExperimentsConfig } from './experiments-config';
|
|
|
4
4
|
*
|
|
5
5
|
* !!! Note: This method always fires exposure. !!!
|
|
6
6
|
*
|
|
7
|
+
* IMPORTANT: If experiment is not defined default value will be null, unless provided otherwise.
|
|
8
|
+
*
|
|
7
9
|
* @example Boolean experiment
|
|
8
10
|
* if (expValEquals('example-boolean', 'isEnabled', true)) {
|
|
9
11
|
* // Run code for on variant
|
|
@@ -21,7 +23,8 @@ import { type EditorExperimentsConfig } from './experiments-config';
|
|
|
21
23
|
* @param experimentName - experiment key
|
|
22
24
|
* @param experimentParam - the name of the parameter to fetch from the experiment config
|
|
23
25
|
* @param experimentExpectedValue - expected value to compare with
|
|
26
|
+
* @param experimentDefaultValue - default value to use if the experiment is not defined.
|
|
24
27
|
*
|
|
25
28
|
* @returns boolean
|
|
26
29
|
*/
|
|
27
|
-
export declare function expValEquals<ExperimentName extends keyof EditorExperimentsConfig>(experimentName: ExperimentName, experimentParam: EditorExperimentsConfig[ExperimentName]['param'], experimentExpectedValue: EditorExperimentsConfig[ExperimentName]['defaultValue']): boolean;
|
|
30
|
+
export declare function expValEquals<ExperimentName extends keyof EditorExperimentsConfig>(experimentName: ExperimentName, experimentParam: EditorExperimentsConfig[ExperimentName]['param'], experimentExpectedValue: EditorExperimentsConfig[ExperimentName]['defaultValue'], experimentDefaultValue?: EditorExperimentsConfig[ExperimentName]['defaultValue'] | null): boolean;
|
package/package.json
CHANGED