Socket
Socket
Sign inDemoInstall

@percy/cli-snapshot

Package Overview
Dependencies
Maintainers
6
Versions
238
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@percy/cli-snapshot - npm Package Compare versions

Comparing version 1.12.0 to 1.13.0

31

dist/snapshot.js

@@ -65,16 +65,16 @@ import fs from 'fs';

sitemap
} = args; // parse and validate the --base-url flag after args are parsed
} = args;
if (file || serve) baseUrl && (baseUrl = parseBaseUrl(baseUrl, !!serve)); // only continue if percy is not disabled
// parse and validate the --base-url flag after args are parsed
if (file || serve) baseUrl && (baseUrl = parseBaseUrl(baseUrl, !!serve));
// only continue if percy is not disabled
if (!percy) exit(0, 'Percy is disabled');
try {
let options;
/* istanbul ignore else: arg is required and always one of these */
if (file) {
// load snapshots file
let snapshots = yield loadSnapshotFile(file); // remove any references and accept an array of snapshots instead of an config object
let snapshots = yield loadSnapshotFile(file);
// remove any references and accept an array of snapshots instead of an config object
let {

@@ -110,3 +110,2 @@ references,

}
yield* percy.yield.start();

@@ -119,5 +118,6 @@ yield* percy.yield.snapshot(options);

}
}); // Validates the provided `--base-url` flag and returns a `baseUrl` string if valid. The flag is
});
// Validates the provided `--base-url` flag and returns a `baseUrl` string if valid. The flag is
// validated and parsed differently for static directories and snapshot files.
function parseBaseUrl(baseUrl, pathOnly) {

@@ -131,17 +131,15 @@ try {

}
} // Small shallow merge util that does not merge null or undefined values.
}
// Small shallow merge util that does not merge null or undefined values.
function merge(...objs) {
return objs.reduce((target, obj) => {
for (let k in obj) target[k] = obj[k] ?? target[k];
return target;
}, {});
} // Loads snapshot options from a js, json, or yaml file.
}
// Loads snapshot options from a js, json, or yaml file.
async function loadSnapshotFile(file) {
let ext = path.extname(file);
if (/\.(c|m)?js$/.test(ext)) {

@@ -163,3 +161,2 @@ let {

}
export default snapshot;
{
"name": "@percy/cli-snapshot",
"version": "1.12.0",
"version": "1.13.0",
"license": "MIT",

@@ -35,6 +35,6 @@ "repository": {

"dependencies": {
"@percy/cli-command": "1.12.0",
"@percy/cli-command": "1.13.0",
"yaml": "^2.0.0"
},
"gitHead": "4303b74df91f60e36065141289d2ef2277d1d6fc"
"gitHead": "d2e812d14aa446fa580ffa75144a6280627b5a27"
}
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