1
0
mirror of https://github.com/badges/shields.git synced 2025-04-18 19:44:04 +03:00

402 Commits

Author SHA1 Message Date
dependabot[bot]
5fdb3f585f
chore(deps): bump simple-icons from 14.9.0 to 14.10.0 (#10947)
* chore(deps): bump simple-icons from 14.9.0 to 14.10.0

Bumps [simple-icons](https://github.com/simple-icons/simple-icons) from 14.9.0 to 14.10.0.
- [Release notes](https://github.com/simple-icons/simple-icons/releases)
- [Commits](https://github.com/simple-icons/simple-icons/compare/14.9.0...14.10.0)

---
updated-dependencies:
- dependency-name: simple-icons
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

* change test example for logo that is not re-coloured

---------

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>
2025-03-14 19:53:33 +00:00
LitoMore
00c73c872d
fix auto-sized logo sizes (#10764) 2024-12-29 17:04:24 +00:00
LitoMore
9e3a056ca2
perf: limit logoSize precision to 3 (#10521) 2024-09-13 18:48:15 +00:00
Álvaro Mondéjar Rubio
f776f817bd
perf: faster resetIconPosition avoiding to parse path twice (#10497) 2024-09-04 16:32:01 +00:00
LitoMore
1a472982ed
perf: improve logoSize performance (#10488)
* perf: improve logoSize performance

* Fix test
2024-09-03 19:17:08 +00:00
Pierre-Yves Bigourdan
1e4c8f54d7
Sunsetting Shields custom logos (#10347)
* Sunsetting Shields custom logos

* Reinstate info to contribute to SimpleIcons

* Mention that no changes are required
2024-07-13 19:14:54 +00:00
dependabot[bot]
79b0141322
chore(deps): bump simple-icons from 12.4.0 to 13.0.0 (#10330)
* chore(deps): bump simple-icons from 12.4.0 to 13.0.0

Bumps [simple-icons](https://github.com/simple-icons/simple-icons) from 12.4.0 to 13.0.0.
- [Release notes](https://github.com/simple-icons/simple-icons/releases)
- [Commits](https://github.com/simple-icons/simple-icons/compare/12.4.0...13.0.0)

---
updated-dependencies:
- dependency-name: simple-icons
  dependency-type: direct:production
  update-type: version-update:semver-major
...

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

* update tests - skype logo has been removed

* simple-icons 13 blog post

---------

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>
2024-07-05 18:07:41 +00:00
chris48s
46ed6f02db
improve performance of getIconSize() (#10125)
* load icons once on module load
2024-04-26 19:46:57 +01:00
LitoMore
915ab742d9
feat(logos): support auto-sizing mode (#9191)
Co-authored-by: chris48s <git@chris-shaw.dev>
2024-04-22 11:46:00 +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
Sébastien Règne
bcc39200ae
fix: support logoColor to shield icons. (#8263)
* fix: support logoColor to shield icons.

* FIXUP: Use 'travis-ci' to 'travis'

* FIXUP: Update docs.

* docs tweak

Co-authored-by: chris48s <chris.shaw480@gmail.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-11-26 13:48:34 +00:00
chris48s
ae018cdddc
conform to standard js quote rules (#8395)
* restore standardjs quote behaviour

* conform to standard js quote rules
2022-09-12 17:22:12 +01:00
chris48s
b624179b8d
get the tests passing on windows (#8350)
* run the core tests on windows

* fix glob with windows path seperator

* always use slash when slicing serviceClass matches

..and add comment explaining why we need to do this

* strip line endings (+ any other whitspace) before base64 encoding

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-08-29 19:58:10 +00:00
dependabot[bot]
c87a215d0e
chore(deps): bump simple-icons from 6.23.0 to 7.0.0 (#8039)
* chore(deps): bump simple-icons from 6.23.0 to 7.0.0

Bumps [simple-icons](https://github.com/simple-icons/simple-icons) from 6.23.0 to 7.0.0.
- [Release notes](https://github.com/simple-icons/simple-icons/releases)
- [Commits](https://github.com/simple-icons/simple-icons/compare/6.23.0...7.0.0)

---
updated-dependencies:
- dependency-name: simple-icons
  dependency-type: direct:production
  update-type: version-update:semver-major
...

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

* refactor: update icon loading to handle SI v7

* refactor: use SI slugs directly

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Caleb Cartwright <caleb.cartwright@outlook.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-06-22 22:12:17 +00:00
Pierre-Yves B
23c0406bed
Migrate from CommonJS to ESM (#6651) 2021-07-09 12:53:55 +01:00
Caleb Cartwright
956f2e0584
update simple-icons to v5 with by-name lookup backwards compatibility (#6591)
* deps: update simple-icons to v5 in BC manner

* fix: handling of overlapping titles

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2021-06-12 19:51:28 +00:00
Marcin Mielnicki
6822922ad2
getSimpleIcon handles 'get' icon (#5730) 2020-10-17 19:23:39 +02:00
Paul Melnikow
e1ac63d3be
Finish removing server-secrets.js (#5664)
I’ve tested locally that setting `gh_token` still conditionally enables `ConditionalGithubAuthV3Service`.

Closes #3393
2020-10-07 17:29:03 -04:00
chris48s
504015c0ba
migrate hapi/joi to joi (#5624)
* update joi + joi-extension-semver

* @hapi/joi --> joi

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-30 17:51:02 +00:00
Pierre-Yves B
471f3f4ad1
Use black font when background color is too light (#5467)
* Use black font when background color is too light

* Tweak dark color

* Extract magic brightness numbers to constants

* Fix snapshot tests

* Switch threshold to 0.69
2020-09-07 19:07:28 +02:00
chris48s
13d75e0607
upgrade to prettier 2 (#5051)
* arrowParens: avoid
* remove trailingComma setting
2020-05-05 21:07:43 +01:00
chris48s
3ba05cb184
📦 version 3 (#4756)
* Validate input to BadgeFactory.create() (#3875)

* validate input to create()

* remove deprecated properties (#3881)

* remove BadgeFactory class (#3884)

* Template literal templates (#4459)

- Remove use of the doT template library and move to generating SVG output using javascript template literals.
- Drop SVGO and mostly manually implement the optimisations.
- Add a bunch more tests

Co-authored-by: Paul Melnikow <github@paulmelnikow.com>

* drop raster support in package CLI (#4523)

* drop raster support in package CLI
* update docs

* rename gh-badges package to badge-maker

* rename gh-badges dir to badge-maker

* update relative imports and other refs to in parent dir

'gh-badges' --> 'badge-maker'

* update snyk service tests

This change is only tangentially related

We've used the shields repo as an example for these tests so
moving files around in our repo has a knock-on effect on them

* add missing type hints to dev style page

* write the changelog/migration guide for v3

* use extension in README CLI example

* update CLI help

whoops - missed this in #4523

* bump version

* update for self-hosting users

* README updates

* drop .format param from CLI, always output SVG

* Change text[] to label and message, Remove JSON output

- Change text[] to label and message
- Fix message only badge
- Remove JSON output format
- Update the docs

* update package-lock

* rename 'template' to 'style'

* handle invalid styles in coalesceBadge

* ensure makeBadge is passed a string for template in coalesceBadge()

issue #4925

* fix (logo/no label text/label color specified) case

issue #4926

* add example of (logo/no label text/label color specified) to style debug page

* update type defs

* padding fix for FTB style

Co-authored-by: Paul Melnikow <github@paulmelnikow.com>
2020-04-23 20:05:48 +01:00
François Hodierne
0d8a2d5ca0
Update to eslint 6.8.0 [appveyor githubissuedetail packagist] (#4489)
* update to eslint 6.8.0 and related packages

* Fixes for no-prototype-builtins

* Updates for explicit-function-return-type

* Add ignores for no-explicit-any

* update to eslint 6.8.0 and related packages

* Fixes for no-prototype-builtins

* Updates for explicit-function-return-type

* Add ignores for no-explicit-any

* package: activate eslint-config-standard

* apply updated eslint configuration

* lint: apply eslint feedback after rebase

* Update lockfile

* Update lockfile

* Restore missing deps

* Update lockfile

* Re-add eslint-plugin-node

* Add eslint-plugin-standard and eslint-plugin-react-hooks

* Clean lint

Co-authored-by: Paul Melnikow <github@paulmelnikow.com>
2020-02-29 11:06:36 -06:00
Marcin Mielnicki
88e2cac0f8
Exclude 'get' logo in load-simple-icons/fixes: logos: TypeError: Cannot read property '1' of null (#4488)
* Exclude 'get' key from simple icons

* Improved assertion readability

* A comment added in test
2020-01-05 21:30:57 +01:00
chris48s
8621fe42d7
Upgrade Joi (#3505)
* upgrade joi
* find & replace ALL THE THINGS
* update related deps
2019-06-02 21:59:55 +01:00
chris48s
98f380b254
improve logo escaping (#3511)
* escape logo in make-badge

* 2.2.1 release notes

* tighten up validation of logo param
2019-05-30 18:28:37 +01:00
Paul Melnikow
001ade3704
Move checkErrorResponse from lib/ to core/ [chrome] (#3408) 2019-05-02 18:07:18 -04:00
Paul Melnikow
b2e21da34d
Remove legacy helper makeBadgeData (#3392)
Close #3369
2019-04-29 19:44:25 -04:00
Paul Melnikow
a0492c5283
Remove unused callback-based error helpers (#3371) 2019-04-29 13:35:57 -04:00
Paul Melnikow
3733de6232 Rewrite GitHub commit status (#3186)
* WIP

* Parse the error response

* Clarify

* Restore one test

* Add a schema
2019-03-10 18:43:37 -05:00
Paul Melnikow
e159d90516 Reorganize a couple of the legacy helpers [npm node jenkinsplugin dynamic] (#3163) 2019-03-05 20:43:33 -06:00
Paul Melnikow
a801450dd6 Move deprecation helpers to services/ (#3162)
This is currently unused, though it seems fine to keep it around.
2019-03-05 20:32:41 -06:00
Paul Melnikow
fafb22efee
Move "good" badge helpers from lib/ to services/ (#3101)
This moves a few helpers from `lib/` to `services/`:

build-status.js
build-status.spec.js
color-formatters.js
color-formatters.spec.js
contributor-count.js
licenses.js
licenses.spec.js
php-version.js
php-version.spec.js
text-formatters.js
text-formatters.spec.js
version.js
version.spec.js

And one from `lib/` to `core/`:

unhandled-rejection.spec.js

The diff is long, but the changes are straightforward.

Ref #2832
2019-02-27 20:47:46 -05:00
Paul Melnikow
e3d115cf99
Rename maxAge to cacheSeconds (#3090)
Close #3069
2019-02-23 20:33:38 -05:00
Paul Melnikow
8c244c2e40
Fix color overriding for legacy services (#3091)
While I was doing #3090 I realized the work in #3012 did not handle legacy services.

I tested this manually with `/librariesio/release/hex/phoenix.svg?color=blue` and it works.
2019-02-23 19:07:31 -05:00
Paul Melnikow
6684f4b566
Remove unused version helper (#3086) 2019-02-23 15:20:34 -05:00
Paul Melnikow
4bd16f93e8
Sort imports and requires (#3056)
This will definitely save time, and ensure more uniformity.

It moves the `createServiceTester()` calls to a different place from where I'd like them, though I'm happy to have them checked by the linter.

Closes #2701
2019-02-21 22:14:40 -05:00
Danial
f550f0cc4d Update Travis logo, Reduce some duplication (#3047)
Switch Travis to use full-color logo approved at https://github.com/badges/shields/pull/1276#issuecomment-466164851
2019-02-21 20:29:23 -05:00
Caleb Cartwright
a4bd3f5fd6
Add SymfonyInsight stars badge, run [SymfonyInsight sensiolabs amo chrome-web-store redmine spigetratings vaadin-directory visualstudiomarketplacerating wordpress] (#2971)
* feat: added stars badge for symfony insight

* refactor: changed symfony star determination logic

* feat: updating symfony to handle old scan scenarios

* feat: updated symfony insight to handle older projects

* tests: removed another test for symfony insight per request
2019-02-20 17:15:31 -06:00
Paul Melnikow
0f22c0af25
Store the deprecation date inline (#3029) 2019-02-18 16:59:08 -05:00
Caleb Cartwright
8d94c25c8a Update build status list (#2965)
Fixes #2848 

Appveyor briefly has a status of `starting` before the job begins, so adding `starting` to the list of `otherStatuses` to prevent the Appveyor badges from showing `invalid response data` during that window
2019-02-09 15:43:08 -06:00
Philip Harrison
cf7b76d5a6 Update Dependabot logo (#2931)
* Update dependabot logo
* update tests
2019-02-06 21:33:40 +00:00
Paul Melnikow
7955f460f3
Move suggest code and rewrite tests (#2886)
The suggest code was an exception to our usual organization pattern. There was a service test, but it's not a service. The code would sometimes regress because it wasn't being tested all the time.

This makes them no longer run as service tests, which is good because they run as part of every build. Some of them are smaller-bracket tests which is good too, because it will make them easier to test, especially as this code grows.

I'd have liked to keep using frisby for the ones that make requests to the server, though I ran into some issues with sequencing of setup that I think will require upstream changes.
2019-01-30 17:48:54 -06:00
chris48s
daa06c2026 don't apply logoColor param to multi-coloured logos (#2889)
This stops us from doing this:

![](https://img.shields.io/badge/logo-npm-blue.svg?logo=npm&logoColor=green) - https://img.shields.io/badge/logo-npm-blue.svg?logo=npm&logoColor=green
but still allows us to do this
![](https://img.shields.io/badge/logo-discord-blue.svg?logo=discord&logoColor=green) - https://img.shields.io/badge/logo-discord-blue.svg?logo=discord&logoColor=green
2019-01-29 15:22:28 -06:00
chris48s
1822a3adfb
more icon changes (#2872)
* delete scrutinizer logo
* optimise superuser logo
2019-01-27 18:27:27 +00:00
chris48s
bf5438f457 Delete some of our logos (part 1) (#2857)
Refs #2510

I'm going to delete or change some more logos in a further PR or two, but lets start off with the (hopefully) non-controversial ones. I think in all of these cases it is fairly clear-cut that we are not losing anything by removing our icon in favour of simple-icons now that we apply a sensible colour by default.
2019-01-25 12:51:41 -05:00
chris48s
7e473fe72c pre-compute the 3 most common icon styles on server init (#2856)
refs #2833 (comment)
2019-01-23 16:41:10 -05:00
chris48s
eaa64a8dab automatically show light or dark logos when using simple-icons (#2833)
closes #2431
refs #2510
2019-01-23 14:42:08 -05:00
Paul Melnikow
fc12b591db
Reorganize BaseService-related modules (#2831)
Ref #2698
2019-01-22 23:52:13 -05:00
Paul Melnikow
aac2a4d5ad
Move legacy request helpers (#2829)
In #2698 we decided to put legacy helper functions in `core/legacy`. I think that’s a fine idea, though if we’re going to have a bunch of badge helper functions in there, it seems like it is probably better to keep these two important but esoteric helper functions with the core code to which they are most coupled. So I added `legacy-` to the name, and put them in `core/base-service`.
2019-01-21 22:14:22 -05:00