Socket
Socket
Sign inDemoInstall

@percy/core

Package Overview
Dependencies
Maintainers
1
Versions
233
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.2-beta.0 to 1.28.2-beta.1

30

dist/discovery.js

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

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

@@ -165,3 +166,4 @@ discovery,

deviceScaleFactor,
mobile
mobile,
captureForDevices
} = options;

@@ -220,2 +222,17 @@

// iterate over device to trigger reqeusts and capture other dpr width
if (captureForDevices) {
for (const device of captureForDevices) {
yield waitForDiscoveryNetworkIdle(page, discovery);
// We are not adding these widths and pixels ratios in loop below because we want to explicitly reload the page after resize which we dont do below
yield* captureSnapshotResources(page, {
...snapshot,
widths: [device.width]
}, {
deviceScaleFactor: device.deviceScaleFactor,
mobile: true
});
}
}
// iterate over widths to trigger reqeusts and capture other widths

@@ -245,8 +262,4 @@ if (isBaseSnapshot || captureWidths) {

// recursively trigger resource requests for any alternate device pixel ratio
if (deviceScaleFactor !== discovery.devicePixelRatio) {
yield waitForDiscoveryNetworkIdle(page, discovery);
yield* captureSnapshotResources(page, snapshot, {
deviceScaleFactor: discovery.devicePixelRatio,
mobile: true
});
if (discovery.devicePixelRatio) {
log.deprecated('discovery.devicePixelRatio is deprecated percy will now auto capture resource in all devicePixelRatio, Ignoring configuration');
}

@@ -361,3 +374,4 @@

captureWidths: !snapshot.domSnapshot && percy.deferUploads,
capture: callback
capture: callback,
captureForDevices: percy.deviceDetails || []
});

@@ -364,0 +378,0 @@ } finally {

@@ -148,2 +148,3 @@ import PercyClient from '@percy/client';

try {
var _this$build;
// start the snapshots queue immediately when not delayed or deferred

@@ -155,2 +156,3 @@ if (!this.delayUploads && !this.deferUploads) yield this.#snapshots.start();

if (this.server) yield this.server.listen();
if (this.projectType === 'web') this.deviceDetails = yield this.client.getDeviceDetails((_this$build = this.build) === null || _this$build === void 0 ? void 0 : _this$build.id);
const snapshotType = this.projectType === 'web' ? 'snapshot' : 'comparison';

@@ -263,6 +265,6 @@ this.syncQueue = new WaitForJob(snapshotType, this);

snapshot(options, snapshotPromise = {}) {
var _this$build;
var _this$build2;
if (this.readyState !== 1) {
throw new Error('Not running');
} else if ((_this$build = this.build) !== null && _this$build !== void 0 && _this$build.error) {
} else if ((_this$build2 = this.build) !== null && _this$build2 !== void 0 && _this$build2.error) {
throw new Error(this.build.error);

@@ -269,0 +271,0 @@ } else if (Array.isArray(options)) {

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

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

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

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

},
"gitHead": "0519aa061bd36acd0852b961e24c05b9ad67274f"
"gitHead": "c4d0637366dbc28eeda234f93d44424d9c565f49"
}
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