@atlaskit/media-card 80.3.4 → 80.4.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,29 @@
1
1
  # @atlaskit/media-card
2
2
 
3
+ ## 80.4.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 80.4.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [`5653e8be24c05`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5653e8be24c05) -
14
+ Replace `uuid-validate` with an inlined, browser-only `isValidUuid` helper in
15
+ `@atlaskit/media-common`. Removes the `uuid-validate` dependency from `media-card`,
16
+ `media-client`, `media-common` and `media-picker` so consumers no longer pull in the Node `Buffer`
17
+ polyfill purely for a `Buffer.isBuffer` check that always returned `false` in the browser.
18
+
19
+ Adds a new `@atlaskit/media-common/isValidUuid` subpath export so consumers can import the helper
20
+ without going through the package's barrel file (in line with the Debarreling Platform Packages
21
+ initiative).
22
+
23
+ ### Patch Changes
24
+
25
+ - Updated dependencies
26
+
3
27
  ## 80.3.4
4
28
 
5
29
  ### Patch Changes
@@ -20,7 +20,7 @@ var _label = _interopRequireDefault(require("@atlaskit/react-ufo/label"));
20
20
  var _excluded = ["identifier"];
21
21
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
22
22
  var packageName = "@atlaskit/media-card";
23
- var packageVersion = "0.0.0-development";
23
+ var packageVersion = "80.4.0";
24
24
  var CardBase = exports.CardBase = function CardBase(_ref) {
25
25
  var identifier = _ref.identifier,
26
26
  otherProps = (0, _objectWithoutProperties2.default)(_ref, _excluded);
@@ -87,7 +87,7 @@ var WrappedMediaCardAnalyticsErrorBoundary = /*#__PURE__*/function (_React$Compo
87
87
  }(_react.default.Component);
88
88
  (0, _defineProperty2.default)(WrappedMediaCardAnalyticsErrorBoundary, "displayName", 'MediaCardAnalyticsErrorBoundary');
89
89
  var packageName = "@atlaskit/media-card";
90
- var packageVersion = "0.0.0-development";
90
+ var packageVersion = "80.4.0";
91
91
 
92
92
  // @ts-ignore: [PIT-1685] Fails in post-office due to backwards incompatibility issue with React 18
93
93
  var MediaCardAnalyticsErrorBoundary = (0, _mediaCommon.withMediaAnalyticsContext)({
@@ -116,7 +116,7 @@ var MediaInlineCardLoader = exports.default = /*#__PURE__*/function (_React$Pure
116
116
  ErrorBoundary = _this$state.ErrorBoundary;
117
117
  var analyticsContext = {
118
118
  packageVersion: "@atlaskit/media-card",
119
- packageName: "0.0.0-development",
119
+ packageName: "80.4.0",
120
120
  componentName: 'mediaInlineCard',
121
121
  component: 'mediaInlineCard'
122
122
  };
@@ -10,7 +10,7 @@ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers
10
10
  var _react = require("react");
11
11
  var _ufo = require("@atlaskit/ufo");
12
12
  var _mediaCommon = require("@atlaskit/media-common");
13
- var _uuidValidate = _interopRequireDefault(require("uuid-validate"));
13
+ var _isValidUuid = require("@atlaskit/media-common/isValidUuid");
14
14
  var _analytics = require("./analytics");
15
15
  var _errors = require("../errors");
16
16
  var _mediaClient = require("@atlaskit/media-client");
@@ -19,7 +19,7 @@ var _globalScope = require("./globalScope/globalScope");
19
19
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
20
20
  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) { (0, _defineProperty2.default)(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; }
21
21
  var packageName = "@atlaskit/media-card";
22
- var packageVersion = "0.0.0-development";
22
+ var packageVersion = "80.4.0";
23
23
  var SAMPLE_RATE = 0.05;
24
24
 
25
25
  /**
@@ -177,7 +177,7 @@ var addResourceTimingMarks = function addResourceTimingMarks(experience, entry,
177
177
  };
178
178
  var sanitiseFileAttributes = function sanitiseFileAttributes(fileAttributes) {
179
179
  var sanitisedFileId = 'INVALID_FILE_ID';
180
- if (fileAttributes.fileId === 'external-image' || (0, _uuidValidate.default)(fileAttributes.fileId)) {
180
+ if (fileAttributes.fileId === 'external-image' || (0, _isValidUuid.isValidUuid)(fileAttributes.fileId)) {
181
181
  sanitisedFileId = fileAttributes.fileId;
182
182
  }
183
183
  return _objectSpread(_objectSpread({}, fileAttributes), {}, {
@@ -9,7 +9,7 @@ import { startResourceObserver, setAnalyticsContext } from '../utils/mediaPerfor
9
9
  import { useAnalyticsEvents } from '@atlaskit/analytics-next';
10
10
  import UFOLabel from '@atlaskit/react-ufo/label';
11
11
  const packageName = "@atlaskit/media-card";
12
- const packageVersion = "0.0.0-development";
12
+ const packageVersion = "80.4.0";
13
13
  export const CardBase = ({
14
14
  identifier,
15
15
  ...otherProps
@@ -66,7 +66,7 @@ class WrappedMediaCardAnalyticsErrorBoundary extends React.Component {
66
66
  }
67
67
  _defineProperty(WrappedMediaCardAnalyticsErrorBoundary, "displayName", 'MediaCardAnalyticsErrorBoundary');
68
68
  const packageName = "@atlaskit/media-card";
69
- const packageVersion = "0.0.0-development";
69
+ const packageVersion = "80.4.0";
70
70
 
71
71
  // @ts-ignore: [PIT-1685] Fails in post-office due to backwards incompatibility issue with React 18
72
72
  const MediaCardAnalyticsErrorBoundary = withMediaAnalyticsContext({
@@ -37,7 +37,7 @@ export default class MediaInlineCardLoader extends React.PureComponent {
37
37
  } = this.state;
38
38
  const analyticsContext = {
39
39
  packageVersion: "@atlaskit/media-card",
40
- packageName: "0.0.0-development",
40
+ packageName: "80.4.0",
41
41
  componentName: 'mediaInlineCard',
42
42
  component: 'mediaInlineCard'
43
43
  };
@@ -1,7 +1,7 @@
1
1
  import { useCallback, useEffect, useMemo, useRef } from 'react';
2
2
  import { UFOExperience, ExperiencePerformanceTypes, ExperienceTypes, ConcurrentExperience } from '@atlaskit/ufo';
3
3
  import { getFeatureFlagKeysAllProducts } from '@atlaskit/media-common';
4
- import isValidId from 'uuid-validate';
4
+ import { isValidUuid } from '@atlaskit/media-common/isValidUuid';
5
5
  import { UFOExperienceState } from '@atlaskit/ufo';
6
6
  import { extractErrorInfo, getRenderErrorRequestMetadata } from './analytics';
7
7
  import { MediaCardError } from '../errors';
@@ -9,7 +9,7 @@ import { getMediaEnvironment, getMediaRegion } from '@atlaskit/media-client';
9
9
  import { getActiveInteraction } from '@atlaskit/react-ufo/interaction-metrics';
10
10
  import { getMediaGlobalScope } from './globalScope/globalScope';
11
11
  const packageName = "@atlaskit/media-card";
12
- const packageVersion = "0.0.0-development";
12
+ const packageVersion = "80.4.0";
13
13
  const SAMPLE_RATE = 0.05;
14
14
 
15
15
  /**
@@ -158,7 +158,7 @@ const addResourceTimingMarks = (experience, entry, interactionStartTime, prefix)
158
158
  };
159
159
  const sanitiseFileAttributes = fileAttributes => {
160
160
  let sanitisedFileId = 'INVALID_FILE_ID';
161
- if (fileAttributes.fileId === 'external-image' || isValidId(fileAttributes.fileId)) {
161
+ if (fileAttributes.fileId === 'external-image' || isValidUuid(fileAttributes.fileId)) {
162
162
  sanitisedFileId = fileAttributes.fileId;
163
163
  }
164
164
  return {
@@ -11,7 +11,7 @@ import { startResourceObserver, setAnalyticsContext } from '../utils/mediaPerfor
11
11
  import { useAnalyticsEvents } from '@atlaskit/analytics-next';
12
12
  import UFOLabel from '@atlaskit/react-ufo/label';
13
13
  var packageName = "@atlaskit/media-card";
14
- var packageVersion = "0.0.0-development";
14
+ var packageVersion = "80.4.0";
15
15
  export var CardBase = function CardBase(_ref) {
16
16
  var identifier = _ref.identifier,
17
17
  otherProps = _objectWithoutProperties(_ref, _excluded);
@@ -80,7 +80,7 @@ var WrappedMediaCardAnalyticsErrorBoundary = /*#__PURE__*/function (_React$Compo
80
80
  }(React.Component);
81
81
  _defineProperty(WrappedMediaCardAnalyticsErrorBoundary, "displayName", 'MediaCardAnalyticsErrorBoundary');
82
82
  var packageName = "@atlaskit/media-card";
83
- var packageVersion = "0.0.0-development";
83
+ var packageVersion = "80.4.0";
84
84
 
85
85
  // @ts-ignore: [PIT-1685] Fails in post-office due to backwards incompatibility issue with React 18
86
86
  var MediaCardAnalyticsErrorBoundary = withMediaAnalyticsContext({
@@ -101,7 +101,7 @@ var MediaInlineCardLoader = /*#__PURE__*/function (_React$PureComponent) {
101
101
  ErrorBoundary = _this$state.ErrorBoundary;
102
102
  var analyticsContext = {
103
103
  packageVersion: "@atlaskit/media-card",
104
- packageName: "0.0.0-development",
104
+ packageName: "80.4.0",
105
105
  componentName: 'mediaInlineCard',
106
106
  component: 'mediaInlineCard'
107
107
  };
@@ -5,7 +5,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
5
5
  import { useCallback, useEffect, useMemo, useRef } from 'react';
6
6
  import { UFOExperience, ExperiencePerformanceTypes, ExperienceTypes, ConcurrentExperience } from '@atlaskit/ufo';
7
7
  import { getFeatureFlagKeysAllProducts } from '@atlaskit/media-common';
8
- import isValidId from 'uuid-validate';
8
+ import { isValidUuid } from '@atlaskit/media-common/isValidUuid';
9
9
  import { UFOExperienceState } from '@atlaskit/ufo';
10
10
  import { extractErrorInfo, getRenderErrorRequestMetadata } from './analytics';
11
11
  import { MediaCardError } from '../errors';
@@ -13,7 +13,7 @@ import { getMediaEnvironment, getMediaRegion } from '@atlaskit/media-client';
13
13
  import { getActiveInteraction } from '@atlaskit/react-ufo/interaction-metrics';
14
14
  import { getMediaGlobalScope } from './globalScope/globalScope';
15
15
  var packageName = "@atlaskit/media-card";
16
- var packageVersion = "0.0.0-development";
16
+ var packageVersion = "80.4.0";
17
17
  var SAMPLE_RATE = 0.05;
18
18
 
19
19
  /**
@@ -171,7 +171,7 @@ var addResourceTimingMarks = function addResourceTimingMarks(experience, entry,
171
171
  };
172
172
  var sanitiseFileAttributes = function sanitiseFileAttributes(fileAttributes) {
173
173
  var sanitisedFileId = 'INVALID_FILE_ID';
174
- if (fileAttributes.fileId === 'external-image' || isValidId(fileAttributes.fileId)) {
174
+ if (fileAttributes.fileId === 'external-image' || isValidUuid(fileAttributes.fileId)) {
175
175
  sanitisedFileId = fileAttributes.fileId;
176
176
  }
177
177
  return _objectSpread(_objectSpread({}, fileAttributes), {}, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/media-card",
3
- "version": "80.3.4",
3
+ "version": "80.4.1",
4
4
  "description": "Includes all media card related components, CardView, CardViewSmall, Card...",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -36,9 +36,9 @@
36
36
  "@atlaskit/editor-shared-styles": "^3.10.0",
37
37
  "@atlaskit/icon": "^34.3.0",
38
38
  "@atlaskit/link": "^3.4.0",
39
- "@atlaskit/media-client": "^36.0.0",
39
+ "@atlaskit/media-client": "^36.1.0",
40
40
  "@atlaskit/media-client-react": "^5.1.0",
41
- "@atlaskit/media-common": "^13.1.0",
41
+ "@atlaskit/media-common": "^13.2.0",
42
42
  "@atlaskit/media-file-preview": "^0.17.0",
43
43
  "@atlaskit/media-state": "^2.1.0",
44
44
  "@atlaskit/media-svg": "^2.3.0",
@@ -47,10 +47,10 @@
47
47
  "@atlaskit/platform-feature-flags": "^1.1.0",
48
48
  "@atlaskit/primitives": "^19.0.0",
49
49
  "@atlaskit/progress-bar": "^4.2.0",
50
- "@atlaskit/react-ufo": "^5.17.0",
50
+ "@atlaskit/react-ufo": "^5.18.0",
51
51
  "@atlaskit/spinner": "^19.1.0",
52
52
  "@atlaskit/theme": "^23.2.0",
53
- "@atlaskit/tmp-editor-statsig": "^73.0.0",
53
+ "@atlaskit/tmp-editor-statsig": "^74.0.0",
54
54
  "@atlaskit/tokens": "^13.0.0",
55
55
  "@atlaskit/tooltip": "^21.2.0",
56
56
  "@atlaskit/ufo": "^0.4.0",
@@ -61,8 +61,7 @@
61
61
  "eventemitter2": "^4.1.0",
62
62
  "lru_map": "^0.4.1",
63
63
  "react-loadable": "^5.1.0",
64
- "use-callback-ref": "^1.2.3",
65
- "uuid-validate": "^0.0.3"
64
+ "use-callback-ref": "^1.2.3"
66
65
  },
67
66
  "peerDependencies": {
68
67
  "@emotion/react": "^11.7.1",
@@ -77,11 +76,11 @@
77
76
  "@atlaskit/form": "^15.5.0",
78
77
  "@atlaskit/inline-message": "^15.6.0",
79
78
  "@atlaskit/media-core": "^37.0.0",
80
- "@atlaskit/media-picker": "^71.1.0",
79
+ "@atlaskit/media-picker": "^71.2.0",
81
80
  "@atlaskit/media-test-data": "^3.3.0",
82
81
  "@atlaskit/media-test-helpers": "^41.0.0",
83
82
  "@atlaskit/radio": "^8.5.0",
84
- "@atlaskit/range": "^10.0.0",
83
+ "@atlaskit/range": "^10.1.0",
85
84
  "@atlaskit/ssr": "workspace:^",
86
85
  "@atlaskit/toggle": "^15.6.0",
87
86
  "@atlassian/a11y-jest-testing": "^0.11.0",