New:Socket for Asana Is Now Available.Learn more
Get Started

@percy/client

Package Overview
Dependencies
Maintainers
1
Versions
388
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.32.7-beta.0
to
1.32.7-beta.2
+4
-7
dist/client.js

@@ -409,12 +409,9 @@ import fs from 'fs';

async getIntelliStorySnapshotNameToCommit(buildId) {
var _this$env$git, _this$env$target, _this$env$git2, _this$env$target2;
this.log.debug('IntelliStory: looking up baselines...');
// `build_id` is the only input. The build already exists by the time this is
// called, so its base build has been selected server-side and the endpoint
// reads through to that base build's commit — there is nothing to predict
// from git/PR context any more.
const qs = new URLSearchParams();
if (buildId) qs.append('build_id', buildId);
if ((_this$env$git = this.env.git) !== null && _this$env$git !== void 0 && _this$env$git.branch) qs.append('branch', this.env.git.branch);
if ((_this$env$target = this.env.target) !== null && _this$env$target !== void 0 && _this$env$target.branch) qs.append('target_branch', this.env.target.branch);
if ((_this$env$git2 = this.env.git) !== null && _this$env$git2 !== void 0 && _this$env$git2.sha) qs.append('commit_sha', this.env.git.sha);
if ((_this$env$target2 = this.env.target) !== null && _this$env$target2 !== void 0 && _this$env$target2.commit) qs.append('target_commit_sha', this.env.target.commit);
if (this.env.pullRequest != null) qs.append('pull_request_number', String(this.env.pullRequest));
if (this.env.partial) qs.append('partial', 'true');
const query = qs.toString();

@@ -421,0 +418,0 @@ return this.get(query ? `intelli_story/snapshot-name-to-commit?${query}` : 'intelli_story/snapshot-name-to-commit', {

@@ -242,2 +242,13 @@ import os from 'os';

req.on('error', handleError);
// Node's `timeout` option only *emits* a 'timeout' event once the socket
// has been idle that long — it does not abort anything. Without this
// listener a caller passing `timeout` still waits forever on a peer that
// accepts the connection and then goes silent, and the promise never
// settles. Destroying the request surfaces it through 'error' instead.
if (requestOptions.timeout) {
req.on('timeout', () => req.destroy(Object.assign(new Error(`Request to ${url} timed out after ${requestOptions.timeout}ms`), {
code: 'ETIMEDOUT'
})));
}
req.end(body);

@@ -244,0 +255,0 @@ }, {

{
"name": "@percy/client",
"version": "1.32.7-beta.0",
"version": "1.32.7-beta.2",
"license": "MIT",

@@ -36,9 +36,9 @@ "repository": {

"dependencies": {
"@percy/config": "1.32.7-beta.0",
"@percy/env": "1.32.7-beta.0",
"@percy/logger": "1.32.7-beta.0",
"@percy/config": "1.32.7-beta.2",
"@percy/env": "1.32.7-beta.2",
"@percy/logger": "1.32.7-beta.2",
"pac-proxy-agent": "^7.0.2",
"pako": "^2.1.0"
},
"gitHead": "f86a18de3e04d3cfa9d14ce5d186ad66c3f8e020"
"gitHead": "be6a40b9d99ef190e4f6123491241c27c8308161"
}