Skip to content

Commit c0f61dc

Browse files
committed
build: throw an exception when a package is not found in monorepo
1 parent 56a97c1 commit c0f61dc

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/packages.ts

+6
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,12 @@ export const packages: PackageMap =
190190
// Only build the entry if there's a package name.
191191
return packages;
192192
}
193+
if (!(name in monorepoPackages)) {
194+
throw new Error(
195+
`Package ${name} found in ${JSON.stringify(pkg.root)}, not found in .monorepo.json.`,
196+
);
197+
}
198+
193199
const bin: {[name: string]: string} = {};
194200
Object.keys(packageJson['bin'] || {}).forEach(binName => {
195201
let p = path.resolve(pkg.root, packageJson['bin'][binName]);

0 commit comments

Comments
 (0)