builderman 1.5.0 → 1.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -232,20 +232,10 @@ function executeRegularTask(task, taskId, taskName, context, callbacks) {
232
232
  }
233
233
  config?.onTaskBegin?.(taskName);
234
234
  let didMarkReady = false;
235
- if (!readyWhen) {
236
- // For tasks without readyWhen, mark as ready after a microtask
237
- // This ensures the task has actually started before we update dependents
238
- // This prevents race conditions where a task fails immediately after starting
239
- setImmediate(() => {
240
- // Check if task hasn't failed before marking as ready
241
- const currentStats = context.taskStats.get(taskId);
242
- if (currentStats?.status !== "failed" && !context.isAborted()) {
243
- callbacks.onTaskReady(taskId);
244
- didMarkReady = true;
245
- }
246
- });
247
- }
248
- else if (readyTimeout !== Infinity) {
235
+ // For tasks without readyWhen, we wait for the process to exit successfully
236
+ // before allowing dependent tasks to start. This ensures dependencies are
237
+ // fully completed before dependents begin execution.
238
+ if (readyWhen && readyTimeout !== Infinity) {
249
239
  // Set up timeout for readyWhen condition using TimeoutManager
250
240
  timeoutManager.setReadyTimeout(taskId, readyTimeout, () => {
251
241
  if (!didMarkReady) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "builderman",
3
- "version": "1.5.0",
3
+ "version": "1.5.1",
4
4
  "description": "Simple task runner for building and developing projects.",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",