@atlaskit/collab-provider 16.0.1 → 16.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 +10 -0
- package/dist/cjs/provider/index.js +5 -0
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/provider/index.js +6 -1
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/provider/index.js +6 -1
- package/dist/esm/version-wrapper.js +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @atlaskit/collab-provider
|
|
2
2
|
|
|
3
|
+
## 16.0.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`224048d036344`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/224048d036344) -
|
|
8
|
+
EDITOR-5683 do not rethrow setMetadataError: Cannot send metadata, currently offline and
|
|
9
|
+
setMetadataError: Cannot send metadata, not initialized yet as they are intermittent connection
|
|
10
|
+
errors
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
3
13
|
## 16.0.1
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
|
@@ -756,6 +756,11 @@ var Provider = exports.Provider = /*#__PURE__*/function (_Emitter) {
|
|
|
756
756
|
} catch (error) {
|
|
757
757
|
var _this$analyticsHelper13;
|
|
758
758
|
(_this$analyticsHelper13 = this.analyticsHelper) === null || _this$analyticsHelper13 === void 0 || _this$analyticsHelper13.sendErrorEvent(error, 'Error while setting metadata');
|
|
759
|
+
// Don't re-throw for transient connectivity/initialization errors.
|
|
760
|
+
// (e.g. socket not yet ready, user momentarily offline)
|
|
761
|
+
if ((error instanceof _customErrors.NotInitializedError || error instanceof _customErrors.NotConnectedError) && (0, _expValEquals.expValEquals)('platform_editor_ignore_metadata_connection_errors', 'isEnabled', true)) {
|
|
762
|
+
return;
|
|
763
|
+
}
|
|
759
764
|
throw new _customErrors.SetMetadataError('Error while setting metadata', error);
|
|
760
765
|
}
|
|
761
766
|
}
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.version = exports.nextMajorVersion = exports.name = void 0;
|
|
7
7
|
var name = exports.name = "@atlaskit/collab-provider";
|
|
8
|
-
var version = exports.version = "16.0.
|
|
8
|
+
var version = exports.version = "16.0.1";
|
|
9
9
|
var nextMajorVersion = exports.nextMajorVersion = function nextMajorVersion() {
|
|
10
10
|
return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
|
|
11
11
|
};
|
|
@@ -8,7 +8,7 @@ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
|
8
8
|
import { createLogger, logObfuscatedSteps } from '../helpers/utils';
|
|
9
9
|
import AnalyticsHelper from '../analytics/analytics-helper';
|
|
10
10
|
import { telepointerCallback } from '../participants/telepointers-helper';
|
|
11
|
-
import { CustomError, DestroyError, GetCurrentStateError, GetFinalAcknowledgedStateError, ProviderInitialisationError, SendTransactionError, SetEditorWidthError, SetMetadataError, SetTitleError } from '../errors/custom-errors';
|
|
11
|
+
import { CustomError, DestroyError, GetCurrentStateError, GetFinalAcknowledgedStateError, NotConnectedError, NotInitializedError, ProviderInitialisationError, SendTransactionError, SetEditorWidthError, SetMetadataError, SetTitleError } from '../errors/custom-errors';
|
|
12
12
|
import { NCS_ERROR_CODE } from '../errors/ncs-errors';
|
|
13
13
|
import { MetadataService } from '../metadata/metadata-service';
|
|
14
14
|
import { DocumentService } from '../document/document-service';
|
|
@@ -646,6 +646,11 @@ export class Provider extends Emitter {
|
|
|
646
646
|
} catch (error) {
|
|
647
647
|
var _this$analyticsHelper15;
|
|
648
648
|
(_this$analyticsHelper15 = this.analyticsHelper) === null || _this$analyticsHelper15 === void 0 ? void 0 : _this$analyticsHelper15.sendErrorEvent(error, 'Error while setting metadata');
|
|
649
|
+
// Don't re-throw for transient connectivity/initialization errors.
|
|
650
|
+
// (e.g. socket not yet ready, user momentarily offline)
|
|
651
|
+
if ((error instanceof NotInitializedError || error instanceof NotConnectedError) && expValEquals('platform_editor_ignore_metadata_connection_errors', 'isEnabled', true)) {
|
|
652
|
+
return;
|
|
653
|
+
}
|
|
649
654
|
throw new SetMetadataError('Error while setting metadata', error);
|
|
650
655
|
}
|
|
651
656
|
}
|
|
@@ -21,7 +21,7 @@ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
|
21
21
|
import { createLogger, logObfuscatedSteps } from '../helpers/utils';
|
|
22
22
|
import AnalyticsHelper from '../analytics/analytics-helper';
|
|
23
23
|
import { telepointerCallback } from '../participants/telepointers-helper';
|
|
24
|
-
import { CustomError, DestroyError, GetCurrentStateError, GetFinalAcknowledgedStateError, ProviderInitialisationError, SendTransactionError, SetEditorWidthError, SetMetadataError, SetTitleError } from '../errors/custom-errors';
|
|
24
|
+
import { CustomError, DestroyError, GetCurrentStateError, GetFinalAcknowledgedStateError, NotConnectedError, NotInitializedError, ProviderInitialisationError, SendTransactionError, SetEditorWidthError, SetMetadataError, SetTitleError } from '../errors/custom-errors';
|
|
25
25
|
import { NCS_ERROR_CODE } from '../errors/ncs-errors';
|
|
26
26
|
import { MetadataService } from '../metadata/metadata-service';
|
|
27
27
|
import { DocumentService } from '../document/document-service';
|
|
@@ -750,6 +750,11 @@ export var Provider = /*#__PURE__*/function (_Emitter) {
|
|
|
750
750
|
} catch (error) {
|
|
751
751
|
var _this$analyticsHelper13;
|
|
752
752
|
(_this$analyticsHelper13 = this.analyticsHelper) === null || _this$analyticsHelper13 === void 0 || _this$analyticsHelper13.sendErrorEvent(error, 'Error while setting metadata');
|
|
753
|
+
// Don't re-throw for transient connectivity/initialization errors.
|
|
754
|
+
// (e.g. socket not yet ready, user momentarily offline)
|
|
755
|
+
if ((error instanceof NotInitializedError || error instanceof NotConnectedError) && expValEquals('platform_editor_ignore_metadata_connection_errors', 'isEnabled', true)) {
|
|
756
|
+
return;
|
|
757
|
+
}
|
|
753
758
|
throw new SetMetadataError('Error while setting metadata', error);
|
|
754
759
|
}
|
|
755
760
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/collab-provider",
|
|
3
|
-
"version": "16.0.
|
|
3
|
+
"version": "16.0.2",
|
|
4
4
|
"description": "A provider for collaborative editing.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
38
38
|
"@atlaskit/prosemirror-collab": "^0.22.0",
|
|
39
39
|
"@atlaskit/react-ufo": "^5.4.0",
|
|
40
|
-
"@atlaskit/tmp-editor-statsig": "^36.
|
|
40
|
+
"@atlaskit/tmp-editor-statsig": "^36.2.0",
|
|
41
41
|
"@atlaskit/ufo": "^0.4.0",
|
|
42
42
|
"@atlaskit/util-service-support": "^6.3.0",
|
|
43
43
|
"@babel/runtime": "^7.0.0",
|
|
@@ -73,6 +73,6 @@
|
|
|
73
73
|
}
|
|
74
74
|
},
|
|
75
75
|
"peerDependencies": {
|
|
76
|
-
"@atlaskit/editor-common": "^112.
|
|
76
|
+
"@atlaskit/editor-common": "^112.2.0"
|
|
77
77
|
}
|
|
78
78
|
}
|