Skip to content

v1.14.0

Choose a tag to compare

@github-actions github-actions released this 10 Nov 17:00
· 23 commits to main since this release
0134020
  • New: arch_guard affected. arch_guard affected --since origin/main prints the test files that the branch's changes can affect, one per line, so you can run only those: t=$(arch_guard affected --since origin/main); [ -n "$t" ] && dart test $t. It scans lib/, test/ and integration_test/ of the root and each workspace member, and walks imports, exports and part directives backwards from each changed file, including ignored and conditional imports. A deleted, renamed or generated file (*.g.dart, *.mocks.dart) affects the files that import it. Tests in a workspace root without lib/ are scanned too. A changed pubspec.yaml or pubspec.lock affects its whole package (the root one affects everything). --print files and --print packages list affected files or package names instead (melos exec --scope=...). --json prints all lists. Changed non-Dart files are listed in a note on stderr. With nothing affected, stdout is empty and stderr says No affected tests. Exits 0, or 2 when git fails, or 64 without --since.
  • New: arch_guard why. arch_guard why lib/domain flutter prints the shortest import path from a file or folder to a file, folder or package, one file:line import target line per step. Arguments can be a file, a folder, a file name that matches one file, package:x, a bare package name or dart:io. A package: URI into the project's own packages (package:app/data/api.dart) names those files. With no path it prints No import path from ... to .... and exits 1, so CI can assert that a path never appears. An unknown or ambiguous argument exits 64.
  • --since sees renames. A file renamed on the branch now counts as changed under its old path too.
  • --watch now rejects every subcommand (init, affected, why) with exit 64.

Library: ProjectScanner.memberScanDirs, AffectedFiles, AffectedResult, ImportPath, ImportStep, PathTarget, FileTarget, PackageTarget.