@percy/core 1.2.0 → 1.3.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/dist/browser.js CHANGED
@@ -58,7 +58,8 @@ export class Browser extends EventEmitter {
58
58
  headless = true,
59
59
  args = [],
60
60
  timeout
61
- } = launchOptions; // transform cookies object to an array of cookie params
61
+ } = launchOptions;
62
+ executable ?? (executable = process.env.PERCY_BROWSER_EXECUTABLE); // transform cookies object to an array of cookie params
62
63
 
63
64
  this.cookies = Array.isArray(cookies) ? cookies : Object.entries(cookies).map(([name, value]) => ({
64
65
  name,
package/dist/config.js CHANGED
@@ -25,6 +25,9 @@ export const configSchema = {
25
25
  },
26
26
  enableJavaScript: {
27
27
  type: 'boolean'
28
+ },
29
+ scope: {
30
+ type: 'string'
28
31
  }
29
32
  }
30
33
  },
@@ -162,6 +165,9 @@ export const snapshotSchema = {
162
165
  widths: {
163
166
  $ref: '/config/snapshot#/properties/widths'
164
167
  },
168
+ scope: {
169
+ $ref: '/config/snapshot#/properties/scope'
170
+ },
165
171
  minHeight: {
166
172
  $ref: '/config/snapshot#/properties/minHeight'
167
173
  },
package/dist/snapshot.js CHANGED
@@ -168,7 +168,7 @@ export async function getSitemapSnapshots(options) {
168
168
  } // parse XML content into a list of URLs
169
169
 
170
170
 
171
- let urls = body.match(/(?<=<loc>)(.*)(?=<\/loc>)/ig) ?? []; // filter out duplicate URLs that differ by a trailing slash
171
+ let urls = body.match(/(?<=<loc>)(.*?)(?=<\/loc>)/ig) ?? []; // filter out duplicate URLs that differ by a trailing slash
172
172
 
173
173
  return urls.filter((url, i) => {
174
174
  let match = urls.indexOf(url.replace(/\/$/, ''));
@@ -256,6 +256,7 @@ function debugSnapshotConfig(snapshot, showInfo) {
256
256
  };
257
257
 
258
258
  debugProp(snapshot, 'url');
259
+ debugProp(snapshot, 'scope');
259
260
  debugProp(snapshot, 'widths', v => `${v}px`);
260
261
  debugProp(snapshot, 'minHeight', v => `${v}px`);
261
262
  debugProp(snapshot, 'enableJavaScript');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@percy/core",
3
- "version": "1.2.0",
3
+ "version": "1.3.1",
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.2.0",
43
- "@percy/config": "1.2.0",
44
- "@percy/dom": "1.2.0",
45
- "@percy/logger": "1.2.0",
42
+ "@percy/client": "1.3.1",
43
+ "@percy/config": "1.3.1",
44
+ "@percy/dom": "1.3.1",
45
+ "@percy/logger": "1.3.1",
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": "ab7652e08dab49b3efbe2968339c5a70391ed4ff"
56
+ "gitHead": "4b75c9eccad5924513a26ab5d8f02c6b931b6b2a"
57
57
  }