diff --git a/flow-client/pom.xml b/flow-client/pom.xml index a4f00ba12e9..32b567c9391 100644 --- a/flow-client/pom.xml +++ b/flow-client/pom.xml @@ -151,7 +151,7 @@ org.eclipse.platform org.eclipse.core.contenttype - 3.9.400 + 3.9.500 test diff --git a/flow-server/src/main/java/com/vaadin/flow/server/frontend/installer/NodeInstaller.java b/flow-server/src/main/java/com/vaadin/flow/server/frontend/installer/NodeInstaller.java index 84e169eeff9..b2b1999662d 100644 --- a/flow-server/src/main/java/com/vaadin/flow/server/frontend/installer/NodeInstaller.java +++ b/flow-server/src/main/java/com/vaadin/flow/server/frontend/installer/NodeInstaller.java @@ -26,6 +26,9 @@ import java.util.Arrays; import java.util.List; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; import org.apache.commons.io.FileUtils; import org.slf4j.Logger; @@ -559,8 +562,14 @@ private static FrontendVersion getVersion(String tool, throw new IOException("Process exited with non 0 exit code. (" + exitCode + ")"); } - return FrontendUtils.parseFrontendVersion( - streamConsumer.getNow(new Pair<>("", "")).getFirst()); + String version; + try { + version = streamConsumer.get(1, TimeUnit.SECONDS).getFirst(); + } catch (ExecutionException | TimeoutException e) { + getLogger().debug("Cannot read {} version", tool, e); + version = ""; + } + return FrontendUtils.parseFrontendVersion(version); } catch (InterruptedException | IOException e) { throw new InstallationException(String.format( "Unable to detect version of %s. %s", tool, diff --git a/flow-server/src/main/java/com/vaadin/flow/server/frontend/scanner/FrontendDependencies.java b/flow-server/src/main/java/com/vaadin/flow/server/frontend/scanner/FrontendDependencies.java index 97b4aa507b3..66070f2e0d1 100644 --- a/flow-server/src/main/java/com/vaadin/flow/server/frontend/scanner/FrontendDependencies.java +++ b/flow-server/src/main/java/com/vaadin/flow/server/frontend/scanner/FrontendDependencies.java @@ -62,9 +62,9 @@ import com.vaadin.flow.theme.NoTheme; import com.vaadin.flow.theme.ThemeDefinition; +import static com.vaadin.flow.server.frontend.scanner.FrontendClassVisitor.DEV; import static com.vaadin.flow.server.frontend.scanner.FrontendClassVisitor.VALUE; import static com.vaadin.flow.server.frontend.scanner.FrontendClassVisitor.VERSION; -import static com.vaadin.flow.server.frontend.scanner.FrontendClassVisitor.DEV; /** * Represents the class dependency tree of the application. @@ -742,14 +742,19 @@ private void computePwaConfiguration() throws ClassNotFoundException { .getAnnotatedClasses(PWA.class.getName())) { if (!Arrays.asList(hopefullyAppShellClass.getInterfaces()) .contains(appShellConfiguratorClass)) { - throw new IllegalStateException(ERROR_INVALID_PWA_ANNOTATION); + throw new IllegalStateException(ERROR_INVALID_PWA_ANNOTATION + + " " + hopefullyAppShellClass.getName() + + " does not implement " + + AppShellConfigurator.class.getSimpleName()); } pwaVisitor.visitClass(hopefullyAppShellClass.getName()); } Set dependencies = pwaVisitor.getValues("name"); if (dependencies.size() > 1) { - throw new IllegalStateException(ERROR_INVALID_PWA_ANNOTATION); + throw new IllegalStateException(ERROR_INVALID_PWA_ANNOTATION + + " Found " + dependencies.size() + " implementations: " + + dependencies); } if (dependencies.isEmpty()) { this.pwaConfiguration = new PwaConfiguration(); diff --git a/flow-server/src/main/java/com/vaadin/flow/server/frontend/scanner/FullDependenciesScanner.java b/flow-server/src/main/java/com/vaadin/flow/server/frontend/scanner/FullDependenciesScanner.java index 2b078f76d76..3f154b00fdd 100644 --- a/flow-server/src/main/java/com/vaadin/flow/server/frontend/scanner/FullDependenciesScanner.java +++ b/flow-server/src/main/java/com/vaadin/flow/server/frontend/scanner/FullDependenciesScanner.java @@ -520,7 +520,9 @@ private PwaConfiguration discoverPwa() { if (annotatedClasses.isEmpty()) { return new PwaConfiguration(); } else if (annotatedClasses.size() != 1) { - throw new IllegalStateException(ERROR_INVALID_PWA_ANNOTATION); + throw new IllegalStateException(ERROR_INVALID_PWA_ANNOTATION + + " Found " + annotatedClasses.size() + + " implementations: " + annotatedClasses); } Class hopefullyAppShellClass = annotatedClasses.iterator() @@ -528,7 +530,10 @@ private PwaConfiguration discoverPwa() { if (!Arrays.stream(hopefullyAppShellClass.getInterfaces()) .map(Class::getName).collect(Collectors.toList()) .contains(AppShellConfigurator.class.getName())) { - throw new IllegalStateException(ERROR_INVALID_PWA_ANNOTATION); + throw new IllegalStateException(ERROR_INVALID_PWA_ANNOTATION + + " " + hopefullyAppShellClass.getName() + + " does not implement " + + AppShellConfigurator.class.getSimpleName()); } Annotation pwa = annotationFinder diff --git a/flow-server/src/main/resources/com/vaadin/flow/server/frontend/dependencies/default/package.json b/flow-server/src/main/resources/com/vaadin/flow/server/frontend/dependencies/default/package.json index 371e8de2fd2..413b991cb50 100644 --- a/flow-server/src/main/resources/com/vaadin/flow/server/frontend/dependencies/default/package.json +++ b/flow-server/src/main/resources/com/vaadin/flow/server/frontend/dependencies/default/package.json @@ -17,7 +17,7 @@ "devDependencies": { "async": "3.2.6", "glob": "10.4.5", - "typescript": "5.5.4", + "typescript": "5.6.2", "workbox-core": "7.1.0", "workbox-precaching": "7.1.0", "strip-css-comments": "5.0.0" diff --git a/flow-server/src/main/resources/com/vaadin/flow/server/frontend/dependencies/vite/package.json b/flow-server/src/main/resources/com/vaadin/flow/server/frontend/dependencies/vite/package.json index ddef49ad0df..c66ac3d1b08 100644 --- a/flow-server/src/main/resources/com/vaadin/flow/server/frontend/dependencies/vite/package.json +++ b/flow-server/src/main/resources/com/vaadin/flow/server/frontend/dependencies/vite/package.json @@ -18,7 +18,7 @@ "@babel/preset-react": "7.24.7", "rollup-plugin-visualizer": "5.12.0", "rollup-plugin-brotli": "3.1.0", - "vite-plugin-checker": "0.7.2", + "vite-plugin-checker": "0.8.0", "workbox-build": "7.1.1", "transform-ast": "2.4.4" }