@percy/core 1.20.3 → 1.22.0-alpha.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/dist/config.js CHANGED
@@ -35,7 +35,7 @@ export const configSchema = {
35
35
  enableJavaScript: {
36
36
  type: 'boolean'
37
37
  },
38
- disableShadowDOM: {
38
+ disableShadowDOMSerialization: {
39
39
  type: 'boolean',
40
40
  default: false
41
41
  },
@@ -194,8 +194,8 @@ export const snapshotSchema = {
194
194
  enableJavaScript: {
195
195
  $ref: '/config/snapshot#/properties/enableJavaScript'
196
196
  },
197
- disableShadowDOM: {
198
- $ref: '/config/snapshot#/properties/disableShadowDOM'
197
+ disableShadowDOMSerialization: {
198
+ $ref: '/config/snapshot#/properties/disableShadowDOMSerialization'
199
199
  },
200
200
  discovery: {
201
201
  type: 'object',
package/dist/discovery.js CHANGED
@@ -24,7 +24,7 @@ function debugSnapshotOptions(snapshot) {
24
24
  debugProp(snapshot, 'widths', v => `${v}px`);
25
25
  debugProp(snapshot, 'minHeight', v => `${v}px`);
26
26
  debugProp(snapshot, 'enableJavaScript');
27
- debugProp(snapshot, 'disableShadowDOM');
27
+ debugProp(snapshot, 'disableShadowDOMSerialization');
28
28
  debugProp(snapshot, 'deviceScaleFactor');
29
29
  debugProp(snapshot, 'waitForTimeout');
30
30
  debugProp(snapshot, 'waitForSelector');
@@ -82,7 +82,7 @@ function parseDomResources({
82
82
  mimetype
83
83
  }) => {
84
84
  // serialized resource contents are base64 encoded
85
- content = Buffer.from(content, 'base64');
85
+ content = Buffer.from(content, mimetype.includes('text') ? 'utf8' : 'base64');
86
86
  // specify the resource as provided to prevent overwriting during asset discovery
87
87
  let resource = createResource(url, content, mimetype, {
88
88
  provided: true
package/dist/page.js CHANGED
@@ -144,7 +144,7 @@ export class Page {
144
144
  name,
145
145
  width,
146
146
  enableJavaScript,
147
- disableShadowDOM
147
+ disableShadowDOMSerialization
148
148
  } = snapshot;
149
149
  this.log.debug(`Taking snapshot: ${name}${width ? ` @${width}px` : ''}`, this.meta);
150
150
 
@@ -188,7 +188,7 @@ export class Page {
188
188
  url: document.URL
189
189
  }), {
190
190
  enableJavaScript,
191
- disableShadowDOM
191
+ disableShadowDOMSerialization
192
192
  });
193
193
  return {
194
194
  ...snapshot,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@percy/core",
3
- "version": "1.20.3",
3
+ "version": "1.22.0-alpha.0",
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.20.3",
43
- "@percy/config": "1.20.3",
44
- "@percy/dom": "1.20.3",
45
- "@percy/logger": "1.20.3",
42
+ "@percy/client": "1.22.0-alpha.0",
43
+ "@percy/config": "1.22.0-alpha.0",
44
+ "@percy/dom": "1.22.0-alpha.0",
45
+ "@percy/logger": "1.22.0-alpha.0",
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": "520bd156af47080881b651e4819014cbacf76781"
56
+ "gitHead": "5928e586c401ac10840d1ec6219875526e45d100"
57
57
  }
package/types/index.d.ts CHANGED
@@ -38,7 +38,7 @@ interface CommonSnapshotOptions {
38
38
  minHeight?: number;
39
39
  percyCSS?: string;
40
40
  enableJavaScript?: boolean;
41
- disableShadowDOM?: boolean;
41
+ disableShadowDOMSerialization?: boolean;
42
42
  devicePixelRatio?: number;
43
43
  scope?: string;
44
44
  }