Skip to content
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

Run tests using React 19 #2962

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
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
27 changes: 25 additions & 2 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# React 19 (default in Vaadin 25)
com.vaadin.experimental.react19=true
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# React 19 (default in Vaadin 25)
com.vaadin.experimental.react19=true
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# React 19 (default in Vaadin 25)
com.vaadin.experimental.react19=true
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion packages/ts/file-router/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down
4 changes: 2 additions & 2 deletions packages/ts/models/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions packages/ts/react-auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions packages/ts/react-crud/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions packages/ts/react-form/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions packages/ts/react-i18n/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions packages/ts/react-signals/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
<jackson.version>2.18.2</jackson.version>
<junit.version>5.10.1</junit.version>
<mockito.version>4.5.0</mockito.version>
<flow.version>24.7-SNAPSHOT</flow.version>
<flow.version>24.7.react19-SNAPSHOT</flow.version>
<slf4j.version>2.0.9</slf4j.version>
<spring.boot.version>3.4.1</spring.boot.version>
<testbench.version>9.3.7</testbench.version>
Expand Down
Loading