@percy/client 1.26.3-beta.1 → 1.26.3-beta.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.
Files changed (2) hide show
  1. package/dist/proxy.js +5 -1
  2. package/package.json +4 -4
package/dist/proxy.js CHANGED
@@ -3,6 +3,7 @@ import tls from 'tls';
3
3
  import http from 'http';
4
4
  import https from 'https';
5
5
  import logger from '@percy/logger';
6
+ import { stripQuotesAndSpaces } from '@percy/env/utils';
6
7
  const CRLF = '\r\n';
7
8
  const STATUS_REG = /^HTTP\/1.[01] (\d*)/;
8
9
 
@@ -62,7 +63,10 @@ export function href(options) {
62
63
  // Returns the proxy URL for a set of request options
63
64
  export function getProxy(options) {
64
65
  let proxyUrl = options.protocol === 'https:' && (process.env.https_proxy || process.env.HTTPS_PROXY) || process.env.http_proxy || process.env.HTTP_PROXY;
65
- let shouldProxy = !!proxyUrl && !hostnameMatches(process.env.no_proxy || process.env.NO_PROXY, href(options));
66
+ let shouldProxy = !!proxyUrl && !hostnameMatches(stripQuotesAndSpaces(process.env.no_proxy || process.env.NO_PROXY), href(options));
67
+ if (proxyUrl && typeof proxyUrl === 'string') {
68
+ proxyUrl = stripQuotesAndSpaces(proxyUrl);
69
+ }
66
70
  if (shouldProxy) {
67
71
  proxyUrl = new URL(proxyUrl);
68
72
  let isHttps = proxyUrl.protocol === 'https:';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@percy/client",
3
- "version": "1.26.3-beta.1",
3
+ "version": "1.26.3-beta.3",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -32,8 +32,8 @@
32
32
  "test:coverage": "yarn test --coverage"
33
33
  },
34
34
  "dependencies": {
35
- "@percy/env": "1.26.3-beta.1",
36
- "@percy/logger": "1.26.3-beta.1"
35
+ "@percy/env": "1.26.3-beta.3",
36
+ "@percy/logger": "1.26.3-beta.3"
37
37
  },
38
- "gitHead": "6571d4ad016bc8b3b32d49bf8a7da1393c1a5eba"
38
+ "gitHead": "10985eb00dad949e7dd6bbe6418b3fecfe22bba8"
39
39
  }