* add some basic tests for size badge
* add crate size to crates fetch
* add crate size service
* change test to reflect base-10 counting instead
* fix downloads tests to work with new crate_size scheme addition
* move handling of unknown size to handle
* prototype fix msrv using yanked versions
* make it prettier
* deduplicate schema definition and add version info helper function
* use newest version only if it wasnt yanked
* fix variable name typo
* remove unused import
* try add new test
* satisfy linter
* don't import "describe()"
* fixup
---------
Co-authored-by: chris48s <git@chris-shaw.dev>
By default the `/crates/:crate_name` API endpoint returns the categories and keywords related to the crates. Unfortunately this causes two additional database queries on the crates.io backend.
This commit change the request URL to use `?include=` to only include the additional metadata that is needed for the requested badges.
Fixes#2876 with @paulmelnikow's suggestion
Moved imports of `ServiceTester` and `createServiceTester` to a separate file so that dev dependencies are not imported by service classes.
Continue to implement #2698:
- Add `core/base-service/index.js` (but hold off on moving the things it imports)
- Add shortcuts in `services/index.js` for Base*Service, errors, and deprecatedService. This file will be streamlined later to avoid cluttering it with rarely used bits.
- Apply consistent ordering of imports and use of `module.exports` in testers.
- Remove some renaming of imports.
- Remove obsolete tests here and there.