Skip to content

Commit 9c45b6f

Browse files
authored
Merge branch 'main' into fullscreen-api
2 parents 9b0d813 + 2a81ded commit 9c45b6f

441 files changed

Lines changed: 11221 additions & 2708 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/validation.yml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Flow Validation
22
on:
33
push:
4-
branches: [main, '25.0', '24.9', '24.8', '23.6']
4+
branches: [main, '25.1', '25.0', '24.10', '24.9', '23.7', '23.6']
55
workflow_dispatch:
66
pull_request_target:
77
types: [opened, synchronize, reopened]
@@ -263,6 +263,29 @@ jobs:
263263
run: |
264264
echo "🚫 THERE ARE TEST MODULES WITH FAILURES or BEEN CANCELLED" | tee -a $GITHUB_STEP_SUMMARY
265265
exit 1
266+
auto-merge:
267+
needs: api-diff-labeling
268+
if: github.event_name == 'pull_request' && github.base_ref != 'main'
269+
timeout-minutes: 5
270+
runs-on: ubuntu-24.04
271+
permissions:
272+
contents: write
273+
pull-requests: write
274+
steps:
275+
- uses: actions/checkout@v4
276+
with:
277+
repository: vaadin/platform-build-script
278+
ref: main
279+
token: ${{ secrets.VAADIN_BOT_TOKEN }}
280+
- uses: actions/setup-node@v4
281+
with:
282+
node-version: '24.9.0'
283+
- name: Auto-merge PR
284+
env:
285+
GITHUB_TOKEN: ${{ secrets.VAADIN_BOT_TOKEN }}
286+
GITHUB_REVIEW_TOKEN: ${{ secrets.REVIEW_TOKEN }}
287+
PR_NUMBER: ${{ github.event.number }}
288+
run: node scripts/autoMerge.js
266289
api-diff-labeling:
267290
environment: ${{ github.event.pull_request.head.repo.fork && 'pr-tests' || '' }}
268291
if: github.event_name == 'pull_request_target'

.husky/pre-commit

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,13 @@ if [ -n "$STAGED_FILES" ]; then
66
UPSTREAM_REF="$(git rev-parse --abbrev-ref --symbolic-full-name @{u} 2>/dev/null)" || exit 0
77
BASE_SHA="$(git merge-base HEAD "$UPSTREAM_REF")"
88

9-
# Stash unstaged changes to avoid re-staging partial hunks
10-
git stash push --keep-index --quiet --message "pre-commit-hook-unstaged"
11-
129
echo "Formatting with Spotless..."
1310
if ! mvn spotless:apply -q -Dspotless.ratchetFrom="$BASE_SHA"; then
1411
echo "Spotless formatting failed."
15-
git stash pop --quiet 2>/dev/null || true
1612
exit 1
1713
fi
1814

1915
echo "$STAGED_FILES" | xargs git add
2016

21-
# Restore unstaged changes
22-
git stash pop --quiet 2>/dev/null || true
23-
2417
echo "Formatting complete."
2518
fi

