@atlaskit/collab-provider 10.18.0 → 10.19.1
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 +14 -0
- package/afm-cc/tsconfig.json +1 -1
- package/dist/cjs/socket-io-provider.js +15 -5
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/socket-io-provider.js +15 -5
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/socket-io-provider.js +15 -5
- package/dist/esm/version-wrapper.js +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/collab-provider
|
|
2
2
|
|
|
3
|
+
## 10.19.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 10.19.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [#165804](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/165804)
|
|
14
|
+
[`0480ffe1dfd8e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0480ffe1dfd8e) -
|
|
15
|
+
Use WebSocket first, polling later strategy, eliminate the need of the cloudId check
|
|
16
|
+
|
|
3
17
|
## 10.18.0
|
|
4
18
|
|
|
5
19
|
### Minor Changes
|
package/afm-cc/tsconfig.json
CHANGED
|
@@ -17,15 +17,15 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
17
17
|
function createSocketIOSocket(url, auth, productInfo, isPresenceOnly) {
|
|
18
18
|
var _URL = new URL(url),
|
|
19
19
|
pathname = _URL.pathname;
|
|
20
|
-
//
|
|
20
|
+
// Polling first
|
|
21
21
|
var transports = ['polling', 'websocket'];
|
|
22
22
|
// Only limit this change to Presence only
|
|
23
|
-
// Only make the change to those tenants who do not need the polling
|
|
24
|
-
// WebSocket only is under a FG
|
|
25
23
|
if (isPresenceOnly && (0, _platformFeatureFlags.fg)('platform-editor-presence-websocket-only')) {
|
|
26
|
-
transports
|
|
24
|
+
// https://socket.io/docs/v4/client-options/#transports
|
|
25
|
+
// WebSocket first, if fails, try polling
|
|
26
|
+
transports = ['websocket', 'polling'];
|
|
27
27
|
}
|
|
28
|
-
|
|
28
|
+
var client = (0, _socket.io)(url, {
|
|
29
29
|
reconnectionDelayMax: _config.SOCKET_IO_OPTIONS.RECONNECTION_DELAY_MAX,
|
|
30
30
|
reconnectionDelay: _config.SOCKET_IO_OPTIONS.RECONNECTION_DELAY,
|
|
31
31
|
randomizationFactor: _config.SOCKET_IO_OPTIONS.RANDOMIZATION_FACTOR,
|
|
@@ -39,6 +39,16 @@ function createSocketIOSocket(url, auth, productInfo, isPresenceOnly) {
|
|
|
39
39
|
'x-subproduct': (0, _utils.getSubProduct)(productInfo)
|
|
40
40
|
}
|
|
41
41
|
});
|
|
42
|
+
|
|
43
|
+
// Only limit this change to Presence only
|
|
44
|
+
if (isPresenceOnly && (0, _platformFeatureFlags.fg)('platform-editor-presence-websocket-only')) {
|
|
45
|
+
// https://socket.io/docs/v4/client-options/#transports
|
|
46
|
+
client.on('connect_error', function () {
|
|
47
|
+
// revert to classic upgrade
|
|
48
|
+
client.io.opts.transports = ['polling', 'websocket'];
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
return client;
|
|
42
52
|
}
|
|
43
53
|
function createSocketIOCollabProvider(config) {
|
|
44
54
|
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 = "10.
|
|
8
|
+
var version = exports.version = "10.19.1";
|
|
9
9
|
var nextMajorVersion = exports.nextMajorVersion = function nextMajorVersion() {
|
|
10
10
|
return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
|
|
11
11
|
};
|
|
@@ -7,15 +7,15 @@ export function createSocketIOSocket(url, auth, productInfo, isPresenceOnly) {
|
|
|
7
7
|
const {
|
|
8
8
|
pathname
|
|
9
9
|
} = new URL(url);
|
|
10
|
-
//
|
|
10
|
+
// Polling first
|
|
11
11
|
let transports = ['polling', 'websocket'];
|
|
12
12
|
// Only limit this change to Presence only
|
|
13
|
-
// Only make the change to those tenants who do not need the polling
|
|
14
|
-
// WebSocket only is under a FG
|
|
15
13
|
if (isPresenceOnly && fg('platform-editor-presence-websocket-only')) {
|
|
16
|
-
transports
|
|
14
|
+
// https://socket.io/docs/v4/client-options/#transports
|
|
15
|
+
// WebSocket first, if fails, try polling
|
|
16
|
+
transports = ['websocket', 'polling'];
|
|
17
17
|
}
|
|
18
|
-
|
|
18
|
+
const client = io(url, {
|
|
19
19
|
reconnectionDelayMax: SOCKET_IO_OPTIONS.RECONNECTION_DELAY_MAX,
|
|
20
20
|
reconnectionDelay: SOCKET_IO_OPTIONS.RECONNECTION_DELAY,
|
|
21
21
|
randomizationFactor: SOCKET_IO_OPTIONS.RANDOMIZATION_FACTOR,
|
|
@@ -29,6 +29,16 @@ export function createSocketIOSocket(url, auth, productInfo, isPresenceOnly) {
|
|
|
29
29
|
'x-subproduct': getSubProduct(productInfo)
|
|
30
30
|
}
|
|
31
31
|
});
|
|
32
|
+
|
|
33
|
+
// Only limit this change to Presence only
|
|
34
|
+
if (isPresenceOnly && fg('platform-editor-presence-websocket-only')) {
|
|
35
|
+
// https://socket.io/docs/v4/client-options/#transports
|
|
36
|
+
client.on('connect_error', () => {
|
|
37
|
+
// revert to classic upgrade
|
|
38
|
+
client.io.opts.transports = ['polling', 'websocket'];
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
return client;
|
|
32
42
|
}
|
|
33
43
|
export function createSocketIOCollabProvider(config) {
|
|
34
44
|
return new Provider({
|
|
@@ -9,15 +9,15 @@ import { SOCKET_IO_OPTIONS } from './config';
|
|
|
9
9
|
export function createSocketIOSocket(url, auth, productInfo, isPresenceOnly) {
|
|
10
10
|
var _URL = new URL(url),
|
|
11
11
|
pathname = _URL.pathname;
|
|
12
|
-
//
|
|
12
|
+
// Polling first
|
|
13
13
|
var transports = ['polling', 'websocket'];
|
|
14
14
|
// Only limit this change to Presence only
|
|
15
|
-
// Only make the change to those tenants who do not need the polling
|
|
16
|
-
// WebSocket only is under a FG
|
|
17
15
|
if (isPresenceOnly && fg('platform-editor-presence-websocket-only')) {
|
|
18
|
-
transports
|
|
16
|
+
// https://socket.io/docs/v4/client-options/#transports
|
|
17
|
+
// WebSocket first, if fails, try polling
|
|
18
|
+
transports = ['websocket', 'polling'];
|
|
19
19
|
}
|
|
20
|
-
|
|
20
|
+
var client = io(url, {
|
|
21
21
|
reconnectionDelayMax: SOCKET_IO_OPTIONS.RECONNECTION_DELAY_MAX,
|
|
22
22
|
reconnectionDelay: SOCKET_IO_OPTIONS.RECONNECTION_DELAY,
|
|
23
23
|
randomizationFactor: SOCKET_IO_OPTIONS.RANDOMIZATION_FACTOR,
|
|
@@ -31,6 +31,16 @@ export function createSocketIOSocket(url, auth, productInfo, isPresenceOnly) {
|
|
|
31
31
|
'x-subproduct': getSubProduct(productInfo)
|
|
32
32
|
}
|
|
33
33
|
});
|
|
34
|
+
|
|
35
|
+
// Only limit this change to Presence only
|
|
36
|
+
if (isPresenceOnly && fg('platform-editor-presence-websocket-only')) {
|
|
37
|
+
// https://socket.io/docs/v4/client-options/#transports
|
|
38
|
+
client.on('connect_error', function () {
|
|
39
|
+
// revert to classic upgrade
|
|
40
|
+
client.io.opts.transports = ['polling', 'websocket'];
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
return client;
|
|
34
44
|
}
|
|
35
45
|
export function createSocketIOCollabProvider(config) {
|
|
36
46
|
return new Provider(_objectSpread(_objectSpread({}, config), {}, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/collab-provider",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.19.1",
|
|
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/editor-common": "^106.
|
|
38
|
+
"@atlaskit/editor-common": "^106.5.0",
|
|
39
39
|
"@atlaskit/editor-json-transformer": "^8.24.0",
|
|
40
40
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
41
41
|
"@atlaskit/feature-gate-js-client": "^5.3.0",
|
|
42
42
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
43
43
|
"@atlaskit/prosemirror-collab": "^0.17.0",
|
|
44
44
|
"@atlaskit/react-ufo": "^3.13.0",
|
|
45
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
45
|
+
"@atlaskit/tmp-editor-statsig": "^6.0.0",
|
|
46
46
|
"@atlaskit/ufo": "^0.4.0",
|
|
47
47
|
"@atlaskit/util-service-support": "^6.3.0",
|
|
48
48
|
"@babel/runtime": "^7.0.0",
|