@atlaskit/tmp-editor-statsig 70.6.0 → 71.0.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 +7 -0
- package/dist/cjs/exp-val-equals-internal.js +13 -2
- package/dist/cjs/experiments-config.js +1 -8
- package/dist/es2019/exp-val-equals-internal.js +14 -3
- package/dist/es2019/experiments-config.js +1 -8
- package/dist/esm/exp-val-equals-internal.js +14 -3
- package/dist/esm/experiments-config.js +1 -8
- package/dist/types/exp-val-equals-internal.d.ts +1 -1
- package/dist/types/experiments-config.d.ts +0 -6
- package/dist/types-ts4.5/exp-val-equals-internal.d.ts +1 -1
- package/dist/types-ts4.5/experiments-config.d.ts +0 -6
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,7 +7,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.expValEqualsInternal = expValEqualsInternal;
|
|
8
8
|
var _featureGateJsClient = _interopRequireDefault(require("@atlaskit/feature-gate-js-client"));
|
|
9
9
|
var _featureFlagsAccessed = require("@atlaskit/react-ufo/feature-flags-accessed");
|
|
10
|
+
var _experimentsConfig = require("./experiments-config");
|
|
10
11
|
var _setup = require("./setup");
|
|
12
|
+
// This internal representation doesn't currently support productKeys
|
|
13
|
+
// the way expVal(...) does, this adds temporary support for some keys while
|
|
14
|
+
// we determine our preferred approach forward
|
|
15
|
+
var allowsProductKeys = ['cc-maui-experiment'];
|
|
16
|
+
|
|
11
17
|
/**
|
|
12
18
|
* Check the value if an editor experiment.
|
|
13
19
|
* Internal method that is shared between expValEquals and expValEqualsNoExposure.
|
|
@@ -24,6 +30,7 @@ var _setup = require("./setup");
|
|
|
24
30
|
* @returns boolean
|
|
25
31
|
*/
|
|
26
32
|
function expValEqualsInternal(experimentName, experimentParam, experimentExpectedValue, experimentDefaultValue, experimentExposure) {
|
|
33
|
+
var _editorExperimentsCon, _editorExperimentsCon2;
|
|
27
34
|
// @ts-ignore need to loosen the type here to allow for any experiment name
|
|
28
35
|
if (_setup._overrides[experimentName] !== undefined) {
|
|
29
36
|
// This will be hit in the case of a test setting an override
|
|
@@ -36,15 +43,19 @@ function expValEqualsInternal(experimentName, experimentParam, experimentExpecte
|
|
|
36
43
|
return experimentDefaultValue === experimentExpectedValue;
|
|
37
44
|
}
|
|
38
45
|
|
|
46
|
+
// Typescript is complaining here about accessing the productKeys property
|
|
47
|
+
var experimentKeyName = allowsProductKeys.includes(experimentName) ? // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
48
|
+
(_editorExperimentsCon = (_editorExperimentsCon2 = _experimentsConfig.editorExperimentsConfig[experimentName]) === null || _editorExperimentsCon2 === void 0 || (_editorExperimentsCon2 = _editorExperimentsCon2.productKeys) === null || _editorExperimentsCon2 === void 0 ? void 0 : _editorExperimentsCon2[_setup._product]) !== null && _editorExperimentsCon !== void 0 ? _editorExperimentsCon : experimentName : experimentName;
|
|
49
|
+
|
|
39
50
|
// eslint-disable-next-line @atlaskit/platform/use-recommended-utils
|
|
40
|
-
var experimentValue = _featureGateJsClient.default.getExperimentValue(
|
|
51
|
+
var experimentValue = _featureGateJsClient.default.getExperimentValue(experimentKeyName, experimentParam, experimentDefaultValue, {
|
|
41
52
|
fireExperimentExposure: experimentExposure
|
|
42
53
|
});
|
|
43
54
|
if (
|
|
44
55
|
// eslint-disable-next-line @atlaskit/platform/use-recommended-utils
|
|
45
56
|
_featureGateJsClient.default.getExperimentValue('cc_editor_experiments_ufo_gate_reporting', 'isEnabled', false)) {
|
|
46
57
|
// Duplicated from /confluence/next/packages/feature-experiments/src/index.ts
|
|
47
|
-
(0, _featureFlagsAccessed.addFeatureFlagAccessed)("".concat(
|
|
58
|
+
(0, _featureFlagsAccessed.addFeatureFlagAccessed)("".concat(experimentKeyName, ":").concat(experimentParam), experimentValue);
|
|
48
59
|
}
|
|
49
60
|
return experimentValue === experimentExpectedValue;
|
|
50
61
|
}
|
|
@@ -1368,14 +1368,7 @@ var editorExperimentsConfig = exports.editorExperimentsConfig = {
|
|
|
1368
1368
|
// Added 2026-02-23
|
|
1369
1369
|
'cc-maui-experiment': (0, _experimentBuilders.createBooleanExperiment)({
|
|
1370
1370
|
productKeys: {
|
|
1371
|
-
confluence: 'cc-maui-experiment'
|
|
1372
|
-
},
|
|
1373
|
-
param: 'isEnabled',
|
|
1374
|
-
defaultValue: false
|
|
1375
|
-
}),
|
|
1376
|
-
// Added 2026-04-15
|
|
1377
|
-
jira_maui_remix: (0, _experimentBuilders.createBooleanExperiment)({
|
|
1378
|
-
productKeys: {
|
|
1371
|
+
confluence: 'cc-maui-experiment',
|
|
1379
1372
|
jira: 'jira_maui_remix'
|
|
1380
1373
|
},
|
|
1381
1374
|
param: 'isEnabled',
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
2
2
|
import { addFeatureFlagAccessed } from '@atlaskit/react-ufo/feature-flags-accessed';
|
|
3
|
-
import {
|
|
3
|
+
import { editorExperimentsConfig } from './experiments-config';
|
|
4
|
+
import { _overrides, _product } from './setup';
|
|
5
|
+
|
|
6
|
+
// This internal representation doesn't currently support productKeys
|
|
7
|
+
// the way expVal(...) does, this adds temporary support for some keys while
|
|
8
|
+
// we determine our preferred approach forward
|
|
9
|
+
const allowsProductKeys = ['cc-maui-experiment'];
|
|
4
10
|
|
|
5
11
|
/**
|
|
6
12
|
* Check the value if an editor experiment.
|
|
@@ -18,6 +24,7 @@ import { _overrides } from './setup';
|
|
|
18
24
|
* @returns boolean
|
|
19
25
|
*/
|
|
20
26
|
export function expValEqualsInternal(experimentName, experimentParam, experimentExpectedValue, experimentDefaultValue, experimentExposure) {
|
|
27
|
+
var _editorExperimentsCon, _editorExperimentsCon2, _editorExperimentsCon3;
|
|
21
28
|
// @ts-ignore need to loosen the type here to allow for any experiment name
|
|
22
29
|
if (_overrides[experimentName] !== undefined) {
|
|
23
30
|
// This will be hit in the case of a test setting an override
|
|
@@ -30,15 +37,19 @@ export function expValEqualsInternal(experimentName, experimentParam, experiment
|
|
|
30
37
|
return experimentDefaultValue === experimentExpectedValue;
|
|
31
38
|
}
|
|
32
39
|
|
|
40
|
+
// Typescript is complaining here about accessing the productKeys property
|
|
41
|
+
const experimentKeyName = allowsProductKeys.includes(experimentName) ? // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
42
|
+
(_editorExperimentsCon = (_editorExperimentsCon2 = editorExperimentsConfig[experimentName]) === null || _editorExperimentsCon2 === void 0 ? void 0 : (_editorExperimentsCon3 = _editorExperimentsCon2.productKeys) === null || _editorExperimentsCon3 === void 0 ? void 0 : _editorExperimentsCon3[_product]) !== null && _editorExperimentsCon !== void 0 ? _editorExperimentsCon : experimentName : experimentName;
|
|
43
|
+
|
|
33
44
|
// eslint-disable-next-line @atlaskit/platform/use-recommended-utils
|
|
34
|
-
const experimentValue = FeatureGates.getExperimentValue(
|
|
45
|
+
const experimentValue = FeatureGates.getExperimentValue(experimentKeyName, experimentParam, experimentDefaultValue, {
|
|
35
46
|
fireExperimentExposure: experimentExposure
|
|
36
47
|
});
|
|
37
48
|
if (
|
|
38
49
|
// eslint-disable-next-line @atlaskit/platform/use-recommended-utils
|
|
39
50
|
FeatureGates.getExperimentValue('cc_editor_experiments_ufo_gate_reporting', 'isEnabled', false)) {
|
|
40
51
|
// Duplicated from /confluence/next/packages/feature-experiments/src/index.ts
|
|
41
|
-
addFeatureFlagAccessed(`${
|
|
52
|
+
addFeatureFlagAccessed(`${experimentKeyName}:${experimentParam}`, experimentValue);
|
|
42
53
|
}
|
|
43
54
|
return experimentValue === experimentExpectedValue;
|
|
44
55
|
}
|
|
@@ -1362,14 +1362,7 @@ export const editorExperimentsConfig = {
|
|
|
1362
1362
|
// Added 2026-02-23
|
|
1363
1363
|
'cc-maui-experiment': createBooleanExperiment({
|
|
1364
1364
|
productKeys: {
|
|
1365
|
-
confluence: 'cc-maui-experiment'
|
|
1366
|
-
},
|
|
1367
|
-
param: 'isEnabled',
|
|
1368
|
-
defaultValue: false
|
|
1369
|
-
}),
|
|
1370
|
-
// Added 2026-04-15
|
|
1371
|
-
jira_maui_remix: createBooleanExperiment({
|
|
1372
|
-
productKeys: {
|
|
1365
|
+
confluence: 'cc-maui-experiment',
|
|
1373
1366
|
jira: 'jira_maui_remix'
|
|
1374
1367
|
},
|
|
1375
1368
|
param: 'isEnabled',
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
2
2
|
import { addFeatureFlagAccessed } from '@atlaskit/react-ufo/feature-flags-accessed';
|
|
3
|
-
import {
|
|
3
|
+
import { editorExperimentsConfig } from './experiments-config';
|
|
4
|
+
import { _overrides, _product } from './setup';
|
|
5
|
+
|
|
6
|
+
// This internal representation doesn't currently support productKeys
|
|
7
|
+
// the way expVal(...) does, this adds temporary support for some keys while
|
|
8
|
+
// we determine our preferred approach forward
|
|
9
|
+
var allowsProductKeys = ['cc-maui-experiment'];
|
|
4
10
|
|
|
5
11
|
/**
|
|
6
12
|
* Check the value if an editor experiment.
|
|
@@ -18,6 +24,7 @@ import { _overrides } from './setup';
|
|
|
18
24
|
* @returns boolean
|
|
19
25
|
*/
|
|
20
26
|
export function expValEqualsInternal(experimentName, experimentParam, experimentExpectedValue, experimentDefaultValue, experimentExposure) {
|
|
27
|
+
var _editorExperimentsCon, _editorExperimentsCon2;
|
|
21
28
|
// @ts-ignore need to loosen the type here to allow for any experiment name
|
|
22
29
|
if (_overrides[experimentName] !== undefined) {
|
|
23
30
|
// This will be hit in the case of a test setting an override
|
|
@@ -30,15 +37,19 @@ export function expValEqualsInternal(experimentName, experimentParam, experiment
|
|
|
30
37
|
return experimentDefaultValue === experimentExpectedValue;
|
|
31
38
|
}
|
|
32
39
|
|
|
40
|
+
// Typescript is complaining here about accessing the productKeys property
|
|
41
|
+
var experimentKeyName = allowsProductKeys.includes(experimentName) ? // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
42
|
+
(_editorExperimentsCon = (_editorExperimentsCon2 = editorExperimentsConfig[experimentName]) === null || _editorExperimentsCon2 === void 0 || (_editorExperimentsCon2 = _editorExperimentsCon2.productKeys) === null || _editorExperimentsCon2 === void 0 ? void 0 : _editorExperimentsCon2[_product]) !== null && _editorExperimentsCon !== void 0 ? _editorExperimentsCon : experimentName : experimentName;
|
|
43
|
+
|
|
33
44
|
// eslint-disable-next-line @atlaskit/platform/use-recommended-utils
|
|
34
|
-
var experimentValue = FeatureGates.getExperimentValue(
|
|
45
|
+
var experimentValue = FeatureGates.getExperimentValue(experimentKeyName, experimentParam, experimentDefaultValue, {
|
|
35
46
|
fireExperimentExposure: experimentExposure
|
|
36
47
|
});
|
|
37
48
|
if (
|
|
38
49
|
// eslint-disable-next-line @atlaskit/platform/use-recommended-utils
|
|
39
50
|
FeatureGates.getExperimentValue('cc_editor_experiments_ufo_gate_reporting', 'isEnabled', false)) {
|
|
40
51
|
// Duplicated from /confluence/next/packages/feature-experiments/src/index.ts
|
|
41
|
-
addFeatureFlagAccessed("".concat(
|
|
52
|
+
addFeatureFlagAccessed("".concat(experimentKeyName, ":").concat(experimentParam), experimentValue);
|
|
42
53
|
}
|
|
43
54
|
return experimentValue === experimentExpectedValue;
|
|
44
55
|
}
|
|
@@ -1362,14 +1362,7 @@ export var editorExperimentsConfig = {
|
|
|
1362
1362
|
// Added 2026-02-23
|
|
1363
1363
|
'cc-maui-experiment': createBooleanExperiment({
|
|
1364
1364
|
productKeys: {
|
|
1365
|
-
confluence: 'cc-maui-experiment'
|
|
1366
|
-
},
|
|
1367
|
-
param: 'isEnabled',
|
|
1368
|
-
defaultValue: false
|
|
1369
|
-
}),
|
|
1370
|
-
// Added 2026-04-15
|
|
1371
|
-
jira_maui_remix: createBooleanExperiment({
|
|
1372
|
-
productKeys: {
|
|
1365
|
+
confluence: 'cc-maui-experiment',
|
|
1373
1366
|
jira: 'jira_maui_remix'
|
|
1374
1367
|
},
|
|
1375
1368
|
param: 'isEnabled',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type EditorExperimentsConfig } from './experiments-config';
|
|
2
2
|
/**
|
|
3
3
|
* Check the value if an editor experiment.
|
|
4
4
|
* Internal method that is shared between expValEquals and expValEqualsNoExposure.
|
|
@@ -1434,12 +1434,6 @@ export declare const editorExperimentsConfig: {
|
|
|
1434
1434
|
productKeys?: ProductKeys;
|
|
1435
1435
|
typeGuard: IsBooleanType;
|
|
1436
1436
|
};
|
|
1437
|
-
jira_maui_remix: {
|
|
1438
|
-
defaultValue: boolean;
|
|
1439
|
-
param: string;
|
|
1440
|
-
productKeys?: ProductKeys;
|
|
1441
|
-
typeGuard: IsBooleanType;
|
|
1442
|
-
};
|
|
1443
1437
|
platform_editor_drag_handle_keyboard_a11y: {
|
|
1444
1438
|
defaultValue: boolean;
|
|
1445
1439
|
param: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type EditorExperimentsConfig } from './experiments-config';
|
|
2
2
|
/**
|
|
3
3
|
* Check the value if an editor experiment.
|
|
4
4
|
* Internal method that is shared between expValEquals and expValEqualsNoExposure.
|
|
@@ -1434,12 +1434,6 @@ export declare const editorExperimentsConfig: {
|
|
|
1434
1434
|
productKeys?: ProductKeys;
|
|
1435
1435
|
typeGuard: IsBooleanType;
|
|
1436
1436
|
};
|
|
1437
|
-
jira_maui_remix: {
|
|
1438
|
-
defaultValue: boolean;
|
|
1439
|
-
param: string;
|
|
1440
|
-
productKeys?: ProductKeys;
|
|
1441
|
-
typeGuard: IsBooleanType;
|
|
1442
|
-
};
|
|
1443
1437
|
platform_editor_drag_handle_keyboard_a11y: {
|
|
1444
1438
|
defaultValue: boolean;
|
|
1445
1439
|
param: string;
|
package/package.json
CHANGED