@atlaskit/tmp-editor-statsig 102.0.0 → 103.0.1
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 +18 -0
- package/dist/cjs/exp-test-overrides.js +1 -0
- package/dist/cjs/experiments-config.js +8 -16
- package/dist/es2019/exp-test-overrides.js +1 -0
- package/dist/es2019/experiments-config.js +8 -16
- package/dist/esm/exp-test-overrides.js +1 -0
- package/dist/esm/experiments-config.js +8 -16
- package/dist/types/experiments-config.d.ts +6 -12
- package/dynamic-config-value-contains/package.json +1 -8
- package/editor-experiments-test-utils/package.json +1 -8
- package/exp-val-equals/package.json +1 -8
- package/exp-val-equals-no-exposure/package.json +1 -8
- package/expVal/package.json +1 -8
- package/experiments/package.json +1 -8
- package/experiments-config/package.json +1 -8
- package/package.json +1 -1
- package/setup/package.json +1 -8
- package/dist/types-ts4.5/dynamic-config-value-contains.d.ts +0 -7
- package/dist/types-ts4.5/editor-experiments-test-utils.d.ts +0 -61
- package/dist/types-ts4.5/exp-test-overrides.d.ts +0 -12
- package/dist/types-ts4.5/exp-val-equals-internal.d.ts +0 -17
- package/dist/types-ts4.5/exp-val-equals-no-exposure.d.ts +0 -30
- package/dist/types-ts4.5/exp-val-equals.d.ts +0 -30
- package/dist/types-ts4.5/expVal.d.ts +0 -30
- package/dist/types-ts4.5/experiment-builders.d.ts +0 -23
- package/dist/types-ts4.5/experiments-config.d.ts +0 -1675
- package/dist/types-ts4.5/experiments.d.ts +0 -67
- package/dist/types-ts4.5/index.d.ts +0 -1
- package/dist/types-ts4.5/setup.d.ts +0 -40
- package/dist/types-ts4.5/type-guards.d.ts +0 -2
- package/dist/types-ts4.5/types.d.ts +0 -32
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/editor-statsig-tmp
|
|
2
2
|
|
|
3
|
+
## 103.0.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`5c8e58785d629`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5c8e58785d629) -
|
|
8
|
+
Add the `cwr-reduce-prompt-suggestion-max-chars` experiment which lowers the CWR prompt
|
|
9
|
+
autocomplete suggestion character limit from 80 to 40. When enabled, suggestions stop being
|
|
10
|
+
requested once the prompt exceeds 40 characters. Default behaviour is unchanged.
|
|
11
|
+
|
|
12
|
+
## 103.0.0
|
|
13
|
+
|
|
14
|
+
### Major Changes
|
|
15
|
+
|
|
16
|
+
- [`d6c0ba39b44b2`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d6c0ba39b44b2) -
|
|
17
|
+
Clean up experiment `platform_editor_outdated_browser_update`
|
|
18
|
+
- [`18c3f1c09a80c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/18c3f1c09a80c) -
|
|
19
|
+
Clean up experiment `platform_editor_rovo_inline_chat_aria_label`
|
|
20
|
+
|
|
3
21
|
## 102.0.0
|
|
4
22
|
|
|
5
23
|
### Major Changes
|
|
@@ -60,6 +60,7 @@ var testBooleanOverrides = exports.testBooleanOverrides = {
|
|
|
60
60
|
platform_editor_table_menu_updates: false,
|
|
61
61
|
platform_editor_core_static_css: false,
|
|
62
62
|
'cwr-modal-ui-refresh': false,
|
|
63
|
+
'cwr-reduce-prompt-suggestion-max-chars': false,
|
|
63
64
|
prompt_tile_content_type_localizaiton: false,
|
|
64
65
|
// [CCI-15904] New AIFC Editor Experience — AND-gated with
|
|
65
66
|
// `platform_editor_ai_xstate_migration` (see `isNewAifcExperienceEnabled`
|
|
@@ -1233,14 +1233,6 @@ var editorExperimentsConfig = exports.editorExperimentsConfig = {
|
|
|
1233
1233
|
param: 'isEnabled',
|
|
1234
1234
|
defaultValue: false
|
|
1235
1235
|
}),
|
|
1236
|
-
// Added 2026-16-05
|
|
1237
|
-
platform_editor_outdated_browser_update: (0, _experimentBuilders.createBooleanExperiment)({
|
|
1238
|
-
productKeys: {
|
|
1239
|
-
confluence: 'platform_editor_outdated_browser_update'
|
|
1240
|
-
},
|
|
1241
|
-
param: 'isEnabled',
|
|
1242
|
-
defaultValue: false
|
|
1243
|
-
}),
|
|
1244
1236
|
// Added 2026-02-05
|
|
1245
1237
|
cc_fd_db_top_editor_toolbar: (0, _experimentBuilders.createMultivariateExperiment)({
|
|
1246
1238
|
productKeys: {
|
|
@@ -1396,6 +1388,14 @@ var editorExperimentsConfig = exports.editorExperimentsConfig = {
|
|
|
1396
1388
|
param: 'isEnabled',
|
|
1397
1389
|
defaultValue: false
|
|
1398
1390
|
}),
|
|
1391
|
+
// Added 2026-06-11
|
|
1392
|
+
'cwr-reduce-prompt-suggestion-max-chars': (0, _experimentBuilders.createBooleanExperiment)({
|
|
1393
|
+
productKeys: {
|
|
1394
|
+
confluence: 'cwr-reduce-prompt-suggestion-max-chars'
|
|
1395
|
+
},
|
|
1396
|
+
param: 'isEnabled',
|
|
1397
|
+
defaultValue: false
|
|
1398
|
+
}),
|
|
1399
1399
|
// Added 2026-02-12
|
|
1400
1400
|
platform_editor_a11y_escape_link_dialog: (0, _experimentBuilders.createBooleanExperiment)({
|
|
1401
1401
|
productKeys: {
|
|
@@ -1625,14 +1625,6 @@ var editorExperimentsConfig = exports.editorExperimentsConfig = {
|
|
|
1625
1625
|
param: 'isEnabled',
|
|
1626
1626
|
defaultValue: false
|
|
1627
1627
|
}),
|
|
1628
|
-
// Added 2026-04-01
|
|
1629
|
-
platform_editor_rovo_inline_chat_aria_label: (0, _experimentBuilders.createBooleanExperiment)({
|
|
1630
|
-
productKeys: {
|
|
1631
|
-
confluence: 'platform_editor_rovo_inline_chat_aria_label'
|
|
1632
|
-
},
|
|
1633
|
-
param: 'isEnabled',
|
|
1634
|
-
defaultValue: false
|
|
1635
|
-
}),
|
|
1636
1628
|
platform_editor_table_fit_to_content_auto_convert: (0, _experimentBuilders.createBooleanExperiment)({
|
|
1637
1629
|
productKeys: {
|
|
1638
1630
|
confluence: 'platform_editor_table_fit_to_content_auto_convert'
|
|
@@ -54,6 +54,7 @@ export const testBooleanOverrides = {
|
|
|
54
54
|
platform_editor_table_menu_updates: false,
|
|
55
55
|
platform_editor_core_static_css: false,
|
|
56
56
|
'cwr-modal-ui-refresh': false,
|
|
57
|
+
'cwr-reduce-prompt-suggestion-max-chars': false,
|
|
57
58
|
prompt_tile_content_type_localizaiton: false,
|
|
58
59
|
// [CCI-15904] New AIFC Editor Experience — AND-gated with
|
|
59
60
|
// `platform_editor_ai_xstate_migration` (see `isNewAifcExperienceEnabled`
|
|
@@ -1227,14 +1227,6 @@ export const editorExperimentsConfig = {
|
|
|
1227
1227
|
param: 'isEnabled',
|
|
1228
1228
|
defaultValue: false
|
|
1229
1229
|
}),
|
|
1230
|
-
// Added 2026-16-05
|
|
1231
|
-
platform_editor_outdated_browser_update: createBooleanExperiment({
|
|
1232
|
-
productKeys: {
|
|
1233
|
-
confluence: 'platform_editor_outdated_browser_update'
|
|
1234
|
-
},
|
|
1235
|
-
param: 'isEnabled',
|
|
1236
|
-
defaultValue: false
|
|
1237
|
-
}),
|
|
1238
1230
|
// Added 2026-02-05
|
|
1239
1231
|
cc_fd_db_top_editor_toolbar: createMultivariateExperiment({
|
|
1240
1232
|
productKeys: {
|
|
@@ -1390,6 +1382,14 @@ export const editorExperimentsConfig = {
|
|
|
1390
1382
|
param: 'isEnabled',
|
|
1391
1383
|
defaultValue: false
|
|
1392
1384
|
}),
|
|
1385
|
+
// Added 2026-06-11
|
|
1386
|
+
'cwr-reduce-prompt-suggestion-max-chars': createBooleanExperiment({
|
|
1387
|
+
productKeys: {
|
|
1388
|
+
confluence: 'cwr-reduce-prompt-suggestion-max-chars'
|
|
1389
|
+
},
|
|
1390
|
+
param: 'isEnabled',
|
|
1391
|
+
defaultValue: false
|
|
1392
|
+
}),
|
|
1393
1393
|
// Added 2026-02-12
|
|
1394
1394
|
platform_editor_a11y_escape_link_dialog: createBooleanExperiment({
|
|
1395
1395
|
productKeys: {
|
|
@@ -1619,14 +1619,6 @@ export const editorExperimentsConfig = {
|
|
|
1619
1619
|
param: 'isEnabled',
|
|
1620
1620
|
defaultValue: false
|
|
1621
1621
|
}),
|
|
1622
|
-
// Added 2026-04-01
|
|
1623
|
-
platform_editor_rovo_inline_chat_aria_label: createBooleanExperiment({
|
|
1624
|
-
productKeys: {
|
|
1625
|
-
confluence: 'platform_editor_rovo_inline_chat_aria_label'
|
|
1626
|
-
},
|
|
1627
|
-
param: 'isEnabled',
|
|
1628
|
-
defaultValue: false
|
|
1629
|
-
}),
|
|
1630
1622
|
platform_editor_table_fit_to_content_auto_convert: createBooleanExperiment({
|
|
1631
1623
|
productKeys: {
|
|
1632
1624
|
confluence: 'platform_editor_table_fit_to_content_auto_convert'
|
|
@@ -54,6 +54,7 @@ export var testBooleanOverrides = {
|
|
|
54
54
|
platform_editor_table_menu_updates: false,
|
|
55
55
|
platform_editor_core_static_css: false,
|
|
56
56
|
'cwr-modal-ui-refresh': false,
|
|
57
|
+
'cwr-reduce-prompt-suggestion-max-chars': false,
|
|
57
58
|
prompt_tile_content_type_localizaiton: false,
|
|
58
59
|
// [CCI-15904] New AIFC Editor Experience — AND-gated with
|
|
59
60
|
// `platform_editor_ai_xstate_migration` (see `isNewAifcExperienceEnabled`
|
|
@@ -1227,14 +1227,6 @@ export var editorExperimentsConfig = {
|
|
|
1227
1227
|
param: 'isEnabled',
|
|
1228
1228
|
defaultValue: false
|
|
1229
1229
|
}),
|
|
1230
|
-
// Added 2026-16-05
|
|
1231
|
-
platform_editor_outdated_browser_update: createBooleanExperiment({
|
|
1232
|
-
productKeys: {
|
|
1233
|
-
confluence: 'platform_editor_outdated_browser_update'
|
|
1234
|
-
},
|
|
1235
|
-
param: 'isEnabled',
|
|
1236
|
-
defaultValue: false
|
|
1237
|
-
}),
|
|
1238
1230
|
// Added 2026-02-05
|
|
1239
1231
|
cc_fd_db_top_editor_toolbar: createMultivariateExperiment({
|
|
1240
1232
|
productKeys: {
|
|
@@ -1390,6 +1382,14 @@ export var editorExperimentsConfig = {
|
|
|
1390
1382
|
param: 'isEnabled',
|
|
1391
1383
|
defaultValue: false
|
|
1392
1384
|
}),
|
|
1385
|
+
// Added 2026-06-11
|
|
1386
|
+
'cwr-reduce-prompt-suggestion-max-chars': createBooleanExperiment({
|
|
1387
|
+
productKeys: {
|
|
1388
|
+
confluence: 'cwr-reduce-prompt-suggestion-max-chars'
|
|
1389
|
+
},
|
|
1390
|
+
param: 'isEnabled',
|
|
1391
|
+
defaultValue: false
|
|
1392
|
+
}),
|
|
1393
1393
|
// Added 2026-02-12
|
|
1394
1394
|
platform_editor_a11y_escape_link_dialog: createBooleanExperiment({
|
|
1395
1395
|
productKeys: {
|
|
@@ -1619,14 +1619,6 @@ export var editorExperimentsConfig = {
|
|
|
1619
1619
|
param: 'isEnabled',
|
|
1620
1620
|
defaultValue: false
|
|
1621
1621
|
}),
|
|
1622
|
-
// Added 2026-04-01
|
|
1623
|
-
platform_editor_rovo_inline_chat_aria_label: createBooleanExperiment({
|
|
1624
|
-
productKeys: {
|
|
1625
|
-
confluence: 'platform_editor_rovo_inline_chat_aria_label'
|
|
1626
|
-
},
|
|
1627
|
-
param: 'isEnabled',
|
|
1628
|
-
defaultValue: false
|
|
1629
|
-
}),
|
|
1630
1622
|
platform_editor_table_fit_to_content_auto_convert: createBooleanExperiment({
|
|
1631
1623
|
productKeys: {
|
|
1632
1624
|
confluence: 'platform_editor_table_fit_to_content_auto_convert'
|
|
@@ -912,12 +912,6 @@ export declare const editorExperimentsConfig: {
|
|
|
912
912
|
productKeys?: ProductKeys;
|
|
913
913
|
typeGuard: IsBooleanType;
|
|
914
914
|
};
|
|
915
|
-
platform_editor_outdated_browser_update: {
|
|
916
|
-
defaultValue: boolean;
|
|
917
|
-
param: string;
|
|
918
|
-
productKeys?: ProductKeys;
|
|
919
|
-
typeGuard: IsBooleanType;
|
|
920
|
-
};
|
|
921
915
|
cc_fd_db_top_editor_toolbar: {
|
|
922
916
|
defaultValue: 'control' | 'new-description' | 'orig-description';
|
|
923
917
|
param: string;
|
|
@@ -1076,6 +1070,12 @@ export declare const editorExperimentsConfig: {
|
|
|
1076
1070
|
productKeys?: ProductKeys;
|
|
1077
1071
|
typeGuard: IsBooleanType;
|
|
1078
1072
|
};
|
|
1073
|
+
'cwr-reduce-prompt-suggestion-max-chars': {
|
|
1074
|
+
defaultValue: boolean;
|
|
1075
|
+
param: string;
|
|
1076
|
+
productKeys?: ProductKeys;
|
|
1077
|
+
typeGuard: IsBooleanType;
|
|
1078
|
+
};
|
|
1079
1079
|
platform_editor_a11y_escape_link_dialog: {
|
|
1080
1080
|
defaultValue: boolean;
|
|
1081
1081
|
param: string;
|
|
@@ -1256,12 +1256,6 @@ export declare const editorExperimentsConfig: {
|
|
|
1256
1256
|
productKeys?: ProductKeys;
|
|
1257
1257
|
typeGuard: IsBooleanType;
|
|
1258
1258
|
};
|
|
1259
|
-
platform_editor_rovo_inline_chat_aria_label: {
|
|
1260
|
-
defaultValue: boolean;
|
|
1261
|
-
param: string;
|
|
1262
|
-
productKeys?: ProductKeys;
|
|
1263
|
-
typeGuard: IsBooleanType;
|
|
1264
|
-
};
|
|
1265
1259
|
platform_editor_remove_collab_step_metrics: {
|
|
1266
1260
|
defaultValue: boolean;
|
|
1267
1261
|
param: string;
|
|
@@ -3,12 +3,5 @@
|
|
|
3
3
|
"main": "../dist/cjs/dynamic-config-value-contains.js",
|
|
4
4
|
"module": "../dist/esm/dynamic-config-value-contains.js",
|
|
5
5
|
"module:es2019": "../dist/es2019/dynamic-config-value-contains.js",
|
|
6
|
-
"types": "../dist/types/dynamic-config-value-contains.d.ts"
|
|
7
|
-
"typesVersions": {
|
|
8
|
-
">=4.5 <5.9": {
|
|
9
|
-
"*": [
|
|
10
|
-
"../dist/types-ts4.5/dynamic-config-value-contains.d.ts"
|
|
11
|
-
]
|
|
12
|
-
}
|
|
13
|
-
}
|
|
6
|
+
"types": "../dist/types/dynamic-config-value-contains.d.ts"
|
|
14
7
|
}
|
|
@@ -3,12 +3,5 @@
|
|
|
3
3
|
"main": "../dist/cjs/editor-experiments-test-utils.js",
|
|
4
4
|
"module": "../dist/esm/editor-experiments-test-utils.js",
|
|
5
5
|
"module:es2019": "../dist/es2019/editor-experiments-test-utils.js",
|
|
6
|
-
"types": "../dist/types/editor-experiments-test-utils.d.ts"
|
|
7
|
-
"typesVersions": {
|
|
8
|
-
">=4.5 <5.9": {
|
|
9
|
-
"*": [
|
|
10
|
-
"../dist/types-ts4.5/editor-experiments-test-utils.d.ts"
|
|
11
|
-
]
|
|
12
|
-
}
|
|
13
|
-
}
|
|
6
|
+
"types": "../dist/types/editor-experiments-test-utils.d.ts"
|
|
14
7
|
}
|
|
@@ -3,12 +3,5 @@
|
|
|
3
3
|
"main": "../dist/cjs/exp-val-equals.js",
|
|
4
4
|
"module": "../dist/esm/exp-val-equals.js",
|
|
5
5
|
"module:es2019": "../dist/es2019/exp-val-equals.js",
|
|
6
|
-
"types": "../dist/types/exp-val-equals.d.ts"
|
|
7
|
-
"typesVersions": {
|
|
8
|
-
">=4.5 <5.9": {
|
|
9
|
-
"*": [
|
|
10
|
-
"../dist/types-ts4.5/exp-val-equals.d.ts"
|
|
11
|
-
]
|
|
12
|
-
}
|
|
13
|
-
}
|
|
6
|
+
"types": "../dist/types/exp-val-equals.d.ts"
|
|
14
7
|
}
|
|
@@ -3,12 +3,5 @@
|
|
|
3
3
|
"main": "../dist/cjs/exp-val-equals-no-exposure.js",
|
|
4
4
|
"module": "../dist/esm/exp-val-equals-no-exposure.js",
|
|
5
5
|
"module:es2019": "../dist/es2019/exp-val-equals-no-exposure.js",
|
|
6
|
-
"types": "../dist/types/exp-val-equals-no-exposure.d.ts"
|
|
7
|
-
"typesVersions": {
|
|
8
|
-
">=4.5 <5.9": {
|
|
9
|
-
"*": [
|
|
10
|
-
"../dist/types-ts4.5/exp-val-equals-no-exposure.d.ts"
|
|
11
|
-
]
|
|
12
|
-
}
|
|
13
|
-
}
|
|
6
|
+
"types": "../dist/types/exp-val-equals-no-exposure.d.ts"
|
|
14
7
|
}
|
package/expVal/package.json
CHANGED
|
@@ -3,12 +3,5 @@
|
|
|
3
3
|
"main": "../dist/cjs/expVal.js",
|
|
4
4
|
"module": "../dist/esm/expVal.js",
|
|
5
5
|
"module:es2019": "../dist/es2019/expVal.js",
|
|
6
|
-
"types": "../dist/types/expVal.d.ts"
|
|
7
|
-
"typesVersions": {
|
|
8
|
-
">=4.5 <5.9": {
|
|
9
|
-
"*": [
|
|
10
|
-
"../dist/types-ts4.5/expVal.d.ts"
|
|
11
|
-
]
|
|
12
|
-
}
|
|
13
|
-
}
|
|
6
|
+
"types": "../dist/types/expVal.d.ts"
|
|
14
7
|
}
|
package/experiments/package.json
CHANGED
|
@@ -3,12 +3,5 @@
|
|
|
3
3
|
"main": "../dist/cjs/experiments.js",
|
|
4
4
|
"module": "../dist/esm/experiments.js",
|
|
5
5
|
"module:es2019": "../dist/es2019/experiments.js",
|
|
6
|
-
"types": "../dist/types/experiments.d.ts"
|
|
7
|
-
"typesVersions": {
|
|
8
|
-
">=4.5 <5.9": {
|
|
9
|
-
"*": [
|
|
10
|
-
"../dist/types-ts4.5/experiments.d.ts"
|
|
11
|
-
]
|
|
12
|
-
}
|
|
13
|
-
}
|
|
6
|
+
"types": "../dist/types/experiments.d.ts"
|
|
14
7
|
}
|
|
@@ -3,12 +3,5 @@
|
|
|
3
3
|
"main": "../dist/cjs/experiments-config.js",
|
|
4
4
|
"module": "../dist/esm/experiments-config.js",
|
|
5
5
|
"module:es2019": "../dist/es2019/experiments-config.js",
|
|
6
|
-
"types": "../dist/types/experiments-config.d.ts"
|
|
7
|
-
"typesVersions": {
|
|
8
|
-
">=4.5 <5.9": {
|
|
9
|
-
"*": [
|
|
10
|
-
"../dist/types-ts4.5/experiments-config.d.ts"
|
|
11
|
-
]
|
|
12
|
-
}
|
|
13
|
-
}
|
|
6
|
+
"types": "../dist/types/experiments-config.d.ts"
|
|
14
7
|
}
|
package/package.json
CHANGED
package/setup/package.json
CHANGED
|
@@ -3,12 +3,5 @@
|
|
|
3
3
|
"main": "../dist/cjs/setup.js",
|
|
4
4
|
"module": "../dist/esm/setup.js",
|
|
5
5
|
"module:es2019": "../dist/es2019/setup.js",
|
|
6
|
-
"types": "../dist/types/setup.d.ts"
|
|
7
|
-
"typesVersions": {
|
|
8
|
-
">=4.5 <5.9": {
|
|
9
|
-
"*": [
|
|
10
|
-
"../dist/types-ts4.5/setup.d.ts"
|
|
11
|
-
]
|
|
12
|
-
}
|
|
13
|
-
}
|
|
6
|
+
"types": "../dist/types/setup.d.ts"
|
|
14
7
|
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Returns whether a Statsig dynamic config's string list (under the `value` key) includes `token`
|
|
3
|
-
* (exact match).
|
|
4
|
-
*
|
|
5
|
-
* Used for UX tokens such as `remove-rovo-placeholder` inside `platform_editor_ai_autocomplete_ux_config`.
|
|
6
|
-
*/
|
|
7
|
-
export declare function dynamicConfigStringListIncludes(configName: string, token: string): boolean;
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import type { EditorExperimentOverrides } from './setup';
|
|
2
|
-
import type { EditorExperimentsConfig } from './experiments-config';
|
|
3
|
-
type DescribeBody = Parameters<typeof describe>[1];
|
|
4
|
-
/**
|
|
5
|
-
* This is a utility function for testing editor experiments.
|
|
6
|
-
*
|
|
7
|
-
* @example Boolean experiment
|
|
8
|
-
* ```ts
|
|
9
|
-
* eeTest('example-boolean', {
|
|
10
|
-
* true: () => {
|
|
11
|
-
* expect(editorExperiment('example-boolean', true)).toBe(true);
|
|
12
|
-
* expect(editorExperiment('example-boolean', false)).toBe(false);
|
|
13
|
-
* },
|
|
14
|
-
* false: () => {
|
|
15
|
-
* expect(editorExperiment('example-boolean', false)).toBe(true);
|
|
16
|
-
* expect(editorExperiment('example-boolean', true)).toBe(false);
|
|
17
|
-
* },
|
|
18
|
-
* })
|
|
19
|
-
* ```
|
|
20
|
-
*
|
|
21
|
-
* @example Multivariate experiment
|
|
22
|
-
* ```ts
|
|
23
|
-
* eeTest('example-multivariate', {
|
|
24
|
-
* one: () => {
|
|
25
|
-
* expect(editorExperiment('example-multivariate', 'one')).toBe(true);
|
|
26
|
-
* expect(editorExperiment('example-multivariate', 'two')).toBe(false);
|
|
27
|
-
* },
|
|
28
|
-
* two: () => {
|
|
29
|
-
* expect(editorExperiment('example-multivariate', 'two')).toBe(true);
|
|
30
|
-
* expect(editorExperiment('example-multivariate', 'one')).toBe(false);
|
|
31
|
-
* },
|
|
32
|
-
* three: () => {
|
|
33
|
-
* expect(editorExperiment('example-multivariate', 'three')).toBe(true);
|
|
34
|
-
* expect(editorExperiment('example-multivariate', 'one')).toBe(false);
|
|
35
|
-
* },
|
|
36
|
-
* })
|
|
37
|
-
* ```
|
|
38
|
-
*
|
|
39
|
-
* API based on Legacy ffTest API
|
|
40
|
-
* - https://hello.atlassian.net/wiki/spaces/AF/pages/2569505829/Task+Testing+your+feature+flag+in+platform+and+product#Legacy-API-lEGACY
|
|
41
|
-
*/
|
|
42
|
-
declare function eeTest<ExperimentName extends keyof EditorExperimentsConfig>(experimentName: ExperimentName, cases: EditorExperimentsConfig[ExperimentName]['defaultValue'] extends string ? Record<EditorExperimentsConfig[ExperimentName]['defaultValue'], DescribeBody> : {
|
|
43
|
-
false: DescribeBody;
|
|
44
|
-
true: DescribeBody;
|
|
45
|
-
}, otherExperiments?: EditorExperimentOverrides): void;
|
|
46
|
-
interface EeTestDescribeReturn<ExperimentName extends keyof EditorExperimentsConfig> {
|
|
47
|
-
each: (describeBody: DescribeBody) => void;
|
|
48
|
-
variant: (value: EditorExperimentsConfig[ExperimentName]['defaultValue'], describeBody: DescribeBody) => void;
|
|
49
|
-
}
|
|
50
|
-
declare namespace eeTest {
|
|
51
|
-
function describe<ExperimentName extends keyof EditorExperimentsConfig>(experimentName: ExperimentName, describeName: string): EeTestDescribeReturn<ExperimentName>;
|
|
52
|
-
}
|
|
53
|
-
interface EeTestFunction {
|
|
54
|
-
<ExperimentName extends keyof EditorExperimentsConfig>(experimentName: ExperimentName, cases: EditorExperimentsConfig[ExperimentName]['defaultValue'] extends string ? Record<EditorExperimentsConfig[ExperimentName]['defaultValue'], DescribeBody> : {
|
|
55
|
-
false: DescribeBody;
|
|
56
|
-
true: DescribeBody;
|
|
57
|
-
}, otherExperiments?: EditorExperimentOverrides): void;
|
|
58
|
-
describe: <ExperimentName extends keyof EditorExperimentsConfig>(experimentName: ExperimentName, describeName: string) => EeTestDescribeReturn<ExperimentName>;
|
|
59
|
-
}
|
|
60
|
-
export { eeTest };
|
|
61
|
-
export type { EeTestFunction };
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { EditorExperimentsConfig } from './experiments-config';
|
|
2
|
-
type MultivariateConfig<Value> = Value extends boolean ? false : true;
|
|
3
|
-
type BooleanConfig<Value> = Value extends boolean ? true : false;
|
|
4
|
-
export type EditorExperimentOverridesMultivariate = {
|
|
5
|
-
[K in keyof EditorExperimentsConfig as MultivariateConfig<EditorExperimentsConfig[K]['defaultValue']> extends true ? K : never]: EditorExperimentsConfig[K]['defaultValue'];
|
|
6
|
-
};
|
|
7
|
-
export type EditorExperimentOverridesBoolean = {
|
|
8
|
-
[K in keyof EditorExperimentsConfig as BooleanConfig<EditorExperimentsConfig[K]['defaultValue']> extends true ? K : never]?: EditorExperimentsConfig[K]['defaultValue'];
|
|
9
|
-
};
|
|
10
|
-
export declare const testMultivariateOverrides: EditorExperimentOverridesMultivariate;
|
|
11
|
-
export declare const testBooleanOverrides: EditorExperimentOverridesBoolean;
|
|
12
|
-
export {};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { type EditorExperimentsConfig } from './experiments-config';
|
|
2
|
-
/**
|
|
3
|
-
* Check the value if an editor experiment.
|
|
4
|
-
* Internal method that is shared between expValEquals and expValEqualsNoExposure.
|
|
5
|
-
*
|
|
6
|
-
* @example
|
|
7
|
-
* exportValEqualsInternal('example-boolean', 'paramName', true, null, true);
|
|
8
|
-
*
|
|
9
|
-
* @param experimentName - experiment key
|
|
10
|
-
* @param experimentParam - the name of the parameter to fetch from the experiment config
|
|
11
|
-
* @param experimentExpectedValue - expected value to compare with
|
|
12
|
-
* @param experimentDefaultValue - default value to use if the experiment is not set
|
|
13
|
-
* @param experimentExposure - whether to fire an exposure event or not
|
|
14
|
-
*
|
|
15
|
-
* @returns boolean
|
|
16
|
-
*/
|
|
17
|
-
export declare function expValEqualsInternal<ExperimentName extends keyof EditorExperimentsConfig>(experimentName: ExperimentName, experimentParam: EditorExperimentsConfig[ExperimentName]['param'], experimentExpectedValue: EditorExperimentsConfig[ExperimentName]['defaultValue'], experimentDefaultValue: boolean | string | null, experimentExposure: boolean): boolean;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { EditorExperimentsConfig, ExperimentDefaultValue, ExperimentExpectedValue } from './experiments-config';
|
|
2
|
-
/**
|
|
3
|
-
* Check the value if an editor experiment without firing exposure.
|
|
4
|
-
*
|
|
5
|
-
* !!! Note: This method never fires exposure. !!!
|
|
6
|
-
*
|
|
7
|
-
* IMPORTANT: If experiment is not defined default value will be null, unless provided otherwise.
|
|
8
|
-
*
|
|
9
|
-
* @example Boolean experiment
|
|
10
|
-
* if (expValEqualsNoExposure('example-boolean', 'isEnabled', true)) {
|
|
11
|
-
* // Run code for on variant
|
|
12
|
-
* } else {
|
|
13
|
-
* // Run code for off variant
|
|
14
|
-
* }
|
|
15
|
-
*
|
|
16
|
-
* @example Multivariate experiment
|
|
17
|
-
* if (expValEqualsNoExposure('example-multivariate', 'cohort', 'one')) {
|
|
18
|
-
* // Run code for 'one' variant
|
|
19
|
-
* } else {
|
|
20
|
-
* // Run code for control
|
|
21
|
-
* }
|
|
22
|
-
*
|
|
23
|
-
* @param experimentName - experiment key
|
|
24
|
-
* @param experimentParam - the name of the parameter to fetch from the experiment config
|
|
25
|
-
* @param experimentExpectedValue - expected value to compare with. Can't use false for boolean experiments or invalid values for multivariate experiments.
|
|
26
|
-
* @param experimentDefaultValue - default value to use if the experiment is not defined. Can't use true for boolean experiments or invalid values for multivariate experiments.
|
|
27
|
-
*
|
|
28
|
-
* @returns boolean
|
|
29
|
-
*/
|
|
30
|
-
export declare function expValEqualsNoExposure<ExperimentName extends keyof EditorExperimentsConfig>(experimentName: ExperimentName, experimentParam: EditorExperimentsConfig[ExperimentName]['param'], experimentExpectedValue: ExperimentExpectedValue<ExperimentName>, experimentDefaultValue?: ExperimentDefaultValue<ExperimentName> | null): boolean;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { EditorExperimentsConfig, ExperimentDefaultValue, ExperimentExpectedValue } from './experiments-config';
|
|
2
|
-
/**
|
|
3
|
-
* Check the value if an editor experiment and fire exposure.
|
|
4
|
-
*
|
|
5
|
-
* !!! Note: This method always fires exposure. !!!
|
|
6
|
-
*
|
|
7
|
-
* IMPORTANT: If experiment is not defined default value will be null, unless provided otherwise.
|
|
8
|
-
*
|
|
9
|
-
* @example Boolean experiment
|
|
10
|
-
* if (expValEquals('example-boolean', 'isEnabled', true)) {
|
|
11
|
-
* // Run code for on variant
|
|
12
|
-
* } else {
|
|
13
|
-
* // Run code for off variant
|
|
14
|
-
* }
|
|
15
|
-
*
|
|
16
|
-
* @example Multivariate experiment
|
|
17
|
-
* if (expValEquals('example-multivariate', 'cohort', 'one')) {
|
|
18
|
-
* // Run code for 'one' variant
|
|
19
|
-
* } else {
|
|
20
|
-
* // Run code for control
|
|
21
|
-
* }
|
|
22
|
-
*
|
|
23
|
-
* @param experimentName - experiment key
|
|
24
|
-
* @param experimentParam - the name of the parameter to fetch from the experiment config
|
|
25
|
-
* @param experimentExpectedValue - expected value to compare with. Can't use false for boolean experiments or invalid values for multivariate experiments.
|
|
26
|
-
* @param experimentDefaultValue - default value to use if the experiment is not defined. Can't use true for boolean experiments or invalid values for multivariate experiments.
|
|
27
|
-
*
|
|
28
|
-
* @returns boolean
|
|
29
|
-
*/
|
|
30
|
-
export declare function expValEquals<ExperimentName extends keyof EditorExperimentsConfig>(experimentName: ExperimentName, experimentParam: EditorExperimentsConfig[ExperimentName]['param'], experimentExpectedValue: ExperimentExpectedValue<ExperimentName>, experimentDefaultValue?: ExperimentDefaultValue<ExperimentName> | null): boolean;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { EditorExperimentsConfig } from './experiments-config';
|
|
2
|
-
/**
|
|
3
|
-
* Use to check a any param value for an experiment
|
|
4
|
-
*
|
|
5
|
-
* **Note**: this will return the default value when the experiment;
|
|
6
|
-
* - is not being served to the client (ie. pre start)
|
|
7
|
-
* - or is not configured in experiments-config
|
|
8
|
-
*
|
|
9
|
-
* If you need to check a param value without an exposure check see {@link expValNoExposure}
|
|
10
|
-
*
|
|
11
|
-
* @example
|
|
12
|
-
* ```ts
|
|
13
|
-
* const delay = expVal('experiment-name', 'param-name', defaultValue)
|
|
14
|
-
* await new Promise(res => setTimeout(res, delay)
|
|
15
|
-
* ```
|
|
16
|
-
*/
|
|
17
|
-
export declare function expVal<ExperimentName extends keyof EditorExperimentsConfig, DefaultValue extends string | number | boolean>(experimentName: ExperimentName, experimentParam: string, defaultValue: DefaultValue extends boolean ? false : DefaultValue): DefaultValue; /**
|
|
18
|
-
* Use to check a any param value for an experiment without firing an exposure event
|
|
19
|
-
*
|
|
20
|
-
* **Note**: this will return the default value when the experiment;
|
|
21
|
-
* - is not being served to the client (ie. pre start)
|
|
22
|
-
* - or is not configured in experiments-config
|
|
23
|
-
*
|
|
24
|
-
* @example
|
|
25
|
-
* ```ts
|
|
26
|
-
* const delay = expParamEqualsNoExposure('experiment-name', 'param-name', defaultValue)
|
|
27
|
-
* await new Promise(res => setTimeout(res, delay)
|
|
28
|
-
* ```
|
|
29
|
-
*/
|
|
30
|
-
export declare function expValNoExposure<ExperimentName extends keyof EditorExperimentsConfig, DefaultValue extends string | number | boolean>(experimentName: ExperimentName, experimentParam: string, defaultValue: DefaultValue extends boolean ? false : DefaultValue): DefaultValue;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { isBoolean } from './type-guards';
|
|
2
|
-
import type { BooleanExperimentConfig, MultivariateExperimentConfig, ProductKeys } from './types';
|
|
3
|
-
/**
|
|
4
|
-
* Helper to create a boolean experiment configuration
|
|
5
|
-
*/
|
|
6
|
-
export declare function createBooleanExperiment(config: BooleanExperimentConfig): {
|
|
7
|
-
defaultValue: boolean;
|
|
8
|
-
param: string;
|
|
9
|
-
productKeys?: ProductKeys;
|
|
10
|
-
typeGuard: typeof isBoolean;
|
|
11
|
-
};
|
|
12
|
-
/**
|
|
13
|
-
* Helper to create a multivariate experiment configuration
|
|
14
|
-
*/
|
|
15
|
-
export declare function createMultivariateExperiment<T extends string[]>(config: MultivariateExperimentConfig<T>): {
|
|
16
|
-
defaultValue: T[number];
|
|
17
|
-
param: string;
|
|
18
|
-
productKeys?: ProductKeys;
|
|
19
|
-
typeGuard: (value: unknown) => value is T[number];
|
|
20
|
-
values: [
|
|
21
|
-
...T
|
|
22
|
-
][number][];
|
|
23
|
-
};
|