Skip to content

fix(diff-filter): add Protocol Buffers Python/Ruby generated suffixes (#154) - #155

Open
aagear wants to merge 2 commits into
Ghbounty:mainfrom
aagear:fix/diff-filter-protobuf-py-rb
Open

aagear wants to merge 2 commits into
Ghbounty:mainfrom
aagear:fix/diff-filter-protobuf-py-rb

Conversation

@aagear

@aagear aagear commented Aug 10, 2026

Copy link
Copy Markdown

Summary

Adds Protocol Buffers generated file suffixes for Python and Ruby to GENERATED_FILE_SUFFIXES, closing a gap where Go (.pb.go), TypeScript (.pb.ts, _pb.d.ts), JavaScript (.pb.js, _pb.js), and Dart (.g.dart) were covered but Python and Ruby were not.

Changes

  • packages/diff-filter/src/patterns.ts: Added 4 suffixes to GENERATED_FILE_SUFFIXES:

    • _pb2.py — Python protoc message classes
    • _pb2.pyi — Python type stubs
    • _pb2_grpc.py — Python gRPC stubs
    • _pb.rb — Ruby protoc message classes
  • packages/diff-filter/tests/classify.test.ts: Added 4 test cases covering nested paths and all new suffixes. Also added reason: "generated_suffix" assertion to the existing generated suffix tests for consistency.

Testing

All tests pass — the diff-filter test suite covers lockfiles, binaries, generated dirs, generated suffixes (now including Python/Ruby protobuf), custom globs, real-code preservation, Windows paths, and edge cases.

Fixes #154

@aagear
aagear requested a review from tomazzi14 as a code owner August 10, 2026 09:34
@vercel

vercel Bot commented Aug 10, 2026

Copy link
Copy Markdown

@aagear is attempting to deploy a commit to the weareghbounty-6269's projects Team on Vercel.

A member of the Team first needs to authorize it.

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.

diff-filter: add Protocol Buffers Python/Ruby generated file suffixes (_pb2.py, _pb2.pyi, _pb2_grpc.py, _pb.rb)

1 participant