@calmo/task-runner 1.0.1 → 1.1.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.
@@ -13,6 +13,8 @@ jobs:
13
13
  steps:
14
14
  - name: Checkout repository
15
15
  uses: actions/checkout@v6
16
+ with:
17
+ fetch-depth: 0
16
18
 
17
19
  - name: Install pnpm
18
20
  uses: pnpm/action-setup@v4
@@ -37,6 +39,11 @@ jobs:
37
39
  - name: Test
38
40
  run: pnpm test
39
41
 
42
+ - name: SonarQube Scan
43
+ uses: SonarSource/sonarqube-scan-action@v6
44
+ env:
45
+ SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
46
+
40
47
  - name: Upload coverage reports to Codecov
41
48
  uses: codecov/codecov-action@v5
42
49
  with:
package/CHANGELOG.md CHANGED
@@ -1,3 +1,49 @@
1
+ ## <small>1.1.1 (2026-01-18)</small>
2
+
3
+ * Merge branch 'main' into chore/configure-sonar-quality-gate-6593988281334866666 ([fe5c88d](https://github.com/thalesraymond/task-runner/commit/fe5c88d))
4
+ * Merge pull request #23 from thalesraymond/004-pre-execution-validation ([bf641c5](https://github.com/thalesraymond/task-runner/commit/bf641c5)), closes [#23](https://github.com/thalesraymond/task-runner/issues/23)
5
+ * Merge pull request #26 from thalesraymond/002-task-cancellation ([30fafaa](https://github.com/thalesraymond/task-runner/commit/30fafaa)), closes [#26](https://github.com/thalesraymond/task-runner/issues/26)
6
+ * Merge pull request #28 from thalesraymond/chore/configure-sonar-quality-gate-6593988281334866666 ([0b7373f](https://github.com/thalesraymond/task-runner/commit/0b7373f)), closes [#28](https://github.com/thalesraymond/task-runner/issues/28)
7
+ * Merge pull request #29 from thalesraymond/update-docs-and-constitution-15453351708375382519 ([84b6293](https://github.com/thalesraymond/task-runner/commit/84b6293)), closes [#29](https://github.com/thalesraymond/task-runner/issues/29)
8
+ * Update GEMINI.md ([64c5660](https://github.com/thalesraymond/task-runner/commit/64c5660))
9
+ * Update GEMINI.md ([e28abbd](https://github.com/thalesraymond/task-runner/commit/e28abbd))
10
+ * Update specs/002-task-cancellation/quickstart.md ([c52ca0d](https://github.com/thalesraymond/task-runner/commit/c52ca0d))
11
+ * Update specs/002-task-cancellation/quickstart.md ([153981a](https://github.com/thalesraymond/task-runner/commit/153981a))
12
+ * Update specs/004-pre-execution-validation/checklists/requirements.md ([e1cd90f](https://github.com/thalesraymond/task-runner/commit/e1cd90f))
13
+ * Update specs/004-pre-execution-validation/checklists/requirements.md ([03869b8](https://github.com/thalesraymond/task-runner/commit/03869b8))
14
+ * Update specs/004-pre-execution-validation/contracts/api.ts ([b217a10](https://github.com/thalesraymond/task-runner/commit/b217a10))
15
+ * Update specs/004-pre-execution-validation/contracts/api.ts ([503309e](https://github.com/thalesraymond/task-runner/commit/503309e))
16
+ * Update specs/004-pre-execution-validation/contracts/api.ts ([6394f0d](https://github.com/thalesraymond/task-runner/commit/6394f0d))
17
+ * Update specs/004-pre-execution-validation/quickstart.md ([4756fbc](https://github.com/thalesraymond/task-runner/commit/4756fbc))
18
+ * Update specs/004-pre-execution-validation/quickstart.md ([9233e8c](https://github.com/thalesraymond/task-runner/commit/9233e8c))
19
+ * Update specs/004-pre-execution-validation/quickstart.md ([1d639d2](https://github.com/thalesraymond/task-runner/commit/1d639d2))
20
+ * Update specs/004-pre-execution-validation/spec.md ([74875de](https://github.com/thalesraymond/task-runner/commit/74875de))
21
+ * Update specs/004-pre-execution-validation/tasks.md ([93ee4a7](https://github.com/thalesraymond/task-runner/commit/93ee4a7))
22
+ * fix: address PR comments on sonar config ([6eab0b5](https://github.com/thalesraymond/task-runner/commit/6eab0b5))
23
+ * fix: address PR comments on sonar config ([156eea0](https://github.com/thalesraymond/task-runner/commit/156eea0))
24
+ * docs: ✏️ fix gemini code review discussion ([a788e47](https://github.com/thalesraymond/task-runner/commit/a788e47))
25
+ * docs: ✏️ fix gemini inconsistent pointed by gemini ([ddc39b7](https://github.com/thalesraymond/task-runner/commit/ddc39b7))
26
+ * docs: ✏️ fix inconsistences pointed in CR ([95acba7](https://github.com/thalesraymond/task-runner/commit/95acba7))
27
+ * docs: ✏️ signal abort spec ([57f1cbf](https://github.com/thalesraymond/task-runner/commit/57f1cbf))
28
+ * docs: ✏️ spec for abort signal ([90340b8](https://github.com/thalesraymond/task-runner/commit/90340b8))
29
+ * docs: ✏️ specs for tree pre validation ([e13f056](https://github.com/thalesraymond/task-runner/commit/e13f056))
30
+ * docs: update constitution and README with latest features ([7b601fc](https://github.com/thalesraymond/task-runner/commit/7b601fc))
31
+ * chore: configure SonarCloud quality gate and coverage ([e08912b](https://github.com/thalesraymond/task-runner/commit/e08912b))
32
+
33
+ ## 1.1.0 (2026-01-18)
34
+
35
+ * Merge branch 'main' into feat/task-runner-observer-pattern-15088823676344229252 ([d38d6f8](https://github.com/thalesraymond/task-runner/commit/d38d6f8))
36
+ * Merge branch 'main' into feat/task-runner-observer-pattern-15088823676344229252 ([2638801](https://github.com/thalesraymond/task-runner/commit/2638801))
37
+ * Merge pull request #22 from thalesraymond/feat/task-runner-observer-pattern-15088823676344229252 ([06e0049](https://github.com/thalesraymond/task-runner/commit/06e0049)), closes [#22](https://github.com/thalesraymond/task-runner/issues/22)
38
+ * fix: add file extensions and types to test file to fix CI errors ([54b186f](https://github.com/thalesraymond/task-runner/commit/54b186f))
39
+ * fix: remove any type usage in TaskRunner to satisfy linter ([b0a21a7](https://github.com/thalesraymond/task-runner/commit/b0a21a7))
40
+ * fix: revert unauthorized changes to package.json and tsconfig.test.json ([cd44f9e](https://github.com/thalesraymond/task-runner/commit/cd44f9e))
41
+ * test: 💍 force 100% coverage ([2e489f0](https://github.com/thalesraymond/task-runner/commit/2e489f0))
42
+ * test: increase coverage to 100% ([5cd1a44](https://github.com/thalesraymond/task-runner/commit/5cd1a44))
43
+ * feat: implement Observer Pattern event system in TaskRunner ([d682983](https://github.com/thalesraymond/task-runner/commit/d682983))
44
+ * feat: implement Observer Pattern event system in TaskRunner ([48bd3d0](https://github.com/thalesraymond/task-runner/commit/48bd3d0))
45
+ * chore: add typescript check for tests ([9b6c5d4](https://github.com/thalesraymond/task-runner/commit/9b6c5d4))
46
+
1
47
  ## <small>1.0.1 (2026-01-17)</small>
2
48
 
3
49
  * fix: 🐛 fixing commit script and adding a fix to test auto relea ([97cedf4](https://github.com/thalesraymond/task-runner/commit/97cedf4))
package/GEMINI.md CHANGED
@@ -3,6 +3,9 @@
3
3
  Auto-generated from all feature plans. Last updated: 2026-01-17
4
4
 
5
5
  ## Active Technologies
6
+ - TypeScript 5.9.3 + vitest 4.0.17 (for testing) (004-pre-execution-validation)
7
+ - TypeScript 5.9.3 + vitest 4.0.17, AbortSignal/AbortController (standard Web APIs) (002-task-cancellation)
8
+ - N/A (in-memory context object) (002-task-cancellation)
6
9
 
7
10
  - TypeScript 5.9.3 + vitest 4.0.17 (003-refactor-file-structure)
8
11
 
@@ -24,10 +27,11 @@ tests/
24
27
  : Follow standard conventions
25
28
 
26
29
  ## Recent Changes
30
+ - 002-task-cancellation: Added TypeScript 5.9.3 + vitest 4.0.17, AbortSignal/AbortController (standard Web APIs)
31
+ - 004-pre-execution-validation: Added TypeScript 5.9.3 + vitest 4.0.17 (for testing)
27
32
 
28
33
  - 003-refactor-file-structure: Added TypeScript 5.9.3 + vitest 4.0.17
29
34
 
30
- - 001-generic-task-runner: Added
31
35
 
32
36
  <!-- MANUAL ADDITIONS START -->
33
37
  <!-- MANUAL ADDITIONS END -->
package/README.md CHANGED
@@ -9,6 +9,22 @@ A lightweight, type-safe, and domain-agnostic task orchestration engine. It reso
9
9
  - **Parallel Execution**: Automatically identifies and runs independent steps concurrently.
10
10
  - **Dependency Management**: Enforces execution order based on dependencies.
11
11
  - **Error Handling & Skipping**: robustly handles failures and automatically skips dependent steps.
12
+ - **Event System**: Subscribe to lifecycle events (`workflowStart`, `taskStart`, `taskEnd`, etc.) for logging or monitoring.
13
+ - **Runtime Validation**: Automatically detects circular dependencies and missing dependencies before execution loops.
14
+
15
+ ## Event System
16
+
17
+ The `TaskRunner` implements an Observer Pattern, allowing you to subscribe to various lifecycle events.
18
+
19
+ ```typescript
20
+ runner.on("taskStart", ({ step }) => {
21
+ console.log(`Starting step: ${step.name}`);
22
+ });
23
+
24
+ runner.on("taskEnd", ({ step, result }) => {
25
+ console.log(`Step ${step.name} finished with status: ${result.status}`);
26
+ });
27
+ ```
12
28
 
13
29
  ## Usage Example
14
30
 
@@ -77,6 +93,10 @@ async function main() {
77
93
  main();
78
94
  ```
79
95
 
96
+ ## Skip Propagation
97
+
98
+ If a task fails or is skipped, the `TaskRunner` automatically marks all subsequent tasks that depend on it as `skipped`. This ensures that your pipeline doesn't attempt to run steps with missing prerequisites, saving resources and preventing cascading errors.
99
+
80
100
  ## Context Hydration
81
101
 
82
102
  One nice thing to do is to avoid optional parameters and excessive use of ```!``` operator, with task dependencies we can chain our steps and context usages to make sure steps are executed only when pre requisites are met.