@percy/core 1.26.3-beta.3 → 1.26.3
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/network.js +7 -3
- package/package.json +7 -7
package/dist/network.js
CHANGED
|
@@ -431,12 +431,16 @@ async function saveResponseResource(network, request) {
|
|
|
431
431
|
} else if (!enableJavaScript && !ALLOWED_RESOURCES.includes(request.type)) {
|
|
432
432
|
return log.debug(`- Skipping disallowed resource type [${request.type}]`, meta);
|
|
433
433
|
}
|
|
434
|
+
let detectedMime = mime.lookup(response.url);
|
|
434
435
|
let mimeType =
|
|
435
436
|
// ensure the mimetype is correct for text/plain responses
|
|
436
|
-
response.mimeType === 'text/plain' &&
|
|
437
|
+
response.mimeType === 'text/plain' && detectedMime || response.mimeType;
|
|
437
438
|
|
|
438
|
-
// font
|
|
439
|
-
|
|
439
|
+
// if we detect a font mime, we dont want to override it as different browsers may behave
|
|
440
|
+
// differently for incorrect mimetype in font response, but we want to treat it as a
|
|
441
|
+
// font anyway as font responses from the browser may not be properly encoded,
|
|
442
|
+
// so request them directly.
|
|
443
|
+
if (mimeType !== null && mimeType !== void 0 && mimeType.includes('font') || detectedMime && detectedMime.includes('font')) {
|
|
440
444
|
log.debug('- Requesting asset directly');
|
|
441
445
|
body = await makeDirectRequest(network, request);
|
|
442
446
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@percy/core",
|
|
3
|
-
"version": "1.26.3
|
|
3
|
+
"version": "1.26.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
},
|
|
10
10
|
"publishConfig": {
|
|
11
11
|
"access": "public",
|
|
12
|
-
"tag": "
|
|
12
|
+
"tag": "latest"
|
|
13
13
|
},
|
|
14
14
|
"engines": {
|
|
15
15
|
"node": ">=14"
|
|
@@ -43,10 +43,10 @@
|
|
|
43
43
|
"test:types": "tsd"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@percy/client": "1.26.3
|
|
47
|
-
"@percy/config": "1.26.3
|
|
48
|
-
"@percy/dom": "1.26.3
|
|
49
|
-
"@percy/logger": "1.26.3
|
|
46
|
+
"@percy/client": "1.26.3",
|
|
47
|
+
"@percy/config": "1.26.3",
|
|
48
|
+
"@percy/dom": "1.26.3",
|
|
49
|
+
"@percy/logger": "1.26.3",
|
|
50
50
|
"content-disposition": "^0.5.4",
|
|
51
51
|
"cross-spawn": "^7.0.3",
|
|
52
52
|
"extract-zip": "^2.0.1",
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
"rimraf": "^3.0.2",
|
|
58
58
|
"ws": "^8.0.0"
|
|
59
59
|
},
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "24150e932f8461869c92a5970c050003cba41f6a"
|
|
61
61
|
}
|