Conversation
…359 batch 6) Apply the #206 playbook to dependency-track.ts. 12 `as never` casts removed. src/lib/api/dependency-track.ts — 16 nested adapters covering the full DT graph: status, project, component, componentFull (with resolvedLicense), vulnerability (with cwe), analysis, attribution, finding, projectMetrics, portfolioMetrics, policyCondition, policyConditionFull, policyViolation, policyFull, analysisResponse, license. Each normalizes SDK's optional+ nullable shape to local required-but-nullable, plus per-counter undefined → 0 for the metrics types whose every counter the SDK declares optional. updateAnalysis: forward fields explicitly via adaptUpdateAnalysisRequest typed as the SDK's UpdateAnalysisBody (the SDK doesn't expose a typed "UpdateAnalysisRequest" — the body is just an inline UpdateAnalysisBody). Tests rewritten with realistic SDK fixtures (typed as Sdk* for compile- time drift detection). New regression tests: - status: url undefined → null - findings: null analysis/attribution - components: null resolvedLicense - projectMetrics / portfolioMetrics: empty SDK response → 0 counters - updateAnalysis body shape forwarding CHANGELOG entry under [Unreleased] / Changed. Closes #359 (partial — batch 6 of N). Remaining: promotion (medium), security, sso (large).
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Closes #359 (partial — batch 6). Same playbook as batches 1-5 for
src/lib/api/dependency-track.ts. 12as neverremoved; zero retained casts. 16 nested adapters for the DT graph (findings → components → vulnerabilities → CWEs → licenses → policies → metrics).Acceptance criteria
as unknown as/as neverin changed filesTest plan
npm test— 2077/2077npm run lint— 0 errorsnpm run build— succeeds (TypeScript + Next prerender clean)Remaining
promotion (medium); security / sso (large).
🤖 Generated with Claude Code