refactor(ng-dev/release): centralize and expand ignored paths for snapshot publishing#3557
Merged
alan-agius4 merged 1 commit intoangular:mainfrom Mar 17, 2026
Merged
Conversation
…pshot publishing Centralizes the paths to exclude when detecting changes for snapshot publishing into a single constant. Additionally, adds `pubspec.lock` to the list of ignored files to avoid unnecessary snapshot releases when only lock files change.
2c0c719 to
8685395
Compare
There was a problem hiding this comment.
Code Review
This pull request refactors the snapshot publishing logic to centralize and expand the list of excluded file paths. The changes are well-implemented. I've suggested a minor improvement to move the new constant into the SnapshotPublisher class for better encapsulation, which requires a corresponding update to its usage.
Comment on lines
+34
to
39
| /** | ||
| * Paths to exclude from the snapshot commit. | ||
| */ | ||
| const PATHS_TO_EXCLUDE = ['**/MODULE.bazel.lock', '**/package-lock.json', '**/pubspec.lock']; | ||
|
|
||
| export class SnapshotPublisher { |
There was a problem hiding this comment.
For better encapsulation, consider moving PATHS_TO_EXCLUDE inside the SnapshotPublisher class as a private static readonly property. This constant is only used within this class, so this change would improve cohesion.
export class SnapshotPublisher {
/**
* Paths to exclude from the snapshot commit.
*/
private static readonly PATHS_TO_EXCLUDE = ['**/MODULE.bazel.lock', '**/package-lock.json', '**/pubspec.lock'];| '.', | ||
| ':(exclude)**/MODULE.bazel.lock', | ||
| ':(exclude)**/package-lock.json', | ||
| ...PATHS_TO_EXCLUDE.map((p) => `:(exclude)${p}`), |
Contributor
Author
|
This PR was merged into the repository. The changes were merged into the following branches:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Centralizes the paths to exclude when detecting changes for snapshot publishing into a single constant. Additionally, adds
pubspec.lockto the list of ignored files to avoid unnecessary snapshot releases when only lock files change.