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

nighthouse

Package Overview
Dependencies
Maintainers
0
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nighthouse - npm Package Compare versions

Comparing version 2.1.5 to 2.1.6

15

out/common/lighthouse.js

@@ -157,11 +157,16 @@ "use strict";

this.logger.trace(`Pushing promise for next response to request ${id}`);
const deferred = new deferred_1.Deferred();
this.responseHandlers.set(id, deferred);
nextPromises.push(deferred.promise.then(message => {
const responseHandler = new deferred_1.Deferred();
this.responseHandlers.set(id, responseHandler);
const nextDeferred = new deferred_1.Deferred();
nextPromises.push(nextDeferred.promise);
responseHandler.promise
.then(response => {
pushPromise();
return message;
}));
nextDeferred.resolve(response);
})
.catch(nextDeferred.reject);
};
pushPromise();
while (true) {
console.assert(nextPromises.length > 0);
const promise = nextPromises.shift();

@@ -168,0 +173,0 @@ yield await promise;

{
"name": "nighthouse",
"version": "2.1.5",
"version": "2.1.6",
"description": "Lightweight Project Lighthouse client for JavaScript",

@@ -5,0 +5,0 @@ "workspaces": [

@@ -181,8 +181,15 @@ import { Transport } from "./transport";

this.logger.trace(`Pushing promise for next response to request ${id}`);
const deferred = new Deferred<ServerMessage<unknown>>();
this.responseHandlers.set(id, deferred);
nextPromises.push(deferred.promise.then(message => {
pushPromise();
return message;
}));
const responseHandler = new Deferred<ServerMessage<unknown>>();
this.responseHandlers.set(id, responseHandler);
const nextDeferred = new Deferred<ServerMessage<unknown>>();
nextPromises.push(nextDeferred.promise);
responseHandler.promise
.then(response => {
pushPromise();
nextDeferred.resolve(response);
})
.catch(nextDeferred.reject);
}

@@ -193,2 +200,3 @@

while (true) {
console.assert(nextPromises.length > 0);
const promise = nextPromises.shift();

@@ -195,0 +203,0 @@ yield await promise;

Sorry, the diff of this file is not supported yet

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