Commit Graph

137 Commits

Author SHA1 Message Date
094f9df55f fix(meta): no changes 2026-03-05 16:45:53 +00:00
a6a006aaec fix(compiler): move output directory cleaning to separate phase before compilation
Restructured compileGlob() into three distinct phases:
1. Resolve glob patterns and clean ALL output directories upfront
2. Compile all TypeScript tasks (no filesystem cleanup during this phase)
3. Unpack all outputs after all compilations complete

This prevents XFS metadata corruption from rm operations overlapping
with TypeScript compilation writes to sibling directories.
2026-03-05 16:45:07 +00:00
2b73f3d582 fix(compiler): yield to the event loop after TypeScript emit to allow pending microtasks and I/O to settle before reading or modifying the output directory 2026-03-05 16:03:49 +00:00
f8f20be4f4 fix(fshelpers): remove outdated comment about using synchronous rm to avoid XFS metadata corruption 2026-03-05 16:00:01 +00:00
79d48b0875 fix(compiler): defer unpacking until after all compilations and remove diagnostic filesystem syncs to avoid XFS metadata visibility issues 2026-03-05 15:55:42 +00:00
9dc74fd392 fix(compiler): force global filesystem sync to flush XFS delayed logging and add diagnostics comparing Node's readdirSync with system ls to detect directory entry inconsistencies 2026-03-05 15:35:57 +00:00
e8e64a4ef3 fix(compiler): use TypeScript sys hooks instead of fs monkeypatching to detect writes/deletes in previous output directories 2026-03-05 15:28:18 +00:00
dc9a9640df feat(mod_compiler): add diagnostic interception of fs operations to detect and report unexpected file system changes in previously compiled output directories during compilation 2026-03-05 15:22:04 +00:00
05184179a4 fix(compiler): fsync output directories after unpack to avoid XFS delayed logging causing corrupt or invisible directory entries during subsequent TypeScript emits 2026-03-05 15:17:58 +00:00
67d29a8e77 fix(mod_unpack): flush directory metadata on XFS before reading and use readdirSync-based iteration to avoid missing entries when unpacking 2026-03-05 15:13:36 +00:00
7a1c2d82b9 fix(mod_unpack): iterate directories with opendirSync/readSync to avoid missing entries on XFS and ensure directory handles are closed 2026-03-05 15:09:53 +00:00
4feb074c03 fix(mod_unpack): handle partial readdirSync results when moving nested directory entries and add diagnostic log 2026-03-05 15:01:36 +00:00
eaa66dff1d fix(mod_compiler): improve logging of successful output directories to include a sorted list of entries and use a shortened relative path 2026-03-05 14:54:47 +00:00
fba2cba8e8 fix(compiler): log emitted files written outside expected destination directory for diagnostics 2026-03-05 14:51:14 +00:00
7e8b5c4467 fix(mod_compiler): add diagnostic snapshots for output directories around clear and compile steps 2026-03-05 14:48:05 +00:00
d9c79ae4eb fix(mod_fs): use synchronous rm to avoid XFS metadata corruption when removing directories 2026-03-05 14:44:14 +00:00
d6fb6e527e fix(mod_compiler): add diagnostic logging of output directory states after compilation and after import-path rewriting to aid debugging 2026-03-05 14:40:05 +00:00
86f47ff743 fix(tsunpacker): use synchronous fs operations in tsunpacker to avoid readdir race conditions 2026-03-05 14:35:05 +00:00
25372bf97d fix(mod_unpack): handle partial readdir results from signal-interrupted getdents64 when unpacking to ensure sibling removal and nested moves complete 2026-03-05 14:30:33 +00:00
dd81d65958 fix(mod_unpack): flatten nested output directory without temporary rename steps to avoid race conditions 2026-03-05 14:26:29 +00:00
49d62e20a4 fix(fs): replace execSync and fsync workarounds with atomic async FsHelpers operations to avoid XFS races and shell dependencies 2026-03-05 14:01:00 +00:00
2fb838d1bd fix(mod_unpack): Use child_process.execSync (mv/rm) to perform unpack atomically, replacing async fs operations and logs to avoid ENOENT/partial directory listings on XFS 2026-03-05 13:43:18 +00:00
d3e3905e7f fix(mod_compiler): replace runtime require calls with top-level imports and use execSync/path.join for filesystem sync and traversal 2026-03-05 13:22:17 +00:00
920095d008 fix(mod_compiler): flush directory entries before unpack to avoid XFS delayed-log causing partial readdir results 2026-03-05 13:21:03 +00:00
01b2cfe69c fix(unpack): use atomic renames to flatten nested output and make unpacking more reliable 2026-03-05 13:15:07 +00:00
f136fe2e40 fix(fs): improve filesystem helpers: use sync rename for reliability on certain filesystems; retry rmdir with delays and avoid recursive rm; bump @push.rocks/smartfs to ^1.3.2 2026-03-05 12:46:49 +00:00
856099b5ed fix(unpack): catch unpack errors and add verbose unpack logging 2026-03-05 12:29:11 +00:00
c269039050 fix(fs/compiler/unpack): robustify directory removal and remove noisy diagnostic logging 2026-03-05 12:19:24 +00:00
cf05229b86 fix(mod_compiler): add diagnostic logging to report dist_ts and output directory contents after each compilation task and after import-path rewriting 2026-03-05 12:12:51 +00:00
52e1a25948 fix(diagnostics): add diagnostic logging around compilation and unpack to aid troubleshooting 2026-03-05 11:59:18 +00:00
9e839b3047 fix(deps): bump @git.zone/tspublish dependency to ^1.11.2 2026-03-05 10:24:37 +00:00
b2ce02a4fb fix(deps): bump dependencies: @push.rocks/smartcli, @push.rocks/smartlog, @git.zone/tstest, and @types/node to their newer versions 2026-03-04 22:34:06 +00:00
c8a1582ec4 fix(TsPathRewriter): auto-detect all ts_* folders in project for cross-module import rewriting
Previously only mapped folders from the current compilation glob patterns.
Now scans project directory for all ts_* folders to ensure imports like
'../ts_shared/' are rewritten to '../dist_ts_shared/' even when compiling
only the main ts/ folder.
2026-01-12 17:53:06 +00:00
4ccb7ea9d6 fix(TsPathRewriter): rewrite cross-module import paths after compilation
When compiling multiple ts_* source directories to dist_ts_* outputs,
imports like '../ts_shared/helper.js' now correctly become
'../dist_ts_shared/helper.js' in the compiled output.

