Skip to content

Use the shared LOCKFILE list everywhere in src/ #97

Closed

Description

@adityankale190895

#47 added one shared lockfile pattern, LOCKFILE in src/repo/lockfiles.ts, because separate copies had drifted apart. Several copies are still hand-written lists, and some still differ:

Where Missing
src/cache/economics-context.ts:9 (cache key for Vue analysis) npm-shrinkwrap.json
src/repo/impact.ts:22 (isLockfile) nothing, but a separate regex
src/repo/file-references.ts:213 (LOCKFILES) nothing, but a separate list
src/git/git-diff.ts:346 (PACKAGE_LOCKFILES) nothing, but a separate list

Export a list of lockfile names next to LOCKFILE (for code that needs names rather than a regex), and use it or LOCKFILE in each place above.

Done when: no other file in src/ spells out the lockfile names, and economics-context.ts includes npm-shrinkwrap.json, with a test that changing it changes the context hash. Leave CONFIG_PATTERNS in git-diff.ts alone, since changing it changes fallback behaviour. One PR per file is fine.

Setup and conventions are in CONTRIBUTING.md: run npm test, sign off commits with git commit -s (DCO). Comment here if you want to take it, and ask anything.

Activity

  1. added
    enhancement
    good first issue
    on Nov 11, 2026
  2. adityankale190895 commented on Nov 11, 2026

    @adityankale190895
    MemberAuthor

    Thanks @sarankumar1325! #118, #119 and #120 are merged, and you're credited in the README. Splitting them one file each, with a test over every name in LOCKFILE_NAMES and a mutation check, made these easy to review.

    Leaving this open for the copies that are still left in src/:

    • src/ci-inference/evidence.ts:65 (the full list)
    • src/planner/path-baseline.ts:146, which is missing npm-shrinkwrap.json and bun.lock
    • src/research/baseline/path-baseline.ts:54, which is missing npm-shrinkwrap.json

    You're welcome to take these too if you'd like.

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