@percy/core 1.10.3 → 1.10.4

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/config.js CHANGED
@@ -28,9 +28,6 @@ export const configSchema = {
28
28
  },
29
29
  scope: {
30
30
  type: 'string'
31
- },
32
- devicePixelRatio: {
33
- type: 'integer'
34
31
  }
35
32
  }
36
33
  },
@@ -129,6 +126,9 @@ export const configSchema = {
129
126
  userAgent: {
130
127
  type: 'string'
131
128
  },
129
+ devicePixelRatio: {
130
+ type: 'integer'
131
+ },
132
132
  concurrency: {
133
133
  type: 'integer',
134
134
  minimum: 1
@@ -180,9 +180,6 @@ export const snapshotSchema = {
180
180
  enableJavaScript: {
181
181
  $ref: '/config/snapshot#/properties/enableJavaScript'
182
182
  },
183
- devicePixelRatio: {
184
- $ref: '/config/snapshot#/properties/devicePixelRatio'
185
- },
186
183
  discovery: {
187
184
  type: 'object',
188
185
  additionalProperties: false,
@@ -204,6 +201,9 @@ export const snapshotSchema = {
204
201
  },
205
202
  userAgent: {
206
203
  $ref: '/config/discovery#/properties/userAgent'
204
+ },
205
+ devicePixelRatio: {
206
+ $ref: '/config/discovery#/properties/devicePixelRatio'
207
207
  }
208
208
  }
209
209
  }
@@ -485,41 +485,21 @@ export function configMigration(config, util) {
485
485
  util.map('agent.assetDiscovery.pagePoolSizeMax', 'discovery.concurrency');
486
486
  util.del('agent');
487
487
  } else {
488
- let notice = {
488
+ util.deprecate('snapshot.devicePixelRatio', {
489
+ map: 'discovery.devicePixelRatio',
489
490
  type: 'config',
490
- until: '1.0.0'
491
- }; // snapshot discovery options have moved
492
-
493
- util.deprecate('snapshot.authorization', {
494
- map: 'discovery.authorization',
495
- ...notice
496
- });
497
- util.deprecate('snapshot.requestHeaders', {
498
- map: 'discovery.requestHeaders',
499
- ...notice
491
+ until: '2.0.0'
500
492
  });
501
493
  }
502
494
  } // Snapshot option migrate function
503
495
 
504
496
  export function snapshotMigration(config, util, root = '') {
505
- let notice = {
497
+ // discovery options have moved
498
+ util.deprecate(`${root}.devicePixelRatio`, {
499
+ map: `${root}.discovery.devicePixelRatio`,
506
500
  type: 'snapshot',
507
- until: '1.0.0',
501
+ until: '2.0.0',
508
502
  warn: true
509
- }; // discovery options have moved
510
-
511
- util.deprecate(`${root}.authorization`, {
512
- map: `${root}.discovery.authorization`,
513
- ...notice
514
- });
515
- util.deprecate(`${root}.requestHeaders`, {
516
- map: `${root}.discovery.requestHeaders`,
517
- ...notice
518
- }); // snapshots option was renamed
519
-
520
- util.deprecate(`${root}.snapshots`, {
521
- map: `${root}.additionalSnapshots`,
522
- ...notice
523
503
  });
524
504
  } // Snapshot list options migrate function
525
505
 
@@ -531,18 +511,8 @@ export function snapshotListMigration(config, util) {
531
511
  snapshotMigration(config, util, `snapshots[${i}]`);
532
512
  }
533
513
  }
534
- } // overrides option was renamed
535
-
514
+ } // migrate options
536
515
 
537
- let notice = {
538
- type: 'snapshot',
539
- until: '1.0.0',
540
- warn: true
541
- };
542
- util.deprecate('overrides', {
543
- map: 'options',
544
- ...notice
545
- }); // migrate options
546
516
 
547
517
  if (Array.isArray(config.options)) {
548
518
  for (let i in config.options) {
package/dist/snapshot.js CHANGED
@@ -404,11 +404,11 @@ export async function* discoverSnapshotResources(percy, snapshot, callback) {
404
404
  try {
405
405
  yield* triggerResourceRequests(page, snapshot); // trigger resource requests for any alternate device pixel ratio
406
406
 
407
- if (snapshot.devicePixelRatio) {
407
+ if (snapshot.discovery.devicePixelRatio) {
408
408
  // wait for any existing pending resource requests first
409
409
  yield waitForDiscoveryNetworkIdle(page, snapshot.discovery);
410
410
  yield* triggerResourceRequests(page, snapshot, {
411
- deviceScaleFactor: snapshot.devicePixelRatio,
411
+ deviceScaleFactor: snapshot.discovery.devicePixelRatio,
412
412
  mobile: true
413
413
  });
414
414
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@percy/core",
3
- "version": "1.10.3",
3
+ "version": "1.10.4",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -39,10 +39,10 @@
39
39
  "test:types": "tsd"
40
40
  },
41
41
  "dependencies": {
42
- "@percy/client": "1.10.3",
43
- "@percy/config": "1.10.3",
44
- "@percy/dom": "1.10.3",
45
- "@percy/logger": "1.10.3",
42
+ "@percy/client": "1.10.4",
43
+ "@percy/config": "1.10.4",
44
+ "@percy/dom": "1.10.4",
45
+ "@percy/logger": "1.10.4",
46
46
  "content-disposition": "^0.5.4",
47
47
  "cross-spawn": "^7.0.3",
48
48
  "extract-zip": "^2.0.1",
@@ -53,5 +53,5 @@
53
53
  "rimraf": "^3.0.2",
54
54
  "ws": "^8.0.0"
55
55
  },
56
- "gitHead": "a9858d20a9b9708da0464c0617b32b2ee1c97433"
56
+ "gitHead": "16a9a410bfcb8eab51b86a08cff12d8d35e4747e"
57
57
  }