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

qreator

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

qreator - npm Package Compare versions

Comparing version 9.1.0 to 9.1.1

4

lib/browser/svg.umd.js

@@ -1517,5 +1517,3 @@ (function (global, factory) {

function getLogoImage(logo, XY, logoWidth, logoHeight) {
const imageBase64 = `data:image/png;base64,${typeof Buffer !== "undefined" && Buffer.isBuffer(logo)
? logo.toString("base64")
: gBase64.fromUint8Array(new Uint8Array(logo))}`;
const imageBase64 = `data:image/png;base64,${gBase64.fromUint8Array(new Uint8Array(logo))}`;
return (`<image ` +

@@ -1522,0 +1520,0 @@ `width="${(logoWidth / 100) * XY}" ` +

@@ -1,2 +0,1 @@

/// <reference types="node" />
export type Matrix = number[][];

@@ -22,3 +21,3 @@ export interface Data {

parse_url?: boolean;
logo?: ArrayBufferLike | Buffer;
logo?: ArrayBufferLike;
logoWidth?: number;

@@ -25,0 +24,0 @@ logoHeight?: number;

@@ -1,2 +0,1 @@

/// <reference types="node" />
import { ImageOptions, ImageType, Matrix } from "./typing/types";

@@ -9,3 +8,3 @@ export declare function getOptions(inOptions: ImageOptions): {

parse_url?: boolean;
logo?: ArrayBufferLike | Buffer;
logo?: ArrayBufferLike;
logoWidth?: number;

@@ -12,0 +11,0 @@ logoHeight?: number;

@@ -21,3 +21,3 @@ import { QR } from "./qr-base.js";

if (logo) {
const sharpLogo = sharp(logo).resize(imageSize * logoWidth / 100, imageSize * logoHeight / 100, { fit: 'contain' });
const sharpLogo = sharp(logo).resize(Math.round(imageSize * logoWidth / 100), Math.round(imageSize * logoHeight / 100), { fit: 'contain' });
const data = await sharpLogo.toBuffer();

@@ -24,0 +24,0 @@ layers.push({

@@ -38,5 +38,3 @@ import { QR } from "./qr-base.js";

function getLogoImage(logo, XY, logoWidth, logoHeight) {
const imageBase64 = `data:image/png;base64,${typeof Buffer !== "undefined" && Buffer.isBuffer(logo)
? logo.toString("base64")
: Base64.fromUint8Array(new Uint8Array(logo))}`;
const imageBase64 = `data:image/png;base64,${Base64.fromUint8Array(new Uint8Array(logo))}`;
return (`<image ` +

@@ -43,0 +41,0 @@ `width="${(logoWidth / 100) * XY}" ` +

@@ -1,2 +0,1 @@

/// <reference types="node" />
export type Matrix = number[][];

@@ -22,3 +21,3 @@ export interface Data {

parse_url?: boolean;
logo?: ArrayBufferLike | Buffer;
logo?: ArrayBufferLike;
logoWidth?: number;

@@ -25,0 +24,0 @@ logoHeight?: number;

@@ -1,2 +0,1 @@

/// <reference types="node" />
import { ImageOptions, ImageType, Matrix } from "./typing/types";

@@ -9,3 +8,3 @@ export declare function getOptions(inOptions: ImageOptions): {

parse_url?: boolean;
logo?: ArrayBufferLike | Buffer;
logo?: ArrayBufferLike;
logoWidth?: number;

@@ -12,0 +11,0 @@ logoHeight?: number;

{
"name": "qreator",
"version": "9.1.0",
"version": "9.1.1",
"description": "QR Code generator for browser and node.js with tree shaking and logo support",

@@ -58,3 +58,3 @@ "homepage": "https://github.com/Short-io/qreator",

"devDependencies": {
"@ava/typescript": "^4.1.0",
"@ava/typescript": "^5.0.0",
"@rollup/plugin-commonjs": "^25.0.7",

@@ -64,5 +64,5 @@ "@rollup/plugin-json": "^6.1.0",

"@rollup/plugin-typescript": "^11.1.6",
"@size-limit/preset-small-lib": "^11.0.2",
"@size-limit/preset-small-lib": "^11.1.4",
"@types/color-string": "^1.5.5",
"@types/diff": "^5.0.9",
"@types/diff": "^5.2.1",
"@types/jsdom": "^21.1.6",

@@ -72,7 +72,7 @@ "@types/pixelmatch": "^5.2.6",

"@types/svg-path-parser": "^1.1.6",
"ava": "^6.1.1",
"ava": "^6.1.3",
"benchmark": "^2.1.4",
"chalk": "^5.3.0",
"diff": "^5.2.0",
"eslint": "^8.56.0",
"eslint": "^8.57.0",
"eslint-config-airbnb-base": "^15.0.0",

@@ -83,17 +83,17 @@ "eslint-plugin-import": "^2.29.1",

"microtime": "^3.1.1",
"path2d-polyfill": "^2.0.1",
"path2d-polyfill": "^3.1.0",
"pixelmatch": "^5.3.0",
"release-it": "^17.0.3",
"rollup": "^4.10.0",
"size-limit": "^11.0.2",
"release-it": "^17.2.1",
"rollup": "^4.17.2",
"size-limit": "^11.1.4",
"svg-path-parser": "^1.1.0",
"typescript": "^5.3.3",
"typescript": "^5.4.5",
"xml-formatter": "^3.6.2",
"canvas": "npm:@napi-rs/canvas@^0.1.51"
"canvas": "npm:@napi-rs/canvas@^0.1.52"
},
"dependencies": {
"color-string": "^1.9.1",
"js-base64": "^3.7.6",
"js-base64": "^3.7.7",
"pdf-lib": "^1.17.1",
"sharp": "^0.33.2"
"sharp": "^0.33.4"
},

@@ -100,0 +100,0 @@ "overrides": {

@@ -34,3 +34,3 @@ import { ImageOptions, Matrix } from "./typing/types";

if (logo) {
const sharpLogo = sharp(logo).resize(imageSize * logoWidth / 100, imageSize * logoHeight / 100, {fit: 'contain'});
const sharpLogo = sharp(logo).resize(Math.round(imageSize * logoWidth / 100), Math.round(imageSize * logoHeight / 100), {fit: 'contain'});
const data = await sharpLogo.toBuffer()

@@ -37,0 +37,0 @@ layers.push({

@@ -74,7 +74,3 @@ import { QR } from "./qr-base.js";

): string {
const imageBase64 = `data:image/png;base64,${
typeof Buffer !== "undefined" && Buffer.isBuffer(logo)
? logo.toString("base64")
: Base64.fromUint8Array(new Uint8Array(logo))
}`;
const imageBase64 = `data:image/png;base64,${Base64.fromUint8Array(new Uint8Array(logo))}`;

@@ -81,0 +77,0 @@ return (

@@ -69,3 +69,3 @@ export type Matrix = number[][];

*/
logo?: ArrayBufferLike | Buffer;
logo?: ArrayBufferLike;

@@ -72,0 +72,0 @@ /**

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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