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

@percy/core

Package Overview
Dependencies
Maintainers
1
Versions
240
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@percy/core - npm Package Compare versions

Comparing version 1.28.1-beta.0 to 1.28.1-beta.1

6

dist/config.js

@@ -74,2 +74,5 @@ // Common config options used in Percy commands

},
testCase: {
type: 'string'
},
fullPage: {

@@ -316,2 +319,5 @@ type: 'boolean',

},
testCase: {
$ref: '/config/snapshot#/properties/testCase'
},
reshuffleInvalidTags: {

@@ -318,0 +324,0 @@ $ref: '/config/snapshot#/properties/reshuffleInvalidTags'

13

dist/discovery.js
import logger from '@percy/logger';
import Queue from './queue.js';
import { normalizeURL, hostnameMatches, createResource, createRootResource, createPercyCSSResource, createLogResource, yieldAll } from './utils.js';
import { normalizeURL, hostnameMatches, createResource, createRootResource, createPercyCSSResource, createLogResource, yieldAll, snapshotLogName } from './utils.js';

@@ -142,4 +142,4 @@ // Logs verbose debug logs detailing various snapshot options.

resources.push(createLogResource(logger.query(log => {
var _log$meta$snapshot;
return ((_log$meta$snapshot = log.meta.snapshot) === null || _log$meta$snapshot === void 0 ? void 0 : _log$meta$snapshot.name) === snapshot.meta.snapshot.name;
var _log$meta$snapshot, _log$meta$snapshot2;
return ((_log$meta$snapshot = log.meta.snapshot) === null || _log$meta$snapshot === void 0 ? void 0 : _log$meta$snapshot.testCase) === snapshot.meta.snapshot.testCase && ((_log$meta$snapshot2 = log.meta.snapshot) === null || _log$meta$snapshot2 === void 0 ? void 0 : _log$meta$snapshot2.name) === snapshot.meta.snapshot.name;
})));

@@ -300,7 +300,8 @@ return {

})
// snapshots are unique by name; when deferred also by widths
// snapshots are unique by name and testCase; when deferred also by widths
.handle('find', ({
name,
testCase,
widths
}, snapshot) => snapshot.name === name && (!percy.deferUploads || !widths || widths.join() === snapshot.widths.join()))
}, snapshot) => snapshot.testCase === testCase && snapshot.name === name && (!percy.deferUploads || !widths || widths.join() === snapshot.widths.join()))
// initialize the resources for DOM snapshots

@@ -361,3 +362,3 @@ .handle('push', snapshot => {

// only error about aborted snapshots when not closed
percy.log.error('Received a duplicate snapshot, ' + `the previous snapshot was aborted: ${name}`, meta);
percy.log.error('Received a duplicate snapshot, ' + `the previous snapshot was aborted: ${snapshotLogName(name, meta)}`, meta);
} else {

@@ -364,0 +365,0 @@ // log all other encountered errors

@@ -6,3 +6,3 @@ import logger from '@percy/logger';

import Queue from './queue.js';
import { request, hostnameMatches, yieldTo } from './utils.js';
import { request, hostnameMatches, yieldTo, snapshotLogName } from './utils.js';
import { JobData } from './wait-for-job.js';

@@ -117,3 +117,4 @@

snapshot: {
name: options.name
name: options.name,
testCase: options.testCase
}

@@ -396,6 +397,7 @@ }

})
// snapshots are unique by name alone
// snapshots are unique by name and testCase both
.handle('find', ({
name
}, snapshot) => snapshot.name === name)
name,
testCase
}, snapshot) => snapshot.testCase === testCase && snapshot.name === name)
// when pushed, maybe flush old snapshots or possibly merge with existing snapshots

@@ -409,4 +411,4 @@ .handle('push', (snapshot, existing) => {

// log immediately when not deferred or dry-running
if (!percy.deferUploads) percy.log.info(`Snapshot taken: ${name}`, meta);
if (percy.dryRun) percy.log.info(`Snapshot found: ${name}`, meta);
if (!percy.deferUploads) percy.log.info(`Snapshot taken: ${snapshotLogName(name, meta)}`, meta);
if (percy.dryRun) percy.log.info(`Snapshot found: ${snapshotLogName(name, meta)}`, meta);

@@ -413,0 +415,0 @@ // immediately flush when uploads are delayed but not skipped

@@ -331,2 +331,9 @@ import EventEmitter from 'events';

}
export function snapshotLogName(name, meta) {
var _meta$snapshot;
if (meta !== null && meta !== void 0 && (_meta$snapshot = meta.snapshot) !== null && _meta$snapshot !== void 0 && _meta$snapshot.testCase) {
return `testCase: ${meta.snapshot.testCase}, ${name}`;
}
return name;
}

@@ -333,0 +340,0 @@ // DefaultMap, which returns a default value for an uninitialized key

{
"name": "@percy/core",
"version": "1.28.1-beta.0",
"version": "1.28.1-beta.1",
"license": "MIT",

@@ -46,7 +46,7 @@ "repository": {

"dependencies": {
"@percy/client": "1.28.1-beta.0",
"@percy/config": "1.28.1-beta.0",
"@percy/dom": "1.28.1-beta.0",
"@percy/logger": "1.28.1-beta.0",
"@percy/webdriver-utils": "1.28.1-beta.0",
"@percy/client": "1.28.1-beta.1",
"@percy/config": "1.28.1-beta.1",
"@percy/dom": "1.28.1-beta.1",
"@percy/logger": "1.28.1-beta.1",
"@percy/webdriver-utils": "1.28.1-beta.1",
"content-disposition": "^0.5.4",

@@ -62,3 +62,3 @@ "cross-spawn": "^7.0.3",

},
"gitHead": "648f81742ebf8c6f29ccdfdff77df124e4e1668d"
"gitHead": "d423bf3f6b26eaba752470121cafb2ad03317b4d"
}
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