Skip to content

Config files in subdirectories (babel.config, jest.config) may get no fallback #117

Closed

Description

@adityankale190895

Found while reviewing #108. Not confirmed by running yet: the first step is a fixture that shows it.

What looks wrong

A tool config file in a subdirectory, such as packages/web/babel.config.js or packages/web/jest.config.js, probably gets no full-suite fallback when it is the only changed file.

  • isConfigFile in src/repo/impact.ts matches by basename, so the file is classified as config at any depth.
  • For the config category, the impact analyzer only records CONFIG_GLOBAL evidence and returns (src/repo/impact.ts, around line 1120). It adds no fallback reason.
  • The fallback itself comes from configChanged, which uses CONFIG_PATTERNS in src/git/git-diff.ts. Those patterns are anchored at the repository root.

So a root jest.config.js falls back, but packages/web/jest.config.js may give a SELECTIVE plan that skips that package's tests. Before #108, a subdirectory babel.config.js was classified as source with no importers, which has the same result.

vite.config.*, vue.config.* and nuxt.config.* are not affected: the language/framework configuration rule matches them at any depth (#109 pins this for packages/web/vite.config.ts).

Steps

  1. Fixture: a workspace with packages/web (Jest, babel-jest, two sources, two tests). Change only packages/web/babel.config.js, then only packages/web/jest.config.js. Assert mode FULL (or every test in packages/web selected) with a reason naming the file. Confirm whether it fails today.
  2. If it does: make a config-category change outside the root give a fallback reason (or select the owning package's tests), for the config basenames isConfigFile knows. Root behaviour stays the same.

Related: #99, #100, #108.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions