fix(mod_compiler): improve logging of successful output directories to include a sorted list of entries and use a shortened relative path

This commit is contained in:
2026-03-05 14:54:47 +00:00
parent 8bc4f173e5
commit eaa66dff1d
3 changed files with 10 additions and 2 deletions

View File

@@ -1,5 +1,12 @@
# Changelog # Changelog
## 2026-03-05 - 4.1.22 - fix(mod_compiler)
improve logging of successful output directories to include a sorted list of entries and use a shortened relative path
- Adds shortDir variable to display relative path instead of repeating inline replace(this.cwd + '/')
- Appends a sorted, comma-separated list of directory entries to the log output for easier inspection
- Change located in ts/mod_compiler/classes.tscompiler.ts
## 2026-03-05 - 4.1.21 - fix(compiler) ## 2026-03-05 - 4.1.21 - fix(compiler)
log emitted files written outside expected destination directory for diagnostics log emitted files written outside expected destination directory for diagnostics

View File

@@ -3,6 +3,6 @@
*/ */
export const commitinfo = { export const commitinfo = {
name: '@git.zone/tsbuild', name: '@git.zone/tsbuild',
version: '4.1.21', version: '4.1.22',
description: 'A tool for compiling TypeScript files using the latest nightly features, offering flexible APIs and a CLI for streamlined development.' description: 'A tool for compiling TypeScript files using the latest nightly features, offering flexible APIs and a CLI for streamlined development.'
} }

View File

@@ -345,7 +345,8 @@ export class TsCompiler {
try { try {
const entries = fs.readdirSync(prevDir); const entries = fs.readdirSync(prevDir);
const dirs = entries.filter(e => { try { return fs.statSync(prevDir + '/' + e).isDirectory(); } catch { return false; } }); const dirs = entries.filter(e => { try { return fs.statSync(prevDir + '/' + e).isDirectory(); } catch { return false; } });
console.log(` 📋 [${label}] ${prevDir.replace(this.cwd + '/', '')}: ${entries.length} entries, ${dirs.length} dirs`); const shortDir = prevDir.replace(this.cwd + '/', '');
console.log(` 📋 [${label}] ${shortDir}: ${entries.length} entries, ${dirs.length} dirs [${entries.sort().join(', ')}]`);
} catch { } catch {
console.log(` 📋 [${label}] ${prevDir.replace(this.cwd + '/', '')}: MISSING!`); console.log(` 📋 [${label}] ${prevDir.replace(this.cwd + '/', '')}: MISSING!`);
} }