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

refactor!: upgrade to Vaadin 24 #100

Merged
merged 11 commits into from
Feb 3, 2024
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
11 changes: 6 additions & 5 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
default: 'development'
options:
- "development"
- "vaadin-23"
version:
description: "Version to release (e.g. 1.1.0 or 1.2.0-alpha1)"
required: true
Expand Down Expand Up @@ -65,11 +66,11 @@ jobs:
| tee -a $GITHUB_STEP_SUMMARY
exit 1
fi
#if [[ "${{ inputs.target-branch }}" != "development" && ! "${{ inputs.version }}" = "${{ inputs.target-branch }}."* ]]; then
# echo "🚫 Invalid version specified: '${{ inputs.version }}' does not match the release branch '${{ inputs.target-branch }}'." \
# | tee -a $GITHUB_STEP_SUMMARY
# exit 1
#fi
if [[ "${{ inputs.target-branch }}" != "development" && ! "vaadin-${{ inputs.version }}" = "${{ inputs.target-branch }}."* ]]; then
echo "🚫 Invalid version specified: '${{ inputs.version }}' does not match the release branch '${{ inputs.target-branch }}'." \
| tee -a $GITHUB_STEP_SUMMARY
exit 1
fi
if git rev-parse -q --verify "refs/tags/flow-${{ inputs.version }}" > /dev/null; then
echo "🚫 Version '${{ inputs.version }}' already exists. Please choose a different version." \
| tee -a $GITHUB_STEP_SUMMARY
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/validation-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ on:
schedule:
- cron: '0 4 * * *'
env:
JAVA_VERSION: 11
JAVA_VERSION: 17
jobs:
build:
name: Build and test
strategy:
fail-fast: false
matrix:
java: [21, 17]
branch: [ development ]
branch: [ development, 23 ]
include:
- branch: development
- branch: 23
java: 11
timeout-minutes: 30
runs-on: ubuntu-latest
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ concurrency:
group: ${{ github.head_ref || github.ref_name }}
cancel-in-progress: true
env:
JAVA_VERSION: 11
JAVA_VERSION: 17
jobs:
check-permissions:
name: Check User Permissions
Expand Down Expand Up @@ -81,6 +81,8 @@ jobs:
with:
chrome-version: stable
- name: Build
env:
VAADIN_OFFLINE_KEY: ${{ secrets.VAADIN_OFFLINE_KEY }}
run: |
set -x -e -o pipefail
VERTX_VAADIN_VERSION=$(mvn -N -ntp -q help:evaluate -Dexpression=project.version -DforceStdout)
Expand Down Expand Up @@ -128,6 +130,8 @@ jobs:
tar cf - .m2 | (cd ~ && tar xf -)
- name: Build
if: ${{ github.run_attempt > 1 }}
env:
VAADIN_OFFLINE_KEY: ${{ secrets.VAADIN_OFFLINE_KEY }}
run: |
set -x -e -o pipefail
mvn -V -e -B -ntp -DskipTests -DskipVertxRun=true -Dmaven.javadoc.skip=false install -Pflow-ui-tests
Expand Down Expand Up @@ -183,6 +187,8 @@ jobs:
tar cf - .m2 | (cd ~ && tar xf -)
- name: Build
if: ${{ github.run_attempt > 1 }}
env:
VAADIN_OFFLINE_KEY: ${{ secrets.VAADIN_OFFLINE_KEY }}
run: |
set -x -e -o pipefail
mvn -V -e -B -ntp -DskipTests -DskipVertxRun=true -Dmaven.javadoc.skip=false install -Pflow-ui-tests
Expand All @@ -198,7 +204,7 @@ jobs:
-Duitest.chrome-version=$CHROME_VERSION
- name: Package test output files
if: ${{ failure() || success() }}
run: find . -name surefire-reports -o -name failsafe-reports -o -name verticle.log | tar -czf tests-report-it-1.tgz -T -
run: find . -name surefire-reports -o -name failsafe-reports -o -name error-screenshots -o -name verticle.log | tar -czf tests-report-it-1.tgz -T -
- uses: actions/upload-artifact@v3
if: ${{ failure() || success() }}
with:
Expand Down Expand Up @@ -250,7 +256,7 @@ jobs:
mvn -V -e -B -ntp verify -DtrimStackTrace=false -pl=-:vertx-vaadin-test-root-context -Dwebdriver.chrome.driver=$(which chromedriver)
- name: Package test output files
if: ${{ failure() || success() }}
run: find . -name surefire-reports -o -name failsafe-reports -o -name verticle.log | tar -czf tests-report-it-2.tgz -T -
run: find . -name surefire-reports -o -name failsafe-reports -o -name error-screenshots -o -name verticle.log | tar -czf tests-report-it-2.tgz -T -
- uses: actions/upload-artifact@v3
if: ${{ failure() || success() }}
with:
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ pnpm-lock.yaml
tsconfig.json
types.d.ts
**/error-screenshots/
**/frontend/generated/
.flow-node-tasks.lock
**/src/main/bundles/

