@atlaskit/collab-provider 9.22.6 → 9.22.7

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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @atlaskit/collab-provider
2
2
 
3
+ ## 9.22.7
4
+
5
+ ### Patch Changes
6
+
7
+ - [#71133](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/71133) [`22d7f6ed1f02`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/22d7f6ed1f02) - revert prosemirror-collab unfork
8
+
3
9
  ## 9.22.6
4
10
 
5
11
  ### Patch Changes
@@ -30,6 +30,9 @@
30
30
  {
31
31
  "path": "../../editor-json-transformer/afm-cc/tsconfig.json"
32
32
  },
33
+ {
34
+ "path": "../../prosemirror-collab/afm-cc/tsconfig.json"
35
+ },
33
36
  {
34
37
  "path": "../../../data/ufo-external/afm-cc/tsconfig.json"
35
38
  },
@@ -11,7 +11,7 @@ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/cl
11
11
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
12
12
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
13
13
  var _const = require("../helpers/const");
14
- var _prosemirrorCollab = require("prosemirror-collab");
14
+ var _prosemirrorCollab = require("@atlaskit/prosemirror-collab");
15
15
  var _editorJsonTransformer = require("@atlaskit/editor-json-transformer");
16
16
  var _throttle = _interopRequireDefault(require("lodash/throttle"));
17
17
  var _performance = require("../analytics/performance");
@@ -129,7 +129,7 @@ var DocumentService = exports.DocumentService = /*#__PURE__*/function () {
129
129
  (_this$analyticsHelper3 = _this.analyticsHelper) === null || _this$analyticsHelper3 === void 0 || _this$analyticsHelper3.sendErrorEvent(new Error('No editor state when calling ProseMirror function'), 'getCurrentPmVersion called without state');
130
130
  return 0;
131
131
  }
132
- return (0, _prosemirrorCollab.getVersion)(state) || 0; // To mimic the default value customisation introduced in the prosemirror-collab fork
132
+ return (0, _prosemirrorCollab.getVersion)(state);
133
133
  });
