@atlaskit/react-ufo 4.5.10 → 4.5.12

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,19 @@
1
1
  # @atlaskit/ufo-interaction-ignore
2
2
 
3
+ ## 4.5.12
4
+
5
+ ### Patch Changes
6
+
7
+ - [`2c7a56c2db1f8`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/2c7a56c2db1f8) -
8
+ cleanup platform_ufo_no_vc_on_aborted
9
+
10
+ ## 4.5.11
11
+
12
+ ### Patch Changes
13
+
14
+ - [`4b87ec99869df`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4b87ec99869df) -
15
+ Added data-vc information to unknown interactions
16
+
3
17
  ## 4.5.10
4
18
 
5
19
  ### Patch Changes
@@ -8,7 +8,6 @@ exports.default = void 0;
8
8
  var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
9
9
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
10
10
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
11
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
12
11
  var _config = require("../../config");
13
12
  var _interactionMetrics = require("../../interaction-metrics");
14
13
  var _getInteractionStatus = _interopRequireDefault(require("./get-interaction-status"));
@@ -63,13 +62,6 @@ function _getVCMetrics() {
63
62
  }
64
63
  return _context.abrupt("return", {});
65
64
  case 12:
66
- if (!(!shouldReportVCMetrics && (0, _platformFeatureFlags.fg)('platform_ufo_no_vc_on_aborted'))) {
67
- _context.next = 15;
68
- break;
69
- }
70
- observer.stop(interaction.ufoName);
71
- return _context.abrupt("return", {});
72
- case 15:
73
65
  isSSREnabled = interaction.type === 'page_load' && ((config === null || config === void 0 ? void 0 : config.ssr) || (config === null || config === void 0 || (_config$vc$ssrWhiteli = config.vc.ssrWhitelist) === null || _config$vc$ssrWhiteli === void 0 ? void 0 : _config$vc$ssrWhiteli.includes(interaction.ufoName)));
74
66
  ssr = interaction.type === 'page_load' && isSSREnabled ? {
75
67
  ssr: (0, _getSsrDoneTimeValue.default)(config)
@@ -77,7 +69,7 @@ function _getVCMetrics() {
77
69
  _interactionMetrics.postInteractionLog.setVCObserverSSRConfig(ssr);
78
70
  tti = (_interaction$apdex = interaction.apdex) === null || _interaction$apdex === void 0 || (_interaction$apdex = _interaction$apdex[0]) === null || _interaction$apdex === void 0 ? void 0 : _interaction$apdex.stopTime;
79
71
  prefix = 'ufo';
80
- _context.next = 22;
72
+ _context.next = 19;
81
73
  return observer.getVCResult(_objectSpread(_objectSpread({
82
74
  start: interaction.start,
83
75
  stop: interaction.end,
@@ -92,7 +84,7 @@ function _getVCMetrics() {
92
84
  }, ssr), {}, {
93
85
  include3p: include3p
94
86
  }));
95
- case 22:
87
+ case 19:
96
88
  result = _context.sent;
97
89
  observer.stop(interaction.ufoName);
98
90
  if (!include3p) {
@@ -105,15 +97,15 @@ function _getVCMetrics() {
105
97
  return revision === mostRecentVCRevision;
106
98
  });
107
99
  if (!(!shouldReportVCMetrics || !(mostRecentVCRevisionPayload !== null && mostRecentVCRevisionPayload !== void 0 && mostRecentVCRevisionPayload.clean))) {
108
- _context.next = 29;
100
+ _context.next = 26;
109
101
  break;
110
102
  }
111
103
  return _context.abrupt("return", result);
112
- case 29:
104
+ case 26:
113
105
  return _context.abrupt("return", _objectSpread(_objectSpread({}, result), {}, {
114
106
  'metric:vc90': mostRecentVCRevisionPayload['metric:vc90']
115
107
  }));
116
- case 30:
108
+ case 27:
117
109
  case "end":
118
110
  return _context.stop();
119
111
  }
@@ -25,6 +25,8 @@ function getTestIdName(memoizedProps) {
25
25
  return "[data-testid=".concat(memoizedProps['data-testid'], "]");
26
26
  } else if (memoizedProps['data-test-id']) {
27
27
  return "[data-test-id=".concat(memoizedProps['data-testid'], "]");
28
+ } else if (memoizedProps['data-vc']) {
29
+ return "[data-vc=".concat(memoizedProps['data-vc'], "]");
28
30
  }
29
31
  return null;
30
32
  }
@@ -1,4 +1,3 @@
1
- import { fg } from '@atlaskit/platform-feature-flags';
2
1
  import { getConfig, getMostRecentVCRevision } from '../../config';
3
2
  import { postInteractionLog } from '../../interaction-metrics';
4
3
  import getInteractionStatus from './get-interaction-status';
@@ -22,10 +21,6 @@ async function getVCMetrics(interaction, include3p = false) {
22
21
  if (!observer) {
23
22
  return {};
24
23
  }
25
- if (!shouldReportVCMetrics && fg('platform_ufo_no_vc_on_aborted')) {
26
- observer.stop(interaction.ufoName);
27
- return {};
28
- }
29
24
  const isSSREnabled = interaction.type === 'page_load' && ((config === null || config === void 0 ? void 0 : config.ssr) || (config === null || config === void 0 ? void 0 : (_config$vc$ssrWhiteli = config.vc.ssrWhitelist) === null || _config$vc$ssrWhiteli === void 0 ? void 0 : _config$vc$ssrWhiteli.includes(interaction.ufoName)));
30
25
  const ssr = interaction.type === 'page_load' && isSSREnabled ? {
31
26
  ssr: getSSRDoneTimeValue(config)
@@ -12,6 +12,8 @@ function getTestIdName(memoizedProps) {
12
12
  return `[data-testid=${memoizedProps['data-testid']}]`;
13
13
  } else if (memoizedProps['data-test-id']) {
14
14
  return `[data-test-id=${memoizedProps['data-testid']}]`;
15
+ } else if (memoizedProps['data-vc']) {
16
+ return `[data-vc=${memoizedProps['data-vc']}]`;
15
17
  }
16
18
  return null;
17
19
  }
@@ -3,7 +3,6 @@ import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
3
3
  import _regeneratorRuntime from "@babel/runtime/regenerator";
4
4
  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; }
5
5
  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; }
