New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@lighthouse/sdk

Package Overview
Dependencies
Maintainers
3
Versions
860
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lighthouse/sdk - npm Package Compare versions

Comparing version 8.0.0-beta-6 to 8.0.0-beta-7

26

build/middleware/messages/index.js

@@ -89,24 +89,12 @@ 'use strict';

// application Id and then fire the registration request for that
return deregister().then(function () {
return deregister().catch(function (error) {
throw new Error('MessagesDeregistrationError');
}).then(function () {
return next(action);
}).then(function (result) {
return register().catch(function (error) {
// TODO fire errors via logs module
if (console) console.error(error);
}).reflect().then(function () {
return register().then(function () {
return _bluebird2.default.resolve(result);
})
// NOTE So things get a little bit weird here, but the concept is fairly
// simple. For the action we're firing (e.g) login, we want to wait for
// the messages registration request to finish before it resolves. But
// we don't want it to error if the registration fails, because that
// shouldn't hold up login or any other action we're watching in this
// middleware. So we use Bluebirds `reflect` to do that and resolve the
// result of original action
// NOTE it's important we resolve the result of the action we're catching
// (basically the result of `next(action)`) and not the registration result
;
}).catch(function (error) {
// TODO fire errors via logs module
if (console) console.error(error);
}).catch(function (error) {
throw new Error('MessagesRegistrationError');
});
});

@@ -113,0 +101,0 @@ };

{
"name": "@lighthouse/sdk",
"version": "8.0.0-beta-6",
"version": "8.0.0-beta-7",
"description": "Lighthouse.io SDK for JavaScript applications",

@@ -5,0 +5,0 @@ "main": "build/index.js",

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