8 Commits

Author SHA1 Message Date
1cb97cbf95 1.7.6
Some checks failed
Default (tags) / security (push) Failing after 0s
Default (tags) / test (push) Failing after 0s
Default (tags) / release (push) Has been skipped
Default (tags) / metadata (push) Has been skipped
2024-11-05 01:52:26 +01:00
f8ceff48b2 fix(tspublish): Fix the logging of the number of found publish modules 2024-11-05 01:52:26 +01:00
910cb4c8bf 1.7.5
Some checks failed
Default (tags) / security (push) Failing after 0s
Default (tags) / test (push) Failing after 0s
Default (tags) / release (push) Has been skipped
Default (tags) / metadata (push) Has been skipped
2024-11-05 00:51:08 +01:00
9bddf09aa7 fix(core): Fix issue with tspublish.json name validation in TsPublish class 2024-11-05 00:51:07 +01:00
4e8671a21d 1.7.4
Some checks failed
Default (tags) / security (push) Failing after 0s
Default (tags) / test (push) Failing after 0s
Default (tags) / release (push) Has been skipped
Default (tags) / metadata (push) Has been skipped
2024-11-05 00:47:16 +01:00
78c73ee713 fix(classes.tspublish): Refactor getModuleSubDirs method to streamline name validation for publish modules 2024-11-05 00:47:16 +01:00
5b768288c5 1.7.3
Some checks failed
Default (tags) / security (push) Failing after 0s
Default (tags) / test (push) Failing after 2s
Default (tags) / release (push) Has been skipped
Default (tags) / metadata (push) Has been skipped
2024-11-05 00:41:47 +01:00
023aea2494 fix(TsPublish): Add validation for tspublish.json name field 2024-11-05 00:41:46 +01:00
4 changed files with 34 additions and 3 deletions

View File

@ -1,5 +1,28 @@
# Changelog
## 2024-11-05 - 1.7.6 - fix(tspublish)
Fix the logging of the number of found publish modules
- Corrected the way the number of publish modules is logged by using Object.keys(publishModules).length instead of publishModules.length.
## 2024-11-05 - 1.7.5 - fix(core)
Fix issue with tspublish.json name validation in TsPublish class
- Resolved incorrect JSON parsing and validation for 'name' property in tspublish.json in the TsPublish.publish method.
- Removed redundant JSON parse from plugin.smartfile.fs.toStringSync in publish method.
## 2024-11-05 - 1.7.4 - fix(classes.tspublish)
Refactor getModuleSubDirs method to streamline name validation for publish modules
- Moved the check for the presence of the 'name' field in tspublish.json from getModuleSubDirs to the publish method.
- Added log warning and continue flow if 'name' is not found during the publish process.
## 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.

View File

@ -1,6 +1,6 @@
{
"name": "@git.zone/tspublish",
"version": "1.7.2",
"version": "1.7.6",
"private": false,
"description": "A tool to publish multiple, concise, and small packages from monorepos, specifically for TypeScript projects within a git environment.",
"main": "dist_ts/index.js",

View File

@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@git.zone/tspublish',
version: '1.7.2',
version: '1.7.6',
description: 'A tool to publish multiple, concise, and small packages from monorepos, specifically for TypeScript projects within a git environment.'
}

View File

@ -17,6 +17,11 @@ export class TsPublish {
);
}
for (const publishModule of Object.keys(publishModules)) {
// lets check wether there is a name
if (!publishModules[publishModule].name) {
logger.log('warn', `no name found in tspublish.json for ${publishModule}. Skipping...`);
continue;
}
const publishModuleInstance = new PublishModule({
monoRepoDir: monorepoDirArg,
packageSubFolder: publishModule,
@ -40,12 +45,15 @@ export class TsPublish {
if (!hasPublishJson) {
continue;
}
logger.log('info', `found publish module: ${subDir}`);
publishModules[subDir] = JSON.parse(
plugins.smartfile.fs.toStringSync(plugins.path.join(subDir, 'tspublish.json')),
);
}
logger.log('ok', `found ${publishModules.length} publish modules`);
logger.log('ok', `found ${Object.keys(publishModules).length} publish modules`);
logger.log('info', `Ordering publish modules...`);
return publishModules;
}
}