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
241
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.29.4-beta.2 to 1.29.4-beta.3

29

dist/discovery.js

@@ -64,2 +64,15 @@ import logger from '@percy/logger';

// parse browser cookies in correct format if flag is enabled
// it assumes that cookiesStr is string returned by document.cookie
function parseCookies(cookiesStr) {
if (process.env.PERCY_DO_NOT_USE_CAPTURED_COOKIES === 'true' || !(typeof cookiesStr === 'string' && cookiesStr !== '')) return null;
return cookiesStr.split('; ').map(c => {
const eqIdx = c.indexOf('=');
return {
name: c.substring(0, eqIdx),
value: c.substring(eqIdx + 1)
};
});
}
// Wait for a page's asset discovery network to idle

@@ -167,2 +180,3 @@ function waitForDiscoveryNetworkIdle(page, options) {

async function* captureSnapshotResources(page, snapshot, options) {
var _snapshot$domSnapshot;
const log = logger('core:discovery');

@@ -181,16 +195,3 @@ let {

} = options;
let cookies;
if (process.env.PERCY_DO_NOT_USE_CAPTURED_COOKIES !== 'true') {
var _snapshot$domSnapshot;
cookies = snapshot === null || snapshot === void 0 ? void 0 : (_snapshot$domSnapshot = snapshot.domSnapshot) === null || _snapshot$domSnapshot === void 0 ? void 0 : _snapshot$domSnapshot.cookies;
}
if (typeof cookies === 'string' && cookies !== '') {
cookies = cookies.split('; ').map(c => c.split('='));
cookies = cookies.map(([key, value]) => {
return {
name: key,
value: value
};
});
}
let cookies = parseCookies(snapshot === null || snapshot === void 0 ? void 0 : (_snapshot$domSnapshot = snapshot.domSnapshot) === null || _snapshot$domSnapshot === void 0 ? void 0 : _snapshot$domSnapshot.cookies);

@@ -197,0 +198,0 @@ // iterate over device to trigger reqeusts and capture other dpr width

@@ -513,3 +513,3 @@ import { request as makeRequest } from '@percy/client/utils';

if (mimeType !== null && mimeType !== void 0 && mimeType.includes('font') || detectedMime && detectedMime.includes('font')) {
log.debug('- Requesting asset directly');
log.debug('- Requesting asset directly', meta);
body = await makeDirectRequest(network, request);

@@ -529,3 +529,3 @@ }

log.debug(`Encountered an error processing resource: ${url}`, meta);
log.debug(error);
log.debug(error, meta);
}

@@ -532,0 +532,0 @@ }

{
"name": "@percy/core",
"version": "1.29.4-beta.2",
"version": "1.29.4-beta.3",
"license": "MIT",

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

"dependencies": {
"@percy/client": "1.29.4-beta.2",
"@percy/config": "1.29.4-beta.2",
"@percy/dom": "1.29.4-beta.2",
"@percy/logger": "1.29.4-beta.2",
"@percy/webdriver-utils": "1.29.4-beta.2",
"@percy/client": "1.29.4-beta.3",
"@percy/config": "1.29.4-beta.3",
"@percy/dom": "1.29.4-beta.3",
"@percy/logger": "1.29.4-beta.3",
"@percy/webdriver-utils": "1.29.4-beta.3",
"content-disposition": "^0.5.4",

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

},
"gitHead": "f316b7f672fbec81d3f13c53591735f102bc17a1"
"gitHead": "8c61c0ad7a8a1b61f199a2a011ac296764cdc2eb"
}
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