Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 10b8d47a55 | |||
| 52e1a25948 | |||
| 3b8ebd41f4 | |||
| 9e839b3047 |
13
changelog.md
13
changelog.md
@@ -1,5 +1,18 @@
|
||||
# Changelog
|
||||
|
||||
## 2026-03-05 - 4.1.5 - fix(diagnostics)
|
||||
add diagnostic logging around compilation and unpack to aid troubleshooting
|
||||
|
||||
- Enable TypeScript CompilerOptions.listEmittedFiles to surface emitted file info
|
||||
- Log destination directory contents and emitted file/error counts after compile and after unpack (only when not quiet and not json)
|
||||
- Add unpack-specific diagnostic logs: shouldUnpack skip, detectNesting result and nestedPath, and nested/destination directory listings before removing sibling directories
|
||||
- All logs use console.log and are wrapped in try/catch to avoid throwing; changes are informational and non-breaking
|
||||
|
||||
## 2026-03-05 - 4.1.4 - fix(deps)
|
||||
bump @git.zone/tspublish dependency to ^1.11.2
|
||||
|
||||
- Updated @git.zone/tspublish from ^1.11.0 to ^1.11.2 in package.json
|
||||
|
||||
## 2026-03-04 - 4.1.3 - fix(deps)
|
||||
bump dependencies: @push.rocks/smartcli, @push.rocks/smartlog, @git.zone/tstest, and @types/node to their newer versions
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@git.zone/tsbuild",
|
||||
"version": "4.1.3",
|
||||
"version": "4.1.5",
|
||||
"private": false,
|
||||
"description": "A tool for compiling TypeScript files using the latest nightly features, offering flexible APIs and a CLI for streamlined development.",
|
||||
"main": "dist_ts/index.js",
|
||||
@@ -36,7 +36,7 @@
|
||||
},
|
||||
"homepage": "https://code.foss.global/git.zone/tsbuild#README",
|
||||
"dependencies": {
|
||||
"@git.zone/tspublish": "^1.11.0",
|
||||
"@git.zone/tspublish": "^1.11.2",
|
||||
"@push.rocks/early": "^4.0.4",
|
||||
"@push.rocks/smartcli": "^4.0.20",
|
||||
"@push.rocks/smartdelay": "^3.0.5",
|
||||
|
||||
23
pnpm-lock.yaml
generated
23
pnpm-lock.yaml
generated
@@ -9,8 +9,8 @@ importers:
|
||||
.:
|
||||
dependencies:
|
||||
'@git.zone/tspublish':
|
||||
specifier: ^1.11.0
|
||||
version: 1.11.0
|
||||
specifier: ^1.11.2
|
||||
version: 1.11.2
|
||||
'@push.rocks/early':
|
||||
specifier: ^4.0.4
|
||||
version: 4.0.4
|
||||
@@ -627,8 +627,8 @@ packages:
|
||||
resolution: {integrity: sha512-itXX/oiJjrRHUlIGTHUEqSwPuGwsG4Cq8kh7aqFOm8mYzJwtXYE1gBqLJTWZma6gI5n+xAk5qTxTyfikuPgWQA==}
|
||||
hasBin: true
|
||||
|
||||
'@git.zone/tspublish@1.11.0':
|
||||
resolution: {integrity: sha512-dkgaDBTzZJ53lAV72r7OW/W7l/KqpkncFuPojr11JO35OKAbjjDhZbAwPv4oGX9NplyXrhC5VJRPNX/orqNTHA==}
|
||||
'@git.zone/tspublish@1.11.2':
|
||||
resolution: {integrity: sha512-BcGap1OzXDgXpfQXMh9W17r/CkWNhPsJ3WzjG2wrGE+ePUJCJAm9w6+J8G5WdZZcZKPqTB07cp707LbSiksc5A==}
|
||||
hasBin: true
|
||||
|
||||
'@git.zone/tsrun@2.0.1':
|
||||
@@ -1087,6 +1087,9 @@ packages:
|
||||
'@push.rocks/smartshell@3.3.6':
|
||||
resolution: {integrity: sha512-ZJ53P5gri5FYgI/iLdqfM/uePptkbhmTS7/sugMXEEFd46MVLGAwu/DAmpHpBs6vdHoXXH3wOhNpSZNi3YG7kA==}
|
||||
|
||||
'@push.rocks/smartshell@3.3.7':
|
||||
resolution: {integrity: sha512-b3st2+FjHUVhZZRlXfw93+SQA0UMVlURqe55uVpWdjJX7jeGXTTeszuYygtiR99zC5iZ8WZhGDct3N2L1qc/qw==}
|
||||
|
||||
'@push.rocks/smartsitemap@2.0.4':
|
||||
resolution: {integrity: sha512-76dYWG/o/EjV4vYCK7ZKM35T9xgrI+oHEiiIE6E2MDaFIU6QnSfciTfbscH5nc0vxx8Ah+I0HPEJO94BM2S39w==}
|
||||
|
||||
@@ -4887,7 +4890,7 @@ snapshots:
|
||||
- supports-color
|
||||
- vue
|
||||
|
||||
'@git.zone/tspublish@1.11.0':
|
||||
'@git.zone/tspublish@1.11.2':
|
||||
dependencies:
|
||||
'@push.rocks/consolecolor': 2.0.3
|
||||
'@push.rocks/npmextra': 5.3.3
|
||||
@@ -4899,7 +4902,7 @@ snapshots:
|
||||
'@push.rocks/smartnpm': 2.0.6
|
||||
'@push.rocks/smartpath': 6.0.0
|
||||
'@push.rocks/smartrequest': 5.0.1
|
||||
'@push.rocks/smartshell': 3.3.0
|
||||
'@push.rocks/smartshell': 3.3.7
|
||||
transitivePeerDependencies:
|
||||
- '@nuxt/kit'
|
||||
- aws-crt
|
||||
@@ -5948,6 +5951,14 @@ snapshots:
|
||||
tree-kill: 1.2.2
|
||||
which: 6.0.1
|
||||
|
||||
'@push.rocks/smartshell@3.3.7':
|
||||
dependencies:
|
||||
'@push.rocks/smartdelay': 3.0.5
|
||||
'@push.rocks/smartexit': 2.0.3
|
||||
'@push.rocks/smartpromise': 4.2.3
|
||||
'@types/which': 3.0.4
|
||||
which: 6.0.1
|
||||
|
||||
'@push.rocks/smartsitemap@2.0.4':
|
||||
dependencies:
|
||||
'@push.rocks/smartcache': 1.0.18
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@git.zone/tsbuild',
|
||||
version: '4.1.3',
|
||||
version: '4.1.5',
|
||||
description: 'A tool for compiling TypeScript files using the latest nightly features, offering flexible APIs and a CLI for streamlined development.'
|
||||
}
|
||||
|
||||
@@ -349,6 +349,7 @@ export class TsCompiler {
|
||||
const options: CompilerOptions = {
|
||||
...customOptions,
|
||||
outDir: destDir,
|
||||
listEmittedFiles: true,
|
||||
};
|
||||
|
||||
currentTask++;
|
||||
@@ -364,9 +365,33 @@ export class TsCompiler {
|
||||
emittedFiles.push(...result.emittedFiles);
|
||||
errorSummaries.push(result.errorSummary);
|
||||
|
||||
// DIAGNOSTIC: Log directory contents after compilation
|
||||
if (!isQuiet && !isJson) {
|
||||
try {
|
||||
const fs = await import('fs');
|
||||
const dirEntries = fs.readdirSync(destDir, { withFileTypes: true });
|
||||
const dirs = dirEntries.filter((e: any) => e.isDirectory()).map((e: any) => e.name).sort();
|
||||
const fileCount = dirEntries.filter((e: any) => e.isFile()).length;
|
||||
console.log(` 📋 [DIAG] After emit: ${dirs.length} dirs [${dirs.join(', ')}], ${fileCount} top-level files`);
|
||||
console.log(` 📋 [DIAG] emittedFiles.length=${result.emittedFiles.length}, totalErrors=${result.errorSummary.totalErrors}`);
|
||||
} catch (e: any) { console.log(` 📋 [DIAG] Error reading destDir: ${e.message}`); }
|
||||
}
|
||||
|
||||
// Perform unpack if compilation succeeded
|
||||
if (result.errorSummary.totalErrors === 0) {
|
||||
await performUnpack(pattern, destDir, this.cwd);
|
||||
|
||||
// DIAGNOSTIC: Log directory contents after unpack
|
||||
if (!isQuiet && !isJson) {
|
||||
try {
|
||||
const fs = await import('fs');
|
||||
const dirEntries = fs.readdirSync(destDir, { withFileTypes: true });
|
||||
const dirs = dirEntries.filter((e: any) => e.isDirectory()).map((e: any) => e.name).sort();
|
||||
const fileCount = dirEntries.filter((e: any) => e.isFile()).length;
|
||||
console.log(` 📋 [DIAG] After unpack: ${dirs.length} dirs [${dirs.join(', ')}], ${fileCount} top-level files`);
|
||||
} catch (e: any) { console.log(` 📋 [DIAG] Error reading destDir after unpack: ${e.message}`); }
|
||||
}
|
||||
|
||||
successfulOutputDirs.push(destDir);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -87,16 +87,30 @@ export class TsUnpacker {
|
||||
public async unpack(): Promise<boolean> {
|
||||
// Check if we should unpack based on config
|
||||
if (!(await this.shouldUnpack())) {
|
||||
console.log(` 📋 [DIAG-UNPACK] Skipping unpack: shouldUnpack=false`);
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check if nested structure exists
|
||||
if (!(await this.detectNesting())) {
|
||||
const hasNesting = await this.detectNesting();
|
||||
console.log(` 📋 [DIAG-UNPACK] detectNesting=${hasNesting}, nestedPath=${this.getNestedPath()}`);
|
||||
if (!hasNesting) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const nestedPath = this.getNestedPath();
|
||||
|
||||
// DIAGNOSTIC: Log contents before unpack
|
||||
try {
|
||||
const destEntries = fs.readdirSync(this.destDir, { withFileTypes: true });
|
||||
const destDirs = destEntries.filter(e => e.isDirectory()).map(e => e.name).sort();
|
||||
console.log(` 📋 [DIAG-UNPACK] Before removeSibling: destDir dirs=[${destDirs.join(', ')}]`);
|
||||
const nestedEntries = fs.readdirSync(nestedPath, { withFileTypes: true });
|
||||
const nestedDirs = nestedEntries.filter(e => e.isDirectory()).map(e => e.name).sort();
|
||||
const nestedFiles = nestedEntries.filter(e => e.isFile()).length;
|
||||
console.log(` 📋 [DIAG-UNPACK] Nested dir (${this.sourceFolderName}/): ${nestedDirs.length} dirs [${nestedDirs.join(', ')}], ${nestedFiles} files`);
|
||||
} catch (e: any) { console.log(` 📋 [DIAG-UNPACK] Error reading: ${e.message}`); }
|
||||
|
||||
// Delete sibling folders (not the source folder)
|
||||
await this.removeSiblingDirectories();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user