Skip to content

feat: use NuGet VS VSIX User-Agent for download statistics visibility#34

Merged
Arthurvdv merged 3 commits into
mainfrom
feat/nuget-useragent-known-client
Apr 26, 2026
Merged

feat: use NuGet VS VSIX User-Agent for download statistics visibility#34
Arthurvdv merged 3 commits into
mainfrom
feat/nuget-useragent-known-client

Conversation

@Arthurvdv

Copy link
Copy Markdown
Member

Summary

Changes the NuGet download User-Agent from ALCops-VSCode/{version} to NuGet VS VSIX/{version} (Node.js {v}; {os} {release}).

Why

The current User-Agent ALCops-VSCode/1.3.2 does not appear in NuGet.org download statistics. NuGet.org parses CDN logs using a known clients list (knownclients.yaml) and the ua-parser library. Custom User-Agent strings that match neither are classified as "Other" and hidden from stats.

NuGet VS VSIX is a recognized pattern in knownclients.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: Updated getUserAgent() to return NuGet VS VSIX/{version} (Node.js {v}; {osType} {osRelease})
  • tests/downloader.test.ts: Added test verifying the User-Agent header format
  • CHANGELOG.md: Added [1.3.3] - 2026-04-26 entry

Arthurvdv and others added 3 commits April 26, 2026 14:10
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>
@Arthurvdv Arthurvdv merged commit b393472 into main Apr 26, 2026
1 check passed
@Arthurvdv Arthurvdv deleted the feat/nuget-useragent-known-client branch April 26, 2026 12:22
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