Skip to content

refactor(impact): use the shared lockfile pattern in isLockfile - #119

Merged
adityankale190895 merged 2 commits into
DiffCI:mainfrom
sarankumar1325:refactor/impact-shared-lockfile
Nov 11, 2026
Merged

adityankale190895 merged 2 commits into
DiffCI:mainfrom
sarankumar1325:refactor/impact-shared-lockfile

Conversation

@sarankumar1325

Copy link
Copy Markdown
Contributor

Part of #97 (this PR covers src/repo/impact.ts; the issue says one PR per file is fine)

isLockfile in impact.ts spelled out the lockfile names in its own regex, (?:^|/)(?:package-lock\.json|…|bun\.lockb?)$. It now tests the basename against the shared LOCKFILE pattern from src/repo/lockfiles.ts. The two match the same paths, so behaviour is unchanged; the point is that a lockfile added to the shared pattern also reaches this check.

file-references.ts and git-diff.ts (PACKAGE_LOCKFILES) are covered in their own PRs. CONFIG_PATTERNS is not touched.

Tests

  • tests/repo/impact.test.ts: new cases for every name in LOCKFILE_NAMES, at the root and in packages/web/. A change to only that lockfile falls back through LOCKFILE_GLOBAL and raises no UNKNOWN_FILE signal. Mutation check: making isLockfile miss npm-shrinkwrap.json fails 2 cases (the JSON lockfile is otherwise treated as an unknown asset).
  • npm test: 930 pass, 0 fail. npm run typecheck and npm run audit:boundary are clean.

AI assistance was used to prepare this change; I reviewed and tested it.

isLockfile in impact.ts spelled out the lockfile names in its own regex.
Match the basename against LOCKFILE from src/repo/lockfiles.ts instead,
so it can't drift from the other lockfile signals.

Part of DiffCI#97

Signed-off-by: sarankumar1325 <[email protected]>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-11T09:55:07.770538Z 8400b45 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8400b456fb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread node_modules Outdated
@@ -0,0 +1 @@
../s305a-diffci/node_modules No newline at end of file

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Remove the environment-specific dependency symlink

../s305a-diffci/node_modules is an external, environment-specific target and is dangling in this checkout. The documented setup is npm ci (CONTRIBUTING.md:5); npm's help describes it as a “Clean install a project,” and it removes this symlink as a non-directory before installing, leaving the tracked entry deleted after setup. Remove the link and let each checkout create its own ignored dependency directory.

Useful? React with 👍 / 👎.

@adityankale190895
adityankale190895 merged commit 4f4cac9 into DiffCI:main Nov 11, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants