@atlaskit/collab-provider 15.1.0 → 15.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,22 @@
1
1
  # @atlaskit/collab-provider
2
2
 
3
+ ## 15.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`b855c9d819b09`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b855c9d819b09) -
8
+ Support sharded routing for collab edit socket connections
9
+
10
+ ### Patch Changes
11
+
12
+ - Updated dependencies
13
+
14
+ ## 15.1.1
15
+
16
+ ### Patch Changes
17
+
18
+ - Updated dependencies
19
+
3
20
  ## 15.1.0
4
21
 
5
22
  ### Minor Changes
@@ -23,18 +23,24 @@ function createSocketIOSocket(url, auth, productInfo, isPresenceOnly, analyticsH
23
23
  // Polling first
24
24
  var transports = ['polling', 'websocket'];
25
25
  var usePMR = false;
26
-
27
- // Limit this change to Presence only
28
26
  if (isPresenceOnly) {
27
+ // Presence-specific configuration
29
28
  if ((0, _platformFeatureFlags.fg)('platform-editor-presence-websocket-only')) {
30
29
  // https://socket.io/docs/v4/client-options/#transports
31
30
  // WebSocket first, if fails, try polling
32
31
  transports = ['websocket'];
33
32
  }
34
33
  socketIOOptions = _config.SOCKET_IO_OPTIONS_WITH_HIGH_JITTER;
34
+
35
+ // PMR routing for presence traffic
35
36
  if ((0, _atlassianContext.isIsolatedCloud)() && (0, _expValEquals.expValEquals)('platform_editor_use_pmr_for_collab_presence_in_ic', 'isEnabled', true, false) || !(0, _atlassianContext.isIsolatedCloud)() && (0, _expValEquals.expValEquals)('platform_editor_use_pmr_for_collab_presence_non_ic', 'isEnabled', true, false)) {
36
37
  usePMR = true;
37
38
  }
39
+ } else {
40
+ // PMR routing for edit traffic
41
+ if ((0, _expValEquals.expValEquals)('platform_editor_to_use_pmr_for_collab_edit_none_ic', 'isEnabled', true, false)) {
42
+ usePMR = true;
43
+ }
38
44
  }
39
45
  var client = (0, _socket.io)(url, {
40
46
  reconnectionDelayMax: socketIOOptions.RECONNECTION_DELAY_MAX,
@@ -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 = "15.0.3";
8
+ var version = exports.version = "15.1.1";
9
9
  var nextMajorVersion = exports.nextMajorVersion = function nextMajorVersion() {
10
10
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
11
11
  };
@@ -13,18 +13,24 @@ export function createSocketIOSocket(url, auth, productInfo, isPresenceOnly, ana
13
13
  // Polling first
14
14
  let transports = ['polling', 'websocket'];
15
15
  let usePMR = false;
16
-
17
- // Limit this change to Presence only
18
16
  if (isPresenceOnly) {
17
+ // Presence-specific configuration
19
18
  if (fg('platform-editor-presence-websocket-only')) {
20
19
  // https://socket.io/docs/v4/client-options/#transports
21
20
  // WebSocket first, if fails, try polling
22
21
  transports = ['websocket'];
23
22
  }
24
23
  socketIOOptions = SOCKET_IO_OPTIONS_WITH_HIGH_JITTER;
24
+
25
+ // PMR routing for presence traffic
25
26
  if (isIsolatedCloud() && expValEquals('platform_editor_use_pmr_for_collab_presence_in_ic', 'isEnabled', true, false) || !isIsolatedCloud() && expValEquals('platform_editor_use_pmr_for_collab_presence_non_ic', 'isEnabled', true, false)) {
26
27
  usePMR = true;
27
28
  }
29
+ } else {
30
+ // PMR routing for edit traffic
31
+ if (expValEquals('platform_editor_to_use_pmr_for_collab_edit_none_ic', 'isEnabled', true, false)) {
32
+ usePMR = true;
33
+ }
28
34
  }
29
35
  const client = io(url, {
30
36
  reconnectionDelayMax: socketIOOptions.RECONNECTION_DELAY_MAX,
@@ -1,5 +1,5 @@
1
1
  export const name = "@atlaskit/collab-provider";
2
- export const version = "15.0.3";
2
+ export const version = "15.1.1";
3
3
  export const nextMajorVersion = () => {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };
@@ -15,18 +15,24 @@ export function createSocketIOSocket(url, auth, productInfo, isPresenceOnly, ana
15
15
  // Polling first
16
16
  var transports = ['polling', 'websocket'];
17
17
  var usePMR = false;
18
-
19
- // Limit this change to Presence only
20
18
  if (isPresenceOnly) {
19
+ // Presence-specific configuration
21
20
  if (fg('platform-editor-presence-websocket-only')) {
22
21
  // https://socket.io/docs/v4/client-options/#transports
23
22
  // WebSocket first, if fails, try polling
24
23
  transports = ['websocket'];
25
24
  }
26
25
  socketIOOptions = SOCKET_IO_OPTIONS_WITH_HIGH_JITTER;
26
+
27
+ // PMR routing for presence traffic
27
28
  if (isIsolatedCloud() && expValEquals('platform_editor_use_pmr_for_collab_presence_in_ic', 'isEnabled', true, false) || !isIsolatedCloud() && expValEquals('platform_editor_use_pmr_for_collab_presence_non_ic', 'isEnabled', true, false)) {
28
29
  usePMR = true;
29
30
  }
31
+ } else {
32
+ // PMR routing for edit traffic
33
+ if (expValEquals('platform_editor_to_use_pmr_for_collab_edit_none_ic', 'isEnabled', true, false)) {
34
+ usePMR = true;
35
+ }
30
36
  }
31
37
  var client = io(url, {
32
38
  reconnectionDelayMax: socketIOOptions.RECONNECTION_DELAY_MAX,
@@ -1,5 +1,5 @@
1
1
  export var name = "@atlaskit/collab-provider";
2
- export var version = "15.0.3";
2
+ export var version = "15.1.1";
3
3
  export var nextMajorVersion = function nextMajorVersion() {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };
@@ -64,7 +64,9 @@ export interface Config {
64
64
  need404?: boolean;
65
65
  /**
66
66
  * Used for sharded routing, product passes route to collab provider
67
- * e.g. /ncs-presence/{cloudId}/{activationId}/confluence
67
+ * Presence traffic e.g. /ncs-presence/{cloudId}/{activationId}/confluence
68
+ * Edit traffic e.g. /ncs/{cloudId}/{activationId}/confluence
69
+ *
68
70
  */
69
71
  path?: string;
70
72
  /**
@@ -64,7 +64,9 @@ export interface Config {
64
64
  need404?: boolean;
65
65
  /**
66
66
  * Used for sharded routing, product passes route to collab provider
67
- * e.g. /ncs-presence/{cloudId}/{activationId}/confluence
67
+ * Presence traffic e.g. /ncs-presence/{cloudId}/{activationId}/confluence
68
+ * Edit traffic e.g. /ncs/{cloudId}/{activationId}/confluence
69
+ *
68
70
  */
69
71
  path?: string;
70
72
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/collab-provider",
3
- "version": "15.1.0",
3
+ "version": "15.2.0",
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.0.0",
40
- "@atlaskit/tmp-editor-statsig": "^16.36.0",
40
+ "@atlaskit/tmp-editor-statsig": "^17.4.0",
41
41
  "@atlaskit/ufo": "^0.4.0",
42
42
  "@atlaskit/util-service-support": "^6.3.0",
43
43
  "@babel/runtime": "^7.0.0",