Uses targeted regex patterns that only match import/export/require
statements, avoiding false positives in strings or comments.
2026-01-12 17:48:04 +00:00
f2980dc00f feat(docs): update README with improved docs and monorepo/tspublish guidance; namespace and extend npmextra.json with release registries; bump several dependencies 2026-01-04 19:03:25 +00:00
fb6bd614d3 fix(TsCompiler): Clear output directories before compilation to ensure clean builds and avoid stale files 2025-12-14 00:19:09 +00:00
e5fcbb9a09 BREAKING(structure): modernize internal structure and support unpacking 2025-12-13 22:59:58 +00:00
5bfe60927e fix(npmextra.json): update to new format 2025-12-13 11:44:03 +00:00
e40e8f6a77 fix(npmextra): Align npmextra.json package name with package.json (@git.zone/tsbuild) 2025-12-13 09:44:15 +00:00
27aa318054 fix(TsBuild): Set default TypeScript target to ESNext 2025-11-28 08:44:42 +00:00
ad227ded73 fix(compiler): Update default TypeScript target to ES2024 2025-11-27 23:04:13 +00:00
a3b58dda39 feat(tsbuild.classes): Update default TypeScript lib to lib.esnext.d.ts 2025-11-17 12:25:31 +00:00
09adbc1965 BREAKING CHANGE(TsBuild): Stop forcing emitDecoratorMetadata in protected compiler defaults 2025-11-17 11:57:32 +00:00
6b32dced5a fix(tsbuild.classes): Remove duplicate emitDecoratorMetadata from default compiler options and centralize it in protected defaults 2025-11-17 11:51:56 +00:00
a4863bc761 fix(compilerOptions): Remove experimentalDecorators and useDefineForClassFields from default TypeScript compiler options 2025-11-17 08:08:21 +00:00
8b50cd3090 fix(readme): Update documentation: expand README with usage, CLI and API examples; add readme.hints.md project memory 2025-11-02 06:13:34 +00:00
82ae8a0e4a feat(tsbuild): Add tsconfig.json support and safer compiler option merging; protect critical options; apply path and enum transforms; bump dependencies. 2025-11-02 05:31:55 +00:00
746ca8767a fix(tsbuild): Avoid process.exit in library, add confirmskiplibcheck flag, improve CLI exit handling and JSON/quiet modes, update test script 2025-08-29 17:14:58 +00:00
8e9fcb8135 fix(tspublish): Bump @git.zone/tspublish dependency to ^1.10.3 2025-08-18 02:19:15 +00:00
fa654b83e3 fix(dependencies): Update dependency @git.zone/tspublish to ^1.10.2 2025-08-18 00:32:26 +00:00