feat(find-workspace-packages): accept cached workspaceManifest option#8120
feat(find-workspace-packages): accept cached workspaceManifest option#8120
Conversation
|
Since this is adding new optional behavior, I think it can merge into pnpm's |
5a26cf1 to
d7ed03c
Compare
This sounds good to me. I guess you could put |
Going with this approach in #8213. Since the |
Context
This is a change for #8020 (comment). My full plan is:
pnpm-workspace.yamlin@pnpm/configas suggested hereworkspaceManifesttofind-workspace-packagesas an optional argument.This PR allows 2 to be done in a follow-up PR:
@pnpm/configgluxon/pnpm#6Changes
This PR adds a new
workspaceManifestoption. A test was added, but this new option is not yet used by other parts of pnpm.Alternative
Alternatively we could "break" the
find-workspace-packagesutilities and force users of the@pnpm/workspace.find-packagesto supplypnpm-workspace.yaml's contents.One API change we could make is:
export async function findWorkspacePackages ( workspaceRoot: string, + patterns: string[] | WorkspaceManifest | undefined, opts?: FindWorkspacePackagesOptions ): Promise<Project[]>;Or alternatively the
WorkspaceManifestwouldn't be passed at all. Users of@pnpm/workspace.find-packageswould passworkspaceManifest.packagesas thepatternsargument.export async function findWorkspacePackages ( workspaceRoot: string, + patterns: string[], opts?: FindWorkspacePackagesOptions ): Promise<Project[]>;Let me know if either of these alternatives are preferred.