CLAUDE.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,5 +168,7 @@ Components extend `Component` and use:
168168
- Extensive CI/CD pipeline with multiple test configurations
169169
- When sending data to executeJS, always pass it as parameters and use $1,$2 etc and never concatenate strings
170170
- When creating a commit that will resolve an issue in the same repository, add "Fixes #issuenumber" to the commit message
171+
- When creating a PR, mark it as a draft on GitHub and remind the user about reviewing the code themselves and marking the PR ready
171172
- Don't add @since to javadocs
172173
- When adding unit tests, add only the essential ones and not more than that
174+
- Use test: instead of fix: when fixing only tests

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ Since [Vaadin platform 23.0](https://github.com/vaadin/platform), Flow major and
1414

1515
| Branch | [Platform Version](https://github.com/vaadin/platform/releases) | [Flow Version](https://github.com/vaadin/flow/releases) |
1616
|--------|-------------------------------------------------------------------------|---------------------------------------------------------|
17-
| 2.12 | 14.13 (LATEST commercial with Java 8+ support and Servlet 3) | 2.12 |
17+
| 2.13 | 14.14 (LATEST commercial with Java 8+ support and Servlet 3) | 2.13 |
1818
| 23.6 | 23.6 (LATEST commercial with Java 11+ support and Servlet 3) | 23.6 |
19-
| 24.8 | 24.8 (maintained minor release, Java 17+, Jakarta EE 10, Spring-boot 3) | 24.8 |
2019
| 24.9 | 24.9 (LATEST 24 minor release, Java 17+, Jakarta EE 10, Spring-boot 3) | 24.9 |
2120
| 25.0 | 25.0 (LATEST release, Java 21+, Jakarta EE 11, Spring-boot 4) | 25.0 |
22-
| main | 25.1 (Vaadin 25.1 preparations, Java 21+, Jakarta EE 11, Spring-boot 4) | 25.1 |
21+
| 25.1 | 25.1 (Vaadin 25.1 pre-release, Java 21+, Jakarta EE 11, Spring-boot 4) | 25.1 |
22+
| main | 25.2 (Vaadin 25.2 preparations, Java 21+, Jakarta EE 11, Spring-boot 4) | 25.2 |

flow-bom/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
</parent>
1010

1111
<artifactId>flow-bom</artifactId>
12-
<version>25.1-SNAPSHOT</version>
12+
<version>25.2-SNAPSHOT</version>
1313
<packaging>pom</packaging>
1414
<name>Flow Bill of Materials</name>
1515
<description>Flow Bill of Materials</description>
@@ -30,7 +30,7 @@
3030
<plugin>
3131
<groupId>com.diffplug.spotless</groupId>
3232
<artifactId>spotless-maven-plugin</artifactId>
33-
<version>3.2.1</version>
33+
<version>3.3.0</version>
3434
<configuration>
3535
<skip>true</skip>
3636
</configuration>

flow-build-tools/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>com.vaadin</groupId>
66
<artifactId>flow-project</artifactId>
7-
<version>25.1-SNAPSHOT</version>
7+
<version>25.2-SNAPSHOT</version>
88
</parent>
99
<artifactId>flow-build-tools</artifactId>
1010
<packaging>jar</packaging>
@@ -76,7 +76,7 @@
7676
<plugin>
7777
<groupId>org.apache.maven.plugins</groupId>
7878
<artifactId>maven-shade-plugin</artifactId>
79-
<version>3.6.1</version>
79+
<version>3.6.2</version>
8080
<executions>
8181
<execution>
8282
<goals>

flow-build-tools/src/main/java/com/vaadin/flow/server/frontend/BundleValidationUtil.java

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -427,9 +427,9 @@ private static void cleanOldPlatformDependencies(JsonNode packageJson) {
427427
for (String vaadinDependency : JacksonUtils
428428
.getKeys(vaadinDependencies)) {
429429
String version = vaadinDependencies.get(vaadinDependency)
430-
.textValue();
430+
.asString();
431431
if (dependencies.has(vaadinDependency) && version
432-
.equals(dependencies.get(vaadinDependency).textValue())) {
432+
.equals(dependencies.get(vaadinDependency).asString())) {
433433
dependencies.remove(vaadinDependency);
434434
getLogger().debug(
435435
"Old Vaadin provided dependency '{}':'{}' has been removed from package.json",
@@ -505,16 +505,16 @@ public static boolean hashAndBundleModulesEqual(JsonNode statsJson,
505505
// We know here that all dependencies exist
506506
missingFromBundle = dependenciesList.stream()
507507
.filter(pkg -> !versionAccepted(
508-
dependencies.get(pkg).textValue(),
509-
bundleModules.get(pkg).textValue()))
508+
dependencies.get(pkg).asString(),
509+
bundleModules.get(pkg).asString()))
510510
.collect(Collectors.toList());
511511

512512
if (!missingFromBundle.isEmpty()) {
513513
for (String pkg : missingFromBundle) {
514514
getLogger().info(
515515
"Dependency {}:{} has the wrong version {} in the bundle",
516-
pkg, dependencies.get(pkg).textValue(),
517-
bundleModules.get(pkg).textValue());
516+
pkg, dependencies.get(pkg).asString(),
517+
bundleModules.get(pkg).asString());
518518
}
519519
return false;
520520
}
@@ -581,7 +581,7 @@ private static boolean dependenciesContainsAllPackages(
581581
Map<String, String> npmPackages, JsonNode dependencies) {
582582
final List<String> collect = npmPackages.keySet().stream()
583583
.filter(pkg -> !(dependencies.has(pkg)
584-
&& versionAccepted(dependencies.get(pkg).textValue(),
584+
&& versionAccepted(dependencies.get(pkg).asString(),
585585
npmPackages.get(pkg))))
586586
.collect(Collectors.toList());
587587
if (!collect.isEmpty()) {
@@ -622,7 +622,7 @@ public static boolean exportedWebComponents(JsonNode statsJson,
622622
for (int index = 0; index < webComponentsInStats
623623
.size(); index++) {
624624
String webComponentInStats = webComponentsInStats.get(index)
625-
.textValue();
625+
.asString();
626626
webComponents.remove(webComponentInStats);
627627
}
628628
}
@@ -854,7 +854,7 @@ private static Map<String, String> getRemainingImports(
854854
if (!remainingKeys.isEmpty()) {
855855
for (String key : remainingKeys) {
856856
remainingImportEntries.put(key,
857-
frontendHashes.get(key).textValue());
857+
frontendHashes.get(key).asString());
858858
}
859859
return remainingImportEntries;
860860
}
@@ -905,7 +905,7 @@ private static String compareFrontendHashes(JsonNode frontendHashes,
905905
String frontendFileContent) {
906906
final String contentHash = calculateHash(frontendFileContent);
907907
if (frontendHashes.has(frontendFilePath) && !frontendHashes
908-
.get(frontendFilePath).textValue().equals(contentHash)) {
908+
.get(frontendFilePath).asString().equals(contentHash)) {
909909
faultyContent.add(frontendFilePath);
910910
} else if (!frontendHashes.has(frontendFilePath)) {
911911
getLogger().info("No hash info for '{}'", frontendFilePath);
@@ -923,7 +923,7 @@ private static boolean arrayContainsString(ArrayNode array, String string) {
923923
string = string.replace("Frontend/", "./");
924924
for (int i = 0; i < array.size(); i++) {
925925
if (string.equals(
926-
array.get(i).textValue().replace("Frontend/", "./"))) {
926+
array.get(i).asString().replace("Frontend/", "./"))) {
927927
return true;
928928
}
929929
}
@@ -932,7 +932,7 @@ private static boolean arrayContainsString(ArrayNode array, String string) {
932932

933933
public static String getStatsHash(JsonNode statsJson) {
934934
if (statsJson.has("packageJsonHash")) {
935-
return statsJson.get("packageJsonHash").textValue();
935+
return statsJson.get("packageJsonHash").asString();
936936
}
937937

938938
return null;
@@ -941,7 +941,7 @@ public static String getStatsHash(JsonNode statsJson) {
941941
public static String getPackageJsonHash(JsonNode packageJson) {
942942
if (packageJson != null && packageJson.has("vaadin")
943943
&& packageJson.get("vaadin").has("hash")) {
944-
return packageJson.get("vaadin").get("hash").textValue();
944+
return packageJson.get("vaadin").get("hash").asString();
945945
}
946946

947947
return null;

flow-build-tools/src/main/java/com/vaadin/flow/server/frontend/FrontendTools.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,13 @@ public class FrontendTools {
6464
* the installed version is older than {@link #SUPPORTED_NODE_VERSION}, i.e.
6565
* {@value #SUPPORTED_NODE_MAJOR_VERSION}.{@value #SUPPORTED_NODE_MINOR_VERSION}.
6666
*/
67-
public static final String DEFAULT_NODE_VERSION = "v24.13.1";
67+
public static final String DEFAULT_NODE_VERSION = "v24.14.0";
6868
/**
6969
* This is the version shipped with the default Node version.
7070
*/
7171
public static final String DEFAULT_NPM_VERSION = "11.8.0";
7272

73-
public static final String DEFAULT_PNPM_VERSION = "10.28.0";
73+
public static final String DEFAULT_PNPM_VERSION = "10.30.2";
7474

7575
private static final String MSG_PREFIX = "%n%n======================================================================================================";
7676
private static final String MSG_SUFFIX = "%n======================================================================================================%n";

flow-build-tools/src/main/java/com/vaadin/flow/server/frontend/TaskUpdatePackages.java

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,21 @@ private int removeLegacyProperties(ObjectNode packageJson)
569569
}
570570

571571
private void cleanUp() throws IOException {
572-
FrontendUtils.deleteNodeModules(options.getNodeModulesFolder());
572+
try {
573+
FrontendUtils.deleteNodeModules(options.getNodeModulesFolder());
574+
} catch (IOException exception) {
575+
File nodeModules = options.getNodeModulesFolder();
576+
log().debug("Exception removing node_modules", exception);
577+
StringBuilder messageWithReason = new StringBuilder(
578+
"Removal of '{}'");
579+
if (!forceCleanUp) {
580+
messageWithReason.append(", due to platform version update,");
581+
}
582+
messageWithReason.append(
583+
" failed. Remove it manually if there are problems with the build.");
584+
log().error(messageWithReason.toString(),
585+
nodeModules.getAbsolutePath());
586+
}
573587

574588
if (jarResourcesFolder != null && jarResourcesFolder.exists()) {
575589
// This feels like cleanup done in the wrong place but is left here

flow-build-tools/src/test/java/com/vaadin/flow/server/frontend/BundleValidationTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1050,7 +1050,7 @@ public void frontendFileHashMissmatch_bundleRebuild() throws IOException {
10501050
((ArrayNode) (ArrayNode) stats.get(BUNDLE_IMPORTS))
10511051
.add("Frontend/generated/jar-resources/TodoTemplate.js");
10521052
((ObjectNode) stats.get(FRONTEND_HASHES)).put("TodoTemplate.js",
1053-
"dea5180dd21d2f18d1472074cd5305f60b824e557dae480fb66cdf3ea73edc65");
1053+
"wrongHash");
10541054

10551055
devBundleUtils.when(() -> DevBundleUtils
10561056
.getDevBundleFolder(Mockito.any(), Mockito.any()))

0 commit comments

Comments
 (0)