@atlaskit/profilecard 19.6.0 → 19.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 +12 -0
- package/dist/cjs/client/errorUtils.js +13 -0
- package/dist/cjs/client/getTeamFromAGG.js +1 -1
- package/dist/cjs/util/analytics.js +1 -1
- package/dist/es2019/client/errorUtils.js +13 -0
- package/dist/es2019/client/getTeamFromAGG.js +1 -1
- package/dist/es2019/util/analytics.js +1 -1
- package/dist/esm/client/errorUtils.js +13 -0
- package/dist/esm/client/getTeamFromAGG.js +1 -1
- package/dist/esm/util/analytics.js +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/profilecard
|
|
2
2
|
|
|
3
|
+
## 19.7.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#41507](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/41507) [`211ff35c18f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/211ff35c18f) - Handling of Jira custom client wrapping profile errors
|
|
8
|
+
|
|
9
|
+
## 19.6.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
3
15
|
## 19.6.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
|
@@ -56,6 +56,19 @@ var getErrorAttributes = exports.getErrorAttributes = function getErrorAttribute
|
|
|
56
56
|
errorCategory: error.classification
|
|
57
57
|
};
|
|
58
58
|
} else if (error instanceof Error) {
|
|
59
|
+
// Jira custom profile card client error, they wrap the error & put the underlying error in the cause property
|
|
60
|
+
if (error.message.startsWith('Unable to fetch user:')) {
|
|
61
|
+
if (error.hasOwnProperty('cause')) {
|
|
62
|
+
var causeError = error.cause;
|
|
63
|
+
if (causeError instanceof _errors.DirectoryGraphQLErrors || causeError instanceof _errors.AGGErrors) {
|
|
64
|
+
return getErrorAttributes(causeError);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
return {
|
|
68
|
+
errorMessage: error.message,
|
|
69
|
+
isSLOFailure: false
|
|
70
|
+
};
|
|
71
|
+
}
|
|
59
72
|
return {
|
|
60
73
|
errorMessage: error.message,
|
|
61
74
|
isSLOFailure: true
|
|
@@ -60,7 +60,7 @@ var addHeaders = exports.addHeaders = function addHeaders(headers) {
|
|
|
60
60
|
headers.append('X-ExperimentalApi', 'teams-beta');
|
|
61
61
|
headers.append('X-ExperimentalApi', 'team-members-beta');
|
|
62
62
|
headers.append('atl-client-name', "@atlaskit/profilecard");
|
|
63
|
-
headers.append('atl-client-version', "19.
|
|
63
|
+
headers.append('atl-client-version', "19.7.0");
|
|
64
64
|
return headers;
|
|
65
65
|
};
|
|
66
66
|
function getTeamFromAGG(_x, _x2, _x3) {
|
|
@@ -44,7 +44,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
|
|
|
44
44
|
actionSubjectId: actionSubjectId,
|
|
45
45
|
attributes: _objectSpread(_objectSpread({
|
|
46
46
|
packageName: "@atlaskit/profilecard",
|
|
47
|
-
packageVersion: "19.
|
|
47
|
+
packageVersion: "19.7.0"
|
|
48
48
|
}, attributes), {}, {
|
|
49
49
|
firedAt: Math.round((0, _performance.getPageTime)())
|
|
50
50
|
})
|
|
@@ -50,6 +50,19 @@ export const getErrorAttributes = error => {
|
|
|
50
50
|
errorCategory: error.classification
|
|
51
51
|
};
|
|
52
52
|
} else if (error instanceof Error) {
|
|
53
|
+
// Jira custom profile card client error, they wrap the error & put the underlying error in the cause property
|
|
54
|
+
if (error.message.startsWith('Unable to fetch user:')) {
|
|
55
|
+
if (error.hasOwnProperty('cause')) {
|
|
56
|
+
const causeError = error.cause;
|
|
57
|
+
if (causeError instanceof DirectoryGraphQLErrors || causeError instanceof AGGErrors) {
|
|
58
|
+
return getErrorAttributes(causeError);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
return {
|
|
62
|
+
errorMessage: error.message,
|
|
63
|
+
isSLOFailure: false
|
|
64
|
+
};
|
|
65
|
+
}
|
|
53
66
|
return {
|
|
54
67
|
errorMessage: error.message,
|
|
55
68
|
isSLOFailure: true
|
|
@@ -77,7 +77,7 @@ export const addHeaders = headers => {
|
|
|
77
77
|
headers.append('X-ExperimentalApi', 'teams-beta');
|
|
78
78
|
headers.append('X-ExperimentalApi', 'team-members-beta');
|
|
79
79
|
headers.append('atl-client-name', "@atlaskit/profilecard");
|
|
80
|
-
headers.append('atl-client-version', "19.
|
|
80
|
+
headers.append('atl-client-version', "19.7.0");
|
|
81
81
|
return headers;
|
|
82
82
|
};
|
|
83
83
|
export async function getTeamFromAGG(url, teamId, siteId) {
|
|
@@ -31,7 +31,7 @@ const createEvent = (eventType, action, actionSubject, actionSubjectId, attribut
|
|
|
31
31
|
actionSubjectId,
|
|
32
32
|
attributes: {
|
|
33
33
|
packageName: "@atlaskit/profilecard",
|
|
34
|
-
packageVersion: "19.
|
|
34
|
+
packageVersion: "19.7.0",
|
|
35
35
|
...attributes,
|
|
36
36
|
firedAt: Math.round(getPageTime())
|
|
37
37
|
}
|
|
@@ -50,6 +50,19 @@ export var getErrorAttributes = function getErrorAttributes(error) {
|
|
|
50
50
|
errorCategory: error.classification
|
|
51
51
|
};
|
|
52
52
|
} else if (error instanceof Error) {
|
|
53
|
+
// Jira custom profile card client error, they wrap the error & put the underlying error in the cause property
|
|
54
|
+
if (error.message.startsWith('Unable to fetch user:')) {
|
|
55
|
+
if (error.hasOwnProperty('cause')) {
|
|
56
|
+
var causeError = error.cause;
|
|
57
|
+
if (causeError instanceof DirectoryGraphQLErrors || causeError instanceof AGGErrors) {
|
|
58
|
+
return getErrorAttributes(causeError);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
return {
|
|
62
|
+
errorMessage: error.message,
|
|
63
|
+
isSLOFailure: false
|
|
64
|
+
};
|
|
65
|
+
}
|
|
53
66
|
return {
|
|
54
67
|
errorMessage: error.message,
|
|
55
68
|
isSLOFailure: true
|
|
@@ -51,7 +51,7 @@ export var addHeaders = function addHeaders(headers) {
|
|
|
51
51
|
headers.append('X-ExperimentalApi', 'teams-beta');
|
|
52
52
|
headers.append('X-ExperimentalApi', 'team-members-beta');
|
|
53
53
|
headers.append('atl-client-name', "@atlaskit/profilecard");
|
|
54
|
-
headers.append('atl-client-version', "19.
|
|
54
|
+
headers.append('atl-client-version', "19.7.0");
|
|
55
55
|
return headers;
|
|
56
56
|
};
|
|
57
57
|
export function getTeamFromAGG(_x, _x2, _x3) {
|
|
@@ -38,7 +38,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
|
|
|
38
38
|
actionSubjectId: actionSubjectId,
|
|
39
39
|
attributes: _objectSpread(_objectSpread({
|
|
40
40
|
packageName: "@atlaskit/profilecard",
|
|
41
|
-
packageVersion: "19.
|
|
41
|
+
packageVersion: "19.7.0"
|
|
42
42
|
}, attributes), {}, {
|
|
43
43
|
firedAt: Math.round(getPageTime())
|
|
44
44
|
})
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/profilecard",
|
|
3
|
-
"version": "19.
|
|
3
|
+
"version": "19.7.0",
|
|
4
4
|
"description": "A React component to display a card with user information.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -53,18 +53,18 @@
|
|
|
53
53
|
"@atlaskit/avatar": "^21.4.0",
|
|
54
54
|
"@atlaskit/avatar-group": "^9.4.0",
|
|
55
55
|
"@atlaskit/button": "^16.10.0",
|
|
56
|
-
"@atlaskit/dropdown-menu": "^
|
|
56
|
+
"@atlaskit/dropdown-menu": "^12.0.0",
|
|
57
57
|
"@atlaskit/empty-state": "^7.6.0",
|
|
58
58
|
"@atlaskit/focus-ring": "^1.3.4",
|
|
59
59
|
"@atlaskit/give-kudos": "^2.0.0",
|
|
60
60
|
"@atlaskit/icon": "^21.12.0",
|
|
61
61
|
"@atlaskit/lozenge": "^11.4.0",
|
|
62
|
-
"@atlaskit/menu": "^
|
|
62
|
+
"@atlaskit/menu": "^2.0.0",
|
|
63
63
|
"@atlaskit/platform-feature-flags": "^0.2.4",
|
|
64
64
|
"@atlaskit/popup": "^1.10.0",
|
|
65
65
|
"@atlaskit/spinner": "^15.6.0",
|
|
66
66
|
"@atlaskit/theme": "^12.6.0",
|
|
67
|
-
"@atlaskit/tokens": "^1.
|
|
67
|
+
"@atlaskit/tokens": "^1.26.0",
|
|
68
68
|
"@babel/runtime": "^7.0.0",
|
|
69
69
|
"@emotion/react": "^11.7.1",
|
|
70
70
|
"@emotion/styled": "^11.0.0",
|