You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* The `listFiles` method now returns a unified response type, ListFileResponse, which is an array of both `FileObject` and `FolderObject`. Previously, the response contained only `FileObject`. The `type` property in the response object indicates whether the object is a file or a folder. Even though this change has been made to just the type of the return object, it can be considered a breaking change so it may require require any code relying on the `listFiles` response to be updated.
9
+
10
+
```
11
+
const result = await imagekit.listFiles({ skip: 0, limit: 10 });
12
+
13
+
# Before (Pre-version 5.3.0)
14
+
result.forEach((item) => {
15
+
console.log(item);
16
+
});
17
+
18
+
# After (Version 5.3.0 and above)
19
+
result.forEach((item) => {
20
+
if (item.type === "folder") {
21
+
console.log(item) // item is of type FolderObject
22
+
} else {
23
+
console.log(item) // item is of type FileObject
24
+
}
25
+
});
26
+
```
27
+
28
+
29
+
### SDK Version 5.0.0
30
+
31
+
#### Breaking changes
32
+
33
+
**1. Overlay syntax update**
34
+
* In version 5.0.0, we've removed the old overlay syntax parameters for transformations, such as `oi`, `ot`, `obg`, and [more](https://docs.imagekit.io/features/image-transformations/overlay). These parameters are deprecated and will start returning errors when used in URLs. Please migrate to the new layers syntax that supports overlay nesting, provides better positional control, and allows more transformations at the layer level. You can start with [examples](https://docs.imagekit.io/features/image-transformations/overlay-using-layers#examples) to learn quickly.
35
+
* You can migrate to the new layers syntax using the `raw` transformation parameter.
36
+
37
+
**2. Remove Node.js 10.x support**
38
+
* In version 5.0.0, we've removed support for Node.js version 10.x.
Copy file name to clipboardExpand all lines: README.md
-13Lines changed: 0 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,19 +25,6 @@ ImageKit is complete media storage, optimization, and transformation solution th
25
25
*[Support](#support)
26
26
*[Links](#links)
27
27
28
-
## Changelog
29
-
30
-
### SDK Version 5.0.0
31
-
32
-
#### Breaking changes
33
-
34
-
**1. Overlay syntax update**
35
-
* In version 5.0.0, we've removed the old overlay syntax parameters for transformations, such as `oi`, `ot`, `obg`, and [more](https://docs.imagekit.io/features/image-transformations/overlay). These parameters are deprecated and will start returning errors when used in URLs. Please migrate to the new layers syntax that supports overlay nesting, provides better positional control, and allows more transformations at the layer level. You can start with [examples](https://docs.imagekit.io/features/image-transformations/overlay-using-layers#examples) to learn quickly.
36
-
* You can migrate to the new layers syntax using the `raw` transformation parameter.
37
-
38
-
**2. Remove Node.js 10.x support**
39
-
* In version 5.0.0, we've removed support for Node.js version 10.x.
40
-
41
28
## Installation
42
29
43
30
Use the following command to download this module. Use the optional `--save` parameter if you wish to save the dependency in your `package.json` file.
0 commit comments