Do not generate links for private NPM modules in blob view
What does this MR do?
It adds a distinction between private and public NPM modules, detected via a "private": true
entry in package.json
, in order to avoid a 404 when attempting to link to the module in the blob viewer, as it should not exist on npmjs.com. Instead it attempts to link to the homepage
attribute if present.
Are there points in the code the reviewer needs to double check?
- Since I had to use the JSON-parsed blob data in more than one area I added a memoized
json_data
method toBlobViewer::DependencyManager
Why was this MR needed?
See #36020 (closed)
Screenshots (if relevant)
A private module now looks like this when viewing its package.json
:
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated -
API support added -
Tests added for this feature/bug - Review
-
Has been reviewed by UX -
Has been reviewed by Frontend -
Has been reviewed by Backend -
Has been reviewed by Database
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Squashed related commits together -
Internationalization required/considered
What are the relevant issue numbers?
Closes #36020 (closed)
Edited by Mario de la Ossa