fix(TsPublish): Add validation for tspublish.json name field
This commit is contained in:
@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@git.zone/tspublish',
|
||||
version: '1.7.2',
|
||||
version: '1.7.3',
|
||||
description: 'A tool to publish multiple, concise, and small packages from monorepos, specifically for TypeScript projects within a git environment.'
|
||||
}
|
||||
|
@ -40,6 +40,16 @@ export class TsPublish {
|
||||
if (!hasPublishJson) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// lets check wether there is a name
|
||||
const tspublishJson = JSON.parse(
|
||||
plugins.smartfile.fs.toStringSync(plugins.path.join(subDir, 'tspublish.json')),
|
||||
);
|
||||
if (!tspublishJson.name) {
|
||||
logger.log('warn', `no name found in tspublish.json for ${subDir}`);
|
||||
continue;
|
||||
}
|
||||
|
||||
logger.log('info', `found publish module: ${subDir}`);
|
||||
publishModules[subDir] = JSON.parse(
|
||||
plugins.smartfile.fs.toStringSync(plugins.path.join(subDir, 'tspublish.json')),
|
||||
|
Reference in New Issue
Block a user