We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b2d3c76 commit 9dc216cCopy full SHA for 9dc216c
src/config.ts
@@ -30,18 +30,17 @@ const defaultConfig: IConfigOptions = {
30
export const isMonorepo = async (
31
config: IConfigOptions,
32
): Promise<IConfigOptions['monorepo']> => {
33
- let path = await findUp('pnpm-workspace.yaml', {
+ const path = await findUp('pnpm-workspace.yaml', {
34
cwd: config.cwd,
35
}) as string
36
37
- const is = !!path
+ const workspaceYaml = path ? parse(readFileSync(path, 'utf-8')) : { packages: [] }
38
39
- if (!is)
40
- path = ''
+ const is = !!workspaceYaml?.packages.length
41
42
return {
43
is,
44
- path,
+ path: path || '',
45
}
46
47
0 commit comments