Skip to content

Commit 1dc4deb

Browse files
ANKUR DWIVEDIANKUR DWIVEDI
authored andcommitted
added breaking change in changelog
1 parent 0302e6b commit 1dc4deb

File tree

3 files changed

+13
-18
lines changed

3 files changed

+13
-18
lines changed

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,14 @@ Javascript SDK for [ImageKit](https://imagekit.io/) provides URL generation for
1414

1515
ImageKit is complete media storage, optimization, and transformation solution that comes with an [image and video CDN](https://imagekit.io/features/imagekit-infrastructure). It can be integrated with your existing infrastructure - storage like AWS S3, web servers, your CDN, and custom domain names, allowing you to deliver optimized images in minutes with minimal code changes.
1616

17-
## Changelog - SDK Version 2.0.0
18-
### Breaking changes
17+
## Changelog
18+
### SDK Version 3.0.0
19+
#### Breaking changes
20+
**1. Overlay Syntax update**
21+
* The old overlay syntax parameters such as `oi`, `ot`, `obg`, and more. 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.
22+
* You can migrate to the new Layers syntax using the `raw` transformation parameter.
23+
### SDK Version 2.0.0
24+
#### Breaking changes
1925
**1. Authentication Process Update:**
2026
* Previously, when using client side file upload, the SDK required the `publicKey` and `authenticationEndpoint` parameters during SDK initialization to fetch security parameters (`signature`, `token`, and `expire`).
2127
* In version 2.0.0, we've updated the authentication process for the SDK. As a user of the SDK, you are now responsible for generating the security parameters (`signature`, `token`, and `expire`) yourself. This means you no longer need to provide the `authenticationEndpoint`. When using the SDK's upload method, make sure to pass these security parameters explicitly along with other [upload options](https://docs.imagekit.io/api-reference/upload-file-api/client-side-file-upload). For guidance on generating these security parameters, please refer to the documentation available [here](https://docs.imagekit.io/api-reference/upload-file-api/client-side-file-upload#signature-generation-for-client-side-file-upload).

test/upload.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1182,7 +1182,7 @@ describe("File upload", function () {
11821182
expect(callback.calledOnce).to.be.true;
11831183
sinon.assert.calledWith(callback, null, uploadSuccessResponseObj);
11841184
});
1185-
it("Should return error for invalid transformation", async function () {
1185+
it("Should return error for an invalid transformation", async function () {
11861186
const fileOptions = {
11871187
...securityParameters,
11881188
fileName: "test_file_name",
@@ -1206,7 +1206,7 @@ describe("File upload", function () {
12061206
expect(callback.calledOnce).to.be.true;
12071207
sinon.assert.calledWith(callback, errRes, null);
12081208
});
1209-
it("Should return error for invalid pre transformation", async function () {
1209+
it("Should return error for an invalid pre transformation", async function () {
12101210
const fileOptions = {
12111211
...securityParameters,
12121212
fileName: "test_file_name",
@@ -1230,7 +1230,7 @@ describe("File upload", function () {
12301230
expect(callback.calledOnce).to.be.true;
12311231
sinon.assert.calledWith(callback, errRes, null);
12321232
});
1233-
it("Should return error for invalid post transformation of type abs", async function () {
1233+
it("Should return error for an invalid post transformation of type abs", async function () {
12341234
const fileOptions = {
12351235
...securityParameters,
12361236
fileName: "test_file_name",
@@ -1254,7 +1254,7 @@ describe("File upload", function () {
12541254
expect(callback.calledOnce).to.be.true;
12551255
sinon.assert.calledWith(callback, errRes, null);
12561256
});
1257-
it("Should return error for invalid post transformation of type transformation", async function () {
1257+
it("Should return error for an invalid post transformation of type transformation", async function () {
12581258
const fileOptions = {
12591259
...securityParameters,
12601260
fileName: "test_file_name",
@@ -1278,7 +1278,7 @@ describe("File upload", function () {
12781278
expect(callback.calledOnce).to.be.true;
12791279
sinon.assert.calledWith(callback, errRes, null);
12801280
});
1281-
it("Should return error for invalid post transformation if not an array", async function () {
1281+
it("Should return error for an invalid post transformation if it's not an array", async function () {
12821282
const fileOptions = {
12831283
...securityParameters,
12841284
fileName: "test_file_name",

test/url-generation.js

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -268,17 +268,6 @@ describe("URL generation", function () {
268268
expect(url).equal(`https://ik.imagekit.io/test_url_endpoint/tr:e-contrast/test_path.jpg`);
269269
});
270270

271-
it('transformation with defaultImage', function () {
272-
const url = imagekit.url({
273-
path: "/test_path1.jpg",
274-
transformation: [{
275-
defaultImage: "/test_path.jpg",
276-
}]
277-
})
278-
279-
expect(url).equal(`https://ik.imagekit.io/test_url_endpoint/tr:di-test_path.jpg/test_path1.jpg`);
280-
});
281-
282271
it('skip transformation if it is undefined or null', function () {
283272
const url = imagekit.url({
284273
path: "/test_path1.jpg",

0 commit comments

Comments
 (0)