imagetools-core
Advanced tools
Comparing version 3.3.1 to 4.0.0
@@ -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; |
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": { |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Yes
73260
36
766
1
+ Addedb4a@1.6.7(transitive)
+ Addedbare-events@2.5.4(transitive)
+ Addedbare-fs@4.0.1(transitive)
+ Addedbare-os@3.4.0(transitive)
+ Addedbare-path@3.0.0(transitive)
+ Addedbare-stream@2.6.5(transitive)
+ Addedfast-fifo@1.3.2(transitive)
+ Addednode-addon-api@6.1.0(transitive)
+ Addedsharp@0.32.6(transitive)
+ Addedstreamx@2.22.0(transitive)
+ Addedtar-fs@3.0.8(transitive)
+ Addedtar-stream@3.1.7(transitive)
+ Addedtext-decoder@1.2.3(transitive)
- Removednode-addon-api@5.1.0(transitive)
- Removedsharp@0.31.3(transitive)
Updatedsharp@^0.32.0