@atlaskit/react-ufo 4.0.1 → 4.0.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/ufo-interaction-ignore
2
2
 
3
+ ## 4.0.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#185693](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/185693)
8
+ [`c8e0df9e675c4`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c8e0df9e675c4) -
9
+ FG cleanup platform_ufo_post_interaction_most_recent_vc_rev
10
+
3
11
  ## 4.0.1
4
12
 
5
13
  ### Patch Changes
@@ -7,7 +7,6 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.default = void 0;
8
8
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
9
  var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
10
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
11
10
  var _coinflip = _interopRequireDefault(require("../coinflip"));
12
11
  var _config = require("../config");
13
12
  var _utils = require("../create-payload/common/utils");
@@ -115,7 +114,7 @@ function transformReactProfilerTimings(reactProfilerTimings) {
115
114
  return (0, _toConsumableArray2.default)(reactProfilerTimingsMap.values());
116
115
  }
117
116
  function createPostInteractionLogPayload(_ref2) {
118
- var _window$location;
117
+ var _getMostRecentVCRevis, _window$location;
119
118
  var lastInteractionFinish = _ref2.lastInteractionFinish,
120
119
  reactProfilerTimings = _ref2.reactProfilerTimings,
121
120
  lastInteractionFinishVCResult = _ref2.lastInteractionFinishVCResult,
@@ -154,7 +153,7 @@ function createPostInteractionLogPayload(_ref2) {
154
153
  var lastInteractionFinishStart = Math.round(lastInteractionFinish.start);
155
154
  var lastInteractionFinishEnd = Math.round(lastInteractionFinish.end);
156
155
  var lastInteractionFinishTTAI = Math.round(lastInteractionFinish.end - lastInteractionFinish.start);
157
- var mostRecentVCRevision = (0, _platformFeatureFlags.fg)('platform_ufo_post_interaction_most_recent_vc_rev') ? (0, _config.getMostRecentVCRevision)(lastInteractionFinish.ufoName) : _config.DEFAULT_TTVC_REVISION;
156
+ var mostRecentVCRevision = (_getMostRecentVCRevis = (0, _config.getMostRecentVCRevision)(lastInteractionFinish.ufoName)) !== null && _getMostRecentVCRevis !== void 0 ? _getMostRecentVCRevis : _config.DEFAULT_TTVC_REVISION;
158
157
  var lastInteractionFinishVC90 = null;
159
158
  var lastInteractionFinishVCClean = false;
160
159
  var lastInteractionFinishVCRev = lastInteractionFinishVCResult === null || lastInteractionFinishVCResult === void 0 ? void 0 : lastInteractionFinishVCResult['ufo:vc:rev'];
@@ -1,4 +1,3 @@
1
- import { fg } from '@atlaskit/platform-feature-flags';
2
1
  import coinflip from '../coinflip';
3
2
  import { DEFAULT_TTVC_REVISION, getConfig, getMostRecentVCRevision, getPostInteractionRate } from '../config';
4
3
  import { isSegmentLabel, sanitizeUfoName } from '../create-payload/common/utils';
@@ -106,7 +105,7 @@ function createPostInteractionLogPayload({
106
105
  lastInteractionFinishVCResult,
107
106
  postInteractionFinishVCResult
108
107
  }) {
109
- var _window$location;
108
+ var _getMostRecentVCRevis, _window$location;
110
109
  const config = getConfig();
111
110
  if (!config) {
112
111
  throw Error('UFO Configuration not provided');
@@ -139,7 +138,7 @@ function createPostInteractionLogPayload({
139
138
  const lastInteractionFinishStart = Math.round(lastInteractionFinish.start);
140
139
  const lastInteractionFinishEnd = Math.round(lastInteractionFinish.end);
141
140
  const lastInteractionFinishTTAI = Math.round(lastInteractionFinish.end - lastInteractionFinish.start);
142
- const mostRecentVCRevision = fg('platform_ufo_post_interaction_most_recent_vc_rev') ? getMostRecentVCRevision(lastInteractionFinish.ufoName) : DEFAULT_TTVC_REVISION;
141
+ const mostRecentVCRevision = (_getMostRecentVCRevis = getMostRecentVCRevision(lastInteractionFinish.ufoName)) !== null && _getMostRecentVCRevis !== void 0 ? _getMostRecentVCRevis : DEFAULT_TTVC_REVISION;
143
142
  let lastInteractionFinishVC90 = null;
144
143
  let lastInteractionFinishVCClean = false;
145
144
  const lastInteractionFinishVCRev = lastInteractionFinishVCResult === null || lastInteractionFinishVCResult === void 0 ? void 0 : lastInteractionFinishVCResult['ufo:vc:rev'];
@@ -2,7 +2,6 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
3
3
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
4
4
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
5
- import { fg } from '@atlaskit/platform-feature-flags';
6
5
  import coinflip from '../coinflip';
7
6
  import { DEFAULT_TTVC_REVISION, getConfig, getMostRecentVCRevision, getPostInteractionRate } from '../config';
8
7
  import { isSegmentLabel, sanitizeUfoName } from '../create-payload/common/utils';
@@ -108,7 +107,7 @@ function transformReactProfilerTimings(reactProfilerTimings) {
108
107
  return _toConsumableArray(reactProfilerTimingsMap.values());
109
108
  }
110
109
  function createPostInteractionLogPayload(_ref2) {
111
- var _window$location;
110
+ var _getMostRecentVCRevis, _window$location;
112
111
  var lastInteractionFinish = _ref2.lastInteractionFinish,
113
112
  reactProfilerTimings = _ref2.reactProfilerTimings,
114
113
  lastInteractionFinishVCResult = _ref2.lastInteractionFinishVCResult,
@@ -147,7 +146,7 @@ function createPostInteractionLogPayload(_ref2) {
147
146
  var lastInteractionFinishStart = Math.round(lastInteractionFinish.start);
148
147
  var lastInteractionFinishEnd = Math.round(lastInteractionFinish.end);
149
148
  var lastInteractionFinishTTAI = Math.round(lastInteractionFinish.end - lastInteractionFinish.start);
150
- var mostRecentVCRevision = fg('platform_ufo_post_interaction_most_recent_vc_rev') ? getMostRecentVCRevision(lastInteractionFinish.ufoName) : DEFAULT_TTVC_REVISION;
149
+ var mostRecentVCRevision = (_getMostRecentVCRevis = getMostRecentVCRevision(lastInteractionFinish.ufoName)) !== null && _getMostRecentVCRevis !== void 0 ? _getMostRecentVCRevis : DEFAULT_TTVC_REVISION;
151
150
  var lastInteractionFinishVC90 = null;
152
151
  var lastInteractionFinishVCClean = false;
153
152
  var lastInteractionFinishVCRev = lastInteractionFinishVCResult === null || lastInteractionFinishVCResult === void 0 ? void 0 : lastInteractionFinishVCResult['ufo:vc:rev'];
@@ -27,7 +27,7 @@ type SelectorConfig = {
27
27
  type Rates = {
28
28
  readonly [key: string]: number;
29
29
  };
30
- export type TTVCRevisions = 'fy25.01' | 'fy25.02' | 'fy25.03';
30
+ export type TTVCRevision = 'fy25.01' | 'fy25.02' | 'fy25.03';
31
31
  export declare const DEFAULT_TTVC_REVISION = "fy25.03";
32
32
  export type Config = {
33
33
  readonly enabled?: boolean;
@@ -92,8 +92,8 @@ export type Config = {
92
92
  * i.e. every element for all `byExperience` entry configs should exist in the `all` config
93
93
  */
94
94
  readonly enabledVCRevisions?: {
95
- all: readonly TTVCRevisions[];
96
- byExperience?: Record<string, readonly TTVCRevisions[]>;
95
+ all: readonly TTVCRevision[];
96
+ byExperience?: Record<string, readonly TTVCRevision[]>;
97
97
  };
98
98
  };
99
99
  readonly postInteractionLog?: {
@@ -118,9 +118,9 @@ export type Config = {
118
118
  };
119
119
  export declare function setUFOConfig(newConfig: Config): void;
120
120
  export declare function getConfig(): Config | undefined;
121
- export declare function getEnabledVCRevisions(experienceKey?: string): readonly TTVCRevisions[];
122
- export declare function isVCRevisionEnabled(revision: TTVCRevisions, experienceKey?: string): boolean;
123
- export declare function getMostRecentVCRevision(experienceKey?: string): TTVCRevisions;
121
+ export declare function getEnabledVCRevisions(experienceKey?: string): readonly TTVCRevision[];
122
+ export declare function isVCRevisionEnabled(revision: TTVCRevision, experienceKey?: string): boolean;
123
+ export declare function getMostRecentVCRevision(experienceKey?: string): TTVCRevision;
124
124
  export declare function getInteractionRate(name: string, interactionKind: InteractionKind): number;
125
125
  export declare function getExperimentalInteractionRate(name: string, interactionType: InteractionType): number;
126
126
  export declare function getPostInteractionRate(name: string, interactionType: InteractionType): number;
@@ -27,7 +27,7 @@ type SelectorConfig = {
27
27
  type Rates = {
28
28
  readonly [key: string]: number;
29
29
  };
30
- export type TTVCRevisions = 'fy25.01' | 'fy25.02' | 'fy25.03';
30
+ export type TTVCRevision = 'fy25.01' | 'fy25.02' | 'fy25.03';
31
31
  export declare const DEFAULT_TTVC_REVISION = "fy25.03";
32
32
  export type Config = {
33
33
  readonly enabled?: boolean;
@@ -92,8 +92,8 @@ export type Config = {
92
92
  * i.e. every element for all `byExperience` entry configs should exist in the `all` config
93
93
  */
94
94
  readonly enabledVCRevisions?: {
95
- all: readonly TTVCRevisions[];
96
- byExperience?: Record<string, readonly TTVCRevisions[]>;
95
+ all: readonly TTVCRevision[];
96
+ byExperience?: Record<string, readonly TTVCRevision[]>;
97
97
  };
98
98
  };
99
99
  readonly postInteractionLog?: {
@@ -118,9 +118,9 @@ export type Config = {
118
118
  };
119
119
  export declare function setUFOConfig(newConfig: Config): void;
120
120
  export declare function getConfig(): Config | undefined;
121
- export declare function getEnabledVCRevisions(experienceKey?: string): readonly TTVCRevisions[];
122
- export declare function isVCRevisionEnabled(revision: TTVCRevisions, experienceKey?: string): boolean;
123
- export declare function getMostRecentVCRevision(experienceKey?: string): TTVCRevisions;
121
+ export declare function getEnabledVCRevisions(experienceKey?: string): readonly TTVCRevision[];
122
+ export declare function isVCRevisionEnabled(revision: TTVCRevision, experienceKey?: string): boolean;
123
+ export declare function getMostRecentVCRevision(experienceKey?: string): TTVCRevision;
124
124
  export declare function getInteractionRate(name: string, interactionKind: InteractionKind): number;
125
125
  export declare function getExperimentalInteractionRate(name: string, interactionType: InteractionType): number;
126
126
  export declare function getPostInteractionRate(name: string, interactionType: InteractionType): number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/react-ufo",
3
- "version": "4.0.1",
3
+ "version": "4.0.2",
4
4
  "description": "Parts of React UFO that are publicly available",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -182,9 +182,6 @@
182
182
  "platform_ufo_enable_interactivity_jsm": {
183
183
  "type": "boolean"
184
184
  },
185
- "platform_ufo_post_interaction_most_recent_vc_rev": {
186
- "type": "boolean"
187
- },
188
185
  "platform_ufo_ignore_extra_attributes": {
189
186
  "type": "boolean"
190
187
  },