MCPcopy Create free account
hub / github.com/SBoudrias/Inquirer.js / readPnpmWorkspacePatterns

Function readPnpmWorkspacePatterns

tools/package/src/workspaces.ts:66–79  ·  view source on GitHub ↗
(cwd: string)

Source from the content-addressed store, hash-verified

64}
65
66async function readPnpmWorkspacePatterns(cwd: string) {
67 for (const filename of ['pnpm-workspace.yaml', 'pnpm-workspace.yml']) {
68 try {
69 const content = await fs.readFile(path.join(cwd, filename), 'utf8');
70 return pnpmWorkspacePatternsFrom(parseYaml(content));
71 } catch (error: unknown) {
72 if (errorCode(error) !== 'ENOENT') {
73 throw error;
74 }
75 }
76 }
77
78 return [];
79}
80
81export async function readWorkspaceProject(
82 cwd = process.cwd(),

Callers 1

readWorkspaceProjectFunction · 0.85

Calls 2

errorCodeFunction · 0.70

Tested by

no test coverage detected