fix: keep user content in pnpm-workspace.yaml intact - #25128
Draft
mcollovati wants to merge 1 commit into
Draft
Conversation
Contributor
mcollovati
marked this pull request as draft
August 4, 2026 07:26
mcollovati
force-pushed
the
issues/25122-preserve-pnpm-workspace-formatting
branch
from
August 4, 2026 08:27
ca86579 to
465ed29
Compare
When updating dependency overrides, Flow rewrote the whole pnpm-workspace.yaml. That dropped every comment in the file and reformatted and reordered the rest of the user's configuration. Overrides are now merged entry by entry, so comments, quoting, indentation and entry order stay as the user wrote them and only the overrides Flow manages change. This needs a YAML library that can carry comments, so snakeyaml-engine replaces jackson-dataformat-yaml in flow-build-tools. A file holding YAML that cannot be edited safely, or an entry written in a shape Flow does not manage, is left alone with a warning rather than rewritten. Fixes #25122
mcollovati
force-pushed
the
issues/25122-preserve-pnpm-workspace-formatting
branch
from
August 4, 2026 08:47
465ed29 to
5a72cfb
Compare
|
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.



When updating dependency overrides, Flow rewrote the whole pnpm-workspace.yaml. That dropped every comment in the file and reformatted and reordered the rest of the user's configuration.
Overrides are now merged entry by entry, so comments, quoting, indentation and entry order stay as the user wrote them and only the overrides Flow manages change. This needs a YAML library that can carry comments, so snakeyaml-engine replaces jackson-dataformat-yaml in flow-build-tools. Files holding YAML that cannot be edited safely are left untouched with a warning rather than rewritten.
Fixes #25122