chore: remap SUPPORTED status locally for backwards compatibility#272
Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
A patch to maintain backwards compatibility by remapping the legacy SUPPORTED status to EOL_UPCOMING in the JSON report instead of reverting the API rename.
- Extends the
ComponentStatusunion locally to include'SUPPORTED'. - Adds logic in
buildScanResultto convert'SUPPORTED'to'EOL_UPCOMING'.
Comments suppressed due to low confidence (2)
src/service/nes/nes.svc.ts:16
- [nitpick] The local variable
statusshadows thestatusproperty onc.info. Consider renaming it tomappedStatusor similar to improve readability.
const status = c.info.status as ComponentStatus | 'SUPPORTED';
src/service/nes/nes.svc.ts:21
- Add a unit test to verify that when
c.info.statusis'SUPPORTED', the output status is correctly remapped to'EOL_UPCOMING'.
status: status === 'SUPPORTED' ? 'EOL_UPCOMING' : status,
KLongmuirHD
approved these changes
Jun 24, 2025
jeremymwells
approved these changes
Jun 25, 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.
The API change to rename
SUPPORTEDtoEOL_UPCOMINGwas reverted for backwards compatibility. Since we do want to use that name for display purposes, we remap it here instead of reverting the related commit, ensuring the expected value is displayed in the JSON report as well.