vertx-vaadin-flow-parent/vertx-vaadin-flow/frontend/
vertx-vaadin-flow-parent/vertx-vaadin-quarkus-extension/integration-tests/development/frontend/
Expand Down
20 changes: 10 additions & 10 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>com.github.mcollovati.vertx</groupId>
<artifactId>vertx-vaadin-root</artifactId>
<version>23.4.0-SNAPSHOT</version>
<version>24.3-SNAPSHOT</version>
<packaging>pom</packaging>

<description>Vertx Vaadin root Pom</description>
Expand Down Expand Up @@ -79,8 +79,8 @@
</pluginRepositories>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>

<license.directory>${maven.multiModuleProjectDirectory}/license</license.directory>
<checkstyle.directory>${maven.multiModuleProjectDirectory}/checkstyle</checkstyle.directory>
Expand Down Expand Up @@ -109,11 +109,11 @@
<spotless-maven-plugin.version>2.41.1</spotless-maven-plugin.version>

<vertx.version>4.3.8</vertx.version>
<vaadin.platform.version>23.3.30</vaadin.platform.version>
<vaadin.flow.version>23.3.24</vaadin.flow.version>
<hilla.version>1.3.30</hilla.version>
<vaadin.platform.version>24.3.2</vaadin.platform.version>
<vaadin.flow.version>24.3.2</vaadin.flow.version>
<hilla.version>2.5.5</hilla.version>

<javax.servlet.version>3.1.0</javax.servlet.version>
<jakarta.servlet.version>6.0.0</jakarta.servlet.version>
<byte-buddy.version>1.14.11</byte-buddy.version>
<junit-quickcheck.version>1.0</junit-quickcheck.version>
<lombok.version>1.18.30</lombok.version>
Expand Down Expand Up @@ -166,9 +166,9 @@
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>${javax.servlet.version}</version>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<version>${jakarta.servlet.version}</version>
</dependency>
<dependency>
<groupId>net.bytebuddy</groupId>
Expand Down
45 changes: 40 additions & 5 deletions vaadin-flow-sockjs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.github.mcollovati.vertx</groupId>
<artifactId>vertx-vaadin-root</artifactId>
<version>23.4.0-SNAPSHOT</version>
<version>24.3-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand All @@ -25,7 +25,7 @@
<sockjs-client.version>1.5.0</sockjs-client.version>
<checkstyle.skip>false</checkstyle.skip>

<gwt.version>2.8.2</gwt.version>
<gwt.version>2.9.0</gwt.version>
<gwt.module>com.github.mcollovati.vertx.vaadin.sockjs.SockjsClientEngine</gwt.module>
<gwt.module.output>${project.build.outputDirectory}/META-INF/resources/VAADIN/static/</gwt.module.output>
<gwt.module.style>OBF</gwt.module.style>
Expand All @@ -39,12 +39,49 @@
<minify-maven-plugin.version>1.7.6</minify-maven-plugin.version>
</properties>


