fix: write pnpm overrides to pnpm-workspace.yaml#24918
Merged
Merged
Conversation
Contributor
mcollovati
force-pushed
the
fix/pnpm-11-workspace-overrides
branch
from
July 6, 2026 11:01
b64076e to
19e6b57
Compare
Recent pnpm versions no longer read the "pnpm" field from package.json, so the dependency overrides Flow generated there were silently ignored and pnpm logged a warning about it. As a result Flow could no longer lock transitive dependencies to the platform versions when using pnpm. Flow now writes these overrides to pnpm-workspace.yaml, the location pnpm actually reads, and moves any overrides left in package.json over to it. Existing user content in pnpm-workspace.yaml is preserved, and a Flow-generated file is cleaned up like other generated frontend files.
mcollovati
force-pushed
the
fix/pnpm-11-workspace-overrides
branch
from
July 6, 2026 11:20
19e6b57 to
3c327df
Compare
platosha
self-requested a review
July 6, 2026 11:33
mcollovati
marked this pull request as ready for review
July 7, 2026 08:38
platosha
requested changes
Jul 8, 2026
Override processing was split into `lockNpmOverrides` and `lockPnpmOverrides`, suggesting the two package managers were handled differently when in fact only the override storage format and location differ. `lockVersionForNpm` now manages overrides as a single canonical flat map and branches only to load and save them, delegating the format differences to an `OverridesStore` (nested `overrides` in package.json for npm, flat overrides in pnpm-workspace.yaml for pnpm). Behavior is unchanged.
platosha
requested changes
Jul 8, 2026
A `pnpm-workspace.yaml` may be authored and owned by the user, so an npm build must not rewrite or delete it. Flow manages the file only while pnpm is in use; switching to npm simply (re)writes the managed overrides to package.json and leaves the workspace file as-is. Add tests asserting the workspace file and its overrides survive a switch to npm, and that clearing overrides via `PnpmWorkspaceFile` preserves any other user content.
|
platosha
approved these changes
Jul 21, 2026
vaadin-bot
added a commit
that referenced
this pull request
Jul 21, 2026
…25020) This PR cherry-picks changes from the original PR #24918 to branch 25.2. --- #### Original PR description > Recent pnpm versions no longer read the "pnpm" field from package.json, so the dependency overrides Flow generated there were silently ignored and pnpm logged a warning about it. As a result Flow could no longer lock transitive dependencies to the platform versions when using pnpm. > > Flow now writes these overrides to pnpm-workspace.yaml, the location pnpm actually reads, and moves any overrides left in package.json over to it. Existing user content in pnpm-workspace.yaml is preserved, and a Flow-generated file is cleaned up like other generated frontend files. > Co-authored-by: Marco Collovati <marco@vaadin.com>
Collaborator
|
This ticket/PR has been released with Vaadin 25.3.0-alpha6. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Recent pnpm versions no longer read the "pnpm" field from package.json, so the dependency overrides Flow generated there were silently ignored and pnpm logged a warning about it. As a result Flow could no longer lock transitive dependencies to the platform versions when using pnpm.
Flow now writes these overrides to pnpm-workspace.yaml, the location pnpm actually reads, and moves any overrides left in package.json over to it. Existing user content in pnpm-workspace.yaml is preserved, and a Flow-generated file is cleaned up like other generated frontend files.