Skip to content

fix(ng-dev/release): ignore lock files when detecting snapshot changes#3549

Merged
alan-agius4 merged 1 commit intoangular:mainfrom
alan-agius4:snaphot-ignore
Mar 16, 2026
Merged

fix(ng-dev/release): ignore lock files when detecting snapshot changes#3549
alan-agius4 merged 1 commit intoangular:mainfrom
alan-agius4:snaphot-ignore

Conversation

@alan-agius4
Copy link
Copy Markdown
Contributor

Update the diff-index command used during snapshot publishing to ignore MODULE.bazel.lock and package-lock.json files.

This prevents triggering snapshot publishes when the only changes are in dependency lock files.

Update the `diff-index` command used during snapshot publishing to ignore `MODULE.bazel.lock` and `package-lock.json` files.

This prevents  triggering snapshot publishes when the only changes are in dependency lock files.
@alan-agius4 alan-agius4 added the action: review The PR is still awaiting reviews from at least one requested reviewer label Mar 16, 2026
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the snapshot publishing logic to ignore changes in MODULE.bazel.lock and package-lock.json when determining if a new snapshot should be published. The change correctly uses git diff-index with pathspecs to exclude these files from the diff. My review includes a suggestion to make the list of ignored files configurable to improve future maintainability.

Comment on lines +161 to +171
[
'diff-index',
'--quiet',
'-I',
'0\\.0\\.0-[a-f0-9]+',
'HEAD',
'--',
'.',
':(exclude)**/MODULE.bazel.lock',
':(exclude)**/package-lock.json',
],
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

While this change correctly ignores the specified lock files, hardcoding them here makes it less flexible. If we need to ignore other files in the future, we'll have to modify this code again.

Consider making the list of ignored files configurable in the release configuration (e.g., in .ng-dev/config.js). This would make the snapshot publishing logic more maintainable and adaptable.

For example, you could add a snapshotIgnoredFiles property to the release config and then build the diff-index arguments dynamically from that list.

@alan-agius4 alan-agius4 added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Mar 16, 2026
Copy link
Copy Markdown
Member

@josephperrott josephperrott left a comment

Choose a reason for hiding this comment

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

LGTM

@alan-agius4 alan-agius4 merged commit 5339bcc into angular:main Mar 16, 2026
13 checks passed
@alan-agius4
Copy link
Copy Markdown
Contributor Author

This PR was merged into the repository. The changes were merged into the following branches:

@alan-agius4 alan-agius4 deleted the snaphot-ignore branch March 16, 2026 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: merge The PR is ready for merge by the caretaker

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants