Skip to content

feat: unify channel keywords for --detect-using with aliases#6

Merged
Arthurvdv merged 2 commits into
mainfrom
feature/unify-channel-keywords
Apr 29, 2026
Merged

feat: unify channel keywords for --detect-using with aliases#6
Arthurvdv merged 2 commits into
mainfrom
feature/unify-channel-keywords

Conversation

@Arthurvdv

Copy link
Copy Markdown
Member

Summary

Replace the CHANNEL_KEYWORDS set with a CHANNEL_ALIASES map that normalizes text-based inputs to two canonical channels:

Canonical Aliases
latest current, stable
preview next, prerelease, beta

All channel keywords route to nuget-devtools. The canonical name is passed to the detector after normalization.

Bug Fixed

current was recognized as a channel keyword but routed to nuget-devtools, which didn't handle it. It was treated as a literal version string, causing a 404. Now normalizes to latest.

Changes

  • src/resolve-detect-source.ts: CHANNEL_KEYWORDS Set → CHANNEL_ALIASES Record with normalization
  • src/detectors/nuget-devtools.ts: prereleasepreview as canonical keyword
  • src/cli.ts: Updated help text documenting channels and aliases
  • Tests updated with full alias coverage

Arthurvdv and others added 2 commits April 29, 2026 18:10
Replace CHANNEL_KEYWORDS set with CHANNEL_ALIASES map that normalizes
text-based inputs to two canonical channels:
- latest (aliases: current, stable)
- preview (aliases: next, prerelease, beta)

All channel keywords route to nuget-devtools. The canonical name is
passed to the detector after normalization, fixing the bug where
"current" was treated as a literal version string.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@Arthurvdv Arthurvdv merged commit c2000eb into main Apr 29, 2026
2 checks passed
@Arthurvdv Arthurvdv deleted the feature/unify-channel-keywords branch April 29, 2026 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant