You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Extract the function, class, method and arrow signature pass from importTypeQueryOffsets into a private collectSignatureTypeQueries helper. This addresses the optional CodeRabbit maintainability comment on merged PR #1445, making the signature-specific guards easier to review separately from type declarations.
The pass body, token handling, shared offset set and execution order are unchanged. Runtime call-expression and default-initializer guards remain intact.
No actionable comments were generated in the recent review.
Summary
Summary by CodeRabbit
Bug Fixes
Import type queries are now recognized in function, class, method, and arrow-function signatures, alongside existing declaration scanning. This improves the app’s ability to account for these queries across more kinds of type declarations.
The change extracts signature-query scanning into collectSignatureTypeQueries. importTypeQueryOffsets calls the helper before returning offsets, while the existing declaration scan remains in place.
OWASP/cve-lite-cli#1445: Added importTypeQueryOffsets and the signature scan that this change extracts into a helper.
Merge Risk: Minimal · up to 70dde
The extraction preserves existing type-query scanning behavior. No concrete merge-blocking risk remains.
Pre-merge checks: 7
Check name
Status
Explanation
Title check
The title uses the required "refactor: " prefix, lowercase after the colon, and no trailing period. It accurately names the change: the signature-query scanning pass is extracted from importTypeQueryO…
Description check
The description follows the repository template. It has the "What changed and why" section with a clear explanation of the extraction of the signature pass into collectSignatureTypeQueries, and it sta…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Linked Issue
The pull request body references issues with the required keyword and issue number: “Refs #1444” and “Follow-up to #1445.”
Closes Keyword Matches Scope
The pull request body uses “Refs #1444” and does not use “Closes,” “Fixes,” or “Resolves” for an issue. It therefore does not auto-close an issue with incomplete work.
No New Runtime Dependency
The pull request changes only src/utils/import-type-queries.ts. The package.json dependency sections are identical at the base and head refs: no new dependencies or optionalDependencies were added, an…
Full details: Title check
Explanation
The title uses the required "refactor: " prefix, lowercase after the colon, and no trailing period. It accurately names the change: the signature-query scanning pass is extracted from importTypeQueryOffsets into a helper. This is the main change in the changeset, so the title passes.
Full details: Description check
Explanation
The description follows the repository template. It has the "What changed and why" section with a clear explanation of the extraction of the signature pass into collectSignatureTypeQueries, and it states that behavior is unchanged. It also explains the motivation and links the related issues and PRs. The template's "Closes #" line is missing. The PR uses "Follow-up to #1445. Refs #1444." instead, so the author should confirm whether an issue should be closed and add a "Closes #N" line if so. This is a non-critical gap, so the description passes.
Full details: No New Runtime Dependency
Explanation
The pull request changes only src/utils/import-type-queries.ts. The package.json dependency sections are identical at the base and head refs: no new dependencies or optionalDependencies were added, and no devDependency moved to dependencies.
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.
Reviewing files that changed from the base of the PR and between 98ed40e and 70dde35.
Files selected for processing: 1
src/utils/import-type-queries.ts
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review.
The reason will be displayed to describe this comment to others. Learn more.
Thanks @vianmangal, a clean extraction: the pass moves as one block into its own named helper, the shared offset set and the order are unchanged, and the full suite passes on the merge with current main. Approved.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed and why
Extract the function, class, method and arrow signature pass from
importTypeQueryOffsetsinto a privatecollectSignatureTypeQuerieshelper. This addresses the optional CodeRabbit maintainability comment on merged PR #1445, making the signature-specific guards easier to review separately from type declarations.The pass body, token handling, shared offset set and execution order are unchanged. Runtime call-expression and default-initializer guards remain intact.
Follow-up to #1445. Refs #1444.
Validation
npm cinpm run lint:testsnpm run buildnpm test -- --runInBand tests/usage-typescript-extensions.test.ts tests/e2e/typescript-extensions.test.ts— 264 existing regression cases passed.npm test -- --runInBand— 203 suites, 3,073 tests passed, using the advisory database freshly synced during this review session.node scripts/typecheck-changed-tests.mjs origin/main— no changed test files; source type-checking passes through the build.git diff --check