@atlaskit/editor-plugin-block-controls 17.3.10 → 17.3.11

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,40 @@
1
1
  # @atlaskit/editor-plugin-block-controls
2
2
 
3
+ ## 17.3.11
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
+
3
38
  ## 17.3.10
4
39
 
5
40
  ### Patch Changes
@@ -8,7 +8,7 @@ exports.unmountDecorations = exports.getNodeTypeWithLevel = exports.getNodeAncho
8
8
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
9
9
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
10
10
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
11
- var _uuid = _interopRequireDefault(require("uuid"));
11
+ var _uuid = require("uuid");
12
12
  var _nodeTypeUtils = require("@atlaskit/editor-common/utils/node-type-utils");
13
13
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
14
14
  var _reactRootRegistry = require("./react-root-registry");
@@ -48,7 +48,7 @@ var ObjHash = /*#__PURE__*/function () {
48
48
  return this.caching.get(node);
49
49
  }
50
50
  // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
51
- var uniqueId = (0, _uuid.default)();
51
+ var uniqueId = (0, _uuid.v4)();
52
52
  this.caching.set(node, uniqueId);
53
53
  return uniqueId;
54
54
  }
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.findHandleDec = exports.findActiveDragHandleNodeDec = exports.emptyParagraphNodeDecorations = exports.dragHandleDecoration = exports.createActiveDragHandleNodeDecoration = void 0;
8
8
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
9
  var _react = require("react");
10
- var _uuid = _interopRequireDefault(require("uuid"));
10
+ var _uuid = require("uuid");
11
11
  var _view = require("@atlaskit/editor-prosemirror/view");
12
12
  var _fg = require("@atlaskit/platform-feature-flags/fg");
13
13
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
@@ -62,12 +62,12 @@ var dragHandleDecoration = exports.dragHandleDecoration = function dragHandleDec
62
62
  editorState = _ref.editorState;
63
63
  (0, _decorationsCommon.unmountDecorations)(nodeViewPortalProviderAPI, 'data-blocks-drag-handle-container', 'data-blocks-drag-handle-key');
64
64
  // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
