@atlaskit/tmp-editor-statsig 4.14.0 → 4.14.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 +8 -0
- package/dist/cjs/experiments.js +7 -1
- package/dist/es2019/experiments.js +7 -1
- package/dist/esm/experiments.js +7 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/editor-statsig-tmp
|
|
2
2
|
|
|
3
|
+
## 4.14.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#145233](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/145233)
|
|
8
|
+
[`bc70a53def230`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/bc70a53def230) -
|
|
9
|
+
Revert nullability checks on experiments package.
|
|
10
|
+
|
|
3
11
|
## 4.14.0
|
|
4
12
|
|
|
5
13
|
### Minor Changes
|
package/dist/cjs/experiments.js
CHANGED
|
@@ -64,9 +64,15 @@ function editorExperiment(experimentName, expectedExperimentValue) {
|
|
|
64
64
|
// This will be hit in the case of a test setting an override
|
|
65
65
|
return _setup._overrides[experimentName] === expectedExperimentValue;
|
|
66
66
|
}
|
|
67
|
+
if (experimentConfig === undefined) {
|
|
68
|
+
// Warning! If a product is improperly configured (ie. their editor packages are misaligned)
|
|
69
|
+
// it can cause the editor to crash here or if the experiment does not exist.
|
|
70
|
+
// We will definitely crash via any code path later in this function - this just makes the error explicit and clear.
|
|
71
|
+
throw new Error("Editor experiment configuration is not defined ".concat(experimentName, ". Likely the experiment does not exist or editor package versions are misaligned"));
|
|
72
|
+
}
|
|
67
73
|
if (!_setup._product) {
|
|
68
74
|
// This will be hit in the case of a product not having setup the editor experiment tooling
|
|
69
|
-
return
|
|
75
|
+
return experimentConfig.defaultValue === expectedExperimentValue;
|
|
70
76
|
}
|
|
71
77
|
|
|
72
78
|
// Typescript is complaining here about accessing the productKeys property
|
|
@@ -56,9 +56,15 @@ export function editorExperiment(experimentName, expectedExperimentValue, option
|
|
|
56
56
|
// This will be hit in the case of a test setting an override
|
|
57
57
|
return _overrides[experimentName] === expectedExperimentValue;
|
|
58
58
|
}
|
|
59
|
+
if (experimentConfig === undefined) {
|
|
60
|
+
// Warning! If a product is improperly configured (ie. their editor packages are misaligned)
|
|
61
|
+
// it can cause the editor to crash here or if the experiment does not exist.
|
|
62
|
+
// We will definitely crash via any code path later in this function - this just makes the error explicit and clear.
|
|
63
|
+
throw new Error(`Editor experiment configuration is not defined ${experimentName}. Likely the experiment does not exist or editor package versions are misaligned`);
|
|
64
|
+
}
|
|
59
65
|
if (!_product) {
|
|
60
66
|
// This will be hit in the case of a product not having setup the editor experiment tooling
|
|
61
|
-
return
|
|
67
|
+
return experimentConfig.defaultValue === expectedExperimentValue;
|
|
62
68
|
}
|
|
63
69
|
|
|
64
70
|
// Typescript is complaining here about accessing the productKeys property
|
package/dist/esm/experiments.js
CHANGED
|
@@ -57,9 +57,15 @@ export function editorExperiment(experimentName, expectedExperimentValue) {
|
|
|
57
57
|
// This will be hit in the case of a test setting an override
|
|
58
58
|
return _overrides[experimentName] === expectedExperimentValue;
|
|
59
59
|
}
|
|
60
|
+
if (experimentConfig === undefined) {
|
|
61
|
+
// Warning! If a product is improperly configured (ie. their editor packages are misaligned)
|
|
62
|
+
// it can cause the editor to crash here or if the experiment does not exist.
|
|
63
|
+
// We will definitely crash via any code path later in this function - this just makes the error explicit and clear.
|
|
64
|
+
throw new Error("Editor experiment configuration is not defined ".concat(experimentName, ". Likely the experiment does not exist or editor package versions are misaligned"));
|
|
65
|
+
}
|
|
60
66
|
if (!_product) {
|
|
61
67
|
// This will be hit in the case of a product not having setup the editor experiment tooling
|
|
62
|
-
return
|
|
68
|
+
return experimentConfig.defaultValue === expectedExperimentValue;
|
|
63
69
|
}
|
|
64
70
|
|
|
65
71
|
// Typescript is complaining here about accessing the productKeys property
|
package/package.json
CHANGED