@atlaskit/editor-plugin-media 18.1.5 → 18.1.7
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 +44 -0
- package/dist/cjs/mediaPlugin.js +2 -2
- package/dist/cjs/nodeviews/mediaNodeUpdater.js +3 -3
- package/dist/cjs/pm-plugins/main.js +2 -2
- package/dist/es2019/mediaPlugin.js +2 -2
- package/dist/es2019/nodeviews/mediaNodeUpdater.js +1 -1
- package/dist/es2019/pm-plugins/main.js +1 -1
- package/dist/esm/mediaPlugin.js +2 -2
- package/dist/esm/nodeviews/mediaNodeUpdater.js +1 -1
- package/dist/esm/pm-plugins/main.js +1 -1
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,49 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-media
|
|
2
2
|
|
|
3
|
+
## 18.1.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`0927c3666c010`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0927c3666c010) -
|
|
8
|
+
Upgrade `uuid` from `3.x` to `11.1.1` to remediate GHSA-w5hq-g745-h8pq / SNYK-JS-UUID-16133035.
|
|
9
|
+
|
|
10
|
+
`uuid@11` removed the deep subpath exports (`uuid/v4`, `uuid/v1`, `uuid/v5`) and the default
|
|
11
|
+
export, so all internal call sites were migrated to named imports:
|
|
12
|
+
|
|
13
|
+
```diff
|
|
14
|
+
-import uuid from 'uuid/v4';
|
|
15
|
+
+import { v4 as uuid } from 'uuid';
|
|
16
|
+
|
|
17
|
+
-import uuid from 'uuid';
|
|
18
|
+
+import { v4 as uuid } from 'uuid';
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
With the exception of `@atlassian/integrations` (below), this is an internal implementation change
|
|
22
|
+
only - no public API, export, or entrypoint changed. UUID generation behaviour is unchanged
|
|
23
|
+
(`uuid@3`'s default export was already `v4`).
|
|
24
|
+
|
|
25
|
+
`@atlassian/integrations` declares `uuid` as a peer dependency, so its declared range moved from
|
|
26
|
+
`^3.1.0` to `^11.1.1`. That is a peer dependency declaration change, hence `minor` rather than
|
|
27
|
+
`patch` for that package.
|
|
28
|
+
|
|
29
|
+
The following `platform/packages/ai-mate` packages were also touched, but are all `private: true`
|
|
30
|
+
and so are intentionally not listed in the frontmatter above:
|
|
31
|
+
- `@atlassian/csm-assistance-service` - bumped its explicit `uuid` dependency from `npm:^9.0.0` to
|
|
32
|
+
`npm:^11.1.1` (`9.0.1` is also within the advisory's affected range).
|
|
33
|
+
- `@atlassian/csm-guidance-config` - example helper only, migrated to the named `uuid` import.
|
|
34
|
+
- `@atlassian/csm-ui-components` - example helper only, migrated to the named `uuid` import.
|
|
35
|
+
|
|
36
|
+
- Updated dependencies
|
|
37
|
+
|
|
38
|
+
## 18.1.6
|
|
39
|
+
|
|
40
|
+
### Patch Changes
|
|
41
|
+
|
|
42
|
+
- [`a6c26b16402ca`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a6c26b16402ca) -
|
|
43
|
+
Migrate nine dogfooding editor experiments from `@atlaskit/tmp-editor-statsig` to the Platform
|
|
44
|
+
experiment API and move their tests to Platform experiment mocks.
|
|
45
|
+
- Updated dependencies
|
|
46
|
+
|
|
3
47
|
## 18.1.5
|
|
4
48
|
|
|
5
49
|
### Patch Changes
|
package/dist/cjs/mediaPlugin.js
CHANGED
|
@@ -16,8 +16,8 @@ var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
|
|
|
16
16
|
var _toolbarFlagCheck = require("@atlaskit/editor-common/toolbar-flag-check");
|
|
17
17
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
18
18
|
var _mediaCommon = require("@atlaskit/media-common");
|
|
19
|
+
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
19
20
|
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
20
|
-
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
21
21
|
var _lazyMediaGroup = require("./nodeviews/lazy-media-group");
|
|
22
22
|
var _lazyMediaInline = require("./nodeviews/lazy-media-inline");
|
|
23
23
|
var _mediaNodeView = require("./nodeviews/mediaNodeView");
|
|
@@ -134,7 +134,7 @@ var mediaPlugin = exports.mediaPlugin = function mediaPlugin(_ref3) {
|
|
|
134
134
|
handleMediaNodeRenderError: function handleMediaNodeRenderError(node, reason, nestedUnder) {
|
|
135
135
|
var _api$analytics;
|
|
136
136
|
var isDuplicateError = false;
|
|
137
|
-
if ((0,
|
|
137
|
+
if ((0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_media_reliability_observability')) {
|
|
138
138
|
if (mediaErrorLocalIds.has(node.attrs.localId)) {
|
|
139
139
|
// we mark duplicate errors in the case of nested media nodes
|
|
140
140
|
// renderering to avoid firing multiple errored events for the same underlying issue,
|
|
@@ -11,7 +11,7 @@ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/
|
|
|
11
11
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
12
12
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
13
13
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
14
|
-
var
|
|
14
|
+
var _uuid = require("uuid");
|
|
15
15
|
var _setAttrs = require("@atlaskit/adf-schema/steps/set-attrs");
|
|
16
16
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
17
17
|
var _mediaSingle = require("@atlaskit/editor-common/media-single");
|
|
@@ -603,7 +603,7 @@ var MediaNodeUpdater = exports.MediaNodeUpdater = /*#__PURE__*/function () {
|
|
|
603
603
|
collection: currentCollectionName,
|
|
604
604
|
authProvider: uploadMediaClientConfig.authProvider,
|
|
605
605
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
606
|
-
occurrenceKey: (0,
|
|
606
|
+
occurrenceKey: (0, _uuid.v4)()
|
|
607
607
|
}
|
|
608
608
|
});
|
|
609
609
|
case 6:
|
|
@@ -755,7 +755,7 @@ var MediaNodeUpdater = exports.MediaNodeUpdater = /*#__PURE__*/function () {
|
|
|
755
755
|
collection: currentCollectionName,
|
|
756
756
|
authProvider: uploadMediaClientConfig.authProvider,
|
|
757
757
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
758
|
-
occurrenceKey: (0,
|
|
758
|
+
occurrenceKey: (0, _uuid.v4)()
|
|
759
759
|
},
|
|
760
760
|
traceContext: traceContext
|
|
761
761
|
});
|
|
@@ -14,7 +14,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
14
14
|
var _assert = _interopRequireDefault(require("assert"));
|
|
15
15
|
var _react = _interopRequireDefault(require("react"));
|
|
16
16
|
var _reactIntl = require("react-intl");
|
|
17
|
-
var _uuid =
|
|
17
|
+
var _uuid = require("uuid");
|
|
18
18
|
var _setAttrs = require("@atlaskit/adf-schema/steps/set-attrs");
|
|
19
19
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
20
20
|
var _browser = require("@atlaskit/editor-common/browser");
|
|
@@ -1186,7 +1186,7 @@ var createPlugin = exports.createPlugin = function createPlugin(_schema, options
|
|
|
1186
1186
|
return _view3.DecorationSet.create(state.doc, mediaNodes);
|
|
1187
1187
|
}
|
|
1188
1188
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
1189
|
-
var dropPlaceholderKey = (0, _uuid.
|
|
1189
|
+
var dropPlaceholderKey = (0, _uuid.v4)();
|
|
1190
1190
|
var dropPlaceholders = [_view3.Decoration.widget(pos, function () {
|
|
1191
1191
|
return createDropPlaceholder(intl, nodeViewPortalProviderAPI, dropPlaceholderKey, mediaOptions && mediaOptions.allowDropzoneDropLine);
|
|
1192
1192
|
}, {
|
|
@@ -7,8 +7,8 @@ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
|
7
7
|
import { areToolbarFlagsEnabled } from '@atlaskit/editor-common/toolbar-flag-check';
|
|
8
8
|
import { NodeSelection, PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
9
9
|
import { getMediaFeatureFlag } from '@atlaskit/media-common';
|
|
10
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
10
11
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
11
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
12
12
|
import { lazyMediaGroupView } from './nodeviews/lazy-media-group';
|
|
13
13
|
import { lazyMediaInlineView } from './nodeviews/lazy-media-inline';
|
|
14
14
|
import { ReactMediaNode } from './nodeviews/mediaNodeView';
|
|
@@ -126,7 +126,7 @@ export const mediaPlugin = ({
|
|
|
126
126
|
handleMediaNodeRenderError: (node, reason, nestedUnder) => {
|
|
127
127
|
var _api$analytics;
|
|
128
128
|
let isDuplicateError = false;
|
|
129
|
-
if (
|
|
129
|
+
if (isExperimentEnabled('platform_editor_media_reliability_observability')) {
|
|
130
130
|
if (mediaErrorLocalIds.has(node.attrs.localId)) {
|
|
131
131
|
// we mark duplicate errors in the case of nested media nodes
|
|
132
132
|
// renderering to avoid firing multiple errored events for the same underlying issue,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
3
|
-
import uuidV4 from 'uuid
|
|
3
|
+
import { v4 as uuidV4 } from 'uuid';
|
|
4
4
|
import { SetAttrsStep } from '@atlaskit/adf-schema/steps/set-attrs';
|
|
5
5
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
6
6
|
import { DEFAULT_IMAGE_HEIGHT, DEFAULT_IMAGE_WIDTH } from '@atlaskit/editor-common/media-single';
|
|
@@ -3,7 +3,7 @@ import assert from 'assert';
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { RawIntlProvider } from 'react-intl';
|
|
5
5
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
6
|
-
import uuid from 'uuid';
|
|
6
|
+
import { v4 as uuid } from 'uuid';
|
|
7
7
|
import { SetAttrsStep } from '@atlaskit/adf-schema/steps/set-attrs';
|
|
8
8
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
9
9
|
import { getBrowserInfo } from '@atlaskit/editor-common/browser';
|
package/dist/esm/mediaPlugin.js
CHANGED
|
@@ -10,8 +10,8 @@ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
|
10
10
|
import { areToolbarFlagsEnabled } from '@atlaskit/editor-common/toolbar-flag-check';
|
|
11
11
|
import { NodeSelection, PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
12
12
|
import { getMediaFeatureFlag } from '@atlaskit/media-common';
|
|
13
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
13
14
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
14
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
15
15
|
import { lazyMediaGroupView } from './nodeviews/lazy-media-group';
|
|
16
16
|
import { lazyMediaInlineView } from './nodeviews/lazy-media-inline';
|
|
17
17
|
import { ReactMediaNode } from './nodeviews/mediaNodeView';
|
|
@@ -125,7 +125,7 @@ export var mediaPlugin = function mediaPlugin(_ref3) {
|
|
|
125
125
|
handleMediaNodeRenderError: function handleMediaNodeRenderError(node, reason, nestedUnder) {
|
|
126
126
|
var _api$analytics;
|
|
127
127
|
var isDuplicateError = false;
|
|
128
|
-
if (
|
|
128
|
+
if (isExperimentEnabled('platform_editor_media_reliability_observability')) {
|
|
129
129
|
if (mediaErrorLocalIds.has(node.attrs.localId)) {
|
|
130
130
|
// we mark duplicate errors in the case of nested media nodes
|
|
131
131
|
// renderering to avoid firing multiple errored events for the same underlying issue,
|
|
@@ -9,7 +9,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
9
9
|
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; }
|
|
10
10
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
11
11
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
12
|
-
import uuidV4 from 'uuid
|
|
12
|
+
import { v4 as uuidV4 } from 'uuid';
|
|
13
13
|
import { SetAttrsStep } from '@atlaskit/adf-schema/steps/set-attrs';
|
|
14
14
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
15
15
|
import { DEFAULT_IMAGE_HEIGHT, DEFAULT_IMAGE_WIDTH } from '@atlaskit/editor-common/media-single';
|
|
@@ -12,7 +12,7 @@ import assert from 'assert';
|
|
|
12
12
|
import React from 'react';
|
|
13
13
|
import { RawIntlProvider } from 'react-intl';
|
|
14
14
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
15
|
-
import uuid from 'uuid';
|
|
15
|
+
import { v4 as uuid } from 'uuid';
|
|
16
16
|
import { SetAttrsStep } from '@atlaskit/adf-schema/steps/set-attrs';
|
|
17
17
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
18
18
|
import { getBrowserInfo } from '@atlaskit/editor-common/browser';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-media",
|
|
3
|
-
"version": "18.1.
|
|
3
|
+
"version": "18.1.7",
|
|
4
4
|
"description": "Media plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
],
|
|
22
22
|
"atlaskit:src": "src/index.ts",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@atlaskit/adf-schema": "^57.
|
|
24
|
+
"@atlaskit/adf-schema": "^57.3.0",
|
|
25
25
|
"@atlaskit/analytics-namespaced-context": "^8.2.0",
|
|
26
26
|
"@atlaskit/analytics-next": "^12.5.0",
|
|
27
27
|
"@atlaskit/button": "^25.3.0",
|
|
@@ -47,9 +47,9 @@
|
|
|
47
47
|
"@atlaskit/editor-tables": "^3.1.0",
|
|
48
48
|
"@atlaskit/form": "^17.2.0",
|
|
49
49
|
"@atlaskit/icon": "^37.6.0",
|
|
50
|
-
"@atlaskit/icon-lab": "^7.
|
|
51
|
-
"@atlaskit/media-card": "^81.
|
|
52
|
-
"@atlaskit/media-client": "^37.
|
|
50
|
+
"@atlaskit/icon-lab": "^7.8.0",
|
|
51
|
+
"@atlaskit/media-card": "^81.10.0",
|
|
52
|
+
"@atlaskit/media-client": "^37.7.0",
|
|
53
53
|
"@atlaskit/media-client-react": "^6.4.0",
|
|
54
54
|
"@atlaskit/media-common": "^14.6.0",
|
|
55
55
|
"@atlaskit/media-filmstrip": "^52.4.0",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"@atlaskit/platform-feature-flags": "^2.2.0",
|
|
61
61
|
"@atlaskit/primitives": "^22.5.0",
|
|
62
62
|
"@atlaskit/textfield": "^10.2.0",
|
|
63
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
63
|
+
"@atlaskit/tmp-editor-statsig": "^174.0.0",
|
|
64
64
|
"@atlaskit/tokens": "^16.11.0",
|
|
65
65
|
"@atlaskit/tooltip": "^24.3.0",
|
|
66
66
|
"@babel/runtime": "^7.0.0",
|
|
@@ -69,10 +69,10 @@
|
|
|
69
69
|
"classnames": "^2.2.5",
|
|
70
70
|
"lodash": "^4.17.21",
|
|
71
71
|
"memoize-one": "^6.0.0",
|
|
72
|
-
"uuid": "^
|
|
72
|
+
"uuid": "^11.1.1"
|
|
73
73
|
},
|
|
74
74
|
"peerDependencies": {
|
|
75
|
-
"@atlaskit/editor-common": "^120.
|
|
75
|
+
"@atlaskit/editor-common": "^120.13.0",
|
|
76
76
|
"@atlaskit/media-core": "^38.2.0",
|
|
77
77
|
"react": "^18.2.0 || ^19.2.0",
|
|
78
78
|
"react-dom": "^18.2.0 || ^19.2.0",
|