Skip to content

Commit f3a24d2

Browse files
committed
build: check that packages have a version
1 parent 668a046 commit f3a24d2

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
@@ -12,6 +12,7 @@ import * as path from 'path';
1212

1313
const packageRoot = path.join(__dirname, '../packages');
1414
const distRoot = path.join(__dirname, '../dist');
15+
const versions = require('../versions.json');
1516

1617

1718
export interface PackageInfo {
@@ -51,6 +52,11 @@ export const packages: PackageMap =
5152
bin[binName] = path.resolve(pkg.root, pkgJson['bin'][binName]);
5253
});
5354

55+
if (!(name in versions)) {
56+
console.error(`ERROR: package ${name} does not have a version.`);
57+
process.exit(101);
58+
}
59+
5460
packages[name] = {
5561
build: path.join(distRoot, pkgRoot.substr(path.dirname(__dirname).length)),
5662
dist: path.join(distRoot, name),

0 commit comments

Comments
 (0)