-
-
Notifications
You must be signed in to change notification settings - Fork 556
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(compress): Fix partial exclusion of TypeScript imports #382
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Overview
This PR updates test coverage and refactors dependency injection for file processing while making some minor adjustments to queries and documentation.
- Adds tests for the new initPiscina functionality in processConcurrency.
- Refactors fileProcess tests to use a mocked file manipulator via dependency injection.
- Updates the FileManipulator interface export, tree-sitter query naming, and documentation folder naming.
Reviewed Changes
File | Description |
---|---|
tests/shared/processConcurrency.test.ts | Added tests for initPiscina and updated mocking for Piscina. |
tests/core/file/fileProcess.test.ts | Replaced direct getFileManipulator mocks with dependency injection via a custom mock. |
src/core/treeSitter/queries/queryTypescript.ts | Added an extra query for named imports in TypeScript files. |
src/core/file/fileManipulate.ts | Changed FileManipulator to an exported interface to allow reuse. |
src/core/file/fileProcess.ts | Updated dependency injection to include getFileManipulator with relevant type definitions. |
.github/copilot-instructions.md | Renamed folder reference from tree-sitter to treeSitter for consistency. |
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Deploying repomix with
|
Latest commit: |
3f8dff6
|
Status: | ✅ Deploy successful! |
Preview URL: | https://b5a9cdc9.repomix.pages.dev |
Branch Preview URL: | https://chore-test-coverage.repomix.pages.dev |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #382 +/- ##
==========================================
+ Coverage 89.70% 90.17% +0.46%
==========================================
Files 72 72
Lines 3468 3470 +2
Branches 747 750 +3
==========================================
+ Hits 3111 3129 +18
+ Misses 357 341 -16 ☔ View full report in Codecov by Sentry. |
📝 WalkthroughWalkthroughThis pull request makes several enhancements and refactorings across the repository. The changes include a renaming of a directory from Sequence Diagram(s)sequenceDiagram
participant C as Client
participant PF as processFiles
participant ITR as initTaskRunner
participant GFM as getFileManipulator
participant FM as FileManipulator
C->>PF: Call processFiles(filePath, deps)
PF->>ITR: Initialize task runner
PF->>GFM: Get FileManipulator instance for filePath
alt FileManipulator exists
GFM-->>PF: Return FileManipulator instance
PF->>FM: Use methods (removeComments, removeEmptyLines)
else FileManipulator is null
GFM-->>PF: Return null
end
PF-->>C: Return processed content
sequenceDiagram
participant T as Test Suite
participant IP as initPiscina
participant P as Piscina
T->>IP: Call initPiscina()
IP->>P: Instantiate Piscina with configuration
P-->>IP: Return Piscina instance
IP-->>T: Provide configured Piscina object
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (6)
✅ Files skipped from review due to trivial changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (6)
🔇 Additional comments (13)
✨ Finishing Touches
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Checklist
npm run test
npm run lint