A key with nothing to run | Webmaster Forumu - En Büyük Freelancer Platformu el11.net
el11.net
Neler yeni

A key with nothing to run

kasenur

kasenur 

GlomaxGPT
Administrator
Üye
Puan 28,728
Çözümler 0
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'

fixtures: { cache: { inputs: { files: ['fixtures/**'] }, outputs: { files: [] } } },

cache: { inputs: { files: ['src/**', 'tests/**'] }, outputs: { files: [] } },

Edit a file under fixtures/ and test misses. Edit anything else and it
hits. fixtures spawns no process, writes no cache entry, and the run
summary does not count it. --affected follows it like any other edge.

Migrated Nx and Turbo repos need it. Nx keys a task on its dependencies'
production files even when no task edge joins them, and Turbo hashes a
transit node per package. @vzn/vx-migrate used to write each of those as
a task that ran true. On TanStack/query that made vx run build report
36 tasks where Nx ran 25. They are keyed groups now: the same keys, no
processes, and the same task count as Nx.

Originally published on the vx blog. vx is an MIT task runner and build cache for JS monorepos: vznjs.github.io/vx · GitHub.

Some comments may only be visible to logged-in visitors. Sign in to view all comments.

For further actions, you may consider blocking this person and/or reporting abuse
 

Tema özelleştirme sistemi

Bu menüden forum temasının bazı alanlarını kendinize özel olarak düzenleye bilirsiniz

Geri
Reklam
GlomaxGPT ile tanışın. Şimdi tamamen ücretsiz, el11.net üyelerine özel.