Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
4e8671a21d | |||
78c73ee713 | |||
5b768288c5 | |||
023aea2494 |
12
changelog.md
12
changelog.md
@ -1,5 +1,17 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 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)
|
## 2024-11-05 - 1.7.2 - fix(project)
|
||||||
Fixed minor formatting issues and improved code consistency.
|
Fixed minor formatting issues and improved code consistency.
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@git.zone/tspublish",
|
"name": "@git.zone/tspublish",
|
||||||
"version": "1.7.2",
|
"version": "1.7.4",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "A tool to publish multiple, concise, and small packages from monorepos, specifically for TypeScript projects within a git environment.",
|
"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",
|
"main": "dist_ts/index.js",
|
||||||
|
@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@git.zone/tspublish',
|
name: '@git.zone/tspublish',
|
||||||
version: '1.7.2',
|
version: '1.7.4',
|
||||||
description: 'A tool to publish multiple, concise, and small packages from monorepos, specifically for TypeScript projects within a git environment.'
|
description: 'A tool to publish multiple, concise, and small packages from monorepos, specifically for TypeScript projects within a git environment.'
|
||||||
}
|
}
|
||||||
|
@ -17,6 +17,14 @@ export class TsPublish {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
for (const publishModule of Object.keys(publishModules)) {
|
for (const publishModule of Object.keys(publishModules)) {
|
||||||
|
// lets check wether there is a name
|
||||||
|
const tspublishJson = JSON.parse(
|
||||||
|
plugins.smartfile.fs.toStringSync(plugins.path.join(publishModule, 'tspublish.json')),
|
||||||
|
);
|
||||||
|
if (!tspublishJson.name) {
|
||||||
|
logger.log('warn', `no name found in tspublish.json for ${publishModule}. Skipping...`);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
const publishModuleInstance = new PublishModule({
|
const publishModuleInstance = new PublishModule({
|
||||||
monoRepoDir: monorepoDirArg,
|
monoRepoDir: monorepoDirArg,
|
||||||
packageSubFolder: publishModule,
|
packageSubFolder: publishModule,
|
||||||
@ -40,12 +48,15 @@ export class TsPublish {
|
|||||||
if (!hasPublishJson) {
|
if (!hasPublishJson) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.log('info', `found publish module: ${subDir}`);
|
logger.log('info', `found publish module: ${subDir}`);
|
||||||
publishModules[subDir] = JSON.parse(
|
publishModules[subDir] = JSON.parse(
|
||||||
plugins.smartfile.fs.toStringSync(plugins.path.join(subDir, 'tspublish.json')),
|
plugins.smartfile.fs.toStringSync(plugins.path.join(subDir, 'tspublish.json')),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
logger.log('ok', `found ${publishModules.length} publish modules`);
|
logger.log('ok', `found ${publishModules.length} publish modules`);
|
||||||
|
logger.log('info', `Ordering publish modules...`);
|
||||||
|
|
||||||
return publishModules;
|
return publishModules;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user