@visulima/task-runner 1.0.0-alpha.2 → 1.0.0-alpha.20
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/CHANGELOG.md +310 -0
- package/README.md +198 -52
- package/dist/index.d.ts +3795 -34
- package/dist/index.js +1 -20
- package/dist/packem_chunks/index.js +31 -0
- package/dist/packem_shared/Cache-C8FfeXpg.js +2 -0
- package/dist/packem_shared/CompositeLifeCycle-C6aee9GK.js +1 -0
- package/dist/packem_shared/FileAccessTracker-DBz_w4wl.js +50 -0
- package/dist/packem_shared/FingerprintManager-CYW2EwLc.js +2 -0
- package/dist/packem_shared/HttpRemoteCache-CpPl6lzE.js +1 -0
- package/dist/packem_shared/INPUT_URI_SCHEMES-Csrd0tlg.js +1 -0
- package/dist/packem_shared/IncrementalFileHasher-B-V3i2x-.js +1 -0
- package/dist/packem_shared/LogReporter-3R3oWj-Q.js +13 -0
- package/dist/packem_shared/ReapiRemoteCache-BXJip5wH.js +251 -0
- package/dist/packem_shared/TaskOrchestrator-CYj5MLwz.js +6 -0
- package/dist/packem_shared/TerminalBuffer-BtZy7TpT.js +3 -0
- package/dist/packem_shared/TrackedTaskExecutor-CtYLL3vS.js +1 -0
- package/dist/packem_shared/V2_ROOT-injxWBrl.js +1 -0
- package/dist/packem_shared/actionDigestForTaskHash-BOL4fZ9v.js +1 -0
- package/dist/packem_shared/archive-CDfGy5Lm.js +1 -0
- package/dist/packem_shared/buildForwardDependencyMap-DudUDFze.js +3 -0
- package/dist/packem_shared/collectFiles-W4bnBRpb.js +1 -0
- package/dist/packem_shared/collectNodeModulesBinDirs-CD-eDrtO.js +1 -0
- package/dist/packem_shared/computeTaskHash-CaPdG1BA.js +1 -0
- package/dist/packem_shared/containsBlob-DAU8R7GH.js +1 -0
- package/dist/packem_shared/createInputHandler-CkDCpPYy.js +1 -0
- package/dist/packem_shared/createTaskGraph-D8Jn_Dn9.js +1 -0
- package/dist/packem_shared/defaultTaskRunner-DMHpavzm.js +2 -0
- package/dist/packem_shared/detectFrameworks-WVZJOPgN.js +1 -0
- package/dist/packem_shared/detectScriptShell-CaTDk5cW.js +1 -0
- package/dist/packem_shared/digestBuffer-g11aCaDx.js +1 -0
- package/dist/packem_shared/enforceProjectConstraints-dNc1SwRi.js +1 -0
- package/dist/packem_shared/expandArguments-D7qvc6Rp.js +1 -0
- package/dist/packem_shared/expandShortcut-BErNHNXZ.js +1 -0
- package/dist/packem_shared/expandTokensInString-DVSFEdWu.js +1 -0
- package/dist/packem_shared/expandWildcard-DE0dOOZF.js +1 -0
- package/dist/packem_shared/extractPackageName-BeL6Gc3a.js +1 -0
- package/dist/packem_shared/findCycle-BY8-jmzB.js +1 -0
- package/dist/packem_shared/formatTimingTable-CP3rsDwf.js +7 -0
- package/dist/packem_shared/generateRunSummary-L9Z2NfWn.js +1 -0
- package/dist/packem_shared/getCurrentBranch-D-qoZByx.js +1 -0
- package/dist/packem_shared/getMainWorktreeRoot-DB9P2wDL.js +1 -0
- package/dist/packem_shared/isNativeAvailable-CkTjxb7P.js +1 -0
- package/dist/packem_shared/parseCommands-BHsXoUCd.js +1 -0
- package/dist/packem_shared/parsePartition-Bt1jBjZH.js +1 -0
- package/dist/packem_shared/projectGraphToDot-FN6oHDGH.js +250 -0
- package/dist/packem_shared/resolveCacheMode--4y60ODd.js +1 -0
- package/dist/packem_shared/resolveOutputs-CzGGEbcP.js +1 -0
- package/dist/packem_shared/runConcurrentFallback-BhJCT2LA.js +3 -0
- package/dist/packem_shared/runConcurrently-D1Ytsjaj.js +1 -0
- package/dist/packem_shared/runTeardown-DAn1xFWJ.js +1 -0
- package/dist/packem_shared/shell-quote-BhmqDUL1.js +1 -0
- package/dist/packem_shared/stripQuotes-jkZb0CL9.js +1 -0
- package/dist/packem_shared/toChromeTrace-DxN5NQIU.js +1 -0
- package/dist/packem_shared/tracked-executor-B90U4Um3.js +3 -0
- package/dist/packem_shared/utils-BH2W5Wml.js +1 -0
- package/dist/packem_shared/withRestart-DKtEGsQA.js +1 -0
- package/index.js +603 -0
- package/package.json +31 -19
- package/binding.js +0 -204
- package/dist/affected.d.ts +0 -48
- package/dist/cache.d.ts +0 -103
- package/dist/default-task-runner.d.ts +0 -44
- package/dist/file-access-tracker.d.ts +0 -53
- package/dist/fingerprint.d.ts +0 -45
- package/dist/framework-inference.d.ts +0 -35
- package/dist/graph-visualizer.d.ts +0 -74
- package/dist/incremental-hasher.d.ts +0 -58
- package/dist/life-cycle.d.ts +0 -36
- package/dist/lockfile-hasher.d.ts +0 -73
- package/dist/native-binding.d.ts +0 -64
- package/dist/packem_shared/Cache-IYpTYVUC.js +0 -298
- package/dist/packem_shared/CompositeLifeCycle-7AtYw1dv.js +0 -112
- package/dist/packem_shared/FileAccessTracker-CrtBAt5D.js +0 -239
- package/dist/packem_shared/FingerprintManager-D6Y0erg-.js +0 -227
- package/dist/packem_shared/IncrementalFileHasher-Ds3J6dgb.js +0 -151
- package/dist/packem_shared/RemoteCache-BDqrnDEi.js +0 -179
- package/dist/packem_shared/TaskOrchestrator-BvYs3ONw.js +0 -342
- package/dist/packem_shared/TaskScheduler-CJilHDta.js +0 -111
- package/dist/packem_shared/TrackedTaskExecutor-BGUKFE-7.js +0 -164
- package/dist/packem_shared/collectFiles-ClXHnHhg.js +0 -22
- package/dist/packem_shared/computeTaskHash-BoCnnvIJ.js +0 -356
- package/dist/packem_shared/createTaskGraph-CcsFaSrz.js +0 -164
- package/dist/packem_shared/defaultTaskRunner-CrW4v5Ye.js +0 -79
- package/dist/packem_shared/detectFrameworks-CeFzKE6J.js +0 -101
- package/dist/packem_shared/extractPackageName-CbVNW-dr.js +0 -189
- package/dist/packem_shared/filterAffectedTasks-I-18zPg6.js +0 -135
- package/dist/packem_shared/findCycle-DF4_BRdO.js +0 -212
- package/dist/packem_shared/generateRunSummary-qn-_jKwt.js +0 -134
- package/dist/packem_shared/isNativeAvailable-BWhnZ4ES.js +0 -19
- package/dist/packem_shared/projectGraphToDot-VdTjHcVp.js +0 -202
- package/dist/packem_shared/utils-zO0ZRgtf.js +0 -390
- package/dist/remote-cache.d.ts +0 -55
- package/dist/run-summary.d.ts +0 -89
- package/dist/task-graph-utils.d.ts +0 -39
- package/dist/task-graph.d.ts +0 -22
- package/dist/task-hasher.d.ts +0 -67
- package/dist/task-orchestrator.d.ts +0 -38
- package/dist/task-scheduler.d.ts +0 -18
- package/dist/tracked-executor.d.ts +0 -46
- package/dist/types.d.ts +0 -385
- package/dist/utils.d.ts +0 -39
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,313 @@
|
|
|
1
|
+
## @visulima/task-runner [1.0.0-alpha.20](https://github.com/visulima/visulima/compare/@visulima/task-runner@1.0.0-alpha.19...@visulima/task-runner@1.0.0-alpha.20) (2026-06-06)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
* **task-runner:** output-cache data loss + path-safety bugs ([aaa4007](https://github.com/visulima/visulima/commit/aaa4007ed3daea0151588c2ce42bc80eaceb40fd))
|
|
6
|
+
|
|
7
|
+
## @visulima/task-runner [1.0.0-alpha.19](https://github.com/visulima/visulima/compare/@visulima/task-runner@1.0.0-alpha.18...@visulima/task-runner@1.0.0-alpha.19) (2026-06-04)
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **task-runner:** 3 bug fixes ([ccf08a1](https://github.com/visulima/visulima/commit/ccf08a1faed664d4545b7594bba9afade782b2e5))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Dependencies
|
|
15
|
+
|
|
16
|
+
* **@visulima/humanizer:** upgraded to 3.0.0-alpha.13
|
|
17
|
+
* **@visulima/path:** upgraded to 3.0.0-alpha.12
|
|
18
|
+
|
|
19
|
+
## @visulima/task-runner [1.0.0-alpha.18](https://github.com/visulima/visulima/compare/@visulima/task-runner@1.0.0-alpha.17...@visulima/task-runner@1.0.0-alpha.18) (2026-06-02)
|
|
20
|
+
|
|
21
|
+
### Features
|
|
22
|
+
|
|
23
|
+
* **task-runner,vis:** per-task pty + concurrency weight, abort cache gate, fspy scaffolds ([#656](https://github.com/visulima/visulima/issues/656)) ([ca64010](https://github.com/visulima/visulima/commit/ca64010b236903e08273680ea65dec7046fcd18b))
|
|
24
|
+
|
|
25
|
+
### Bug Fixes
|
|
26
|
+
|
|
27
|
+
* **task-runner:** atomic restoreOutputs and graceful REAPI shutdown ([a3f7088](https://github.com/visulima/visulima/commit/a3f7088c58560f9c98d9d68914ebaf0a458e319d)), closes [#inflightRpcs](https://github.com/visulima/visulima/issues/inflightRpcs) [#closeQuiescenceTimeoutMs](https://github.com/visulima/visulima/issues/closeQuiescenceTimeoutMs)
|
|
28
|
+
* **task-runner:** bound fspy drains so a lingering child can't hang the run ([#666](https://github.com/visulima/visulima/issues/666)) ([3f56348](https://github.com/visulima/visulima/commit/3f56348e1998b50e3b8496ce5f97a9a34932946d)), closes [vite-task#396](https://github.com/visulima/vite-task/issues/396) [vite-task#396](https://github.com/visulima/vite-task/issues/396) [vite-task#396](https://github.com/visulima/vite-task/issues/396) [vite-task#396](https://github.com/visulima/vite-task/issues/396) [vite-task#396](https://github.com/visulima/vite-task/issues/396)
|
|
29
|
+
* **task-runner:** close remaining audit findings ([28c5870](https://github.com/visulima/visulima/commit/28c587008a7f4be73c0e4695f443eccf1a9ed264)), closes [vite-task#358](https://github.com/visulima/vite-task/issues/358)
|
|
30
|
+
* **task-runner:** harden native runner and respect caller FORCE_COLOR ([d1e7231](https://github.com/visulima/visulima/commit/d1e72317428501c1221ffb3c1a4a0e0c5bcfafc0))
|
|
31
|
+
* **task-runner:** harden scheduler, cache, and remote backends ([ce94b16](https://github.com/visulima/visulima/commit/ce94b16c7600967e2d47b1e18975a904f8aef779))
|
|
32
|
+
* **task-runner:** tolerate dev-only dependency cycles ([#664](https://github.com/visulima/visulima/issues/664)) ([9ad384e](https://github.com/visulima/visulima/commit/9ad384e34927b40823ae104d6b05a581dcd05705)), closes [#411](https://github.com/visulima/visulima/issues/411)
|
|
33
|
+
|
|
34
|
+
### Miscellaneous Chores
|
|
35
|
+
|
|
36
|
+
* cs fixes ([#659](https://github.com/visulima/visulima/issues/659)) ([61f8912](https://github.com/visulima/visulima/commit/61f891274c1de22a36af256fc981b585b9ec6a6a))
|
|
37
|
+
* **task-runner:** track fspy_macos Cargo.lock ([7a69ff9](https://github.com/visulima/visulima/commit/7a69ff9bcbc25b2c6d8f249c66b135d1ff9a1577))
|
|
38
|
+
|
|
39
|
+
### Tests
|
|
40
|
+
|
|
41
|
+
* **task-runner:** regression guard for vite-task[#411](https://github.com/visulima/visulima/issues/411) (peer-dep cycle) ([#665](https://github.com/visulima/visulima/issues/665)) ([41ed071](https://github.com/visulima/visulima/commit/41ed0710d103647137f0448d999f355451f80df4))
|
|
42
|
+
|
|
43
|
+
## @visulima/task-runner [1.0.0-alpha.17](https://github.com/visulima/visulima/compare/@visulima/task-runner@1.0.0-alpha.16...@visulima/task-runner@1.0.0-alpha.17) (2026-05-29)
|
|
44
|
+
|
|
45
|
+
### Bug Fixes
|
|
46
|
+
|
|
47
|
+
* **task-runner:** flush partial output lines on idle, not at EOF ([5912661](https://github.com/visulima/visulima/commit/59126614ab5e07d3085a4194a360bd72437eceea))
|
|
48
|
+
|
|
49
|
+
## @visulima/task-runner [1.0.0-alpha.16](https://github.com/visulima/visulima/compare/@visulima/task-runner@1.0.0-alpha.15...@visulima/task-runner@1.0.0-alpha.16) (2026-05-27)
|
|
50
|
+
|
|
51
|
+
### Bug Fixes
|
|
52
|
+
|
|
53
|
+
* **storage-client:** percent-encode user fields in defaultFingerprint ([7c78a0f](https://github.com/visulima/visulima/commit/7c78a0f9512e2a673b941d80839e9f1e86b7b5d0))
|
|
54
|
+
* **task-runner:** resolve workspace .bin binaries in spawned tasks ([69bd30c](https://github.com/visulima/visulima/commit/69bd30c95fb1e70aba1f7c5b4d3d17b8f0465c11))
|
|
55
|
+
* **vis:** enhance PATH inside ephemeral service bootstrap config ([30c6364](https://github.com/visulima/visulima/commit/30c6364cceff0d3c48fe5e7e4a996b77a1ed224c))
|
|
56
|
+
|
|
57
|
+
### Miscellaneous Chores
|
|
58
|
+
|
|
59
|
+
* **ci-stability:** green CI across vis, native, lint, tests, attw ([#651](https://github.com/visulima/visulima/issues/651)) ([d4eb684](https://github.com/visulima/visulima/commit/d4eb684b5f75c818c9251048c605a0ed54a268e3))
|
|
60
|
+
* **repo:** apply eslint --fix and prettier --fix across packages ([#650](https://github.com/visulima/visulima/issues/650)) ([2e26a84](https://github.com/visulima/visulima/commit/2e26a84774f218f21345e9a8ecd68236b6542743)), closes [#620](https://github.com/visulima/visulima/issues/620)
|
|
61
|
+
* **repo:** sort package.json keys across all packages ([e1fd9ab](https://github.com/visulima/visulima/commit/e1fd9ab467ef96a98c777da1572ff6a50fcf7e71))
|
|
62
|
+
* sorted package.json ([b47c545](https://github.com/visulima/visulima/commit/b47c545591600fdab17d5cd3a3fbc68b61e199da))
|
|
63
|
+
|
|
64
|
+
### Continuous Integration
|
|
65
|
+
|
|
66
|
+
* pin macos to 15, fix task-runner indent + backbuffer flake ([61cbf4f](https://github.com/visulima/visulima/commit/61cbf4fb09be40c567a4e0d2d4349ad24ea91afb))
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
### Dependencies
|
|
70
|
+
|
|
71
|
+
* **@visulima/path:** upgraded to 3.0.0-alpha.11
|
|
72
|
+
|
|
73
|
+
## @visulima/task-runner [1.0.0-alpha.15](https://github.com/visulima/visulima/compare/@visulima/task-runner@1.0.0-alpha.14...@visulima/task-runner@1.0.0-alpha.15) (2026-05-19)
|
|
74
|
+
|
|
75
|
+
### Features
|
|
76
|
+
|
|
77
|
+
* **task-runner:** auto-capture outputs for compound build scripts ([e084434](https://github.com/visulima/visulima/commit/e0844344cf184177999a82b708299f08fbfd31ec))
|
|
78
|
+
* **task-runner:** per-target hashMode "trace" opt-in ([#643](https://github.com/visulima/visulima/issues/643)) ([32353ff](https://github.com/visulima/visulima/commit/32353ff7a760ae9486e23cc4042fab46a2f2cc11))
|
|
79
|
+
* **vis:** attested keyless-signed remote cache (Sigstore) ([4732610](https://github.com/visulima/visulima/commit/47326103a668ab99fcfc4e21f2c9efeaa5892944))
|
|
80
|
+
|
|
81
|
+
## @visulima/task-runner [1.0.0-alpha.14](https://github.com/visulima/visulima/compare/@visulima/task-runner@1.0.0-alpha.13...@visulima/task-runner@1.0.0-alpha.14) (2026-05-14)
|
|
82
|
+
|
|
83
|
+
### Bug Fixes
|
|
84
|
+
|
|
85
|
+
* **release:** patch NAPI version-check string and ship fresh loader on release ([0676e33](https://github.com/visulima/visulima/commit/0676e336f453c9ae38c9f3a5fbbb675f9bff7ea0))
|
|
86
|
+
|
|
87
|
+
### Miscellaneous Chores
|
|
88
|
+
|
|
89
|
+
* **tooling:** apply prettier and eslint formatting sweep ([c2c641d](https://github.com/visulima/visulima/commit/c2c641d40242e99030cb990fa01039db5e267667))
|
|
90
|
+
|
|
91
|
+
### Tests
|
|
92
|
+
|
|
93
|
+
* fixed count ([6fdd45e](https://github.com/visulima/visulima/commit/6fdd45e3855b619d09d3f33ec7c4277e59ef84da))
|
|
94
|
+
|
|
95
|
+
## @visulima/task-runner [1.0.0-alpha.13](https://github.com/visulima/visulima/compare/@visulima/task-runner@1.0.0-alpha.12...@visulima/task-runner@1.0.0-alpha.13) (2026-05-11)
|
|
96
|
+
|
|
97
|
+
### Features
|
|
98
|
+
|
|
99
|
+
* **task-runner:** add resolveTurboEnvCompat helper ([a8e73ef](https://github.com/visulima/visulima/commit/a8e73ef324dd8d1bc1f1f471f59f9292f9f01745))
|
|
100
|
+
* **task-runner:** surface retryAttempts on TaskResult and TaskSummary ([f74e278](https://github.com/visulima/visulima/commit/f74e278fc98052398d46a064ad11e1c9956c9cfd))
|
|
101
|
+
|
|
102
|
+
## @visulima/task-runner [1.0.0-alpha.12](https://github.com/visulima/visulima/compare/@visulima/task-runner@1.0.0-alpha.11...@visulima/task-runner@1.0.0-alpha.12) (2026-05-10)
|
|
103
|
+
|
|
104
|
+
### Features
|
|
105
|
+
|
|
106
|
+
* **task-runner:** add onRetry + onFingerprint hooks ([7e9dadf](https://github.com/visulima/visulima/commit/7e9dadfbe7101fd9b2878eb881d16c3ff5d766ac))
|
|
107
|
+
|
|
108
|
+
## @visulima/task-runner [1.0.0-alpha.11](https://github.com/visulima/visulima/compare/@visulima/task-runner@1.0.0-alpha.10...@visulima/task-runner@1.0.0-alpha.11) (2026-05-10)
|
|
109
|
+
|
|
110
|
+
### Features
|
|
111
|
+
|
|
112
|
+
* add service and tool projectType variants ([61858ad](https://github.com/visulima/visulima/commit/61858ad4c044b5f30318f282615c83f716667053)), closes [#21](https://github.com/visulima/visulima/issues/21)
|
|
113
|
+
* **task-runner:** allow embedders to override the data directory ([904875a](https://github.com/visulima/visulima/commit/904875a15751c57ebafa9c137fd11c2ade1a4b6a))
|
|
114
|
+
* **task-runner:** surface native child pids for sigint cleanup ([3790bbd](https://github.com/visulima/visulima/commit/3790bbd5f88485f6c67c28548faf7a2a3791216c))
|
|
115
|
+
|
|
116
|
+
### Miscellaneous Chores
|
|
117
|
+
|
|
118
|
+
* **task-runner:** bump protobufjs to 8.0.3 ([cfbd5e7](https://github.com/visulima/visulima/commit/cfbd5e783e8773db790223f7dd8baea56685c1ca))
|
|
119
|
+
|
|
120
|
+
## @visulima/task-runner [1.0.0-alpha.10](https://github.com/visulima/visulima/compare/@visulima/task-runner@1.0.0-alpha.9...@visulima/task-runner@1.0.0-alpha.10) (2026-05-06)
|
|
121
|
+
|
|
122
|
+
### Features
|
|
123
|
+
|
|
124
|
+
* **task-runner:** add per-target maxConcurrent and workspace concurrencyGroups ([985d5d1](https://github.com/visulima/visulima/commit/985d5d1d3a594f3b42cfa3f7735bc1bb8055563e))
|
|
125
|
+
|
|
126
|
+
### Miscellaneous Chores
|
|
127
|
+
|
|
128
|
+
* **task-runner:** clear lint warnings ([05fa2b6](https://github.com/visulima/visulima/commit/05fa2b6fa259607933fc709dc871b5ef52294721))
|
|
129
|
+
* **task-runner:** fix lint errors ([0f5a6d0](https://github.com/visulima/visulima/commit/0f5a6d00bd321b98f9b4289923e151c59a5b7e58))
|
|
130
|
+
* **task-runner:** fix lint errors in test files ([5e7dc4f](https://github.com/visulima/visulima/commit/5e7dc4fcee277691034666a252d97503aa7be0a4))
|
|
131
|
+
* **task-runner:** housekeeping cleanup ([e837f11](https://github.com/visulima/visulima/commit/e837f1166b43bcfbccfdffe693248db498c0fe1d))
|
|
132
|
+
|
|
133
|
+
### Continuous Integration
|
|
134
|
+
|
|
135
|
+
* integrate codspeed for benchmark tracking ([e758f3d](https://github.com/visulima/visulima/commit/e758f3da491cc00d3f8bbf10d7ba3fdf8deb5325))
|
|
136
|
+
|
|
137
|
+
## @visulima/task-runner [1.0.0-alpha.9](https://github.com/visulima/visulima/compare/@visulima/task-runner@1.0.0-alpha.8...@visulima/task-runner@1.0.0-alpha.9) (2026-05-04)
|
|
138
|
+
|
|
139
|
+
### Features
|
|
140
|
+
|
|
141
|
+
* **task-runner,vis:** cache restoration fidelity ([a15cb22](https://github.com/visulima/visulima/commit/a15cb22bde832cfe76ee017722b8b9f9102dac8f))
|
|
142
|
+
* **task-runner:** add REAPI gRPC backend, cacheMode, and cache doctor ([03e6da9](https://github.com/visulima/visulima/commit/03e6da97beb84f6adc4a07a1c7ca4acf28be3b33))
|
|
143
|
+
* **task-runner:** add URI-based input format ([050b583](https://github.com/visulima/visulima/commit/050b5838c15590a3ccba0ca99ad585cbabc36d99))
|
|
144
|
+
* **task-runner:** skip-on-warning incrementality ([2c79ab3](https://github.com/visulima/visulima/commit/2c79ab35d0513bf4e60f87d1ac3bc4e99296cb62)), closes [#22](https://github.com/visulima/visulima/issues/22) [rushstack#1402](https://github.com/visulima/rushstack/issues/1402)
|
|
145
|
+
|
|
146
|
+
### Bug Fixes
|
|
147
|
+
|
|
148
|
+
* **vis:** preserve probe error on close failure and clamp formatAge ([f1d71d6](https://github.com/visulima/visulima/commit/f1d71d63a5432fc2ed8c09c9a0a87e4e59b83b0b))
|
|
149
|
+
|
|
150
|
+
### Documentation
|
|
151
|
+
|
|
152
|
+
* **task-runner:** cover when/always, tokens, REAPI, hooks ([1515cd3](https://github.com/visulima/visulima/commit/1515cd349db41fcfe83ae86ed4d52df8dccbf985))
|
|
153
|
+
|
|
154
|
+
### Miscellaneous Chores
|
|
155
|
+
|
|
156
|
+
* catalog refresh + task-runner binding bump to 1.0.0-alpha.8 ([ff4548a](https://github.com/visulima/visulima/commit/ff4548a5678c992048a57e73c310757733c04756))
|
|
157
|
+
* **deps:** bump rust crates to current majors ([3a1d9bb](https://github.com/visulima/visulima/commit/3a1d9bb7f6e2c6b2d3862e212ae62707d60815cc))
|
|
158
|
+
|
|
159
|
+
### Code Refactoring
|
|
160
|
+
|
|
161
|
+
* **task-runner,vis:** consolidate helpers and tighten branches ([d1290d1](https://github.com/visulima/visulima/commit/d1290d1f614036902c6803d8ff51df100fdd07ab))
|
|
162
|
+
* **task-runner,vis:** expose worktree helpers from task-runner ([12468d7](https://github.com/visulima/visulima/commit/12468d76bb03278ec56691ba0c6d9821c9482f94))
|
|
163
|
+
|
|
164
|
+
### Tests
|
|
165
|
+
|
|
166
|
+
* **task-runner:** split tests into unit/integration mirroring src layout ([ae78f99](https://github.com/visulima/visulima/commit/ae78f992d24626f3b23de56fa735aced47b1220e))
|
|
167
|
+
|
|
168
|
+
## @visulima/task-runner [1.0.0-alpha.8](https://github.com/visulima/visulima/compare/@visulima/task-runner@1.0.0-alpha.7...@visulima/task-runner@1.0.0-alpha.8) (2026-04-30)
|
|
169
|
+
|
|
170
|
+
### Features
|
|
171
|
+
|
|
172
|
+
* **task-runner:** expose worktree detection napi bindings ([3d67028](https://github.com/visulima/visulima/commit/3d670284090010616956a024a4e5465ee91bbcd4))
|
|
173
|
+
* **task-runner:** graceful Ctrl+Break on Windows SIGINT ([ae44b1c](https://github.com/visulima/visulima/commit/ae44b1c855839746092a91430eb49b216d1172ec))
|
|
174
|
+
* **task-runner:** tokens, when, and always tasks ([5ae6505](https://github.com/visulima/visulima/commit/5ae65055d97e97d7ad7ff9088996da37d964da3f))
|
|
175
|
+
|
|
176
|
+
### Bug Fixes
|
|
177
|
+
|
|
178
|
+
* **vis:** address review findings on watch UX bundle ([edee703](https://github.com/visulima/visulima/commit/edee7038fe23a488791682dd8ce5c469b40a3e8c))
|
|
179
|
+
|
|
180
|
+
### Miscellaneous Chores
|
|
181
|
+
|
|
182
|
+
* re-sort workspace package.json files via vis sort-package-json ([f625696](https://github.com/visulima/visulima/commit/f625696cfac974325774b3243e1a83c3d23acbd7))
|
|
183
|
+
* **task-runner:** upgrade packem to 2.0.0-alpha.76 ([5f59c41](https://github.com/visulima/visulima/commit/5f59c4140f89019cc3756ac917e1bda7ded0beec))
|
|
184
|
+
|
|
185
|
+
## @visulima/task-runner [1.0.0-alpha.7](https://github.com/visulima/visulima/compare/@visulima/task-runner@1.0.0-alpha.6...@visulima/task-runner@1.0.0-alpha.7) (2026-04-22)
|
|
186
|
+
|
|
187
|
+
### Bug Fixes
|
|
188
|
+
|
|
189
|
+
* **ci:** publish native addons via local semantic-release plugin ([974beb2](https://github.com/visulima/visulima/commit/974beb2d021e7b2afc86b958bd2137be88d2f464))
|
|
190
|
+
* Remove JSR configuration generation script and generated jsr.json files ([#616](https://github.com/visulima/visulima/issues/616)) ([533744b](https://github.com/visulima/visulima/commit/533744b103b74896941db5b727173e617a27a63b))
|
|
191
|
+
|
|
192
|
+
### Miscellaneous Chores
|
|
193
|
+
|
|
194
|
+
* update the jsr.json ([864ab7e](https://github.com/visulima/visulima/commit/864ab7e71c4b5ae82f64792d1ae8debfea2c539b))
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
### Dependencies
|
|
198
|
+
|
|
199
|
+
* **@visulima/humanizer:** upgraded to 3.0.0-alpha.11
|
|
200
|
+
* **@visulima/path:** upgraded to 3.0.0-alpha.10
|
|
201
|
+
|
|
202
|
+
## @visulima/task-runner [1.0.0-alpha.6](https://github.com/visulima/visulima/compare/@visulima/task-runner@1.0.0-alpha.5...@visulima/task-runner@1.0.0-alpha.6) (2026-04-21)
|
|
203
|
+
|
|
204
|
+
### Features
|
|
205
|
+
|
|
206
|
+
* **task-runner:** output globs, auto-writes, parallel cache IO ([137f53f](https://github.com/visulima/visulima/commit/137f53f7f5a4d8c16df511c9d145b2c158025a32))
|
|
207
|
+
* **task-runner:** vite-task parity + plugin-ready lifecycle hooks ([cfc7360](https://github.com/visulima/visulima/commit/cfc7360abf00524fbfc37b60df27970c325f91e1)), closes [pkg#task](https://github.com/visulima/pkg/issues/task)
|
|
208
|
+
|
|
209
|
+
### Bug Fixes
|
|
210
|
+
|
|
211
|
+
* **task-runner:** resolve eslint errors in chrome-trace and task-hasher ([2cf6266](https://github.com/visulima/visulima/commit/2cf6266b8252bc24a6d900f49f97611d4d629ff3))
|
|
212
|
+
|
|
213
|
+
### Miscellaneous Chores
|
|
214
|
+
|
|
215
|
+
* **api-platform:** apply pending lint and source updates ([3fb0043](https://github.com/visulima/visulima/commit/3fb0043a4cf35f752ca89a09a077100ae0142da8))
|
|
216
|
+
* bump engines.node to ^22.14.0 || >=24.10.0 ([c3d0931](https://github.com/visulima/visulima/commit/c3d0931d1504e4f21ebf50ea680cfa7ce4ba15ce))
|
|
217
|
+
* fixed jsr.json ([5d85e51](https://github.com/visulima/visulima/commit/5d85e5179de38e284ec433b14d77c71a1619c8d6))
|
|
218
|
+
* **task-runner:** apply formatter and lint fixes ([70b4641](https://github.com/visulima/visulima/commit/70b4641b394897ebfc021425b992db936e320d8a))
|
|
219
|
+
* **task-runner:** apply formatter and lint fixes ([aee664f](https://github.com/visulima/visulima/commit/aee664f0a03ed9c1eb8bf7a6a91e62f601a3d5ff))
|
|
220
|
+
* **task-runner:** apply pending changes ([9d92517](https://github.com/visulima/visulima/commit/9d92517f1a54bc28a19cb8cbdb937cdc234e152d))
|
|
221
|
+
* **task-runner:** apply pending lint and source updates ([c01eb39](https://github.com/visulima/visulima/commit/c01eb393f991d8fc96f8ed87bfc71d90902ee659))
|
|
222
|
+
* **task-runner:** enforce curly braces and apply lint fixes ([4fbd8ee](https://github.com/visulima/visulima/commit/4fbd8eefa1b56f428528b495b074d5c266fb6733))
|
|
223
|
+
|
|
224
|
+
### Code Refactoring
|
|
225
|
+
|
|
226
|
+
* replace inline import() types with top-level imports ([4569a4c](https://github.com/visulima/visulima/commit/4569a4ca04723da069f985855dcfab292f7347e1))
|
|
227
|
+
|
|
228
|
+
### Tests
|
|
229
|
+
|
|
230
|
+
* **task-runner:** remove native binding guard from tests ([90f0dff](https://github.com/visulima/visulima/commit/90f0dffe85f4b83e76905a26d53b917365116b45))
|
|
231
|
+
* **task-runner:** skip default excludes for tmpdir-backed tracker tests ([0db0620](https://github.com/visulima/visulima/commit/0db06206173f0799244fafcc578b9fb0be9d2fb6))
|
|
232
|
+
|
|
233
|
+
## @visulima/task-runner [1.0.0-alpha.5](https://github.com/visulima/visulima/compare/@visulima/task-runner@1.0.0-alpha.4...@visulima/task-runner@1.0.0-alpha.5) (2026-04-15)
|
|
234
|
+
|
|
235
|
+
### Features
|
|
236
|
+
|
|
237
|
+
* Add comprehensive workspace configuration and command infrastructure ([#609](https://github.com/visulima/visulima/issues/609)) ([f4347bf](https://github.com/visulima/visulima/commit/f4347bfdcdd1b228cd9d842a927e446aaf23f035))
|
|
238
|
+
* **vis:** add cache command for task runner cache ([#607](https://github.com/visulima/visulima/issues/607)) ([6752769](https://github.com/visulima/visulima/commit/67527692562b3dd9c03bb6a67c084ff1e694a560))
|
|
239
|
+
|
|
240
|
+
### Bug Fixes
|
|
241
|
+
|
|
242
|
+
* **tooling:** resolve eslint and formatting issues ([399d292](https://github.com/visulima/visulima/commit/399d29282be5b29bb26b4e5b24d45e2a6cdeeca3))
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
### Dependencies
|
|
246
|
+
|
|
247
|
+
* **@visulima/humanizer:** upgraded to 3.0.0-alpha.10
|
|
248
|
+
* **@visulima/path:** upgraded to 3.0.0-alpha.9
|
|
249
|
+
|
|
250
|
+
## @visulima/task-runner [1.0.0-alpha.4](https://github.com/visulima/visulima/compare/@visulima/task-runner@1.0.0-alpha.3...@visulima/task-runner@1.0.0-alpha.4) (2026-04-08)
|
|
251
|
+
|
|
252
|
+
### Features
|
|
253
|
+
|
|
254
|
+
* Add native Rust bindings for package manager operations ([#596](https://github.com/visulima/visulima/issues/596)) ([2ec22d0](https://github.com/visulima/visulima/commit/2ec22d023eade3fed67fb811696fbd8f7b52569d))
|
|
255
|
+
* **task-runner, vis:** project constraints, CI partitioning, affected scopes ([29295e9](https://github.com/visulima/visulima/commit/29295e989ecdfe2019469d1917a6c90a92e17bcf))
|
|
256
|
+
* **task-runner:** add concurrent process runner with Rust NAPI bindings ([c4f5d93](https://github.com/visulima/visulima/commit/c4f5d930e81a5eb641ceb3ab925c3b10a885bb6a))
|
|
257
|
+
* **vis:** expand devcontainer command with templates, validation, and config properties ([807e730](https://github.com/visulima/visulima/commit/807e730a43f0ea644d016b4f5506706972d2ff41))
|
|
258
|
+
* **vis:** group CLI commands into logical categories for help output ([0a4cac8](https://github.com/visulima/visulima/commit/0a4cac859c8edf7aacdacca7b9a03219967d525a))
|
|
259
|
+
* **vis:** replace inline TUI with full-screen Nx-style interactive task runner ([1409aad](https://github.com/visulima/visulima/commit/1409aad879c713051bba12298a3feb1d5ba852f2))
|
|
260
|
+
|
|
261
|
+
### Bug Fixes
|
|
262
|
+
|
|
263
|
+
* **ci:** make native-binding tests work with and without compiled binary ([9a40fb4](https://github.com/visulima/visulima/commit/9a40fb40d5cba9fcd2e0176eea8b7bf8d9792c7d))
|
|
264
|
+
* **task-runner,tui:** guard null native events and increase CI test timeout ([e76a791](https://github.com/visulima/visulima/commit/e76a791d90043537e08be0545f706e35acaa555d))
|
|
265
|
+
* **task-runner:** deno.json support, Windows Job Objects, docs, and review fixes ([4fb27f0](https://github.com/visulima/visulima/commit/4fb27f081b4b50b41dbb86b5b1a962b63f7a6df3))
|
|
266
|
+
* **task-runner:** fix Windows cross-compilation by upgrading windows-sys to 0.61 ([b56b95e](https://github.com/visulima/visulima/commit/b56b95e2a39ca972398859e6eb87e528f4463d97))
|
|
267
|
+
* **task-runner:** resolve eslint errors ([f0a21a6](https://github.com/visulima/visulima/commit/f0a21a689bc9e1d8b091a513e21cb11b77103ba4))
|
|
268
|
+
* **task-runner:** use JS fallback for onEvent streaming, fix StaticRender ref ([1a7165c](https://github.com/visulima/visulima/commit/1a7165cd9eb71472895cd08682983fa25703dc93))
|
|
269
|
+
* **tsconfig:** add node types and fix implicit any parameter ([1744d82](https://github.com/visulima/visulima/commit/1744d82a07fca03f2e6ff660b918e9b2623acf69))
|
|
270
|
+
|
|
271
|
+
### Miscellaneous Chores
|
|
272
|
+
|
|
273
|
+
* added og images ([02d9d1e](https://github.com/visulima/visulima/commit/02d9d1e47be3ce75679ea89e857dc4e4bfe4946b))
|
|
274
|
+
* **task-runner:** add tsconfig.eslint.json for type-aware linting ([83e0bf2](https://github.com/visulima/visulima/commit/83e0bf23511a169b801f6edf652a8be7ee968c24))
|
|
275
|
+
* **task-runner:** apply prettier formatting ([521afc2](https://github.com/visulima/visulima/commit/521afc22d94a2626c7246062cecfc0627f929ee4))
|
|
276
|
+
* **task-runner:** expand inline if-return to block syntax ([0f48a96](https://github.com/visulima/visulima/commit/0f48a96ed11d7339c62f3f147c7b2c8fcc605b03))
|
|
277
|
+
* **task-runner:** migrate .prettierrc.cjs to prettier.config.js ([cd1c045](https://github.com/visulima/visulima/commit/cd1c045e133f685a274924034ec70cf374edd5ba))
|
|
278
|
+
|
|
279
|
+
### Build System
|
|
280
|
+
|
|
281
|
+
* regenerate NAPI-RS bindings as ESM ([f202caf](https://github.com/visulima/visulima/commit/f202caf3dc383a2ec24815c4935d8d68c29f33d0))
|
|
282
|
+
* switch NAPI-RS native builds to ESM output ([3d7cd61](https://github.com/visulima/visulima/commit/3d7cd615ad830392005915735c11771e0247ef3f))
|
|
283
|
+
* **task-runner:** move publish-native-addons to shared scripts/ ([73b5482](https://github.com/visulima/visulima/commit/73b5482e1ca0707aa8f191429deffbd7324a632d))
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
### Dependencies
|
|
287
|
+
|
|
288
|
+
* **@visulima/humanizer:** upgraded to 3.0.0-alpha.9
|
|
289
|
+
* **@visulima/path:** upgraded to 3.0.0-alpha.8
|
|
290
|
+
|
|
291
|
+
## @visulima/task-runner [1.0.0-alpha.3](https://github.com/visulima/visulima/compare/@visulima/task-runner@1.0.0-alpha.2...@visulima/task-runner@1.0.0-alpha.3) (2026-03-26)
|
|
292
|
+
|
|
293
|
+
### Features
|
|
294
|
+
|
|
295
|
+
* **web:** auto-generate packages page from workspace metadata ([623e520](https://github.com/visulima/visulima/commit/623e5207693a7fe720f5f2f179593a3654c880e3))
|
|
296
|
+
|
|
297
|
+
### Miscellaneous Chores
|
|
298
|
+
|
|
299
|
+
* **task-runner:** remove redundant extends from .releaserc.json ([8969dfa](https://github.com/visulima/visulima/commit/8969dfaeccf3a36e40ecb9ba659187f81dda4ce1))
|
|
300
|
+
|
|
301
|
+
### Continuous Integration
|
|
302
|
+
|
|
303
|
+
* **task-runner:** use escaped newlines in git commit message template ([b3045b6](https://github.com/visulima/visulima/commit/b3045b6c2c5afc641c699932fbf90effe7c31563))
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
### Dependencies
|
|
307
|
+
|
|
308
|
+
* **@visulima/humanizer:** upgraded to 3.0.0-alpha.8
|
|
309
|
+
* **@visulima/path:** upgraded to 3.0.0-alpha.7
|
|
310
|
+
|
|
1
311
|
## @visulima/task-runner [1.0.0-alpha.2](https://github.com/visulima/visulima/compare/@visulima/task-runner@1.0.0-alpha.1...@visulima/task-runner@1.0.0-alpha.2) (2026-03-26)
|
|
2
312
|
|
|
3
313
|
### Bug Fixes
|
package/README.md
CHANGED
|
@@ -27,20 +27,30 @@
|
|
|
27
27
|
|
|
28
28
|
## Features
|
|
29
29
|
|
|
30
|
+
- **Concurrent process runner**: Run multiple commands in parallel with native Rust performance (NAPI bindings) and JS fallback
|
|
31
|
+
- **Process tree management**: Proper cleanup via setsid/killpg (Unix) and Job Objects (Windows)
|
|
32
|
+
- **Command parser pipeline**: `npm:build` shortcuts, `npm run watch-*` wildcard expansion, `{1}` argument placeholders
|
|
33
|
+
- **Flow controllers**: Restart with backoff, stdin routing, timing summaries, teardown commands
|
|
34
|
+
- **npm script-shell support**: Honors `npm config set script-shell` for custom shells (Git Bash, etc.)
|
|
35
|
+
- **Long-running process support**: Configurable stdin mode (null/pipe/inherit), bounded output buffers
|
|
30
36
|
- **Two caching modes**: Nx-style explicit inputs or Vite Task-style auto-fingerprinting
|
|
37
|
+
- **3-tier auto-fingerprint dispatch on Linux**: kernel-level `seccomp_unotify` (catches Alpine/musl/static-binary children), `strace` fallback, then no-op. The seccomp path uses a tiny `fspy-seccomp-helper` binary bundled with the platform binding package — sidesteps the fork-from-multithreaded hazard of installing seccomp in `pre_exec` from Node's NAPI host. See `rfc/design-fspy-seccomp-unotify.md`.
|
|
31
38
|
- **Smart lockfile hashing**: Only hashes resolved versions relevant to each package (like Turborepo)
|
|
32
39
|
- **Framework env inference**: Auto-detects Next.js, Vite, CRA, Gatsby, Nuxt, and more
|
|
33
|
-
- **Remote caching**: Turborepo-compatible HTTP cache protocol
|
|
34
|
-
- **Native Rust addon**:
|
|
40
|
+
- **Remote caching**: Turborepo-compatible HTTP cache protocol, plus a Bazel REAPI gRPC backend (bazel-remote, BuildBuddy, BuildBarn, EngFlow)
|
|
41
|
+
- **Native Rust addon**: Parallel file hashing (xxHash), concurrent process management via tokio
|
|
35
42
|
- **Dependency-aware scheduling**: Topological task ordering with priority-based batching
|
|
36
43
|
- **Incremental file hashing**: mtime-based change detection for near-instant cache checks
|
|
37
44
|
- **Affected detection**: Git diff-based filtering to only run tasks for changed packages
|
|
45
|
+
- **Conditional tasks**: `when:` predicates (`os`, `env`, `branch`, `ci`) and `always: true` finally-tasks for cleanup/notifications
|
|
38
46
|
- **Graph visualization**: DOT, JSON, HTML, and ASCII output formats
|
|
47
|
+
- **Log reporter modes**: `interleaved`, `labeled` (per-line `[project#target]` prefix), and `grouped` (header/footer wrapping) for vite-task parity
|
|
39
48
|
- **Run summaries**: Detailed JSON reports for debugging cache behavior
|
|
40
49
|
- **Cache diagnostics**: Explains exactly why a cache miss occurred
|
|
41
50
|
- **Output archiving**: Caches and restores build outputs (dist/ directories)
|
|
42
51
|
- **LRU cache eviction**: Configurable max size and age limits
|
|
43
52
|
- **Lifecycle hooks**: 7 hook points for custom behavior
|
|
53
|
+
- **Cooperative cache hints**: tools can refine the inferred fingerprint from the inside via the zero-dependency [`@visulima/task-runner-client`](../task-runner-client) — `ignoreInput`/`ignoreOutput` to drop noise, `disableCache` for non-deterministic runs, and `getEnv`/`getEnvs` to register env-var dependencies at the point of use (closing the silent under-tracking gap that pattern-only env config leaves open). Complements observation: works on every platform, no client = no change.
|
|
44
54
|
|
|
45
55
|
## Install
|
|
46
56
|
|
|
@@ -61,32 +71,144 @@ pnpm add @visulima/task-runner
|
|
|
61
71
|
```typescript
|
|
62
72
|
import { defaultTaskRunner } from "@visulima/task-runner";
|
|
63
73
|
|
|
64
|
-
const results = await defaultTaskRunner(
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
74
|
+
const results = await defaultTaskRunner(
|
|
75
|
+
tasks,
|
|
76
|
+
{
|
|
77
|
+
// Nx-style: explicit inputs
|
|
78
|
+
namedInputs: {
|
|
79
|
+
production: ["{projectRoot}/src/**/*"],
|
|
80
|
+
},
|
|
81
|
+
globalInputs: ["pnpm-lock.yaml", "tsconfig.base.json"],
|
|
82
|
+
globalEnv: ["NODE_ENV"],
|
|
83
|
+
|
|
84
|
+
// Or: auto-fingerprinting (Vite Task-style)
|
|
85
|
+
// autoFingerprint: true,
|
|
86
|
+
|
|
87
|
+
// Smart lockfile hashing (only bust cache for affected packages)
|
|
88
|
+
smartLockfileHashing: true,
|
|
89
|
+
|
|
90
|
+
// Auto-detect framework env vars (NEXT_PUBLIC_*, VITE_*, etc.)
|
|
91
|
+
frameworkInference: true,
|
|
92
|
+
|
|
93
|
+
// Remote cache (Turborepo-compatible)
|
|
94
|
+
remoteCache: {
|
|
95
|
+
url: "https://cache.example.com",
|
|
96
|
+
token: process.env.CACHE_TOKEN,
|
|
97
|
+
teamId: "my-team",
|
|
98
|
+
},
|
|
68
99
|
},
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
// Or: auto-fingerprinting (Vite Task-style)
|
|
73
|
-
// autoFingerprint: true,
|
|
100
|
+
context,
|
|
101
|
+
);
|
|
102
|
+
```
|
|
74
103
|
|
|
75
|
-
|
|
76
|
-
smartLockfileHashing: true,
|
|
104
|
+
## Concurrent Process Runner
|
|
77
105
|
|
|
78
|
-
|
|
79
|
-
frameworkInference: true,
|
|
106
|
+
Run multiple commands in parallel with real-time output streaming, process tree management, and automatic native acceleration.
|
|
80
107
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
108
|
+
```typescript
|
|
109
|
+
import { runConcurrently } from "@visulima/task-runner";
|
|
110
|
+
|
|
111
|
+
// Basic usage
|
|
112
|
+
const result = await runConcurrently(["npm run build", "npm run test", "npm run lint"]);
|
|
113
|
+
console.log(result.success ? "All passed" : "Some failed");
|
|
114
|
+
|
|
115
|
+
// With options
|
|
116
|
+
const result = await runConcurrently(
|
|
117
|
+
[
|
|
118
|
+
{ command: "vite dev", name: "web", stdin: "inherit" },
|
|
119
|
+
{ command: "node api.js", name: "api" },
|
|
120
|
+
],
|
|
121
|
+
{
|
|
122
|
+
maxProcesses: 4,
|
|
123
|
+
killOthers: ["failure"], // Kill all if one fails
|
|
124
|
+
successCondition: "all", // All must exit 0
|
|
125
|
+
onEvent: (event) => {
|
|
126
|
+
// Real-time streaming
|
|
127
|
+
if (event.kind === "stdout") {
|
|
128
|
+
console.log(`[${event.index}] ${event.text}`);
|
|
129
|
+
}
|
|
130
|
+
},
|
|
86
131
|
},
|
|
87
|
-
|
|
132
|
+
);
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### Command Parser
|
|
136
|
+
|
|
137
|
+
Use `parseCommands` to expand shortcuts and wildcards before passing to `runConcurrently`:
|
|
138
|
+
|
|
139
|
+
```typescript
|
|
140
|
+
import { parseCommands, runConcurrently } from "@visulima/task-runner";
|
|
141
|
+
|
|
142
|
+
const commands = parseCommands([
|
|
143
|
+
"npm:build", // -> npm run build
|
|
144
|
+
"pnpm:test", // -> pnpm run test
|
|
145
|
+
'"quoted command"', // -> quoted command (quotes stripped)
|
|
146
|
+
"npm run watch-*", // -> expands to all matching scripts in package.json
|
|
147
|
+
"deno task dev-*", // -> expands from deno.json/deno.jsonc tasks
|
|
148
|
+
]);
|
|
149
|
+
|
|
150
|
+
await runConcurrently(commands);
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
### Flow Controllers
|
|
154
|
+
|
|
155
|
+
```typescript
|
|
156
|
+
import { runConcurrently } from "@visulima/task-runner";
|
|
157
|
+
|
|
158
|
+
// Restart failed commands with exponential backoff
|
|
159
|
+
await runConcurrently(["flaky-command"], {
|
|
160
|
+
restart: { tries: 3, delay: "exponential" },
|
|
161
|
+
});
|
|
162
|
+
|
|
163
|
+
// Print timing summary after completion
|
|
164
|
+
await runConcurrently(["npm run build", "npm run test"], {
|
|
165
|
+
timings: true,
|
|
166
|
+
});
|
|
167
|
+
|
|
168
|
+
// Run cleanup commands after all processes finish
|
|
169
|
+
await runConcurrently(["npm run dev"], {
|
|
170
|
+
teardown: ["docker compose down", "rm -rf .cache"],
|
|
171
|
+
});
|
|
88
172
|
```
|
|
89
173
|
|
|
174
|
+
### Shell Configuration
|
|
175
|
+
|
|
176
|
+
The runner automatically detects `npm config set script-shell` for custom shells (e.g., Git Bash on Windows):
|
|
177
|
+
|
|
178
|
+
```typescript
|
|
179
|
+
import { runConcurrently, detectScriptShell } from "@visulima/task-runner";
|
|
180
|
+
|
|
181
|
+
// Auto-detected from npm config
|
|
182
|
+
await runConcurrently(["echo hello"]);
|
|
183
|
+
|
|
184
|
+
// Or override explicitly
|
|
185
|
+
await runConcurrently(["echo hello"], {
|
|
186
|
+
shellPath: "/usr/bin/bash",
|
|
187
|
+
});
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
### Stdin Modes
|
|
191
|
+
|
|
192
|
+
For long-running processes like dev servers:
|
|
193
|
+
|
|
194
|
+
```typescript
|
|
195
|
+
await runConcurrently([
|
|
196
|
+
{ command: "vite dev", stdin: "inherit" }, // Child reads terminal directly
|
|
197
|
+
{ command: "node worker.js", stdin: "null" }, // No stdin (default)
|
|
198
|
+
{ command: "node repl.js", stdin: "pipe" }, // Programmatic stdin access
|
|
199
|
+
]);
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
### Native vs Fallback
|
|
203
|
+
|
|
204
|
+
The runner automatically uses the Rust NAPI addon when available for:
|
|
205
|
+
|
|
206
|
+
- Process tree killing via setsid/killpg (Unix) and Job Objects (Windows)
|
|
207
|
+
- Async I/O multiplexing via tokio
|
|
208
|
+
- Signal propagation (SIGINT/SIGTERM/SIGHUP)
|
|
209
|
+
|
|
210
|
+
Falls back to a pure JavaScript implementation when the native addon is not compiled.
|
|
211
|
+
|
|
90
212
|
## Caching Modes
|
|
91
213
|
|
|
92
214
|
### Nx-style (explicit inputs)
|
|
@@ -94,19 +216,19 @@ const results = await defaultTaskRunner(tasks, {
|
|
|
94
216
|
Declare which files, env vars, and runtime values should be included in the cache hash:
|
|
95
217
|
|
|
96
218
|
```typescript
|
|
97
|
-
const results = await defaultTaskRunner(
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
{ env: "NODE_ENV" },
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
test: { inputs: ["production", "{projectRoot}/**/*.test.ts"] },
|
|
219
|
+
const results = await defaultTaskRunner(
|
|
220
|
+
tasks,
|
|
221
|
+
{
|
|
222
|
+
namedInputs: {
|
|
223
|
+
production: ["{projectRoot}/src/**/*", { env: "NODE_ENV" }, { runtime: "node --version" }],
|
|
224
|
+
},
|
|
225
|
+
targetDefaults: {
|
|
226
|
+
build: { inputs: ["production"] },
|
|
227
|
+
test: { inputs: ["production", "{projectRoot}/**/*.test.ts"] },
|
|
228
|
+
},
|
|
108
229
|
},
|
|
109
|
-
|
|
230
|
+
context,
|
|
231
|
+
);
|
|
110
232
|
```
|
|
111
233
|
|
|
112
234
|
### Auto-fingerprint (Vite Task-style)
|
|
@@ -114,11 +236,15 @@ const results = await defaultTaskRunner(tasks, {
|
|
|
114
236
|
Automatically tracks which files a task accesses during execution:
|
|
115
237
|
|
|
116
238
|
```typescript
|
|
117
|
-
const results = await defaultTaskRunner(
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
239
|
+
const results = await defaultTaskRunner(
|
|
240
|
+
tasks,
|
|
241
|
+
{
|
|
242
|
+
autoFingerprint: true,
|
|
243
|
+
fingerprintEnvPatterns: ["VITE_*", "NODE_ENV"],
|
|
244
|
+
cacheDiagnostics: true, // Shows why cache misses occur
|
|
245
|
+
},
|
|
246
|
+
context,
|
|
247
|
+
);
|
|
122
248
|
```
|
|
123
249
|
|
|
124
250
|
## API
|
|
@@ -127,27 +253,47 @@ const results = await defaultTaskRunner(tasks, {
|
|
|
127
253
|
|
|
128
254
|
The main entry point. Runs tasks with caching, scheduling, and lifecycle support.
|
|
129
255
|
|
|
256
|
+
### `runConcurrently(commands, options?)`
|
|
257
|
+
|
|
258
|
+
Run commands concurrently with process management and output streaming.
|
|
259
|
+
|
|
260
|
+
| Option | Type | Description |
|
|
261
|
+
| ------------------ | ---------------------------- | --------------------------------------------------- |
|
|
262
|
+
| `maxProcesses` | `number` | Max simultaneous processes (0 = unlimited) |
|
|
263
|
+
| `killOthers` | `("failure" \| "success")[]` | Kill others when a process exits |
|
|
264
|
+
| `killSignal` | `string` | Signal for killing (default: "SIGTERM") |
|
|
265
|
+
| `killTimeout` | `number` | Ms before SIGKILL after kill signal (default: 5000) |
|
|
266
|
+
| `successCondition` | `string` | "all", "first", "last", "command-\<name\>" |
|
|
267
|
+
| `shellPath` | `string` | Custom shell path (auto-detected from npm config) |
|
|
268
|
+
| `restart` | `{ tries, delay }` | Restart failed commands with backoff |
|
|
269
|
+
| `teardown` | `string[]` | Cleanup commands to run after completion |
|
|
270
|
+
| `timings` | `boolean` | Print timing summary table |
|
|
271
|
+
| `onEvent` | `(event) => void` | Real-time stdout/stderr/close/error events |
|
|
272
|
+
|
|
130
273
|
### Key Options
|
|
131
274
|
|
|
132
|
-
| Option
|
|
133
|
-
|
|
134
|
-
| `parallel`
|
|
135
|
-
| `smartLockfileHashing` | `boolean`
|
|
136
|
-
| `frameworkInference`
|
|
137
|
-
| `autoFingerprint`
|
|
138
|
-
| `globalInputs`
|
|
139
|
-
| `globalEnv`
|
|
140
|
-
| `remoteCache`
|
|
141
|
-
| `dryRun`
|
|
142
|
-
| `summarize`
|
|
143
|
-
| `cacheDiagnostics`
|
|
144
|
-
| `maxCacheSize`
|
|
145
|
-
| `maxCacheAge`
|
|
275
|
+
| Option | Type | Description |
|
|
276
|
+
| ---------------------- | ------------------- | ----------------------------------------------- |
|
|
277
|
+
| `parallel` | `number \| boolean` | Max parallel tasks (default: 3) |
|
|
278
|
+
| `smartLockfileHashing` | `boolean` | Hash only relevant lockfile entries per package |
|
|
279
|
+
| `frameworkInference` | `boolean` | Auto-detect framework env var prefixes |
|
|
280
|
+
| `autoFingerprint` | `boolean` | Enable Vite Task-style auto-fingerprinting |
|
|
281
|
+
| `globalInputs` | `string[]` | Files that invalidate all caches when changed |
|
|
282
|
+
| `globalEnv` | `string[]` | Env vars that invalidate all caches |
|
|
283
|
+
| `remoteCache` | `object` | Remote cache server configuration |
|
|
284
|
+
| `dryRun` | `boolean` | Compute hashes without executing |
|
|
285
|
+
| `summarize` | `boolean` | Generate JSON run summary |
|
|
286
|
+
| `cacheDiagnostics` | `boolean` | Log cache miss reasons |
|
|
287
|
+
| `maxCacheSize` | `string` | Max cache size (e.g., "1GB") |
|
|
288
|
+
| `maxCacheAge` | `number` | Max cache entry age in ms |
|
|
146
289
|
|
|
147
290
|
### Exports
|
|
148
291
|
|
|
149
292
|
The package exports many building blocks for custom task runners:
|
|
150
293
|
|
|
294
|
+
- **Concurrent Runner**: `runConcurrently`, `runConcurrentFallback`, `detectScriptShell`
|
|
295
|
+
- **Command Parser**: `parseCommands`, `expandShortcut`, `expandWildcard`, `expandArguments`, `stripQuotes`
|
|
296
|
+
- **Flow Controllers**: `withRestart`, `createInputHandler`, `logTimings`, `formatTimingTable`, `runTeardown`
|
|
151
297
|
- **Task Graph**: `createTaskGraph`, `findCycle`, `walkTaskGraph`, `makeAcyclic`
|
|
152
298
|
- **Hashing**: `InProcessTaskHasher`, `IncrementalFileHasher`, `computeTaskHash`
|
|
153
299
|
- **Caching**: `Cache`, `RemoteCache`, `FingerprintManager`
|