Socket
Socket
Sign inDemoInstall

@percy/core

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/core - npm Package Compare versions

Comparing version 1.27.5-beta.0 to 1.27.6-alpha.0

2

dist/discovery.js

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

} = percy.config.discovery;
let queue = new Queue();
let queue = new Queue('discovery');
let cache;

@@ -285,0 +285,0 @@ return queue.set({

@@ -12,2 +12,3 @@ function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }

import { yieldFor, generatePromise, AbortController } from './utils.js';
import logger from '@percy/logger';

@@ -50,3 +51,5 @@ // Assigns a deffered promise and resolve & reject functions to an object

export class Queue {
constructor() {
// item concurrency
constructor(name) {
_classPrivateMethodInitSpec(this, _until);

@@ -57,2 +60,3 @@ _classPrivateMethodInitSpec(this, _process);

_defineProperty(this, "concurrency", 10);
_defineProperty(this, "log", logger('core:queue'));
_classPrivateFieldInitSpec(this, _handlers, {

@@ -79,3 +83,5 @@ writable: true,

_defineProperty(this, "readyState", 0);
this.name = name;
}
// Configure queue properties

@@ -208,2 +214,3 @@ set({

let tasks = [..._classPrivateFieldGet(this, _queued)];
this.log.debug(`Clearing ${this.name} queue, queued state: ${_classPrivateFieldGet(this, _queued).size}, pending state: ${_classPrivateFieldGet(this, _pending).size}`);
_classPrivateFieldGet(this, _queued).clear();

@@ -243,2 +250,3 @@ for (let task of tasks) {

flush(callback) {
this.log.debug(`Flushing ${this.name} queue, queued state: ${_classPrivateFieldGet(this, _queued).size}, pending state: ${_classPrivateFieldGet(this, _pending).size}`);
let interrupt =

@@ -326,5 +334,7 @@ // check for existing interrupts

// calculate the position within pending when not stopping
if (!(task !== null && task !== void 0 && task.stop) && (task === null || task === void 0 ? void 0 : task.pending) != null) pending = positionOf(_classPrivateFieldGet(this, _pending), task);
// Commenting below line reason being currently if the task passed is found we will stop flushing
// rest of the tasks but ideally it should wait for flushing of all the tasks till the last dequeued task.
// if (!task?.stop && task?.pending != null) pending = positionOf(this.#pending, task);
// call the callback and return true when not queued or pending
let position = (queued ?? 0) + (pending ?? 0);
let position = (queued ?? 0) + pending;
callback === null || callback === void 0 ? void 0 : callback(position);

@@ -331,0 +341,0 @@ return !position;

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

} = percy.config.discovery;
let queue = new Queue();
let queue = new Queue('snapshot');
let build;

@@ -324,0 +324,0 @@ return queue.set({

{
"name": "@percy/core",
"version": "1.27.5-beta.0",
"version": "1.27.6-alpha.0",
"license": "MIT",

@@ -12,3 +12,3 @@ "repository": {

"access": "public",
"tag": "latest"
"tag": "alpha"
},

@@ -47,7 +47,7 @@ "engines": {

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

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

},
"gitHead": "5fed59aa21112e7854a414306504ce7243df7365"
"gitHead": "415a083dc13e9453990b042a41d6676f6618df0c"
}
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