Remove Packages::Npm::PackagePresenter
What does this MR do and why?
This MR removes Packages::Npm::PackagePresenter
since it doesn't bring anything meaningful after Extract npm metadata generation from a presenter (!114450 - merged) was merged and only "converts" a hash to an instance of ruby class.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
-
Create a package
def fixture_file_upload(*args, **kwargs) Rack::Test::UploadedFile.new(*args, **kwargs) end project = FactoryBot.create(:project, :public) package = FactoryBot.create(:npm_package, project: project, name: "test") FactoryBot.create(:packages_tag, package: package, name: "my-tag")
-
Call the updated endpoints to check if everything works correctly.
Package's metadata endpoint:
$ curl "http://gdk.test:3000/api/v4/projects/<project-id>/packages/npm/test"
Package's list tags endpoint:
$ curl "http://gdk.test:3000/api/v4/projects/<project-id>/packages/npm/-/package/test/dist-tags"
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #414611 (closed)
Edited by Dzmitry (Dima) Meshcharakou