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

@kaciras-blog/image

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kaciras-blog/image - npm Package Compare versions

Comparing version 1.2.3 to 1.2.4

24

lib/image-service.js
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __importDefault = (this && this.__importDefault) || function (mod) {

@@ -12,3 +31,3 @@ return (mod && mod.__esModule) ? mod : { "default": mod };

const zlib_1 = require("zlib");
const svgo_1 = __importDefault(require("svgo"));
const svgo = __importStar(require("svgo"));
const log4js_1 = require("log4js");

@@ -20,3 +39,2 @@ const filter_runner_1 = require("./filter-runner");

const brotliCompressAsync = util_1.promisify(zlib_1.brotliCompress);
const svgOptimizer = new svgo_1.default();
const filters = new Map();

@@ -95,3 +113,3 @@ filters.set("type", coding_filter_1.default);

if (type === "svg") {
const { data } = await svgOptimizer.optimize(buffer.toString());
const { data } = svgo.optimize(buffer.toString());
tasks.push(slot.putCache({}, data));

@@ -98,0 +116,0 @@ if (data.length > SVG_COMPRESS_THRESHOLD) {

5

lib/image-service.ts

@@ -6,3 +6,3 @@ import crypto from "crypto";

import { brotliCompress, InputType } from "zlib";
import SVGO from "svgo";
import * as svgo from "svgo";
import { getLogger } from "log4js";

@@ -17,3 +17,2 @@ import { ImageFilter, ImageTags, runFilters } from "./filter-runner";

const brotliCompressAsync = promisify<InputType, Buffer>(brotliCompress);
const svgOptimizer = new SVGO();

@@ -161,3 +160,3 @@ const filters = new Map<string, ImageFilter>();

if (type === "svg") {
const { data } = await svgOptimizer.optimize(buffer.toString());
const { data } = svgo.optimize(buffer.toString());
tasks.push(slot.putCache({}, data));

@@ -164,0 +163,0 @@

{
"name": "@kaciras-blog/image",
"version": "1.2.3",
"version": "1.2.4",
"description": "Image processing library for Kaciras Blog",

@@ -18,8 +18,8 @@ "license": "MIT",

"imagemin-gifsicle": "^7.0.0",
"imagemin-pngquant": "^9.0.1",
"imagemin-pngquant": "^9.0.2",
"is-png": "^2.0.0",
"make-error": "^1.3.6",
"mozjpeg": "^7.0.0",
"sharp": "^0.27.0",
"svgo": "^1.3.2"
"sharp": "^0.27.2",
"svgo": "^2.2.1"
},

@@ -31,4 +31,4 @@ "devDependencies": {

"@types/sharp": "^0.27.1",
"@types/svgo": "^1.3.3",
"file-type": "^16.2.0"
"@types/svgo": "^2.0.0",
"file-type": "^16.3.0"
},

@@ -38,3 +38,3 @@ "resolutions": {

},
"gitHead": "bc3d0b69fb2e2b16be582af2f417d55f4853ddec"
"gitHead": "b3f7e283413bacd00cbfb960484f6c5940e4721f"
}

Sorry, the diff of this file is not supported yet

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