@atlaskit/link-create 1.7.0 → 1.7.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 +13 -0
- package/dist/cjs/ui/link-create/error-boundary/index.js +13 -2
- package/dist/cjs/ui/main.js +1 -1
- package/dist/es2019/ui/link-create/error-boundary/index.js +13 -2
- package/dist/es2019/ui/main.js +1 -1
- package/dist/esm/ui/link-create/error-boundary/index.js +13 -2
- package/dist/esm/ui/main.js +1 -1
- package/package.json +6 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @atlaskit/link-create
|
|
2
2
|
|
|
3
|
+
## 1.7.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 1.7.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#42758](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/42758) [`67953559475`](https://bitbucket.org/atlassian/atlassian-frontend/commits/67953559475) - Updates error boundary to captureException to Sentry behind a feature flag.
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
|
|
3
16
|
## 1.7.0
|
|
4
17
|
|
|
5
18
|
### Minor Changes
|
|
@@ -8,6 +8,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.ErrorBoundary = void 0;
|
|
9
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
10
|
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
11
|
+
var _sentry = require("@atlaskit/linking-common/sentry");
|
|
12
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
11
13
|
var _constants = require("../../../common/constants");
|
|
12
14
|
var _errorBoundaryUi = require("../../../common/ui/error-boundary-ui");
|
|
13
15
|
var _analytics = _interopRequireDefault(require("../../../common/utils/analytics/analytics.codegen"));
|
|
@@ -20,10 +22,19 @@ var ErrorBoundary = exports.ErrorBoundary = function ErrorBoundary(_ref) {
|
|
|
20
22
|
var _useAnalyticsEvents = (0, _analyticsNext.useAnalyticsEvents)(),
|
|
21
23
|
createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
|
|
22
24
|
var handleError = (0, _react.useCallback)(function (error, info) {
|
|
23
|
-
var _window, _info$componentStack;
|
|
25
|
+
var _window, _window2, _info$componentStack;
|
|
26
|
+
if ((0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.link-create.enable-sentry-client')) {
|
|
27
|
+
// Capture exception to Sentry
|
|
28
|
+
(0, _sentry.captureException)(error, 'link-create');
|
|
29
|
+
}
|
|
30
|
+
|
|
24
31
|
// Fire Analytics event
|
|
25
|
-
createAnalyticsEvent((0, _analytics.default)('operational.linkCreate.unhandledErrorCaught', {
|
|
32
|
+
createAnalyticsEvent((0, _analytics.default)('operational.linkCreate.unhandledErrorCaught', (0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.link-create.enable-sentry-client') ? {
|
|
26
33
|
browserInfo: ((_window = window) === null || _window === void 0 || (_window = _window.navigator) === null || _window === void 0 ? void 0 : _window.userAgent) || 'unknown',
|
|
34
|
+
error: error.name,
|
|
35
|
+
componentStack: 'unknown'
|
|
36
|
+
} : {
|
|
37
|
+
browserInfo: ((_window2 = window) === null || _window2 === void 0 || (_window2 = _window2.navigator) === null || _window2 === void 0 ? void 0 : _window2.userAgent) || 'unknown',
|
|
27
38
|
error: error.toString(),
|
|
28
39
|
componentStack: (_info$componentStack = info === null || info === void 0 ? void 0 : info.componentStack) !== null && _info$componentStack !== void 0 ? _info$componentStack : ''
|
|
29
40
|
})).fire(_constants.ANALYTICS_CHANNEL);
|
package/dist/cjs/ui/main.js
CHANGED
|
@@ -35,7 +35,7 @@ var LinkCreateWithAnalyticsContext = (0, _analytics.withLinkCreateAnalyticsConte
|
|
|
35
35
|
}));
|
|
36
36
|
var PACKAGE_DATA = exports.PACKAGE_DATA = {
|
|
37
37
|
packageName: "@atlaskit/link-create" || '',
|
|
38
|
-
packageVersion: "1.7.
|
|
38
|
+
packageVersion: "1.7.2" || '',
|
|
39
39
|
componentName: _constants.COMPONENT_NAME,
|
|
40
40
|
source: _constants.COMPONENT_NAME
|
|
41
41
|
};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import React, { useCallback } from 'react';
|
|
2
2
|
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
3
|
+
import { captureException } from '@atlaskit/linking-common/sentry';
|
|
4
|
+
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
3
5
|
import { ANALYTICS_CHANNEL } from '../../../common/constants';
|
|
4
6
|
import { ErrorBoundaryUI } from '../../../common/ui/error-boundary-ui';
|
|
5
7
|
import createEventPayload from '../../../common/utils/analytics/analytics.codegen';
|
|
@@ -12,10 +14,19 @@ export const ErrorBoundary = ({
|
|
|
12
14
|
createAnalyticsEvent
|
|
13
15
|
} = useAnalyticsEvents();
|
|
14
16
|
const handleError = useCallback((error, info) => {
|
|
15
|
-
var _window, _window$navigator, _info$componentStack;
|
|
17
|
+
var _window, _window$navigator, _window2, _window2$navigator, _info$componentStack;
|
|
18
|
+
if (getBooleanFF('platform.linking-platform.link-create.enable-sentry-client')) {
|
|
19
|
+
// Capture exception to Sentry
|
|
20
|
+
captureException(error, 'link-create');
|
|
21
|
+
}
|
|
22
|
+
|
|
16
23
|
// Fire Analytics event
|
|
17
|
-
createAnalyticsEvent(createEventPayload('operational.linkCreate.unhandledErrorCaught', {
|
|
24
|
+
createAnalyticsEvent(createEventPayload('operational.linkCreate.unhandledErrorCaught', getBooleanFF('platform.linking-platform.link-create.enable-sentry-client') ? {
|
|
18
25
|
browserInfo: ((_window = window) === null || _window === void 0 ? void 0 : (_window$navigator = _window.navigator) === null || _window$navigator === void 0 ? void 0 : _window$navigator.userAgent) || 'unknown',
|
|
26
|
+
error: error.name,
|
|
27
|
+
componentStack: 'unknown'
|
|
28
|
+
} : {
|
|
29
|
+
browserInfo: ((_window2 = window) === null || _window2 === void 0 ? void 0 : (_window2$navigator = _window2.navigator) === null || _window2$navigator === void 0 ? void 0 : _window2$navigator.userAgent) || 'unknown',
|
|
19
30
|
error: error.toString(),
|
|
20
31
|
componentStack: (_info$componentStack = info === null || info === void 0 ? void 0 : info.componentStack) !== null && _info$componentStack !== void 0 ? _info$componentStack : ''
|
|
21
32
|
})).fire(ANALYTICS_CHANNEL);
|
package/dist/es2019/ui/main.js
CHANGED
|
@@ -26,7 +26,7 @@ const LinkCreateWithAnalyticsContext = withLinkCreateAnalyticsContext( /*#__PURE
|
|
|
26
26
|
}));
|
|
27
27
|
export const PACKAGE_DATA = {
|
|
28
28
|
packageName: "@atlaskit/link-create" || '',
|
|
29
|
-
packageVersion: "1.7.
|
|
29
|
+
packageVersion: "1.7.2" || '',
|
|
30
30
|
componentName: COMPONENT_NAME,
|
|
31
31
|
source: COMPONENT_NAME
|
|
32
32
|
};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import React, { useCallback } from 'react';
|
|
2
2
|
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
3
|
+
import { captureException } from '@atlaskit/linking-common/sentry';
|
|
4
|
+
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
3
5
|
import { ANALYTICS_CHANNEL } from '../../../common/constants';
|
|
4
6
|
import { ErrorBoundaryUI } from '../../../common/ui/error-boundary-ui';
|
|
5
7
|
import createEventPayload from '../../../common/utils/analytics/analytics.codegen';
|
|
@@ -10,10 +12,19 @@ export var ErrorBoundary = function ErrorBoundary(_ref) {
|
|
|
10
12
|
var _useAnalyticsEvents = useAnalyticsEvents(),
|
|
11
13
|
createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
|
|
12
14
|
var handleError = useCallback(function (error, info) {
|
|
13
|
-
var _window, _info$componentStack;
|
|
15
|
+
var _window, _window2, _info$componentStack;
|
|
16
|
+
if (getBooleanFF('platform.linking-platform.link-create.enable-sentry-client')) {
|
|
17
|
+
// Capture exception to Sentry
|
|
18
|
+
captureException(error, 'link-create');
|
|
19
|
+
}
|
|
20
|
+
|
|
14
21
|
// Fire Analytics event
|
|
15
|
-
createAnalyticsEvent(createEventPayload('operational.linkCreate.unhandledErrorCaught', {
|
|
22
|
+
createAnalyticsEvent(createEventPayload('operational.linkCreate.unhandledErrorCaught', getBooleanFF('platform.linking-platform.link-create.enable-sentry-client') ? {
|
|
16
23
|
browserInfo: ((_window = window) === null || _window === void 0 || (_window = _window.navigator) === null || _window === void 0 ? void 0 : _window.userAgent) || 'unknown',
|
|
24
|
+
error: error.name,
|
|
25
|
+
componentStack: 'unknown'
|
|
26
|
+
} : {
|
|
27
|
+
browserInfo: ((_window2 = window) === null || _window2 === void 0 || (_window2 = _window2.navigator) === null || _window2 === void 0 ? void 0 : _window2.userAgent) || 'unknown',
|
|
17
28
|
error: error.toString(),
|
|
18
29
|
componentStack: (_info$componentStack = info === null || info === void 0 ? void 0 : info.componentStack) !== null && _info$componentStack !== void 0 ? _info$componentStack : ''
|
|
19
30
|
})).fire(ANALYTICS_CHANNEL);
|
package/dist/esm/ui/main.js
CHANGED
|
@@ -27,7 +27,7 @@ var LinkCreateWithAnalyticsContext = withLinkCreateAnalyticsContext( /*#__PURE__
|
|
|
27
27
|
}));
|
|
28
28
|
export var PACKAGE_DATA = {
|
|
29
29
|
packageName: "@atlaskit/link-create" || '',
|
|
30
|
-
packageVersion: "1.7.
|
|
30
|
+
packageVersion: "1.7.2" || '',
|
|
31
31
|
componentName: COMPONENT_NAME,
|
|
32
32
|
source: COMPONENT_NAME
|
|
33
33
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/link-create",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.2",
|
|
4
4
|
"description": "The driver component of meta creation flow",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -37,9 +37,10 @@
|
|
|
37
37
|
"@atlaskit/analytics-next": "^9.1.0",
|
|
38
38
|
"@atlaskit/button": "^16.13.0",
|
|
39
39
|
"@atlaskit/empty-state": "^7.6.0",
|
|
40
|
-
"@atlaskit/form": "^
|
|
40
|
+
"@atlaskit/form": "^9.0.0",
|
|
41
41
|
"@atlaskit/icon": "^21.12.0",
|
|
42
42
|
"@atlaskit/intl-messages-provider": "^1.0.0",
|
|
43
|
+
"@atlaskit/linking-common": "^4.16.0",
|
|
43
44
|
"@atlaskit/modal-dialog": "^12.8.0",
|
|
44
45
|
"@atlaskit/platform-feature-flags": "^0.2.1",
|
|
45
46
|
"@atlaskit/primitives": "^1.9.0",
|
|
@@ -120,6 +121,9 @@
|
|
|
120
121
|
},
|
|
121
122
|
"platform.linking-platform.link-create.outer-error-boundary": {
|
|
122
123
|
"type": "boolean"
|
|
124
|
+
},
|
|
125
|
+
"platform.linking-platform.link-create.enable-sentry-client": {
|
|
126
|
+
"type": "boolean"
|
|
123
127
|
}
|
|
124
128
|
}
|
|
125
129
|
}
|