134
134
  (0, _defineProperty2.default)(this, "getCurrentState", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
135
135
  var _this$getState2, _this$analyticsHelper5, _this$analyticsHelper4, state, adfDocument, currentState, measure, _this$analyticsHelper6, _this$analyticsHelper7, _measure;
@@ -148,7 +148,7 @@ var DocumentService = exports.DocumentService = /*#__PURE__*/function () {
148
148
  currentState = {
149
149
  content: adfDocument,
150
150
  title: _this.metadataService.getTitle(),
151
- stepVersion: (0, _prosemirrorCollab.getVersion)(state) || 0 // To mimic the default value customisation introduced in the prosemirror-collab fork
151
+ stepVersion: (0, _prosemirrorCollab.getVersion)(state)
152
152
  };
153
153
  measure = (0, _performance.stopMeasure)(_performance.MEASURE_NAME.GET_CURRENT_STATE, _this.analyticsHelper);
154
154
  (_this$analyticsHelper5 = _this.analyticsHelper) === null || _this$analyticsHelper5 === void 0 || _this$analyticsHelper5.sendActionEvent(_const.EVENT_ACTION.GET_CURRENT_STATE, _const.EVENT_STATUS.SUCCESS, {
@@ -472,7 +472,7 @@ var DocumentService = exports.DocumentService = /*#__PURE__*/function () {
472
472
  tries: count,
473
473
  maxRetries: _const.ACK_MAX_TRY,
474
474
  clientId: _this.clientId,
475
- version: (0, _prosemirrorCollab.getVersion)(state) || 0 // To mimic the default value customisation introduced in the prosemirror-collab fork
475
+ version: (0, _prosemirrorCollab.getVersion)(state)
476
476
  });
477
477
  }
478
478
  unconfirmedStepsInfoUGCRemoved = (_this$getUnconfirmedS = _this.getUnconfirmedSteps()) === null || _this$getUnconfirmedS === void 0 ? void 0 : _this$getUnconfirmedS.map(function (step) {
@@ -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.22.6";
8
+ var version = exports.version = "9.22.7";
9
9
  var nextMajorVersion = exports.nextMajorVersion = function nextMajorVersion() {
10
10
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
11
11
  };
@@ -1,6 +1,6 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import { ACK_MAX_TRY, EVENT_ACTION, EVENT_STATUS } from '../helpers/const';
3
- import { getVersion, sendableSteps } from 'prosemirror-collab';
3
+ import { getVersion, sendableSteps } from '@atlaskit/prosemirror-collab';
4
4
  import { JSONTransformer } from '@atlaskit/editor-json-transformer';
5
5
  import throttle from 'lodash/throttle';
6
6
  import { MEASURE_NAME, startMeasure, stopMeasure } from '../analytics/performance';
@@ -95,7 +95,7 @@ export class DocumentService {
95
95
  (_this$analyticsHelper3 = this.analyticsHelper) === null || _this$analyticsHelper3 === void 0 ? void 0 : _this$analyticsHelper3.sendErrorEvent(new Error('No editor state when calling ProseMirror function'), 'getCurrentPmVersion called without state');
96
96
  return 0;
97
97
  }
98
- return getVersion(state) || 0; // To mimic the default value customisation introduced in the prosemirror-collab fork
98
+ return getVersion(state);
99
99
  });
100
100
  _defineProperty(this, "getCurrentState", async () => {
101
101
  try {
@@ -112,9 +112,8 @@ export class DocumentService {
112
112
  const currentState = {
113
113
  content: adfDocument,
114
114
  title: this.metadataService.getTitle(),
115
- stepVersion: getVersion(state) || 0 // To mimic the default value customisation introduced in the prosemirror-collab fork
115
+ stepVersion: getVersion(state)
116
116
  };
117
-
118
117
  const measure = stopMeasure(MEASURE_NAME.GET_CURRENT_STATE, this.analyticsHelper);
119
118
  (_this$analyticsHelper5 = this.analyticsHelper) === null || _this$analyticsHelper5 === void 0 ? void 0 : _this$analyticsHelper5.sendActionEvent(EVENT_ACTION.GET_CURRENT_STATE, EVENT_STATUS.SUCCESS, {
120
119
  latency: measure === null || measure === void 0 ? void 0 : measure.duration
@@ -397,10 +396,9 @@ export class DocumentService {
397
396
  tries: count,
398
397
  maxRetries: ACK_MAX_TRY,
399
398
  clientId: this.clientId,
400
- version: getVersion(state) || 0 // To mimic the default value customisation introduced in the prosemirror-collab fork
399
+ version: getVersion(state)
401
400
  });
402
401
  }
403
-
404
402
  const unconfirmedStepsInfoUGCRemoved = (_this$getUnconfirmedS = this.getUnconfirmedSteps()) === null || _this$getUnconfirmedS === void 0 ? void 0 : _this$getUnconfirmedS.map(step => getStepUGCFreeDetails(step));
405
403
  const error = new CantSyncUpError("Can't sync up with Collab Service: unable to send unconfirmed steps and max retry reached", {
406
404
  unconfirmedStepsInfo: unconfirmedStepsInfoUGCRemoved ? JSON.stringify(unconfirmedStepsInfoUGCRemoved) : 'Unable to generate UGC removed step info'
@@ -1,5 +1,5 @@
1
1
  export const name = "@atlaskit/collab-provider";
2
- export const version = "9.22.6";
2
+ export const version = "9.22.7";
3
3
  export const nextMajorVersion = () => {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };
@@ -6,7 +6,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
6
6
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
7
7
  import _regeneratorRuntime from "@babel/runtime/regenerator";
8
8
  import { ACK_MAX_TRY, EVENT_ACTION, EVENT_STATUS } from '../helpers/const';
9
- import { getVersion, sendableSteps } from 'prosemirror-collab';
9
+ import { getVersion, sendableSteps } from '@atlaskit/prosemirror-collab';
10
10
  import { JSONTransformer } from '@atlaskit/editor-json-transformer';
11
11
  import throttle from 'lodash/throttle';
12
12
  import { MEASURE_NAME, startMeasure, stopMeasure } from '../analytics/performance';
@@ -122,7 +122,7 @@ export var DocumentService = /*#__PURE__*/function () {
122
122
  (_this$analyticsHelper3 = _this.analyticsHelper) === null || _this$analyticsHelper3 === void 0 || _this$analyticsHelper3.sendErrorEvent(new Error('No editor state when calling ProseMirror function'), 'getCurrentPmVersion called without state');
123
123
  return 0;
124
124
  }
125
- return getVersion(state) || 0; // To mimic the default value customisation introduced in the prosemirror-collab fork
125
+ return getVersion(state);
126
126
  });
127
127
  _defineProperty(this, "getCurrentState", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
128
128
  var _this$getState2, _this$analyticsHelper5, _this$analyticsHelper4, state, adfDocument, currentState, measure, _this$analyticsHelper6, _this$analyticsHelper7, _measure;
@@ -141,7 +141,7 @@ export var DocumentService = /*#__PURE__*/function () {
141
141
  currentState = {
142
142
  content: adfDocument,
143
143
  title: _this.metadataService.getTitle(),
144
- stepVersion: getVersion(state) || 0 // To mimic the default value customisation introduced in the prosemirror-collab fork
144
+ stepVersion: getVersion(state)
145
145
  };
146
146
  measure = stopMeasure(MEASURE_NAME.GET_CURRENT_STATE, _this.analyticsHelper);
147
147
  (_this$analyticsHelper5 = _this.analyticsHelper) === null || _this$analyticsHelper5 === void 0 || _this$analyticsHelper5.sendActionEvent(EVENT_ACTION.GET_CURRENT_STATE, EVENT_STATUS.SUCCESS, {
@@ -465,7 +465,7 @@ export var DocumentService = /*#__PURE__*/function () {
465
465
  tries: count,
466
466
  maxRetries: ACK_MAX_TRY,
467
467
  clientId: _this.clientId,
468
- version: getVersion(state) || 0 // To mimic the default value customisation introduced in the prosemirror-collab fork
468
+ version: getVersion(state)
469
469
  });
470
470
  }
471
471
  unconfirmedStepsInfoUGCRemoved = (_this$getUnconfirmedS = _this.getUnconfirmedSteps()) === null || _this$getUnconfirmedS === void 0 ? void 0 : _this$getUnconfirmedS.map(function (step) {
@@ -1,5 +1,5 @@
1
1
  export var name = "@atlaskit/collab-provider";
2
- export var version = "9.22.6";
2
+ export var version = "9.22.7";
3
3
  export var nextMajorVersion = function nextMajorVersion() {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/collab-provider",
3
- "version": "9.22.6",
3
+ "version": "9.22.7",
4
4
  "description": "A provider for collaborative editing.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -39,12 +39,12 @@
39
39
  "@atlaskit/editor-common": "^77.3.0",
40
40
  "@atlaskit/editor-json-transformer": "^8.10.0",
41
41
  "@atlaskit/editor-prosemirror": "3.0.0",
42
+ "@atlaskit/prosemirror-collab": "^0.2.0",
42
43
  "@atlaskit/ufo": "^0.2.0",
43
44
  "@atlaskit/util-service-support": "^6.2.0",
44
45
  "@babel/runtime": "^7.0.0",
45
46
  "eventemitter2": "^4.1.0",
46
47
  "lodash": "^4.17.21",
47
- "prosemirror-collab": "1.3.1",
48
48
  "socket.io-client": "^4.7.1"
49
49
  },
50
50
  "techstack": {