@calmo/task-runner 1.1.0 → 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.
- package/.github/workflows/ci.yml +7 -0
- package/CHANGELOG.md +32 -0
- package/GEMINI.md +5 -1
- package/README.md +20 -0
- package/coverage/TaskRunner.ts.html +1 -1
- package/coverage/index.html +1 -1
- package/coverage/lcov-report/TaskRunner.ts.html +685 -0
- package/coverage/lcov-report/base.css +224 -0
- package/coverage/lcov-report/block-navigation.js +87 -0
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +116 -0
- package/coverage/lcov-report/prettify.css +1 -0
- package/coverage/lcov-report/prettify.js +2 -0
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +210 -0
- package/coverage/lcov.info +108 -0
- package/package.json +1 -1
- package/sonar-project.properties +22 -0
- package/test-report.xml +59 -0
package/.github/workflows/ci.yml
CHANGED
|
@@ -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,35 @@
|
|
|
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
|
+
|
|
1
33
|
## 1.1.0 (2026-01-18)
|
|
2
34
|
|
|
3
35
|
* Merge branch 'main' into feat/task-runner-observer-pattern-15088823676344229252 ([d38d6f8](https://github.com/thalesraymond/task-runner/commit/d38d6f8))
|
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.
|
|
@@ -670,7 +670,7 @@ export class TaskRunner<TContext> {
|
|
|
670
670
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
671
671
|
Code coverage generated by
|
|
672
672
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
673
|
-
at 2026-01-
|
|
673
|
+
at 2026-01-18T03:50:46.208Z
|
|
674
674
|
</div>
|
|
675
675
|
<script src="prettify.js"></script>
|
|
676
676
|
<script>
|
package/coverage/index.html
CHANGED
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
102
102
|
Code coverage generated by
|
|
103
103
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
104
|
-
at 2026-01-
|
|
104
|
+
at 2026-01-18T03:50:46.208Z
|
|
105
105
|
</div>
|
|
106
106
|
<script src="prettify.js"></script>
|
|
107
107
|
<script>
|