@percy/client 1.29.4-beta.5 → 1.29.4-beta.6

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/dist/client.js CHANGED
@@ -298,7 +298,7 @@ export class PercyClient {
298
298
 
299
299
  // call progress every update after the first update
300
300
  if ((last || pending) && updated) {
301
- onProgress === null || onProgress === void 0 ? void 0 : onProgress(data);
301
+ onProgress === null || onProgress === void 0 || onProgress(data);
302
302
  }
303
303
 
304
304
  // not finished, poll again
@@ -308,7 +308,7 @@ export class PercyClient {
308
308
  // build finished
309
309
  } else {
310
310
  // ensure progress is called at least once
311
- if (!last) onProgress === null || onProgress === void 0 ? void 0 : onProgress(data);
311
+ if (!last) onProgress === null || onProgress === void 0 || onProgress(data);
312
312
  resolve({
313
313
  data
314
314
  });
@@ -433,9 +433,9 @@ export class PercyClient {
433
433
  // Convenience method for creating a snapshot for the active build, uploading
434
434
  // missing resources for the snapshot, and finalizing the snapshot.
435
435
  async sendSnapshot(buildId, options) {
436
- var _snapshot$data$relati, _snapshot$data$relati2;
436
+ var _snapshot$data$relati;
437
437
  let snapshot = await this.createSnapshot(buildId, options);
438
- let missing = (_snapshot$data$relati = snapshot.data.relationships) === null || _snapshot$data$relati === void 0 ? void 0 : (_snapshot$data$relati2 = _snapshot$data$relati['missing-resources']) === null || _snapshot$data$relati2 === void 0 ? void 0 : _snapshot$data$relati2.data;
438
+ let missing = (_snapshot$data$relati = snapshot.data.relationships) === null || _snapshot$data$relati === void 0 || (_snapshot$data$relati = _snapshot$data$relati['missing-resources']) === null || _snapshot$data$relati === void 0 ? void 0 : _snapshot$data$relati.data;
439
439
  if (missing !== null && missing !== void 0 && missing.length) {
440
440
  let resources = options.resources.reduce((acc, r) => Object.assign(acc, {
441
441
  [r.sha]: r
package/dist/utils.js CHANGED
@@ -193,8 +193,8 @@ export async function request(url, options = {}, callback) {
193
193
  var _callback;
194
194
  resolve((await ((_callback = callback) === null || _callback === void 0 ? void 0 : _callback(body, res))) ?? body);
195
195
  } else {
196
- var _body, _body$errors, _body$errors$find;
197
- let err = (_body = body) === null || _body === void 0 ? void 0 : (_body$errors = _body.errors) === null || _body$errors === void 0 ? void 0 : (_body$errors$find = _body$errors.find(e => e.detail)) === null || _body$errors$find === void 0 ? void 0 : _body$errors$find.detail;
196
+ var _body;
197
+ let err = (_body = body) === null || _body === void 0 || (_body = _body.errors) === null || _body === void 0 || (_body = _body.find(e => e.detail)) === null || _body === void 0 ? void 0 : _body.detail;
198
198
  let statusMessage = `${statusCode} ${res.statusMessage || ''}`;
199
199
  let bodyText = (raw === null || raw === void 0 ? void 0 : raw.length) > 0 && res.statusMessage !== raw ? `\n${raw}` : '';
200
200
  throw new Error(err || `${statusMessage}${bodyText}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@percy/client",
3
- "version": "1.29.4-beta.5",
3
+ "version": "1.29.4-beta.6",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -33,9 +33,9 @@
33
33
  "test:coverage": "yarn test --coverage"
34
34
  },
35
35
  "dependencies": {
36
- "@percy/env": "1.29.4-beta.5",
37
- "@percy/logger": "1.29.4-beta.5",
36
+ "@percy/env": "1.29.4-beta.6",
37
+ "@percy/logger": "1.29.4-beta.6",
38
38
  "pako": "^2.1.0"
39
39
  },
40
- "gitHead": "aa585ef0d0cea47653ca7e64e6e2928f0a0ab2c9"
40
+ "gitHead": "7c33f03c17960885dbc29107add843d1851aa789"
41
41
  }