Skip to content

fix: install pnpm deps in hoisted mode + declare @babel/types (#24288) (CP: 24.9)#24298

Merged
ZheSun88 merged 1 commit into24.9from
fix-it-2-24.9
May 8, 2026
Merged

fix: install pnpm deps in hoisted mode + declare @babel/types (#24288) (CP: 24.9)#24298
ZheSun88 merged 1 commit into24.9from
fix-it-2-24.9

Conversation

@vaadin-bot
Copy link
Copy Markdown
Collaborator

Cherry-pick of #24288 (commit d9290f8) from main to 24.9.

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 24.9

24.9 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.27.1 (matching @babel/preset-react)
    instead of main's 7.29.0. 24.9 does not declare @babel/core,
    so version coherence is anchored to preset-react — which on 24.9
    is on the older 7.27.x line.

  2. Skipped @babel/core and @babel/plugin-transform-react-jsx-development
    declarations from the main commit — not declared as direct deps on
    24.9, and the React function location plugin only imports
    @babel/types.

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

… (CP: 24.9)

Manual port of d9290f8 from main. 24.9 is pre-flow-build-tools
refactor (#23161), so the FrontendTools.java, FrontendToolsTest.java,
NodeUpdaterTest.java and TaskRunPnpmInstallTest.java edits all apply
under flow-server/ rather than flow-build-tools/.

Adjusted for 24.9's dep-graph: @babel/types is pinned to 7.27.1 to
match @babel/preset-react's version on this branch (main pins to
7.29.0 to match @babel/core which is not declared on 24.9).
@babel/core and @babel/plugin-transform-react-jsx-development from the
main commit are not added — they are not declared as direct deps on
24.9 and the React function location plugin only imports @babel/types.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added the +0.0.1 label May 8, 2026
@vaadin-bot
Copy link
Copy Markdown
Collaborator Author

This PR is eligible for auto-merging policy, so it has been approved automatically. If there are pending conditions, auto merge (with 'squash' method) has been enabled for this PR[Message is sent from bot]

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 8, 2026

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 8, 2026

Test Results

1 288 files  1 288 suites   1h 16m 9s ⏱️
8 900 tests 8 838 ✅ 62 💤 0 ❌
9 231 runs  9 163 ✅ 68 💤 0 ❌

Results for commit 7c152bc.

@ZheSun88 ZheSun88 marked this pull request as ready for review May 8, 2026 09:31
@ZheSun88 ZheSun88 merged commit 9c10d89 into 24.9 May 8, 2026
28 checks passed
@ZheSun88 ZheSun88 deleted the fix-it-2-24.9 branch May 8, 2026 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants