-
Notifications
You must be signed in to change notification settings - Fork 26
New transformation and upload changes #103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
…L generation tests - Enhanced the `processOverlay` function to include a new `layerMode` property for overlays. - Updated the URL generation tests to include new transformation parameters such as `aiEdit`, `colorReplace`, and `distort`. - Added comprehensive tests for various layer modes (multiply, cutter, cutout, displace) to ensure correct URL generation.
| * See | ||
| * [Overlay using layers](https://imagekit.io/docs/transformations#overlay-using-layers). | ||
| */ | ||
| overlay?: Overlay; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
piyushryn
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One small comment, Otherwise LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR updates the SDK with new transformation parameters and modernizes the TypeScript type definitions by consolidating them into a single shared module.
Changes:
- Adds support for new transformation parameters:
layerMode,aiEdit,colorReplace, anddistort - Consolidates TypeScript interfaces from multiple files into a unified
shared.tsmodule - Updates upload-related type definitions to align with the latest API specifications
- Adds documentation about TypeScript versioning policy
Reviewed changes
Copilot reviewed 15 out of 16 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| test/url-generation/overlay.js | Adds test cases for the new layerMode transformation parameter |
| test/url-generation/basic.js | Updates tests to include new transformation parameters (aiEdit, colorReplace, distort) |
| src/url.ts | Extracts layerMode from overlay configuration and processes it during URL generation |
| src/responsive.ts | Removes interface definitions that were moved to shared module |
| src/interfaces/shared.ts | New consolidated file containing all shared interfaces and type definitions |
| src/interfaces/index.ts | Updated to re-export from the new shared module |
| src/interfaces/UploadResponse.ts | Completely restructured with enhanced type definitions and documentation |
| src/interfaces/UploadOptions.ts | Completely restructured with enhanced type definitions and better documentation |
| src/interfaces/Transformation.ts | Removed - content migrated to shared.ts |
| src/interfaces/SrcOptions.ts | Removed - content migrated to shared.ts |
| src/index.ts | Reorganized imports to use the new shared module structure |
| src/constants/supportedTransforms.ts | Adds mappings for new transformation parameters |
| package.json | Version bumped to 5.2.0 |
| README.md | Adds TypeScript versioning policy documentation |
| CHANGELOG.md | Documents changes for version 5.2.0 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| * is especially useful if you want to add a versioning parameter to your URLs. | ||
| */ | ||
| queryParameters?: { [key: string]: string | number }; | ||
|
|
Copilot
AI
Jan 18, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The type definition on line 1001 is missing a trailing line to maintain consistency with the formatting of other properties in the SrcOptions interface. Additionally, there's inconsistent spacing with the type on line 1002 which has extra blank lines before and after it.
| checks?: string; | ||
| webhookUrl?: string; | ||
|
|
||
| // JS SDK specific options |
Copilot
AI
Jan 18, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment on line 211 should be formatted as a JSDoc comment (/** ... */) to maintain consistency with the documentation style used throughout the file.
| // JS SDK specific options | |
| /** | |
| * JS SDK specific options. | |
| */ |

No description provided.