Skip to content

Commit d6b7249

Browse files
committed
chore: update version to 5.2.0 and enhance changelog and README documentation
1 parent a6a9a93 commit d6b7249

File tree

4 files changed

+35
-6
lines changed

4 files changed

+35
-6
lines changed

CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,23 @@
11
# Changelog
22

3+
## Version 5.2.0
4+
5+
1. **New transformation parameters added:**
6+
- `layerMode` (`lm`): Control layer blending modes in overlay transformations
7+
- `aiEdit` (`e-edit`): AI-powered image editing transformation
8+
- `colorReplace` (`cr`): Replace specific colors in images
9+
- `distort` (`e-distort`): Apply distortion effects to images
10+
11+
2. **Type definitions updated:**
12+
- Improved TypeScript types by synchronizing with the official Node.js SDK
13+
- Enhanced type safety for transformation options, upload options, and responses
14+
15+
3. **Documentation improvements:**
16+
- Added TypeScript versioning policy section to README
17+
- Clarified how type definition improvements may be released in minor/patch versions
18+
19+
_No runtime breaking changes from 5.1.x._
20+
321
## Version 5.1.0
422

523
1. **New helper** `getResponsiveImageAttributes()`

README.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,27 @@ You can install the SDK in your project using npm or yarn.
2020
npm install @imagekit/javascript
2121
```
2222

23+
## Documentation
24+
25+
Refer to the ImageKit [official documentation](https://imagekit.io/docs/integration/javascript) for more details on how to use the SDK.
26+
2327
## TypeScript support
2428

2529
The SDK is written in TypeScript, offering first-class TypeScript support. Enjoy excellent type safety and IntelliSense in your IDE. You can use it in your TypeScript projects without any additional configuration.
2630

27-
2831
To enable type checking in JavaScript projects, add `//@ts-check` at the top of your JavaScript files. This will activate type checking in your IDE.
2932

30-
## Documentation
33+
### TypeScript and the SDK versioning policy
3134

32-
Refer to the ImageKit [official documentation](https://imagekit.io/docs/integration/javascript) for more details on how to use the SDK.
35+
The TypeScript types in this SDK always reflect the latest shape of the ImageKit API. When we make improvements to the type definitions to better reflect the actual runtime behavior, we may release these changes in minor or patch versions. While these changes align types more closely with reality and are not breaking changes at runtime, they might cause new type errors when you upgrade.
36+
37+
We judge this approach to be better than the alternatives: outdated, inaccurate types, or vastly more frequent major releases that would distract from any truly breaking runtime changes. If you encounter type errors after upgrading, you can resolve them by:
38+
39+
- Adding appropriate type guards or assertions
40+
- Updating your code to match the corrected types
41+
- Using `// @ts-ignore` temporarily if you need more time to adjust
42+
43+
Please feel welcome to share your thoughts about the versioning policy in a GitHub issue.
3344

3445
## Changelog
3546

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@imagekit/javascript",
3-
"version": "5.1.0",
3+
"version": "5.2.0",
44
"description": "ImageKit Javascript SDK",
55
"main": "dist/imagekit.cjs.js",
66
"module": "dist/imagekit.esm.js",

0 commit comments

Comments
 (0)