@atlaskit/collab-provider 21.2.1 → 22.0.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 +17 -0
- package/dist/cjs/socket-io-provider.js +1 -8
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/socket-io-provider.js +1 -8
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/socket-io-provider.js +1 -8
- package/dist/esm/version-wrapper.js +1 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/collab-provider
|
|
2
2
|
|
|
3
|
+
## 22.0.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`febd7e6f80cd1`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/febd7e6f80cd1) - -
|
|
8
|
+
`collab-provider` Cleanup experiment platform_editor_to_use_pmr_for_collab_edit_none_ic
|
|
9
|
+
- `editor-core` Update collaborative editing example so non dev connections have to provide PMR
|
|
10
|
+
path
|
|
11
|
+
- `tmp-editor-statsig` Remove platform_editor_to_use_pmr_for_collab_edit_none_ic from config
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
|
|
14
|
+
## 21.2.2
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
|
|
3
20
|
## 21.2.1
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -9,7 +9,6 @@ exports.createSocketIOSocket = createSocketIOSocket;
|
|
|
9
9
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
10
|
var _socket = require("socket.io-client");
|
|
11
11
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
12
|
-
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
13
12
|
var _provider = require("./provider");
|
|
14
13
|
var _utils = require("./helpers/utils");
|
|
15
14
|
var _config = require("./config");
|
|
@@ -22,7 +21,6 @@ function createSocketIOSocket(url, auth, productInfo, isPresenceOnly, analyticsH
|
|
|
22
21
|
var socketIOOptions = _config.SOCKET_IO_OPTIONS;
|
|
23
22
|
// Polling first
|
|
24
23
|
var transports = ['polling', 'websocket'];
|
|
25
|
-
var usePMR = false;
|
|
26
24
|
if (isPresenceOnly) {
|
|
27
25
|
// Presence-specific configuration
|
|
28
26
|
if ((0, _platformFeatureFlags.fg)('platform-editor-presence-websocket-only')) {
|
|
@@ -31,12 +29,7 @@ function createSocketIOSocket(url, auth, productInfo, isPresenceOnly, analyticsH
|
|
|
31
29
|
transports = ['websocket'];
|
|
32
30
|
}
|
|
33
31
|
socketIOOptions = _config.SOCKET_IO_OPTIONS_WITH_HIGH_JITTER;
|
|
34
|
-
usePMR = true;
|
|
35
32
|
} else {
|
|
36
|
-
// PMR routing for edit traffic
|
|
37
|
-
if ((0, _expValEquals.expValEquals)('platform_editor_to_use_pmr_for_collab_edit_none_ic', 'isEnabled', true, false)) {
|
|
38
|
-
usePMR = true;
|
|
39
|
-
}
|
|
40
33
|
if ((0, _utils.isGCPtenant)(hostname) && (0, _platformFeatureFlags.fg)('collab_edit_via_websocket_only_for_gcp')) {
|
|
41
34
|
transports = ['websocket'];
|
|
42
35
|
}
|
|
@@ -53,7 +46,7 @@ function createSocketIOSocket(url, auth, productInfo, isPresenceOnly, analyticsH
|
|
|
53
46
|
closeOnBeforeunload: false,
|
|
54
47
|
withCredentials: true,
|
|
55
48
|
transports: transports,
|
|
56
|
-
path:
|
|
49
|
+
path: path ? "".concat(path, "/socket.io") : "/".concat(pathname.split('/')[1], "/socket.io"),
|
|
57
50
|
auth: auth,
|
|
58
51
|
extraHeaders: extraHeaders,
|
|
59
52
|
query: {
|
|
@@ -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 = "21.2.
|
|
8
|
+
var version = exports.version = "21.2.2";
|
|
9
9
|
var nextMajorVersion = exports.nextMajorVersion = function nextMajorVersion() {
|
|
10
10
|
return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
|
|
11
11
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { io } from 'socket.io-client';
|
|
2
2
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
4
3
|
import { Provider } from './provider';
|
|
5
4
|
import { getProduct, getSubProduct, isGCPtenant } from './helpers/utils';
|
|
6
5
|
import { SOCKET_IO_OPTIONS, SOCKET_IO_OPTIONS_WITH_HIGH_JITTER } from './config';
|
|
@@ -12,7 +11,6 @@ export function createSocketIOSocket(url, auth, productInfo, isPresenceOnly, ana
|
|
|
12
11
|
let socketIOOptions = SOCKET_IO_OPTIONS;
|
|
13
12
|
// Polling first
|
|
14
13
|
let transports = ['polling', 'websocket'];
|
|
15
|
-
let usePMR = false;
|
|
16
14
|
if (isPresenceOnly) {
|
|
17
15
|
// Presence-specific configuration
|
|
18
16
|
if (fg('platform-editor-presence-websocket-only')) {
|
|
@@ -21,12 +19,7 @@ export function createSocketIOSocket(url, auth, productInfo, isPresenceOnly, ana
|
|
|
21
19
|
transports = ['websocket'];
|
|
22
20
|
}
|
|
23
21
|
socketIOOptions = SOCKET_IO_OPTIONS_WITH_HIGH_JITTER;
|
|
24
|
-
usePMR = true;
|
|
25
22
|
} else {
|
|
26
|
-
// PMR routing for edit traffic
|
|
27
|
-
if (expValEquals('platform_editor_to_use_pmr_for_collab_edit_none_ic', 'isEnabled', true, false)) {
|
|
28
|
-
usePMR = true;
|
|
29
|
-
}
|
|
30
23
|
if (isGCPtenant(hostname) && fg('collab_edit_via_websocket_only_for_gcp')) {
|
|
31
24
|
transports = ['websocket'];
|
|
32
25
|
}
|
|
@@ -43,7 +36,7 @@ export function createSocketIOSocket(url, auth, productInfo, isPresenceOnly, ana
|
|
|
43
36
|
closeOnBeforeunload: false,
|
|
44
37
|
withCredentials: true,
|
|
45
38
|
transports,
|
|
46
|
-
path:
|
|
39
|
+
path: path ? `${path}/socket.io` : `/${pathname.split('/')[1]}/socket.io`,
|
|
47
40
|
auth,
|
|
48
41
|
extraHeaders,
|
|
49
42
|
query: {
|
|
@@ -3,7 +3,6 @@ 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 { io } from 'socket.io-client';
|
|
5
5
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
7
6
|
import { Provider } from './provider';
|
|
8
7
|
import { getProduct, getSubProduct, isGCPtenant } from './helpers/utils';
|
|
9
8
|
import { SOCKET_IO_OPTIONS, SOCKET_IO_OPTIONS_WITH_HIGH_JITTER } from './config';
|
|
@@ -14,7 +13,6 @@ export function createSocketIOSocket(url, auth, productInfo, isPresenceOnly, ana
|
|
|
14
13
|
var socketIOOptions = SOCKET_IO_OPTIONS;
|
|
15
14
|
// Polling first
|
|
16
15
|
var transports = ['polling', 'websocket'];
|
|
17
|
-
var usePMR = false;
|
|
18
16
|
if (isPresenceOnly) {
|
|
19
17
|
// Presence-specific configuration
|
|
20
18
|
if (fg('platform-editor-presence-websocket-only')) {
|
|
@@ -23,12 +21,7 @@ export function createSocketIOSocket(url, auth, productInfo, isPresenceOnly, ana
|
|
|
23
21
|
transports = ['websocket'];
|
|
24
22
|
}
|
|
25
23
|
socketIOOptions = SOCKET_IO_OPTIONS_WITH_HIGH_JITTER;
|
|
26
|
-
usePMR = true;
|
|
27
24
|
} else {
|
|
28
|
-
// PMR routing for edit traffic
|
|
29
|
-
if (expValEquals('platform_editor_to_use_pmr_for_collab_edit_none_ic', 'isEnabled', true, false)) {
|
|
30
|
-
usePMR = true;
|
|
31
|
-
}
|
|
32
25
|
if (isGCPtenant(hostname) && fg('collab_edit_via_websocket_only_for_gcp')) {
|
|
33
26
|
transports = ['websocket'];
|
|
34
27
|
}
|
|
@@ -45,7 +38,7 @@ export function createSocketIOSocket(url, auth, productInfo, isPresenceOnly, ana
|
|
|
45
38
|
closeOnBeforeunload: false,
|
|
46
39
|
withCredentials: true,
|
|
47
40
|
transports: transports,
|
|
48
|
-
path:
|
|
41
|
+
path: path ? "".concat(path, "/socket.io") : "/".concat(pathname.split('/')[1], "/socket.io"),
|
|
49
42
|
auth: auth,
|
|
50
43
|
extraHeaders: extraHeaders,
|
|
51
44
|
query: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/collab-provider",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "22.0.0",
|
|
4
4
|
"description": "A provider for collaborative editing.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"team": "Editor: Collaboration"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@atlaskit/adf-utils": "^20.
|
|
21
|
+
"@atlaskit/adf-utils": "^20.5.0",
|
|
22
22
|
"@atlaskit/analytics-gas-types": "^6.0.0",
|
|
23
23
|
"@atlaskit/analytics-listeners": "^11.1.0",
|
|
24
24
|
"@atlaskit/anonymous-assets": "^2.8.0",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"@atlaskit/platform-feature-flags": "^2.1.0",
|
|
30
30
|
"@atlaskit/prosemirror-collab": "^1.0.0",
|
|
31
31
|
"@atlaskit/react-ufo": "^7.3.0",
|
|
32
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
32
|
+
"@atlaskit/tmp-editor-statsig": "^138.0.0",
|
|
33
33
|
"@atlaskit/ufo": "^1.0.0",
|
|
34
34
|
"@atlaskit/util-service-support": "^7.2.0",
|
|
35
35
|
"@babel/runtime": "^7.0.0",
|
|
@@ -55,8 +55,8 @@
|
|
|
55
55
|
}
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
|
-
"@atlaskit/adf-schema": "^56.
|
|
59
|
-
"@atlassian/a11y-jest-testing": "^0.
|
|
58
|
+
"@atlaskit/adf-schema": "^56.5.0",
|
|
59
|
+
"@atlassian/a11y-jest-testing": "^0.14.0",
|
|
60
60
|
"@atlassian/feature-flags-test-utils": "^1.2.0"
|
|
61
61
|
},
|
|
62
62
|
"platform-feature-flags": {
|
|
@@ -71,6 +71,6 @@
|
|
|
71
71
|
}
|
|
72
72
|
},
|
|
73
73
|
"peerDependencies": {
|
|
74
|
-
"@atlaskit/editor-common": "^
|
|
74
|
+
"@atlaskit/editor-common": "^117.0.0"
|
|
75
75
|
}
|
|
76
76
|
}
|