@percy/client
Advanced tools
Comparing version 1.0.0-beta.32 to 1.0.0-beta.33
@@ -35,4 +35,4 @@ "use strict"; | ||
httpAgent: (0, _utils.httpAgentFor)(apiUrl), | ||
clientInfo: [].concat(clientInfo), | ||
environmentInfo: [].concat(environmentInfo), | ||
clientInfo: new Set([].concat(clientInfo)), | ||
environmentInfo: new Set([].concat(environmentInfo)), | ||
env: new _env.default(process.env), | ||
@@ -50,4 +50,4 @@ // build info is stored for reference | ||
addClientInfo(info) { | ||
if (info && this.clientInfo.indexOf(info) === -1) { | ||
this.clientInfo.push(info); | ||
for (let i of [].concat(info)) { | ||
if (i) this.clientInfo.add(i); | ||
} | ||
@@ -58,4 +58,4 @@ } // Adds additional unique environment info. | ||
addEnvironmentInfo(info) { | ||
if (info && this.environmentInfo.indexOf(info) === -1) { | ||
this.environmentInfo.push(info); | ||
for (let i of [].concat(info)) { | ||
if (i) this.environmentInfo.add(i); | ||
} | ||
@@ -66,4 +66,4 @@ } // Stringifies client and environment info. | ||
userAgent() { | ||
let client = [`Percy/${/\w+$/.exec(this.apiUrl)}`].concat(`${_package.default.name}/${_package.default.version}`, this.clientInfo).filter(Boolean).join(' '); | ||
let environment = this.environmentInfo.concat([`node/${process.version}`, this.env.info]).filter(Boolean).join('; '); | ||
let client = [`Percy/${/\w+$/.exec(this.apiUrl)}`].concat(`${_package.default.name}/${_package.default.version}`, ...this.clientInfo).filter(Boolean).join(' '); | ||
let environment = [...this.environmentInfo].concat(`node/${process.version}`, this.env.info).filter(Boolean).join('; '); | ||
return `${client} (${environment})`; | ||
@@ -70,0 +70,0 @@ } // Checks for a Percy token and returns it. |
{ | ||
"name": "@percy/client", | ||
"version": "1.0.0-beta.32", | ||
"version": "1.0.0-beta.33", | ||
"license": "MIT", | ||
@@ -29,5 +29,5 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"@percy/env": "^1.0.0-beta.32" | ||
"@percy/env": "^1.0.0-beta.33" | ||
}, | ||
"gitHead": "edbef4c5ded9427447b25c13dda0ecd2639fc370" | ||
"gitHead": "8495d980d284599584f748b4ef33bd39acdb8ba0" | ||
} |
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
21982
Updated@percy/env@^1.0.0-beta.33