@atlaskit/collab-provider 9.26.4 → 9.26.5
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 +7 -0
- package/dist/cjs/document/catchupv2.js +11 -4
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/document/catchupv2.js +5 -0
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/document/catchupv2.js +11 -4
- package/dist/esm/version-wrapper.js +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @atlaskit/collab-provider
|
|
2
2
|
|
|
3
|
+
## 9.26.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#91579](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/91579) [`99a74057c77a`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/99a74057c77a) - Handle undefined steps in catchup v2
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
|
|
3
10
|
## 9.26.4
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
|
@@ -36,6 +36,13 @@ var catchupv2 = exports.catchupv2 = /*#__PURE__*/function () {
|
|
|
36
36
|
throw _context.t0;
|
|
37
37
|
case 14:
|
|
38
38
|
_context.prev = 14;
|
|
39
|
+
if (!(!steps || steps.length === 0)) {
|
|
40
|
+
_context.next = 18;
|
|
41
|
+
break;
|
|
42
|
+
}
|
|
43
|
+
opt.updateMetadata(metadata);
|
|
44
|
+
return _context.abrupt("return", false);
|
|
45
|
+
case 18:
|
|
39
46
|
version = fromVersion + steps.length;
|
|
40
47
|
stepsPayload = {
|
|
41
48
|
version: version,
|
|
@@ -44,17 +51,17 @@ var catchupv2 = exports.catchupv2 = /*#__PURE__*/function () {
|
|
|
44
51
|
opt.onStepsAdded(stepsPayload);
|
|
45
52
|
opt.updateMetadata(metadata);
|
|
46
53
|
return _context.abrupt("return", Boolean(opt.clientId && isOutOfSync(fromVersion, opt.getCurrentPmVersion(), steps, opt.clientId)));
|
|
47
|
-
case
|
|
48
|
-
_context.prev =
|
|
54
|
+
case 25:
|
|
55
|
+
_context.prev = 25;
|
|
49
56
|
_context.t1 = _context["catch"](14);
|
|
50
57
|
(_opt$analyticsHelper2 = opt.analyticsHelper) === null || _opt$analyticsHelper2 === void 0 || _opt$analyticsHelper2.sendErrorEvent(_context.t1, 'Failed to apply catchupv2 result in the editor');
|
|
51
58
|
logger("Apply catchupv2 steps failed:", _context.t1.message);
|
|
52
59
|
throw _context.t1;
|
|
53
|
-
case
|
|
60
|
+
case 30:
|
|
54
61
|
case "end":
|
|
55
62
|
return _context.stop();
|
|
56
63
|
}
|
|
57
|
-
}, _callee, null, [[1, 9], [14,
|
|
64
|
+
}, _callee, null, [[1, 9], [14, 25]]);
|
|
58
65
|
}));
|
|
59
66
|
return function catchupv2(_x) {
|
|
60
67
|
return _ref.apply(this, arguments);
|
|
@@ -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 = "9.26.
|
|
8
|
+
var version = exports.version = "9.26.5";
|
|
9
9
|
var nextMajorVersion = exports.nextMajorVersion = function nextMajorVersion() {
|
|
10
10
|
return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
|
|
11
11
|
};
|
|
@@ -16,6 +16,11 @@ export const catchupv2 = async opt => {
|
|
|
16
16
|
throw error;
|
|
17
17
|
}
|
|
18
18
|
try {
|
|
19
|
+
// skip onStepsAdded if steps are undefined or empty
|
|
20
|
+
if (!steps || steps.length === 0) {
|
|
21
|
+
opt.updateMetadata(metadata);
|
|
22
|
+
return false;
|
|
23
|
+
}
|
|
19
24
|
const version = fromVersion + steps.length;
|
|
20
25
|
const stepsPayload = {
|
|
21
26
|
version,
|
|
@@ -29,6 +29,13 @@ export var catchupv2 = /*#__PURE__*/function () {
|
|
|
29
29
|
throw _context.t0;
|
|
30
30
|
case 14:
|
|
31
31
|
_context.prev = 14;
|
|
32
|
+
if (!(!steps || steps.length === 0)) {
|
|
33
|
+
_context.next = 18;
|
|
34
|
+
break;
|
|
35
|
+
}
|
|
36
|
+
opt.updateMetadata(metadata);
|
|
37
|
+
return _context.abrupt("return", false);
|
|
38
|
+
case 18:
|
|
32
39
|
version = fromVersion + steps.length;
|
|
33
40
|
stepsPayload = {
|
|
34
41
|
version: version,
|
|
@@ -37,17 +44,17 @@ export var catchupv2 = /*#__PURE__*/function () {
|
|
|
37
44
|
opt.onStepsAdded(stepsPayload);
|
|
38
45
|
opt.updateMetadata(metadata);
|
|
39
46
|
return _context.abrupt("return", Boolean(opt.clientId && isOutOfSync(fromVersion, opt.getCurrentPmVersion(), steps, opt.clientId)));
|
|
40
|
-
case
|
|
41
|
-
_context.prev =
|
|
47
|
+
case 25:
|
|
48
|
+
_context.prev = 25;
|
|
42
49
|
_context.t1 = _context["catch"](14);
|
|
43
50
|
(_opt$analyticsHelper2 = opt.analyticsHelper) === null || _opt$analyticsHelper2 === void 0 || _opt$analyticsHelper2.sendErrorEvent(_context.t1, 'Failed to apply catchupv2 result in the editor');
|
|
44
51
|
logger("Apply catchupv2 steps failed:", _context.t1.message);
|
|
45
52
|
throw _context.t1;
|
|
46
|
-
case
|
|
53
|
+
case 30:
|
|
47
54
|
case "end":
|
|
48
55
|
return _context.stop();
|
|
49
56
|
}
|
|
50
|
-
}, _callee, null, [[1, 9], [14,
|
|
57
|
+
}, _callee, null, [[1, 9], [14, 25]]);
|
|
51
58
|
}));
|
|
52
59
|
return function catchupv2(_x) {
|
|
53
60
|
return _ref.apply(this, arguments);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/collab-provider",
|
|
3
|
-
"version": "9.26.
|
|
3
|
+
"version": "9.26.5",
|
|
4
4
|
"description": "A provider for collaborative editing.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@atlaskit/analytics-gas-types": "^5.1.0",
|
|
41
41
|
"@atlaskit/analytics-listeners": "^8.9.0",
|
|
42
|
-
"@atlaskit/editor-common": "^78.
|
|
42
|
+
"@atlaskit/editor-common": "^78.30.0",
|
|
43
43
|
"@atlaskit/editor-json-transformer": "^8.10.0",
|
|
44
44
|
"@atlaskit/editor-prosemirror": "3.0.0",
|
|
45
45
|
"@atlaskit/platform-feature-flags": "^0.2.0",
|