#23

Added full support for Nuget package resolution

Openpingu2k4wants to merge intofrom

This pull request adds support for NuGet packages to the opensrc CLI tool, enabling source code fetching, listing, and removal for .NET packages alongside existing npm, PyPI, and crates.io registries. It also introduces command-line options and documentation updates to reflect NuGet support. The most important changes are grouped below:

NuGet Registry Support

  • Added NuGet registry support throughout the CLI, including fetch, list, and remove commands, and recognized aliases (dotnet:, nupkg:) for NuGet packages. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]
  • Updated CLI program options and help text to include NuGet, and ensured registry detection logic recognizes NuGet and its aliases. [1] [2] [3]

Command Enhancements

  • Added --allow-prerelease option to fetch the latest NuGet package including prerelease versions, wired through CLI and fetch logic. [1] [2] [3] [4] [5] [6] [7] [8]
  • Updated the list command to show NuGet packages in their own section, and display NuGet in supported registries when no packages are fetched. [1] [2] [3]
  • Modified remove command logic to fall back to NuGet registry if default lookup fails, and added CLI support for removing only NuGet packages. [1] [2] [3] [4] [5]

Documentation Updates

  • Updated README.md and AGENTS.md to document NuGet support, CLI usage examples, and registry aliases. [1] [2] [3] [4] [5]

Testing

  • Added and updated tests for NuGet registry detection, CLI routing, fetch, list, and remove commands to ensure NuGet support is robust. [1] [2] [3] [4] [5] [6] [7]

Path Handling

  • Updated path handling in tests to use join for improved cross-platform compatibility. [1] [2]

These changes collectively enable seamless handling of NuGet packages in the opensrc tool, making it more useful for .NET developers and teams.

Activity

4
vercel[bot]8mo ago

@pingu2k4 is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot]reviewed8mo ago
ctate7mo ago

@pingu2k4 Nice work on the NuGet support! The CLI was rewritten in Rust for v0.7.0, so this can't merge as-is, but NuGet is definitely a registry we want to support. The existing registries in packages/opensrc/cli/src/core/registries/ follow a clean pattern that should make porting straightforward.

Happy to take this on myself, or if you'd like to give it a go against the Rust codebase, even better. Let me know!