Skip to content

Treat more package.json fields as data, not behaviour #48

Closed

Description

@adityankale190895

Context: on a replay of one production app's history, DiffCI fell back to the full suite on 58% of commits, mostly because config, package.json, workflow or lockfile changes forced it to. Narrowing those safely is the main open problem.

PACKAGE_JSON_METADATA_FIELDS and PACKAGE_JSON_DATA_FIELDS in src/git/git-diff.ts decide which package.json edits can't change how tests run. Any field not in either list (for example engines, packageManager, sideEffects, browserslist, prettier) makes the change "behavioral" and forces a full run.

Done when: each added field has a short justification in a comment (which tools read it, and why it can't change test outcomes, or why it stays behavioral), plus a packageJsonChange test in tests/repo/fallback-narrowing.test.ts. One field per PR is fine.


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 Oct 29, 2026
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