Skip to content

Commit a1af1d5

Browse files
committed
Reproduction base for vaadin/flow-components PR vaadin#9612
1 parent 8e6a26b commit a1af1d5

180 files changed

Lines changed: 724 additions & 1944 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.

.claude/commands/pr-review.md

Lines changed: 0 additions & 171 deletions
This file was deleted.

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ node_modules
3030
!/package.json
3131
!/package-lock.json
3232
pnpm*
33-
!**/pnpm-workspace.yaml
3433
.npmrc
3534
.pnpmfile.cjs
3635
error-screenshots

guidelines/03-component-structure.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ annotations, implements the mixin interfaces it needs, and delegates state to
99

1010
```java
1111
@Tag("vaadin-example")
12-
@NpmPackage(value = "@vaadin/example", version = "25.3.0-alpha1")
12+
@NpmPackage(value = "@vaadin/example", version = "25.2.0-alpha7")
1313
@JsModule("@vaadin/example/src/vaadin-example.js")
1414
public class Example extends Component
1515
implements HasEnabled, HasSize, HasStyle, HasThemeVariant<ExampleVariant> {

pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@
8686
<maven.surefire.plugin.version>3.5.6</maven.surefire.plugin.version>
8787
<maven.failsafe.plugin.version>3.5.6</maven.failsafe.plugin.version>
8888
<maven.resources.plugin.version>3.5.0</maven.resources.plugin.version>
89-
<spotless.plugin.version>3.8.0</spotless.plugin.version>
90-
<checkstyle.version>13.7.0</checkstyle.version>
89+
<spotless.plugin.version>3.7.0</spotless.plugin.version>
90+
<checkstyle.version>13.6.0</checkstyle.version>
9191
<maven.checkstyle.plugin.version>3.6.0</maven.checkstyle.plugin.version>
9292
<spotless.licence-header>${maven.multiModuleProjectDirectory}/scripts/templates/apache2-license-header.txt</spotless.licence-header>
9393
<spotless.npmExecutable/>
@@ -104,10 +104,10 @@
104104
<jakarta.web.api.version>11.0.0</jakarta.web.api.version>
105105
<spring-data-commons.version>4.1.0</spring-data-commons.version>
106106
<reactor-core.version>3.8.6</reactor-core.version>
107-
<langchain4j.version>1.17.1</langchain4j.version>
107+
<langchain4j.version>1.16.3</langchain4j.version>
108108
<spring-ai.version>2.0.0</spring-ai.version>
109109
<junit.version>4.13.2</junit.version>
110-
<junit.jupiter.version>6.1.1</junit.jupiter.version>
110+
<junit.jupiter.version>6.1.0</junit.jupiter.version>
111111

112112
<!-- spreadsheet -->
113113
<poi.version>5.5.1</poi.version>

scripts/mergeITs.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -223,9 +223,6 @@ async function copySources() {
223223
copyFolderRecursiveSync(`${parent}/${id}-integration-tests/frontend`, `${itFolder}`);
224224
// copy java sources
225225
copyFolderRecursiveSync(`${parent}/${id}-integration-tests/src`, `${itFolder}`);
226-
// copy pnpm-workspace.yaml so @vaadin/* web component bumps bypass the
227-
// frontend package age check (all modules ship an identical copy)
228-
copyFileSync(`${parent}/${id}-integration-tests/pnpm-workspace.yaml`, `${itFolder}`);
229226
});
230227

231228
// Always copy LumoAppShell, so that merged ITs run with Lumo theme applied. Some ITs do not work property with

scripts/wtr.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,14 @@ async function runTests() {
7979
fs.writeFileSync(packageJson, '{}');
8080
}
8181

82+
// Build the frontend with pnpm and let @vaadin/* web component bumps
83+
// bypass the frontend package age check. Avoids failures when running
84+
// checks for just-released @vaadin packages.
85+
fs.writeFileSync(
86+
`${itFolder}/pnpm-workspace.yaml`,
87+
"minimumReleaseAgeExclude:\n - '@vaadin/*'\n"
88+
);
89+
8290
// Install the IT module dependencies
8391
execSync(`mvn flow:prepare-frontend flow:build-frontend`, {
8492
cwd: itFolder,
@@ -95,7 +103,7 @@ async function runTests() {
95103
console.log(`Running tests in ${itFolder}`);
96104
try {
97105
const watchFlag = options.watch ? ' --watch' : '';
98-
execSync(`npx web-test-runner --playwright ${wtrTestsFolderName}/**/*.test.ts${watchFlag}`, {
106+
execSync(`npx web-test-runner --playwright ${wtrTestsFolderName}/**/*.test.ts --node-resolve${watchFlag}`, {
99107
cwd: itFolder,
100108
stdio: 'inherit'
101109
});

shared/shared-web-test-runner-config.mjs

Lines changed: 1 addition & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,10 @@
1-
import fs from 'node:fs';
2-
import path from 'node:path';
31
import { esbuildPlugin } from '@web/dev-server-esbuild';
42
import { defaultReporter, summaryReporter } from '@web/test-runner';
53
import { junitReporter } from '@web/test-runner-junit-reporter';
64

7-
/**
8-
* A plugin that serves frontend files imported from `frontend/generated/jar-resources`
9-
* from their original source in a component module's `META-INF/frontend` when it exists,
10-
* instead of the stale build-time copy. The request URL stays in the flat `jar-resources`
11-
* namespace, so cross-module sibling imports (e.g. `./contextMenuConnector.js`) continue
12-
* to resolve the same way Flow's flattening makes them.
13-
*
14-
* @param {string[]} sourceDirs Absolute paths to `META-INF/frontend` directories to look up
15-
* sources in, checked in order. Falls back to the build-time copy when no source matches.
16-
*/
17-
export function frontendSourcePlugin(sourceDirs) {
18-
function resolveSourcePath(requestPath) {
19-
const match = requestPath.match(/\/frontend\/generated\/jar-resources\/(.+)$/);
20-
if (!match) {
21-
return;
22-
}
23-
for (const dir of sourceDirs) {
24-
const sourcePath = path.join(dir, match[1]);
25-
if (fs.existsSync(sourcePath)) {
26-
return sourcePath;
27-
}
28-
}
29-
}
30-
31-
return {
32-
name: 'frontend-source',
33-
serverStart({ fileWatcher }) {
34-
sourceDirs.forEach((dir) => fileWatcher.add(dir));
35-
},
36-
serve(context) {
37-
const sourcePath = resolveSourcePath(context.path);
38-
if (sourcePath) {
39-
return { body: fs.readFileSync(sourcePath, 'utf8') };
40-
}
41-
},
42-
transform(context) {
43-
const sourcePath = resolveSourcePath(context.path);
44-
if (sourcePath) {
45-
// Don't cache frontend sources, so a rerun picks up the latest source
46-
// instead of a transform cached from a previous run.
47-
return { transformCache: false };
48-
}
49-
}
50-
};
51-
}
52-
535
/** @type {import('@web/test-runner').TestRunnerConfig} */
546
export const sharedConfig = {
557
plugins: [esbuildPlugin({ ts: true })],
56-
nodeResolve: true,
578
testFramework: {
589
config: {
5910
ui: 'bdd',
@@ -65,33 +16,9 @@ export const sharedConfig = {
6516
<html>
6617
<body>
6718
<script type="module">
68-
import { use, Assertion } from 'chai';
19+
import { use } from 'chai';
6920
import sinonChai from 'sinon-chai';
7021
use(sinonChai);
71-
72-
// When a test fails, web-test-runner ships the error from the browser
73-
// to the Node reporter, serializing it with structuredClone. sinon-chai
74-
// sets the assertion error's \`actual\` to the spy function itself, and
75-
// structuredClone throws on functions. That rejection kills the
76-
// session-finished message, so the run reports a 120s "did not finish"
77-
// timeout instead of the actual assertion failure. Drop any
78-
// actual/expected that can't be cloned so the failure reports cleanly.
79-
const assert = Assertion.prototype.assert;
80-
Assertion.prototype.assert = function (...args) {
81-
try {
82-
return assert.apply(this, args);
83-
} catch (error) {
84-
for (const key of ['actual', 'expected']) {
85-
try {
86-
structuredClone(error[key]);
87-
} catch {
88-
delete error[key];
89-
error.showDiff = false;
90-
}
91-
}
92-
throw error;
93-
}
94-
};
9522
</script>
9623
<script type="module" src="${testFramework}"></script>
9724
</body>

vaadin-accordion-flow-parent/vaadin-accordion-flow-integration-tests/pnpm-workspace.yaml

Lines changed: 0 additions & 2 deletions
This file was deleted.

vaadin-accordion-flow-parent/vaadin-accordion-flow/src/main/java/com/vaadin/flow/component/accordion/Accordion.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
* @author Vaadin Ltd
5050
*/
5151
@Tag("vaadin-accordion")
52-
@NpmPackage(value = "@vaadin/accordion", version = "25.3.0-alpha1")
52+
@NpmPackage(value = "@vaadin/accordion", version = "25.2.0")
5353
@JsModule("@vaadin/accordion/src/vaadin-accordion.js")
5454
public class Accordion extends Component implements HasSize, HasStyle {
5555

vaadin-accordion-flow-parent/vaadin-accordion-flow/src/main/java/com/vaadin/flow/component/accordion/AccordionPanel.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
* An accordion panel which could be opened or closed.
2626
*/
2727
@Tag("vaadin-accordion-panel")
28-
@NpmPackage(value = "@vaadin/accordion", version = "25.3.0-alpha1")
28+
@NpmPackage(value = "@vaadin/accordion", version = "25.2.0")
2929
@JsModule("@vaadin/accordion/src/vaadin-accordion-panel.js")
3030
public class AccordionPanel extends Details {
3131

0 commit comments

Comments
 (0)