Skip to content

Commit 2cadf69

Browse files
committed
build: throw an exception when a package is not found in monorepo
1 parent d204ac6 commit 2cadf69

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/packages.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,12 @@ export const packages: PackageMap =
185185
// Only build the entry if there's a package name.
186186
return packages;
187187
}
188+
if (!(name in monorepoPackages)) {
189+
throw new Error(
190+
`Package ${name} found in ${JSON.stringify(pkg.root)}, not found in .monorepo.json.`,
191+
);
192+
}
193+
188194
const bin: {[name: string]: string} = {};
189195
Object.keys(packageJson['bin'] || {}).forEach(binName => {
190196
let p = path.resolve(pkg.root, packageJson['bin'][binName]);

0 commit comments

Comments
 (0)