@percy/client
Advanced tools
Comparing version 1.20.3 to 1.21.0
@@ -365,4 +365,9 @@ import fs from 'fs'; | ||
for (let tile of tiles) { | ||
if (tile.sha || tile.content || !tile.filepath) continue; | ||
tile.content = await fs.promises.readFile(tile.filepath); | ||
if (tile.sha) continue; | ||
if (tile.content && typeof tile.content === 'string') { | ||
// base64 encoded content coming from SDK | ||
tile.content = Buffer.from(tile.content, 'base64'); | ||
} else if (tile.filepath) { | ||
tile.content = await fs.promises.readFile(tile.filepath); | ||
} | ||
} | ||
@@ -415,3 +420,3 @@ return this.post(`snapshots/${snapshotId}/comparisons`, { | ||
this.log.debug(`Uploading comparison tile: ${index + 1}/${total} (${comparisonId})...`); | ||
if (filepath) content = await fs.promises.readFile(filepath); | ||
if (filepath && !content) content = await fs.promises.readFile(filepath); | ||
if (sha) { | ||
@@ -418,0 +423,0 @@ return await this.verify(comparisonId, sha); |
{ | ||
"name": "@percy/client", | ||
"version": "1.20.3", | ||
"version": "1.21.0", | ||
"license": "MIT", | ||
@@ -34,6 +34,6 @@ "repository": { | ||
"dependencies": { | ||
"@percy/env": "1.20.3", | ||
"@percy/logger": "1.20.3" | ||
"@percy/env": "1.21.0", | ||
"@percy/logger": "1.21.0" | ||
}, | ||
"gitHead": "520bd156af47080881b651e4819014cbacf76781" | ||
"gitHead": "44c63a3214f1fbfb0b1adcb6fcfe284a9f54d0cb" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
42373
968
+ Added@percy/env@1.21.0(transitive)
+ Added@percy/logger@1.21.0(transitive)
- Removed@percy/env@1.20.3(transitive)
- Removed@percy/logger@1.20.3(transitive)
Updated@percy/env@1.21.0
Updated@percy/logger@1.21.0