From c7a071487cec2be897a7fb7fb46034312f94b520 Mon Sep 17 00:00:00 2001 From: Artur Date: Wed, 11 Dec 2024 13:10:54 +0200 Subject: [PATCH] chore!: Change supported Node from 18 to 20 (#20669) * chore!: Change supported Node from 18 to 20 Node 20 is the active LTS version for Node. Node 18 will be end of life soon and new libraries like React 19 support Node 20+ * Fix tests --- .../java/com/vaadin/flow/server/frontend/FrontendTools.java | 6 +++--- .../com/vaadin/flow/server/frontend/FrontendToolsTest.java | 2 +- .../main/java/com/vaadin/flow/testutil/FrontendStubs.java | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/flow-server/src/main/java/com/vaadin/flow/server/frontend/FrontendTools.java b/flow-server/src/main/java/com/vaadin/flow/server/frontend/FrontendTools.java index 8c1bf6f7a4d..d2d5ec63f56 100644 --- a/flow-server/src/main/java/com/vaadin/flow/server/frontend/FrontendTools.java +++ b/flow-server/src/main/java/com/vaadin/flow/server/frontend/FrontendTools.java @@ -117,9 +117,9 @@ public class FrontendTools { private static final FrontendVersion WHITESPACE_ACCEPTING_NPM_VERSION = new FrontendVersion( 7, 0); - private static final int SUPPORTED_NODE_MAJOR_VERSION = 18; - private static final int SUPPORTED_NODE_MINOR_VERSION = 12; - private static final int SUPPORTED_NPM_MAJOR_VERSION = 8; + private static final int SUPPORTED_NODE_MAJOR_VERSION = 20; + private static final int SUPPORTED_NODE_MINOR_VERSION = 0; + private static final int SUPPORTED_NPM_MAJOR_VERSION = 9; private static final int SUPPORTED_NPM_MINOR_VERSION = 6; static final FrontendVersion SUPPORTED_NODE_VERSION = new FrontendVersion( diff --git a/flow-server/src/test/java/com/vaadin/flow/server/frontend/FrontendToolsTest.java b/flow-server/src/test/java/com/vaadin/flow/server/frontend/FrontendToolsTest.java index b72cd28d7a9..2aa9ac1a292 100644 --- a/flow-server/src/test/java/com/vaadin/flow/server/frontend/FrontendToolsTest.java +++ b/flow-server/src/test/java/com/vaadin/flow/server/frontend/FrontendToolsTest.java @@ -69,7 +69,7 @@ @Category(SlowTests.class) public class FrontendToolsTest { - private static final String SUPPORTED_NODE_BUT_OLDER_THAN_AUTOINSTALLED = "18.12.0"; + private static final String SUPPORTED_NODE_BUT_OLDER_THAN_AUTOINSTALLED = "20.0.0"; public static final String DEFAULT_NODE = FrontendUtils.isWindows() ? "node\\node.exe" diff --git a/flow-test-generic/src/main/java/com/vaadin/flow/testutil/FrontendStubs.java b/flow-test-generic/src/main/java/com/vaadin/flow/testutil/FrontendStubs.java index 035df87d88e..2648966a376 100644 --- a/flow-test-generic/src/main/java/com/vaadin/flow/testutil/FrontendStubs.java +++ b/flow-test-generic/src/main/java/com/vaadin/flow/testutil/FrontendStubs.java @@ -254,8 +254,8 @@ public String getScript() { */ public static class ToolStubBuilder { - private static final String DEFAULT_NPM_VERSION = "8.6.0"; - private static final String DEFAULT_NODE_VERSION = "18.12.0"; + private static final String DEFAULT_NPM_VERSION = "10.9.0"; + private static final String DEFAULT_NODE_VERSION = "22.12.0"; private String version; private String cacheDir;