@visulima/task-runner 0.0.1 → 1.0.0-alpha.10

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.
Files changed (58) hide show
  1. package/CHANGELOG.md +212 -0
  2. package/LICENSE.md +21 -0
  3. package/README.md +307 -29
  4. package/dist/index.d.ts +3166 -0
  5. package/dist/index.js +1 -0
  6. package/dist/packem_chunks/index.js +11 -0
  7. package/dist/packem_shared/Cache-C540ZPYk.js +2 -0
  8. package/dist/packem_shared/CompositeLifeCycle-D0zWvAXJ.js +1 -0
  9. package/dist/packem_shared/FileAccessTracker-DSNf03JW.js +47 -0
  10. package/dist/packem_shared/FingerprintManager-CYW2EwLc.js +2 -0
  11. package/dist/packem_shared/HttpRemoteCache-Ch-_9ejF.js +1 -0
  12. package/dist/packem_shared/INPUT_URI_SCHEMES-Csrd0tlg.js +1 -0
  13. package/dist/packem_shared/IncrementalFileHasher-jtLxMBKy.js +1 -0
  14. package/dist/packem_shared/LogReporter-BUPWiXAq.js +13 -0
  15. package/dist/packem_shared/ReapiRemoteCache-B3uQuVqP.js +251 -0
  16. package/dist/packem_shared/TaskOrchestrator-BgfOpjuB.js +2 -0
  17. package/dist/packem_shared/TerminalBuffer-BtZy7TpT.js +3 -0
  18. package/dist/packem_shared/TrackedTaskExecutor-D3-LNT_d.js +2 -0
  19. package/dist/packem_shared/V2_ROOT-injxWBrl.js +1 -0
  20. package/dist/packem_shared/actionDigestForTaskHash-BOL4fZ9v.js +1 -0
  21. package/dist/packem_shared/archive-CDfGy5Lm.js +1 -0
  22. package/dist/packem_shared/buildForwardDependencyMap-w1FVPFdv.js +3 -0
  23. package/dist/packem_shared/collectFiles-W4bnBRpb.js +1 -0
  24. package/dist/packem_shared/computeTaskHash-C2Iua2DL.js +1 -0
  25. package/dist/packem_shared/containsBlob-DBWgvkM_.js +1 -0
  26. package/dist/packem_shared/createInputHandler-CkDCpPYy.js +1 -0
  27. package/dist/packem_shared/createTaskGraph-CEYYI-DL.js +1 -0
  28. package/dist/packem_shared/defaultTaskRunner-CGbD4ahu.js +2 -0
  29. package/dist/packem_shared/detectFrameworks-WVZJOPgN.js +1 -0
  30. package/dist/packem_shared/detectScriptShell-CaTDk5cW.js +1 -0
  31. package/dist/packem_shared/digestBuffer-g11aCaDx.js +1 -0
  32. package/dist/packem_shared/enforceProjectConstraints-X49n3bVL.js +1 -0
  33. package/dist/packem_shared/expandArguments-4mab7-Ds.js +1 -0
  34. package/dist/packem_shared/expandShortcut-BErNHNXZ.js +1 -0
  35. package/dist/packem_shared/expandTokensInString-Cyx0qSFA.js +1 -0
  36. package/dist/packem_shared/expandWildcard-DE0dOOZF.js +1 -0
  37. package/dist/packem_shared/extractPackageName-BeL6Gc3a.js +1 -0
  38. package/dist/packem_shared/findCycle-BY8-jmzB.js +1 -0
  39. package/dist/packem_shared/formatTimingTable-CP3rsDwf.js +7 -0
  40. package/dist/packem_shared/generateRunSummary-ep21OCUT.js +1 -0
  41. package/dist/packem_shared/getCurrentBranch-D-qoZByx.js +1 -0
  42. package/dist/packem_shared/getMainWorktreeRoot-DRN_i8jA.js +1 -0
  43. package/dist/packem_shared/isNativeAvailable-BOavFPX1.js +1 -0
  44. package/dist/packem_shared/parseCommands-b1K2vIxj.js +1 -0
  45. package/dist/packem_shared/parsePartition-uzPNgtPp.js +1 -0
  46. package/dist/packem_shared/projectGraphToDot-K5A_CRoW.js +250 -0
  47. package/dist/packem_shared/resolveCacheMode-XhD7mg7G.js +1 -0
  48. package/dist/packem_shared/resolveOutputs-BBjdaraf.js +1 -0
  49. package/dist/packem_shared/runConcurrentFallback-CShJ7HUp.js +3 -0
  50. package/dist/packem_shared/runConcurrently-B471CUHO.js +1 -0
  51. package/dist/packem_shared/runTeardown-DBBpBAyb.js +1 -0
  52. package/dist/packem_shared/shell-quote-CksLqyXK.js +1 -0
  53. package/dist/packem_shared/stripQuotes-jkZb0CL9.js +1 -0
  54. package/dist/packem_shared/toChromeTrace-DxN5NQIU.js +1 -0
  55. package/dist/packem_shared/utils-BH2W5Wml.js +1 -0
  56. package/dist/packem_shared/withRestart-CWO6BKv_.js +1 -0
  57. package/index.js +775 -0
  58. package/package.json +86 -7
package/CHANGELOG.md ADDED
@@ -0,0 +1,212 @@
1
+ ## @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)
2
+
3
+ ### Features
4
+
5
+ * **task-runner:** add per-target maxConcurrent and workspace concurrencyGroups ([985d5d1](https://github.com/visulima/visulima/commit/985d5d1d3a594f3b42cfa3f7735bc1bb8055563e))
6
+
7
+ ### Miscellaneous Chores
8
+
9
+ * **task-runner:** clear lint warnings ([05fa2b6](https://github.com/visulima/visulima/commit/05fa2b6fa259607933fc709dc871b5ef52294721))
10
+ * **task-runner:** fix lint errors ([0f5a6d0](https://github.com/visulima/visulima/commit/0f5a6d00bd321b98f9b4289923e151c59a5b7e58))
11
+ * **task-runner:** fix lint errors in test files ([5e7dc4f](https://github.com/visulima/visulima/commit/5e7dc4fcee277691034666a252d97503aa7be0a4))
12
+ * **task-runner:** housekeeping cleanup ([e837f11](https://github.com/visulima/visulima/commit/e837f1166b43bcfbccfdffe693248db498c0fe1d))
13
+
14
+ ### Continuous Integration
15
+
16
+ * integrate codspeed for benchmark tracking ([e758f3d](https://github.com/visulima/visulima/commit/e758f3da491cc00d3f8bbf10d7ba3fdf8deb5325))
17
+
18
+ ## @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)
19
+
20
+ ### Features
21
+
22
+ * **task-runner,vis:** cache restoration fidelity ([a15cb22](https://github.com/visulima/visulima/commit/a15cb22bde832cfe76ee017722b8b9f9102dac8f))
23
+ * **task-runner:** add REAPI gRPC backend, cacheMode, and cache doctor ([03e6da9](https://github.com/visulima/visulima/commit/03e6da97beb84f6adc4a07a1c7ca4acf28be3b33))
24
+ * **task-runner:** add URI-based input format ([050b583](https://github.com/visulima/visulima/commit/050b5838c15590a3ccba0ca99ad585cbabc36d99))
25
+ * **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)
26
+
27
+ ### Bug Fixes
28
+
29
+ * **vis:** preserve probe error on close failure and clamp formatAge ([f1d71d6](https://github.com/visulima/visulima/commit/f1d71d63a5432fc2ed8c09c9a0a87e4e59b83b0b))
30
+
31
+ ### Documentation
32
+
33
+ * **task-runner:** cover when/always, tokens, REAPI, hooks ([1515cd3](https://github.com/visulima/visulima/commit/1515cd349db41fcfe83ae86ed4d52df8dccbf985))
34
+
35
+ ### Miscellaneous Chores
36
+
37
+ * catalog refresh + task-runner binding bump to 1.0.0-alpha.8 ([ff4548a](https://github.com/visulima/visulima/commit/ff4548a5678c992048a57e73c310757733c04756))
38
+ * **deps:** bump rust crates to current majors ([3a1d9bb](https://github.com/visulima/visulima/commit/3a1d9bb7f6e2c6b2d3862e212ae62707d60815cc))
39
+
40
+ ### Code Refactoring
41
+
42
+ * **task-runner,vis:** consolidate helpers and tighten branches ([d1290d1](https://github.com/visulima/visulima/commit/d1290d1f614036902c6803d8ff51df100fdd07ab))
43
+ * **task-runner,vis:** expose worktree helpers from task-runner ([12468d7](https://github.com/visulima/visulima/commit/12468d76bb03278ec56691ba0c6d9821c9482f94))
44
+
45
+ ### Tests
46
+
47
+ * **task-runner:** split tests into unit/integration mirroring src layout ([ae78f99](https://github.com/visulima/visulima/commit/ae78f992d24626f3b23de56fa735aced47b1220e))
48
+
49
+ ## @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)
50
+
51
+ ### Features
52
+
53
+ * **task-runner:** expose worktree detection napi bindings ([3d67028](https://github.com/visulima/visulima/commit/3d670284090010616956a024a4e5465ee91bbcd4))
54
+ * **task-runner:** graceful Ctrl+Break on Windows SIGINT ([ae44b1c](https://github.com/visulima/visulima/commit/ae44b1c855839746092a91430eb49b216d1172ec))
55
+ * **task-runner:** tokens, when, and always tasks ([5ae6505](https://github.com/visulima/visulima/commit/5ae65055d97e97d7ad7ff9088996da37d964da3f))
56
+
57
+ ### Bug Fixes
58
+
59
+ * **vis:** address review findings on watch UX bundle ([edee703](https://github.com/visulima/visulima/commit/edee7038fe23a488791682dd8ce5c469b40a3e8c))
60
+
61
+ ### Miscellaneous Chores
62
+
63
+ * re-sort workspace package.json files via vis sort-package-json ([f625696](https://github.com/visulima/visulima/commit/f625696cfac974325774b3243e1a83c3d23acbd7))
64
+ * **task-runner:** upgrade packem to 2.0.0-alpha.76 ([5f59c41](https://github.com/visulima/visulima/commit/5f59c4140f89019cc3756ac917e1bda7ded0beec))
65
+
66
+ ## @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)
67
+
68
+ ### Bug Fixes
69
+
70
+ * **ci:** publish native addons via local semantic-release plugin ([974beb2](https://github.com/visulima/visulima/commit/974beb2d021e7b2afc86b958bd2137be88d2f464))
71
+ * 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))
72
+
73
+ ### Miscellaneous Chores
74
+
75
+ * update the jsr.json ([864ab7e](https://github.com/visulima/visulima/commit/864ab7e71c4b5ae82f64792d1ae8debfea2c539b))
76
+
77
+
78
+ ### Dependencies
79
+
80
+ * **@visulima/humanizer:** upgraded to 3.0.0-alpha.11
81
+ * **@visulima/path:** upgraded to 3.0.0-alpha.10
82
+
83
+ ## @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)
84
+
85
+ ### Features
86
+
87
+ * **task-runner:** output globs, auto-writes, parallel cache IO ([137f53f](https://github.com/visulima/visulima/commit/137f53f7f5a4d8c16df511c9d145b2c158025a32))
88
+ * **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)
89
+
90
+ ### Bug Fixes
91
+
92
+ * **task-runner:** resolve eslint errors in chrome-trace and task-hasher ([2cf6266](https://github.com/visulima/visulima/commit/2cf6266b8252bc24a6d900f49f97611d4d629ff3))
93
+
94
+ ### Miscellaneous Chores
95
+
96
+ * **api-platform:** apply pending lint and source updates ([3fb0043](https://github.com/visulima/visulima/commit/3fb0043a4cf35f752ca89a09a077100ae0142da8))
97
+ * bump engines.node to ^22.14.0 || >=24.10.0 ([c3d0931](https://github.com/visulima/visulima/commit/c3d0931d1504e4f21ebf50ea680cfa7ce4ba15ce))
98
+ * fixed jsr.json ([5d85e51](https://github.com/visulima/visulima/commit/5d85e5179de38e284ec433b14d77c71a1619c8d6))
99
+ * **task-runner:** apply formatter and lint fixes ([70b4641](https://github.com/visulima/visulima/commit/70b4641b394897ebfc021425b992db936e320d8a))
100
+ * **task-runner:** apply formatter and lint fixes ([aee664f](https://github.com/visulima/visulima/commit/aee664f0a03ed9c1eb8bf7a6a91e62f601a3d5ff))
101
+ * **task-runner:** apply pending changes ([9d92517](https://github.com/visulima/visulima/commit/9d92517f1a54bc28a19cb8cbdb937cdc234e152d))
102
+ * **task-runner:** apply pending lint and source updates ([c01eb39](https://github.com/visulima/visulima/commit/c01eb393f991d8fc96f8ed87bfc71d90902ee659))
103
+ * **task-runner:** enforce curly braces and apply lint fixes ([4fbd8ee](https://github.com/visulima/visulima/commit/4fbd8eefa1b56f428528b495b074d5c266fb6733))
104
+
105
+ ### Code Refactoring
106
+
107
+ * replace inline import() types with top-level imports ([4569a4c](https://github.com/visulima/visulima/commit/4569a4ca04723da069f985855dcfab292f7347e1))
108
+
109
+ ### Tests
110
+
111
+ * **task-runner:** remove native binding guard from tests ([90f0dff](https://github.com/visulima/visulima/commit/90f0dffe85f4b83e76905a26d53b917365116b45))
112
+ * **task-runner:** skip default excludes for tmpdir-backed tracker tests ([0db0620](https://github.com/visulima/visulima/commit/0db06206173f0799244fafcc578b9fb0be9d2fb6))
113
+
114
+ ## @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)
115
+
116
+ ### Features
117
+
118
+ * Add comprehensive workspace configuration and command infrastructure ([#609](https://github.com/visulima/visulima/issues/609)) ([f4347bf](https://github.com/visulima/visulima/commit/f4347bfdcdd1b228cd9d842a927e446aaf23f035))
119
+ * **vis:** add cache command for task runner cache ([#607](https://github.com/visulima/visulima/issues/607)) ([6752769](https://github.com/visulima/visulima/commit/67527692562b3dd9c03bb6a67c084ff1e694a560))
120
+
121
+ ### Bug Fixes
122
+
123
+ * **tooling:** resolve eslint and formatting issues ([399d292](https://github.com/visulima/visulima/commit/399d29282be5b29bb26b4e5b24d45e2a6cdeeca3))
124
+
125
+
126
+ ### Dependencies
127
+
128
+ * **@visulima/humanizer:** upgraded to 3.0.0-alpha.10
129
+ * **@visulima/path:** upgraded to 3.0.0-alpha.9
130
+
131
+ ## @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)
132
+
133
+ ### Features
134
+
135
+ * Add native Rust bindings for package manager operations ([#596](https://github.com/visulima/visulima/issues/596)) ([2ec22d0](https://github.com/visulima/visulima/commit/2ec22d023eade3fed67fb811696fbd8f7b52569d))
136
+ * **task-runner, vis:** project constraints, CI partitioning, affected scopes ([29295e9](https://github.com/visulima/visulima/commit/29295e989ecdfe2019469d1917a6c90a92e17bcf))
137
+ * **task-runner:** add concurrent process runner with Rust NAPI bindings ([c4f5d93](https://github.com/visulima/visulima/commit/c4f5d930e81a5eb641ceb3ab925c3b10a885bb6a))
138
+ * **vis:** expand devcontainer command with templates, validation, and config properties ([807e730](https://github.com/visulima/visulima/commit/807e730a43f0ea644d016b4f5506706972d2ff41))
139
+ * **vis:** group CLI commands into logical categories for help output ([0a4cac8](https://github.com/visulima/visulima/commit/0a4cac859c8edf7aacdacca7b9a03219967d525a))
140
+ * **vis:** replace inline TUI with full-screen Nx-style interactive task runner ([1409aad](https://github.com/visulima/visulima/commit/1409aad879c713051bba12298a3feb1d5ba852f2))
141
+
142
+ ### Bug Fixes
143
+
144
+ * **ci:** make native-binding tests work with and without compiled binary ([9a40fb4](https://github.com/visulima/visulima/commit/9a40fb40d5cba9fcd2e0176eea8b7bf8d9792c7d))
145
+ * **task-runner,tui:** guard null native events and increase CI test timeout ([e76a791](https://github.com/visulima/visulima/commit/e76a791d90043537e08be0545f706e35acaa555d))
146
+ * **task-runner:** deno.json support, Windows Job Objects, docs, and review fixes ([4fb27f0](https://github.com/visulima/visulima/commit/4fb27f081b4b50b41dbb86b5b1a962b63f7a6df3))
147
+ * **task-runner:** fix Windows cross-compilation by upgrading windows-sys to 0.61 ([b56b95e](https://github.com/visulima/visulima/commit/b56b95e2a39ca972398859e6eb87e528f4463d97))
148
+ * **task-runner:** resolve eslint errors ([f0a21a6](https://github.com/visulima/visulima/commit/f0a21a689bc9e1d8b091a513e21cb11b77103ba4))
149
+ * **task-runner:** use JS fallback for onEvent streaming, fix StaticRender ref ([1a7165c](https://github.com/visulima/visulima/commit/1a7165cd9eb71472895cd08682983fa25703dc93))
150
+ * **tsconfig:** add node types and fix implicit any parameter ([1744d82](https://github.com/visulima/visulima/commit/1744d82a07fca03f2e6ff660b918e9b2623acf69))
151
+
152
+ ### Miscellaneous Chores
153
+
154
+ * added og images ([02d9d1e](https://github.com/visulima/visulima/commit/02d9d1e47be3ce75679ea89e857dc4e4bfe4946b))
155
+ * **task-runner:** add tsconfig.eslint.json for type-aware linting ([83e0bf2](https://github.com/visulima/visulima/commit/83e0bf23511a169b801f6edf652a8be7ee968c24))
156
+ * **task-runner:** apply prettier formatting ([521afc2](https://github.com/visulima/visulima/commit/521afc22d94a2626c7246062cecfc0627f929ee4))
157
+ * **task-runner:** expand inline if-return to block syntax ([0f48a96](https://github.com/visulima/visulima/commit/0f48a96ed11d7339c62f3f147c7b2c8fcc605b03))
158
+ * **task-runner:** migrate .prettierrc.cjs to prettier.config.js ([cd1c045](https://github.com/visulima/visulima/commit/cd1c045e133f685a274924034ec70cf374edd5ba))
159
+
160
+ ### Build System
161
+
162
+ * regenerate NAPI-RS bindings as ESM ([f202caf](https://github.com/visulima/visulima/commit/f202caf3dc383a2ec24815c4935d8d68c29f33d0))
163
+ * switch NAPI-RS native builds to ESM output ([3d7cd61](https://github.com/visulima/visulima/commit/3d7cd615ad830392005915735c11771e0247ef3f))
164
+ * **task-runner:** move publish-native-addons to shared scripts/ ([73b5482](https://github.com/visulima/visulima/commit/73b5482e1ca0707aa8f191429deffbd7324a632d))
165
+
166
+
167
+ ### Dependencies
168
+
169
+ * **@visulima/humanizer:** upgraded to 3.0.0-alpha.9
170
+ * **@visulima/path:** upgraded to 3.0.0-alpha.8
171
+
172
+ ## @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)
173
+
174
+ ### Features
175
+
176
+ * **web:** auto-generate packages page from workspace metadata ([623e520](https://github.com/visulima/visulima/commit/623e5207693a7fe720f5f2f179593a3654c880e3))
177
+
178
+ ### Miscellaneous Chores
179
+
180
+ * **task-runner:** remove redundant extends from .releaserc.json ([8969dfa](https://github.com/visulima/visulima/commit/8969dfaeccf3a36e40ecb9ba659187f81dda4ce1))
181
+
182
+ ### Continuous Integration
183
+
184
+ * **task-runner:** use escaped newlines in git commit message template ([b3045b6](https://github.com/visulima/visulima/commit/b3045b6c2c5afc641c699932fbf90effe7c31563))
185
+
186
+
187
+ ### Dependencies
188
+
189
+ * **@visulima/humanizer:** upgraded to 3.0.0-alpha.8
190
+ * **@visulima/path:** upgraded to 3.0.0-alpha.7
191
+
192
+ ## @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)
193
+
194
+ ### Bug Fixes
195
+
196
+ * **task-runner:** publish native binding packages with version lockstep via exec plugin ([12e342f](https://github.com/visulima/visulima/commit/12e342f1656ad0b595eaff627d3407c61c4ea7b6))
197
+
198
+ ### Miscellaneous Chores
199
+
200
+ * **task-runner:** add project.json for all native binding packages ([eb48812](https://github.com/visulima/visulima/commit/eb48812cb87c0990b9822d9314ccc0081e41d11f))
201
+
202
+ ## @visulima/task-runner 1.0.0-alpha.1 (2026-03-26)
203
+
204
+ ### Features
205
+
206
+ * Add @visulima/task-runner , vis and find-ai-runner ([#594](https://github.com/visulima/visulima/issues/594)) ([034b5db](https://github.com/visulima/visulima/commit/034b5db8aadcc02e23abe007208c5196859c7755))
207
+
208
+
209
+ ### Dependencies
210
+
211
+ * **@visulima/humanizer:** upgraded to 3.0.0-alpha.7
212
+ * **@visulima/path:** upgraded to 3.0.0-alpha.6
package/LICENSE.md ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 visulima
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,45 +1,323 @@
1
- # @visulima/task-runner
1
+ <div align="center">
2
+ <h3>Visulima task-runner</h3>
3
+ <p>
4
+ High-performance monorepo task runner with intelligent caching, dependency-aware scheduling, and auto-fingerprinting.
5
+ </p>
6
+ </div>
2
7
 
3
- ## ⚠️ IMPORTANT NOTICE ⚠️
8
+ <br />
4
9
 
5
- **This package is created solely for the purpose of setting up OIDC (OpenID Connect) trusted publishing with npm.**
10
+ <div align="center">
6
11
 
7
- This is **NOT** a functional package and contains **NO** code or functionality beyond the OIDC setup configuration.
12
+ [![typescript-image]][typescript-url] [![npm-image]][npm-url] [![license-image]][license-url]
8
13
 
9
- ## Purpose
14
+ </div>
10
15
 
11
- This package exists to:
12
- 1. Configure OIDC trusted publishing for the package name `@visulima/task-runner`
13
- 2. Enable secure, token-less publishing from CI/CD workflows
14
- 3. Establish provenance for packages published under this name
16
+ ---
17
+
18
+ <div align="center">
19
+ <p>
20
+ <sup>
21
+ Daniel Bannert's open source work is supported by the community on <a href="https://github.com/sponsors/prisis">GitHub Sponsors</a>
22
+ </sup>
23
+ </p>
24
+ </div>
15
25
 
16
- ## What is OIDC Trusted Publishing?
26
+ ---
17
27
 
18
- OIDC trusted publishing allows package maintainers to publish packages directly from their CI/CD workflows without needing to manage npm access tokens. Instead, it uses OpenID Connect to establish trust between the CI/CD provider (like GitHub Actions) and npm.
28
+ ## Features
19
29
 
20
- ## Setup Instructions
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
36
+ - **Two caching modes**: Nx-style explicit inputs or Vite Task-style auto-fingerprinting
37
+ - **Smart lockfile hashing**: Only hashes resolved versions relevant to each package (like Turborepo)
38
+ - **Framework env inference**: Auto-detects Next.js, Vite, CRA, Gatsby, Nuxt, and more
39
+ - **Remote caching**: Turborepo-compatible HTTP cache protocol, plus a Bazel REAPI gRPC backend (bazel-remote, BuildBuddy, BuildBarn, EngFlow)
40
+ - **Native Rust addon**: Parallel file hashing (xxHash), concurrent process management via tokio
41
+ - **Dependency-aware scheduling**: Topological task ordering with priority-based batching
42
+ - **Incremental file hashing**: mtime-based change detection for near-instant cache checks
43
+ - **Affected detection**: Git diff-based filtering to only run tasks for changed packages
44
+ - **Conditional tasks**: `when:` predicates (`os`, `env`, `branch`, `ci`) and `always: true` finally-tasks for cleanup/notifications
45
+ - **Graph visualization**: DOT, JSON, HTML, and ASCII output formats
46
+ - **Log reporter modes**: `interleaved`, `labeled` (per-line `[project#target]` prefix), and `grouped` (header/footer wrapping) for vite-task parity
47
+ - **Run summaries**: Detailed JSON reports for debugging cache behavior
48
+ - **Cache diagnostics**: Explains exactly why a cache miss occurred
49
+ - **Output archiving**: Caches and restores build outputs (dist/ directories)
50
+ - **LRU cache eviction**: Configurable max size and age limits
51
+ - **Lifecycle hooks**: 7 hook points for custom behavior
21
52
 
22
- To properly configure OIDC trusted publishing for this package:
53
+ ## Install
23
54
 
24
- 1. Go to [npmjs.com](https://www.npmjs.com/) and navigate to your package settings
25
- 2. Configure the trusted publisher (e.g., GitHub Actions)
26
- 3. Specify the repository and workflow that should be allowed to publish
27
- 4. Use the configured workflow to publish your actual package
55
+ ```bash
56
+ npm install @visulima/task-runner
57
+ ```
28
58
 
29
- ## DO NOT USE THIS PACKAGE
59
+ ```bash
60
+ yarn add @visulima/task-runner
61
+ ```
30
62
 
31
- This package is a placeholder for OIDC configuration only. It:
32
- - Contains no executable code
33
- - Provides no functionality
34
- - Should not be installed as a dependency
35
- - Exists only for administrative purposes
63
+ ```bash
64
+ pnpm add @visulima/task-runner
65
+ ```
36
66
 
37
- ## More Information
67
+ ## Quick Start
38
68
 
39
- For more details about npm's trusted publishing feature, see:
40
- - [npm Trusted Publishing Documentation](https://docs.npmjs.com/generating-provenance-statements)
41
- - [GitHub Actions OIDC Documentation](https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect)
69
+ ```typescript
70
+ import { defaultTaskRunner } from "@visulima/task-runner";
42
71
 
43
- ---
72
+ const results = await defaultTaskRunner(
73
+ tasks,
74
+ {
75
+ // Nx-style: explicit inputs
76
+ namedInputs: {
77
+ production: ["{projectRoot}/src/**/*"],
78
+ },
79
+ globalInputs: ["pnpm-lock.yaml", "tsconfig.base.json"],
80
+ globalEnv: ["NODE_ENV"],
81
+
82
+ // Or: auto-fingerprinting (Vite Task-style)
83
+ // autoFingerprint: true,
84
+
85
+ // Smart lockfile hashing (only bust cache for affected packages)
86
+ smartLockfileHashing: true,
87
+
88
+ // Auto-detect framework env vars (NEXT_PUBLIC_*, VITE_*, etc.)
89
+ frameworkInference: true,
90
+
91
+ // Remote cache (Turborepo-compatible)
92
+ remoteCache: {
93
+ url: "https://cache.example.com",
94
+ token: process.env.CACHE_TOKEN,
95
+ teamId: "my-team",
96
+ },
97
+ },
98
+ context,
99
+ );
100
+ ```
101
+
102
+ ## Concurrent Process Runner
103
+
104
+ Run multiple commands in parallel with real-time output streaming, process tree management, and automatic native acceleration.
105
+
106
+ ```typescript
107
+ import { runConcurrently } from "@visulima/task-runner";
108
+
109
+ // Basic usage
110
+ const result = await runConcurrently(["npm run build", "npm run test", "npm run lint"]);
111
+ console.log(result.success ? "All passed" : "Some failed");
112
+
113
+ // With options
114
+ const result = await runConcurrently(
115
+ [
116
+ { command: "vite dev", name: "web", stdin: "inherit" },
117
+ { command: "node api.js", name: "api" },
118
+ ],
119
+ {
120
+ maxProcesses: 4,
121
+ killOthers: ["failure"], // Kill all if one fails
122
+ successCondition: "all", // All must exit 0
123
+ onEvent: (event) => {
124
+ // Real-time streaming
125
+ if (event.kind === "stdout") {
126
+ console.log(`[${event.index}] ${event.text}`);
127
+ }
128
+ },
129
+ },
130
+ );
131
+ ```
132
+
133
+ ### Command Parser
134
+
135
+ Use `parseCommands` to expand shortcuts and wildcards before passing to `runConcurrently`:
136
+
137
+ ```typescript
138
+ import { parseCommands, runConcurrently } from "@visulima/task-runner";
139
+
140
+ const commands = parseCommands([
141
+ "npm:build", // -> npm run build
142
+ "pnpm:test", // -> pnpm run test
143
+ '"quoted command"', // -> quoted command (quotes stripped)
144
+ "npm run watch-*", // -> expands to all matching scripts in package.json
145
+ "deno task dev-*", // -> expands from deno.json/deno.jsonc tasks
146
+ ]);
147
+
148
+ await runConcurrently(commands);
149
+ ```
150
+
151
+ ### Flow Controllers
152
+
153
+ ```typescript
154
+ import { runConcurrently } from "@visulima/task-runner";
155
+
156
+ // Restart failed commands with exponential backoff
157
+ await runConcurrently(["flaky-command"], {
158
+ restart: { tries: 3, delay: "exponential" },
159
+ });
160
+
161
+ // Print timing summary after completion
162
+ await runConcurrently(["npm run build", "npm run test"], {
163
+ timings: true,
164
+ });
165
+
166
+ // Run cleanup commands after all processes finish
167
+ await runConcurrently(["npm run dev"], {
168
+ teardown: ["docker compose down", "rm -rf .cache"],
169
+ });
170
+ ```
171
+
172
+ ### Shell Configuration
173
+
174
+ The runner automatically detects `npm config set script-shell` for custom shells (e.g., Git Bash on Windows):
175
+
176
+ ```typescript
177
+ import { runConcurrently, detectScriptShell } from "@visulima/task-runner";
178
+
179
+ // Auto-detected from npm config
180
+ await runConcurrently(["echo hello"]);
181
+
182
+ // Or override explicitly
183
+ await runConcurrently(["echo hello"], {
184
+ shellPath: "/usr/bin/bash",
185
+ });
186
+ ```
187
+
188
+ ### Stdin Modes
189
+
190
+ For long-running processes like dev servers:
191
+
192
+ ```typescript
193
+ await runConcurrently([
194
+ { command: "vite dev", stdin: "inherit" }, // Child reads terminal directly
195
+ { command: "node worker.js", stdin: "null" }, // No stdin (default)
196
+ { command: "node repl.js", stdin: "pipe" }, // Programmatic stdin access
197
+ ]);
198
+ ```
199
+
200
+ ### Native vs Fallback
201
+
202
+ The runner automatically uses the Rust NAPI addon when available for:
203
+
204
+ - Process tree killing via setsid/killpg (Unix) and Job Objects (Windows)
205
+ - Async I/O multiplexing via tokio
206
+ - Signal propagation (SIGINT/SIGTERM/SIGHUP)
207
+
208
+ Falls back to a pure JavaScript implementation when the native addon is not compiled.
209
+
210
+ ## Caching Modes
211
+
212
+ ### Nx-style (explicit inputs)
213
+
214
+ Declare which files, env vars, and runtime values should be included in the cache hash:
215
+
216
+ ```typescript
217
+ const results = await defaultTaskRunner(
218
+ tasks,
219
+ {
220
+ namedInputs: {
221
+ production: ["{projectRoot}/src/**/*", { env: "NODE_ENV" }, { runtime: "node --version" }],
222
+ },
223
+ targetDefaults: {
224
+ build: { inputs: ["production"] },
225
+ test: { inputs: ["production", "{projectRoot}/**/*.test.ts"] },
226
+ },
227
+ },
228
+ context,
229
+ );
230
+ ```
231
+
232
+ ### Auto-fingerprint (Vite Task-style)
233
+
234
+ Automatically tracks which files a task accesses during execution:
235
+
236
+ ```typescript
237
+ const results = await defaultTaskRunner(
238
+ tasks,
239
+ {
240
+ autoFingerprint: true,
241
+ fingerprintEnvPatterns: ["VITE_*", "NODE_ENV"],
242
+ cacheDiagnostics: true, // Shows why cache misses occur
243
+ },
244
+ context,
245
+ );
246
+ ```
247
+
248
+ ## API
249
+
250
+ ### `defaultTaskRunner(tasks, options, context)`
251
+
252
+ The main entry point. Runs tasks with caching, scheduling, and lifecycle support.
253
+
254
+ ### `runConcurrently(commands, options?)`
255
+
256
+ Run commands concurrently with process management and output streaming.
257
+
258
+ | Option | Type | Description |
259
+ | ------------------ | ---------------------------- | --------------------------------------------------- |
260
+ | `maxProcesses` | `number` | Max simultaneous processes (0 = unlimited) |
261
+ | `killOthers` | `("failure" \| "success")[]` | Kill others when a process exits |
262
+ | `killSignal` | `string` | Signal for killing (default: "SIGTERM") |
263
+ | `killTimeout` | `number` | Ms before SIGKILL after kill signal (default: 5000) |
264
+ | `successCondition` | `string` | "all", "first", "last", "command-\<name\>" |
265
+ | `shellPath` | `string` | Custom shell path (auto-detected from npm config) |
266
+ | `restart` | `{ tries, delay }` | Restart failed commands with backoff |
267
+ | `teardown` | `string[]` | Cleanup commands to run after completion |
268
+ | `timings` | `boolean` | Print timing summary table |
269
+ | `onEvent` | `(event) => void` | Real-time stdout/stderr/close/error events |
270
+
271
+ ### Key Options
272
+
273
+ | Option | Type | Description |
274
+ | ---------------------- | ------------------- | ----------------------------------------------- |
275
+ | `parallel` | `number \| boolean` | Max parallel tasks (default: 3) |
276
+ | `smartLockfileHashing` | `boolean` | Hash only relevant lockfile entries per package |
277
+ | `frameworkInference` | `boolean` | Auto-detect framework env var prefixes |
278
+ | `autoFingerprint` | `boolean` | Enable Vite Task-style auto-fingerprinting |
279
+ | `globalInputs` | `string[]` | Files that invalidate all caches when changed |
280
+ | `globalEnv` | `string[]` | Env vars that invalidate all caches |
281
+ | `remoteCache` | `object` | Remote cache server configuration |
282
+ | `dryRun` | `boolean` | Compute hashes without executing |
283
+ | `summarize` | `boolean` | Generate JSON run summary |
284
+ | `cacheDiagnostics` | `boolean` | Log cache miss reasons |
285
+ | `maxCacheSize` | `string` | Max cache size (e.g., "1GB") |
286
+ | `maxCacheAge` | `number` | Max cache entry age in ms |
287
+
288
+ ### Exports
289
+
290
+ The package exports many building blocks for custom task runners:
291
+
292
+ - **Concurrent Runner**: `runConcurrently`, `runConcurrentFallback`, `detectScriptShell`
293
+ - **Command Parser**: `parseCommands`, `expandShortcut`, `expandWildcard`, `expandArguments`, `stripQuotes`
294
+ - **Flow Controllers**: `withRestart`, `createInputHandler`, `logTimings`, `formatTimingTable`, `runTeardown`
295
+ - **Task Graph**: `createTaskGraph`, `findCycle`, `walkTaskGraph`, `makeAcyclic`
296
+ - **Hashing**: `InProcessTaskHasher`, `IncrementalFileHasher`, `computeTaskHash`
297
+ - **Caching**: `Cache`, `RemoteCache`, `FingerprintManager`
298
+ - **Scheduling**: `TaskScheduler`, `TaskOrchestrator`
299
+ - **Lockfile**: `LockfileHasher`, `parseNpmLockfile`, `parsePnpmLockfile`, `parseYarnLockfile`
300
+ - **Framework**: `detectFrameworks`, `inferFrameworkEnvPatterns`, `getFrameworkEnvVariables`
301
+ - **Affected**: `getAffectedProjects`, `getChangedFiles`, `filterAffectedTasks`
302
+ - **Visualization**: `toGraphvizDot`, `toGraphJson`, `toGraphHtml`, `toGraphAscii`
303
+ - **Summary**: `generateRunSummary`, `writeRunSummary`
304
+ - **Lifecycle**: `ConsoleLifeCycle`, `CompositeLifeCycle`
305
+
306
+ ## Supported Node.js Versions
307
+
308
+ Libraries in this ecosystem make the best effort to track [Node.js' release schedule](https://github.com/nodejs/release#release-schedule).
309
+
310
+ ## Contributing
311
+
312
+ If you would like to help take a look at the [list of issues](https://github.com/visulima/visulima/issues) and check our [Contributing](https://github.com/visulima/visulima/blob/main/.github/CONTRIBUTING.md) guidelines.
313
+
314
+ ## License
315
+
316
+ The visulima task-runner is open-sourced software licensed under the [MIT][license-url]
44
317
 
45
- **Maintained for OIDC setup purposes only**
318
+ [typescript-image]: https://img.shields.io/badge/Typescript-294E80.svg?style=for-the-badge&logo=typescript
319
+ [typescript-url]: https://www.typescriptlang.org/
320
+ [license-image]: https://img.shields.io/npm/l/@visulima/task-runner?color=blueviolet&style=for-the-badge
321
+ [license-url]: LICENSE.md
322
+ [npm-image]: https://img.shields.io/npm/v/@visulima/task-runner/latest.svg?style=for-the-badge&logo=npm
323
+ [npm-url]: https://www.npmjs.com/package/@visulima/task-runner/v/latest