diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index ee7bbc7..f6f653e 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -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 diff --git a/package-lock.json b/package-lock.json index 7590557..bfc84fd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "imagekitio-react", - "version": "4.2.0", + "version": "4.3.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -8218,29 +8218,6 @@ "safe-buffer": "^5.1.0" } }, - "react": { - "version": "16.14.0", - "resolved": "https://registry.npmjs.org/react/-/react-16.14.0.tgz", - "integrity": "sha512-0X2CImDkJGApiAlcf0ODKIneSwBPhqJawOa5wCtKbu7ZECrmS26NvtSILynQ66cgkT/RJ4LidJOc3bUESwmU8g==", - "dev": true, - "requires": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1", - "prop-types": "^15.6.2" - } - }, - "react-dom": { - "version": "16.14.0", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.14.0.tgz", - "integrity": "sha512-1gCeQXDLoIqMgqD3IO2Ah9bnf0w9kzhwN5q4FGnHZ67hBm9yePzB5JJAIQCc8x3pFnNlwFq4RidZggNAAkzWWw==", - "dev": true, - "requires": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1", - "prop-types": "^15.6.2", - "scheduler": "^0.19.1" - } - }, "react-is": { "version": "16.13.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", diff --git a/package.json b/package.json index a2acb1e..17c1ddf 100755 --- a/package.json +++ b/package.json @@ -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", @@ -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", @@ -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" } } diff --git a/src/components/IKImage/index.tsx b/src/components/IKImage/index.tsx index 769d2ca..718f582 100755 --- a/src/components/IKImage/index.tsx +++ b/src/components/IKImage/index.tsx @@ -91,7 +91,7 @@ const IKImage = (props: IKImageProps) => { return {props.alt; diff --git a/src/components/IKVideo/index.tsx b/src/components/IKVideo/index.tsx index 5c856ae..44dc2d9 100644 --- a/src/components/IKVideo/index.tsx +++ b/src/components/IKVideo/index.tsx @@ -13,7 +13,7 @@ export type IKVideoState = { const IKVideo = (props: IKVideoProps & IKContextBaseProps) => { const videoRef = useRef(null); const [state, setState] = useState({ - currentUrl: '', + currentUrl: undefined, contextOptions: {} }); diff --git a/tests/cypress/integration/IKImage.cy.js b/tests/cypress/integration/IKImage.cy.js index f0d14df..7b7d175 100644 --- a/tests/cypress/integration/IKImage.cy.js +++ b/tests/cypress/integration/IKImage.cy.js @@ -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', () => { @@ -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', () => {