Skip to content

Commit 02033ee

Browse files
committed
refactor: remove deprecated transformation effects and update related tests
1 parent 34a2b81 commit 02033ee

File tree

3 files changed

+9
-54
lines changed

3 files changed

+9
-54
lines changed

src/constants/supportedTransforms.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,6 @@ export const supportedTransforms: { [key: string]: string } = {
3232
duration: "du",
3333
streamingResolutions: "sr",
3434

35-
// Old deprecated mappings
36-
effectSharpen: "e-sharpen",
37-
effectUSM: "e-usm",
38-
effectContrast: "e-contrast",
39-
effectGray: "e-grayscale",
40-
effectShadow: "e-shadow",
41-
effectGradient: "e-gradient",
42-
rotate: "rt",
43-
4435
// AI & advanced effects
4536
grayscale: "e-grayscale",
4637
aiUpscale: "e-upscale",

src/interfaces/Transformation.ts

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -386,42 +386,6 @@ export interface Transformation {
386386
*/
387387
raw?: string;
388388

389-
// old as it is but deprecated
390-
391-
/**
392-
* @deprecated Use `rotation` instead.
393-
*/
394-
rotate?: string;
395-
396-
/**
397-
* @deprecated Use `sharpen` instead.
398-
*/
399-
effectSharpen?: string;
400-
401-
/**
402-
* @deprecated Use `unsharpMask` instead.
403-
*/
404-
effectUSM?: string;
405-
406-
/**
407-
* @deprecated Use `contrastStretch` instead.
408-
*/
409-
effectContrast?: string;
410-
411-
/**
412-
* @deprecated Use `grayscale` instead.
413-
*/
414-
effectGray?: string;
415-
416-
/**
417-
* @deprecated Use `shadow` instead.
418-
*/
419-
effectShadow?: string;
420-
421-
/**
422-
* @deprecated Use `gradient` instead.
423-
*/
424-
effectGradient?: string;
425389

426390
/**
427391
* Specifies an overlay to be applied on the parent image or video.

test/url-generation/basic.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ describe("URL generation", function () {
278278
const url = imagekit.url({
279279
path: "/test_path.jpg",
280280
transformation: [{
281-
effectContrast: "-"
281+
contrastStretch: "-"
282282
}]
283283
})
284284

@@ -291,7 +291,7 @@ describe("URL generation", function () {
291291
transformation: [{
292292
defaultImage: "/test_path.jpg",
293293
quality: undefined,
294-
effectContrast: null
294+
contrastStretch: null
295295
}]
296296
})
297297

@@ -303,7 +303,7 @@ describe("URL generation", function () {
303303
path: "/test_path1.jpg",
304304
transformation: [{
305305
defaultImage: "/test_path.jpg",
306-
effectContrast: false
306+
contrastStretch: false
307307
}]
308308
})
309309

@@ -910,12 +910,12 @@ describe("URL generation", function () {
910910
colorProfile: true,
911911
defaultImage: "/folder/file.jpg/", //trailing and leading slash case
912912
dpr: 3,
913-
effectSharpen: 10,
914-
effectUSM: "2-2-0.8-0.024",
915-
effectContrast: true,
916-
effectGray: true,
917-
effectShadow: 'bl-15_st-40_x-10_y-N5',
918-
effectGradient: 'from-red_to-white',
913+
sharpen: 10,
914+
unsharpMask: "2-2-0.8-0.024",
915+
contrastStretch: true,
916+
grayscale: true,
917+
shadow: 'bl-15_st-40_x-10_y-N5',
918+
gradient: 'from-red_to-white',
919919
original: true,
920920
raw: "h-200,w-300,l-image,i-logo.png,l-end"
921921
}]

0 commit comments

Comments
 (0)