diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index 4d7d3d26da..9e88746a37 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -33,7 +33,30 @@ runs: node_modules packages/ts/*/node_modules key: ${{ runner.os }}-node_modules-${{ hashFiles('package-lock.json') }} - - name: Install npm dependencies - if: ${{ steps.cache-node_modules.outputs.cache-hit != 'true' }} + - name: Get all changed package*.json files + id: changed-package-json-files + uses: tj-actions/changed-files@v45 + with: + files: | + package.json + packages/ts/*/package.json + + - name: List all changed json files + if: steps.changed-package-json-files.outputs.any_changed == 'true' + env: + ALL_CHANGED_FILES: ${{ steps.changed-package-json-files.outputs.all_changed_files }} + shell: bash + run: | + for file in ${ALL_CHANGED_FILES}; do + echo "$file was changed" + done + + - name: Install npm dependencies when no changes on package json + if: ${{ steps.cache-node_modules.outputs.cache-hit != 'true' && steps.changed-package-json-files.outputs.any_changed != 'true' }} shell: bash run: npm ci + + - name: Install npm dependencies when there are changes on package json + if: ${{ steps.changed-package-json-files.outputs.any_changed == 'true' }} + shell: bash + run: npm install diff --git a/package.json b/package.json index fd549b92f8..1ee127dc82 100644 --- a/package.json +++ b/package.json @@ -38,6 +38,8 @@ "@remcovaes/web-test-runner-vite-plugin": "^1.2.2", "@types/karma": "^6.3.9", "@types/node": "^22.10.2", + "@types/react": "^19.0.2", + "@types/react-dom": "^19.0.2", "@vaadin/react-components": "24.7.0-alpha4", "@vitejs/plugin-react": "^4.3.4", "@web/test-runner": "^0.19.0", @@ -67,7 +69,7 @@ "nx": "^20.2.2", "postcss": "^8.4.49", "prettier": "^3.4.2", - "react-dom": "^18.3.1", + "react-dom": "^19", "simple-git-hooks": "^2.11.1", "sync-request": "^6.1.0", "tsx": "^4.19.2", diff --git a/packages/java/tests/gradle/single-module-tests/src/main/resources/vaadin-featureflags.properties b/packages/java/tests/gradle/single-module-tests/src/main/resources/vaadin-featureflags.properties new file mode 100644 index 0000000000..80f7397d52 --- /dev/null +++ b/packages/java/tests/gradle/single-module-tests/src/main/resources/vaadin-featureflags.properties @@ -0,0 +1,2 @@ +# React 19 (default in Vaadin 25) +com.vaadin.experimental.react19=true diff --git a/packages/java/tests/gradle/single-module/src/main/resources/vaadin-featureflags.properties b/packages/java/tests/gradle/single-module/src/main/resources/vaadin-featureflags.properties new file mode 100644 index 0000000000..80f7397d52 --- /dev/null +++ b/packages/java/tests/gradle/single-module/src/main/resources/vaadin-featureflags.properties @@ -0,0 +1,2 @@ +# React 19 (default in Vaadin 25) +com.vaadin.experimental.react19=true diff --git a/packages/java/tests/spring/react-grid-test/src/main/resources/vaadin-featureflags.properties b/packages/java/tests/spring/react-grid-test/src/main/resources/vaadin-featureflags.properties new file mode 100644 index 0000000000..80f7397d52 --- /dev/null +++ b/packages/java/tests/spring/react-grid-test/src/main/resources/vaadin-featureflags.properties @@ -0,0 +1,2 @@ +# React 19 (default in Vaadin 25) +com.vaadin.experimental.react19=true diff --git a/packages/java/tests/spring/react-i18n/src/main/resources/vaadin-featureflags.properties b/packages/java/tests/spring/react-i18n/src/main/resources/vaadin-featureflags.properties index d26e4c1cd8..1cdc976662 100644 --- a/packages/java/tests/spring/react-i18n/src/main/resources/vaadin-featureflags.properties +++ b/packages/java/tests/spring/react-i18n/src/main/resources/vaadin-featureflags.properties @@ -1,2 +1,4 @@ # Enable Hilla I18n feature flag so that we can test it com.vaadin.experimental.hillaI18n=true +# React 19 (default in Vaadin 25) +com.vaadin.experimental.react19=true diff --git a/packages/java/tests/spring/react-signals/src/main/resources/vaadin-featureflags.properties b/packages/java/tests/spring/react-signals/src/main/resources/vaadin-featureflags.properties index 64ea97e958..730ab22978 100644 --- a/packages/java/tests/spring/react-signals/src/main/resources/vaadin-featureflags.properties +++ b/packages/java/tests/spring/react-signals/src/main/resources/vaadin-featureflags.properties @@ -1,2 +1,4 @@ # Experimental feature flags for Vaadin com.vaadin.experimental.fullstackSignals=true +# React 19 (default in Vaadin 25) +com.vaadin.experimental.react19=true diff --git a/packages/ts/file-router/package.json b/packages/ts/file-router/package.json index 0beaa39b6d..a1ba2545ce 100644 --- a/packages/ts/file-router/package.json +++ b/packages/ts/file-router/package.json @@ -86,7 +86,7 @@ "@vaadin/hilla-react-auth": "24.7.0-alpha5", "@vaadin/hilla-react-signals": "24.7.0-alpha5", "c8": "^10.1.3", - "react": "^18.2.0", + "react": "^19", "rollup": "^4.21.0", "typescript": "5.7.2" } diff --git a/packages/ts/models/package.json b/packages/ts/models/package.json index f10234b287..1549f1e600 100644 --- a/packages/ts/models/package.json +++ b/packages/ts/models/package.json @@ -61,8 +61,8 @@ "@types/chai-like": "^1.1.3", "@types/mocha": "^10.0.10", "@types/node": "^20.17.10", - "@types/react": "^18.3.18", - "@types/react-dom": "^18", + "@types/react": "^19", + "@types/react-dom": "^19", "@types/sinon": "^10.0.20", "@types/sinon-chai": "^3.2.12", "@types/validator": "^13.12.2", diff --git a/packages/ts/react-auth/package.json b/packages/ts/react-auth/package.json index 0f10b60753..41041531d5 100644 --- a/packages/ts/react-auth/package.json +++ b/packages/ts/react-auth/package.json @@ -60,8 +60,8 @@ "@types/chai": "^4.3.20", "@types/chai-dom": "^1.11.3", "@types/mocha": "^10.0.10", - "@types/react": "^18.3.18", - "@types/react-dom": "^18", + "@types/react": "^19", + "@types/react-dom": "^19", "@types/sinon": "^10.0.20", "@types/sinon-chai": "^3.2.12", "@types/validator": "^13.12.2", diff --git a/packages/ts/react-crud/package.json b/packages/ts/react-crud/package.json index 354a573b35..c5bfab7732 100644 --- a/packages/ts/react-crud/package.json +++ b/packages/ts/react-crud/package.json @@ -73,8 +73,8 @@ "@types/chai-as-promised": "^7.1.8", "@types/chai-dom": "^1.11.3", "@types/mocha": "^10.0.10", - "@types/react": "^18.3.18", - "@types/react-dom": "^18", + "@types/react": "^19", + "@types/react-dom": "^19", "@types/sinon": "^10.0.20", "@types/sinon-chai": "^3.2.12", "@types/validator": "^13.12.2", diff --git a/packages/ts/react-form/package.json b/packages/ts/react-form/package.json index 06fa83555a..4157c35028 100644 --- a/packages/ts/react-form/package.json +++ b/packages/ts/react-form/package.json @@ -60,8 +60,8 @@ "@types/chai-as-promised": "^7.1.8", "@types/chai-dom": "^1.11.3", "@types/mocha": "^10.0.10", - "@types/react": "^18.3.18", - "@types/react-dom": "^18", + "@types/react": "^19", + "@types/react-dom": "^19", "@types/sinon": "^10.0.20", "@types/sinon-chai": "^3.2.12", "@types/validator": "^13.12.2", diff --git a/packages/ts/react-i18n/package.json b/packages/ts/react-i18n/package.json index a65a835905..7e3008067c 100644 --- a/packages/ts/react-i18n/package.json +++ b/packages/ts/react-i18n/package.json @@ -62,8 +62,8 @@ "@types/chai-as-promised": "^7.1.8", "@types/chai-dom": "^1.11.3", "@types/mocha": "^10.0.10", - "@types/react": "^18.3.18", - "@types/react-dom": "^18", + "@types/react": "^19", + "@types/react-dom": "^19", "@types/sinon": "^10.0.20", "@types/sinon-chai": "^3.2.12", "@types/validator": "^13.12.2", diff --git a/packages/ts/react-signals/package.json b/packages/ts/react-signals/package.json index 12950b0f78..f6d6fb6bb0 100644 --- a/packages/ts/react-signals/package.json +++ b/packages/ts/react-signals/package.json @@ -62,8 +62,8 @@ "@types/chai-as-promised": "^7.1.8", "@types/chai-dom": "^1.11.3", "@types/mocha": "^10.0.10", - "@types/react": "^18.3.18", - "@types/react-dom": "^18", + "@types/react": "^19", + "@types/react-dom": "^19", "@types/sinon": "^10.0.20", "@types/sinon-chai": "^3.2.12", "@types/validator": "^13.12.2", diff --git a/pom.xml b/pom.xml index b7fd888ef4..99e42d01ea 100644 --- a/pom.xml +++ b/pom.xml @@ -75,7 +75,7 @@ 2.18.2 5.10.1 4.5.0 - 24.7-SNAPSHOT + 24.7.react19-SNAPSHOT 2.0.9 3.4.1 9.3.7