Skip to content

Conversation

@cryptodev-2s
Copy link
Contributor

@cryptodev-2s cryptodev-2s commented Aug 18, 2025

Problem

The changelog check was failing to properly detect when package.json changes were only in devDependencies because the git diff logic required both the start and end of the devDependencies section to be visible. In many cases, especially with limited diff context (-U20), the closing brace of the devDependencies section might not be included in the diff output.

Solution

  • Fixed section detection logic: Use maximum context to ensure section headers are visible (-U9999) instead of (-U20)

Testing

This fix ensures that packages with only devDependency changes are properly skipped during changelog checks, preventing false positives that would require unnecessary changelog updates.

This should resolve the CI failure that occurred in this PR: MetaMask/core#6331

Impact

  • ✅ Fixes false positive changelog requirements for dev-only changes

Note

Increase git diff context to -U9999 so package.json section headers (e.g., devDependencies) are reliably present in diffs.

  • Changelog check (src/changelog-check.ts):
    • Use git diff -U9999 (max context) when analyzing package.json changes to ensure section headers like "devDependencies" are visible for accurate detection.

Written by Cursor Bugbot for commit 39fafdd. This will update automatically on new commits. Configure here.

cursor[bot]

This comment was marked as outdated.

@cryptodev-2s cryptodev-2s requested a review from mcmire August 18, 2025 19:20
@cryptodev-2s cryptodev-2s self-assigned this Aug 18, 2025
@cryptodev-2s cryptodev-2s mentioned this pull request Aug 18, 2025
4 tasks
mcmire
mcmire previously approved these changes Aug 19, 2025
Copy link
Contributor

@mcmire mcmire left a comment

Choose a reason for hiding this comment

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

Makes sense!

@cryptodev-2s cryptodev-2s force-pushed the fix/changelog-check-dev-dependencies-section-detection branch from 01eb96f to 819cf6d Compare October 2, 2025 12:20
@cryptodev-2s cryptodev-2s force-pushed the fix/changelog-check-dev-dependencies-section-detection branch from 819cf6d to a73600a Compare November 5, 2025 14:56
Copy link
Contributor

@mcmire mcmire left a comment

Choose a reason for hiding this comment

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

LGTM!

@cryptodev-2s cryptodev-2s merged commit c0ec1c3 into main Nov 5, 2025
19 checks passed
@cryptodev-2s cryptodev-2s deleted the fix/changelog-check-dev-dependencies-section-detection branch November 5, 2025 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants