@atlaskit/tmp-editor-statsig 12.21.0 → 12.22.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 CHANGED
@@ -1,5 +1,12 @@
1
1
  # @atlaskit/editor-statsig-tmp
2
2
 
3
+ ## 12.22.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`dfbeee51d9d4a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/dfbeee51d9d4a) -
8
+ Registers Editor Experiment checks with UFOs gate tracking
9
+
3
10
  ## 12.21.0
4
11
 
5
12
  ### Minor Changes
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.expValEqualsInternal = expValEqualsInternal;
8
8
  var _featureGateJsClient = _interopRequireDefault(require("@atlaskit/feature-gate-js-client"));
9
+ var _featureFlagsAccessed = require("@atlaskit/react-ufo/feature-flags-accessed");
9
10
  var _setup = require("./setup");
10
11
  /**
11
12
  * Check the value if an editor experiment.
@@ -39,5 +40,11 @@ function expValEqualsInternal(experimentName, experimentParam, experimentExpecte
39
40
  var experimentValue = _featureGateJsClient.default.getExperimentValue(experimentName, experimentParam, experimentDefaultValue, {
40
41
  fireExperimentExposure: experimentExposure
41
42
  });
43
+ if (
44
+ // eslint-disable-next-line @atlaskit/platform/use-recommended-utils
45
+ _featureGateJsClient.default.getExperimentValue('cc_editor_experiments_ufo_gate_reporting', 'isEnabled', false)) {
46
+ // Duplicated from /confluence/next/packages/feature-experiments/src/index.ts
47
+ (0, _featureFlagsAccessed.addFeatureFlagAccessed)("".concat(experimentName, ":").concat(experimentParam), experimentValue);
48
+ }
42
49
  return experimentValue === experimentExpectedValue;
43
50
  }
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.editorExperiment = editorExperiment;
8
8
  exports.unstable_editorExperimentParam = unstable_editorExperimentParam;
9
9
  var _featureGateJsClient = _interopRequireDefault(require("@atlaskit/feature-gate-js-client"));
10
+ var _featureFlagsAccessed = require("@atlaskit/react-ufo/feature-flags-accessed");
10
11
  var _experimentsConfig = require("./experiments-config");
11
12
  var _setup = require("./setup");
12
13
  /* eslint-disable @atlaskit/editor/no-re-export */
@@ -98,6 +99,13 @@ function editorExperiment(experimentName, expectedExperimentValue) {
98
99
  typeGuard: experimentConfig.typeGuard,
99
100
  fireExperimentExposure: options.exposure
100
101
  });
102
+ if (
103
+ // When cleaning this gate up -- `calling where the experiments have the product key set`
104
+ // in __tests__/experiments should be updated (as it's had the count bumped to include these).
105
+ // eslint-disable-next-line @atlaskit/platform/use-recommended-utils
106
+ _featureGateJsClient.default.getExperimentValue('cc_editor_experiments_ufo_gate_reporting', 'isEnabled', false)) {
107
+ (0, _featureFlagsAccessed.addFeatureFlagAccessed)("".concat(experimentName, ":").concat(experimentConfig.param), experimentValue);
108
+ }
101
109
  return expectedExperimentValue === experimentValue;
102
110
  }
103
111
  // type Unstable_EditorExperimentParams = {};
@@ -1,4 +1,5 @@
1
1
  import FeatureGates from '@atlaskit/feature-gate-js-client';
2
+ import { addFeatureFlagAccessed } from '@atlaskit/react-ufo/feature-flags-accessed';
2
3
  import { _overrides } from './setup';
3
4
 
