fix: all pnpm-workspace.yaml settings are sorted by key (#9701)

This commit is contained in:
btea
2025-07-04 04:53:48 +08:00
committed by GitHub
parent ab155a5990
commit 95a9b82b0d
2 changed files with 7 additions and 1 deletions

View File

@@ -0,0 +1,6 @@
---
"@pnpm/workspace.manifest-writer": patch
"pnpm": patch
---
Sort keys in `pnpm-workspace.yaml` with deep [#9701](https://github.com/pnpm/pnpm/pull/9701).

View File

@@ -11,7 +11,7 @@ import { sortKeysByPriority } from '@pnpm/object.key-sorting'
async function writeManifestFile (dir: string, manifest: Partial<WorkspaceManifest>): Promise<void> {
manifest = sortKeysByPriority({
priority: { packages: 0 },
deep: false,
deep: true,
}, manifest)
return writeYamlFile(path.join(dir, WORKSPACE_MANIFEST_FILENAME), manifest, {
lineWidth: -1, // This is setting line width to never wrap