@atlaskit/collab-provider 35.0.6 → 35.0.8

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,21 @@
1
1
  # @atlaskit/collab-provider
2
2
 
3
+ ## 35.0.8
4
+
5
+ ### Patch Changes
6
+
7
+ - [`4a03a1ebd7662`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4a03a1ebd7662) -
8
+ Remove the platform_editor_agentic_step_attribution feature gate and preserve agent attribution.
9
+ - [`f2be4b48189f2`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f2be4b48189f2) -
10
+ Clean up experiment `platform_editor_enable_single_player_step_merging`
11
+ - Updated dependencies
12
+
13
+ ## 35.0.7
14
+
15
+ ### Patch Changes
16
+
17
+ - Updated dependencies
18
+
3
19
  ## 35.0.6
4
20
 
5
21
  ### Patch Changes
@@ -1094,16 +1094,14 @@ var DocumentService = exports.DocumentService = /*#__PURE__*/function () {
1094
1094
  var _this$getState1,
1095
1095
  _this$getState10,
1096
1096
  _this4 = this;
1097
- var onlineStepMergingEnabled = (0, _expValEquals.expValEquals)('platform_editor_enable_single_player_step_merging', 'isEnabled', true);
1098
1097
  // We don't trust `_newState` not to be stale
1099
1098
  // ED-29051 - the `onEditorViewStateUpdated` can have a stale state in edge cases. We need
1100
1099
  // to always ensure we're sending the latest state and unconfirmed steps so we use the state
1101
1100
  // from editorView directly (via getState).
1102
- var newState = onlineStepMergingEnabled ? (_this$getState1 = (_this$getState10 = this.getState) === null || _this$getState10 === void 0 ? void 0 : _this$getState10.call(this)) !== null && _this$getState1 !== void 0 ? _this$getState1 : _newState : _newState;
1101
+ var newState = (_this$getState1 = (_this$getState10 = this.getState) === null || _this$getState10 === void 0 ? void 0 : _this$getState10.call(this)) !== null && _this$getState1 !== void 0 ? _this$getState1 : _newState;
1103
1102
 
1104
1103
  // Don't send any steps before we're ready.
1105
- var enableOnlineStepMerging = onlineStepMergingEnabled && !this.commitStepService.getReadyToCommitStatus();
1106
- if (!this.getConnected() || enableOnlineStepMerging) {
1104
+ if (!this.getConnected() || !this.commitStepService.getReadyToCommitStatus()) {
1107
1105
  return;
1108
1106
  }
1109
1107
  var unconfirmedStepsData = (0, _prosemirrorCollab.sendableSteps)(newState);
@@ -10,7 +10,6 @@ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/cl
10
10
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
11
11
  var _countBy = _interopRequireDefault(require("lodash/countBy"));
12
12
  var _transactionAgentAttribution = require("@atlaskit/editor-common/transaction-agent-attribution");
13
- var _fg = require("@atlaskit/platform-feature-flags/fg");
14
13
  var _ncsErrors = require("../errors/ncs-errors");
15
14
  var _const = require("../helpers/const");
16
15
  var _utils = require("../helpers/utils");
@@ -37,7 +36,6 @@ var CommitStepService = exports.CommitStepService = /*#__PURE__*/function () {
37
36
  this.onErrorHandled = onErrorHandled;
38
37
  this.readyToCommit = true;
39
38
  this.lastBroadcastRequestAcked = true;
40
- this.shouldSerializeAgentAttribution = (0, _fg.fg)('platform_editor_agentic_step_attribution');
41
39
  }
42
40
  return (0, _createClass2.default)(CommitStepService, [{
43
41
  key: "commitStepQueue",
@@ -79,7 +77,7 @@ var CommitStepService = exports.CommitStepService = /*#__PURE__*/function () {
79
77
  }, RESET_READYTOCOMMIT_INTERVAL_MS);
80
78
  var stepsWithClientAndUserId = steps.map(function (step, index) {
81
79
  var _stepOrigins$index;
82
- var agentAttribution = _this.shouldSerializeAgentAttribution ? stepOrigins === null || stepOrigins === void 0 || (_stepOrigins$index = stepOrigins[index]) === null || _stepOrigins$index === void 0 ? void 0 : _stepOrigins$index.getMeta(_transactionAgentAttribution.AGENT_ATTRIBUTION_META) : undefined;
80
+ var agentAttribution = stepOrigins === null || stepOrigins === void 0 || (_stepOrigins$index = stepOrigins[index]) === null || _stepOrigins$index === void 0 ? void 0 : _stepOrigins$index.getMeta(_transactionAgentAttribution.AGENT_ATTRIBUTION_META);
83
81
  return _objectSpread(_objectSpread({}, step.toJSON()), {}, {
84
82
  clientId: clientId,
85
83
  userId: userId
@@ -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 = "35.0.5";
8
+ var version = exports.version = "35.0.7";
9
9
  var nextMajorVersion = exports.nextMajorVersion = function nextMajorVersion() {
10
10
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
11
11
  };
@@ -948,16 +948,14 @@ export class DocumentService {
948
948
  send(tr, _oldState, _newState, sendAnalyticsEvent, reason // only used for publish and draft-sync events - when called through getFinalAcknowledgedState
949
949
  ) {
950
950
  var _this$getState1, _this$getState10;
951
- const onlineStepMergingEnabled = expValEquals('platform_editor_enable_single_player_step_merging', 'isEnabled', true);
952
951
  // We don't trust `_newState` not to be stale
953
952
  // ED-29051 - the `onEditorViewStateUpdated` can have a stale state in edge cases. We need
954
953
  // to always ensure we're sending the latest state and unconfirmed steps so we use the state
955
954
  // from editorView directly (via getState).
956
- const newState = onlineStepMergingEnabled ? (_this$getState1 = (_this$getState10 = this.getState) === null || _this$getState10 === void 0 ? void 0 : _this$getState10.call(this)) !== null && _this$getState1 !== void 0 ? _this$getState1 : _newState : _newState;
955
+ const newState = (_this$getState1 = (_this$getState10 = this.getState) === null || _this$getState10 === void 0 ? void 0 : _this$getState10.call(this)) !== null && _this$getState1 !== void 0 ? _this$getState1 : _newState;
957
956
 
958
957
  // Don't send any steps before we're ready.
959
- const enableOnlineStepMerging = onlineStepMergingEnabled && !this.commitStepService.getReadyToCommitStatus();
960
- if (!this.getConnected() || enableOnlineStepMerging) {
958
+ if (!this.getConnected() || !this.commitStepService.getReadyToCommitStatus()) {
961
959
  return;
962
960
  }
963
961
  const unconfirmedStepsData = sendableSteps(newState);
@@ -1,6 +1,5 @@
1
1
  import countBy from 'lodash/countBy';
2
2
  import { AGENT_ATTRIBUTION_META } from '@atlaskit/editor-common/transaction-agent-attribution';
3
- import { fg } from '@atlaskit/platform-feature-flags/fg';
4
3
  import { NCS_ERROR_CODE } from '../errors/ncs-errors';
5
4
  import { ADD_STEPS_TYPE, EVENT_ACTION, EVENT_STATUS } from '../helpers/const';
6
5
  import { createLogger } from '../helpers/utils';
@@ -24,7 +23,6 @@ export class CommitStepService {
24
23
  this.onErrorHandled = onErrorHandled;
25
24
  this.readyToCommit = true;
26
25
  this.lastBroadcastRequestAcked = true;
27
- this.shouldSerializeAgentAttribution = fg('platform_editor_agentic_step_attribution');
28
26
  }
29
27
  commitStepQueue({
30
28
  steps,
@@ -64,7 +62,7 @@ export class CommitStepService {
64
62
  }, RESET_READYTOCOMMIT_INTERVAL_MS);
65
63
  let stepsWithClientAndUserId = steps.map((step, index) => {
66
64
  var _stepOrigins$index;
67
- const agentAttribution = this.shouldSerializeAgentAttribution ? stepOrigins === null || stepOrigins === void 0 ? void 0 : (_stepOrigins$index = stepOrigins[index]) === null || _stepOrigins$index === void 0 ? void 0 : _stepOrigins$index.getMeta(AGENT_ATTRIBUTION_META) : undefined;
65
+ const agentAttribution = stepOrigins === null || stepOrigins === void 0 ? void 0 : (_stepOrigins$index = stepOrigins[index]) === null || _stepOrigins$index === void 0 ? void 0 : _stepOrigins$index.getMeta(AGENT_ATTRIBUTION_META);
68
66
  return {
69
67
  ...step.toJSON(),
70
68
  clientId,
@@ -1,5 +1,5 @@
1
1
  export const name = "@atlaskit/collab-provider";
2
- export const version = "35.0.5";
2
+ export const version = "35.0.7";
3
3
  export const nextMajorVersion = () => {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };
@@ -1089,16 +1089,14 @@ export var DocumentService = /*#__PURE__*/function () {
1089
1089
  var _this$getState1,
1090
1090
  _this$getState10,
1091
1091
  _this4 = this;
1092
- var onlineStepMergingEnabled = expValEquals('platform_editor_enable_single_player_step_merging', 'isEnabled', true);
1093
1092
  // We don't trust `_newState` not to be stale
1094
1093
  // ED-29051 - the `onEditorViewStateUpdated` can have a stale state in edge cases. We need
1095
1094
  // to always ensure we're sending the latest state and unconfirmed steps so we use the state
1096
1095
  // from editorView directly (via getState).
1097
- var newState = onlineStepMergingEnabled ? (_this$getState1 = (_this$getState10 = this.getState) === null || _this$getState10 === void 0 ? void 0 : _this$getState10.call(this)) !== null && _this$getState1 !== void 0 ? _this$getState1 : _newState : _newState;
1096
+ var newState = (_this$getState1 = (_this$getState10 = this.getState) === null || _this$getState10 === void 0 ? void 0 : _this$getState10.call(this)) !== null && _this$getState1 !== void 0 ? _this$getState1 : _newState;
1098
1097
 
1099
1098
  // Don't send any steps before we're ready.
1100
- var enableOnlineStepMerging = onlineStepMergingEnabled && !this.commitStepService.getReadyToCommitStatus();
1101
- if (!this.getConnected() || enableOnlineStepMerging) {
1099
+ if (!this.getConnected() || !this.commitStepService.getReadyToCommitStatus()) {
1102
1100
  return;
1103
1101
  }
1104
1102
  var unconfirmedStepsData = sendableSteps(newState);
@@ -5,7 +5,6 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
5
5
  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; }
6
6
  import countBy from 'lodash/countBy';
7
7
  import { AGENT_ATTRIBUTION_META } from '@atlaskit/editor-common/transaction-agent-attribution';
8
- import { fg } from '@atlaskit/platform-feature-flags/fg';
9
8
  import { NCS_ERROR_CODE } from '../errors/ncs-errors';
10
9
  import { ADD_STEPS_TYPE, EVENT_ACTION, EVENT_STATUS } from '../helpers/const';
11
10
  import { createLogger } from '../helpers/utils';
@@ -30,7 +29,6 @@ export var CommitStepService = /*#__PURE__*/function () {
30
29
  this.onErrorHandled = onErrorHandled;
31
30
  this.readyToCommit = true;
32
31
  this.lastBroadcastRequestAcked = true;
33
- this.shouldSerializeAgentAttribution = fg('platform_editor_agentic_step_attribution');
34
32
  }
35
33
  return _createClass(CommitStepService, [{
36
34
  key: "commitStepQueue",
@@ -72,7 +70,7 @@ export var CommitStepService = /*#__PURE__*/function () {
72
70
  }, RESET_READYTOCOMMIT_INTERVAL_MS);
73
71
  var stepsWithClientAndUserId = steps.map(function (step, index) {
74
72
  var _stepOrigins$index;
75
- var agentAttribution = _this.shouldSerializeAgentAttribution ? stepOrigins === null || stepOrigins === void 0 || (_stepOrigins$index = stepOrigins[index]) === null || _stepOrigins$index === void 0 ? void 0 : _stepOrigins$index.getMeta(AGENT_ATTRIBUTION_META) : undefined;
73
+ var agentAttribution = stepOrigins === null || stepOrigins === void 0 || (_stepOrigins$index = stepOrigins[index]) === null || _stepOrigins$index === void 0 ? void 0 : _stepOrigins$index.getMeta(AGENT_ATTRIBUTION_META);
76
74
  return _objectSpread(_objectSpread({}, step.toJSON()), {}, {
77
75
  clientId: clientId,
78
76
  userId: userId
@@ -1,5 +1,5 @@
1
1
  export var name = "@atlaskit/collab-provider";
2
- export var version = "35.0.5";
2
+ export var version = "35.0.7";
3
3
  export var nextMajorVersion = function nextMajorVersion() {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };
@@ -13,7 +13,6 @@ export declare class CommitStepService {
13
13
  private onErrorHandled;
14
14
  private readyToCommit;
15
15
  private lastBroadcastRequestAcked;
16
- private readonly shouldSerializeAgentAttribution;
17
16
  /**
18
17
  * @param broadcast - Callback for broadcasting events to other clients
19
18
  * @param analyticsHelper - Helper for analytics events
@@ -650,8 +650,7 @@ The send function and commit queue behavior is controlled by several feature fla
650
650
 
651
651
  1. **`platform_editor_offline_editing_web`**: Enables offline editing support with step timeout
652
652
  handling
653
- 2. **`platform_editor_enable_single_player_step_merging`**: Enables step merging for single users
654
- 3. **`platform_editor_step_validation_on_connect`**: Controls step validation for first N steps
653
+ 2. **`platform_editor_step_validation_on_connect`**: Controls step validation for first N steps
655
654
  after connection
656
655
 
657
656
  ### Publish Operation Optimization
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/collab-provider",
3
- "version": "35.0.6",
3
+ "version": "35.0.8",
4
4
  "description": "A provider for collaborative editing.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -30,7 +30,7 @@
30
30
  "@atlaskit/platform-feature-flags": "^2.2.0",
31
31
  "@atlaskit/prosemirror-collab": "^1.1.0",
32
32
  "@atlaskit/react-ufo": "^8.1.0",
33
- "@atlaskit/tmp-editor-statsig": "^232.0.0",
33
+ "@atlaskit/tmp-editor-statsig": "^234.0.0",
34
34
  "@atlaskit/ufo": "^2.0.0",
35
35
  "@atlaskit/util-service-support": "^7.4.0",
36
36
  "@babel/runtime": "^7.0.0",
@@ -61,9 +61,6 @@
61
61
  "type": "boolean",
62
62
  "referenceOnly": true
63
63
  },
64
- "platform_editor_agentic_step_attribution": {
65
- "type": "boolean"
66
- },
67
64
  "platform-editor-presence-websocket-only": {
68
65
  "type": "boolean"
69
66
  },
@@ -75,6 +72,6 @@
75
72
  }
76
73
  },
77
74
  "peerDependencies": {
78
- "@atlaskit/editor-common": "^130.3.0"
75
+ "@atlaskit/editor-common": "^130.5.0"
79
76
  }
80
77
  }