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

imagetools-core

Package Overview
Dependencies
Maintainers
1
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

imagetools-core - npm Package Compare versions

Comparing version 3.3.1 to 4.0.0

dist/index.js

2

dist/output-formats.d.ts

@@ -6,2 +6,3 @@ import type { OutputFormat } from './types';

export declare const sourceFormat: OutputFormat;
export declare const imgFormat: OutputFormat;
/** fallback format should be specified last */

@@ -13,2 +14,3 @@ export declare const pictureFormat: OutputFormat;

srcset: OutputFormat;
img: OutputFormat;
picture: OutputFormat;

@@ -15,0 +17,0 @@ metadata: OutputFormat;

6

dist/transforms/resize.d.ts
import { TransformFactory } from '../types';
export interface ResizeOptions {
width: string;
w: string;
height: string;
h: string;
aspect: string;
ar: string;
withoutEnlargement: '' | 'true';
withoutReduction: '' | 'true';
allowUpscale: '' | 'true';
}
export declare const resize: TransformFactory<ResizeOptions>;

@@ -33,2 +33,18 @@ import { Sharp } from 'sharp';

/**
* The img output format.
*/
export interface Img {
src: string;
/**
* The intrinsic width
*/
w: number;
/**
* The intrinsic height. May not be the rendered height.
* Helps prevent reflow. See https://html.com/attributes/img-height/
*/
h: number;
srcset?: Source[];
}
/**
* The picture output format.

@@ -38,3 +54,3 @@ */

sources: Record<string, Source[]>;
fallback: {
img: {
src: string;

@@ -41,0 +57,0 @@ w: number;

{
"name": "imagetools-core",
"version": "3.3.1",
"version": "4.0.0",
"type": "module",
"types": "dist/index.d.ts",
"exports": {
"./package.json": "./package.json",
".": {
"import": "./dist/index.mjs",
"require": "./dist/index.cjs",
"types": "./dist/index.d.ts"
}
"import": "./dist/index.js",
"types": "./dist/index.d.ts"
},

@@ -38,3 +35,3 @@ "files": [

"@types/sharp": "^0.31.0",
"@vitest/coverage-c8": "^0.28.0",
"@vitest/coverage-c8": "^0.30.0",
"jest-file-snapshot": "^0.5.0",

@@ -44,7 +41,7 @@ "jest-image-snapshot": "^6.0.0",

"tslib": "^2.4.0",
"typescript": "^4.9.4",
"vitest": "^0.28.0"
"typescript": "^5.0.0",
"vitest": "^0.30.1"
},
"dependencies": {
"sharp": "^0.31.3"
"sharp": "^0.32.0"
},

@@ -51,0 +48,0 @@ "scripts": {

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