fix: defensive package.json reading

Signed-off-by: Gabriel Dugny <gabriel.dugny@believe.com>
This commit is contained in:
Gabriel Dugny
2026-01-29 17:43:29 +01:00
parent a9d23c4a32
commit b2d9d78c27
7 changed files with 142 additions and 25 deletions
@@ -48,7 +48,7 @@ describe('PackageManager', () => {
'package.json': JSON.stringify({
name: 'foo',
workspaces: {
packages: [],
packages: ['packages/*'],
},
}),
});
@@ -59,7 +59,7 @@ describe('PackageManager', () => {
mockDir.setContent({
'package.json': JSON.stringify({
name: 'foo',
workspaces: [],
workspaces: ['packages/*'],
}),
});
await detectPackageManager();