Skip to content

v0.2.0

Choose a tag to compare

@github-actions github-actions released this 27 Nov 22:31
· 9 commits to main since this release
3dc66cd
  • affected tests asks Vitest (3+) or Jest which test files and setup files it would run, and makes one entry per test file. Setup files are extra roots of each entry; runner configs are globals.

  • A command after -- runs with the selection: {files} and {names} expand to it, an empty selection skips it, and a failed analysis runs it on everything. Strict selection is the default with tests and with a command.

  • --format paths|vitest|jest|playwright prints the hit files, or runner arguments that run exactly them or nothing. --json and --names remain as short forms.

  • Glob entries: -e 'src/**/*.test.ts' makes one entry per file git does not ignore; globs also expand inside -e name=…. globEntries() and expandGlobs() in the API.

  • affected.config.{ts,mts,js,mjs,json} holds entries, globals, base, strict, types and test discovery; defineConfig keeps entry names typed. Flags replace same-named entries and add to globals.

  • GitHub Action enekos/affected@v0: fetches the base and deepens shallow checkouts, runs a command on the selection, sets outputs and writes a job summary. Releases move the v0 tag.

  • --github-output also writes files, matrix, count and total; --github-summary writes a Markdown table of hits and chains.

  • --base defaults to auto when --changed is not given.

  • Added per-entry uncertainty diagnostics, opt-in strict selection, traced dependency edges with a Node File Trace adapter, and shadow comparison against full Vitest or Jest JSON results.

  • npm v2/v3 lockfile changes select transitive consumers. Missing or unsupported lockfile information selects all entries.

  • pnpm v6/v9 and Yarn Berry lockfile changes select transitive consumers, following pnpm peer-suffixed snapshots and Yarn peer dependencies. Yarn classic and Bun lockfiles, unknown versions, and settings, override or patch changes still select all entries.

  • Fixed runtime and declaration export conditions, dynamic import comments, file-entry tsconfig inputs, config parent precedence, tracked symlinks, committed snapshots, module-relative CLI paths and Vite glob exclusions.

  • CLI option errors exit 2. CI examples propagate analysis errors.

  • Standalone affected binary (Rust crate affected-ts) for CI without Node: static Linux musl, macOS and Windows builds on each GitHub release with sha256 files, cargo binstall metadata and a Homebrew formula template. Same flags and output as the Node CLI except shadow mode; reads affected.config.json and adds --version.

npm: https://www.npmjs.com/package/@enekos/affected/v/0.2.0

Without Node: affected-<target>.tar.gz (.zip on Windows), each with a .sha256, or cargo binstall --git https://github.com/enekos/affected affected-ts.