Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Will fail if pnpm-workspace.yaml is empty #83

Open
segevfiner opened this issue May 15, 2024 · 2 comments
Open

Will fail if pnpm-workspace.yaml is empty #83

segevfiner opened this issue May 15, 2024 · 2 comments

Comments

@segevfiner
Copy link

pnpm defaults to auto-detection if pnpm-workspace.yaml is empty, isolate package will fail with:

Cannot destructure property 'packages' of 'readTypedYamlSync(...)' as it is null.

In that case as it tries to destructure packages from it at:

const { packages: globs } = readTypedYamlSync<{ packages: string[] }>(

@0x80
Copy link
Owner

0x80 commented May 15, 2024

I didn't know there was an auto-detect feature in pnpm. Is there a clear advantage over defining your workspace package in the file? Is it essential for some use-cases?

I will fix the bug by detecting the empty file and throw an error. Maybe it will support auto-detect later, but until then defining the workspace would be a requirement.

@segevfiner
Copy link
Author

It's basically like setting it to ** it just uses all folder that have a package.json, simpler to config unless you have any false positive, might be slightly slower.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants