@percy/client
Advanced tools
Comparing version 1.0.0-beta.67 to 1.0.0-beta.68
@@ -54,4 +54,4 @@ "use strict"; | ||
// initial user agent info | ||
clientInfo = '', | ||
environmentInfo = '', | ||
clientInfo, | ||
environmentInfo, | ||
// versioned api url | ||
@@ -64,2 +64,6 @@ apiUrl = PERCY_CLIENT_API_URL | ||
_defineProperty(this, "clientInfo", new Set()); | ||
_defineProperty(this, "environmentInfo", new Set()); | ||
Object.assign(this, { | ||
@@ -69,4 +73,4 @@ token, | ||
}); | ||
this.clientInfo = new Set([].concat(clientInfo)); | ||
this.environmentInfo = new Set([].concat(environmentInfo)); | ||
this.addClientInfo(clientInfo); | ||
this.addEnvironmentInfo(environmentInfo); | ||
} // Adds additional unique client info. | ||
@@ -90,5 +94,5 @@ | ||
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('; '); | ||
return `${client} (${environment})`; | ||
let client = new Set([`Percy/${/\w+$/.exec(this.apiUrl)}`].concat(`${_package.default.name}/${_package.default.version}`, ...this.clientInfo).filter(Boolean)); | ||
let environment = new Set([...this.environmentInfo].concat(`node/${process.version}`, this.env.info).filter(Boolean)); | ||
return `${[...client].join(' ')} (${[...environment].join('; ')})`; | ||
} // Checks for a Percy token and returns it. | ||
@@ -307,2 +311,7 @@ | ||
this.addEnvironmentInfo(environmentInfo); | ||
if (!this.clientInfo.size || !this.environmentInfo.size) { | ||
this.log.warn('Warning: Missing `clientInfo` and/or `environmentInfo` properties'); | ||
} | ||
this.log.debug(`Creating snapshot: ${name}...`); | ||
@@ -309,0 +318,0 @@ return this.post(`builds/${buildId}/snapshots`, { |
{ | ||
"name": "@percy/client", | ||
"version": "1.0.0-beta.67", | ||
"version": "1.0.0-beta.68", | ||
"license": "MIT", | ||
@@ -26,4 +26,4 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"@percy/env": "1.0.0-beta.67", | ||
"@percy/logger": "1.0.0-beta.67" | ||
"@percy/env": "1.0.0-beta.68", | ||
"@percy/logger": "1.0.0-beta.68" | ||
}, | ||
@@ -35,3 +35,3 @@ "repository": { | ||
}, | ||
"gitHead": "8b6d0d9f332e2d9055927a6ca780e246a7698ede" | ||
"gitHead": "32ffd12d1db407b7c2b4ca8364f99f90b2cfa862" | ||
} |
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
33877
700
+ Added@percy/env@1.0.0-beta.68(transitive)
+ Added@percy/logger@1.0.0-beta.68(transitive)
- Removed@percy/env@1.0.0-beta.67(transitive)
- Removed@percy/logger@1.0.0-beta.67(transitive)
Updated@percy/env@1.0.0-beta.68
Updated@percy/logger@1.0.0-beta.68