Extract package metadata for NuGet packages
Release notes
You are using the GitLab Package Registry to publish and share your NuGet dependencies right alongside your source code and pipelines. Convenient huh? Well, what hasn't been convenient is that not all of the metadata from the nuspec
is available in the Package Registry user interface. That makes it hard to verify the package quickly, which is really what we want the UI to help with.
While we are still working on making that data available in the API and searchable (read more about it in the epic: &5151 (closed)), we thought a solid first iteration was to simply display the contents of the file in the UI.
Now when you navigate to the package details page, you can view the contents of the nuspec
file right in the UI.
Problem to solve
When a NuGet package is uploaded to the GitLab Package Registry it includes a nuspec
which is packaged in a tar.gz file. The nuspec
contains important metadata for a given package. This data is used to validate that you are using the correct package or to verify that it was built correctly. However, only a limited subset of this data is currently displayed in the Package Registry UI. This makes it hard for node developers to verify their dependencies.
Proposal
When a NuGet package is uploaded, the backend should pass a metadata_file
to the front end, so the file can be displayed in the user interface.
Further details
Front end considerations
- The file explorer in gitlab uses the
blob-viewer
which expects ablob
passed in input - The blob is returned by this graphql type =>
app/graphql/types/repository/blob_type.rb
If we could have the backend return a BlobType for our files we could on the frontend re use the blob-viewer
with the following perks
- Consistent UI
- Syntax highlighting
- Do not add more context
- Easily switch to
edit mode
in the future
This page may contain information related to upcoming products, features and functionality. It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.