Skip to content

Commit

Permalink
feat: Upgrade to React 19
Browse files Browse the repository at this point in the history
  • Loading branch information
Artur- committed Jun 27, 2024
1 parent 9669549 commit 9c187c8
Show file tree
Hide file tree
Showing 12 changed files with 43 additions and 82 deletions.
2 changes: 1 addition & 1 deletion .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ runs:
- name: Install npm dependencies
if: ${{ steps.cache-node_modules.outputs.cache-hit != 'true' }}
shell: bash
run: npm ci
run: npm ci --legacy-peer-deps
94 changes: 27 additions & 67 deletions package-lock.json

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

Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ public void setUpTaskApplication() throws IOException, URISyntaxException,
: Stream.<String> empty();

var npmCmd = Stream.of("npm", "--no-update-notifier", "--no-audit",
"install", "--no-save", "--install-links");
"install", "--no-save", "--install-links",
"--legacy-peer-deps");

var generatorFiles = Files.list(packagesDirectory).map(Path::toString);

Expand Down
4 changes: 2 additions & 2 deletions packages/ts/file-router/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"access": "public"
},
"peerDependencies": {
"react": "^18.2.0",
"react": "19.0.0-rc-3563387fe3-20240621",
"react-router-dom": "^6.21.1"
},
"devDependencies": {
Expand All @@ -81,7 +81,7 @@
"dependencies": {
"@vaadin/hilla-generator-utils": "24.5.0-alpha3",
"@vaadin/hilla-react-auth": "24.5.0-alpha3",
"react": "^18.2.0",
"react": "19.0.0-rc-3563387fe3-20240621",
"rollup": "^4.12.0",
"typescript": "5.5.2"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/ts/react-auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"@vaadin/hilla-frontend": "24.5.0-alpha3"
},
"peerDependencies": {
"react": "^18",
"react": "19.0.0-rc-3563387fe3-20240621",
"react-router-dom": "^6"
},
"devDependencies": {
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 @@ -62,8 +62,8 @@
"@vaadin/react-components": "24.5.0-alpha3"
},
"peerDependencies": {
"react": "^18",
"react-dom": "^18"
"react": "19.0.0-rc-3563387fe3-20240621",
"react-dom": "19.0.0-rc-3563387fe3-20240621"
},
"devDependencies": {
"@esm-bundle/chai": "^4.3.4-fix.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/ts/react-form/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"@vaadin/hilla-lit-form": "24.5.0-alpha3"
},
"peerDependencies": {
"react": "^18"
"react": "19.0.0-rc-3563387fe3-20240621"
},
"devDependencies": {
"@esm-bundle/chai": "^4.3.4-fix.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/ts/react-i18n/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"intl-messageformat": "^10.5.11"
},
"peerDependencies": {
"react": "^18"
"react": "19.0.0-rc-3563387fe3-20240621"
},
"devDependencies": {
"@esm-bundle/chai": "^4.3.4-fix.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/ts/react-signals/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"@preact/signals-react": "^2.0.0"
},
"peerDependencies": {
"react": "^18",
"react": "19.0.0-rc-3563387fe3-20240621",
"react-router-dom": "^6"
},
"devDependencies": {
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.17.1</jackson.version>
<junit.version>5.10.1</junit.version>
<mockito.version>4.5.0</mockito.version>
<flow.version>24.5-SNAPSHOT</flow.version>
<flow.version>24.5.react19-SNAPSHOT</flow.version>
<slf4j.version>2.0.9</slf4j.version>
<spring.boot.version>3.2.7</spring.boot.version>
<testbench.version>9.3.1</testbench.version>
Expand Down
2 changes: 1 addition & 1 deletion scripts/link-npm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ do
pkgs+=" "@vaadin/hilla-`basename $tsPkg`@$tsPkg
done

npm i $pkgs --offline
npm i $pkgs --offline --legacy-peer-deps
6 changes: 3 additions & 3 deletions scripts/prepare/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ const reactComponentsVersion = versions.react['react-components'].jsVersion ?? '
const reactComponentsSpec = `${reactComponentsPackageName}@${reactComponentsVersion}`;
console.log(`Installing "${reactComponentsSpec}".`);
// The root hoisted version should be updated first, before the workspaces
await run('npm', ['install', reactComponentsSpec, '--save-dev', '--save-exact']);
await run('npm', ['install', reactComponentsSpec, '--save-dev', '--save-exact', '--legacy-peer-deps']);
const workspaceArg = `--workspace=@vaadin/hilla-react-crud`;
// Workaround: doing "npm uninstall" first, the package.json in the workspace is not updated otherwise
await run('npm', ['uninstall', reactComponentsPackageName, workspaceArg, '--save']);
await run('npm', ['install', reactComponentsSpec, workspaceArg, '--save', '--save-exact']);
await run('npm', ['uninstall', reactComponentsPackageName, workspaceArg, '--save', '--legacy-peer-deps']);
await run('npm', ['install', reactComponentsSpec, workspaceArg, '--save', '--save-exact', '--legacy-peer-deps']);

0 comments on commit 9c187c8

Please sign in to comment.