From ffa0103cf293fdc6e8d4710ad8f78894108bf212 Mon Sep 17 00:00:00 2001 From: Alan Agius <17563226+alan-agius4@users.noreply.github.com> Date: Mon, 16 Mar 2026 10:10:42 +0000 Subject: [PATCH] fix(ng-dev/release): ignore lock files when detecting snapshot changes 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. --- ng-dev/release/snapshot-publish/snapshots.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/ng-dev/release/snapshot-publish/snapshots.ts b/ng-dev/release/snapshot-publish/snapshots.ts index 2cbb7ae13..5f0ef6a00 100644 --- a/ng-dev/release/snapshot-publish/snapshots.ts +++ b/ng-dev/release/snapshot-publish/snapshots.ts @@ -158,7 +158,17 @@ export class SnapshotPublisher { this.git.run(['add', '-A'], {cwd: tmpRepoDir}); const containsChanges = this.git.runGraceful( - ['diff-index', '--quiet', '-I', '0\\.0\\.0-[a-f0-9]+', 'HEAD', '--'], + [ + 'diff-index', + '--quiet', + '-I', + '0\\.0\\.0-[a-f0-9]+', + 'HEAD', + '--', + '.', + ':(exclude)**/MODULE.bazel.lock', + ':(exclude)**/package-lock.json', + ], {cwd: tmpRepoDir}, ).status === 1;