Socket
Socket
Sign inDemoInstall

@percy/client

Package Overview
Dependencies
Maintainers
1
Versions
237
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@percy/client - npm Package Compare versions

Comparing version 1.28.0 to 1.28.1-beta.0

7

dist/client.js

@@ -5,3 +5,3 @@ import fs from 'fs';

import logger from '@percy/logger';
import { pool, request, formatBytes, sha256hash, base64encode, getPackageJSON, waitForTimeout } from './utils.js';
import { pool, request, formatBytes, sha256hash, base64encode, getPackageJSON, waitForTimeout, validateTiles } from './utils.js';

@@ -58,2 +58,4 @@ // Default client API URL can be set with an env var for API development

this.addEnvironmentInfo(environmentInfo);
this.buildType = null;
this.screenshotFlow = null;
}

@@ -556,2 +558,5 @@

async sendComparison(buildId, options) {
if (!validateTiles(options.tiles)) {
throw new Error('sha, filepath or content should be present in tiles object');
}
let snapshot = await this.createSnapshot(buildId, options);

@@ -558,0 +563,0 @@ let comparison = await this.createComparison(snapshot.data.id, options);

@@ -226,2 +226,10 @@ import os from 'os';

}
export function validateTiles(tiles) {
for (const tile of tiles) {
if (!tile.filepath && !tile.content && !tile.sha) {
return false;
}
}
return true;
}
export { hostnameMatches, ProxyHttpAgent, ProxyHttpsAgent, proxyAgentFor } from './proxy.js';

10

package.json
{
"name": "@percy/client",
"version": "1.28.0",
"version": "1.28.1-beta.0",
"license": "MIT",

@@ -12,3 +12,3 @@ "repository": {

"access": "public",
"tag": "latest"
"tag": "beta"
},

@@ -36,6 +36,6 @@ "engines": {

"dependencies": {
"@percy/env": "1.28.0",
"@percy/logger": "1.28.0"
"@percy/env": "1.28.1-beta.0",
"@percy/logger": "1.28.1-beta.0"
},
"gitHead": "9d95f18e45e37aa3683e5b8276fd85cf07dba8cb"
"gitHead": "648f81742ebf8c6f29ccdfdff77df124e4e1668d"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc