@atlaskit/collab-provider 9.28.6 → 9.29.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,20 @@
1
1
  # @atlaskit/collab-provider
2
2
 
3
+ ## 9.29.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#99579](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/99579)
8
+ [`f222af5687e9`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/f222af5687e9) -
9
+ Bump adf-schema to 36.3.0 and adf-schema-json to 1.14.0
10
+
11
+ ### Patch Changes
12
+
13
+ - [#100426](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/100426)
14
+ [`85703bb445ca`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/85703bb445ca) -
15
+ clean up feature flag connect-websocket-first (abandoned)
16
+ - Updated dependencies
17
+
3
18
  ## 9.28.6
4
19
 
5
20
  ### Patch Changes
@@ -10,8 +10,7 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
10
10
  var defaultNCSFeatureFlags = {
11
11
  testFF: false,
12
12
  blockViewOnly: false,
13
- reconcileOnRecovery: false,
14
- connectWebsocketFirst: false
13
+ reconcileOnRecovery: false
15
14
  };
16
15
 
17
16
  /**
@@ -21,8 +20,7 @@ var productKeys = {
21
20
  confluence: {
22
21
  testFF: 'confluence.frontend.collab.provider.testFF',
23
22
  blockViewOnly: 'confluence.frontend.ncs.block-view-only',
24
- reconcileOnRecovery: 'confluence.frontend.ncs.reconcile-on-recovery',
25
- connectWebsocketFirst: 'confluence.frontend.ncs.connect-websocket-first'
23
+ reconcileOnRecovery: 'confluence.frontend.ncs.reconcile-on-recovery'
26
24
  }
27
25
  };
28
26
  var filterFeatureFlagNames = function filterFeatureFlagNames(flags) {
@@ -9,7 +9,6 @@ exports.createSocketIOSocket = createSocketIOSocket;
9
9
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
10
10
  var _provider = require("./provider");
11
11
  var _socket = require("socket.io-client");
12
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
13
12
  var _utils = require("./helpers/utils");
14
13
  var _config = require("./config");
15
14
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
@@ -17,54 +16,20 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
17
16
  function createSocketIOSocket(url, auth, productInfo) {
18
17
  var _URL = new URL(url),
19
18
  pathname = _URL.pathname;
20
- if ((0, _platformFeatureFlags.getBooleanFF)('platform.editor.ncs.try-connect-websocket-first')) {
21
- var socket = (0, _socket.io)(url, {
22
- reconnectionDelayMax: _config.SOCKET_IO_OPTIONS.RECONNECTION_DELAY_MAX,
23
- reconnectionDelay: _config.SOCKET_IO_OPTIONS.RECONNECTION_DELAY,
24
- randomizationFactor: _config.SOCKET_IO_OPTIONS.RANDOMIZATION_FACTOR,
25
- closeOnBeforeunload: false,
26
- withCredentials: true,
27
- transports: ['websocket'],
28
- path: "/".concat(pathname.split('/')[1], "/socket.io"),
29
- auth: auth,
30
- extraHeaders: {
31
- 'x-product': (0, _utils.getProduct)(productInfo),
32
- 'x-subproduct': (0, _utils.getSubProduct)(productInfo)
33
- }
34
- });
35
- socket.on('connect_error', function (error) {
36
- // There is no good documentation about this error, howevert this is how socket.io is emiting the websocket error
37
- // see: https://github.com/socketio/engine.io-client/blob/6.0.x/lib/transports/websocket.ts#L116
38
- var isWebSocketError = (error.message || '') === 'websocket error';
39
-
40
- // Neither this TransportError type is well documented
41
- // see: https://github.com/socketio/engine.io-client/blob/main/lib/transport.ts#L11
42
- var isTransportError =
43
- // @ts-expect-error
44
- error.type === 'TransportError';
45
-
46
- // We are checking both situations as a safe measure
47
- if (isWebSocketError || isTransportError) {
48
- socket.io.opts.transports = ['polling', 'websocket'];
49
- }
50
- });
51
- return socket;
52
- } else {
53
- return (0, _socket.io)(url, {
54
- reconnectionDelayMax: _config.SOCKET_IO_OPTIONS.RECONNECTION_DELAY_MAX,
55
- reconnectionDelay: _config.SOCKET_IO_OPTIONS.RECONNECTION_DELAY,
56
- randomizationFactor: _config.SOCKET_IO_OPTIONS.RANDOMIZATION_FACTOR,
57
- closeOnBeforeunload: false,
58
- withCredentials: true,
59
- transports: ['polling', 'websocket'],
60
- path: "/".concat(pathname.split('/')[1], "/socket.io"),
61
- auth: auth,
62
- extraHeaders: {
63
- 'x-product': (0, _utils.getProduct)(productInfo),
64
- 'x-subproduct': (0, _utils.getSubProduct)(productInfo)
65
- }
66
- });
67
- }
19
+ return (0, _socket.io)(url, {
20
+ reconnectionDelayMax: _config.SOCKET_IO_OPTIONS.RECONNECTION_DELAY_MAX,
21
+ reconnectionDelay: _config.SOCKET_IO_OPTIONS.RECONNECTION_DELAY,
22
+ randomizationFactor: _config.SOCKET_IO_OPTIONS.RANDOMIZATION_FACTOR,
23
+ closeOnBeforeunload: false,
24
+ withCredentials: true,
25
+ transports: ['polling', 'websocket'],
26
+ path: "/".concat(pathname.split('/')[1], "/socket.io"),
27
+ auth: auth,
28
+ extraHeaders: {
29
+ 'x-product': (0, _utils.getProduct)(productInfo),
30
+ 'x-subproduct': (0, _utils.getSubProduct)(productInfo)
31
+ }
32
+ });
68
33
  }
69
34
  function createSocketIOCollabProvider(config) {
70
35
  return new _provider.Provider(_objectSpread(_objectSpread({}, config), {}, {
@@ -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.28.6";
8
+ var version = exports.version = "9.29.0";
9
9
  var nextMajorVersion = exports.nextMajorVersion = function nextMajorVersion() {
10
10
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
11
11
  };
@@ -1,8 +1,7 @@
1
1
  const defaultNCSFeatureFlags = {
2
2
  testFF: false,
3
3
  blockViewOnly: false,
4
- reconcileOnRecovery: false,
5
- connectWebsocketFirst: false
4
+ reconcileOnRecovery: false
6
5
  };
7
6
 
8
7
  /**
@@ -12,8 +11,7 @@ const productKeys = {
12
11
  confluence: {
13
12
  testFF: 'confluence.frontend.collab.provider.testFF',
14
13
  blockViewOnly: 'confluence.frontend.ncs.block-view-only',
15
- reconcileOnRecovery: 'confluence.frontend.ncs.reconcile-on-recovery',
16
- connectWebsocketFirst: 'confluence.frontend.ncs.connect-websocket-first'
14
+ reconcileOnRecovery: 'confluence.frontend.ncs.reconcile-on-recovery'
17
15
  }
18
16
  };
19
17
  const filterFeatureFlagNames = flags => {
@@ -1,60 +1,25 @@
1
1
  import { Provider } from './provider';
2
2
  import { io } from 'socket.io-client';
3
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
4
3
  import { getProduct, getSubProduct } from './helpers/utils';
5
4
  import { SOCKET_IO_OPTIONS } from './config';
6
5
  export function createSocketIOSocket(url, auth, productInfo) {
7
6
  const {
8
7
  pathname
9
8
  } = new URL(url);
10
- if (getBooleanFF('platform.editor.ncs.try-connect-websocket-first')) {
11
- const socket = io(url, {
12
- reconnectionDelayMax: SOCKET_IO_OPTIONS.RECONNECTION_DELAY_MAX,
13
- reconnectionDelay: SOCKET_IO_OPTIONS.RECONNECTION_DELAY,
14
- randomizationFactor: SOCKET_IO_OPTIONS.RANDOMIZATION_FACTOR,
15
- closeOnBeforeunload: false,
16
- withCredentials: true,
17
- transports: ['websocket'],
18
- path: `/${pathname.split('/')[1]}/socket.io`,
19
- auth,
20
- extraHeaders: {
21
- 'x-product': getProduct(productInfo),
22
- 'x-subproduct': getSubProduct(productInfo)
23
- }
24
- });
25
- socket.on('connect_error', error => {
26
- // There is no good documentation about this error, howevert this is how socket.io is emiting the websocket error
27
- // see: https://github.com/socketio/engine.io-client/blob/6.0.x/lib/transports/websocket.ts#L116
28
- const isWebSocketError = (error.message || '') === 'websocket error';
29
-
30
- // Neither this TransportError type is well documented
31
- // see: https://github.com/socketio/engine.io-client/blob/main/lib/transport.ts#L11
32
- const isTransportError =
33
- // @ts-expect-error
34
- error.type === 'TransportError';
35
-
36
- // We are checking both situations as a safe measure
37
- if (isWebSocketError || isTransportError) {
38
- socket.io.opts.transports = ['polling', 'websocket'];
39
- }
40
- });
41
- return socket;
42
- } else {
43
- return io(url, {
44
- reconnectionDelayMax: SOCKET_IO_OPTIONS.RECONNECTION_DELAY_MAX,
45
- reconnectionDelay: SOCKET_IO_OPTIONS.RECONNECTION_DELAY,
46
- randomizationFactor: SOCKET_IO_OPTIONS.RANDOMIZATION_FACTOR,
47
- closeOnBeforeunload: false,
48
- withCredentials: true,
49
- transports: ['polling', 'websocket'],
50
- path: `/${pathname.split('/')[1]}/socket.io`,
51
- auth,
52
- extraHeaders: {
53
- 'x-product': getProduct(productInfo),
54
- 'x-subproduct': getSubProduct(productInfo)
55
- }
56
- });
57
- }
9
+ return io(url, {
10
+ reconnectionDelayMax: SOCKET_IO_OPTIONS.RECONNECTION_DELAY_MAX,
11
+ reconnectionDelay: SOCKET_IO_OPTIONS.RECONNECTION_DELAY,
12
+ randomizationFactor: SOCKET_IO_OPTIONS.RANDOMIZATION_FACTOR,
13
+ closeOnBeforeunload: false,
14
+ withCredentials: true,
15
+ transports: ['polling', 'websocket'],
16
+ path: `/${pathname.split('/')[1]}/socket.io`,
17
+ auth,
18
+ extraHeaders: {
19
+ 'x-product': getProduct(productInfo),
20
+ 'x-subproduct': getSubProduct(productInfo)
21
+ }
22
+ });
58
23
  }
59
24
  export function createSocketIOCollabProvider(config) {
60
25
  return new Provider({
@@ -1,5 +1,5 @@
1
1
  export const name = "@atlaskit/collab-provider";
2
- export const version = "9.28.6";
2
+ export const version = "9.29.0";
3
3
  export const nextMajorVersion = () => {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };
@@ -2,8 +2,7 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
2
  var defaultNCSFeatureFlags = {
3
3
  testFF: false,
4
4
  blockViewOnly: false,
5
- reconcileOnRecovery: false,
6
- connectWebsocketFirst: false
5
+ reconcileOnRecovery: false
7
6
  };
8
7
 
9
8
  /**
@@ -13,8 +12,7 @@ var productKeys = {
13
12
  confluence: {
14
13
  testFF: 'confluence.frontend.collab.provider.testFF',
15
14
  blockViewOnly: 'confluence.frontend.ncs.block-view-only',
16
- reconcileOnRecovery: 'confluence.frontend.ncs.reconcile-on-recovery',
17
- connectWebsocketFirst: 'confluence.frontend.ncs.connect-websocket-first'
15
+ reconcileOnRecovery: 'confluence.frontend.ncs.reconcile-on-recovery'
18
16
  }
19
17
  };
20
18
  var filterFeatureFlagNames = function filterFeatureFlagNames(flags) {
@@ -3,60 +3,25 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
3
3
  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; }
4
4
  import { Provider } from './provider';
5
5
  import { io } from 'socket.io-client';
6
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
7
6
  import { getProduct, getSubProduct } from './helpers/utils';
8
7
  import { SOCKET_IO_OPTIONS } from './config';
9
8
  export function createSocketIOSocket(url, auth, productInfo) {
10
9
  var _URL = new URL(url),
11
10
  pathname = _URL.pathname;
12
- if (getBooleanFF('platform.editor.ncs.try-connect-websocket-first')) {
13
- var socket = io(url, {
14
- reconnectionDelayMax: SOCKET_IO_OPTIONS.RECONNECTION_DELAY_MAX,
15
- reconnectionDelay: SOCKET_IO_OPTIONS.RECONNECTION_DELAY,
16
- randomizationFactor: SOCKET_IO_OPTIONS.RANDOMIZATION_FACTOR,
17
- closeOnBeforeunload: false,
18
- withCredentials: true,
19
- transports: ['websocket'],
20
- path: "/".concat(pathname.split('/')[1], "/socket.io"),
21
- auth: auth,
22
- extraHeaders: {
23
- 'x-product': getProduct(productInfo),
24
- 'x-subproduct': getSubProduct(productInfo)
25
- }
26
- });
27
- socket.on('connect_error', function (error) {
28
- // There is no good documentation about this error, howevert this is how socket.io is emiting the websocket error
29
- // see: https://github.com/socketio/engine.io-client/blob/6.0.x/lib/transports/websocket.ts#L116
30
- var isWebSocketError = (error.message || '') === 'websocket error';
31
-
32
- // Neither this TransportError type is well documented
33
- // see: https://github.com/socketio/engine.io-client/blob/main/lib/transport.ts#L11
34
- var isTransportError =
35
- // @ts-expect-error
36
- error.type === 'TransportError';
37
-
38
- // We are checking both situations as a safe measure
39
- if (isWebSocketError || isTransportError) {
40
- socket.io.opts.transports = ['polling', 'websocket'];
41
- }
42
- });
43
- return socket;
44
- } else {
45
- return io(url, {
46
- reconnectionDelayMax: SOCKET_IO_OPTIONS.RECONNECTION_DELAY_MAX,
47
- reconnectionDelay: SOCKET_IO_OPTIONS.RECONNECTION_DELAY,
48
- randomizationFactor: SOCKET_IO_OPTIONS.RANDOMIZATION_FACTOR,
49
- closeOnBeforeunload: false,
50
- withCredentials: true,
51
- transports: ['polling', 'websocket'],
52
- path: "/".concat(pathname.split('/')[1], "/socket.io"),
53
- auth: auth,
54
- extraHeaders: {
55
- 'x-product': getProduct(productInfo),
56
- 'x-subproduct': getSubProduct(productInfo)
57
- }
58
- });
59
- }
11
+ return io(url, {
12
+ reconnectionDelayMax: SOCKET_IO_OPTIONS.RECONNECTION_DELAY_MAX,
13
+ reconnectionDelay: SOCKET_IO_OPTIONS.RECONNECTION_DELAY,
14
+ randomizationFactor: SOCKET_IO_OPTIONS.RANDOMIZATION_FACTOR,
15
+ closeOnBeforeunload: false,
16
+ withCredentials: true,
17
+ transports: ['polling', 'websocket'],
18
+ path: "/".concat(pathname.split('/')[1], "/socket.io"),
19
+ auth: auth,
20
+ extraHeaders: {
21
+ 'x-product': getProduct(productInfo),
22
+ 'x-subproduct': getSubProduct(productInfo)
23
+ }
24
+ });
60
25
  }
61
26
  export function createSocketIOCollabProvider(config) {
62
27
  return new Provider(_objectSpread(_objectSpread({}, config), {}, {
@@ -1,5 +1,5 @@
1
1
  export var name = "@atlaskit/collab-provider";
2
- export var version = "9.28.6";
2
+ export var version = "9.29.0";
3
3
  export var nextMajorVersion = function nextMajorVersion() {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };
@@ -2,7 +2,6 @@ export interface NCSFeatureFlags {
2
2
  testFF?: boolean;
3
3
  blockViewOnly?: boolean;
4
4
  reconcileOnRecovery?: boolean;
5
- connectWebsocketFirst?: boolean;
6
5
  }
7
6
  export interface WithNCSFeatureFlags {
8
7
  featureFlags?: NCSFeatureFlags;
@@ -2,7 +2,6 @@ export interface NCSFeatureFlags {
2
2
  testFF?: boolean;
3
3
  blockViewOnly?: boolean;
4
4
  reconcileOnRecovery?: boolean;
5
- connectWebsocketFirst?: boolean;
6
5
  }
7
6
  export interface WithNCSFeatureFlags {
8
7
  featureFlags?: NCSFeatureFlags;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/collab-provider",
3
- "version": "9.28.6",
3
+ "version": "9.29.0",
4
4
  "description": "A provider for collaborative editing.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -39,11 +39,11 @@
39
39
  "dependencies": {
40
40
  "@atlaskit/analytics-gas-types": "^5.1.0",
41
41
  "@atlaskit/analytics-listeners": "^8.9.0",
42
- "@atlaskit/editor-common": "^80.0.0",
43
- "@atlaskit/editor-json-transformer": "^8.12.0",
42
+ "@atlaskit/editor-common": "^80.1.0",
43
+ "@atlaskit/editor-json-transformer": "^8.13.0",
44
44
  "@atlaskit/editor-prosemirror": "4.0.1",
45
45
  "@atlaskit/platform-feature-flags": "^0.2.0",
46
- "@atlaskit/prosemirror-collab": "^0.3.0",
46
+ "@atlaskit/prosemirror-collab": "^0.4.0",
47
47
  "@atlaskit/ufo": "^0.2.0",
48
48
  "@atlaskit/util-service-support": "^6.2.0",
49
49
  "@babel/runtime": "^7.0.0",
@@ -66,7 +66,7 @@
66
66
  }
67
67
  },
68
68
  "devDependencies": {
69
- "@atlaskit/adf-schema": "^36.1.0",
69
+ "@atlaskit/adf-schema": "^36.3.0",
70
70
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
71
71
  "@atlassian/feature-flags-test-utils": "^0.2.0",
72
72
  "typescript": "~5.4.2"
@@ -76,9 +76,6 @@
76
76
  "platform.editor.live-pages-expand-divergence": {
77
77
  "type": "boolean"
78
78
  },
79
- "platform.editor.ncs.try-connect-websocket-first": {
80
- "type": "boolean"
81
- },
82
79
  "platform.editor.ncs.log-error-stacks": {
83
80
  "type": "boolean"
84
81
  }