@atlaskit/smart-card 45.20.0 → 45.20.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 CHANGED
@@ -1,5 +1,40 @@
1
1
  # @atlaskit/smart-card
2
2
 
3
+ ## 45.20.1
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
  ## 45.20.0
4
39
 
5
40
  ### Minor Changes
package/dist/cjs/ssr.js CHANGED
@@ -9,7 +9,7 @@ exports.CardSSR = void 0;
9
9
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
10
10
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
11
11
  var _react = _interopRequireWildcard(require("react"));
12
- var _uuid = _interopRequireDefault(require("uuid"));
12
+ var _uuid = require("uuid");
13
13
  var _AnalyticsContext = _interopRequireDefault(require("@atlaskit/analytics-next/AnalyticsContext"));
14
14
  var _fg = require("@atlaskit/platform-feature-flags/fg");
15
15
  var _analytics = require("./utils/analytics/analytics");
@@ -26,7 +26,7 @@ var CardSSR = exports.CardSSR = function CardSSR(props) {
26
26
  // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
27
27
  var _useState = (0, _react.useState)(function () {
28
28
  var _props$id;
29
- return (_props$id = props.id) !== null && _props$id !== void 0 ? _props$id : (0, _uuid.default)();
29
+ return (_props$id = props.id) !== null && _props$id !== void 0 ? _props$id : (0, _uuid.v4)();
30
30
  }),
31
31
  _useState2 = (0, _slicedToArray2.default)(_useState, 1),
32
32
  id = _useState2[0];
@@ -10,7 +10,7 @@ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/
10
10
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
11
11
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
12
12
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
13
- var _uuid = _interopRequireDefault(require("uuid"));
13
+ var _uuid = require("uuid");
14
14
  var _linkingCommon = require("@atlaskit/linking-common");
15
15
  var _readStream = require("./readStream");
16
16
  var _types = require("./types");
@@ -124,7 +124,7 @@ var AISummaryService = exports.AISummaryService = /*#__PURE__*/function () {
124
124
  } finally {
125
125
  _iterator2.f();
126
126
  }
127
- id = (0, _uuid.default)();
127
+ id = (0, _uuid.v4)();
128
128
  _context2.prev = 1;
129
129
  (_this$onStart = this.onStart) === null || _this$onStart === void 0 || _this$onStart.call(this, id);
130
130
  _context2.next = 2;
@@ -9,7 +9,7 @@ exports.default = void 0;
9
9
  var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
10
10
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
11
11
  var _react = require("react");
12
- var _uuid = _interopRequireDefault(require("uuid"));
12
+ var _uuid = require("uuid");
13
13
  var _useAnalyticsEvents2 = require("../../../common/analytics/generated/use-analytics-events");
14
14
  var measure = _interopRequireWildcard(require("../../../utils/performance"));
15
15
  var _analytics = require("../../analytics");
@@ -34,7 +34,7 @@ var useInvokeClientAction = function useInvokeClientAction(_ref) {
34
34
  case 0:
35
35
  actionSubjectId = _ref2.actionSubjectId, actionType = _ref2.actionType, actionFn = _ref2.actionFn, _ref2$definitionId = _ref2.definitionId, definitionId = _ref2$definitionId === void 0 ? null : _ref2$definitionId, extensionKey = _ref2.extensionKey, display = _ref2.display, id = _ref2.id, prompt = _ref2.prompt, _ref2$resourceType = _ref2.resourceType, resourceType = _ref2$resourceType === void 0 ? null : _ref2$resourceType;
36
36
  // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
37
- experienceId = (0, _uuid.default)(); // Begin performance instrumentation.
37
+ experienceId = (0, _uuid.v4)(); // Begin performance instrumentation.
38
38
  markName = "".concat(experienceId, "-").concat(actionType);
39
39
  measure.mark(markName, 'pending');
40
40
  _context.prev = 1;
@@ -8,7 +8,7 @@ Object.defineProperty(exports, "__esModule", {
8
8
  exports.default = void 0;
9
9
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
10
10
  var _react = require("react");
11
- var _uuid = _interopRequireDefault(require("uuid"));
11
+ var _uuid = require("uuid");
12
12
  var _useAnalyticsEvents2 = require("../../../common/analytics/generated/use-analytics-events");
13
13
  var measure = _interopRequireWildcard(require("../../../utils/performance"));
14
14
  var _actions = require("../../actions");
@@ -22,7 +22,7 @@ var useResolveHyperlink = function useResolveHyperlink(_ref) {
22
22
  var href = _ref.href;
23
23
  // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
24
24
  var _useState = (0, _react.useState)(function () {
25
- return (0, _uuid.default)();
25
+ return (0, _uuid.v4)();
26
26
  }),
27
27
  _useState2 = (0, _slicedToArray2.default)(_useState, 1),
28
28
  id = _useState2[0];
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.useSmartLinkActions = useSmartLinkActions;
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 _linkProvider = require("@atlaskit/link-provider");
12
12
  var _fg = require("@atlaskit/platform-feature-flags/fg");
13
13
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
@@ -31,7 +31,7 @@ function useSmartLinkActions(_ref) {
31
31
  prefetch = _ref.prefetch;
32
32
  // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
33
33
  var id = (0, _react.useMemo)(function () {
34
- return (0, _uuid.default)();
34
+ return (0, _uuid.v4)();
35
35
  }, []);
36
36
  var linkState = (0, _store.useSmartCardState)(url);
37
37
  var _useAnalyticsEvents = (0, _useAnalyticsEvents2.useAnalyticsEvents)(),
@@ -1,12 +1,11 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
3
  Object.defineProperty(exports, "__esModule", {
5
4
  value: true
6
5
  });
7
6
  exports.useSmartLinkReload = useSmartLinkReload;
8
7
  var _react = require("react");
9
- var _uuid = _interopRequireDefault(require("uuid"));
8
+ var _uuid = require("uuid");
10
9
  var _actions = require("../actions");
11
10
  // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
12
11
 
@@ -19,7 +18,7 @@ function useSmartLinkReload(_ref) {
19
18
  var url = _ref.url;
20
19
  // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
21
20
  var id = (0, _react.useMemo)(function () {
22
- return (0, _uuid.default)();
21
+ return (0, _uuid.v4)();
23
22
  }, []);
24
23
  var linkActions = (0, _actions.useSmartCardActions)(id, url);
25
24
  return linkActions.reload;
@@ -12,7 +12,7 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
12
12
  var _react = _interopRequireWildcard(require("react"));
13
13
  var _reactErrorBoundary = require("react-error-boundary");
14
14
  var _reactMagneticDi = require("react-magnetic-di");
15
- var _uuid = _interopRequireDefault(require("uuid"));
15
+ var _uuid = require("uuid");
16
16
  var _fg = require("@atlaskit/platform-feature-flags/fg");
17
17
  var _useAnalyticsEvents2 = require("../../common/analytics/generated/use-analytics-events");
18
18
  var _analytics = require("../../state/analytics");
@@ -34,7 +34,7 @@ var LazyCardWithUrlContent = exports.LazyCardWithUrlContent = /*#__PURE__*/(0, _
34
34
  function CardWithURLRenderer(props) {
35
35
  // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
36
36
  var _useState = (0, _react.useState)(function () {
37
- return props.id ? props.id : (0, _uuid.default)();
37
+ return props.id ? props.id : (0, _uuid.v4)();
38
38
  }),
39
39
  _useState2 = (0, _slicedToArray2.default)(_useState, 1),
40
40
  id = _useState2[0];
@@ -1,7 +1,7 @@
1
1
  import React, { useState } from 'react';
2
2
 
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 AnalyticsContext from '@atlaskit/analytics-next/AnalyticsContext';
6
6
  import { fg } from '@atlaskit/platform-feature-flags/fg';
7
7
  import { context } from './utils/analytics/analytics';
@@ -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 { getBaseUrl } from '@atlaskit/linking-common';
5
5
  import { readStream } from './readStream';
6
6
  import { ChunkProcessingError } from './types';
@@ -1,7 +1,7 @@
1
1
  import { useCallback } from 'react';
2
2
 
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 { useAnalyticsEvents } from '../../../common/analytics/generated/use-analytics-events';
6
6
  import * as measure from '../../../utils/performance';
7
7
  import { failUfoExperience, startUfoExperience, succeedUfoExperience } from '../../analytics';
@@ -1,7 +1,7 @@
1
1
  import { useEffect, useState } from 'react';
2
2
 
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 { useAnalyticsEvents } from '../../../common/analytics/generated/use-analytics-events';
6
6
  import * as measure from '../../../utils/performance';
7
7
  import { useSmartCardActions } from '../../actions';
@@ -1,7 +1,7 @@
1
1
  import { useMemo } from 'react';
2
2
 
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 { useSmartLinkContext } from '@atlaskit/link-provider';
6
6
  import { fg } from '@atlaskit/platform-feature-flags/fg';
7
7
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
@@ -1,7 +1,7 @@
1
1
  import { useMemo } from 'react';
2
2
 
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 { useSmartCardActions as useLinkActions } from '../actions';
6
6
  /**
7
7
  * Exposes a programmatic way to reload the data being used to render a Smart Link.
@@ -2,7 +2,7 @@ import React, { lazy, Suspense, useCallback, useEffect, useState } from 'react';
2
2
  import { ErrorBoundary } from 'react-error-boundary';
3
3
  import { di } from 'react-magnetic-di';
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 { fg } from '@atlaskit/platform-feature-flags/fg';
7
7
  import { useAnalyticsEvents } from '../../common/analytics/generated/use-analytics-events';
8
8
  import { failUfoExperience, startUfoExperience } from '../../state/analytics';
package/dist/esm/ssr.js CHANGED
@@ -5,7 +5,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
5
5
  import React, { useState } from 'react';
6
6
 
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 AnalyticsContext from '@atlaskit/analytics-next/AnalyticsContext';
10
10
  import { fg } from '@atlaskit/platform-feature-flags/fg';
11
11
  import { context } from './utils/analytics/analytics';
@@ -11,7 +11,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
11
11
  function _asyncIterator(r) { var n, t, o, e = 2; for ("undefined" != typeof Symbol && (t = Symbol.asyncIterator, o = Symbol.iterator); e--;) { if (t && null != (n = r[t])) return n.call(r); if (o && null != (n = r[o])) return new AsyncFromSyncIterator(n.call(r)); t = "@@asyncIterator", o = "@@iterator"; } throw new TypeError("Object is not async iterable"); }
12
12
  function AsyncFromSyncIterator(r) { function AsyncFromSyncIteratorContinuation(r) { if (Object(r) !== r) return Promise.reject(new TypeError(r + " is not an object.")); var n = r.done; return Promise.resolve(r.value).then(function (r) { return { value: r, done: n }; }); } return AsyncFromSyncIterator = function AsyncFromSyncIterator(r) { this.s = r, this.n = r.next; }, AsyncFromSyncIterator.prototype = { s: null, n: null, next: function next() { return AsyncFromSyncIteratorContinuation(this.n.apply(this.s, arguments)); }, return: function _return(r) { var n = this.s.return; return void 0 === n ? Promise.resolve({ value: r, done: !0 }) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments)); }, throw: function _throw(r) { var n = this.s.return; return void 0 === n ? Promise.reject(r) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments)); } }, new AsyncFromSyncIterator(r); }
13
13
  // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
14
- import uuid from 'uuid';
14
+ import { v4 as uuid } from 'uuid';
15
15
  import { getBaseUrl } from '@atlaskit/linking-common';
16
16
  import { readStream } from './readStream';
17
17
  import { ChunkProcessingError } from './types';
@@ -3,7 +3,7 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
3
3
  import { useCallback } from 'react';
4
4
 
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 { useAnalyticsEvents } from '../../../common/analytics/generated/use-analytics-events';
8
8
  import * as measure from '../../../utils/performance';
9
9
  import { failUfoExperience, startUfoExperience, succeedUfoExperience } from '../../analytics';
@@ -2,7 +2,7 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
2
  import { useEffect, useState } from 'react';
3
3
 
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 { useAnalyticsEvents } from '../../../common/analytics/generated/use-analytics-events';
7
7
  import * as measure from '../../../utils/performance';
8
8
  import { useSmartCardActions } from '../../actions';
@@ -4,7 +4,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
4
4
  import { useMemo } from 'react';
5
5
 
6
6
  // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
7
- import uuid from 'uuid';
7
+ import { v4 as uuid } from 'uuid';
8
8
  import { useSmartLinkContext } from '@atlaskit/link-provider';
9
9
  import { fg } from '@atlaskit/platform-feature-flags/fg';
10
10
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
@@ -1,7 +1,7 @@
1
1
  import { useMemo } from 'react';
2
2
 
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 { useSmartCardActions as useLinkActions } from '../actions';
6
6
  /**
7
7
  * Exposes a programmatic way to reload the data being used to render a Smart Link.
@@ -6,7 +6,7 @@ import React, { lazy, Suspense, useCallback, useEffect, useState } from 'react';
6
6
  import { ErrorBoundary } from 'react-error-boundary';
7
7
  import { di } from 'react-magnetic-di';
8
8
  // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
9
- import uuid from 'uuid';
9
+ import { v4 as uuid } from 'uuid';
10
10
  import { fg } from '@atlaskit/platform-feature-flags/fg';
11
11
  import { useAnalyticsEvents } from '../../common/analytics/generated/use-analytics-events';
12
12
  import { failUfoExperience, startUfoExperience } from '../../state/analytics';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "45.20.0",
3
+ "version": "45.20.1",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -107,7 +107,7 @@
107
107
  "react-magnetic-di": "^3.1.4",
108
108
  "react-render-image": "^1.1.3",
109
109
  "use-sync-external-store": "^1.5.0",
110
- "uuid": "^3.1.0"
110
+ "uuid": "^11.1.1"
111
111
  },
112
112
  "peerDependencies": {
113
113
  "@atlaskit/link-provider": "^5.5.0",