Skip to content

Directus is bumping its sharp dependency from 0.34.5 to 0.35.3 #2293

Description

@kheiner

Sharp 0.35.0 removed the legacy positional signature for sharpen(sigma, flat, jagged), keeping only sharpen(options). Once Directus is on sharp >=0.35, a Directus transform like ['sharpen', 5] no longer throws, it silently falls back to sharp's default mild sharpen instead of applying the requested sigma.

The SharpOperationMap type in src/runtime/providers/directus.ts still types sharpen with the old positional form:

sharpen: [sigma?: number] | [options?: { sigma?: number, m1?: number, m2?: number, x1?: number, y2?: number, y3?: number }]

This should be tightened to only the options form:

sharpen: [options?: { sigma?: number, m1?: number, m2?: number, x1?: number, y2?: number, y3?: number }]

The rest of the whitelisted sharp operations (resize, extract, trim, modulate, recomb, convolve, threshold, linear, clahe, toColorspace/toColourspace, grayscale/greyscale, channel ops, etc.) are unaffected by the 0.35 bump, verified against sharp's source directly rather than just the changelog.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions