feat: use NuGet VS VSIX User-Agent for download statistics visibility#34
Merged
Conversation
Change the NuGet download User-Agent from custom 'ALCops-VSCode/{version}'
to 'NuGet VS VSIX/{version} (Node.js {v}; {os} {release})' which matches
a recognized known client pattern in NuGet.org's CDN log parser
(knownclients.yaml), making downloads visible in per-package statistics.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Documents how NuGet.org download statistics parsing works, which known client patterns are available, and implementation checklist for the Azure DevOps extension. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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
Changes the NuGet download User-Agent from
ALCops-VSCode/{version}toNuGet VS VSIX/{version} (Node.js {v}; {os} {release}).Why
The current User-Agent
ALCops-VSCode/1.3.2does not appear in NuGet.org download statistics. NuGet.org parses CDN logs using a known clients list (knownclients.yaml) and theua-parserlibrary. Custom User-Agent strings that match neither are classified as "Other" and hidden from stats.NuGet VS VSIXis a recognized pattern inknownclients.yaml. Using this format makes downloads visible in per-package statistics. Since ALCops.Analyzers is a niche package, actual NuGet VS VSIX (Visual Studio NuGet Package Manager) downloads are effectively zero, so all stats under this client name reflect VS Code extension usage.Changes
src/downloader.ts: UpdatedgetUserAgent()to returnNuGet VS VSIX/{version} (Node.js {v}; {osType} {osRelease})tests/downloader.test.ts: Added test verifying the User-Agent header formatCHANGELOG.md: Added[1.3.3] - 2026-04-26entry