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.
Sharp 0.35.0 removed the legacy positional signature for
sharpen(sigma, flat, jagged), keeping onlysharpen(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
SharpOperationMaptype insrc/runtime/providers/directus.tsstill typessharpenwith the old positional form:This should be tightened to only the options form:
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.