@atlaskit/tmp-editor-statsig 1.3.1 → 1.3.2
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
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/editor-statsig-tmp
|
|
2
2
|
|
|
3
|
+
## 1.3.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#133128](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/133128)
|
|
8
|
+
[`5208be528f4e4`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/5208be528f4e4) -
|
|
9
|
+
EO-2024-44 Improved types and added export
|
|
10
|
+
|
|
3
11
|
## 1.3.1
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
package/dist/cjs/experiments.js
CHANGED
|
@@ -94,6 +94,7 @@ overrides) {
|
|
|
94
94
|
* ```
|
|
95
95
|
*/
|
|
96
96
|
function editorExperiment(experimentName, expectedExperimentValue) {
|
|
97
|
+
var _experimentConfig$pro;
|
|
97
98
|
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {
|
|
98
99
|
exposure: false
|
|
99
100
|
};
|
|
@@ -108,7 +109,7 @@ function editorExperiment(experimentName, expectedExperimentValue) {
|
|
|
108
109
|
}
|
|
109
110
|
|
|
110
111
|
// Typescript is complaining here about accessing the productKeys property
|
|
111
|
-
var experimentKey = experimentConfig.productKeys[_product];
|
|
112
|
+
var experimentKey = (_experimentConfig$pro = experimentConfig.productKeys) === null || _experimentConfig$pro === void 0 ? void 0 : _experimentConfig$pro[_product];
|
|
112
113
|
if (!experimentKey) {
|
|
113
114
|
// This will be hit in the case of an experiment not being set up for the product
|
|
114
115
|
return _experimentsConfig.editorExperimentsConfig[experimentName].defaultValue === expectedExperimentValue;
|
|
@@ -84,6 +84,7 @@ overrides) {
|
|
|
84
84
|
export function editorExperiment(experimentName, expectedExperimentValue, options = {
|
|
85
85
|
exposure: false
|
|
86
86
|
}) {
|
|
87
|
+
var _experimentConfig$pro;
|
|
87
88
|
const experimentConfig = editorExperimentsConfig[experimentName];
|
|
88
89
|
if (_overrides[experimentName] !== undefined) {
|
|
89
90
|
// This will be hit in the case of a test setting an override
|
|
@@ -95,7 +96,7 @@ export function editorExperiment(experimentName, expectedExperimentValue, option
|
|
|
95
96
|
}
|
|
96
97
|
|
|
97
98
|
// Typescript is complaining here about accessing the productKeys property
|
|
98
|
-
const experimentKey = experimentConfig.productKeys[_product];
|
|
99
|
+
const experimentKey = (_experimentConfig$pro = experimentConfig.productKeys) === null || _experimentConfig$pro === void 0 ? void 0 : _experimentConfig$pro[_product];
|
|
99
100
|
if (!experimentKey) {
|
|
100
101
|
// This will be hit in the case of an experiment not being set up for the product
|
|
101
102
|
return editorExperimentsConfig[experimentName].defaultValue === expectedExperimentValue;
|
package/dist/esm/experiments.js
CHANGED
|
@@ -86,6 +86,7 @@ overrides) {
|
|
|
86
86
|
* ```
|
|
87
87
|
*/
|
|
88
88
|
export function editorExperiment(experimentName, expectedExperimentValue) {
|
|
89
|
+
var _experimentConfig$pro;
|
|
89
90
|
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {
|
|
90
91
|
exposure: false
|
|
91
92
|
};
|
|
@@ -100,7 +101,7 @@ export function editorExperiment(experimentName, expectedExperimentValue) {
|
|
|
100
101
|
}
|
|
101
102
|
|
|
102
103
|
// Typescript is complaining here about accessing the productKeys property
|
|
103
|
-
var experimentKey = experimentConfig.productKeys[_product];
|
|
104
|
+
var experimentKey = (_experimentConfig$pro = experimentConfig.productKeys) === null || _experimentConfig$pro === void 0 ? void 0 : _experimentConfig$pro[_product];
|
|
104
105
|
if (!experimentKey) {
|
|
105
106
|
// This will be hit in the case of an experiment not being set up for the product
|
|
106
107
|
return editorExperimentsConfig[experimentName].defaultValue === expectedExperimentValue;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlaskit/tmp-editor-statsig/experiments-config",
|
|
3
|
+
"main": "../dist/cjs/experiments-config.js",
|
|
4
|
+
"module": "../dist/esm/experiments-config.js",
|
|
5
|
+
"module:es2019": "../dist/es2019/experiments-config.js",
|
|
6
|
+
"types": "../dist/types/experiments-config.d.ts",
|
|
7
|
+
"typesVersions": {
|
|
8
|
+
">=4.5 <5.4": {
|
|
9
|
+
"*": [
|
|
10
|
+
"../dist/types-ts4.5/experiments-config.d.ts"
|
|
11
|
+
]
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/tmp-editor-statsig",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.2",
|
|
4
4
|
"description": "Temp plugin to ease use of statsig feature flags until platform feature flags are available",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
"atlaskit:src": "src/index.ts",
|
|
33
33
|
"af:exports": {
|
|
34
34
|
"./experiments": "./src/experiments.ts",
|
|
35
|
+
"./experiments-config": "./src/experiments-config.ts",
|
|
35
36
|
"./test-runner": "./src/test-runner.ts"
|
|
36
37
|
},
|
|
37
38
|
"dependencies": {
|