fix(format): Fixed async issue in tsconfig module lookup and corrected property access

This commit is contained in:
Philipp Kunz 2024-10-27 02:09:04 +02:00
parent 4f0fb26a15
commit 3c5a8282ab
3 changed files with 7 additions and 3 deletions

View File

@ -1,5 +1,9 @@
# Changelog
## 2024-10-27 - 1.10.1 - fix(format)
Fixed async issue in tsconfig module lookup and corrected property access
## 2024-10-27 - 1.10.0 - feat(mod_format)
Add support for tsconfig.json formatting

View File

@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@git.zone/cli',
version: '1.10.0',
version: '1.10.1',
description: 'A CLI toolbelt to streamline local development cycles by using various gitzone utilities.'
}

View File

@ -13,10 +13,10 @@ export const run = async (projectArg: Project) => {
tsconfigObject.compilerOptions.paths = {};
const tsPublishMod = await import('@git.zone/tspublish');
const tsPublishInstance = new tsPublishMod.TsPublish();
const publishModules = tsPublishInstance.getModuleSubDirs(paths.cwd);
const publishModules = await tsPublishInstance.getModuleSubDirs(paths.cwd);
for (const publishModule of Object.keys(publishModules)) {
const publishConfig = publishModules[publishModule];
tsconfigObject.compilerOptions.paths[`${publishConfig.moduleName}`] = [`./${publishModule}/index.ts`];
tsconfigObject.compilerOptions.paths[`${publishConfig.name}`] = [`./${publishModule}/index.ts`];
}
tsconfigSmartfile.setContentsFromString(JSON.stringify(tsconfigObject, null, 2));
await tsconfigSmartfile.write();