6
- import { fg } from '@atlaskit/platform-feature-flags';
7
6
  import { getConfig, getMostRecentVCRevision } from '../../config';
8
7
  import { postInteractionLog } from '../../interaction-metrics';
9
8
  import getInteractionStatus from './get-interaction-status';
@@ -56,13 +55,6 @@ function _getVCMetrics() {
56
55
  }
57
56
  return _context.abrupt("return", {});
58
57
  case 12:
59
- if (!(!shouldReportVCMetrics && fg('platform_ufo_no_vc_on_aborted'))) {
60
- _context.next = 15;
61
- break;
62
- }
63
- observer.stop(interaction.ufoName);
64
- return _context.abrupt("return", {});
65
- case 15:
66
58
  isSSREnabled = interaction.type === 'page_load' && ((config === null || config === void 0 ? void 0 : config.ssr) || (config === null || config === void 0 || (_config$vc$ssrWhiteli = config.vc.ssrWhitelist) === null || _config$vc$ssrWhiteli === void 0 ? void 0 : _config$vc$ssrWhiteli.includes(interaction.ufoName)));
67
59
  ssr = interaction.type === 'page_load' && isSSREnabled ? {
68
60
  ssr: getSSRDoneTimeValue(config)
@@ -70,7 +62,7 @@ function _getVCMetrics() {
70
62
  postInteractionLog.setVCObserverSSRConfig(ssr);
71
63
  tti = (_interaction$apdex = interaction.apdex) === null || _interaction$apdex === void 0 || (_interaction$apdex = _interaction$apdex[0]) === null || _interaction$apdex === void 0 ? void 0 : _interaction$apdex.stopTime;
72
64
  prefix = 'ufo';
73
- _context.next = 22;
65
+ _context.next = 19;
74
66
  return observer.getVCResult(_objectSpread(_objectSpread({
75
67
  start: interaction.start,
76
68
  stop: interaction.end,
@@ -85,7 +77,7 @@ function _getVCMetrics() {
85
77
  }, ssr), {}, {
86
78
  include3p: include3p
87
79
  }));
88
- case 22:
80
+ case 19:
89
81
  result = _context.sent;
90
82
  observer.stop(interaction.ufoName);
91
83
  if (!include3p) {
@@ -98,15 +90,15 @@ function _getVCMetrics() {
98
90
  return revision === mostRecentVCRevision;
99
91
  });
100
92
  if (!(!shouldReportVCMetrics || !(mostRecentVCRevisionPayload !== null && mostRecentVCRevisionPayload !== void 0 && mostRecentVCRevisionPayload.clean))) {
101
- _context.next = 29;
93
+ _context.next = 26;
102
94
  break;
103
95
  }
104
96
  return _context.abrupt("return", result);
105
- case 29:
97
+ case 26:
106
98
  return _context.abrupt("return", _objectSpread(_objectSpread({}, result), {}, {
107
99
  'metric:vc90': mostRecentVCRevisionPayload['metric:vc90']
108
100
  }));
109
- case 30:
101
+ case 27:
110
102
  case "end":
111
103
  return _context.stop();
112
104
  }
@@ -18,6 +18,8 @@ function getTestIdName(memoizedProps) {
18
18
  return "[data-testid=".concat(memoizedProps['data-testid'], "]");
19
19
  } else if (memoizedProps['data-test-id']) {
20
20
  return "[data-test-id=".concat(memoizedProps['data-testid'], "]");
21
+ } else if (memoizedProps['data-vc']) {
22
+ return "[data-vc=".concat(memoizedProps['data-vc'], "]");
21
23
  }
22
24
  return null;
23
25
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/react-ufo",
3
- "version": "4.5.10",
3
+ "version": "4.5.12",
4
4
  "description": "Parts of React UFO that are publicly available",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -99,9 +99,6 @@
99
99
  "platform_ufo_abort_timestamp_by_revision": {
100
100
  "type": "boolean"
101
101
  },
102
- "platform_ufo_no_vc_on_aborted": {
103
- "type": "boolean"
104
- },
105
102
  "ufo_payload_use_idle_callback": {
106
103
  "type": "boolean"
107
104
  },