Upgrading ipx 0.4 to 0.5
Breaking0.4.8 → 0.5.8Breaking1New2Fixed9
BreakingUpgrade verdict
1 breaking change.
In plain terms
- rewrite ipx.
Must act 1 item needs code or config changes
Adds destr ^1.1.0, image-meta ^0.0.1, listhen ^0.1.2, ufo ^0.6.1, xss ^1.0.8.
Drops allowlist, connect, cron, recursive-readdir.
Installs 123 packages in all (was 107).
What you must change
Breaking1
rewrite ipx.
API changes
Generated by DepDelta from published .d.ts files. Not mixed with prose notes.
- added:
function createIPX(userOptions: Partial<IPXOptions>): IPX - added:
function createIPXMiddleware(ipx: IPX): (req: IncomingMessage, res: ServerResponse) => void - added:
interface IPXCTX - added:
interface IPXInputOptions - added:
interface IPXOptions - added:
interface ImageMeta - added:
interface SourceData - added:
property IPXCTX.sources: Record<string, Source> - added:
property IPXInputOptions.modifiers?: Record<string, string> - added:
property IPXInputOptions.source?: string - added:
property IPXOptions.dir?: false | string - added:
property IPXOptions.domains?: false | string[] - added:
property IPXOptions.sharp?: { [key: string]: any } - added:
property ImageMeta._mimeType: string - added:
property ImageMeta._type: string - added:
property ImageMeta.height: number - added:
property ImageMeta.mimeType: string - added:
property ImageMeta.type: string - added:
property ImageMeta.width: number - added:
property SourceData.getData: () => Promise<Buffer> - added:
property SourceData.maxAge?: number - added:
property SourceData.mtime?: Date - added:
type IPX = (id: string, opts?: IPXInputOptions) => { src: () => Promise<SourceData>; data: () => Promise<Buffer>; meta: () => Promise<ImageMeta> } - added:
type Source = (src: string) => Promise<SourceData> - added:
type SourceFactory = (options?: any) => Source
- removed:
class IPX - removed:
constructor IPX(options?: Partial<IPXOptions>) - removed:
function IPXMiddleware(ipx: IPX): (req: IncomingMessage, res: ServerResponse) => void - removed:
method IPX.applyOperations(sharp: Sharp.Sharp, { operations, format }: IPXImageInfo): Sharp.Sharp - removed:
method IPX.cleanCache(): Promise<void> - removed:
method IPX.getData(info: IPXImageInfo): Promise<Buffer> - removed:
method IPX.getInfo({ adapter, format, operations, src }: IPXImage): Promise<IPXImageInfo> - removed:
method IPX.init(): void - removed:
method IPX.parseOperations(operations: string): IPXParsedOperation[] - removed:
property IPX.adapter: any - removed:
property IPX.cache: BaseCacheAdapter | undefined - removed:
property IPX.inputs: BaseInputAdapter[] - removed:
property IPX.operations: IPXOperations - removed:
property IPX.options: IPXOptions