@atlaskit/media-client 34.0.0 → 34.1.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 CHANGED
@@ -1,5 +1,13 @@
1
1
  # @atlaskit/media-client
2
2
 
3
+ ## 34.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#175834](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/175834)
8
+ [`f10fd5e7fb66f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f10fd5e7fb66f) -
9
+ Enable Delete API for captions
10
+
3
11
  ## 34.0.0
4
12
 
5
13
  ### Minor Changes
@@ -224,13 +224,9 @@ var FileFetcherImpl = exports.FileFetcherImpl = /*#__PURE__*/function () {
224
224
  return _regenerator.default.wrap(function _callee3$(_context3) {
225
225
  while (1) switch (_context3.prev = _context3.next) {
226
226
  case 0:
227
- if (!(process.env.NODE_ENV === 'test')) {
228
- _context3.next = 3;
229
- break;
230
- }
231
- _context3.next = 3;
227
+ _context3.next = 2;
232
228
  return _this.mediaApi.deleteArtifact(id, params, collectionName, traceContext);
233
- case 3:
229
+ case 2:
234
230
  // Manually remove the artifact from file state instead of re-requesting the entire payload.
235
231
  file = _this.store.getState().files[id];
236
232
  if (file && file.status === 'processed' && file.artifacts) {
@@ -241,7 +237,7 @@ var FileFetcherImpl = exports.FileFetcherImpl = /*#__PURE__*/function () {
241
237
  });
242
238
  _this.setFileState(id, updatedFileState);
243
239
  }
244
- case 5:
240
+ case 4:
245
241
  case "end":
246
242
  return _context3.stop();
247
243
  }
@@ -156,10 +156,7 @@ export class FileFetcherImpl {
156
156
  return data;
157
157
  });
158
158
  _defineProperty(this, "deleteArtifact", async (id, params, collectionName, traceContext) => {
159
- // TODO: Uncomment JEST check after endpoint is fixed
160
- if (process.env.NODE_ENV === 'test') {
161
- await this.mediaApi.deleteArtifact(id, params, collectionName, traceContext);
162
- }
159
+ await this.mediaApi.deleteArtifact(id, params, collectionName, traceContext);
163
160
 
164
161
  // Manually remove the artifact from file state instead of re-requesting the entire payload.
165
162
  const file = this.store.getState().files[id];
@@ -206,13 +206,9 @@ export var FileFetcherImpl = /*#__PURE__*/function () {
206
206
  return _regeneratorRuntime.wrap(function _callee3$(_context3) {
207
207
  while (1) switch (_context3.prev = _context3.next) {
208
208
  case 0:
209
- if (!(process.env.NODE_ENV === 'test')) {
210
- _context3.next = 3;
211
- break;
212
- }
213
- _context3.next = 3;
209
+ _context3.next = 2;
214
210
  return _this.mediaApi.deleteArtifact(id, params, collectionName, traceContext);
215
- case 3:
211
+ case 2:
216
212
  // Manually remove the artifact from file state instead of re-requesting the entire payload.
217
213
  file = _this.store.getState().files[id];
218
214
  if (file && file.status === 'processed' && file.artifacts) {
@@ -223,7 +219,7 @@ export var FileFetcherImpl = /*#__PURE__*/function () {
223
219
  });
224
220
  _this.setFileState(id, updatedFileState);
225
221
  }
226
- case 5:
222
+ case 4:
227
223
  case "end":
228
224
  return _context3.stop();
229
225
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/media-client",
3
- "version": "34.0.0",
3
+ "version": "34.1.0",
4
4
  "description": "Media API Web Client Library",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -57,7 +57,7 @@
57
57
  "@atlaskit/media-core": "^37.0.0",
58
58
  "@atlaskit/media-state": "^1.6.0",
59
59
  "@atlaskit/ssr": "workspace:^",
60
- "@atlaskit/tokens": "^5.2.0",
60
+ "@atlaskit/tokens": "^5.4.0",
61
61
  "@atlassian/feature-flags-test-utils": "^0.3.0",
62
62
  "@emotion/react": "^11.7.1",
63
63
  "@types/deep-equal": "^1.0.1",