Skip to content

tsconfig.base.json and tsconfig.*.json changes fall back as an unknown file #141

Closed

Description

@adityankale190895

tsconfig.json changes get dedicated handling (src/planner/type-program.ts, and /^tsconfig\.json$/ in CONFIG_PATTERNS, src/git/git-diff.ts line 199). Other tsconfig files don't. A change to only tsconfig.base.json (extended by tsconfig.json) or tsconfig.test.json falls back with Unknown changed file: tsconfig.base.json.

Running everything is the safe answer, but the reason tells the user nothing, and these files are common: monorepos usually keep shared options in tsconfig.base.json, and many projects have a tsconfig.test.json or tsconfig.build.json.

Done when:

  • tsconfig.*.json files (and jsconfig.*.json) get a fallback reason that says a TypeScript configuration changed, not "Unknown changed file"
  • a fixture in tests/repo/ covers tsconfig.base.json extended by tsconfig.json, and a standalone tsconfig.test.json
  • the fixtures assert both the full-run decision and a reason that names the changed file as a TypeScript configuration change (not only that "Unknown changed file" is gone)
  • fixtures also cover a jsconfig.*.json file and a non-config lookalike (for example tsconfig-paths.json or src/tsconfig.ts), to pin down what the pattern matches
  • optional follow-up, not needed to close this: when the changed file is reached through extends, give it the same treatment type-program.ts gives tsconfig.json

New to DiffCI? See CONTRIBUTING.md: add a synthetic fixture, run npm test, and sign off commits with git commit -s. Comment here to claim the issue.

Activity

  1. added
    enhancement
    good first issue
    on Nov 16, 2026
  2. Kin230k commented on Nov 16, 2026

    @Kin230k

    One useful boundary for this fix is to keep the full-suite fallback unchanged and improve only its classification/explanation, leaving extends-aware narrowing for a separate change.

    CONFIG_PATTERNS currently lists only tsconfig.json and jsconfig.json, while programMembership already recognizes config-name variants. Would it make sense for the regression fixtures to assert both the full-run decision and a config-specific reason naming the changed file, rather than only checking that ‘Unknown changed file’ disappears?

    Alongside the inherited tsconfig.base.json and standalone tsconfig.test.json cases in the issue, a jsconfig.*.json case and a non-config lookalike would help pin down the matching boundary.

    This is an AI-assisted source review; I haven’t run the CLI or tests.

  3. adityankale190895 commented on Nov 16, 2026

    @adityankale190895
    MemberAuthor

    Thanks, agreed on all three.

    • Scope: yes. This issue only changes the classification and the reason. The full-suite fallback stays, and extends-aware narrowing stays a separate follow-up.
    • Assertions: good call. Fixtures should assert both that every test still runs and that the reason names the changed file as a TypeScript configuration change. Checking only that "Unknown changed file" is gone isn't enough. I'll add that to the done-when list.
    • Fixtures: yes to a jsconfig.*.json case and a lookalike. One note on the lookalike: the matcher in type-program.ts (tsconfig[^/]*\.json) is looser than this fix needs. It would also match names like tsconfig-paths.json. A lookalike such as tsconfig-paths.json or src/tsconfig.ts would show whether the new pattern is tsconfig\.[^/]+\.json or the looser one.

    The issue is still open to claim if you'd like to take it.

  4. tyza66 commented on Nov 17, 2026

    @tyza66
    Contributor

    I'd like to take this one, claiming before I start. (I'm working on #142 in the same area, which is done and in review — happy to keep this to the classification and the reason only, as you both agreed.)

    Plan, matching what you settled on in the thread:

    • CONFIG_PATTERNS gains tsconfig\.[^/]+\.json and jsconfig\.[^/]+\.json, anchored at the root. A change to tsconfig.base.json or a standalone tsconfig.test.json is then configuration instead of an unknown file, so it still runs everything but the reason names it.
    • Deliberately narrower than the tsconfig[^/]*\.json in type-program.ts: tsconfig-paths.json (a real package name) must stay unknown, and so must src/tsconfig.ts.
    • Fixtures assert both halves — FULL mode, every test selected, nothing skipped, and the reason naming the changed file as a TypeScript configuration change — not just that "Unknown changed file" is gone.
    • Cases: tsconfig.base.json extended by tsconfig.json, a standalone tsconfig.test.json, one jsconfig.*.json, and the lookalikes above.

    No CHANGELOG edit; commits signed off with git commit -s.

  5. added a commit that references this issue on Nov 17, 2026
    f9877ec
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

    enhancementgood first issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions