Urgent.News

What's breaking now, across thousands of outlets.

Tech

A key with nothing to run

Some inputs belong to no command. Test fixtures, a shared config, or the source of a dependency that needs no build: a task should re-run when they change, but nothing has to run for them on their own. A group task can now carry that key: // vx.config.ts import { defineProject } from ' @vzn/vx/config ' export default defineProject ({ tasks : { fixtures : { cache : { inputs : { files : [ '…

Inputs can lack a command association. Test fixtures, a shared configuration, or a dependency source needing no build require re-running when they modify, yet they do not necessitate running independently. A group task can now incorporate such a key: // vx.config.ts import { defineProject } from '@vzn/vx/config' export default defineProject ({ tasks : { fixtures : { cache : { inputs : { files : [ fixtures/** ] }, outputs : { files : [] } } }, test : { exec : { command : 'bun test' }, dependsOn : [ fixtures ], cache : { inputs : { files : [ src/** , tests/** ] }, outputs : { files : [] } }, }, }, }) Altering a fixture file causes test failure, whereas modifying any other element triggers re-run.

Fixtures launch no process, produce no cache entry, and do not factor into the run summary. --affected behaves like other edge cases. Migration of Nx and Turbo repositories necessitates this. Nx tags a task based on its dependencies, even for production files, while Turbo hashes a transit node per package. @vzn/vx-migrate previously treated each as a running task: true.

TanStack/query led to vx executing 36 tasks, compared to Nx's 25. These tasks now share identical keys, operate without processes, and maintain the same task count as Nx. First published on the vx blog. vx serves as an MIT task runner and build cache for JavaScript monorepos: vznjs.github.io/vx · GitHub. Developed with AI assistance.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

A pipeline with seams

The word "plugin" usually means one of two things. Either a plugin is a whole subsystem with its own configuration language (Nx executors), or it is a callback bolted to one event the tool happened to…

  • vx operates like a pipeline with predefined hooks
  • Plugins fulfill required hooks in the pipeline
  • Each plugin operates independently with minimal interference

More from Friday 9 October →