chore: remove unused commands and logic; refactor#297
Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR removes unused commands and logic while refactoring the codebase for better maintainability. It eliminates the scan:sbom, report:purls, and report:committers commands along with their associated service logic, while consolidating and simplifying the EOL scanning functionality.
- Removes three unused CLI commands and their supporting infrastructure
- Refactors file operations, display formatting, and API client code into focused service modules
- Consolidates SBOM generation and EOL scanning logic with improved error handling
Reviewed Changes
Copilot reviewed 39 out of 41 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
test/service/sbom.background.test.ts |
Removed tests for background SBOM scanning functionality |
test/service/purls.svc.test.ts |
Removed comprehensive tests for PURL extraction and formatting |
test/service/eol.svc.test.ts |
Removed tests for CycloneDX SBOM validation logic |
test/service/committers.svc.test.ts |
Removed extensive tests for git commit analysis functionality |
test/service/log.svc.test.ts |
Added focused tests for error message handling utilities |
test/service/file.svc.test.ts |
Added comprehensive tests for file operations including SBOM/report I/O |
test/service/display.svc.test.ts |
Added tests for scan result formatting and status counting |
test/service/cdx.svc.test.ts |
Added tests for SBOM creation with mocked cdxgen |
test/commands/scan/eol.count.test.ts |
Added focused test for component status counting |
test/api/nes.client.test.ts |
Refactored to test GraphQL submission with mocked fetch |
src/service/sbom.worker.ts |
Fixed import path for constants |
src/service/purls.svc.ts |
Removed PURL extraction and formatting utilities |
src/service/nes/nes.svc.ts |
Removed NES service wrapper |
src/service/log.svc.ts |
Added error message extraction utility |
src/service/file.svc.ts |
Added comprehensive file operations for SBOM and report handling |
src/service/error.svc.ts |
Removed error handling utilities |
src/service/eol/eol.svc.ts |
Removed EOL service logic |
src/service/display.svc.ts |
Added display formatting for scan results and web report URLs |
src/service/committers.svc.ts |
Removed git commit analysis functionality |
src/service/cdx.svc.ts |
Simplified SBOM creation with proper typing |
src/ui/shared.ui.ts |
Removed shared UI constants |
src/commands/scan/sbom.ts |
Removed standalone SBOM scanning command |
src/commands/scan/eol.ts |
Refactored to use new service modules with improved error handling |
src/commands/report/purls.ts |
Removed PURL reporting command |
src/commands/report/committers.ts |
Removed git committers reporting command |
src/api/queries/nes/sbom.ts |
Removed GraphQL query definitions |
src/api/nes/nes.client.ts |
Removed old NES client implementation |
src/api/nes.client.ts |
Added streamlined NES client with Apollo integration |
src/api/gql-operations.ts |
Added GraphQL mutation definitions |
src/api/client.ts |
Removed generic Apollo client wrapper |
| E2E test files | Updated to use new fixture structure and mocked API responses |
README.md |
Updated documentation to reflect simplified command structure |
KLongmuirHD
reviewed
Aug 11, 2025
KLongmuirHD
reviewed
Aug 11, 2025
KLongmuirHD
reviewed
Aug 11, 2025
KLongmuirHD
reviewed
Aug 11, 2025
KLongmuirHD
reviewed
Aug 11, 2025
KLongmuirHD
reviewed
Aug 11, 2025
rlmestre
commented
Aug 11, 2025
KLongmuirHD
approved these changes
Aug 11, 2025
sunshastry
approved these changes
Aug 11, 2025
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.
Closes neverendingsupport/data-and-integrations#214