Skip to content

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

Merged
ZheSun88 merged 2 commits into25.0from
fix-it-2-25.0
May 8, 2026
Merged

fix: install pnpm deps in hoisted mode + declare @babel/types (#24288) (CP: 25.0)#24296
ZheSun88 merged 2 commits into25.0from
fix-it-2-25.0

Conversation

@vaadin-bot
Copy link
Copy Markdown
Collaborator

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

… (CP: 25.0)

Manual port of d9290f8 from main. 25.0 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 25.0's dep-graph: @babel/types is pinned to 7.28.5 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 25.0).
@babel/core and @babel/plugin-transform-react-jsx-development from the
main commit are not added — they are not declared as direct deps on
25.0 and the React function location plugin only imports @babel/types.

The .npmrc and FrontendTools changes that switch pnpm to hoisted mode
apply unchanged.

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]

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 8, 2026

Test Results

1 319 files  1 319 suites   1h 23m 17s ⏱️
9 419 tests 9 352 ✅ 67 💤 0 ❌
9 874 runs  9 799 ✅ 75 💤 0 ❌

Results for commit 1019bf2.

♻️ This comment has been updated with latest results.

@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

@ZheSun88 ZheSun88 marked this pull request as ready for review May 8, 2026 09:30
@ZheSun88 ZheSun88 merged commit b9b5632 into 25.0 May 8, 2026
30 checks passed
@ZheSun88 ZheSun88 deleted the fix-it-2-25.0 branch May 8, 2026 09:30
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