BREAKING CHANGE(taskbuffer): Change default Task error handling: trigger() now rejects when taskFunction throws; add catchErrors option (default false) to preserve previous swallow behavior; track errors (lastError, errorCount) and expose them in metadata; improve error propagation and logging across runners, chains, parallels and debounced tasks; add tests and documentation for new behavior.

This commit is contained in:
2026-01-25 23:29:00 +00:00
parent 905ca97b6a
commit 248383aab1
16 changed files with 575 additions and 63 deletions

View File

@@ -1,5 +1,16 @@
# Changelog
## 2026-01-25 - 4.0.0 - BREAKING CHANGE(taskbuffer)
Change default Task error handling: trigger() now rejects when taskFunction throws; add catchErrors option (default false) to preserve previous swallow behavior; track errors (lastError, errorCount) and expose them in metadata; improve error propagation and logging across runners, chains, parallels and debounced tasks; add tests and documentation for new behavior.
- Introduce catchErrors option on Task (default: false) — previously errors were swallowed by default
- Tasks now set lastError and increment errorCount when failures occur; clearError() added to reset error state
- getMetadata() now reports status 'failed' and includes lastError and errorCount
- Task.run flow updated to reset error state at start, log errors, and either swallow or rethrow based on catchErrors
- BufferRunner, TaskRunner, Taskchain, Taskparallel, TaskDebounced and TaskManager updated to handle errors, avoid hanging promises, and use logger instead of console
- Added comprehensive tests (test/test.11.errorhandling.ts) and readme hints documenting the new error-handling behavior (v3.6.0+)
- npmextra.json updated for @git.zone/cli and release registries
## 2025-12-04 - 3.5.0 - feat(core)
Add debounced tasks and step-based progress tracking; upgrade deps and improve dashboard and scheduling