4
5
  /**
@@ -33,5 +34,11 @@ export function expValEqualsInternal(experimentName, experimentParam, experiment
33
34
  const experimentValue = FeatureGates.getExperimentValue(experimentName, experimentParam, experimentDefaultValue, {
34
35
  fireExperimentExposure: experimentExposure
35
36
  });
37
+ if (
38
+ // eslint-disable-next-line @atlaskit/platform/use-recommended-utils
39
+ FeatureGates.getExperimentValue('cc_editor_experiments_ufo_gate_reporting', 'isEnabled', false)) {
40
+ // Duplicated from /confluence/next/packages/feature-experiments/src/index.ts
41
+ addFeatureFlagAccessed(`${experimentName}:${experimentParam}`, experimentValue);
42
+ }
36
43
  return experimentValue === experimentExpectedValue;
37
44
  }
@@ -2,6 +2,7 @@
2
2
  // Entry file in package.json
3
3
 
4
4
  import FeatureGates from '@atlaskit/feature-gate-js-client';
5
+ import { addFeatureFlagAccessed } from '@atlaskit/react-ufo/feature-flags-accessed';
5
6
  import { editorExperimentsConfig } from './experiments-config';
6
7
  import { _overrides, _paramOverrides, _product } from './setup';
7
8
 
@@ -90,6 +91,13 @@ export function editorExperiment(experimentName, expectedExperimentValue, option
90
91
  typeGuard: experimentConfig.typeGuard,
91
92
  fireExperimentExposure: options.exposure
92
93
  });
94
+ if (
95
+ // When cleaning this gate up -- `calling where the experiments have the product key set`
96
+ // in __tests__/experiments should be updated (as it's had the count bumped to include these).
97
+ // eslint-disable-next-line @atlaskit/platform/use-recommended-utils
98
+ FeatureGates.getExperimentValue('cc_editor_experiments_ufo_gate_reporting', 'isEnabled', false)) {
99
+ addFeatureFlagAccessed(`${experimentName}:${experimentConfig.param}`, experimentValue);
100
+ }
93
101
  return expectedExperimentValue === experimentValue;
94
102
  }
95
103
  // type Unstable_EditorExperimentParams = {};
@@ -1,4 +1,5 @@
1
1
  import FeatureGates from '@atlaskit/feature-gate-js-client';
2
+ import { addFeatureFlagAccessed } from '@atlaskit/react-ufo/feature-flags-accessed';
2
3
  import { _overrides } from './setup';
3
4
 
4
5
  /**
@@ -33,5 +34,11 @@ export function expValEqualsInternal(experimentName, experimentParam, experiment
33
34
  var experimentValue = FeatureGates.getExperimentValue(experimentName, experimentParam, experimentDefaultValue, {
34
35
  fireExperimentExposure: experimentExposure
35
36
  });
37
+ if (
38
+ // eslint-disable-next-line @atlaskit/platform/use-recommended-utils
39
+ FeatureGates.getExperimentValue('cc_editor_experiments_ufo_gate_reporting', 'isEnabled', false)) {
40
+ // Duplicated from /confluence/next/packages/feature-experiments/src/index.ts
41
+ addFeatureFlagAccessed("".concat(experimentName, ":").concat(experimentParam), experimentValue);
42
+ }
36
43
  return experimentValue === experimentExpectedValue;
37
44
  }
@@ -2,6 +2,7 @@
2
2
  // Entry file in package.json
3
3
 
4
4
  import FeatureGates from '@atlaskit/feature-gate-js-client';
5
+ import { addFeatureFlagAccessed } from '@atlaskit/react-ufo/feature-flags-accessed';
5
6
  import { editorExperimentsConfig } from './experiments-config';
6
7
  import { _overrides, _paramOverrides, _product } from './setup';
7
8
 
@@ -91,6 +92,13 @@ export function editorExperiment(experimentName, expectedExperimentValue) {
91
92
  typeGuard: experimentConfig.typeGuard,
92
93
  fireExperimentExposure: options.exposure
93
94
  });
95
+ if (
96
+ // When cleaning this gate up -- `calling where the experiments have the product key set`
97
+ // in __tests__/experiments should be updated (as it's had the count bumped to include these).
98
+ // eslint-disable-next-line @atlaskit/platform/use-recommended-utils
99
+ FeatureGates.getExperimentValue('cc_editor_experiments_ufo_gate_reporting', 'isEnabled', false)) {
100
+ addFeatureFlagAccessed("".concat(experimentName, ":").concat(experimentConfig.param), experimentValue);
101
+ }
94
102
  return expectedExperimentValue === experimentValue;
95
103
  }
96
104
  // type Unstable_EditorExperimentParams = {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/tmp-editor-statsig",
3
- "version": "12.21.0",
3
+ "version": "12.22.0",
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",
@@ -33,6 +33,7 @@
33
33
  "atlaskit:src": "src/index.ts",
34
34
  "dependencies": {
35
35
  "@atlaskit/feature-gate-js-client": "^5.5.0",
36
+ "@atlaskit/react-ufo": "^4.7.0",
36
37
  "@babel/runtime": "^7.0.0"
37
38
  },
38
39
  "peerDependencies": {