Skip to content

Fix smart filtering to include valuable source files (Issue #12) - #13

Merged
mrsimpson merged 2 commits into
mainfrom
claude/fix-issue-12-tdd-01PBD88KboEnEHTnLBGL18Wc
Nov 29, 2025
Merged

mrsimpson merged 2 commits into
mainfrom
claude/fix-issue-12-tdd-01PBD88KboEnEHTnLBGL18Wc

Conversation

@mrsimpson

Copy link
Copy Markdown
Collaborator

Problem:
When cloning repositories like vue3-openlayers, only 9 files were captured
using smart filtering. The filtering was too aggressive, excluding source
files that contain valuable documentation like TypeScript definitions,
component files, and entry points.

Solution (TDD approach):

  1. Added failing test reproducing the issue for component library structure

  2. Enhanced smart filtering logic to include:

    • TypeScript definition files (.d.ts) with type information
    • Entry point files (index.ts, index.js, index.mjs) defining API surface
    • Component files (.vue, .tsx, .jsx) with component documentation
    • Changed from substring to exact directory name matching
    • Removed blanket exclusion of src/, lib/, components/ directories
  3. Updated existing tests to reflect new behavior

Impact:
Component libraries and TypeScript projects now get comprehensive coverage
including source files with documentation value, while still excluding
build artifacts, dependencies, and test files.

Fixes #12

Problem:
When cloning repositories like vue3-openlayers, only 9 files were captured
using smart filtering. The filtering was too aggressive, excluding source
files that contain valuable documentation like TypeScript definitions,
component files, and entry points.

Solution (TDD approach):
1. Added failing test reproducing the issue for component library structure
2. Enhanced smart filtering logic to include:
   - TypeScript definition files (.d.ts) with type information
   - Entry point files (index.ts, index.js, index.mjs) defining API surface
   - Component files (.vue, .tsx, .jsx) with component documentation
   - Changed from substring to exact directory name matching
   - Removed blanket exclusion of src/, lib/, components/ directories

3. Updated existing tests to reflect new behavior

Impact:
Component libraries and TypeScript projects now get comprehensive coverage
including source files with documentation value, while still excluding
build artifacts, dependencies, and test files.

Fixes #12
Changed from tech-specific filtering to a simpler, more generic approach:

What's included:
- All markdown, text, asciidoc files (.md, .mdx, .rst, .txt, .adoc, .asciidoc)
- README files anywhere
- ALL files from examples/ and samples/ directories (except binaries)

What's excluded:
- Source code files (src/, lib/, components/)
- Build artifacts (dist/, build/, node_modules/)
- Test files (__tests__/, test/, tests/)
- Dev config (.github/, .vscode/, .idea/)
- Project metadata (LICENSE, CHANGELOG, CONTRIBUTING, etc.)

This approach works for any repository type without being specific to
TypeScript, Vue, React, or other technologies.

Fixes #12
@mrsimpson
mrsimpson merged commit aa31960 into main Nov 29, 2025
1 check passed
@mrsimpson
mrsimpson deleted the claude/fix-issue-12-tdd-01PBD88KboEnEHTnLBGL18Wc branch November 29, 2025 11:38
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.

Cloning repo: Only a subset was not filtered

2 participants