<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt</artifactId>
<version>${gwt.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>

<dependency>
<groupId>com.vaadin</groupId>
<artifactId>flow-server</artifactId>
<version>${vaadin.flow.version}</version>
<classifier>sources</classifier>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>com.vaadin.servletdetector</groupId>
<artifactId>throw-if-servlet3</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>flow-server</artifactId>
<version>${vaadin.flow.version}</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>com.vaadin.servletdetector</groupId>
<artifactId>throw-if-servlet3</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<version>${jakarta.servlet.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand All @@ -60,19 +97,16 @@
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-user</artifactId>
<version>${gwt.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-dev</artifactId>
<version>${gwt.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-elemental</artifactId>
<version>${gwt.version}</version>
<scope>provided</scope>
</dependency>

Expand Down Expand Up @@ -167,6 +201,7 @@
<style>${gwt.module.style}</style>
<htmlunit>FF38</htmlunit>
<testTimeOut>300</testTimeOut>
<extraJvmArgs>-Xmx512m -Dvaadin.frontend.hotdeploy=false</extraJvmArgs>
</configuration>
</plugin>
<plugin>
Expand Down
2 changes: 1 addition & 1 deletion vertx-vaadin-flow-jandex/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.github.mcollovati.vertx</groupId>
<artifactId>vertx-vaadin-root</artifactId>
<version>23.4.0-SNAPSHOT</version>
<version>24.3-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
4 changes: 2 additions & 2 deletions vertx-vaadin-flow/frontend/generated/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ import { Router } from '@vaadin/router';
import { Flow } from 'Frontend/generated/jar-resources/Flow.js';

const { serverSideRoutes } = new Flow({
imports: () => import('../../target/frontend/generated-flow-imports.js')
imports: () => import('Frontend/generated/flow/generated-flow-imports.js')
});

const routes = [
// for client-side, place routes below (more info https://vaadin.com/docs/v15/flow/typescript/creating-routes.html)
// for client-side, place routes below (more info https://hilla.dev/docs/lit/guides/routing#initializing-the-router)

// for server-side, the next magic line sends all unmatched routes:
...serverSideRoutes // IMPORTANT: this must be the last entry in the array
Expand Down
21 changes: 19 additions & 2 deletions vertx-vaadin-flow/frontend/generated/vaadin.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
import './vaadin-featureflags.ts';
import 'Frontend/generated/jar-resources/copilot/copilot.js';
// @ts-ignore
if (import.meta.hot) {
// @ts-ignore
import.meta.hot.on('vite:afterUpdate', () => {
(window as any).Vaadin.copilotPlugins._internals.copilotEventBus.emit('vite-after-update',{});
});
}

import '@vaadin/vertical-layout/src/vaadin-vertical-layout.js';
import '@vaadin/context-menu/src/vaadin-context-menu.js';
import '@vaadin/icons/vaadin-iconset.js';
import '@vaadin/menu-bar/src/vaadin-menu-bar.js';
import '@vaadin/icon/vaadin-icon.js';
import '@vaadin/text-field/src/vaadin-text-field.js';
import '@vaadin/grid/src/vaadin-grid.js';
import '@vaadin/grid/src/vaadin-grid-tree-column.js';
import './vaadin-featureflags.js';

import './index';

import 'Frontend/generated/jar-resources/vaadin-dev-tools.js';
import 'Frontend/generated/jar-resources/vaadin-dev-tools/vaadin-dev-tools.js';
27 changes: 19 additions & 8 deletions vertx-vaadin-flow/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.github.mcollovati.vertx</groupId>
<artifactId>vertx-vaadin-root</artifactId>
<version>23.4.0-SNAPSHOT</version>
<version>24.3-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand All @@ -21,7 +21,8 @@
<vaadin-flow-sockjs.version>${project.version}</vaadin-flow-sockjs.version>
<jackson.version>2.14.2</jackson.version>
<javax.annotation.api.version>1.3.2</javax.annotation.api.version>
<validation.api.version>2.0.1.Final</validation.api.version>
<jakarta.websocket.version>2.1.1</jakarta.websocket.version>
<validation.api.version>3.0.2</validation.api.version>
</properties>

<dependencyManagement>
Expand Down Expand Up @@ -116,8 +117,18 @@
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
</dependency>
<dependency>
<groupId>jakarta.websocket</groupId>
<artifactId>jakarta.websocket-api</artifactId>
<version>${jakarta.websocket.version}</version>
</dependency>
<dependency>
<groupId>jakarta.websocket</groupId>
<artifactId>jakarta.websocket-client-api</artifactId>
<version>${jakarta.websocket.version}</version>
</dependency>
<dependency>
<groupId>net.bytebuddy</groupId>
Expand All @@ -138,8 +149,8 @@
<version>${vertx.version}</version>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<groupId>jakarta.validation</groupId>
<artifactId>jakarta.validation-api</artifactId>
<version>${validation.api.version}</version>
</dependency>
<dependency>
Expand Down Expand Up @@ -211,13 +222,13 @@
<dependency>
<groupId>org.hibernate.validator</groupId>
<artifactId>hibernate-validator</artifactId>
<version>6.1.6.Final</version>
<version>8.0.1.Final</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>jakarta.el</artifactId>
<version>3.0.3</version>
<version>5.0.0-M1</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import io.netty.handler.codec.http.HttpResponseStatus;
import io.vertx.core.Vertx;
import io.vertx.core.buffer.Buffer;
import io.vertx.core.http.HttpClient;
import io.vertx.core.http.HttpServerRequest;
import io.vertx.core.http.HttpServerResponse;
import io.vertx.ext.web.RoutingContext;
Expand Down Expand Up @@ -85,7 +86,7 @@ private static UnaryOperator<String> createUriCustomizer(DevModeHandler devModeH
}

public static HttpReverseProxy create(Vertx vertx, DevModeHandler devModeHandler) {
CompletableFuture<WebClient> webClientFuture = VertxDevModeHandlerManager.getDevModeHandlerFuture(
CompletableFuture<WebClient> webClientFuture = VertxDevModeHandlerManager.getDevModeHandlerPort(
devModeHandler)
.thenApply(port -> {
logger.debug("Starting DevMode proxy on port {}", port);
Expand All @@ -112,7 +113,7 @@ public void forward(RoutingContext routingContext) {
routingContext.next();
} else {

if (StaticFileServer.APP_THEME_PATTERN.matcher(requestURI).find()) {
if (StaticFileServer.APP_THEME_ASSETS_PATTERN.matcher(requestURI).find()) {
requestURI = "/VAADIN/static" + requestURI;
}
requestURI = uriCustomizer.apply(requestURI);
Expand Down
Loading
Loading