@atlaskit/collab-provider 11.1.0 → 11.2.0

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,23 @@
1
1
  # @atlaskit/collab-provider
2
2
 
3
+ ## 11.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#197573](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/197573)
8
+ [`2853bc7075415`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/2853bc7075415) -
9
+ Clean up platform_editor_connection_auto_disconnect_delay experiment feature gate
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
15
+ ## 11.1.1
16
+
17
+ ### Patch Changes
18
+
19
+ - Updated dependencies
20
+
3
21
  ## 11.1.0
4
22
 
5
23
  ### Minor Changes
@@ -25,7 +25,6 @@ var _network = _interopRequireDefault(require("./connectivity/network"));
25
25
  var _internalErrors = require("./errors/internal-errors");
26
26
  var _ncsErrors = require("./errors/ncs-errors");
27
27
  var _customErrors = require("./errors/custom-errors");
28
- var _featureGateJsClient = _interopRequireDefault(require("@atlaskit/feature-gate-js-client"));
29
28
  var _bindEventListener = require("bind-event-listener");
30
29
  function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
31
30
  function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
@@ -884,14 +883,13 @@ var Channel = exports.Channel = /*#__PURE__*/function (_Emitter) {
884
883
  key: "addVisiblityListener",
885
884
  value:
886
885
  /**
887
- * Adds an event listener for visibilitychange events to handle auto-disconnection if tab is in background
886
+ * Adds an event listener for visibilitychange events to automatically close the socket
887
+ * connection if tab is in background for longer than disconnectDelay
888
888
  */
889
889
  function addVisiblityListener() {
890
- var _FeatureGates$getExpe,
891
- _this3 = this;
892
- var disconnectDelay = (_FeatureGates$getExpe = _featureGateJsClient.default.getExperimentValue('platform_editor_connection_auto_disconnect_delay', 'delay', -1)) !== null && _FeatureGates$getExpe !== void 0 ? _FeatureGates$getExpe : -1;
893
- var isAutoDisconnectEnabled = disconnectDelay >= 0;
894
- if (isAutoDisconnectEnabled && this.config.isPresenceOnly) {
890
+ var _this3 = this;
891
+ var disconnectDelay = 60;
892
+ if (this.config.isPresenceOnly) {
895
893
  this.unbindVisibilityListener = (0, _bindEventListener.bind)(document, {
896
894
  type: 'visibilitychange',
897
895
  listener: function listener() {
@@ -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 = "11.0.7";
8
+ var version = exports.version = "11.1.1";
9
9
  var nextMajorVersion = exports.nextMajorVersion = function nextMajorVersion() {
10
10
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
11
11
  };
@@ -11,7 +11,6 @@ import Network from './connectivity/network';
11
11
  import { INTERNAL_ERROR_CODE } from './errors/internal-errors';
12
12
  import { NCS_ERROR_CODE } from './errors/ncs-errors';
13
13
  import { NotConnectedError, NotInitializedError } from './errors/custom-errors';
14
- import FeatureGates from '@atlaskit/feature-gate-js-client';
15
14
  import { bind } from 'bind-event-listener';
16
15
  const logger = createLogger('Channel', 'green');
17
16
  export class Channel extends Emitter {
@@ -621,13 +620,12 @@ export class Channel extends Emitter {
621
620
  return stepLimit > 0 && this.stepCounter > stepLimit || stepSizeLimit > 0 && this.stepSizeCounter > stepSizeLimit || maxStepSizeLimit > 0 && this.maxStepSize > maxStepSizeLimit;
622
621
  }
623
622
  /**
624
- * Adds an event listener for visibilitychange events to handle auto-disconnection if tab is in background
623
+ * Adds an event listener for visibilitychange events to automatically close the socket
624
+ * connection if tab is in background for longer than disconnectDelay
625
625
  */
626
626
  addVisiblityListener() {
627
- var _FeatureGates$getExpe;
628
- const disconnectDelay = (_FeatureGates$getExpe = FeatureGates.getExperimentValue('platform_editor_connection_auto_disconnect_delay', 'delay', -1)) !== null && _FeatureGates$getExpe !== void 0 ? _FeatureGates$getExpe : -1;
629
- const isAutoDisconnectEnabled = disconnectDelay >= 0;
630
- if (isAutoDisconnectEnabled && this.config.isPresenceOnly) {
627
+ const disconnectDelay = 60;
628
+ if (this.config.isPresenceOnly) {
631
629
  this.unbindVisibilityListener = bind(document, {
632
630
  type: 'visibilitychange',
633
631
  listener: () => {
@@ -1,5 +1,5 @@
1
1
  export const name = "@atlaskit/collab-provider";
2
- export const version = "11.0.7";
2
+ export const version = "11.1.1";
3
3
  export const nextMajorVersion = () => {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };
@@ -25,7 +25,6 @@ import Network from './connectivity/network';
25
25
  import { INTERNAL_ERROR_CODE } from './errors/internal-errors';
26
26
  import { NCS_ERROR_CODE } from './errors/ncs-errors';
27
27
  import { NotConnectedError, NotInitializedError } from './errors/custom-errors';
28
- import FeatureGates from '@atlaskit/feature-gate-js-client';
29
28
  import { bind } from 'bind-event-listener';
30
29
  var logger = createLogger('Channel', 'green');
31
30
  export var Channel = /*#__PURE__*/function (_Emitter) {
@@ -877,14 +876,13 @@ export var Channel = /*#__PURE__*/function (_Emitter) {
877
876
  key: "addVisiblityListener",
878
877
  value:
879
878
  /**
880
- * Adds an event listener for visibilitychange events to handle auto-disconnection if tab is in background
879
+ * Adds an event listener for visibilitychange events to automatically close the socket
880
+ * connection if tab is in background for longer than disconnectDelay
881
881
  */
882
882
  function addVisiblityListener() {
883
- var _FeatureGates$getExpe,
884
- _this3 = this;
885
- var disconnectDelay = (_FeatureGates$getExpe = FeatureGates.getExperimentValue('platform_editor_connection_auto_disconnect_delay', 'delay', -1)) !== null && _FeatureGates$getExpe !== void 0 ? _FeatureGates$getExpe : -1;
886
- var isAutoDisconnectEnabled = disconnectDelay >= 0;
887
- if (isAutoDisconnectEnabled && this.config.isPresenceOnly) {
883
+ var _this3 = this;
884
+ var disconnectDelay = 60;
885
+ if (this.config.isPresenceOnly) {
888
886
  this.unbindVisibilityListener = bind(document, {
889
887
  type: 'visibilitychange',
890
888
  listener: function listener() {
@@ -1,5 +1,5 @@
1
1
  export var name = "@atlaskit/collab-provider";
2
- export var version = "11.0.7";
2
+ export var version = "11.1.1";
3
3
  export var nextMajorVersion = function nextMajorVersion() {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };
@@ -75,7 +75,8 @@ export declare class Channel extends Emitter<ChannelEvent> {
75
75
  */
76
76
  private unbindVisibilityListener;
77
77
  /**
78
- * Adds an event listener for visibilitychange events to handle auto-disconnection if tab is in background
78
+ * Adds an event listener for visibilitychange events to automatically close the socket
79
+ * connection if tab is in background for longer than disconnectDelay
79
80
  */
80
81
  private addVisiblityListener;
81
82
  autoDisconnect: (disconnectTimer: ReturnType<typeof setTimeout> | undefined, disconnectDelay: number) => NodeJS.Timeout | undefined;
@@ -75,7 +75,8 @@ export declare class Channel extends Emitter<ChannelEvent> {
75
75
  */
76
76
  private unbindVisibilityListener;
77
77
  /**
78
- * Adds an event listener for visibilitychange events to handle auto-disconnection if tab is in background
78
+ * Adds an event listener for visibilitychange events to automatically close the socket
79
+ * connection if tab is in background for longer than disconnectDelay
79
80
  */
80
81
  private addVisiblityListener;
81
82
  autoDisconnect: (disconnectTimer: ReturnType<typeof setTimeout> | undefined, disconnectDelay: number) => NodeJS.Timeout | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/collab-provider",
3
- "version": "11.1.0",
3
+ "version": "11.2.0",
4
4
  "description": "A provider for collaborative editing.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -35,14 +35,14 @@
35
35
  "@atlaskit/adf-utils": "^19.20.0",
36
36
  "@atlaskit/analytics-gas-types": "^5.1.0",
37
37
  "@atlaskit/analytics-listeners": "^9.0.0",
38
- "@atlaskit/anonymous-assets": "^0.0.3",
38
+ "@atlaskit/anonymous-assets": "^0.0.4",
39
39
  "@atlaskit/editor-json-transformer": "^8.25.0",
40
40
  "@atlaskit/editor-prosemirror": "7.0.0",
41
41
  "@atlaskit/feature-gate-js-client": "^5.5.0",
42
42
  "@atlaskit/platform-feature-flags": "^1.1.0",
43
43
  "@atlaskit/prosemirror-collab": "^0.17.0",
44
- "@atlaskit/react-ufo": "^4.1.0",
45
- "@atlaskit/tmp-editor-statsig": "^9.24.0",
44
+ "@atlaskit/react-ufo": "^4.2.0",
45
+ "@atlaskit/tmp-editor-statsig": "^9.25.0",
46
46
  "@atlaskit/ufo": "^0.4.0",
47
47
  "@atlaskit/util-service-support": "^6.3.0",
48
48
  "@babel/runtime": "^7.0.0",
@@ -69,8 +69,7 @@
69
69
  },
70
70
  "devDependencies": {
71
71
  "@atlaskit/adf-schema": "^50.2.0",
72
- "@atlassian/feature-flags-test-utils": "^0.3.0",
73
- "typescript": "~5.4.2"
72
+ "@atlassian/feature-flags-test-utils": "^0.3.0"
74
73
  },
75
74
  "platform-feature-flags": {
76
75
  "platform_collab_provider_tracingheaders": {
@@ -87,6 +86,6 @@
87
86
  }
88
87
  },
89
88
  "peerDependencies": {
90
- "@atlaskit/editor-common": "^107.17.0"
89
+ "@atlaskit/editor-common": "^107.18.0"
91
90
  }
92
91
  }