Removes the unused libraries methods that use the /versions metadata endpoint. This endpoint will include empty versions, so we don't want to rely on it (the /all endpoint will have empty versions filtered).
Updates the libraries method for fetching a version to treat an empty response as a 404.
What are the acceptance criteria?
Fetching a version of a library that would normally result in an empty array being returned will now return a 404 instead.
Type of Change
/libraries/:library/:version
libraries.js
What issue does this relate to?
N/A
What should this PR do?
Removes the unused libraries methods that use the
/versions
metadata endpoint. This endpoint will include empty versions, so we don't want to rely on it (the/all
endpoint will have empty versions filtered).Updates the libraries method for fetching a version to treat an empty response as a 404.
What are the acceptance criteria?
Fetching a version of a library that would normally result in an empty array being returned will now return a 404 instead.
E.g. https://metadata.speedcdnjs.com/packages/xterm/versions/4.9.0 is a known empty version in metadata, and when fetched via the API server (
/libraries/xterm/4.9.0
) should now return a 404.