Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@guardian/paparazzi

Package Overview
Dependencies
Maintainers
18
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@guardian/paparazzi - npm Package Compare versions

Comparing version 0.1.2 to 0.2.0

.defaultpaparazzirc

32

index.js

@@ -13,22 +13,12 @@ #!/usr/bin/env node

const getConfig = () => {
const defaultConfig = {
sizes: {
phone: {
width: 375,
height: 1100,
},
},
out: 'screenshots',
screenshot: {},
};
const fetchConfigFile = file => {
try {
const handle = readFileSync(resolve(process.cwd(), config), 'utf8');
return {
...defaultConfig,
...JSON.parse(handle),
};
return require(file);
} catch (error) {
console.error(chalk.red(`error! ${error}`));
return defaultConfig;
try {
return JSON.parse(readFileSync(resolve(process.cwd(), config), 'utf8'));
} catch (error) {
console.error(chalk.red(`error! ${error}`));
return {};
}
}

@@ -38,3 +28,7 @@ };

const getConfigOrFail = () => {
const conf = getConfig();
const conf = {
...fetchConfigFile(resolve(__dirname, '.defaultpaparazzirc')),
...fetchConfigFile(resolve(process.cwd(), config)),
};
if (!conf.prefix || !conf.routes || !conf.out) {

@@ -41,0 +35,0 @@ console.error(

{
"name": "@guardian/paparazzi",
"version": "0.1.2",
"version": "0.2.0",
"description": "Automated manual visual regression testing",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc