fix(TsCompiler): Clear output directories before compilation to ensure clean builds and avoid stale files

This commit is contained in:
2025-12-14 00:19:09 +00:00
parent 0eaca1f3d1
commit fb6bd614d3
8 changed files with 285 additions and 555 deletions

View File

@@ -1,5 +1,14 @@
# Changelog
## 2025-12-14 - 4.0.2 - fix(TsCompiler)
Clear output directories before compilation to ensure clean builds and avoid stale files
- TsCompiler.compileGlob now clears the destination directory (if it exists) before compiling each glob pattern.
- Clearing is logged unless --quiet or --json flags are set (e.g. "🧹 Clearing output directory: <dest>").
- Uses FsHelpers.removeDirectory to remove previous output, preventing stale or duplicate emitted files.
- Documentation (readme.md) updated to advertise automatic output directory management / clean builds.
- Removed stale compiled test artifacts from test/assets/output to avoid interference with tests.
## 2025-12-13 - 3.1.3 - fix(npmextra)
Align npmextra.json package name with package.json (@git.zone/tsbuild)