fix(TsPublish): Add validation for tspublish.json name field
This commit is contained in:
parent
ac839d5419
commit
023aea2494
@ -1,5 +1,11 @@
|
||||
# Changelog
|
||||
|
||||
## 2024-11-05 - 1.7.3 - fix(TsPublish)
|
||||
Add validation for tspublish.json name field
|
||||
|
||||
- Ensure that the tspublish.json file contains a valid name field before processing.
|
||||
- Log a warning message if the name is not found in tspublish.json.
|
||||
|
||||
## 2024-11-05 - 1.7.2 - fix(project)
|
||||
Fixed minor formatting issues and improved code consistency.
|
||||
|
||||
|
@ -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')),
|
||||
|
Loading…
Reference in New Issue
Block a user