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

@ioffice/svg2png

Package Overview
Dependencies
Maintainers
2
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ioffice/svg2png - npm Package Compare versions

Comparing version 0.0.1-beta.1808291627 to 0.0.1-beta.1808291635

2

package.json
{
"name": "@ioffice/svg2png",
"description": "Converts SVGs to PNGs, using Chromium",
"version": "0.0.1-beta.1808291627",
"version": "0.0.1-beta.1808291635",
"author": "Orignal Author: Domenic Denicola (https://domenic.me)",

@@ -6,0 +6,0 @@ "contributors": [

@@ -58,3 +58,3 @@ "use strict";

return new Promise(function (resolve, reject) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
var timeoutHandle, buffer, err_2, e_1;
var timeoutHandle, buffer, err_2, e_1, e_2;
var _this = this;

@@ -74,3 +74,3 @@ return tslib_1.__generator(this, function (_a) {

case 1:
_a.trys.push([1, 4, , 9]);
_a.trys.push([1, 3, , 8]);
this.log('calling "pool.use"');

@@ -81,26 +81,37 @@ return [4 /*yield*/, Svg2png.pool.use(function (browser) { return fn(browser); })];

clearTimeout(timeoutHandle);
this.log('closing page');
return [4 /*yield*/, this.closePage()];
return [3 /*break*/, 8];
case 3:
_a.sent();
resolve(buffer);
return [3 /*break*/, 9];
case 4:
err_2 = _a.sent();
_a.label = 5;
case 5:
_a.trys.push([5, 7, , 8]);
this.log('ERROR: clearing timeout and closing page:', { error: err_2 });
this.log('ERROR', { error: err_2 });
this.log('clearing timeout');
clearTimeout(timeoutHandle);
_a.label = 4;
case 4:
_a.trys.push([4, 6, , 7]);
this.log('closing page');
return [4 /*yield*/, this.closePage()];
case 5:
_a.sent();
return [3 /*break*/, 7];
case 6:
_a.sent();
return [3 /*break*/, 8];
e_1 = _a.sent();
this.log('failed to close page:', { error: e_1 });
return [3 /*break*/, 7];
case 7:
e_1 = _a.sent();
return [3 /*break*/, 8];
this.log('conversion failed');
return [2 /*return*/, reject(err_2)];
case 8:
reject(err_2);
return [3 /*break*/, 9];
case 9: return [2 /*return*/];
_a.trys.push([8, 10, , 11]);
this.log('closing page');
return [4 /*yield*/, this.closePage()];
case 9:
_a.sent();
return [3 /*break*/, 11];
case 10:
e_2 = _a.sent();
this.log('failed to close page:', { error: e_2 });
return [3 /*break*/, 11];
case 11:
resolve(buffer);
return [2 /*return*/];
}

@@ -107,0 +118,0 @@ });

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