Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ jobs:
tar -cf build.tar --exclude=./build.tar .
- name: Archive build details
if: always()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: e2e-archive
path: build.tar
Expand Down
25 changes: 1 addition & 24 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 3 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "imagekitio-react",
"version": "4.2.0",
"version": "4.3.0",
"description": "React SDK for ImageKit.io which implements client-side upload and URL generation for use inside a react application.",
"scripts": {
"build:js": "rollup -c",
Expand Down Expand Up @@ -67,8 +67,6 @@
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.5",
"jest": "^26.5.2",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-test-renderer": "^16.13.1",
"require-context.macro": "^1.2.2",
"rollup": "^2.28.2",
Expand All @@ -84,7 +82,7 @@
"prop-types": "^15.7.2"
},
"peerDependencies": {
"react": "^16.13.1 || ^17.0.0 || ^18.0.0",
"react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0"
"react": "^16.13.1 || ^17.0.0 || ^18.0.0 || ^19.0.0",
"react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0 || ^19.0.0"
}
}
2 changes: 1 addition & 1 deletion src/components/IKImage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ const IKImage = (props: IKImageProps) => {

return <img
alt={props.alt || ""}
src={currentUrl ? currentUrl : ''}
src={currentUrl ? currentUrl : undefined}
ref={imageRef}
{...restProps}
/>;
Expand Down
2 changes: 1 addition & 1 deletion src/components/IKVideo/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export type IKVideoState = {
const IKVideo = (props: IKVideoProps & IKContextBaseProps) => {
const videoRef = useRef<HTMLVideoElement>(null);
const [state, setState] = useState<IKVideoState>({
currentUrl: '',
currentUrl: undefined,
contextOptions: {}
});

Expand Down
10 changes: 4 additions & 6 deletions tests/cypress/integration/IKImage.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ describe('ImageKit React SDK', () => {
const APP_HOST = Cypress.env().APP_HOST;

describe('Lazyload', () => {
it('should have empty src before reaching lazyload threshold', () => {
it('should not have src before reaching lazyload threshold', () => {
cy.visit(APP_HOST);

cy.get('.lazyload').should('have.attr', 'src').and('equal', '');
cy.get(".lazyload").should("not.have.attr", "src");
});

it('should have actual src after reaching lazyload threshold', () => {
Expand All @@ -22,12 +22,10 @@ describe('ImageKit React SDK', () => {
});

describe('Lazyload with LQIP', () => {
it('should have lqip src before reaching threshold', () => {
it('should not have lqip src before reaching threshold', () => {
cy.visit(APP_HOST);

cy.get('.lazyload-lqip')
.should('have.attr', 'src')
.and('include', '');
cy.get(".lazyload-lqip").should("not.have.attr", "src");
});

it('should have actual src after reaching element', () => {
Expand Down