Compare commits

..

4 Commits

Author SHA1 Message Date
23b361f26a 1.10.2
Some checks failed
Default (tags) / security (push) Failing after 1s
Default (tags) / test (push) Failing after 1s
Default (tags) / release (push) Has been skipped
Default (tags) / metadata (push) Has been skipped
2024-10-27 02:13:12 +02:00
9f7d447bc7 fix(format): Add logging for tsconfig.json formatting 2024-10-27 02:13:12 +02:00
8904bf9427 1.10.1
Some checks failed
Default (tags) / security (push) Failing after 0s
Default (tags) / test (push) Failing after 1s
Default (tags) / release (push) Has been skipped
Default (tags) / metadata (push) Has been skipped
2024-10-27 02:09:04 +02:00
3c5a8282ab fix(format): Fixed async issue in tsconfig module lookup and corrected property access 2024-10-27 02:09:04 +02:00
4 changed files with 14 additions and 4 deletions

View File

@ -1,5 +1,14 @@
# Changelog # Changelog
## 2024-10-27 - 1.10.2 - fix(format)
Add logging for tsconfig.json formatting
- Added an info log message for tsconfig.json formatting in format.tsconfig.ts.
## 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) ## 2024-10-27 - 1.10.0 - feat(mod_format)
Add support for tsconfig.json formatting Add support for tsconfig.json formatting

View File

@ -1,7 +1,7 @@
{ {
"name": "@git.zone/cli", "name": "@git.zone/cli",
"private": false, "private": false,
"version": "1.10.0", "version": "1.10.2",
"description": "A CLI toolbelt to streamline local development cycles by using various gitzone utilities.", "description": "A CLI toolbelt to streamline local development cycles by using various gitzone utilities.",
"main": "dist_ts/index.ts", "main": "dist_ts/index.ts",
"typings": "dist_ts/index.d.ts", "typings": "dist_ts/index.d.ts",

View File

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

View File

@ -6,6 +6,7 @@ import { Project } from '../classes.project.js';
export const run = async (projectArg: Project) => { export const run = async (projectArg: Project) => {
// lets care about tsconfig.json // lets care about tsconfig.json
logger.log('info', 'Formatting tsconfig.json...');
const tsconfigSmartfile = await plugins.smartfile.SmartFile.fromFilePath(plugins.path.join(paths.cwd, 'tsconfig.json')); const tsconfigSmartfile = await plugins.smartfile.SmartFile.fromFilePath(plugins.path.join(paths.cwd, 'tsconfig.json'));
const tsconfigObject = JSON.parse(tsconfigSmartfile.contentBuffer.toString()); const tsconfigObject = JSON.parse(tsconfigSmartfile.contentBuffer.toString());
tsconfigObject.compilerOptions = tsconfigObject.compilerOptions || {}; tsconfigObject.compilerOptions = tsconfigObject.compilerOptions || {};
@ -13,10 +14,10 @@ export const run = async (projectArg: Project) => {
tsconfigObject.compilerOptions.paths = {}; tsconfigObject.compilerOptions.paths = {};
const tsPublishMod = await import('@git.zone/tspublish'); const tsPublishMod = await import('@git.zone/tspublish');
const tsPublishInstance = new tsPublishMod.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)) { for (const publishModule of Object.keys(publishModules)) {
const publishConfig = publishModules[publishModule]; 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)); tsconfigSmartfile.setContentsFromString(JSON.stringify(tsconfigObject, null, 2));
await tsconfigSmartfile.write(); await tsconfigSmartfile.write();