Skip to content

fix: keep user content in pnpm-workspace.yaml intact - #25128

Draft
mcollovati wants to merge 1 commit into
mainfrom
issues/25122-preserve-pnpm-workspace-formatting
Draft

fix: keep user content in pnpm-workspace.yaml intact#25128
mcollovati wants to merge 1 commit into
mainfrom
issues/25122-preserve-pnpm-workspace-formatting

Conversation

@mcollovati

Copy link
Copy Markdown
Collaborator

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

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Test Results

 1 448 files   - 1   1 449 suites   - 1   1h 23m 1s ⏱️ - 3m 28s
10 396 tests +3  10 329 ✅ +3  67 💤 ±0  0 ❌ ±0 
10 832 runs  +3  10 764 ✅ +3  68 💤 ±0  0 ❌ ±0 

Results for commit 5a72cfb. ± Comparison against base commit 1c46bab.

♻️ This comment has been updated with latest results.

@mcollovati
mcollovati marked this pull request as draft August 4, 2026 07:26
@mcollovati
mcollovati force-pushed the issues/25122-preserve-pnpm-workspace-formatting branch from ca86579 to 465ed29 Compare August 4, 2026 08:27
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
mcollovati force-pushed the issues/25122-preserve-pnpm-workspace-formatting branch from 465ed29 to 5a72cfb Compare August 4, 2026 08:47
@sonarqubecloud

sonarqubecloud Bot commented Aug 4, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Do not destroy existing pnpm-workspace.yml file

2 participants