65
- var key = (0, _uuid.default)();
65
+ var key = (0, _uuid.v4)();
66
66
  var widgetSpec = (0, _editorExperiment.editorExperiment)('platform_editor_breakout_resizing', true) ? {
67
67
  side: -1,
68
68
  type: _decorationsCommon.TYPE_HANDLE_DEC,
69
69
  // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
70
- testid: "".concat(_decorationsCommon.TYPE_HANDLE_DEC, "-").concat((0, _uuid.default)()),
70
+ testid: "".concat(_decorationsCommon.TYPE_HANDLE_DEC, "-").concat((0, _uuid.v4)()),
71
71
  /**
72
72
  * sigh - `marks` influences the position that the widget is drawn (as described on the `side` property).
73
73
  * Exclude 'breakout' on purpose, so the widgets render at the top of the document to avoid z-index issues
@@ -78,7 +78,7 @@ var dragHandleDecoration = exports.dragHandleDecoration = function dragHandleDec
78
78
  side: -1,
79
79
  type: _decorationsCommon.TYPE_HANDLE_DEC,
80
80
  // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
81
- testid: "".concat(_decorationsCommon.TYPE_HANDLE_DEC, "-").concat((0, _uuid.default)()),
81
+ testid: "".concat(_decorationsCommon.TYPE_HANDLE_DEC, "-").concat((0, _uuid.v4)()),
82
82
  marks: (0, _expValEquals.expValEquals)('platform_editor_small_font_size', 'isEnabled', true) ? (0, _marks.getMatchingBlockMarks)(editorState, pos, [editorState.schema.marks.alignment, editorState.schema.marks.fontSize]) : []
83
83
  };
84
84
  return _view.Decoration.widget(pos, function (view, getPosUnsafe) {
@@ -9,7 +9,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
9
9
  var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
10
10
  var _react = require("react");
11
11
  var _memoizeOne = _interopRequireDefault(require("memoize-one"));
12
- var _uuid = _interopRequireDefault(require("uuid"));
12
+ var _uuid = require("uuid");
13
13
  var _selection = require("@atlaskit/editor-common/selection");
14
14
  var _utils = require("@atlaskit/editor-common/utils");
15
15
  var _nodeTypeUtils = require("@atlaskit/editor-common/utils/node-type-utils");
@@ -100,7 +100,7 @@ var findDropTargetDecs = exports.findDropTargetDecs = function findDropTargetDec
100
100
  };
101
101
  var createDropTargetDecoration = exports.createDropTargetDecoration = function createDropTargetDecoration(pos, props, nodeViewPortalProviderAPI, side, anchorRectCache, isSameLayout) {
102
102
  // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
103
- var key = (0, _uuid.default)();
103
+ var key = (0, _uuid.v4)();
104
104
  return _view.Decoration.widget(pos, function (_, getPosUnsafe) {
105
105
  var getPos = function getPos() {
106
106
  try {
@@ -139,7 +139,7 @@ var createDropTargetDecoration = exports.createDropTargetDecoration = function c
139
139
  };
140
140
  var createLayoutDropTargetDecoration = exports.createLayoutDropTargetDecoration = function createLayoutDropTargetDecoration(pos, props, nodeViewPortalProviderAPI, anchorRectCache) {
141
141
  // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
142
- var key = (0, _uuid.default)();
142
+ var key = (0, _uuid.v4)();
143
143
  return _view.Decoration.widget(pos, function (_, getPosUnsafe) {
144
144
  var getPos = function getPos() {
145
145
  try {
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.quickInsertButtonDecoration = exports.findQuickInsertInsertButtonDecoration = exports.findActiveQuickInsertNodeDec = exports.createActiveQuickInsertNodeDecoration = void 0;
8
8
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
9
  var _react = require("react");
10
- var _uuid = _interopRequireDefault(require("uuid"));
10
+ var _uuid = require("uuid");
11
11
  var _view = require("@atlaskit/editor-prosemirror/view");
12
12
  var _fg = require("@atlaskit/platform-feature-flags/fg");
13
13
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
@@ -51,7 +51,7 @@ var quickInsertButtonDecoration = exports.quickInsertButtonDecoration = function
51
51
  anchorRectCache = _ref.anchorRectCache,
52
52
  editorState = _ref.editorState;
53
53
  // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
54
- var key = (0, _uuid.default)();
54
+ var key = (0, _uuid.v4)();
55
55
  var cleanupCallbacks = [];
56
56
  var widgetSpec = (0, _editorExperiment.editorExperiment)('platform_editor_breakout_resizing', true) ? {
57
57
  side: -2,
@@ -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 uuid from 'uuid';
3
+ import { v4 as uuid } from 'uuid';
4
4
  import { getBaseNodeTypeName } from '@atlaskit/editor-common/utils/node-type-utils';
5
5
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
6
6
  import { unmountFromMountPoint } from './react-root-registry';
@@ -1,6 +1,6 @@
1
1
  import { createElement } from 'react';
2
2
  // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
3
- import uuid from 'uuid';
3
+ import { v4 as uuid } from 'uuid';
4
4
  import { Decoration } from '@atlaskit/editor-prosemirror/view';
5
5
  import { fg } from '@atlaskit/platform-feature-flags/fg';
6
6
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
@@ -1,7 +1,7 @@
1
1
  import { createElement } from 'react';
2
2
  import memoizeOne from 'memoize-one';
3
3
  // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
4
- import uuid from 'uuid';
4
+ import { v4 as uuid } from 'uuid';
5
5
  import { expandSelectionBounds } from '@atlaskit/editor-common/selection';
6
6
  import { isEmptyParagraph } from '@atlaskit/editor-common/utils';
7
7
  import { getBaseNodeTypeName } from '@atlaskit/editor-common/utils/node-type-utils';
@@ -1,6 +1,6 @@
1
1
  import { createElement } from 'react';
2
2
  // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
3
- import uuid from 'uuid';
3
+ import { v4 as uuid } from 'uuid';
4
4
  import { Decoration } from '@atlaskit/editor-prosemirror/view';
5
5
  import { fg } from '@atlaskit/platform-feature-flags/fg';
6
6
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
@@ -2,7 +2,7 @@ import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
2
2
  import _createClass from "@babel/runtime/helpers/createClass";
3
3
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
4
4
  // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
5
- import uuid from 'uuid';
5
+ import { v4 as uuid } from 'uuid';
6
6
  import { getBaseNodeTypeName } from '@atlaskit/editor-common/utils/node-type-utils';
7
7
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
8
8
  import { unmountFromMountPoint } from './react-root-registry';
@@ -1,7 +1,7 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import { createElement } from 'react';
3
3
  // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
4
- import uuid from 'uuid';
4
+ import { v4 as uuid } from 'uuid';
5
5
  import { Decoration } from '@atlaskit/editor-prosemirror/view';
6
6
  import { fg } from '@atlaskit/platform-feature-flags/fg';
7
7
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
@@ -5,7 +5,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
5
5
  import { createElement } from 'react';
6
6
  import memoizeOne from 'memoize-one';
7
7
  // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
8
- import uuid from 'uuid';
8
+ import { v4 as uuid } from 'uuid';
9
9
  import { expandSelectionBounds } from '@atlaskit/editor-common/selection';
10
10
  import { isEmptyParagraph } from '@atlaskit/editor-common/utils';
11
11
  import { getBaseNodeTypeName } from '@atlaskit/editor-common/utils/node-type-utils';
@@ -1,7 +1,7 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import { createElement } from 'react';
3
3
  // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
4
- import uuid from 'uuid';
4
+ import { v4 as uuid } from 'uuid';
5
5
  import { Decoration } from '@atlaskit/editor-prosemirror/view';
6
6
  import { fg } from '@atlaskit/platform-feature-flags/fg';
7
7
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-block-controls",
3
- "version": "17.3.10",
3
+ "version": "17.3.11",
4
4
  "description": "Block controls plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -64,7 +64,7 @@
64
64
  "bind-event-listener": "^3.0.0",
65
65
  "memoize-one": "^6.0.0",
66
66
  "raf-schd": "^4.0.3",
67
- "uuid": "^3.1.0"
67
+ "uuid": "^11.1.1"
68
68
  },
69
69
  "peerDependencies": {
70
70
  "@atlaskit/editor-common": "^120.13.0",