fix: update WorkspaceManifest packages field to be non-null (#8205)

This commit is contained in:
Brandon Cheng
2024-06-13 20:54:43 -04:00
committed by GitHub
parent d8eab39686
commit 5d1ed94e6c
2 changed files with 6 additions and 1 deletions

View File

@@ -0,0 +1,5 @@
---
"@pnpm/workspace.read-manifest": minor
---
The type definition for the `packages` field of the `WorkspaceManifest` is now non-null. The `readWorkspaceManifest` function expects this field to be present and throws an error otherwise.

View File

@@ -5,7 +5,7 @@ import path from 'node:path'
import readYamlFile from 'read-yaml-file'
export interface WorkspaceManifest {
packages?: string[]
packages: string[]
}
export async function readWorkspaceManifest (dir: string): Promise<WorkspaceManifest | undefined> {