fix: skip tsconfig excludes for direct changes#66
Conversation
A directly changed file always belongs to its project — tsconfig excludes define what TypeScript compiles, not project ownership. Previously, changing a spec or stories file produced "no affected projects" because tsconfig.app.json excludes *.spec.ts. Added `get_owning_packages_by_path` — a path-prefix lookup that skips tsconfig exclude filtering. Used for all direct-change ownership in Steps 6a and 6b. The existing filtered `get_package_names_by_path` is preserved for reference traversal where cascade through excluded files may be undesirable. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughSwaps the project-lookup used when mapping changed files from the tsconfig-filtered Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
📦 Preview Release AvailableA preview release has been published for commit 7c5e1c7. Installationnpm install https://github.com/frontops-dev/domino/releases/download/pr-66-7c5e1c7/front-ops-domino-1.2.5.tgzRunning the previewnpx https://github.com/frontops-dev/domino/releases/download/pr-66-7c5e1c7/front-ops-domino-1.2.5.tgz affectedDetails |
EladBezalel
left a comment
There was a problem hiding this comment.
Clean separation of ownership vs reference traversal — exactly the right approach. Two suggestions, neither blocking.
…n tests Address PR #66 review: - Extract private `resolve_packages(file_path, skip_excludes)` shared by both public methods — prevents silent divergence if matching logic evolves. - Add `test_get_owning_packages_fast_path_no_root_entries`: exercises the `root_entries.is_empty()` branch (root == sourceRoot + tsconfig excludes). - Add `test_spec_file_change_affects_owning_project`: full pipeline integration test — creates a project with tsconfig excluding *.spec.ts, commits a spec change, asserts `find_affected` returns the owning project. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
EladBezalel
left a comment
There was a problem hiding this comment.
All review feedback addressed — helper extracted, fast-path tested, integration test added. LGTM.
Summary
.spec.tsor.stories.tsxfile produced "no affected projects" becausetsconfig.app.jsonexcludes themget_owning_packages_by_path— same path-prefix lookup asget_package_names_by_pathbut without tsconfig exclude filteringBefore
After
Test plan
test_get_owning_packages_skips_tsconfig_excludes— verifies both methods side-by-sidedi.spec.tschange correctly marksbrowser-desktop-backgroundaffected🤖 Generated with Claude Code
Summary by CodeRabbit
Bug Fixes
Tests