chromatic
Advanced tools
Comparing version 6.0.4 to 6.0.5-canary.0
/** | ||
* Returns `true` if running within Chromatic, `false` otherwise. | ||
* @argument window - The window object whose `navigator` and/or `location` is | ||
* used to determine if running in Chromatic. | ||
*/ | ||
declare function isChromatic(): boolean; | ||
declare function isChromatic(window?: Window): boolean; | ||
export = isChromatic; |
/* eslint-env browser */ | ||
module.exports = function isChromatic() { | ||
module.exports = function isChromatic(windowArg) { | ||
const windowToCheck = windowArg || (typeof window !== 'undefined' && window); | ||
return !!( | ||
typeof window !== 'undefined' && | ||
(window.navigator.userAgent.match(/Chromatic/) || window.location.href.match(/chromatic=true/)) | ||
windowToCheck && | ||
(windowToCheck.navigator.userAgent.match(/Chromatic/) || | ||
windowToCheck.location.href.match(/chromatic=true/)) | ||
); | ||
}; |
{ | ||
"name": "chromatic", | ||
"version": "6.0.4", | ||
"version": "6.0.5-canary.0", | ||
"description": "Automate visual testing across browsers. Gather UI feedback. Versioned documentation.", | ||
@@ -46,3 +46,3 @@ "keywords": [ | ||
"lint:package": "sort-package-json", | ||
"prepack": "npm run build", | ||
"prepublish": "npm run build", | ||
"postpublish": "npm run publish-action", | ||
@@ -49,0 +49,0 @@ "publish-action": "node scripts/publish-action.js", |
@@ -91,1 +91,2 @@ # Chromatic CLI | ||
This ensures we can safely do a new `canary` or `next` release later, without anyone getting an unexpected update. | ||
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
1895428
9
596
92
1