1
0
mirror of https://github.com/badges/shields.git synced 2025-09-18 05:05:28 +03:00

15 Commits

Author SHA1 Message Date
Joey Li
bdf84f9f94 [Crates] Added crate size badge (#10421)
* 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
2024-08-04 12:35:28 +00:00
Johannes Vollmer
e36d933d12 [Crates] Only use non-yanked crate versions (ready for merge) (#9949)
* 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>
2024-02-05 11:05:47 +00:00
chris48s
5fa3435841 [crates] tidyup (#9883)
* fix downloads service test

* remove handling of 200 OK with an error body

* remove obsolete tests
2024-01-13 18:25:40 +00:00
dependabot[bot]
b9d96755ec chore(deps-dev): bump prettier from 2.8.8 to 3.0.0 (#9357)
* chore(deps-dev): bump prettier from 2.8.8 to 3.0.0

Bumps [prettier](https://github.com/prettier/prettier) from 2.8.8 to 3.0.0.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.8.8...3.0.0)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* reformat all the things (prettier 3)

* update tests to await calls to prettier.format()

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: chris48s <git@chris-shaw.dev>
2023-07-10 09:27:51 +00:00
Tobias Bieniek
c038933db7 crates: Use ?include= to reduce crates.io backend load (#9081)
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.
2023-04-15 14:41:08 +00:00
Caleb Cartwright
a3e2b2ff28 handle null licenses in crates.io response schema, run [crates] (#7074)
* fix: handle null licenses in crates.io response schema

* more tests for crates license badge

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2021-09-27 22:53:09 +00:00
Pierre-Yves B
23c0406bed Migrate from CommonJS to ESM (#6651) 2021-07-09 12:53:55 +01:00
Felix C. Stegerman
b4579adc44 [crates] recent_downloads can be null (#5237)
* crates: recent_downloads can be null

* crates: add test for recent_downloads = null
2020-06-27 20:44:48 +00:00
chris48s
13d75e0607 upgrade to prettier 2 (#5051)
* arrowParens: avoid
* remove trailingComma setting
2020-05-05 21:07:43 +01:00
Joe Clay
62bee16975 Add Crates.io recent downloads badge (fixes #4186), run [Crates] (#4187)
* Add Crates.io recent downloads badge (fixes #4186)

* Rename extractDownloads to transform

* Fix up the error handling a bit

* Simplify imports
2019-10-17 14:46:10 -05:00
Pierre-Yves B
1f29c22d3d Migrated most service tests to use new expectBadge (#3122) 2019-02-28 21:43:23 +00:00
Caleb Cartwright
855c9cd261 Remove dev dep imports in production code (#2937)
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.
2019-02-05 21:51:55 -05:00
Paul Melnikow
226fa67a02 Create shortcut for BaseService-related imports (#2809)
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.
2019-01-21 15:41:24 -05:00
Paul Melnikow
8a8311d931 Unify and minimize tester boilerplate (#2472)
I started using this one-line boilerplate a while back and it seems to tidy things up a bit.
2018-12-08 13:15:24 -05:00
chris48s
8070f0bef9 add tests for rust [crates] and refactor (#2462)
* add tests for rust [crates] and refactor
2018-12-06 20:24:46 +00:00