Commit b9b5632
Cherry-pick of #24288 (commit d9290f8) from main to 25.0.
## Summary
Same fix as #24288: switches pnpm install to hoisted (flat npm-style)
layout so transitive npm deps (`@babel/types`, `@lit/reactive-element`,
`cookie`, `set-cookie-parser`, `@preact/signals-react/runtime`) are
always reachable from project root, eliminating the `vite-basics` IT
hang and similar symptoms.
## Adjustments for 25.0
This branch is pre-`flow-build-tools` refactor (#23161), so all the
Java files the original commit touches (`FrontendTools.java`,
`FrontendToolsTest.java`, `NodeUpdaterTest.java`,
`TaskRunPnpmInstallTest.java`) live under `flow-server/` here. The
edits are otherwise identical.
Two version adjustments to match this branch's dep graph:
1. **`@babel/types` pinned to `7.28.5`** (matching `@babel/preset-react`
already in `vite/package.json`) instead of main's `7.29.0`. 25.0
does not declare `@babel/core`, so version coherence is anchored to
`preset-react`.
2. **Skipped `@babel/core` and
`@babel/plugin-transform-react-jsx-development`**
declarations from the main commit — not declared as direct deps on
25.0, and the React function location plugin only imports
`@babel/types`.
Everything else is identical:
- `flow-server/.../npmrc`: adds `node-linker=hoisted`.
- `FrontendTools.java`: replaces `--shamefully-hoist=true` CLI flag
with `--config.node-linker=hoisted`.
- All three test files updated to match the new assertions.
## Test plan
- [ ] CI on this PR passes (specifically `it-tests (1)` and `it-tests
(2)`).
- [ ] `mvn -pl flow-server test
-Dtest=NodeUpdaterTest,TaskRunPnpmInstallTest,FrontendToolsTest` passes.
- [ ] After install in any vite-using IT module, `node_modules/.pnpm/`
does not exist (or is empty); `node_modules/@babel/types/` and
`node_modules/@lit/reactive-element/` exist as real directories at the
project root.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Zhe Sun <zhe@vaadin.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 2142a79 commit b9b5632
6 files changed
Lines changed: 19 additions & 3 deletions
File tree
- flow-server/src
- main
- java/com/vaadin/flow/server/frontend
- resources
- com/vaadin/flow/server/frontend/dependencies/vite
- test/java/com/vaadin/flow/server/frontend
Lines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
362 | 362 | | |
363 | 363 | | |
364 | 364 | | |
365 | | - | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
366 | 372 | | |
367 | 373 | | |
368 | 374 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
6 | 12 | | |
7 | 13 | | |
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
363 | 363 | | |
364 | 364 | | |
365 | 365 | | |
366 | | - | |
367 | | - | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
368 | 369 | | |
369 | 370 | | |
370 | 371 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
| 165 | + | |
165 | 166 | | |
166 | 167 | | |
167 | 168 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
| 228 | + | |
228 | 229 | | |
229 | 230 | | |
230 | 231 | | |
| |||
0 commit comments