@atlaskit/react-ufo 5.6.0 → 5.7.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 +14 -0
- package/dist/cjs/set-terminal-error/index.js +2 -2
- package/dist/cjs/vc/vc-observer-new/window-event-observer/index.js +1 -4
- package/dist/es2019/set-terminal-error/index.js +2 -2
- package/dist/es2019/vc/vc-observer-new/window-event-observer/index.js +1 -4
- package/dist/esm/set-terminal-error/index.js +2 -2
- package/dist/esm/vc/vc-observer-new/window-event-observer/index.js +1 -4
- package/dist/types/set-terminal-error/index.d.ts +1 -1
- package/dist/types-ts4.5/set-terminal-error/index.d.ts +1 -1
- package/package.json +1 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/ufo-interaction-ignore
|
|
2
2
|
|
|
3
|
+
## 5.7.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`b516e549d5e91`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b516e549d5e91) -
|
|
8
|
+
Allows statusCode to be provided for terminal error metric
|
|
9
|
+
|
|
10
|
+
## 5.6.1
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- [`aa542ab5bad47`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/aa542ab5bad47) -
|
|
15
|
+
Remove platform_ufo_detect_container_scroll and always observe container scrolls
|
|
16
|
+
|
|
3
17
|
## 5.6.0
|
|
4
18
|
|
|
5
19
|
### Minor Changes
|
|
@@ -50,7 +50,7 @@ var getErrorTraceId = function getErrorTraceId(error) {
|
|
|
50
50
|
return isErrorObject(error) && 'traceId' in error && typeof error.traceId === 'string' ? error.traceId : undefined;
|
|
51
51
|
};
|
|
52
52
|
function setTerminalError(error, additionalAttributes, labelStack) {
|
|
53
|
-
var _error$message, _getActiveTrace$trace, _getActiveTrace, _activeInteraction$uf, _activeInteraction$id, _activeInteraction$ty, _PreviousInteractionL, _PreviousInteractionL2, _PreviousInteractionL3, _UFORouteName$current;
|
|
53
|
+
var _error$message, _additionalAttributes, _getActiveTrace$trace, _getActiveTrace, _activeInteraction$uf, _activeInteraction$id, _activeInteraction$ty, _PreviousInteractionL, _PreviousInteractionL2, _PreviousInteractionL3, _UFORouteName$current;
|
|
54
54
|
if (additionalAttributes !== null && additionalAttributes !== void 0 && additionalAttributes.isClientNetworkError) {
|
|
55
55
|
// Exclude client network errors from being reported to UFO
|
|
56
56
|
return;
|
|
@@ -63,7 +63,7 @@ function setTerminalError(error, additionalAttributes, labelStack) {
|
|
|
63
63
|
timestamp: currentTime
|
|
64
64
|
};
|
|
65
65
|
var errorData = (0, _platformFeatureFlags.fg)('platform_ufo_terminal_errors_fix_missing_data') ? _objectSpread(_objectSpread({}, baseErrorData), {}, {
|
|
66
|
-
statusCode: getErrorStatusCode(error),
|
|
66
|
+
statusCode: (_additionalAttributes = additionalAttributes === null || additionalAttributes === void 0 ? void 0 : additionalAttributes.statusCode) !== null && _additionalAttributes !== void 0 ? _additionalAttributes : getErrorStatusCode(error),
|
|
67
67
|
// Fallback to traceId from error object if it exists (e.g. FetchError)
|
|
68
68
|
traceId: (_getActiveTrace$trace = (_getActiveTrace = (0, _experienceTraceIdContext.getActiveTrace)()) === null || _getActiveTrace === void 0 ? void 0 : _getActiveTrace.traceId) !== null && _getActiveTrace$trace !== void 0 ? _getActiveTrace$trace : getErrorTraceId(error),
|
|
69
69
|
teamName: additionalAttributes === null || additionalAttributes === void 0 ? void 0 : additionalAttributes.teamName,
|
|
@@ -9,7 +9,6 @@ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/cl
|
|
|
9
9
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
10
10
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
11
|
var _bindEventListener = require("bind-event-listener");
|
|
12
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
13
12
|
var WindowEventObserver = exports.default = /*#__PURE__*/function () {
|
|
14
13
|
function WindowEventObserver(opts) {
|
|
15
14
|
(0, _classCallCheck2.default)(this, WindowEventObserver);
|
|
@@ -78,9 +77,7 @@ var WindowEventObserver = exports.default = /*#__PURE__*/function () {
|
|
|
78
77
|
this.bindEvent('scroll');
|
|
79
78
|
this.bindEvent('keydown');
|
|
80
79
|
this.bindEvent('resize');
|
|
81
|
-
|
|
82
|
-
this.bindCaptureScrollEvent();
|
|
83
|
-
}
|
|
80
|
+
this.bindCaptureScrollEvent();
|
|
84
81
|
}
|
|
85
82
|
}, {
|
|
86
83
|
key: "stop",
|
|
@@ -30,7 +30,7 @@ const getErrorStatusCode = error => {
|
|
|
30
30
|
};
|
|
31
31
|
const getErrorTraceId = error => isErrorObject(error) && 'traceId' in error && typeof error.traceId === 'string' ? error.traceId : undefined;
|
|
32
32
|
export function setTerminalError(error, additionalAttributes, labelStack) {
|
|
33
|
-
var _error$message, _getActiveTrace$trace, _getActiveTrace, _activeInteraction$uf, _activeInteraction$id, _activeInteraction$ty, _PreviousInteractionL, _PreviousInteractionL2, _PreviousInteractionL3, _UFORouteName$current;
|
|
33
|
+
var _error$message, _additionalAttributes, _getActiveTrace$trace, _getActiveTrace, _activeInteraction$uf, _activeInteraction$id, _activeInteraction$ty, _PreviousInteractionL, _PreviousInteractionL2, _PreviousInteractionL3, _UFORouteName$current;
|
|
34
34
|
if (additionalAttributes !== null && additionalAttributes !== void 0 && additionalAttributes.isClientNetworkError) {
|
|
35
35
|
// Exclude client network errors from being reported to UFO
|
|
36
36
|
return;
|
|
@@ -44,7 +44,7 @@ export function setTerminalError(error, additionalAttributes, labelStack) {
|
|
|
44
44
|
};
|
|
45
45
|
const errorData = fg('platform_ufo_terminal_errors_fix_missing_data') ? {
|
|
46
46
|
...baseErrorData,
|
|
47
|
-
statusCode: getErrorStatusCode(error),
|
|
47
|
+
statusCode: (_additionalAttributes = additionalAttributes === null || additionalAttributes === void 0 ? void 0 : additionalAttributes.statusCode) !== null && _additionalAttributes !== void 0 ? _additionalAttributes : getErrorStatusCode(error),
|
|
48
48
|
// Fallback to traceId from error object if it exists (e.g. FetchError)
|
|
49
49
|
traceId: (_getActiveTrace$trace = (_getActiveTrace = getActiveTrace()) === null || _getActiveTrace === void 0 ? void 0 : _getActiveTrace.traceId) !== null && _getActiveTrace$trace !== void 0 ? _getActiveTrace$trace : getErrorTraceId(error),
|
|
50
50
|
teamName: additionalAttributes === null || additionalAttributes === void 0 ? void 0 : additionalAttributes.teamName,
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import { bind } from 'bind-event-listener';
|
|
3
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
3
|
export default class WindowEventObserver {
|
|
5
4
|
constructor(opts) {
|
|
6
5
|
_defineProperty(this, "unbindFns", []);
|
|
@@ -60,9 +59,7 @@ export default class WindowEventObserver {
|
|
|
60
59
|
this.bindEvent('scroll');
|
|
61
60
|
this.bindEvent('keydown');
|
|
62
61
|
this.bindEvent('resize');
|
|
63
|
-
|
|
64
|
-
this.bindCaptureScrollEvent();
|
|
65
|
-
}
|
|
62
|
+
this.bindCaptureScrollEvent();
|
|
66
63
|
}
|
|
67
64
|
stop() {
|
|
68
65
|
this.unbindFns.forEach(cb => {
|
|
@@ -40,7 +40,7 @@ var getErrorTraceId = function getErrorTraceId(error) {
|
|
|
40
40
|
return isErrorObject(error) && 'traceId' in error && typeof error.traceId === 'string' ? error.traceId : undefined;
|
|
41
41
|
};
|
|
42
42
|
export function setTerminalError(error, additionalAttributes, labelStack) {
|
|
43
|
-
var _error$message, _getActiveTrace$trace, _getActiveTrace, _activeInteraction$uf, _activeInteraction$id, _activeInteraction$ty, _PreviousInteractionL, _PreviousInteractionL2, _PreviousInteractionL3, _UFORouteName$current;
|
|
43
|
+
var _error$message, _additionalAttributes, _getActiveTrace$trace, _getActiveTrace, _activeInteraction$uf, _activeInteraction$id, _activeInteraction$ty, _PreviousInteractionL, _PreviousInteractionL2, _PreviousInteractionL3, _UFORouteName$current;
|
|
44
44
|
if (additionalAttributes !== null && additionalAttributes !== void 0 && additionalAttributes.isClientNetworkError) {
|
|
45
45
|
// Exclude client network errors from being reported to UFO
|
|
46
46
|
return;
|
|
@@ -53,7 +53,7 @@ export function setTerminalError(error, additionalAttributes, labelStack) {
|
|
|
53
53
|
timestamp: currentTime
|
|
54
54
|
};
|
|
55
55
|
var errorData = fg('platform_ufo_terminal_errors_fix_missing_data') ? _objectSpread(_objectSpread({}, baseErrorData), {}, {
|
|
56
|
-
statusCode: getErrorStatusCode(error),
|
|
56
|
+
statusCode: (_additionalAttributes = additionalAttributes === null || additionalAttributes === void 0 ? void 0 : additionalAttributes.statusCode) !== null && _additionalAttributes !== void 0 ? _additionalAttributes : getErrorStatusCode(error),
|
|
57
57
|
// Fallback to traceId from error object if it exists (e.g. FetchError)
|
|
58
58
|
traceId: (_getActiveTrace$trace = (_getActiveTrace = getActiveTrace()) === null || _getActiveTrace === void 0 ? void 0 : _getActiveTrace.traceId) !== null && _getActiveTrace$trace !== void 0 ? _getActiveTrace$trace : getErrorTraceId(error),
|
|
59
59
|
teamName: additionalAttributes === null || additionalAttributes === void 0 ? void 0 : additionalAttributes.teamName,
|
|
@@ -2,7 +2,6 @@ import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
3
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
4
4
|
import { bind } from 'bind-event-listener';
|
|
5
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
5
|
var WindowEventObserver = /*#__PURE__*/function () {
|
|
7
6
|
function WindowEventObserver(opts) {
|
|
8
7
|
_classCallCheck(this, WindowEventObserver);
|
|
@@ -71,9 +70,7 @@ var WindowEventObserver = /*#__PURE__*/function () {
|
|
|
71
70
|
this.bindEvent('scroll');
|
|
72
71
|
this.bindEvent('keydown');
|
|
73
72
|
this.bindEvent('resize');
|
|
74
|
-
|
|
75
|
-
this.bindCaptureScrollEvent();
|
|
76
|
-
}
|
|
73
|
+
this.bindCaptureScrollEvent();
|
|
77
74
|
}
|
|
78
75
|
}, {
|
|
79
76
|
key: "stop",
|
|
@@ -6,8 +6,8 @@ export interface TerminalErrorAdditionalAttributes {
|
|
|
6
6
|
errorHash?: string;
|
|
7
7
|
fallbackType?: 'page' | 'flag' | 'custom';
|
|
8
8
|
isClientNetworkError?: boolean;
|
|
9
|
-
traceId?: string;
|
|
10
9
|
statusCode?: number;
|
|
10
|
+
traceId?: string;
|
|
11
11
|
}
|
|
12
12
|
export interface TerminalErrorData extends TerminalErrorAdditionalAttributes {
|
|
13
13
|
errorType: string;
|
|
@@ -6,8 +6,8 @@ export interface TerminalErrorAdditionalAttributes {
|
|
|
6
6
|
errorHash?: string;
|
|
7
7
|
fallbackType?: 'page' | 'flag' | 'custom';
|
|
8
8
|
isClientNetworkError?: boolean;
|
|
9
|
-
traceId?: string;
|
|
10
9
|
statusCode?: number;
|
|
10
|
+
traceId?: string;
|
|
11
11
|
}
|
|
12
12
|
export interface TerminalErrorData extends TerminalErrorAdditionalAttributes {
|
|
13
13
|
errorType: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/react-ufo",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.7.0",
|
|
4
4
|
"description": "Parts of React UFO that are publicly available",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -194,9 +194,6 @@
|
|
|
194
194
|
"platform_ufo_exclude_dark_reader_extension": {
|
|
195
195
|
"type": "boolean"
|
|
196
196
|
},
|
|
197
|
-
"platform_ufo_detect_container_scroll": {
|
|
198
|
-
"type": "boolean"
|
|
199
|
-
},
|
|
200
197
|
"platform_ufo_fix_abort_timestamp_raw_data": {
|
|
201
198
|
"type": "boolean"
|
|
202
199
|
},
|