Compare commits

...

313 Commits

Author SHA1 Message Date
Paul Melnikow
d9908df571 makeBadge(): Throw an error with logo parameters that don't make sense
See comment:

https://github.com/badges/shields/pull/5754/files#r510414774
2020-10-27 15:23:43 -04:00
dependabot-preview[bot]
d79b0ec46a Build(deps): bump xpath from 0.0.29 to 0.0.32 (#5768)
Bumps [xpath](https://github.com/goto100/xpath) from 0.0.29 to 0.0.32.
- [Release notes](https://github.com/goto100/xpath/releases)
- [Commits](https://github.com/goto100/xpath/commits)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-10-26 19:27:21 -05:00
dependabot-preview[bot]
2104135a68 Build(deps-dev): bump nodemon from 2.0.5 to 2.0.6 (#5769)
Bumps [nodemon](https://github.com/remy/nodemon) from 2.0.5 to 2.0.6.
- [Release notes](https://github.com/remy/nodemon/releases)
- [Commits](https://github.com/remy/nodemon/compare/v2.0.5...v2.0.6)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-10-25 20:35:00 +00:00
dependabot-preview[bot]
c2d1a8cd6d Build(deps-dev): bump @types/chai from 4.2.12 to 4.2.14 (#5766)
Bumps [@types/chai](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/chai) from 4.2.12 to 4.2.14.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/chai)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-10-25 18:02:47 +00:00
dependabot-preview[bot]
84b7413524 Build(deps-dev): bump react from 16.13.1 to 16.14.0 (#5764)
Bumps [react](https://github.com/facebook/react/tree/HEAD/packages/react) from 16.13.1 to 16.14.0.
- [Release notes](https://github.com/facebook/react/releases)
- [Changelog](https://github.com/facebook/react/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/react/commits/v16.14.0/packages/react)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-10-25 17:49:27 +00:00
dependabot-preview[bot]
ef56865d11 Build(deps-dev): bump gatsby-plugin-typescript from 2.4.22 to 2.4.24 (#5762)
Bumps [gatsby-plugin-typescript](https://github.com/gatsbyjs/gatsby/tree/HEAD/packages/gatsby-plugin-typescript) from 2.4.22 to 2.4.24.
- [Release notes](https://github.com/gatsbyjs/gatsby/releases)
- [Changelog](https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-plugin-typescript/CHANGELOG.md)
- [Commits](https://github.com/gatsbyjs/gatsby/commits/gatsby-plugin-typescript@2.4.24/packages/gatsby-plugin-typescript)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-10-25 17:22:48 +00:00
dependabot-preview[bot]
3701780f20 Build(deps): bump simple-icons from 3.11.0 to 3.12.1 (#5761)
Bumps [simple-icons](https://github.com/simple-icons/simple-icons) from 3.11.0 to 3.12.1.
- [Release notes](https://github.com/simple-icons/simple-icons/releases)
- [Commits](https://github.com/simple-icons/simple-icons/compare/3.11.0...3.12.1)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-10-25 16:43:11 +00:00
dependabot-preview[bot]
0927689f45 Build(deps-dev): bump ts-mocha from 7.0.0 to 8.0.0 (#5760)
Bumps [ts-mocha](https://github.com/piotrwitek/ts-mocha) from 7.0.0 to 8.0.0.
- [Release notes](https://github.com/piotrwitek/ts-mocha/releases)
- [Changelog](https://github.com/piotrwitek/ts-mocha/blob/master/CHANGELOG.md)
- [Commits](https://github.com/piotrwitek/ts-mocha/commits)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-10-25 16:33:22 +00:00
dependabot-preview[bot]
2d92500961 Build(deps): bump @sentry/node from 5.26.0 to 5.27.1 (#5770)
Bumps [@sentry/node](https://github.com/getsentry/sentry-javascript) from 5.26.0 to 5.27.1.
- [Release notes](https://github.com/getsentry/sentry-javascript/releases)
- [Changelog](https://github.com/getsentry/sentry-javascript/blob/master/CHANGELOG.md)
- [Commits](https://github.com/getsentry/sentry-javascript/compare/5.26.0...5.27.1)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-10-25 14:43:34 +00:00
dependabot-preview[bot]
40d7cc8ac6 Build(deps-dev): bump eslint-plugin-standard from 4.0.1 to 4.0.2 (#5771)
Bumps [eslint-plugin-standard](https://github.com/standard/eslint-plugin-standard) from 4.0.1 to 4.0.2.
- [Release notes](https://github.com/standard/eslint-plugin-standard/releases)
- [Commits](https://github.com/standard/eslint-plugin-standard/compare/v4.0.1...v4.0.2)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-10-25 12:45:29 +00:00
dependabot-preview[bot]
4121a57af3 Build(deps-dev): bump eslint-plugin-react from 7.21.4 to 7.21.5 (#5763)
Bumps [eslint-plugin-react](https://github.com/yannickcr/eslint-plugin-react) from 7.21.4 to 7.21.5.
- [Release notes](https://github.com/yannickcr/eslint-plugin-react/releases)
- [Changelog](https://github.com/yannickcr/eslint-plugin-react/blob/master/CHANGELOG.md)
- [Commits](https://github.com/yannickcr/eslint-plugin-react/compare/v7.21.4...v7.21.5)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-10-25 12:16:25 +00:00
dependabot-preview[bot]
37b0edcfbc Build(deps-dev): bump eslint-plugin-jsdoc from 30.6.5 to 30.7.3 (#5759)
Bumps [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) from 30.6.5 to 30.7.3.
- [Release notes](https://github.com/gajus/eslint-plugin-jsdoc/releases)
- [Commits](https://github.com/gajus/eslint-plugin-jsdoc/compare/v30.6.5...v30.7.3)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-10-25 11:59:53 +00:00
dependabot-preview[bot]
c69ed93a0b Build(deps): bump query-string from 6.13.2 to 6.13.6 (#5742)
Bumps [query-string](https://github.com/sindresorhus/query-string) from 6.13.2 to 6.13.6.
- [Release notes](https://github.com/sindresorhus/query-string/releases)
- [Commits](https://github.com/sindresorhus/query-string/compare/v6.13.2...v6.13.6)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: Caleb Cartwright <calebcartwright@users.noreply.github.com>
2020-10-21 20:49:53 -05:00
Paul Melnikow
f1a5dd9427 Align style prop of coalesceBadge() with internal makeBadge() (#5726)
This is an analogous change to #5719 for `’template’` and `’style’`. (See the top comment for more explanation.)
2020-10-20 19:16:38 -04:00
Joe Izzard
d60b90b860 [Wordpress] Theme & Plugin Last Updated badge (#5722)
* feat: added schema and API options for new badge

* fix: fixed platform test's for new schema and api options

* feat: added new badge for theme and plugin last updated

* test: added testing for new badge

* feat: added regex pattern for last update string

* fix: fixed mock test's that didn't match regex pattern

* refactor: changed to moment formatting

Changed to use the moment lib to validate and format last_update date strings from upstream API

* fix: fixed failing platform service tests

Co-authored-by: chris48s <chris48s@users.noreply.github.com>
2020-10-20 17:44:58 +00:00
Joe Izzard
7e7162156b [Wordpress] Added Theme Required WP Version Badge & refactor (#5717)
* feat: added wp required version badge for themes

Refactored to allow plugin and theme extensionType for WP Required Version. Also added required schema for themes, already present for plugins.

* test: added testing for the new badge

Added testing for the new theme badge

* refactor: convert static classes to static props

* fix: modules export

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-10-20 01:56:13 +00:00
dependabot-preview[bot]
47a9df7b1c Build(deps-dev): bump @babel/core from 7.11.6 to 7.12.3 (#5739)
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.11.6 to 7.12.3.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.12.3/packages/babel-core)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-10-20 00:09:57 +00:00
Bryan Kok
dd2223407f Refactor remaining [github] services (#5748) 2020-10-19 18:41:03 -05:00
dependabot-preview[bot]
77826cf257 Build(deps-dev): bump @babel/polyfill from 7.11.5 to 7.12.1 (#5738)
* Build(deps-dev): bump @babel/polyfill from 7.11.5 to 7.12.1

Bumps [@babel/polyfill](https://github.com/babel/babel/tree/HEAD/packages/babel-polyfill) from 7.11.5 to 7.12.1.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.12.1/packages/babel-polyfill)

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

* deps: fix anafanafo

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: Caleb Cartwright <calebcartwright@users.noreply.github.com>
Co-authored-by: Caleb Cartwright <caleb.cartwright@outlook.com>
2020-10-18 20:27:04 -05:00
dependabot-preview[bot]
de0a98c3a4 Build(deps-dev): bump gatsby-plugin-typescript from 2.4.16 to 2.4.22 (#5740)
Bumps [gatsby-plugin-typescript](https://github.com/gatsbyjs/gatsby/tree/HEAD/packages/gatsby-plugin-typescript) from 2.4.16 to 2.4.22.
- [Release notes](https://github.com/gatsbyjs/gatsby/releases)
- [Changelog](https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-plugin-typescript/CHANGELOG.md)
- [Commits](https://github.com/gatsbyjs/gatsby/commits/gatsby-plugin-typescript@2.4.22/packages/gatsby-plugin-typescript)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-10-19 00:33:38 +00:00
dependabot-preview[bot]
feeeda113a Build(deps-dev): bump nodemon from 2.0.4 to 2.0.5 (#5744)
Bumps [nodemon](https://github.com/remy/nodemon) from 2.0.4 to 2.0.5.
- [Release notes](https://github.com/remy/nodemon/releases)
- [Commits](https://github.com/remy/nodemon/compare/v2.0.4...v2.0.5)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-10-18 18:13:03 +00:00
dependabot-preview[bot]
f77fd65f57 Build(deps-dev): bump eslint-plugin-import from 2.22.0 to 2.22.1 (#5736)
Bumps [eslint-plugin-import](https://github.com/benmosher/eslint-plugin-import) from 2.22.0 to 2.22.1.
- [Release notes](https://github.com/benmosher/eslint-plugin-import/releases)
- [Changelog](https://github.com/benmosher/eslint-plugin-import/blob/master/CHANGELOG.md)
- [Commits](https://github.com/benmosher/eslint-plugin-import/compare/v2.22.0...v2.22.1)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-10-18 17:25:41 +00:00
dependabot-preview[bot]
7ad2410de2 Build(deps): bump @sentry/node from 5.25.0 to 5.26.0 (#5737)
Bumps [@sentry/node](https://github.com/getsentry/sentry-javascript) from 5.25.0 to 5.26.0.
- [Release notes](https://github.com/getsentry/sentry-javascript/releases)
- [Changelog](https://github.com/getsentry/sentry-javascript/blob/master/CHANGELOG.md)
- [Commits](https://github.com/getsentry/sentry-javascript/compare/5.25.0...5.26.0)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-10-18 17:16:28 +00:00
dependabot-preview[bot]
36600fee1f Build(deps-dev): bump @babel/register from 7.11.5 to 7.12.1 (#5735)
Bumps [@babel/register](https://github.com/babel/babel/tree/HEAD/packages/babel-register) from 7.11.5 to 7.12.1.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.12.1/packages/babel-register)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-10-18 17:08:09 +00:00
dependabot-preview[bot]
11a2084a65 Build(deps-dev): bump gatsby-plugin-page-creator from 2.3.32 to 2.3.33 (#5732)
Bumps [gatsby-plugin-page-creator](https://github.com/gatsbyjs/gatsby/tree/HEAD/packages/gatsby-plugin-page-creator) from 2.3.32 to 2.3.33.
- [Release notes](https://github.com/gatsbyjs/gatsby/releases)
- [Changelog](https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-plugin-page-creator/CHANGELOG.md)
- [Commits](https://github.com/gatsbyjs/gatsby/commits/gatsby-plugin-page-creator@2.3.33/packages/gatsby-plugin-page-creator)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-10-18 17:00:05 +00:00
JeongHoon Byun (a.k.a Outsider)
0737e317da Add [GitHubSponsors] badge (#5694)
* Add GitHub Sponsors badge

Signed-off-by: Outsider <outsideris@gmail.com>

* rollback custom github sponsors logo

Signed-off-by: Outsider <outsideris@gmail.com>

* remove redirect for github sponsors

Signed-off-by: Outsider <outsideris@gmail.com>

* Update services/github/github-sponsors.service.js

Co-authored-by: Caleb Cartwright <calebcartwright@users.noreply.github.com>

* fix indentation as prettier

Signed-off-by: Outsider <outsideris@gmail.com>

Co-authored-by: Caleb Cartwright <calebcartwright@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-10-18 16:15:00 +00:00
dependabot-preview[bot]
800b61ab46 Build(deps): bump anafanafo from 2.0.0-beta.1 to 2.0.0 in /badge-maker (#5746)
Bumps [anafanafo](https://github.com/metabolize/anafanafo) from 2.0.0-beta.1 to 2.0.0.
- [Release notes](https://github.com/metabolize/anafanafo/releases)
- [Commits](https://github.com/metabolize/anafanafo/compare/anafanafo@2.0.0-beta.1...anafanafo@2.0.0)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-10-18 16:07:01 +00:00
dependabot-preview[bot]
6dbf8d009a Build(deps-dev): bump lint-staged from 10.4.0 to 10.4.2 (#5733)
Bumps [lint-staged](https://github.com/okonet/lint-staged) from 10.4.0 to 10.4.2.
- [Release notes](https://github.com/okonet/lint-staged/releases)
- [Commits](https://github.com/okonet/lint-staged/compare/v10.4.0...v10.4.2)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-10-18 14:38:01 +00:00
Hubert Jagodziński
7a19dc40ef Add [GithubDirectoryFileCount] badge (#5705)
* Added GithubDirectoryFileCount badge

* Additional information on a schema

* Update services/github/github-directory-file-count.service.js

Co-authored-by: Caleb Cartwright <calebcartwright@users.noreply.github.com>

* Update services/github/github-directory-file-count.service.js

Co-authored-by: Caleb Cartwright <calebcartwright@users.noreply.github.com>

* Update services/github/github-directory-file-count.service.js

Co-authored-by: Caleb Cartwright <calebcartwright@users.noreply.github.com>

* More examples

* Moved isArray check to transform method

* Using isMetric for validation

* Added documentaion on type and extension parameters

* Moved a couple of service tests to unit tests

* extension is applicable for type file only

* Note on GitHub API limit

* Using metric helper for a count formatting

Co-authored-by: Caleb Cartwright <calebcartwright@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-10-18 14:30:15 +00:00
dependabot-preview[bot]
10ddd866da Build(deps-dev): bump eslint-config-prettier from 6.12.0 to 6.13.0 (#5745)
Bumps [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) from 6.12.0 to 6.13.0.
- [Release notes](https://github.com/prettier/eslint-config-prettier/releases)
- [Changelog](https://github.com/prettier/eslint-config-prettier/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-config-prettier/compare/v6.12.0...v6.13.0)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-10-18 10:05:35 +00:00
dependabot-preview[bot]
e786d69dbe Build(deps-dev): bump eslint-plugin-jsdoc from 30.6.4 to 30.6.5 (#5734)
Bumps [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) from 30.6.4 to 30.6.5.
- [Release notes](https://github.com/gajus/eslint-plugin-jsdoc/releases)
- [Commits](https://github.com/gajus/eslint-plugin-jsdoc/compare/v30.6.4...v30.6.5)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-10-18 09:32:08 +00:00
Hubert Jagodziński
e236c9a15c Added [GithubRPackageVersion] badge (#5708)
* Added GithubRPackageVersion badge

* Minor changes to GithubGoModGoVersion badge

* More examples

* Removed mocking with nock from service tests

* Added unit tests

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-10-18 01:31:57 +00:00
Joe Izzard
a1c50ea4d5 [Wordpress] Plugin & Theme required php (#5723)
* feat: added schema and api options

* feat: added new badge for required php version

* test: fixed existing testing and added new for new badge

Fixed existing testing to conform to new api options and schema. Also added testing for the new badge

* fix: changed to mocked test

Changed the Theme Not Set test to a mock as unable to find a live example (previously used 'generatepress' however this now has the data). Also split out query selector fields to allow updating in one place for themes and plugins

* fix: changed the style of the badge to better show the info

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-10-17 18:31:58 +00:00
Marcin Mielnicki
6822922ad2 getSimpleIcon handles 'get' icon (#5730) 2020-10-17 19:23:39 +02:00
Paul Melnikow
4415d07e8b A few straight refactors in badge-renderers (#5716)
These are aimed at improving readability and a bit of DRY.
2020-10-17 11:27:09 -04:00
CRIMX
668ea878d9 Add back [ChromeWebStore] rating (#5697)
* Add back Chrome Web Store rating

Replace chrome-web-store-item-property with webextension-store-meta.

fix #5475

* perf: imporve parsing performance of webextension-store-meta

* perf: improve chrome-web-store start-up speeding

* refactor: remove getters

Co-authored-by: Pierre-Yves B <PyvesDev@gmail.com>
2020-10-17 13:26:40 +02:00
Sam Donald
21c15e4029 Specify logoColor does not work with logoSvg (#5727)
If your endpoint uses the `logoSvg` you can _not_ specify the `logoColor` property. This will result in the 'invalid properties: logoColor' badge.

Related to #4749
2020-10-16 21:59:51 -05:00
Paul Melnikow
1184938ed1 Align label and message props of coalesceBadge() with internal makeBadge() (#5719)
There is an internal `makeBadge()` function which is called from a few places in the server and from the public `makeBadge()` function which is a light wrapper. (Eventually we want to dogfood the public API: that's the work of #4950, and this helps with it by aligning the interfaces.)

Related to that is #3370, which is about aligning the `serviceData` schema (i.e. the result of `handle()`) with the public `makeBadge()` function.

A legacy quirk of the _private_ `makeBadge()` function is accepting a `text: ['label', 'message']` array instead of separate `{ label, message }` props like the rest of the codebase. `coalesceBadge()` has to translate from `{ label, message }` to `text: ['label', message']`. This removes that bit of indirection.

It also rewrites most of the tests of `coalesceBadge()` to use `.includes()`, providing IMO a slight improvement in readability.
2020-10-16 18:06:32 -04:00
Paul Melnikow
e1bd1602a6 Fail in CI when package tests fail (#5718)
* Fail in CI when package tests fail

Fixes #5713

Co-authored-by: chris48s <chris48s@users.noreply.github.com>
2020-10-16 21:24:23 +01:00
Paul Melnikow
aa5addb442 Change [issuestats] redirector from format to pattern (#5720)
* Change [issuestats] redirector from format to pattern

Ref #3329

* Match other services where this approach was taken
2020-10-16 20:11:17 +00:00
Joe Izzard
374bf4aafa [Wordpress] Convert static classes to props (#5725)
* refactor: downloads

* refactor: ratings

* refactor: versions

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-10-16 19:44:59 +00:00
Paul Melnikow
43f7adbe64 Use our typical casing for [nodeping] label (#5715)
* Use our typical casing for [nodeping] label

* Fix test + reformat
2020-10-16 00:17:19 +00:00
Paul Melnikow
af3f720113 Improve appearance of for-the-badge and social badges by measuring correct font (#5696)
Even before #2311, Shields has measured all badge text using 11px Verdana, which is the correct font for plastic, flat, and flat-square.

However the for-the-badge style uses 10px Verdana and bold 10px Verdana, and the social badge uses bold 11px _Helvetica_. This causes these badges to be wider or narrower than they should be, and the text to be stretched accordingly.

Since the for-the-badge style relies on synthetic letter spacing (we just multiply the computed length in code) there is room to massage this further. Our test badges all look as good or better than before, so I think it should not block merging this, however we might need to get it right before the downstream problem in squint goes away. (There's also #4691 which this doesn't attempt to address.)

Fixes #4275
2020-10-15 20:06:46 -04:00
Dominik Grzelak
d1ec834cb5 [Github] Handle the case when the Github deployment status returns null (#5704)
* Handle the case when the Github deployment status returns null

* Integration test null latestStatus response from Github Deployments

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-10-15 23:51:31 +00:00
Paul Melnikow
cd70bf5246 Prettify the SVG snapshots (and a couple cleanups) (#5714)
I’m running into some strange issues working on badge-maker in #5696, where the images look good but the snapshots have changed in unexpected ways. I’m finding them a little tricky to debug.

This saves the prettified snapshots instead, which I think will make them easier to compare and debug. They may have to be updated when we upgrade prettier.

I also inlined a few things in the test file.
2020-10-15 19:40:14 -04:00
Paul Melnikow
cbd8eba2c4 Fix REQUIRE_CLOUDFLARE for Heroku (#5712)
Ref #3027
2020-10-15 19:27:07 -04:00
chris48s
a4a8258fd5 unskip token integration test (#5711)
* unskip token integration test

* Update services/github/github-api-provider.integration.js

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

Co-authored-by: Paul Melnikow <github@paulmelnikow.com>
2020-10-15 21:44:07 +00:00
Marcin Mielnicki
e03549d88d fix: TypeError in [DockerVersion] badge (#5707)
* fix: TypeError in DockerVersion badge

* A reference to the issue in test

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

Co-authored-by: Paul Melnikow <github@paulmelnikow.com>
2020-10-15 22:02:04 +02:00
Marcin Mielnicki
1aa25ab321 Add a deployment status using GitHub Actions (#5709) 2020-10-15 21:52:40 +02:00
Hubert Jagodziński
b9d5da66fd Update service-tests.md (#5706)
* Update service-tests.md

Added information `expectBadge()` accepts a RegExp.

* Run prettier
2020-10-15 19:19:46 +00:00
Caleb Cartwright
740947ba06 tests: fix PackagistVersion service test (#5703) 2020-10-14 22:03:36 +00:00
Caleb Cartwright
3576fbd7b8 test(aur): use unit tests for outdated (#5700) 2020-10-13 18:40:23 -05:00
Paul Melnikow
1fab1a7140 When configured, require requests to come from Cloudflare (#5666)
This is the code part of #3027, following [this article](https://www.viget.com/articles/heroku-cloudflare-the-right-way/) and using [this middleware](https://github.com/clive-io/cloudflare-middleware).

I pulled in the `addHandlerAtIndex()` function @chris48s wrote for #5574.

The middleware isn't perfect for scoutcamp, since it relies on `req.ip` which is something set by Express. However, the other solutions I found were either explicitly deprecated ([cloudflare-ip](https://www.npmjs.com/package/cloudflare-ip)) or relied on dynamically fetching the list of Cloudflare hosts ([cloudflare-ips](https://www.npmjs.com/package/cloudflare-ips)), which seems unnecessary as this list has not changed in several years.

I've left this off to start, so we can test it in production using an env var before we make it the production default.
2020-10-12 12:36:42 -04:00
dependabot-preview[bot]
4da15aafc1 Build(deps-dev): bump danger from 10.4.1 to 10.5.0 (#5693)
Bumps [danger](https://github.com/danger/danger-js) from 10.4.1 to 10.5.0.
- [Release notes](https://github.com/danger/danger-js/releases)
- [Changelog](https://github.com/danger/danger-js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/danger/danger-js/compare/10.4.1...10.5.0)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-10-12 11:34:29 +00:00
dependabot-preview[bot]
a0008ba7d1 Build(deps): bump moment from 2.29.0 to 2.29.1 (#5685)
Bumps [moment](https://github.com/moment/moment) from 2.29.0 to 2.29.1.
- [Release notes](https://github.com/moment/moment/releases)
- [Changelog](https://github.com/moment/moment/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/moment/moment/compare/2.29.0...2.29.1)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-10-11 20:10:41 +00:00
dependabot-preview[bot]
ace467246d Build(deps): bump camelcase from 5.3.1 to 6.1.0 (#5687)
Bumps [camelcase](https://github.com/sindresorhus/camelcase) from 5.3.1 to 6.1.0.
- [Release notes](https://github.com/sindresorhus/camelcase/releases)
- [Commits](https://github.com/sindresorhus/camelcase/compare/v5.3.1...v6.1.0)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-10-11 20:01:23 +00:00
dependabot-preview[bot]
1d2d92b968 Build(deps-dev): bump @types/react-select from 3.0.21 to 3.0.22 (#5690)
Bumps [@types/react-select](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-select) from 3.0.21 to 3.0.22.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-select)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-10-11 17:09:19 +00:00
dependabot-preview[bot]
1a5eb7376f Build(deps-dev): bump @types/node from 14.11.2 to 14.11.8 (#5682)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.11.2 to 14.11.8.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-10-11 17:02:16 +00:00
chris48s
57ae9cdb6b loosen [visualstudiomarketplace] input schema (#5638)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-10-11 16:53:25 +00:00
dependabot-preview[bot]
d1808c8d26 Build(deps-dev): bump gatsby-plugin-page-creator from 2.3.30 to 2.3.32 (#5683)
Bumps [gatsby-plugin-page-creator](https://github.com/gatsbyjs/gatsby/tree/HEAD/packages/gatsby-plugin-page-creator) from 2.3.30 to 2.3.32.
- [Release notes](https://github.com/gatsbyjs/gatsby/releases)
- [Changelog](https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-plugin-page-creator/CHANGELOG.md)
- [Commits](https://github.com/gatsbyjs/gatsby/commits/gatsby-plugin-page-creator@2.3.32/packages/gatsby-plugin-page-creator)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-10-11 16:37:48 +00:00
dependabot-preview[bot]
681d2c0505 Build(deps-dev): bump gatsby from 2.24.65 to 2.24.73 (#5688)
Bumps [gatsby](https://github.com/gatsbyjs/gatsby) from 2.24.65 to 2.24.73.
- [Release notes](https://github.com/gatsbyjs/gatsby/releases)
- [Changelog](https://github.com/gatsbyjs/gatsby/blob/master/CHANGELOG.md)
- [Commits](https://github.com/gatsbyjs/gatsby/compare/gatsby@2.24.65...gatsby@2.24.73)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-10-11 16:23:56 +00:00
dependabot-preview[bot]
19e6f18d9b Build(deps): bump @sentry/node from 5.24.2 to 5.25.0 (#5681)
Bumps [@sentry/node](https://github.com/getsentry/sentry-javascript) from 5.24.2 to 5.25.0.
- [Release notes](https://github.com/getsentry/sentry-javascript/releases)
- [Changelog](https://github.com/getsentry/sentry-javascript/blob/master/CHANGELOG.md)
- [Commits](https://github.com/getsentry/sentry-javascript/compare/5.24.2...5.25.0)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-10-11 16:13:15 +00:00
dependabot-preview[bot]
498f57d960 Build(deps): bump simple-icons from 3.10.0 to 3.11.0 (#5680)
Bumps [simple-icons](https://github.com/simple-icons/simple-icons) from 3.10.0 to 3.11.0.
- [Release notes](https://github.com/simple-icons/simple-icons/releases)
- [Commits](https://github.com/simple-icons/simple-icons/compare/3.10.0...3.11.0)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-10-11 16:05:39 +00:00
dependabot-preview[bot]
c134d4914d Build(deps-dev): bump sinon from 9.1.0 to 9.2.0 (#5692)
Bumps [sinon](https://github.com/sinonjs/sinon) from 9.1.0 to 9.2.0.
- [Release notes](https://github.com/sinonjs/sinon/releases)
- [Changelog](https://github.com/sinonjs/sinon/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sinonjs/sinon/compare/v9.1.0...v9.2.0)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-10-11 08:23:12 +00:00
dependabot-preview[bot]
5d8adbe54f Build(deps-dev): bump eslint-plugin-jsdoc from 30.6.3 to 30.6.4 (#5691)
Bumps [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) from 30.6.3 to 30.6.4.
- [Release notes](https://github.com/gajus/eslint-plugin-jsdoc/releases)
- [Commits](https://github.com/gajus/eslint-plugin-jsdoc/compare/v30.6.3...v30.6.4)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-10-11 08:14:17 +00:00
dependabot-preview[bot]
7c0f211e0b Build(deps-dev): bump eslint-plugin-react from 7.21.3 to 7.21.4 (#5689)
Bumps [eslint-plugin-react](https://github.com/yannickcr/eslint-plugin-react) from 7.21.3 to 7.21.4.
- [Release notes](https://github.com/yannickcr/eslint-plugin-react/releases)
- [Changelog](https://github.com/yannickcr/eslint-plugin-react/blob/master/CHANGELOG.md)
- [Commits](https://github.com/yannickcr/eslint-plugin-react/compare/v7.21.3...v7.21.4)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-10-11 08:02:04 +00:00
Paul Melnikow
564a9145e9 Remove FsTokenPersistence (#5671)
Closes #5665
2020-10-10 21:59:52 +00:00
JeongHoon Byun (a.k.a Outsider)
dc32a5fc4b Fix wrong anchor for writing tests document (#5677) 2020-10-10 05:14:52 +00:00
Paul Melnikow
3b1aaf3137 Move chai-as-promised from prod to dev dependencies (#5674) 2020-10-08 17:39:55 -04: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
Paul Melnikow
3a23695f89 Update Danger rule for joi (#5667)
Follow-on to #5624
2020-10-06 20:48:03 -04:00
Pierre-Yves B
e0604d855b Update badge-maker to version 3.3.0 (#5661) 2020-10-06 17:52:05 +01:00
Jabbar Memon
ff9273a958 converted [nodeping npm nexus node] from static classes to props (#5662)
* converted [nexus node] from static classes to props

* fixing node module route field

* converted [nodeping npm] from static classes to props

* Removed Commented code

Co-authored-by: Jabbar Memon <jabbar@zoop.one>
2020-10-05 00:10:52 -05:00
Jabbar Memon
4d712e8386 Completed [twitch twitter ubuntu uptimerobot vaadindirectory] from static classes to props (#5660)
Co-authored-by: Jabbar Memon <jabbar@zoop.one>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-10-03 21:26:33 +00:00
Jabbar Memon
c18bc82347 Converted [swagger symfony teamcity travis treeware] from static class to props (#5659)
* Converted [swagger] from static class to props

* Converted [symfony teamcity travis treeware] from static classes to props

* Fixed staticPreview field in travis

Co-authored-by: Jabbar Memon <jabbar@zoop.one>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-10-03 21:17:10 +00:00
dependabot-preview[bot]
8fe7547a08 Build(deps-dev): bump gatsby-plugin-page-creator from 2.3.27 to 2.3.30 (#5657)
Bumps [gatsby-plugin-page-creator](https://github.com/gatsbyjs/gatsby/tree/HEAD/packages/gatsby-plugin-page-creator) from 2.3.27 to 2.3.30.
- [Release notes](https://github.com/gatsbyjs/gatsby/releases)
- [Changelog](https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-plugin-page-creator/CHANGELOG.md)
- [Commits](https://github.com/gatsbyjs/gatsby/commits/gatsby-plugin-page-creator@2.3.30/packages/gatsby-plugin-page-creator)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-10-03 21:10:41 +00:00
dependabot-preview[bot]
64f82dd4eb Build(deps): bump simple-icons from 3.9.0 to 3.10.0 (#5652)
Bumps [simple-icons](https://github.com/simple-icons/simple-icons) from 3.9.0 to 3.10.0.
- [Release notes](https://github.com/simple-icons/simple-icons/releases)
- [Commits](https://github.com/simple-icons/simple-icons/compare/3.9.0...3.10.0)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-10-03 21:00:41 +00:00
dependabot-preview[bot]
de8033f8bb Build(deps-dev): bump start-server-and-test from 1.11.4 to 1.11.5 (#5654)
Bumps [start-server-and-test](https://github.com/bahmutov/start-server-and-test) from 1.11.4 to 1.11.5.
- [Release notes](https://github.com/bahmutov/start-server-and-test/releases)
- [Commits](https://github.com/bahmutov/start-server-and-test/compare/v1.11.4...v1.11.5)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-10-03 20:51:44 +00:00
dependabot-preview[bot]
a0080f1d7a Build(deps-dev): bump @types/react-select from 3.0.20 to 3.0.21 (#5650)
Bumps [@types/react-select](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-select) from 3.0.20 to 3.0.21.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-select)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-10-03 20:44:04 +00:00
Christian Haag
fba860fbe9 Refactor service classes [snyk sonar sourceforge sourcegraph spack] (#5632)
* Refactor service classes snyk-sonar-sourceforge-sourcegraph-spack

* Amend end-line issue on pull-request #5632

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-10-03 16:14:47 +00:00
Thakur Karthik
5d3c26efe1 Refactor [requires scrutinizer securityheaders shippable] services (#5643)
* Refactor readthedocs reddit redmine repology services

* Refactor requires scrutinizer security-headers shippable services

Co-authored-by: Caleb Cartwright <calebcartwright@users.noreply.github.com>
2020-10-03 10:49:17 -05:00
Thakur Karthik
2fa69ba359 Refactor readthedocs reddit redmine repology services (#5641)
Co-authored-by: Caleb Cartwright <calebcartwright@users.noreply.github.com>
2020-10-03 15:10:16 +00:00
dependabot-preview[bot]
a0313437b6 Build(deps-dev): bump sinon from 9.0.3 to 9.1.0 (#5655)
Bumps [sinon](https://github.com/sinonjs/sinon) from 9.0.3 to 9.1.0.
- [Release notes](https://github.com/sinonjs/sinon/releases)
- [Changelog](https://github.com/sinonjs/sinon/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sinonjs/sinon/compare/v9.0.3...v9.1.0)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-10-03 12:45:20 +00:00
dependabot-preview[bot]
7c45593ca4 Build(deps-dev): bump eslint-plugin-react from 7.21.2 to 7.21.3 (#5658)
Bumps [eslint-plugin-react](https://github.com/yannickcr/eslint-plugin-react) from 7.21.2 to 7.21.3.
- [Release notes](https://github.com/yannickcr/eslint-plugin-react/releases)
- [Changelog](https://github.com/yannickcr/eslint-plugin-react/blob/master/CHANGELOG.md)
- [Commits](https://github.com/yannickcr/eslint-plugin-react/compare/v7.21.2...v7.21.3)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-10-03 12:36:44 +00:00
dependabot-preview[bot]
7642f2d4eb Build(deps-dev): bump eslint-plugin-jsdoc from 30.5.2 to 30.6.3 (#5656)
Bumps [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) from 30.5.2 to 30.6.3.
- [Release notes](https://github.com/gajus/eslint-plugin-jsdoc/releases)
- [Commits](https://github.com/gajus/eslint-plugin-jsdoc/compare/v30.5.2...v30.6.3)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-10-03 12:27:48 +00:00
dependabot-preview[bot]
30f3be44bc Build(deps-dev): bump eslint-plugin-cypress from 2.11.1 to 2.11.2 (#5653)
Bumps [eslint-plugin-cypress](https://github.com/cypress-io/eslint-plugin-cypress) from 2.11.1 to 2.11.2.
- [Release notes](https://github.com/cypress-io/eslint-plugin-cypress/releases)
- [Commits](https://github.com/cypress-io/eslint-plugin-cypress/compare/v2.11.1...v2.11.2)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-10-03 12:16:42 +00:00
dependabot-preview[bot]
d4fa62f0b2 Build(deps-dev): bump cypress from 5.2.0 to 5.3.0 (#5651)
Bumps [cypress](https://github.com/cypress-io/cypress) from 5.2.0 to 5.3.0.
- [Release notes](https://github.com/cypress-io/cypress/releases)
- [Changelog](https://github.com/cypress-io/cypress/blob/develop/.releaserc.json)
- [Commits](https://github.com/cypress-io/cypress/compare/v5.2.0...v5.3.0)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-10-03 12:04:37 +00:00
N Balgopal Patro
85e3772de9 Converted Service Classes to Static Fields, run [visualstudio w3c] (#5642)
* Completed For visual-studio-app-center

* Completed For visual-studio-marketplace

* Completed For w3c

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-10-03 02:19:48 +00:00
Paul Melnikow
9d173930ef Remove EditorConfig from recommend VS Code plugins (#5640)
Frequently when I open Shields in VS Code it pops up a message asking if
I want to install the recommended plugins. I think for Shields to
recommend a plugin, we should agree it is pretty much essential for
working on the project.

I have never used any form of EditorConfig. I imagine it may be useful
for some users on some platforms, though for the majority of users, it
is definitely not essential.

Perhaps the users who need it (Windows users?) know who they are and can
take it on themselves to install the plugin if PRs cause them problems.

Certainly open to discussion if people feel otherwise!
2020-10-03 01:25:47 +00:00
Jonathan
fcf6678a12 [GithubIssues] Add examples for count github pull requests closed by label (#5639)
* Implement LOC badge

* Apply suggestions from code review

Co-authored-by: Caleb Cartwright <calebcartwright@users.noreply.github.com>

* Fix tokei tests after API change

* Format the code

* Rename tokei service file

* Add comment about Tokei API behavior

* Document tokei badge behavior

* Make keywords consistent and add examples

* Fix typo

* Add examples for labeled closed issues

Co-authored-by: Caleb Cartwright <calebcartwright@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-10-03 00:00:05 +00:00
Paul Melnikow
f0b8480280 Inject shieldsSecret into GitHub token admin endpoint (#5631)
Ref #3393
2020-10-01 23:12:22 -04:00
Thakur Karthik
5931b86c85 Reactor powershellgallery pub puppetforge pypi services (#5635)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-10-02 02:04:03 +00:00
Reece Dunham
17b975b53f Refactor [Spiget Steam StackExchange static] badge services (#5633)
* Spiget

Signed-off-by: Reece Dunham <me@rdil.rocks>

* Stack exchange

Signed-off-by: Reece Dunham <me@rdil.rocks>

* Static-badge

Signed-off-by: Reece Dunham <me@rdil.rocks>

* Steam

Signed-off-by: Reece Dunham <me@rdil.rocks>

* Missed one!

* Formatting fix

Signed-off-by: Reece Dunham <me@rdil.rocks>
2020-10-01 20:29:03 -05:00
Thakur Karthik
0c28fe7144 Refactor osslifecycle,packagecontrol,packagist,plgreview,poeditor service files (#5634) 2020-09-30 21:18:49 -05: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
Paul Melnikow
86366588a2 Minor coverage cleanup (#5630) 2020-09-29 21:33:28 -04:00
Paul Melnikow
eb9743c25c Remove obsolete peer-to-peer GitHub token-sharing code (#5628)
Prevent tokens from being sent to the OVH servers. Instead, add them directly to the Redis DB.

Ref #3393
2020-09-29 21:22:30 -04:00
Paul Melnikow
bdc41670a9 Remove obsolete WebSocket logs monitor (#5629)
This never worked in prod (see #1460)
2020-09-29 21:05:55 -04:00
Paul Melnikow
39756bde78 Clean up Danger rule for serverSecrets (#5627)
"serverSecrets" is no longer used to access auth in services, so it no longer makes sense to include it in this rule.

Ref #3393
2020-09-29 20:44:28 -04:00
Paul Melnikow
0e90b7e6ed Remove enzyme which we aren’t using right now (#5626)
Our approach to preventing bugs on the frontend has mostly leveraged types, though we could restore these if we start writing frontend tests again. In the meantime it's one less thing to unnecessarily install and maintain.
2020-09-29 20:17:49 -04:00
Paul Melnikow
342ea93c52 package.json: sort dependency array (#5625) 2020-09-29 19:55:44 -04:00
Caleb Cartwright
5d0116f959 convert some service classes to static fields, run [GithubPipenv GithubPullRequestCheckState GithubReleaseDate GithubRelease GithubRepoSize] (#5622)
* refactor(githubpipenv): convert to static fields

* refactor(githubpullrequest): convert to static fields

* refactor(githubreleasedate): convert to static fields

* refactor(githubrelease): convert to static fields

* refactor(githubreposize): convert to static fields
2020-09-29 02:15:49 +00:00
Thomas Cross
a4216434f8 [Criterion] Add support for "no change" status (#5621)
* add the const value "no change" as a new status

* add no change status to schema valid status list

* set default color for not found status

* change colors to respect the severity of the status and include "no change"

* add "no change" to the test case

* keep not found status for #5521
2020-09-28 23:11:25 +02:00
Caleb Cartwright
c02050a13a test: fix jsdeliver service tests (#5620)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-28 13:20:16 +00:00
dependabot-preview[bot]
501c53a0b4 Build(deps): bump css-color-converter from 1.1.1 to 2.0.0 in /badge-maker (#5615)
* Build(deps): bump css-color-converter in /badge-maker

Bumps [css-color-converter](https://github.com/andyjansson/css-color-converter) from 1.1.1 to 2.0.0.
- [Release notes](https://github.com/andyjansson/css-color-converter/releases)
- [Changelog](https://github.com/andyjansson/css-color-converter/blob/master/CHANGELOG.md)
- [Commits](https://github.com/andyjansson/css-color-converter/commits)

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

* Update implementation and package-lock.json

* Fix some URLs which switched to HTTP

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: PyvesB <PyvesDev@gmail.com>
2020-09-28 09:16:57 +01:00
Caleb Cartwright
63f56f0762 tests: fix amodownloads service test (#5618)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-27 15:35:29 +00:00
dependabot-preview[bot]
0eedc8d180 Build(deps-dev): bump gatsby from 2.24.57 to 2.24.65 (#5613)
Bumps [gatsby](https://github.com/gatsbyjs/gatsby) from 2.24.57 to 2.24.65.
- [Release notes](https://github.com/gatsbyjs/gatsby/releases)
- [Changelog](https://github.com/gatsbyjs/gatsby/blob/master/CHANGELOG.md)
- [Commits](https://github.com/gatsbyjs/gatsby/compare/gatsby@2.24.57...gatsby@2.24.65)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-27 05:18:36 +00:00
dependabot-preview[bot]
0e0f6903c8 Build(deps-dev): bump @types/react-select from 3.0.19 to 3.0.20 (#5610)
Bumps [@types/react-select](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-select) from 3.0.19 to 3.0.20.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-select)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-27 05:09:14 +00:00
dependabot-preview[bot]
4eda1c7593 Build(deps-dev): bump danger from 10.4.0 to 10.4.1 (#5607)
Bumps [danger](https://github.com/danger/danger-js) from 10.4.0 to 10.4.1.
- [Release notes](https://github.com/danger/danger-js/releases)
- [Changelog](https://github.com/danger/danger-js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/danger/danger-js/compare/10.4.0...10.4.1)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-27 03:39:10 +00:00
dependabot-preview[bot]
b31b7b15ea Build(deps-dev): bump start-server-and-test from 1.11.3 to 1.11.4 (#5609)
Bumps [start-server-and-test](https://github.com/bahmutov/start-server-and-test) from 1.11.3 to 1.11.4.
- [Release notes](https://github.com/bahmutov/start-server-and-test/releases)
- [Commits](https://github.com/bahmutov/start-server-and-test/compare/v1.11.3...v1.11.4)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-27 03:28:44 +00:00
dependabot-preview[bot]
8322bbddaf Build(deps): bump config from 3.3.1 to 3.3.2 (#5606)
Bumps [config](https://github.com/lorenwest/node-config) from 3.3.1 to 3.3.2.
- [Release notes](https://github.com/lorenwest/node-config/releases)
- [Changelog](https://github.com/lorenwest/node-config/blob/master/History.md)
- [Commits](https://github.com/lorenwest/node-config/commits)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-27 03:15:03 +00:00
dependabot-preview[bot]
02642ac289 Build(deps): bump moment from 2.28.0 to 2.29.0 (#5604)
Bumps [moment](https://github.com/moment/moment) from 2.28.0 to 2.29.0.
- [Release notes](https://github.com/moment/moment/releases)
- [Changelog](https://github.com/moment/moment/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/moment/moment/compare/2.28.0...2.29.0)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-27 03:03:53 +00:00
Pierre-Yves B
d784525049 Remove camelcase from package-lock.json (#5616) 2020-09-26 19:00:31 +01:00
dependabot-preview[bot]
613154b8ee Build(deps-dev): bump @types/node from 14.11.1 to 14.11.2 (#5601)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.11.1 to 14.11.2.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-26 06:08:25 +00:00
dependabot-preview[bot]
473aa16d66 Build(deps): bump simple-icons from 3.8.0 to 3.9.0 (#5600)
Bumps [simple-icons](https://github.com/simple-icons/simple-icons) from 3.8.0 to 3.9.0.
- [Release notes](https://github.com/simple-icons/simple-icons/releases)
- [Commits](https://github.com/simple-icons/simple-icons/compare/3.8.0...3.9.0)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-26 05:44:07 +00:00
dependabot-preview[bot]
84583f510f Build(deps-dev): bump jsdoc from 3.6.5 to 3.6.6 (#5599)
Bumps [jsdoc](https://github.com/jsdoc/jsdoc) from 3.6.5 to 3.6.6.
- [Release notes](https://github.com/jsdoc/jsdoc/releases)
- [Changelog](https://github.com/jsdoc/jsdoc/blob/3.6.6/CHANGES.md)
- [Commits](https://github.com/jsdoc/jsdoc/compare/3.6.5...3.6.6)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-26 05:33:17 +00:00
dependabot-preview[bot]
37de6fe742 Build(deps-dev): bump cypress from 5.1.0 to 5.2.0 (#5614)
Bumps [cypress](https://github.com/cypress-io/cypress) from 5.1.0 to 5.2.0.
- [Release notes](https://github.com/cypress-io/cypress/releases)
- [Changelog](https://github.com/cypress-io/cypress/blob/develop/.releaserc.json)
- [Commits](https://github.com/cypress-io/cypress/compare/v5.1.0...v5.2.0)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-26 05:16:59 +00:00
dependabot-preview[bot]
9d4dcb5886 Build(deps-dev): bump eslint-plugin-react from 7.20.6 to 7.21.2 (#5608)
Bumps [eslint-plugin-react](https://github.com/yannickcr/eslint-plugin-react) from 7.20.6 to 7.21.2.
- [Release notes](https://github.com/yannickcr/eslint-plugin-react/releases)
- [Changelog](https://github.com/yannickcr/eslint-plugin-react/blob/master/CHANGELOG.md)
- [Commits](https://github.com/yannickcr/eslint-plugin-react/commits)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-26 05:02:59 +00:00
dependabot-preview[bot]
cba467ecde Build(deps-dev): bump eslint-config-prettier from 6.11.0 to 6.12.0 (#5603)
Bumps [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) from 6.11.0 to 6.12.0.
- [Release notes](https://github.com/prettier/eslint-config-prettier/releases)
- [Changelog](https://github.com/prettier/eslint-config-prettier/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-config-prettier/compare/v6.11.0...v6.12.0)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-26 04:45:43 +00:00
dependabot-preview[bot]
b92f05b9ab Build(deps-dev): bump enzyme-adapter-react-16 from 1.15.4 to 1.15.5 (#5612)
Bumps [enzyme-adapter-react-16](https://github.com/enzymejs/enzyme/tree/HEAD/packages/enzyme-adapter-react-16) from 1.15.4 to 1.15.5.
- [Release notes](https://github.com/enzymejs/enzyme/releases)
- [Changelog](https://github.com/enzymejs/enzyme/blob/master/CHANGELOG.md)
- [Commits](https://github.com/enzymejs/enzyme/commits/enzyme-adapter-react-16@1.15.5/packages/enzyme-adapter-react-16)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-26 04:21:31 +00:00
dependabot-preview[bot]
6818765d89 Build(deps-dev): bump eslint-plugin-jsdoc from 30.4.2 to 30.5.2 (#5602)
Bumps [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) from 30.4.2 to 30.5.2.
- [Release notes](https://github.com/gajus/eslint-plugin-jsdoc/releases)
- [Commits](https://github.com/gajus/eslint-plugin-jsdoc/compare/v30.4.2...v30.5.2)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-09-26 03:39:11 +00:00
Thakur Karthik
bc2832e566 Refactor nuget nycrc opencollective opm services (#5598) 2020-09-25 19:06:10 -05:00
Jabbar Memon
1b91b03b2b Completed [mavencentral mavenmetadata microbadger mozillaobservatory myget netlify] static classes into static props (#5591)
* convert [homebrew,hsts,itunes,jenkins,jetbrains] classes to static props

* Run the prettier across the files

* Updated the correct values in logos.spec.js

* revert back the logos.spec.js changes

* Completed refactoring of [lgtm liberapay librariesio localizely luarocks]

* Convert defaultBadgeData to object

* Completed some classes[maven-central maven-metadata microbadger mozilla-observatory myget netlify] into props

* Completed some classes[maven-central maven-metadata microbadger mozilla-observatory myget netlify] into props

* changed the title

* Added todo in mozilla-observatory service

Co-authored-by: Jabbar Memon <jabbar@zoop.one>
2020-09-24 19:20:37 -05:00
Caleb Cartwright
88b3bc72dd docs: add hacktoberfest badges to readme (#5596) 2020-09-24 04:26:04 +00:00
Caleb Cartwright
b149659187 convert some service classes to static fields, run [GitHubLernaJson GithubLicense GithubManifest GithubMilestoneDetail GithubMilestone GithubPackageJson] (#5595)
* refactor(githublernajson): convert to static fields

* refactor(githublicense): convert to static fields

* refactor(githubmanifest): convert to static fields

* refactor(githubmilestonedetail): convert to static fields

* refactor(githubmilestone): convert to static fields

* refactor(githubpackagejson): convert to static fields
2020-09-23 23:41:36 -04:00
Caleb Cartwright
ec5b976c0d convert some service classes to static fields, run [GitHubForks GitHubGoMod GitHubIssueDetail GitHubIssues GitHubLabels GitHubLanguageCount GitHubLastCommit] (#5590)
* refactor(githubforks): convert to static fields

* refactor(githubgomod): convert to static fields

* refactor(githubissuedetail): convert to static fields

* refactor(githubissues): convert to static fields

* refactor(githublabels): convert to static fields

* refactor(githublanguagecount): convert to static fields

* refactor(githublastcommit): convert to static fields

Co-authored-by: Paul Melnikow <github@paulmelnikow.com>
2020-09-22 18:18:54 -05:00
chris48s
484c652719 use HEAD ref in [github] fetchJsonFromRepo (#5589)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-22 18:15:27 +00:00
Thakur Karthik
aa171180e5 Convert [maintenance mastodon matrix mavencentral] classes to static props (#5588)
* Refactor jira,jitpack,jsdelivr,keybase service files

* refactor maintenance mastodon matric and maven-central service files

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-22 03:30:18 +00:00
Paul Melnikow
0067fed6f6 Work around DT conflict; bump TS and @types/styled-components (#5586)
@types/styled-components causes a conflict with @types/react-native. See DefinitelyTyped/DefinitelyTyped#33311.

Close #5294

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-22 03:21:54 +00:00
Jabbar Memon
76f13aa686 convert [lgtm liberapay librariesio localizely luarocks] classes to static props (#5587)
* convert [homebrew,hsts,itunes,jenkins,jetbrains] classes to static props

* Run the prettier across the files

* Updated the correct values in logos.spec.js

* revert back the logos.spec.js changes

* Completed refactoring of [lgtm liberapay librariesio localizely luarocks]

* Convert defaultBadgeData to object

Co-authored-by: Jabbar Memon <jabbar@zoop.one>
2020-09-21 22:11:33 -05:00
Caleb Cartwright
5a3064d0d4 convert some service classes to static fields, run [GitHubCommitsSince GitHubContributors GitHubDeployments GitHubDownloads GitHubFollowers] (#5585)
* refactor(githubcommitssince): convert to static fields

* refactor(githubcontributors): convert to static fields

* refactor(githubdeployments): convert to static fields

* refactor(githubdownloads): convert to static fields

* refactor(githubfollowers): convert to static fields
2020-09-21 11:25:15 -04:00
Caleb Cartwright
fa608e29d3 refactor(github): convert some clasess to static fields (#5556)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-20 20:17:22 +00:00
Caleb Cartwright
7712d26897 tests: add a validator for 0/timePeriod (#5583)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-20 19:58:54 +00:00
Caleb Cartwright
36395715a5 [GitHubHacktoberfest] 2020 (and beyond) (#5549)
* feat: GitHub Hacktoberfest 2020 (and beyond)

* chore: prettify

* refactor: convert to static fields

* refactor: fix spelling in pre-start message

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-20 18:40:47 +00:00
Joe Izzard
ff3acce7bb [WordPress] API Update (#5579)
* feat: updated to new WordPress API

Updated to the new WordPress API, and separated plugin and theme schemas for future expansion

* test: updated testing for new API

Updated some testing to work with the new API request

* feat: updated schema to require keys

Updated schema to require all the keys in the schema

* fix: remove duplicate requirement

The helper already includes required so we don't need to require it again

Co-authored-by: Caleb Cartwright <calebcartwright@users.noreply.github.com>

* fix: remove duplicate requirement

The helper already includes required so we don't need to require it again

Co-authored-by: Caleb Cartwright <calebcartwright@users.noreply.github.com>

Co-authored-by: Caleb Cartwright <calebcartwright@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-20 18:31:31 +00:00
dependabot-preview[bot]
e00c1c252c Build(deps-dev): bump lint-staged from 10.3.0 to 10.4.0 (#5563)
Bumps [lint-staged](https://github.com/okonet/lint-staged) from 10.3.0 to 10.4.0.
- [Release notes](https://github.com/okonet/lint-staged/releases)
- [Commits](https://github.com/okonet/lint-staged/compare/v10.3.0...v10.4.0)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-20 17:25:48 +00:00
chris48s
2c47d12745 bump approve-bot to 2.0.1 (#5578)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
Co-authored-by: Caleb Cartwright <calebcartwright@users.noreply.github.com>
2020-09-20 12:15:58 -05:00
Jabbar Memon
b61fc8291c convert [homebrew hsts itunes jenkins jetbrains] classes to static props (#5582)
* convert [homebrew,hsts,itunes,jenkins,jetbrains] classes to static props

* Run the prettier across the files

* Updated the correct values in logos.spec.js

* revert back the logos.spec.js changes

Co-authored-by: Jabbar Memon <jabbar@zoop.one>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-20 16:07:59 +00:00
Thakur Karthik
4c34b14b4a Refactor jira,jitpack,jsdelivr,keybase service files (#5581) 2020-09-20 15:44:47 +00:00
Caleb Cartwright
fc91038652 Fix [GitlabPipeline] not found repo service test (#5538)
* tests(GitlabPipelineStatus): fix not found service test

* docs: describe gitlab innaccessible message

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-19 20:08:23 +00:00
dependabot-preview[bot]
a4baeb786a Build(deps-dev): bump @types/node from 14.10.1 to 14.11.1 (#5572)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.10.1 to 14.11.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-19 19:29:36 +00:00
Thakur Karthik
c997a2aa5c refactor gitlab,gitter,hackage,hexpm service files (#5575)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-19 17:00:46 +00:00
dependabot-preview[bot]
c281683a61 Build(deps-dev): bump prettier from 2.1.1 to 2.1.2 (#5571)
Bumps [prettier](https://github.com/prettier/prettier) from 2.1.1 to 2.1.2.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.1.1...2.1.2)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-19 16:18:23 +00:00
dependabot-preview[bot]
f31b50adc7 Build(deps): bump moment from 2.27.0 to 2.28.0 (#5567)
Bumps [moment](https://github.com/moment/moment) from 2.27.0 to 2.28.0.
- [Release notes](https://github.com/moment/moment/releases)
- [Changelog](https://github.com/moment/moment/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/moment/moment/compare/2.27.0...2.28.0)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-19 16:09:02 +00:00
dependabot-preview[bot]
b13d2aa352 Build(deps-dev): bump got from 11.6.2 to 11.7.0 (#5561)
Bumps [got](https://github.com/sindresorhus/got) from 11.6.2 to 11.7.0.
- [Release notes](https://github.com/sindresorhus/got/releases)
- [Commits](https://github.com/sindresorhus/got/compare/v11.6.2...v11.7.0)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-19 15:58:58 +00:00
dependabot-preview[bot]
142cec1273 Build(deps): bump @sentry/node from 5.23.0 to 5.24.2 (#5565)
Bumps [@sentry/node](https://github.com/getsentry/sentry-javascript) from 5.23.0 to 5.24.2.
- [Release notes](https://github.com/getsentry/sentry-javascript/releases)
- [Changelog](https://github.com/getsentry/sentry-javascript/blob/master/CHANGELOG.md)
- [Commits](https://github.com/getsentry/sentry-javascript/compare/5.23.0...5.24.2)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-19 15:49:07 +00:00
dependabot-preview[bot]
7845800f80 Build(deps): bump query-string from 6.13.1 to 6.13.2 (#5558)
Bumps [query-string](https://github.com/sindresorhus/query-string) from 6.13.1 to 6.13.2.
- [Release notes](https://github.com/sindresorhus/query-string/releases)
- [Commits](https://github.com/sindresorhus/query-string/compare/v6.13.1...v6.13.2)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-09-19 10:29:31 -05:00
dependabot-preview[bot]
ce73281aaa Build(deps): bump simple-icons from 3.7.0 to 3.8.0 (#5564)
Bumps [simple-icons](https://github.com/simple-icons/simple-icons) from 3.7.0 to 3.8.0.
- [Release notes](https://github.com/simple-icons/simple-icons/releases)
- [Commits](https://github.com/simple-icons/simple-icons/compare/3.7.0...3.8.0)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-09-19 10:17:37 -05:00
Pratapi Hemant
108a819c3a [GITHUB] Badge for total stars of an user / org (#5507)
* added badge for total stars of an user / org
* Added a transformJson method in graphql-base to handle partial data


Co-authored-by: Pratapi Hemant Patel <pratpatel@expedia.com>
Co-authored-by: Caleb Cartwright <calebcartwright@users.noreply.github.com>
2020-09-19 12:07:23 +01:00
Caleb Cartwright
737254f4a5 convert some service classes to static props, run [gem gerrit] (#5553)
* refactor(gem): convert to static props

* refactor(gerrit): convert to static props

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-18 22:28:24 +00:00
Caleb Cartwright
6682b87efe convert some service classes to static props, run [f-droid fedora flathub] (#5552)
* refactor(f-droid): convert to static props

* refactor(fedora): convert to static props

* refactor(flathub): convert to static props

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-18 22:19:05 +00:00
Jonathan
c8eb99fc4c [Tokei] Implement a lines of code (LOC) badge (#5547)
* Implement LOC badge

* Apply suggestions from code review

Co-authored-by: Caleb Cartwright <calebcartwright@users.noreply.github.com>

* Fix tokei tests after API change

* Format the code

* Rename tokei service file

* Add comment about Tokei API behavior

* Document tokei badge behavior

Co-authored-by: Caleb Cartwright <calebcartwright@users.noreply.github.com>
2020-09-17 22:34:15 -05:00
Caleb Cartwright
ab65b42f0b Adopt Code of Conduct (#5236)
* docs: adopt Contributor Covenant

* chore: make pretty with prettier!

* docs: add contact methods to CoC

* docs: update CoC contacts

* docs: update email badges

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-16 00:41:33 +00:00
Caleb Cartwright
614daef08f convert some service classes to static props, run [EclipseMarketplace Ecologi ElmPackage Endpoint] (#5544)
* refactor(eclipsemarketplace): convert to static props

* refactor(ecologi): convert to static props

* refactor(elmpackage): convert to static props

* refactor(endpoint): convert to static props
2020-09-15 11:46:27 +00:00
Caleb Cartwright
ac54dd3ced convert some service classes to static props, run [drone dub dynamic] (#5543)
* refactor(drone): convert to static props

* refactor(dub): convert to static props

* refactor(dynamic): convert to static props
2020-09-15 01:42:57 +00:00
Caleb Cartwright
0b31461af6 convert some service classes to static props, run [date david debian debug dependabot] (#5539)
* refactor(date): convert to static props

* refactor(david): convert to static props

* refactor(debian): convert to static props

* refactor(debug): convert to static props

* refactor(dependabot): convert to static props

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-14 21:54:22 +00:00
Caleb Cartwright
1d649fa702 convert some service classes to static props, run [depfu discourse docker] (#5540)
* refactor(depfu): convert to static props

* refactor(discourse): convert to static props

* refactor(docker): convert to static props
2020-09-14 21:44:55 +00:00
Pierre-Yves B
f1007a5ee2 Remove duplicate normalizeColor calls (#5534)
* Remove duplicate normalizeColor calls

* Clarify behaviour with comment
2020-09-13 22:11:22 +02:00
Pierre-Yves B
bf4fd96059 Remove camelcase dependency from badge-maker package (#5533) 2020-09-13 09:17:07 +02:00
Pierre-Yves B
3eadcf448f Add guidelines about including tokens in badge URLs (#5522)
* Add guidelines about including tokens in badge URLs

* Tweak wording

Co-authored-by: Caleb Cartwright <calebcartwright@users.noreply.github.com>

Co-authored-by: Caleb Cartwright <calebcartwright@users.noreply.github.com>
2020-09-13 09:08:32 +02:00
dependabot-preview[bot]
932b3b56c5 Build(deps-dev): bump gatsby-plugin-page-creator from 2.3.22 to 2.3.27 (#5532)
Bumps [gatsby-plugin-page-creator](https://github.com/gatsbyjs/gatsby/tree/HEAD/packages/gatsby-plugin-page-creator) from 2.3.22 to 2.3.27.
- [Release notes](https://github.com/gatsbyjs/gatsby/releases)
- [Changelog](https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-plugin-page-creator/CHANGELOG.md)
- [Commits](https://github.com/gatsbyjs/gatsby/commits/gatsby-plugin-page-creator@2.3.27/packages/gatsby-plugin-page-creator)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-12 18:09:38 +00:00
dependabot-preview[bot]
07f4d67cea Build(deps-dev): bump gatsby from 2.24.53 to 2.24.57 (#5531)
Bumps [gatsby](https://github.com/gatsbyjs/gatsby) from 2.24.53 to 2.24.57.
- [Release notes](https://github.com/gatsbyjs/gatsby/releases)
- [Changelog](https://github.com/gatsbyjs/gatsby/blob/master/CHANGELOG.md)
- [Commits](https://github.com/gatsbyjs/gatsby/compare/gatsby@2.24.53...gatsby@2.24.57)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-12 17:57:11 +00:00
Caleb Cartwright
9f814fa3e2 convert some service classes to static props, run [cran crates ctan] (#5517)
* refactor(cran): convert to static props

* refactor(crates): convert to static props

* refactor(ctan): convert to static props

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-12 17:46:33 +00:00
Caleb Cartwright
bb6d2b5c78 convert some service classes to static props, run [cookbook coveralls cpan] (#5516)
* refactor(cookbook): convert to static props

* refactor(coveralls): convert to static props

* refactor(coverity): convert to static props

* refactor(cpan): convert to static props

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-12 17:39:01 +00:00
Caleb Cartwright
b7dcf58bd6 convert some service classes to static props, run [codefactor codeship conda continuousphp] (#5515)
* refactor(codefactor): convert to static props

* refactor(codeship): convert to static props

* refactor(conda): convert to static props

* refactor(continuousphp): convert to static props

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-12 17:17:19 +00:00
Caleb Cartwright
65295ddcdf convert some service classes to static props, run [clojars cocoapods] (#5513)
* refactor(clojars): convert to static props

* refactor(cocoapods): convert to static props

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-12 17:03:52 +00:00
Caleb Cartwright
005b3ba4ac convert some service classes to static props, run [codacy codeclimate codecov] (#5514)
* refactor(codacy): convert to static props

* refactor(codeclimate): convert to static props

* refactor(codecov): convert to static props

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-12 16:55:45 +00:00
dependabot-preview[bot]
55310c3ed0 Build(deps): bump @sentry/node from 5.22.3 to 5.23.0 (#5526)
Bumps [@sentry/node](https://github.com/getsentry/sentry-javascript) from 5.22.3 to 5.23.0.
- [Release notes](https://github.com/getsentry/sentry-javascript/releases)
- [Changelog](https://github.com/getsentry/sentry-javascript/blob/master/CHANGELOG.md)
- [Commits](https://github.com/getsentry/sentry-javascript/compare/5.22.3...5.23.0)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-12 16:39:38 +00:00
Caleb Cartwright
bb2f827e00 convert some service classes to static props, run [ciibestpractices circleci cirrus] (#5511)
* refactor(ciibestpractices): convert to static props

* refactor(circleci): convert to static props

* refactor(cirrus): convert to static props

* chore: prettify

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-12 16:22:03 +00:00
Caleb Cartwright
a88302eafb convert some service classes to static props, run [cdnjs chromewebstore] (#5509)
* refactor(cdnjs): convert to static props

* refactor(chromewebstore): convert to static props

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-12 16:04:20 +00:00
Caleb Cartwright
1c01520515 test(coverity): fix failing service test (#5519)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-12 14:36:00 +00:00
Caleb Cartwright
9ef79889b0 test(criterion): fix failing service test (#5521)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-12 14:27:02 +00:00
dependabot-preview[bot]
83bfb069ee Build(deps-dev): bump husky from 4.2.5 to 4.3.0 (#5530)
Bumps [husky](https://github.com/typicode/husky) from 4.2.5 to 4.3.0.
- [Release notes](https://github.com/typicode/husky/releases)
- [Changelog](https://github.com/typicode/husky/blob/master/CHANGELOG.md)
- [Commits](https://github.com/typicode/husky/compare/v4.2.5...v4.3.0)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-09-12 13:39:51 +00:00
dependabot-preview[bot]
f12add001d Build(deps-dev): bump got from 11.6.0 to 11.6.2 (#5529)
Bumps [got](https://github.com/sindresorhus/got) from 11.6.0 to 11.6.2.
- [Release notes](https://github.com/sindresorhus/got/releases)
- [Commits](https://github.com/sindresorhus/got/compare/v11.6.0...v11.6.2)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-12 13:16:36 +00:00
dependabot-preview[bot]
b53cb879a9 Build(deps-dev): bump @types/enzyme from 3.10.5 to 3.10.6 (#5528)
Bumps [@types/enzyme](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/enzyme) from 3.10.5 to 3.10.6.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/enzyme)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-09-12 13:07:56 +00:00
dependabot-preview[bot]
e836a7b8b2 Build(deps-dev): bump @types/node from 14.6.4 to 14.10.1 (#5524)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.6.4 to 14.10.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-09-12 12:54:48 +00:00
dependabot-preview[bot]
235447e6cb Build(deps): bump simple-icons from 3.6.1 to 3.7.0 (#5523)
Bumps [simple-icons](https://github.com/simple-icons/simple-icons) from 3.6.1 to 3.7.0.
- [Release notes](https://github.com/simple-icons/simple-icons/releases)
- [Commits](https://github.com/simple-icons/simple-icons/compare/3.6.1...3.7.0)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-12 12:43:11 +00:00
dependabot-preview[bot]
ba1d0435c8 Build(deps-dev): bump eslint-plugin-jsdoc from 30.3.1 to 30.4.2 (#5525)
Bumps [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) from 30.3.1 to 30.4.2.
- [Release notes](https://github.com/gajus/eslint-plugin-jsdoc/releases)
- [Commits](https://github.com/gajus/eslint-plugin-jsdoc/compare/v30.3.1...v30.4.2)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-09-12 12:00:33 +00:00
Pierre-Yves B
06dff040c6 Rework isCSSColor check (#5508)
* Rework isCSSColor check

* Expand tests and accept strings with whitespace

* Remove void(0) edge-case test
2020-09-12 12:04:41 +02:00
Caleb Cartwright
e626d64b4e convert some service classes to static props, run [ansible apm appveyor] (#5496)
* refactor(ansible): convert to static props

* refactor(apm): convert to static props

* refactor(appveyor): convert to static props

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-09 22:57:47 +00:00
Zoran Luledzija
939d748619 Add [Localizely] badges (#5472)
* Add Localizely badges for overall and per-language translation progress

* Update route config

* Update services names

* Update service logic according code review suggestions

* Update message for unauthorized access

* Rename service file name

* Remove Accept header

* Update example badges with real parameter values

* Update documentation with security warning

Co-authored-by: Caleb Cartwright <calebcartwright@users.noreply.github.com>
Co-authored-by: Pierre-Yves B <PyvesDev@gmail.com>
2020-09-09 19:09:04 +02:00
Caleb Cartwright
7e68644587 convert some service classes to static props, run [archlinux aur azuredevops] (#5500)
* refactor(archlinux): convert to static props

* refactor(aur): convert to static props

* refactor(azuredevops): convert to static props

* tests: fix AzDO Coverage service test

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-08 22:13:31 +00:00
Caleb Cartwright
e9b3a0a921 convert some service classes to static props, run [bitbucket bitrise bountysource] (#5502)
* refactor(bitbucket): convert to static props

* refactor(bitrise): convert to static props

* refactor(bountysource): convert to static props

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-08 22:03:12 +00:00
Caleb Cartwright
542e2cf407 convert some service classes to static props, run [beerpay bintray bit] (#5501)
* refactor(beerpay): convert to static props

* refactor(bintray): convert to static props

* refactor(bit): convert to static props

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-08 21:54:52 +00:00
Caleb Cartwright
1027c296ee convert some service classes to static props, run [bower bstats] (#5503)
* refactor(bower): convert to static props

* refactor(bstats): convert to static props

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-08 16:45:46 -05:00
Caleb Cartwright
70089bafba convert some service classes to static props, run [buildkite bundlephobia] (#5504)
* refactor(bugzilla): convert to static props

* refactor(buildkite): convert to static props

* refactor(bundlephobia): convert to static props
2020-09-08 21:37:40 +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
38322e1412 redirect /endpoint with no query params to endpoint docs (#5137)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-06 17:21:58 +00:00
Cédric Luthi
6e88aee7c8 [Scoop] Add scoop badge service (#5081)
* [Scoop] Add scoop badge service

* Rename scoop.service.js into scoop-version.service.js

Also rename scoop.tester.js into scoop-version.tester.js

* Cache buckets file

* Fix test

* Improve regex to handle trailing slash

* Switch to static fields

Co-authored-by: PyvesB <PyvesDev@gmail.com>
2020-09-06 19:01:37 +02:00
chris48s
56a303df87 deprecate [ChromeWebStoreRating] badges (#5495)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-06 16:39:50 +00:00
Ben Ramsey
8082eeb47b fix(packagist): use default branch as indicated by Packagist (#5474)
Instead of assuming dev-master for the default branch, check the package
data from Packagist to see which branch is set as the default, and use
it.

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-06 14:08:12 +00:00
Pierre-Yves B
1009491b68 Fix externally hosted [Spiget] test (#5477)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-06 10:04:48 +00:00
dependabot-preview[bot]
2bc62926a3 Build(deps-dev): bump got from 11.5.2 to 11.6.0 (#5488)
Bumps [got](https://github.com/sindresorhus/got) from 11.5.2 to 11.6.0.
- [Release notes](https://github.com/sindresorhus/got/releases)
- [Commits](https://github.com/sindresorhus/got/compare/v11.5.2...v11.6.0)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-09-05 16:27:08 -05:00
dependabot-preview[bot]
3880e22e83 Build(deps-dev): bump @babel/register from 7.10.5 to 7.11.5 (#5487)
Bumps [@babel/register](https://github.com/babel/babel/tree/HEAD/packages/babel-register) from 7.10.5 to 7.11.5.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.11.5/packages/babel-register)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-05 21:07:30 +00:00
dependabot-preview[bot]
532a4eb665 Build(deps-dev): bump gatsby from 2.24.52 to 2.24.53 (#5486)
Bumps [gatsby](https://github.com/gatsbyjs/gatsby) from 2.24.52 to 2.24.53.
- [Release notes](https://github.com/gatsbyjs/gatsby/releases)
- [Changelog](https://github.com/gatsbyjs/gatsby/blob/master/CHANGELOG.md)
- [Commits](https://github.com/gatsbyjs/gatsby/compare/gatsby@2.24.52...gatsby@2.24.53)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-05 20:13:10 +00:00
dependabot-preview[bot]
d043000844 Build(deps-dev): bump @babel/core from 7.11.4 to 7.11.6 (#5485)
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.11.4 to 7.11.6.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.11.6/packages/babel-core)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-05 20:05:30 +00:00
dependabot-preview[bot]
4690cd25b0 Build(deps-dev): bump @types/node from 14.6.2 to 14.6.4 (#5480)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.6.2 to 14.6.4.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-05 18:21:49 +00:00
dependabot-preview[bot]
a613ebd99e Build(deps-dev): bump styled-components from 5.1.1 to 5.2.0 (#5483)
Bumps [styled-components](https://github.com/styled-components/styled-components) from 5.1.1 to 5.2.0.
- [Release notes](https://github.com/styled-components/styled-components/releases)
- [Changelog](https://github.com/styled-components/styled-components/blob/master/CHANGELOG.md)
- [Commits](https://github.com/styled-components/styled-components/compare/v5.1.1...v5.2.0)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-05 18:06:29 +00:00
dependabot-preview[bot]
9abfe221a4 Build(deps-dev): bump @babel/polyfill from 7.10.4 to 7.11.5 (#5479)
Bumps [@babel/polyfill](https://github.com/babel/babel/tree/HEAD/packages/babel-polyfill) from 7.10.4 to 7.11.5.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.11.5/packages/babel-polyfill)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-05 17:57:25 +00:00
Pierre-Yves B
a0178f317c Deprecate [Codetally] service (#5478) 2020-09-05 16:23:37 +02:00
dependabot-preview[bot]
ff08c5d177 Build(deps-dev): bump lint-staged from 10.2.13 to 10.3.0 (#5492)
Bumps [lint-staged](https://github.com/okonet/lint-staged) from 10.2.13 to 10.3.0.
- [Release notes](https://github.com/okonet/lint-staged/releases)
- [Commits](https://github.com/okonet/lint-staged/compare/v10.2.13...v10.3.0)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-05 14:13:01 +00:00
dependabot-preview[bot]
244c18a572 Build(deps): bump pretty-bytes from 5.4.0 to 5.4.1 (#5490)
Bumps [pretty-bytes](https://github.com/sindresorhus/pretty-bytes) from 5.4.0 to 5.4.1.
- [Release notes](https://github.com/sindresorhus/pretty-bytes/releases)
- [Commits](https://github.com/sindresorhus/pretty-bytes/compare/v5.4.0...v5.4.1)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-05 14:00:08 +00:00
Thomas Cross
55e1d8f00c Add [Criterion] badge (#5471)
* add criterion shield service and tests

* remove error function.  replace with const statuses

* use shared const and formatting

* use commonjs/nodejs "module.exports"

* simplify badge generation

* leverage static fields, for newer version of node

* add documentation and contact links

* Update services/criterion/criterion.service.js

Co-authored-by: Caleb Cartwright <calebcartwright@users.noreply.github.com>

* Update services/criterion/criterion.service.js

Co-authored-by: Caleb Cartwright <calebcartwright@users.noreply.github.com>

* make criterion prettier

Co-authored-by: Caleb Cartwright <calebcartwright@users.noreply.github.com>
Co-authored-by: Pierre-Yves B <PyvesDev@gmail.com>
2020-09-05 15:49:43 +02:00
dependabot-preview[bot]
f7ba544a81 Build(deps): bump simple-icons from 3.6.0 to 3.6.1 (#5489)
Bumps [simple-icons](https://github.com/simple-icons/simple-icons) from 3.6.0 to 3.6.1.
- [Release notes](https://github.com/simple-icons/simple-icons/releases)
- [Commits](https://github.com/simple-icons/simple-icons/compare/3.6.0...3.6.1)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-05 13:38:24 +00:00
dependabot-preview[bot]
07cf531ab1 Build(deps-dev): bump enzyme-adapter-react-16 from 1.15.3 to 1.15.4 (#5482)
Bumps [enzyme-adapter-react-16](https://github.com/enzymejs/enzyme/tree/HEAD/packages/enzyme-adapter-react-16) from 1.15.3 to 1.15.4.
- [Release notes](https://github.com/enzymejs/enzyme/releases)
- [Changelog](https://github.com/enzymejs/enzyme/blob/master/CHANGELOG.md)
- [Commits](https://github.com/enzymejs/enzyme/commits/enzyme-adapter-react-16@1.15.4/packages/enzyme-adapter-react-16)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-05 12:44:34 +00:00
dependabot-preview[bot]
cb5dcd175d Build(deps-dev): bump eslint-plugin-jsdoc from 30.3.0 to 30.3.1 (#5484)
Bumps [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) from 30.3.0 to 30.3.1.
- [Release notes](https://github.com/gajus/eslint-plugin-jsdoc/releases)
- [Commits](https://github.com/gajus/eslint-plugin-jsdoc/compare/v30.3.0...v30.3.1)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-05 12:17:33 +00:00
dependabot-preview[bot]
bcffe9133b Build(deps-dev): bump cypress from 5.0.0 to 5.1.0 (#5481)
Bumps [cypress](https://github.com/cypress-io/cypress) from 5.0.0 to 5.1.0.
- [Release notes](https://github.com/cypress-io/cypress/releases)
- [Commits](https://github.com/cypress-io/cypress/compare/v5.0.0...v5.1.0)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-09-05 11:52:56 +00:00
dependabot-preview[bot]
bf98260a4c Build(deps-dev): bump @types/node from 14.6.0 to 14.6.2 (#5464)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.6.0 to 14.6.2.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-01 21:28:39 +00:00
dependabot-preview[bot]
a949f31def Build(deps): bump pretty-bytes from 5.3.0 to 5.4.0 (#5462)
Bumps [pretty-bytes](https://github.com/sindresorhus/pretty-bytes) from 5.3.0 to 5.4.0.
- [Release notes](https://github.com/sindresorhus/pretty-bytes/releases)
- [Commits](https://github.com/sindresorhus/pretty-bytes/compare/v5.3.0...v5.4.0)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-01 21:19:30 +00:00
dependabot-preview[bot]
681489d10d Build(deps-dev): bump lint-staged from 10.2.11 to 10.2.13 (#5463)
Bumps [lint-staged](https://github.com/okonet/lint-staged) from 10.2.11 to 10.2.13.
- [Release notes](https://github.com/okonet/lint-staged/releases)
- [Commits](https://github.com/okonet/lint-staged/compare/v10.2.11...v10.2.13)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-08-31 13:52:34 +00:00
dependabot-preview[bot]
056e5e5b31 Build(deps-dev): bump eslint-plugin-jsdoc from 30.2.4 to 30.3.0 (#5461)
Bumps [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) from 30.2.4 to 30.3.0.
- [Release notes](https://github.com/gajus/eslint-plugin-jsdoc/releases)
- [Commits](https://github.com/gajus/eslint-plugin-jsdoc/compare/v30.2.4...v30.3.0)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-08-31 13:43:01 +00:00
dependabot-preview[bot]
d1d00128f8 Build(deps): bump simple-icons from 3.5.0 to 3.6.0 (#5465)
Bumps [simple-icons](https://github.com/simple-icons/simple-icons) from 3.5.0 to 3.6.0.
- [Release notes](https://github.com/simple-icons/simple-icons/releases)
- [Commits](https://github.com/simple-icons/simple-icons/compare/3.5.0...3.6.0)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-08-31 06:37:52 +00:00
dependabot-preview[bot]
60d92cd5d6 Build(deps-dev): bump prettier from 2.0.5 to 2.1.1; test [pypi] (#5466)
* Build(deps-dev): bump prettier from 2.0.5 to 2.1.1

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

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

* update code formatting for new prettier version

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: chris48s <chris.shaw480@gmail.com>
Co-authored-by: chris48s <chris48s@users.noreply.github.com>
2020-08-30 16:08:50 +01:00
dependabot-preview[bot]
8c50458285 Build(deps-dev): bump gatsby from 2.24.47 to 2.24.52 (#5459)
Bumps [gatsby](https://github.com/gatsbyjs/gatsby) from 2.24.47 to 2.24.52.
- [Release notes](https://github.com/gatsbyjs/gatsby/releases)
- [Changelog](https://github.com/gatsbyjs/gatsby/blob/master/CHANGELOG.md)
- [Commits](https://github.com/gatsbyjs/gatsby/compare/gatsby@2.24.47...gatsby@2.24.52)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: chris48s <chris48s@users.noreply.github.com>
2020-08-30 15:57:38 +01:00
Pierre-Yves B
2c329cdbb3 Update documentation about snapshot tests (#5468) 2020-08-29 21:28:27 +02:00
dependabot-preview[bot]
6880bc06f9 Build(deps): bump @sentry/node from 5.21.3 to 5.22.3 (#5458)
Bumps [@sentry/node](https://github.com/getsentry/sentry-javascript) from 5.21.3 to 5.22.3.
- [Release notes](https://github.com/getsentry/sentry-javascript/releases)
- [Changelog](https://github.com/getsentry/sentry-javascript/blob/master/CHANGELOG.md)
- [Commits](https://github.com/getsentry/sentry-javascript/compare/5.21.3...5.22.3)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-08-29 11:39:42 -05:00
Pierre-Yves B
1047fd9c7e Remove badgerbadgerbadger from related projects and add poser (#5456) 2020-08-23 19:08:30 +02:00
dependabot-preview[bot]
a2e132d98f Build(deps): bump xpath from 0.0.27 to 0.0.29 (#5452)
Bumps [xpath](https://github.com/goto100/xpath) from 0.0.27 to 0.0.29.
- [Release notes](https://github.com/goto100/xpath/releases)
- [Commits](https://github.com/goto100/xpath/commits)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-08-23 16:54:00 +00:00
dependabot-preview[bot]
5c0a9a3beb Build(deps-dev): bump cypress from 4.12.1 to 5.0.0 (#5447)
Bumps [cypress](https://github.com/cypress-io/cypress) from 4.12.1 to 5.0.0.
- [Release notes](https://github.com/cypress-io/cypress/releases)
- [Commits](https://github.com/cypress-io/cypress/compare/v4.12.1...v5.0.0)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-08-23 16:38:14 +00:00
dependabot-preview[bot]
ada4bae12d Build(deps-dev): bump @babel/core from 7.11.1 to 7.11.4 (#5450)
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.11.1 to 7.11.4.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.11.4/packages/babel-core)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-08-23 10:24:52 +00:00
dependabot-preview[bot]
c463e77da3 Build(deps-dev): bump @types/node from 14.0.27 to 14.6.0 (#5446)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.0.27 to 14.6.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-08-22 18:31:30 +00:00
dependabot-preview[bot]
106e2a1cf1 Build(deps): bump @sentry/node from 5.21.1 to 5.21.3 (#5453)
Bumps [@sentry/node](https://github.com/getsentry/sentry-javascript) from 5.21.1 to 5.21.3.
- [Release notes](https://github.com/getsentry/sentry-javascript/releases)
- [Changelog](https://github.com/getsentry/sentry-javascript/blob/master/CHANGELOG.md)
- [Commits](https://github.com/getsentry/sentry-javascript/compare/5.21.1...5.21.3)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-08-22 18:22:10 +00:00
dependabot-preview[bot]
3c1b5a86f5 Build(deps-dev): bump @types/react-select from 3.0.16 to 3.0.19 (#5448)
Bumps [@types/react-select](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-select) from 3.0.16 to 3.0.19.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-select)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-08-22 18:13:42 +00:00
dependabot-preview[bot]
ab596a164f Build(deps-dev): bump node-mocks-http from 1.8.1 to 1.9.0 (#5445)
Bumps [node-mocks-http](https://github.com/howardabrams/node-mocks-http) from 1.8.1 to 1.9.0.
- [Release notes](https://github.com/howardabrams/node-mocks-http/releases)
- [Changelog](https://github.com/howardabrams/node-mocks-http/blob/master/HISTORY.md)
- [Commits](https://github.com/howardabrams/node-mocks-http/compare/v1.8.1...v1.9.0)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-08-22 18:04:01 +00:00
dependabot-preview[bot]
b3a5c9224e Build(deps-dev): bump @types/mocha from 8.0.2 to 8.0.3 (#5454)
Bumps [@types/mocha](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/mocha) from 8.0.2 to 8.0.3.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/mocha)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-08-22 17:52:55 +00:00
dependabot-preview[bot]
ab3dc93776 Build(deps-dev): bump danger from 10.3.0 to 10.4.0 (#5444)
Bumps [danger](https://github.com/danger/danger-js) from 10.3.0 to 10.4.0.
- [Release notes](https://github.com/danger/danger-js/releases)
- [Changelog](https://github.com/danger/danger-js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/danger/danger-js/compare/10.3.0...10.4.0)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-08-22 03:12:55 +00:00
dependabot-preview[bot]
47b55cf9e0 Build(deps): bump simple-icons from 3.4.1 to 3.5.0 (#5451)
Bumps [simple-icons](https://github.com/simple-icons/simple-icons) from 3.4.1 to 3.5.0.
- [Release notes](https://github.com/simple-icons/simple-icons/releases)
- [Commits](https://github.com/simple-icons/simple-icons/compare/3.4.1...3.5.0)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-08-22 03:03:37 +00:00
dependabot-preview[bot]
aef6368390 Build(deps-dev): bump eslint-plugin-jsdoc from 30.2.2 to 30.2.4 (#5443)
Bumps [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) from 30.2.2 to 30.2.4.
- [Release notes](https://github.com/gajus/eslint-plugin-jsdoc/releases)
- [Commits](https://github.com/gajus/eslint-plugin-jsdoc/compare/v30.2.2...v30.2.4)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-08-22 01:44:49 +00:00
Sebastian Meyer
0d62406d0b feat: GithubWorkflowStatus event query string (#5442)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-08-19 23:09:24 +00:00
Paul Melnikow
7c226456fe Adopt static fields in [amo] and core (#5440)
Since we've upgraded production to Node 12 (#5436) we can finally adopt static fields!

This starts the process by updating core and one of the service families.
2020-08-19 14:49:29 -04:00
chris48s
0bcd7eef15 Run on node 12 in production, update test matrix (#5436)
* upgrade node/npm versions in package.json

* delete config for zeit now
zeit now is no more, vercel have decomissioned the now v1 platform

* upgrade to node 12 for (docker) self-hosting users

* update docs

* update test matrix
run tests on node 12 and node 14

* link to nodejs version support docs in package comment
we'll continue to tun the package tests on node 10
while its still maintained and drop in the next
major release

* update depcheck

* remove npm-install job
2020-08-18 19:28:58 +01:00
Owen Voke
4059bdcdfa feat: rename [OffsetEarth] to [Ecologi] (#5434)
* chore: update Offset Earth (Carbon) to Ecologi

* chore: update Offset Earth (Trees) to Ecologi

* chore: add redirect for Offset Earth (Carbon)

* chore: add redirect for Offset Earth (Trees)

* tests: fix pathPrefix in Offset Earth redirects

* chore: add redirect to Offset Earth filenames
2020-08-17 11:14:57 +02:00
chris48s
b9810b01e8 auto-close 'version bump only' gatsby deps (#5432)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-08-16 16:15:41 +01:00
dependabot-preview[bot]
41911ac53f Build(deps): bump @sentry/node from 5.20.1 to 5.21.1 (#5426)
Bumps [@sentry/node](https://github.com/getsentry/sentry-javascript) from 5.20.1 to 5.21.1.
- [Release notes](https://github.com/getsentry/sentry-javascript/releases)
- [Changelog](https://github.com/getsentry/sentry-javascript/blob/master/CHANGELOG.md)
- [Commits](https://github.com/getsentry/sentry-javascript/compare/5.20.1...5.21.1)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-08-16 15:00:59 +00:00
dependabot-preview[bot]
abdd915de2 Build(deps-dev): bump nock from 13.0.3 to 13.0.4 (#5427)
Bumps [nock](https://github.com/nock/nock) from 13.0.3 to 13.0.4.
- [Release notes](https://github.com/nock/nock/releases)
- [Changelog](https://github.com/nock/nock/blob/main/CHANGELOG.md)
- [Commits](https://github.com/nock/nock/compare/v13.0.3...v13.0.4)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-08-15 21:34:22 +00:00
kitsunyan
26e22e62b1 Migrate to the official F-Droid API (#5416)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-08-15 20:24:25 +00:00
dependabot-preview[bot]
957429113b Build(deps): bump emojic from 1.1.15 to 1.1.16 (#5423)
Bumps [emojic](https://github.com/IonicaBizau/emojic) from 1.1.15 to 1.1.16.
- [Release notes](https://github.com/IonicaBizau/emojic/releases)
- [Commits](https://github.com/IonicaBizau/emojic/commits/1.1.16)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-08-15 20:13:09 +00:00
dependabot-preview[bot]
3137dbdaab Build(deps): bump simple-icons from 3.4.0 to 3.4.1 (#5425)
Bumps [simple-icons](https://github.com/simple-icons/simple-icons) from 3.4.0 to 3.4.1.
- [Release notes](https://github.com/simple-icons/simple-icons/releases)
- [Commits](https://github.com/simple-icons/simple-icons/compare/3.4.0...3.4.1)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-08-15 19:58:46 +00:00
dependabot-preview[bot]
a2a44a3699 Build(deps-dev): bump gatsby-plugin-page-creator from 2.3.19 to 2.3.22 (#5429)
Bumps [gatsby-plugin-page-creator](https://github.com/gatsbyjs/gatsby/tree/HEAD/packages/gatsby-plugin-page-creator) from 2.3.19 to 2.3.22.
- [Release notes](https://github.com/gatsbyjs/gatsby/releases)
- [Changelog](https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-plugin-page-creator/CHANGELOG.md)
- [Commits](https://github.com/gatsbyjs/gatsby/commits/gatsby-plugin-page-creator@2.3.22/packages/gatsby-plugin-page-creator)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-08-15 19:47:55 +00:00
dependabot-preview[bot]
c5e7c4c292 Build(deps-dev): bump gatsby from 2.24.35 to 2.24.47 (#5431)
Bumps [gatsby](https://github.com/gatsbyjs/gatsby) from 2.24.35 to 2.24.47.
- [Release notes](https://github.com/gatsbyjs/gatsby/releases)
- [Changelog](https://github.com/gatsbyjs/gatsby/blob/master/CHANGELOG.md)
- [Commits](https://github.com/gatsbyjs/gatsby/compare/gatsby@2.24.35...gatsby@2.24.47)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-08-15 19:33:16 +00:00
dependabot-preview[bot]
af66f652ed Build(deps-dev): bump start-server-and-test from 1.11.2 to 1.11.3 (#5420)
Bumps [start-server-and-test](https://github.com/bahmutov/start-server-and-test) from 1.11.2 to 1.11.3.
- [Release notes](https://github.com/bahmutov/start-server-and-test/releases)
- [Commits](https://github.com/bahmutov/start-server-and-test/compare/v1.11.2...v1.11.3)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-08-15 19:25:40 +00:00
dependabot-preview[bot]
de4de4bf80 Build(deps-dev): bump @types/mocha from 8.0.1 to 8.0.2 (#5419)
Bumps [@types/mocha](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/mocha) from 8.0.1 to 8.0.2.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/mocha)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-08-15 02:27:27 +00:00
dependabot-preview[bot]
7b3fde090f Build(deps-dev): bump eslint-plugin-react from 7.20.5 to 7.20.6 (#5424)
Bumps [eslint-plugin-react](https://github.com/yannickcr/eslint-plugin-react) from 7.20.5 to 7.20.6.
- [Release notes](https://github.com/yannickcr/eslint-plugin-react/releases)
- [Changelog](https://github.com/yannickcr/eslint-plugin-react/blob/master/CHANGELOG.md)
- [Commits](https://github.com/yannickcr/eslint-plugin-react/compare/v7.20.5...v7.20.6)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-08-14 21:01:23 +00:00
dependabot-preview[bot]
95034b56ed Build(deps-dev): bump sinon from 9.0.2 to 9.0.3 (#5428)
Bumps [sinon](https://github.com/sinonjs/sinon) from 9.0.2 to 9.0.3.
- [Release notes](https://github.com/sinonjs/sinon/releases)
- [Changelog](https://github.com/sinonjs/sinon/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sinonjs/sinon/compare/v9.0.2...v9.0.3)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-08-14 20:53:33 +00:00
dependabot-preview[bot]
3ca0d2c9cf Build(deps-dev): bump eslint-plugin-sort-class-members (#5430)
Bumps [eslint-plugin-sort-class-members](https://github.com/bryanrsmith/eslint-plugin-sort-class-members) from 1.7.0 to 1.8.0.
- [Release notes](https://github.com/bryanrsmith/eslint-plugin-sort-class-members/releases)
- [Commits](https://github.com/bryanrsmith/eslint-plugin-sort-class-members/compare/v1.7.0...v1.8.0)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-08-14 20:41:08 +00:00
dependabot-preview[bot]
915ad86736 Build(deps-dev): bump eslint-plugin-jsdoc from 30.2.1 to 30.2.2 (#5422)
Bumps [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) from 30.2.1 to 30.2.2.
- [Release notes](https://github.com/gajus/eslint-plugin-jsdoc/releases)
- [Commits](https://github.com/gajus/eslint-plugin-jsdoc/compare/v30.2.1...v30.2.2)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-08-14 20:10:10 +00:00
dependabot-preview[bot]
c673eff3a6 Build(deps-dev): bump enzyme-adapter-react-16 from 1.15.2 to 1.15.3 (#5418)
Bumps [enzyme-adapter-react-16](https://github.com/enzymejs/enzyme/tree/HEAD/packages/enzyme-adapter-react-16) from 1.15.2 to 1.15.3.
- [Release notes](https://github.com/enzymejs/enzyme/releases)
- [Changelog](https://github.com/enzymejs/enzyme/blob/master/CHANGELOG.md)
- [Commits](https://github.com/enzymejs/enzyme/commits/enzyme-adapter-react-16@1.15.3/packages/enzyme-adapter-react-16)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-08-14 19:55:52 +00:00
Martynas Petuška
3dd163e2a7 [Bintray] Downloads (Bintray Versions renamed and not changed) (#5316)
* Bintray Downloads (Bintray Versions renamed and not changed)

* Tests fix

* Tests fix

* Tests fix

* Refactoring

* PR suggestions

* PR suggestions

* PR suggestions

Co-authored-by: Martynas Petuška <petuska.m@cambridgeassessment.org.uk>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-08-11 12:52:56 +00:00
Aaron Junker
f55f00cfa7 Add emoji for "Support Question" in config.yml (#5413)
Co-authored-by: Pierre-Yves B <PyvesDev@gmail.com>
2020-08-11 14:05:31 +02:00
alex4200
b97fce43c7 Add quickstart section to readme (#5370)
* Update README.md

Added sentence to make it more clear how to select and use a badge to add to a user's github repo.

* Update README.md

* Reformat

Co-authored-by: Pierre-Yves B <PyvesDev@gmail.com>
Co-authored-by: Paul Melnikow <email@paulmelnikow.com>
2020-08-10 22:37:53 -05:00
Pierre-Yves B
3a8528493a Update Node.js versions in README (#5410) 2020-08-09 08:51:34 +02:00
Pierre-Yves B
0b5067c412 Fix all remaining LGTM alerts (#5394) 2020-08-08 08:45:46 +02:00
dependabot-preview[bot]
e139264675 Build(deps-dev): bump concurrently from 5.2.0 to 5.3.0 (#5409)
Bumps [concurrently](https://github.com/kimmobrunfeldt/concurrently) from 5.2.0 to 5.3.0.
- [Release notes](https://github.com/kimmobrunfeldt/concurrently/releases)
- [Commits](https://github.com/kimmobrunfeldt/concurrently/compare/v5.2.0...v5.3.0)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-08-08 01:51:42 +00:00
dependabot-preview[bot]
0b5b75987a Build(deps-dev): bump nock from 13.0.2 to 13.0.3 (#5404)
Bumps [nock](https://github.com/nock/nock) from 13.0.2 to 13.0.3.
- [Release notes](https://github.com/nock/nock/releases)
- [Changelog](https://github.com/nock/nock/blob/main/CHANGELOG.md)
- [Commits](https://github.com/nock/nock/compare/v13.0.2...v13.0.3)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-08-08 01:41:19 +00:00
dependabot-preview[bot]
c06318d128 Build(deps-dev): bump @babel/core from 7.11.0 to 7.11.1 (#5406)
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.11.0 to 7.11.1.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.11.1/packages/babel-core)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-08-08 01:33:02 +00:00
dependabot-preview[bot]
d88b4c5cfb Build(deps-dev): bump @types/react-select from 3.0.15 to 3.0.16 (#5407)
Bumps [@types/react-select](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-select) from 3.0.15 to 3.0.16.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-select)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-08-07 20:25:13 -05:00
dependabot-preview[bot]
36e51f4971 Build(deps-dev): bump @types/react-helmet from 6.0.0 to 6.1.0 (#5398)
Bumps [@types/react-helmet](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-helmet) from 6.0.0 to 6.1.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-helmet)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-08-08 01:02:39 +00:00
dependabot-preview[bot]
63d3a09bef Build(deps-dev): bump gatsby from 2.24.11 to 2.24.35 (#5403)
Bumps [gatsby](https://github.com/gatsbyjs/gatsby) from 2.24.11 to 2.24.35.
- [Release notes](https://github.com/gatsbyjs/gatsby/releases)
- [Changelog](https://github.com/gatsbyjs/gatsby/blob/master/CHANGELOG.md)
- [Commits](https://github.com/gatsbyjs/gatsby/compare/gatsby@2.24.11...gatsby@2.24.35)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-08-07 20:56:36 +00:00
dependabot-preview[bot]
1c6ef980ff Build(deps): bump simple-icons from 3.3.0 to 3.4.0 (#5400)
Bumps [simple-icons](https://github.com/simple-icons/simple-icons) from 3.3.0 to 3.4.0.
- [Release notes](https://github.com/simple-icons/simple-icons/releases)
- [Commits](https://github.com/simple-icons/simple-icons/compare/3.3.0...3.4.0)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-08-07 20:48:44 +00:00
dependabot-preview[bot]
4f52f3950c Build(deps-dev): bump got from 11.5.1 to 11.5.2 (#5402)
Bumps [got](https://github.com/sindresorhus/got) from 11.5.1 to 11.5.2.
- [Release notes](https://github.com/sindresorhus/got/releases)
- [Commits](https://github.com/sindresorhus/got/compare/v11.5.1...v11.5.2)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-08-07 20:34:52 +00:00
dependabot-preview[bot]
6db80e57fb Build(deps-dev): bump eslint-plugin-jsdoc from 30.1.0 to 30.2.1 (#5408)
Bumps [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) from 30.1.0 to 30.2.1.
- [Release notes](https://github.com/gajus/eslint-plugin-jsdoc/releases)
- [Commits](https://github.com/gajus/eslint-plugin-jsdoc/compare/v30.1.0...v30.2.1)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-08-07 18:11:51 +00:00
dependabot-preview[bot]
4942ec82c7 Build(deps-dev): bump cypress from 4.11.0 to 4.12.1 (#5401)
Bumps [cypress](https://github.com/cypress-io/cypress) from 4.11.0 to 4.12.1.
- [Release notes](https://github.com/cypress-io/cypress/releases)
- [Commits](https://github.com/cypress-io/cypress/compare/v4.11.0...v4.12.1)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-08-07 17:46:53 +00:00
Hrishikesh Patil
1e6acc830b [GitlabCoverage] Add badge for code coverage (#5262)
* Add base for GitLab code coverage badge

* Change examples to repos which have implemented code coverage reporting
in GitLab UI

* Add tests for Gitlab Coverage badge

* Fix test data that was not changed

* Update code according to new branch detection

Signed-off-by: Hrishikesh Patil <hrishikeshpatil.754@gmail.com>

* Update docs and examples, make branch required option that was missed in
previous commit

Signed-off-by: Hrishikesh Patil <hrishikeshpatil.754@gmail.com>

* Apply suggestions from PR discussion

Signed-off-by: Hrishikesh Patil <hrishikeshpatil.754@gmail.com>

* Remove default value of branch param

Signed-off-by: Hrishikesh Patil <hrishikeshpatil.754@gmail.com>

* Apply further discussed changes to service

Signed-off-by: Hrishikesh Patil <hrishikeshpatil.754@gmail.com>

* Fix tests that were failing

Signed-off-by: Hrishikesh Patil <hrishikeshpatil.754@gmail.com>

* Add fetch and transform functions

Signed-off-by: Hrishikesh Patil <hrishikeshpatil.754@gmail.com>

* Add examples and tests for custom job name

Signed-off-by: Hrishikesh Patil <hrishikeshpatil.754@gmail.com>

* Add finishing touches

Signed-off-by: Hrishikesh Patil <hrishikeshpatil.754@gmail.com>

* Change to a working example

Signed-off-by: Hrishikesh Patil <hrishikeshpatil.754@gmail.com>

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-08-07 00:15:47 +00:00
chris48s
164e9ea737 add guidance about scraping and unofficial APIs (#5393) 2020-08-06 19:15:11 +01:00
Yash Totale
63a40ce1b1 Change [LGTM] alerts label (#5391) 2020-08-05 19:06:23 +01:00
Yash Totale
4b2a16b0c7 VS Code Marketplace Last Updated Badge added along with tests, run [VisualStudioMarketplace] (#5388)
* VS Code Marketplace Release Date Badge added along with tests

* VS Code Marketplace Last Updated Badge added along with tests

* made review changes

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-08-04 02:44:22 +00:00
dependabot-preview[bot]
69ef82903d Build(deps-dev): bump @babel/core from 7.10.5 to 7.11.0 (#5383)
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.10.5 to 7.11.0.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.11.0/packages/babel-core)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-08-02 17:02:33 +00:00
dependabot-preview[bot]
2858189809 Build(deps-dev): bump portfinder from 1.0.27 to 1.0.28 (#5384)
Bumps [portfinder](https://github.com/http-party/node-portfinder) from 1.0.27 to 1.0.28.
- [Release notes](https://github.com/http-party/node-portfinder/releases)
- [Commits](https://github.com/http-party/node-portfinder/compare/v1.0.27...v1.0.28)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-08-02 16:53:33 +00:00
dependabot-preview[bot]
9204eea7e1 Build(deps-dev): bump @types/node from 14.0.25 to 14.0.27 (#5380)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.0.25 to 14.0.27.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-08-02 16:44:39 +00:00
dependabot-preview[bot]
7c81585ca6 Build(deps-dev): bump danger from 10.2.1 to 10.3.0 (#5382)
Bumps [danger](https://github.com/danger/danger-js) from 10.2.1 to 10.3.0.
- [Release notes](https://github.com/danger/danger-js/releases)
- [Changelog](https://github.com/danger/danger-js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/danger/danger-js/compare/10.2.1...10.3.0)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-08-02 16:37:50 +00:00
dependabot-preview[bot]
afc9ccc0a0 Build(deps-dev): bump @types/react-select from 3.0.14 to 3.0.15 (#5379)
Bumps [@types/react-select](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-select) from 3.0.14 to 3.0.15.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-select)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-08-02 16:28:08 +00:00
dependabot-preview[bot]
b3f9f58a82 Build(deps): bump graphql-tag from 2.10.4 to 2.11.0 (#5378)
Bumps [graphql-tag](https://github.com/apollographql/graphql-tag) from 2.10.4 to 2.11.0.
- [Release notes](https://github.com/apollographql/graphql-tag/releases)
- [Changelog](https://github.com/apollographql/graphql-tag/blob/master/CHANGELOG.md)
- [Commits](https://github.com/apollographql/graphql-tag/commits/v2.11.0)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-08-01 18:31:32 +00:00
dependabot-preview[bot]
ea24784b26 Build(deps): bump simple-icons from 3.2.0 to 3.3.0 (#5377)
Bumps [simple-icons](https://github.com/simple-icons/simple-icons) from 3.2.0 to 3.3.0.
- [Release notes](https://github.com/simple-icons/simple-icons/releases)
- [Commits](https://github.com/simple-icons/simple-icons/compare/3.2.0...3.3.0)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-08-01 18:11:38 +00:00
dependabot-preview[bot]
65c54c22d2 Build(deps-dev): bump @types/mocha from 8.0.0 to 8.0.1 (#5376)
Bumps [@types/mocha](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/mocha) from 8.0.0 to 8.0.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/mocha)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-08-01 17:57:36 +00:00
dependabot-preview[bot]
e0c3fd4364 Build(deps): [security] bump lodash from 4.17.15 to 4.17.19 (#5374)
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.19. **This update includes security fixes.**
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.19)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-08-01 17:48:55 +00:00
dependabot-preview[bot]
babd32c98b Build(deps-dev): bump eslint-plugin-jsdoc from 30.0.3 to 30.1.0 (#5381)
Bumps [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) from 30.0.3 to 30.1.0.
- [Release notes](https://github.com/gajus/eslint-plugin-jsdoc/releases)
- [Commits](https://github.com/gajus/eslint-plugin-jsdoc/compare/v30.0.3...v30.1.0)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-08-01 04:46:23 +00:00
dependabot-preview[bot]
a70589d919 Build(deps-dev): bump eslint-plugin-react from 7.20.3 to 7.20.5 (#5375)
Bumps [eslint-plugin-react](https://github.com/yannickcr/eslint-plugin-react) from 7.20.3 to 7.20.5.
- [Release notes](https://github.com/yannickcr/eslint-plugin-react/releases)
- [Changelog](https://github.com/yannickcr/eslint-plugin-react/blob/master/CHANGELOG.md)
- [Commits](https://github.com/yannickcr/eslint-plugin-react/compare/v7.20.3...v7.20.5)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-08-01 04:27:16 +00:00
kitsunyan
5a75ffaa99 Migrate to F-Droid API (#5362)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-07-30 00:16:24 +00:00
Kid
86a9ac27d0 Add [Flathub] badge (#5345)
Co-authored-by: chris48s <chris48s@users.noreply.github.com>
2020-07-29 17:59:22 +01:00
chris48s
f3d17ff435 bypass checkErrorResponse on [website] badge (#5347)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-07-26 15:44:31 +00:00
dependabot-preview[bot]
23f416b42a Build(deps): bump @sentry/node from 5.19.2 to 5.20.1 (#5361)
Bumps [@sentry/node](https://github.com/getsentry/sentry-javascript) from 5.19.2 to 5.20.1.
- [Release notes](https://github.com/getsentry/sentry-javascript/releases)
- [Changelog](https://github.com/getsentry/sentry-javascript/blob/master/CHANGELOG.md)
- [Commits](https://github.com/getsentry/sentry-javascript/compare/5.19.2...5.20.1)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-07-26 01:43:16 +00:00
dependabot-preview[bot]
5d02a66796 Build(deps-dev): bump gatsby from 2.24.4 to 2.24.11 (#5360)
Bumps [gatsby](https://github.com/gatsbyjs/gatsby) from 2.24.4 to 2.24.11.
- [Release notes](https://github.com/gatsbyjs/gatsby/releases)
- [Changelog](https://github.com/gatsbyjs/gatsby/blob/master/CHANGELOG.md)
- [Commits](https://github.com/gatsbyjs/gatsby/compare/gatsby@2.24.4...gatsby@2.24.11)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-07-25 19:32:48 +00:00
dependabot-preview[bot]
b6213efac2 Build(deps-dev): bump gatsby-plugin-typescript from 2.4.15 to 2.4.16 (#5355)
Bumps [gatsby-plugin-typescript](https://github.com/gatsbyjs/gatsby/tree/HEAD/packages/gatsby-plugin-typescript) from 2.4.15 to 2.4.16.
- [Release notes](https://github.com/gatsbyjs/gatsby/releases)
- [Changelog](https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-plugin-typescript/CHANGELOG.md)
- [Commits](https://github.com/gatsbyjs/gatsby/commits/gatsby-plugin-typescript@2.4.16/packages/gatsby-plugin-typescript)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-07-25 19:25:03 +00:00
dependabot-preview[bot]
89c9bd5db1 Build(deps-dev): bump gatsby-plugin-page-creator from 2.3.12 to 2.3.19 (#5354)
Bumps [gatsby-plugin-page-creator](https://github.com/gatsbyjs/gatsby/tree/HEAD/packages/gatsby-plugin-page-creator) from 2.3.12 to 2.3.19.
- [Release notes](https://github.com/gatsbyjs/gatsby/releases)
- [Changelog](https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-plugin-page-creator/CHANGELOG.md)
- [Commits](https://github.com/gatsbyjs/gatsby/commits/gatsby-plugin-page-creator@2.3.19/packages/gatsby-plugin-page-creator)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-07-25 19:17:33 +00:00
dependabot-preview[bot]
524f78f4f4 Build(deps-dev): bump eslint-plugin-jsdoc from 29.2.0 to 30.0.3 (#5352)
Bumps [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) from 29.2.0 to 30.0.3.
- [Release notes](https://github.com/gajus/eslint-plugin-jsdoc/releases)
- [Commits](https://github.com/gajus/eslint-plugin-jsdoc/compare/v29.2.0...v30.0.3)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-07-25 19:07:58 +00:00
Jules Sam. Randolph
d9cda5c2ff [npm] Support tags containing slashes (/) (#5367)
closes #5364
2020-07-25 18:57:15 +00:00
dependabot-preview[bot]
72c749c6b6 Build(deps-dev): bump jsdoc from 3.6.4 to 3.6.5 (#5356)
Bumps [jsdoc](https://github.com/jsdoc/jsdoc) from 3.6.4 to 3.6.5.
- [Release notes](https://github.com/jsdoc/jsdoc/releases)
- [Changelog](https://github.com/jsdoc/jsdoc/blob/3.6.5/CHANGES.md)
- [Commits](https://github.com/jsdoc/jsdoc/compare/3.6.4...3.6.5)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-07-25 09:58:17 +00:00
dependabot-preview[bot]
77d655ecc9 Build(deps): bump simple-icons from 3.1.0 to 3.2.0 (#5357)
Bumps [simple-icons](https://github.com/simple-icons/simple-icons) from 3.1.0 to 3.2.0.
- [Release notes](https://github.com/simple-icons/simple-icons/releases)
- [Commits](https://github.com/simple-icons/simple-icons/compare/3.1.0...3.2.0)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-07-25 09:50:30 +00:00
dependabot-preview[bot]
44078775ca Build(deps-dev): bump @types/chai from 4.2.11 to 4.2.12 (#5359)
Bumps [@types/chai](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/chai) from 4.2.11 to 4.2.12.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/chai)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-07-24 18:15:46 +00:00
dependabot-preview[bot]
b9438f91a4 Build(deps-dev): bump portfinder from 1.0.26 to 1.0.27 (#5358)
Bumps [portfinder](https://github.com/http-party/node-portfinder) from 1.0.26 to 1.0.27.
- [Release notes](https://github.com/http-party/node-portfinder/releases)
- [Commits](https://github.com/http-party/node-portfinder/compare/v1.0.26...v1.0.27)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-07-24 18:04:54 +00:00
dependabot-preview[bot]
dfa6862329 Build(deps-dev): bump cypress from 4.10.0 to 4.11.0 (#5353)
Bumps [cypress](https://github.com/cypress-io/cypress) from 4.10.0 to 4.11.0.
- [Release notes](https://github.com/cypress-io/cypress/releases)
- [Commits](https://github.com/cypress-io/cypress/compare/v4.10.0...v4.11.0)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-07-24 17:34:31 +00:00
dependabot-preview[bot]
3600b9c6f7 Build(deps-dev): bump @types/node from 14.0.23 to 14.0.25 (#5351)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.0.23 to 14.0.25.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-07-24 17:17:16 +00:00
Pierre-Yves B
135b842946 Migrate [Discord] implementation to use bot token (#5346)
* Migrate [Discord] implementation to use bot token

* Rework authorization field creation

* Revert "Rework authorization field creation"

This reverts commit caf65bde5d.

* Add LGTM exclusion for hardcoded credentials
2020-07-24 18:04:12 +02:00
chris48s
c85512997c add 'aborted' as a valid build status (#5348)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-07-22 19:32:23 +00:00
dependabot-preview[bot]
cdb6bb1890 Build(deps-dev): bump @types/node from 14.0.22 to 14.0.23 (#5327)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.0.22 to 14.0.23.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-07-21 02:01:40 +00:00
dependabot-preview[bot]
b1841f288e Build(deps): bump @sentry/node from 5.19.1 to 5.19.2 (#5326)
Bumps [@sentry/node](https://github.com/getsentry/sentry-javascript) from 5.19.1 to 5.19.2.
- [Release notes](https://github.com/getsentry/sentry-javascript/releases)
- [Changelog](https://github.com/getsentry/sentry-javascript/blob/master/CHANGELOG.md)
- [Commits](https://github.com/getsentry/sentry-javascript/compare/5.19.1...5.19.2)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-07-20 00:33:20 +00:00
chris48s
3f622f9ed9 convert branch to required param on [shippable] (#5344)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-07-19 20:58:18 +00:00
dependabot-preview[bot]
f46bbb914a Build(deps-dev): bump gatsby-plugin-typescript from 2.4.13 to 2.4.15 (#5330)
Bumps [gatsby-plugin-typescript](https://github.com/gatsbyjs/gatsby/tree/HEAD/packages/gatsby-plugin-typescript) from 2.4.13 to 2.4.15.
- [Release notes](https://github.com/gatsbyjs/gatsby/releases)
- [Changelog](https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-plugin-typescript/CHANGELOG.md)
- [Commits](https://github.com/gatsbyjs/gatsby/commits/gatsby-plugin-typescript@2.4.15/packages/gatsby-plugin-typescript)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-07-19 17:03:07 +00:00
dependabot-preview[bot]
e186211a29 Build(deps-dev): bump @babel/register from 7.10.4 to 7.10.5 (#5334)
Bumps [@babel/register](https://github.com/babel/babel/tree/HEAD/packages/babel-register) from 7.10.4 to 7.10.5.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.10.5/packages/babel-register)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-07-19 16:53:37 +00:00
dependabot-preview[bot]
aa1fcb4c84 Build(deps-dev): bump @babel/core from 7.10.4 to 7.10.5 (#5332)
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.10.4 to 7.10.5.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.10.5/packages/babel-core)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-07-19 16:45:10 +00:00
dependabot-preview[bot]
50f9c434e7 Build(deps-dev): bump gatsby from 2.24.2 to 2.24.4 (#5342)
Bumps [gatsby](https://github.com/gatsbyjs/gatsby) from 2.24.2 to 2.24.4.
- [Release notes](https://github.com/gatsbyjs/gatsby/releases)
- [Changelog](https://github.com/gatsbyjs/gatsby/blob/master/CHANGELOG.md)
- [Commits](https://github.com/gatsbyjs/gatsby/compare/gatsby@2.24.2...gatsby@2.24.4)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-07-18 20:42:52 +00:00
dependabot-preview[bot]
95ad4830cb Build(deps): bump simple-icons from 3.0.1 to 3.1.0 (#5337)
Bumps [simple-icons](https://github.com/simple-icons/simple-icons) from 3.0.1 to 3.1.0.
- [Release notes](https://github.com/simple-icons/simple-icons/releases)
- [Commits](https://github.com/simple-icons/simple-icons/compare/3.0.1...3.1.0)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-07-18 20:33:30 +00:00
dependabot-preview[bot]
cc5d4c07f1 Build(deps-dev): bump @types/mocha from 7.0.2 to 8.0.0 (#5333)
Bumps [@types/mocha](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/mocha) from 7.0.2 to 8.0.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/mocha)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-07-18 20:22:19 +00:00
dependabot-preview[bot]
8930f3cf9c Build(deps-dev): bump tsd from 0.12.1 to 0.13.1 (#5325)
Bumps [tsd](https://github.com/SamVerschueren/tsd) from 0.12.1 to 0.13.1.
- [Release notes](https://github.com/SamVerschueren/tsd/releases)
- [Commits](https://github.com/SamVerschueren/tsd/compare/v0.12.1...v0.13.1)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-07-18 20:14:54 +00:00
dependabot-preview[bot]
02edc84a7c Build(deps-dev): bump start-server-and-test from 1.11.1 to 1.11.2 (#5336)
Bumps [start-server-and-test](https://github.com/bahmutov/start-server-and-test) from 1.11.1 to 1.11.2.
- [Release notes](https://github.com/bahmutov/start-server-and-test/releases)
- [Commits](https://github.com/bahmutov/start-server-and-test/compare/v1.11.1...v1.11.2)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-07-18 08:53:01 +00:00
dependabot-preview[bot]
9d02d6f9d4 Build(deps-dev): bump got from 11.5.0 to 11.5.1 (#5338)
Bumps [got](https://github.com/sindresorhus/got) from 11.5.0 to 11.5.1.
- [Release notes](https://github.com/sindresorhus/got/releases)
- [Commits](https://github.com/sindresorhus/got/compare/v11.5.0...v11.5.1)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-07-18 08:32:43 +00:00
dependabot-preview[bot]
c131741128 Build(deps-dev): bump eslint-plugin-jsdoc from 29.1.3 to 29.2.0 (#5328)
Bumps [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) from 29.1.3 to 29.2.0.
- [Release notes](https://github.com/gajus/eslint-plugin-jsdoc/releases)
- [Commits](https://github.com/gajus/eslint-plugin-jsdoc/compare/v29.1.3...v29.2.0)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-07-17 17:20:24 +00:00
dependabot-preview[bot]
8196d18efb Build(deps): bump simple-icons from 2.18.0 to 3.0.1 (#5309)
Bumps [simple-icons](https://github.com/simple-icons/simple-icons) from 2.18.0 to 3.0.1.
- [Release notes](https://github.com/simple-icons/simple-icons/releases)
- [Commits](https://github.com/simple-icons/simple-icons/compare/2.18.0...3.0.1)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: chris48s <chris48s@users.noreply.github.com>
2020-07-16 21:17:18 +01:00
dependabot-preview[bot]
dc61e831e0 Build(deps-dev): bump start-server-and-test from 1.11.0 to 1.11.1 (#5311)
Bumps [start-server-and-test](https://github.com/bahmutov/start-server-and-test) from 1.11.0 to 1.11.1.
- [Release notes](https://github.com/bahmutov/start-server-and-test/releases)
- [Commits](https://github.com/bahmutov/start-server-and-test/compare/v1.11.0...v1.11.1)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-07-15 20:33:59 +00:00
chris48s
810efb14f9 Make branch a required param on bb/gitlab/travis-php (#5318) 2020-07-15 21:00:43 +01:00
dependabot-preview[bot]
5bc7c3e015 Build(deps-dev): bump @types/node from 14.0.14 to 14.0.22 (#5312)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.0.14 to 14.0.22.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: Paul Melnikow <github@paulmelnikow.com>
2020-07-14 03:56:31 +00:00
dependabot-preview[bot]
21a544351c Build(deps-dev): bump eslint-plugin-jsdoc from 28.5.1 to 29.1.3 (#5314)
Bumps [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) from 28.5.1 to 29.1.3.
- [Release notes](https://github.com/gajus/eslint-plugin-jsdoc/releases)
- [Commits](https://github.com/gajus/eslint-plugin-jsdoc/compare/v28.5.1...v29.1.3)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-07-14 03:39:18 +00:00
dependabot-preview[bot]
314751b6da Build(deps): bump @sentry/node from 5.18.1 to 5.19.1 (#5315)
Bumps [@sentry/node](https://github.com/getsentry/sentry-javascript) from 5.18.1 to 5.19.1.
- [Release notes](https://github.com/getsentry/sentry-javascript/releases)
- [Changelog](https://github.com/getsentry/sentry-javascript/blob/master/CHANGELOG.md)
- [Commits](https://github.com/getsentry/sentry-javascript/compare/5.18.1...5.19.1)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-07-14 02:44:18 +00:00
610 changed files with 20390 additions and 16985 deletions

View File

@@ -86,33 +86,6 @@ services_steps: &services_steps
- store_test_results:
path: junit
run_package_tests: &run_package_tests
when: always
command: |
# https://discuss.circleci.com/t/switch-nodejs-version-on-machine-executor-solved/26675/3
set +e
export NVM_DIR="/opt/circleci/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
nvm install $NODE_VERSION
nvm use $NODE_VERSION
node --version
# install the shields.io dependencies
npm ci
# run the package tests
npm run test:package
npm run check-types:package
# delete the sheilds.io dependencies
rm -rf node_modules/
# run a smoke test (render a badge with the CLI)
# with only the package dependencies installed
cd badge-maker
npm link
badge cactus grown :green @flat
package_steps: &package_steps
steps:
- checkout
@@ -129,79 +102,68 @@ package_steps: &package_steps
# Run the package tests on each currently supported node version. See:
# https://github.com/badges/shields/blob/master/badge-maker/README.md#node-version-support
# https://nodejs.org/en/about/releases/
- run:
<<: *run_package_tests
environment:
mocha_reporter: mocha-junit-reporter
MOCHA_FILE: junit/badge-maker/v10/results.xml
NODE_VERSION: v10
CYPRESS_INSTALL_BINARY: 0
name: Run package tests on Node 10
command: scripts/run_package_tests.sh
- run:
<<: *run_package_tests
environment:
mocha_reporter: mocha-junit-reporter
MOCHA_FILE: junit/badge-maker/v12/results.xml
NODE_VERSION: v12
CYPRESS_INSTALL_BINARY: 0
name: Run package tests on Node 12
command: scripts/run_package_tests.sh
- run:
<<: *run_package_tests
environment:
mocha_reporter: mocha-junit-reporter
MOCHA_FILE: junit/badge-maker/v14/results.xml
NODE_VERSION: v14
CYPRESS_INSTALL_BINARY: 0
name: Run package tests on Node 14
command: scripts/run_package_tests.sh
- store_test_results:
path: junit
jobs:
npm-install:
docker:
- image: circleci/node:10
steps:
- checkout
- run:
name: Install dependencies
command: npm ci
environment:
CYPRESS_INSTALL_BINARY: 0
main:
docker:
- image: circleci/node:10
- image: circleci/node:12
<<: *main_steps
main@node-12:
main@node-14:
docker:
- image: circleci/node:12
- image: circleci/node:14
<<: *main_steps
integration:
docker:
- image: circleci/node:10
- image: circleci/node:12
- image: redis
<<: *integration_steps
integration@node-12:
integration@node-14:
docker:
- image: circleci/node:12
- image: circleci/node:14
- image: redis
<<: *integration_steps
danger:
docker:
- image: circleci/node:10
- image: circleci/node:12
steps:
- checkout
@@ -221,7 +183,7 @@ jobs:
frontend:
docker:
- image: circleci/node:10
- image: circleci/node:12
steps:
- checkout
@@ -262,13 +224,13 @@ jobs:
services:
docker:
- image: circleci/node:10
- image: circleci/node:12
<<: *services_steps
services@node-12:
services@node-14:
docker:
- image: circleci/node:12
- image: circleci/node:14
<<: *services_steps
@@ -323,11 +285,11 @@ workflows:
filters:
branches:
ignore: gh-pages
- main@node-12:
- main@node-14:
filters:
branches:
ignore: gh-pages
- integration@node-12:
- integration@node-14:
filters:
branches:
ignore: gh-pages
@@ -345,7 +307,7 @@ workflows:
ignore:
- master
- gh-pages
- services@node-12:
- services@node-14:
filters:
branches:
ignore:

View File

@@ -14,9 +14,6 @@ update_configs:
- match:
dependency_name: 'eslint*'
update_type: 'semver:minor'
- match:
dependency_name: 'enzyme*'
update_type: 'semver:minor'
- match:
dependency_name: 'mocha*'
update_type: 'semver:minor'

View File

@@ -1,4 +1,4 @@
contact_links:
- name: Support Question
- name: Support Question
url: https://github.com/badges/shields/discussions
about: Ask a question about Shields.io

10
.github/probot.js vendored
View File

@@ -1,10 +0,0 @@
on('pull_request.closed')
.filter(context => context.payload.pull_request.merged)
.filter(
context =>
context.payload.pull_request.head.ref.slice(0, 11) !== 'dependabot/'
)
.filter(context => context.payload.pull_request.base.ref === 'master')
.comment(`This pull request was merged to [{{ pull_request.base.ref }}]({{ repository.html_url }}/tree/{{ pull_request.base.ref }}) branch. This change is now waiting for deployment, which will usually happen within a few days. Stay tuned by joining our \`#ops\` channel on [Discord](https://discordapp.com/invite/HjJCwm5)!
After deployment, changes are copied to [gh-pages]({{ repository.html_url }}/tree/gh-pages) branch: ![](https://img.shields.io/github/commit-status/{{ repository.full_name }}/gh-pages/{{ pull_request.merge_commit_sha }}.svg?label=deploy%20status)`)

View File

@@ -0,0 +1,28 @@
name: Ddd deployment status
on:
pull_request_target:
types: [closed]
jobs:
add_deployment_status:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Create comment
if: ${{ github.event_name == 'pull_request_target'
&& github.event.action == 'closed'
&& github.event.pull_request.merged
&& !startsWith(github.event.pull_request.head.ref, 'dependabot/')
&& github.event.pull_request.base.ref == 'master' }}
# From a security perspective it's good practice to reference the commit hash
# https://github.com/peter-evans/create-pull-request/blob/master/docs/concepts-guidelines.md#security
uses: peter-evans/create-or-update-comment@41f3207a84f33bd70388036109082784d059dcaa
with:
issue-number: ${{ github.event.pull_request.number }}
edit-mode: replace
body: |
This pull request was merged to [${{ github.event.pull_request.base.ref }}](${{ github.event.repository.html_url }}/tree/${{ github.event.pull_request.base.ref }}) branch. This change is now waiting for deployment, which will usually happen within a few days. Stay tuned by joining our `#ops` channel on [Discord](https://discordapp.com/invite/HjJCwm5)!
After deployment, changes are copied to [gh-pages](${{ github.event.repository.html_url }}/tree/gh-pages) branch: ![](https://img.shields.io/github/commit-status/${{ github.event.repository.full_name }}/gh-pages/${{ github.event.pull_request.merge_commit_sha }}.svg?label=deploy%20status)

View File

@@ -5,6 +5,6 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: chris48s/approve-bot@1.0.0
- uses: chris48s/approve-bot@2.0.1
with:
github-token: '${{ secrets.GITHUB_TOKEN }}'

View File

@@ -10,6 +10,7 @@
"**/*-test-helpers.js",
"**/*-fixtures.js",
"**/mocha-*.js",
"**/*.test-d.ts",
"dangerfile.js",
"gatsby-*.js",
"core/service-test-runner",

View File

@@ -1,7 +1,3 @@
{
"recommendations": [
"esbenp.prettier-vscode",
"EditorConfig.EditorConfig",
"dbaeumer.vscode-eslint"
]
"recommendations": ["esbenp.prettier-vscode", "dbaeumer.vscode-eslint"]
}

129
CODE_OF_CONDUCT.md Normal file
View File

@@ -0,0 +1,129 @@
# Contributor Covenant Code of Conduct
## Our Pledge
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.
We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.
## Our Standards
Examples of behavior that contributes to a positive environment for our
community include:
- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
- Focusing on what is best not just for us as individuals, but for the
overall community
Examples of unacceptable behavior include:
- The use of sexualized language or imagery, and sexual attention or
advances of any kind
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email
address, without their explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting
## Enforcement Responsibilities
Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.
Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.
## Scope
This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
![](https://img.shields.io/badge/conduct-%40shields.io-blue) or directly to [@calebcartwright](https://github.com/calebcartwright) ![](https://img.shields.io/badge/caleb-%40shields.io-blue) or [@paulmelnikow](https://github.com/paulmelnikow) ![](https://img.shields.io/badge/paul-%40shields.io-blue)
All complaints will be reviewed and investigated promptly and fairly.
All community leaders are obligated to respect the privacy and security of the
reporter of any incident.
## Enforcement Guidelines
Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:
### 1. Correction
**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.
**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.
### 2. Warning
**Community Impact**: A violation through a single incident or series
of actions.
**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.
### 3. Temporary Ban
**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.
**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.
### 4. Permanent Ban
**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.
**Consequence**: A permanent ban from any sort of public interaction within
the community.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).
[homepage]: https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.

View File

@@ -98,11 +98,18 @@ There are three places to get help:
## Badge guidelines
- Shields.io hosts integrations for services which are primarily
used by developers or which are widely used by developers
used by developers or which are widely used by developers.
- The left-hand side of a badge should not advertise. It should be a lowercase _noun_
succinctly describing the meaning of the right-hand side.
- Except for badges using the `social` style, logos should be _turned off by
default_.
- Badges should not obtain data from undocumented or reverse-engineered API endpoints.
- Badges should not obtain data by scraping web pages - these are likely to break frequently.
Whereas API publishers are incentivised to maintain a stable platform for their users,
authors of web pages have no such incentive.
- Badges may require users to specify a token in the badge URL as long it is scoped only to
fetching information and doesn't expose any sensitive information. Generating a token with the
correct scope must be clearly documented.
## Badge URLs

View File

@@ -1,4 +1,4 @@
FROM node:10-alpine
FROM node:12-alpine
RUN mkdir -p /usr/src/app
RUN mkdir /usr/src/app/private

View File

@@ -70,10 +70,14 @@ This repo hosts:
[Make your own badges!][custom badges]
(Quick example: `https://img.shields.io/badge/left-right-f39f37`)
Browse a [complete list of badges][shields.io].
[custom badges]: http://shields.io/#your-badge
### Quickstart
Browse a [complete list of badges][shields.io] and locate a particular badge by using the search bar or by browsing the categories. Click on the badge to fill in required data elements for that badge type (like your username or repo) and optionally customize (label, colors etc.). And it's ready for use!
Use the button at the bottom to copy your badge url or snippet, which can then be added to places like your GitHub readme files or other web pages.
## Contributing
Shields is a community project. We invite your participation through issues
@@ -82,20 +86,24 @@ and pull requests! You can peruse the [contributing guidelines][contributing].
When adding or changing a service [please add tests][service-tests].
This project has quite a backlog of suggestions! If you're new to the project,
maybe you'd like to open a pull request to address one of them:
[![GitHub issues by-label](https://img.shields.io/github/issues/badges/shields/good%20first%20issue)](https://github.com/badges/shields/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22)
maybe you'd like to open a pull request to address one of them.
You can read a [tutorial on how to add a badge][tutorial].
[![GitHub issues by-label](https://img.shields.io/github/issues/badges/shields/good%20first%20issue)](https://github.com/badges/shields/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22)
[![Hacktoberfest 2020](https://img.shields.io/github/hacktoberfest/2020/badges/shields?label=hacktoberfest%202020)](https://github.com/badges/shields/issues?q=is%3Aopen+is%3Aissue+label%3Ahacktoberfest)
Let's see if we can beat last year!
[![Hacktoberfest 2019](https://img.shields.io/github/hacktoberfest/2019/badges/shields?label=hacktoberfest%202019)](https://github.com/badges/shields/issues?q=is%3Aopen+is%3Aissue+label%3Ahacktoberfest)
[service-tests]: https://github.com/badges/shields/blob/master/doc/service-tests.md
[tutorial]: doc/TUTORIAL.md
[contributing]: CONTRIBUTING.md
## Development
1. Install Node 8 or later. You can use the [package manager][] of your choice.
Tests need to pass in Node 8 and 10.
1. Install Node 12 or later. You can use the [package manager][] of your choice.
Tests need to pass in Node 12 and 14.
2. Clone this repository.
3. Run `npm ci` to install the dependencies.
4. Run `npm start` to start the badge server and the frontend dev server.
@@ -124,8 +132,8 @@ Please report any Gitpod bugs, questions, or suggestions in issue
[Snapshot tests][] ensure we don't inadvertently make changes that affect the
SVG or JSON output. When deliberately changing the output, run
`SNAPSHOT_DRY=1 npm run test:js:server` to preview changes to the saved
snapshots, and `SNAPSHOT_UPDATE=1 npm run test:js:server` to update them.
`SNAPSHOT_DRY=1 npm run test:package` to preview changes to the saved
snapshots, and `SNAPSHOT_UPDATE=1 npm run test:package` to update them.
The server can be configured to use [Sentry][] ([configuration][sentry configuration]) and [Prometheus][] ([configuration][prometheus configuration]).
@@ -202,10 +210,10 @@ Alumni:
## Related projects
- [badgerbadgerbadger gem][gem]
- [poser PHP library][poser]
- [pybadges python library][pybadges]
[gem]: https://github.com/badges/badgerbadgerbadger
[poser]: https://github.com/badges/poser
[pybadges]: https://github.com/google/pybadges
## License

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,11 @@
# Changelog
## 3.3.0
- Readability improvements: a dark font color is automatically used when the badge's background is too light. For example: ![](https://img.shields.io/badge/hello-world-white)
- Better CSS color compliance: thanks to a switch from _is-css-color_ to _[css-color-converter](https://www.npmjs.com/package/css-color-converter)_, you can use a wider range of color formats from the latest CSS specification, for example `rgb(0 255 0)`
- Less dependencies: _badge-maker_ no longer depends on _camelcase_
## 3.2.0
- Accessibility improvements: Help users of assistive technologies to read the badges when used inline

View File

@@ -1,15 +1,25 @@
'use strict'
const anafanafo = require('anafanafo')
const { brightness } = require('./color')
const fontFamily = 'font-family="Verdana,Geneva,DejaVu Sans,sans-serif"'
const socialFontFamily =
'font-family="Helvetica Neue,Helvetica,Arial,sans-serif"'
const brightnessThreshold = 0.69
function capitalize(s) {
return `${s.charAt(0).toUpperCase()}${s.slice(1)}`
}
function colorsForBackground(color) {
if (brightness(color) <= brightnessThreshold) {
return { textColor: '#fff', shadowColor: '#010101' }
} else {
return { textColor: '#333', shadowColor: '#ccc' }
}
}
function escapeXml(s) {
if (s === undefined || typeof s !== 'string') {
return undefined
@@ -24,19 +34,12 @@ function escapeXml(s) {
}
function roundUpToOdd(val) {
// Increase chances of pixel grid alignment.
return val % 2 === 0 ? val + 1 : val
}
function preferredWidthOf(str) {
return roundUpToOdd((anafanafo(str) / 10) | 0)
}
function computeWidths({ label, message }) {
return {
labelWidth: preferredWidthOf(label),
messageWidth: preferredWidthOf(message),
}
function preferredWidthOf(str, options) {
// Increase chances of pixel grid alignment.
return roundUpToOdd(anafanafo(str, options) | 0)
}
function createAccessibleText({ label, message }) {
@@ -74,22 +77,19 @@ function renderLogo({
logoWidth = 14,
logoPadding = 0,
}) {
if (!logo) {
if (logo) {
const logoHeight = 14
const y = (badgeHeight - logoHeight) / 2
const x = horizPadding
return {
hasLogo: false,
totalLogoWidth: 0,
renderedLogo: '',
hasLogo: true,
totalLogoWidth: logoWidth + logoPadding,
renderedLogo: `<image x="${x}" y="${y}" width="${logoWidth}" height="${logoHeight}" xlink:href="${escapeXml(
logo
)}"/>`,
}
}
const logoHeight = 14
const y = (badgeHeight - logoHeight) / 2
const x = horizPadding
return {
hasLogo: true,
totalLogoWidth: logoWidth + logoPadding,
renderedLogo: `<image x="${x}" y="${y}" width="${logoWidth}" height="14" xlink:href="${escapeXml(
logo
)}"/>`,
} else {
return { hasLogo: false, totalLogoWidth: 0, renderedLogo: '' }
}
}
@@ -118,12 +118,13 @@ function renderText({
height,
verticalMargin = 0,
shadow = false,
color,
}) {
if (!content.length) {
return { renderedText: '', width: 0 }
}
const textLength = preferredWidthOf(content)
const textLength = preferredWidthOf(content, { font: '11px Verdana' })
const escapedContent = escapeXml(content)
const shadowMargin = 150 + verticalMargin
@@ -133,10 +134,11 @@ function renderText({
const x = 10 * (leftMargin + 0.5 * textLength + horizPadding)
let renderedText = ''
const { textColor, shadowColor } = colorsForBackground(color)
if (shadow) {
renderedText = `<text aria-hidden="true" x="${x}" y="${shadowMargin}" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="${outTextLength}">${escapedContent}</text>`
renderedText = `<text aria-hidden="true" x="${x}" y="${shadowMargin}" fill="${shadowColor}" fill-opacity=".3" transform="scale(.1)" textLength="${outTextLength}">${escapedContent}</text>`
}
renderedText += `<text x="${x}" y="${textMargin}" transform="scale(.1)" fill="#fff" textLength="${outTextLength}">${escapedContent}</text>`
renderedText += `<text x="${x}" y="${textMargin}" transform="scale(.1)" fill="${textColor}" textLength="${outTextLength}">${escapedContent}</text>`
return {
renderedText: link
@@ -174,10 +176,6 @@ function renderBadge(
</svg>`
}
function stripXmlWhitespace(xml) {
return xml.replace(/>\s+/g, '>').replace(/<\s+/g, '<').trim()
}
class Badge {
static get fontFamily() {
throw new Error('Not implemented')
@@ -234,6 +232,7 @@ class Badge {
height: this.constructor.height,
verticalMargin: this.constructor.verticalMargin,
shadow: this.constructor.shadow,
color: labelColor,
})
const leftWidth = hasLabel
@@ -257,6 +256,7 @@ class Badge {
height: this.constructor.height,
verticalMargin: this.constructor.verticalMargin,
shadow: this.constructor.shadow,
color,
})
let rightWidth = messageWidth + 2 * horizPadding
@@ -282,6 +282,10 @@ class Badge {
this.renderedMessage = renderedMessage
}
static render(params) {
return new this(params).render()
}
render() {
throw new Error('Not implemented')
}
@@ -432,30 +436,6 @@ class FlatSquare extends Badge {
}
}
function plastic(params) {
const badge = new Plastic(params)
if (params.minify) {
return stripXmlWhitespace(badge.render())
}
return badge.render()
}
function flat(params) {
const badge = new Flat(params)
if (params.minify) {
return stripXmlWhitespace(badge.render())
}
return badge.render()
}
function flatSquare(params) {
const badge = new FlatSquare(params)
if (params.minify) {
return stripXmlWhitespace(badge.render())
}
return badge.render()
}
function social({
label,
message,
@@ -465,7 +445,6 @@ function social({
logoPadding,
color = '#4c1',
labelColor = '#555',
minify,
}) {
// Social label is styled with a leading capital. Convert to caps here so
// width can be measured using the correct characters.
@@ -473,24 +452,23 @@ function social({
const externalHeight = 20
const internalHeight = 19
const horizPadding = 5
const labelHorizPadding = 5
const messageHorizPadding = 4
const horizGutter = 6
const { totalLogoWidth, renderedLogo } = renderLogo({
logo,
badgeHeight: externalHeight,
horizPadding,
horizPadding: labelHorizPadding,
logoWidth,
logoPadding,
})
const hasMessage = message.length
let { labelWidth, messageWidth } = computeWidths({ label, message })
labelWidth += 10 + totalLogoWidth
messageWidth += 10
messageWidth -= 4
const labelTextX = ((labelWidth + totalLogoWidth) / 2) * 10
const labelTextLength = (labelWidth - (10 + totalLogoWidth)) * 10
const escapedLabel = escapeXml(label)
const font = 'bold 11px Helvetica'
const labelTextWidth = preferredWidthOf(label, { font })
const messageTextWidth = preferredWidthOf(message, { font })
const labelRectWidth = labelTextWidth + totalLogoWidth + 2 * labelHorizPadding
const messageRectWidth = messageTextWidth + 2 * messageHorizPadding
let [leftLink, rightLink] = links
leftLink = escapeXml(leftLink)
@@ -500,29 +478,35 @@ function social({
const accessibleText = createAccessibleText({ label, message })
function renderMessageBubble() {
const messageBubbleMainX = labelWidth + 6.5
const messageBubbleNotchX = labelWidth + 6
const messageBubbleMainX = labelRectWidth + horizGutter + 0.5
const messageBubbleNotchX = labelRectWidth + horizGutter
return `
<rect x="${messageBubbleMainX}" y="0.5" width="${messageWidth}" height="${internalHeight}" rx="2" fill="#fafafa"/>
<rect x="${messageBubbleMainX}" y="0.5" width="${messageRectWidth}" height="${internalHeight}" rx="2" fill="#fafafa"/>
<rect x="${messageBubbleNotchX}" y="7.5" width="0.5" height="5" stroke="#fafafa"/>
<path d="M${messageBubbleMainX} 6.5 l-3 3v1 l3 3" stroke="d5d5d5" fill="#fafafa"/>
`
}
function renderLabelText() {
const rect = `<rect id="llink" stroke="#d5d5d5" fill="url(#a)" x=".5" y=".5" width="${labelWidth}" height="${internalHeight}" rx="2" />`
const labelTextX =
10 * (totalLogoWidth + labelTextWidth / 2 + labelHorizPadding)
const labelTextLength = 10 * labelTextWidth
const escapedLabel = escapeXml(label)
const shouldWrapWithLink = hasLeftLink && !shouldWrapBodyWithLink({ links })
const rect = `<rect id="llink" stroke="#d5d5d5" fill="url(#a)" x=".5" y=".5" width="${labelRectWidth}" height="${internalHeight}" rx="2" />`
const shadow = `<text aria-hidden="true" x="${labelTextX}" y="150" fill="#fff" transform="scale(.1)" textLength="${labelTextLength}">${escapedLabel}</text>`
const text = `<text x="${labelTextX}" y="140" transform="scale(.1)" textLength="${labelTextLength}">${escapedLabel}</text>`
if (hasLeftLink && !shouldWrapBodyWithLink({ links })) {
return `
return shouldWrapWithLink
? `
<a target="_blank" xlink:href="${leftLink}">
${shadow}
${text}
${rect}
</a>
`
}
return `
: `
${rect}
${shadow}
${text}
@@ -530,34 +514,36 @@ function social({
}
function renderMessageText() {
const messageTextX = (labelWidth + messageWidth / 2 + 6) * 10
const messageTextLength = (messageWidth - 8) * 10
const messageTextX =
10 * (labelRectWidth + horizGutter + messageRectWidth / 2)
const messageTextLength = 10 * messageTextWidth
const escapedMessage = escapeXml(message)
const rect = `<rect width="${messageWidth + 1}" x="${
labelWidth + 6
const rect = `<rect width="${messageRectWidth + 1}" x="${
labelRectWidth + horizGutter
}" height="${internalHeight + 1}" fill="rgba(0,0,0,0)" />`
const shadow = `<text aria-hidden="true" x="${messageTextX}" y="150" fill="#fff" transform="scale(.1)" textLength="${messageTextLength}">${escapedMessage}</text>`
const text = `<text id="rlink" x="${messageTextX}" y="140" transform="scale(.1)" textLength="${messageTextLength}">${escapedMessage}</text>`
if (hasRightLink) {
return `
return hasRightLink
? `
<a target="_blank" xlink:href="${rightLink}">
${rect}
${shadow}
${text}
</a>
`
}
return `
: `
${shadow}
${text}
`
}
const badge = renderBadge(
return renderBadge(
{
links,
leftWidth: labelWidth + 1,
rightWidth: hasMessage ? messageWidth + 6 : 0,
leftWidth: labelRectWidth + 1,
rightWidth: hasMessage ? horizGutter + messageRectWidth : 0,
accessibleText,
height: externalHeight,
},
@@ -572,7 +558,7 @@ function social({
<stop offset="1" stop-opacity=".1"/>
</linearGradient>
<g stroke="#d5d5d5">
<rect stroke="none" fill="#fcfcfc" x="0.5" y="0.5" width="${labelWidth}" height="${internalHeight}" rx="2"/>
<rect stroke="none" fill="#fcfcfc" x="0.5" y="0.5" width="${labelRectWidth}" height="${internalHeight}" rx="2"/>
${hasMessage ? renderMessageBubble() : ''}
</g>
${renderedLogo}
@@ -582,11 +568,6 @@ function social({
</g>
`
)
if (minify) {
return stripXmlWhitespace(badge)
}
return badge
}
function forTheBadge({
@@ -598,14 +579,15 @@ function forTheBadge({
logoPadding,
color = '#4c1',
labelColor,
minify,
}) {
// For the Badge is styled in all caps. Convert to caps here so widths can
// be measured using the correct characters.
label = label.toUpperCase()
message = message.toUpperCase()
let { labelWidth, messageWidth } = computeWidths({ label, message })
let labelWidth = preferredWidthOf(label, { font: '10px Verdana' }) || 0
let messageWidth =
preferredWidthOf(message, { font: 'bold 10px Verdana' }) || 0
const height = 28
const hasLabel = label.length || labelColor
if (labelColor == null) {
@@ -622,7 +604,9 @@ function forTheBadge({
labelWidth += 10 + totalLogoWidth
if (label.length) {
labelWidth += 10 + label.length * 1.5
// Add 10 px of padding, plus approximately 1 px of letter spacing per
// character.
labelWidth += 10 + 2 * label.length
} else if (hasLogo) {
if (hasLabel) {
labelWidth += 7
@@ -633,8 +617,9 @@ function forTheBadge({
labelWidth -= 11
}
messageWidth += 10
messageWidth += 10 + message.length * 2
// Add 20 px of padding, plus approximately 1.5 px of letter spacing per
// character.
messageWidth += 20 + 1.5 * message.length
const leftWidth = hasLogo && !hasLabel ? 0 : labelWidth
const rightWidth =
hasLogo && !hasLabel ? messageWidth + labelWidth : messageWidth
@@ -652,10 +637,13 @@ function forTheBadge({
const accessibleText = createAccessibleText({ label, message })
function renderLabelText() {
const { textColor } = colorsForBackground(labelColor)
const labelTextX = ((labelWidth + totalLogoWidth) / 2) * 10
const labelTextLength = (labelWidth - (24 + totalLogoWidth)) * 10
const escapedLabel = escapeXml(label)
const text = `<text fill="#fff" x="${labelTextX}" y="175" transform="scale(.1)" textLength="${labelTextLength}">${escapedLabel}</text>`
const text = `<text fill="${textColor}" x="${labelTextX}" y="175" transform="scale(.1)" textLength="${labelTextLength}">${escapedLabel}</text>`
if (hasLeftLink && !shouldWrapBodyWithLink({ links })) {
return `
<a target="_blank" xlink:href="${leftLink}">
@@ -663,17 +651,21 @@ function forTheBadge({
${text}
</a>
`
} else {
return text
}
return text
}
function renderMessageText() {
const text = `<text fill="#fff" x="${
const { textColor } = colorsForBackground(color)
const text = `<text fill="${textColor}" x="${
(labelWidth + messageWidth / 2) * 10
}" y="175" font-weight="bold" transform="scale(.1)" textLength="${
(messageWidth - 24) * 10
}">
${escapeXml(message)}</text>`
if (hasRightLink) {
return `
<a target="_blank" xlink:href="${rightLink}">
@@ -681,11 +673,12 @@ function forTheBadge({
${text}
</a>
`
} else {
return text
}
return text
}
const badge = renderBadge(
return renderBadge(
{
links,
leftWidth,
@@ -704,11 +697,12 @@ function forTheBadge({
${renderMessageText()}
</g>`
)
if (minify) {
return stripXmlWhitespace(badge)
}
return badge
}
module.exports = { plastic, flat, flatSquare, social, forTheBadge }
module.exports = {
plastic: params => Plastic.render(params),
flat: params => Flat.render(params),
'flat-square': params => FlatSquare.render(params),
social,
'for-the-badge': forTheBadge,
}

View File

@@ -1,6 +1,6 @@
'use strict'
const isCSSColor = require('is-css-color')
const { fromString } = require('css-color-converter')
// When updating these, be sure also to update the list in `badge-maker/README.md`.
const namedColors = {
@@ -37,6 +37,10 @@ function isHexColor(s = '') {
return hexColorRegex.test(s)
}
function isCSSColor(color) {
return typeof color === 'string' && fromString(color.trim())
}
function normalizeColor(color) {
if (color === undefined) {
return undefined
@@ -64,9 +68,21 @@ function toSvgColor(color) {
}
}
function brightness(color) {
if (color) {
const cssColor = fromString(color)
if (cssColor) {
const rgb = cssColor.toRgbaArray()
return +((rgb[0] * 299 + rgb[1] * 587 + rgb[2] * 114) / 255000).toFixed(2)
}
}
return 0
}
module.exports = {
namedColors,
isHexColor,
normalizeColor,
toSvgColor,
brightness,
}

View File

@@ -1,7 +1,12 @@
'use strict'
const { test, given, forCases } = require('sazerac')
const { isHexColor, normalizeColor, toSvgColor } = require('./color')
const {
isHexColor,
normalizeColor,
toSvgColor,
brightness,
} = require('./color')
test(isHexColor, () => {
forCases([given('f00bae'), given('4c1'), given('ABC123')]).expect(true)
@@ -23,15 +28,35 @@ test(normalizeColor, () => {
given('4c1').expect('#4c1')
given('f00f00').expect('#f00f00')
given('ABC123').expect('#abc123')
given('#ccc').expect('#ccc')
given('#fffe').expect('#fffe')
given('#fffeffff').expect('#fffeffff')
given('#ABC123').expect('#abc123')
given('papayawhip').expect('papayawhip')
given('purple').expect('purple')
given(' blue ').expect(' blue ')
given('rgb(100%, 200%, 222%)').expect('rgb(100%, 200%, 222%)')
given('rgb(122, 200, 222)').expect('rgb(122, 200, 222)')
given('rgb(122, 200, 222, 1)').expect('rgb(122, 200, 222, 1)')
given('rgba(100, 20, 111, 1)').expect('rgba(100, 20, 111, 1)')
given('hsl(122, 200%, 222%)').expect('hsl(122, 200%, 222%)')
given('hsla(122, 200%, 222%, 1)').expect('hsla(122, 200%, 222%, 1)')
forCases([
given(),
given(''),
given('not-a-color'),
given('#ABCFGH'),
given('rgb(-100, 20, 111)'),
given('rgb(100%, 200, 222)'),
given('rgba(-100, 20, 111, 1.1)'),
given('hsl(122, 200, 222, 1)'),
given('hsl(122, 200, 222)'),
given('hsl(122, 200, 222%)'),
given(undefined),
given(null),
given(true),
given(1),
given(Math),
given([]),
given({}),
given(() => {}),
@@ -55,3 +80,12 @@ test(toSvgColor, () => {
given('lightgray').expect('#9f9f9f')
given('informational').expect('#007ec6')
})
test(brightness, () => {
given('white').expect(1)
given('black').expect(0)
given('#abc123').expect(0.66)
given('rgb(10, 5, 128)').expect(0.08)
given(undefined).expect(0)
given('not-a-color').expect(0)
})

View File

@@ -51,14 +51,8 @@ function _clean(format) {
}
})
// convert "public" format to "internal" format
cleaned.text = [cleaned.label || '', cleaned.message]
delete cleaned.label
delete cleaned.message
if ('style' in cleaned) {
cleaned.template = cleaned.style
delete cleaned.style
}
// Legacy.
cleaned.label = cleaned.label || ''
return cleaned
}

View File

@@ -1,17 +1,21 @@
'use strict'
const camelcase = require('camelcase')
const { normalizeColor, toSvgColor } = require('./color')
const badgeRenderers = require('./badge-renderers')
function stripXmlWhitespace(xml) {
return xml.replace(/>\s+/g, '>').replace(/<\s+/g, '<').trim()
}
/*
note: makeBadge() is fairly thinly wrapped so if we are making changes here
it is likely this will impact on the package's public interface in index.js
*/
module.exports = function makeBadge({
format,
template = 'flat',
text,
style = 'flat',
label,
message,
color,
labelColor,
logo,
@@ -19,13 +23,13 @@ module.exports = function makeBadge({
logoWidth,
links = ['', ''],
}) {
if (!logo && (logoPosition !== undefined || logoWidth !== undefined)) {
throw Error('`logoPosition` and `logoWidth` require `logo`')
}
// String coercion and whitespace removal.
text = text.map(value => `${value}`.trim())
const [label, message] = text
color = normalizeColor(color)
labelColor = normalizeColor(labelColor)
label = `${label}`.trim()
message = `${message}`.trim()
// This ought to be the responsibility of the server, not `makeBadge`.
if (format === 'json') {
@@ -33,32 +37,34 @@ module.exports = function makeBadge({
label,
message,
logoWidth,
color,
labelColor,
// Only call normalizeColor for the JSON case: this is handled
// internally by toSvgColor in the SVG case.
color: normalizeColor(color),
labelColor: normalizeColor(labelColor),
link: links,
name: label,
value: message,
})
}
const methodName = camelcase(template)
if (!(methodName in badgeRenderers)) {
throw new Error(`Unknown template: '${template}'`)
const render = badgeRenderers[style]
if (!render) {
throw new Error(`Unknown badge style: '${style}'`)
}
const render = badgeRenderers[methodName]
logoWidth = +logoWidth || (logo ? 14 : 0)
return render({
label,
message,
links,
logo,
logoPosition,
logoWidth,
logoPadding: logo && label.length ? 3 : 0,
color: toSvgColor(color),
labelColor: toSvgColor(labelColor),
minify: true,
})
return stripXmlWhitespace(
render({
label,
message,
links,
logo,
logoPosition,
logoWidth,
logoPadding: logo && label.length ? 3 : 0,
color: toSvgColor(color),
labelColor: toSvgColor(labelColor),
})
)
}

View File

@@ -4,12 +4,18 @@ const { test, given, forCases } = require('sazerac')
const { expect } = require('chai')
const snapshot = require('snap-shot-it')
const isSvg = require('is-svg')
const prettier = require('prettier')
const makeBadge = require('./make-badge')
function expectBadgeToMatchSnapshot(format) {
snapshot(prettier.format(makeBadge(format), { parser: 'html' }))
}
function testColor(color = '', colorAttr = 'color') {
return JSON.parse(
makeBadge({
text: ['name', 'Bob'],
label: 'name',
message: 'Bob',
[colorAttr]: color,
format: 'json',
})
@@ -34,10 +40,14 @@ describe('The badge generator', function () {
]).expect('#abc123')
// valid rgb(a)
given('rgb(0,128,255)').expect('rgb(0,128,255)')
given('rgb(220,128,255,0.5)').expect('rgb(220,128,255,0.5)')
given('rgba(0,0,255)').expect('rgba(0,0,255)')
given('rgba(0,128,255,0)').expect('rgba(0,128,255,0)')
// valid hsl(a)
given('hsl(100, 56%, 10%)').expect('hsl(100, 56%, 10%)')
given('hsl(360,50%,50%,0.5)').expect('hsl(360,50%,50%,0.5)')
given('hsla(25,20%,0%,0.1)').expect('hsla(25,20%,0%,0.1)')
given('hsla(0,50%,101%)').expect('hsla(0,50%,101%)')
// CSS named color.
given('papayawhip').expect('papayawhip')
// Shields named color.
@@ -53,12 +63,6 @@ describe('The badge generator', function () {
// invalid hex
given('#123red'), // contains letter above F
given('#red'), // contains letter above F
// invalid rgb(a)
given('rgb(220,128,255,0.5)'), // has alpha
given('rgba(0,0,255)'), // no alpha
// invalid hsl(a)
given('hsl(360,50%,50%,0.5)'), // has alpha
given('hsla(0,50%,101%)'), // no alpha
// neither a css named color nor colorscheme
given('notacolor'),
given('bluish'),
@@ -77,23 +81,26 @@ describe('The badge generator', function () {
describe('SVG', function () {
it('should produce SVG', function () {
const svg = makeBadge({ text: ['cactus', 'grown'], format: 'svg' })
expect(svg)
expect(makeBadge({ label: 'cactus', message: 'grown', format: 'svg' }))
.to.satisfy(isSvg)
.and.to.include('cactus')
.and.to.include('grown')
})
it('should match snapshot', function () {
const svg = makeBadge({ text: ['cactus', 'grown'], format: 'svg' })
snapshot(svg)
expectBadgeToMatchSnapshot({
label: 'cactus',
message: 'grown',
format: 'svg',
})
})
})
describe('JSON', function () {
it('should produce the expected JSON', function () {
const json = makeBadge({
text: ['cactus', 'grown'],
label: 'cactus',
message: 'grown',
format: 'json',
links: ['https://example.com/', 'https://other.example.com/'],
})
@@ -106,458 +113,471 @@ describe('The badge generator', function () {
})
})
it('should replace undefined svg template with "flat"', function () {
it('should replace undefined svg badge style with "flat"', function () {
const jsonBadgeWithUnknownStyle = makeBadge({
text: ['name', 'Bob'],
label: 'name',
message: 'Bob',
format: 'svg',
})
const jsonBadgeWithDefaultStyle = makeBadge({
text: ['name', 'Bob'],
label: 'name',
message: 'Bob',
format: 'svg',
template: 'flat',
style: 'flat',
})
expect(jsonBadgeWithUnknownStyle)
.to.equal(jsonBadgeWithDefaultStyle)
.and.to.satisfy(isSvg)
})
it('should fail with unknown svg template', function () {
it('should fail with unknown svg badge style', function () {
expect(() =>
makeBadge({
text: ['name', 'Bob'],
label: 'name',
message: 'Bob',
format: 'svg',
template: 'unknown_style',
style: 'unknown_style',
})
).to.throw(Error, "Unknown template: 'unknown_style'")
).to.throw(Error, "Unknown badge style: 'unknown_style'")
})
})
describe('"flat" template badge generation', function () {
it('should match snapshots: message/label, no logo', function () {
snapshot(
makeBadge({
text: ['cactus', 'grown'],
format: 'svg',
template: 'flat',
color: '#b3e',
labelColor: '#0f0',
})
)
expectBadgeToMatchSnapshot({
label: 'cactus',
message: 'grown',
format: 'svg',
style: 'flat',
color: '#b3e',
labelColor: '#0f0',
})
})
it('should match snapshots: message/label, with logo', function () {
snapshot(
makeBadge({
text: ['cactus', 'grown'],
format: 'svg',
template: 'flat',
color: '#b3e',
labelColor: '#0f0',
logo: 'data:image/svg+xml;base64,PHN2ZyB4bWxu',
})
)
expectBadgeToMatchSnapshot({
label: 'cactus',
message: 'grown',
format: 'svg',
style: 'flat',
color: '#b3e',
labelColor: '#0f0',
logo: 'data:image/svg+xml;base64,PHN2ZyB4bWxu',
})
})
it('should match snapshots: message only, no logo', function () {
snapshot(
makeBadge({
text: ['', 'grown'],
format: 'svg',
template: 'flat',
color: '#b3e',
})
)
expectBadgeToMatchSnapshot({
label: '',
message: 'grown',
format: 'svg',
style: 'flat',
color: '#b3e',
})
})
it('should match snapshots: message only, with logo', function () {
snapshot(
makeBadge({
text: ['', 'grown'],
format: 'svg',
template: 'flat',
color: '#b3e',
logo: 'data:image/svg+xml;base64,PHN2ZyB4bWxu',
})
)
expectBadgeToMatchSnapshot({
label: '',
message: 'grown',
format: 'svg',
style: 'flat',
color: '#b3e',
logo: 'data:image/svg+xml;base64,PHN2ZyB4bWxu',
})
})
it('should match snapshots: message only, with logo and labelColor', function () {
snapshot(
makeBadge({
text: ['', 'grown'],
format: 'svg',
template: 'flat',
color: '#b3e',
labelColor: '#0f0',
logo: 'data:image/svg+xml;base64,PHN2ZyB4bWxu',
})
)
expectBadgeToMatchSnapshot({
label: '',
message: 'grown',
format: 'svg',
style: 'flat',
color: '#b3e',
labelColor: '#0f0',
logo: 'data:image/svg+xml;base64,PHN2ZyB4bWxu',
})
})
it('should match snapshots: message/label, with links', function () {
snapshot(
makeBadge({
text: ['cactus', 'grown'],
format: 'svg',
template: 'flat',
color: '#b3e',
labelColor: '#0f0',
links: ['https://shields.io/', 'https://www.google.co.uk/'],
})
)
expectBadgeToMatchSnapshot({
label: 'cactus',
message: 'grown',
format: 'svg',
style: 'flat',
color: '#b3e',
labelColor: '#0f0',
links: ['https://shields.io/', 'https://www.google.co.uk/'],
})
})
})
describe('"flat-square" template badge generation', function () {
it('should match snapshots: message/label, no logo', function () {
snapshot(
makeBadge({
text: ['cactus', 'grown'],
format: 'svg',
template: 'flat-square',
color: '#b3e',
labelColor: '#0f0',
})
)
expectBadgeToMatchSnapshot({
label: 'cactus',
message: 'grown',
format: 'svg',
style: 'flat-square',
color: '#b3e',
labelColor: '#0f0',
})
})
it('should match snapshots: message/label, with logo', function () {
snapshot(
makeBadge({
text: ['cactus', 'grown'],
format: 'svg',
template: 'flat-square',
color: '#b3e',
labelColor: '#0f0',
logo: 'data:image/svg+xml;base64,PHN2ZyB4bWxu',
})
)
expectBadgeToMatchSnapshot({
label: 'cactus',
message: 'grown',
format: 'svg',
style: 'flat-square',
color: '#b3e',
labelColor: '#0f0',
logo: 'data:image/svg+xml;base64,PHN2ZyB4bWxu',
})
})
it('should match snapshots: message only, no logo', function () {
snapshot(
makeBadge({
text: ['', 'grown'],
format: 'svg',
template: 'flat-square',
color: '#b3e',
})
)
expectBadgeToMatchSnapshot({
label: '',
message: 'grown',
format: 'svg',
style: 'flat-square',
color: '#b3e',
})
})
it('should match snapshots: message only, with logo', function () {
snapshot(
makeBadge({
text: ['', 'grown'],
format: 'svg',
template: 'flat-square',
color: '#b3e',
logo: 'data:image/svg+xml;base64,PHN2ZyB4bWxu',
})
)
expectBadgeToMatchSnapshot({
label: '',
message: 'grown',
format: 'svg',
style: 'flat-square',
color: '#b3e',
logo: 'data:image/svg+xml;base64,PHN2ZyB4bWxu',
})
})
it('should match snapshots: message only, with logo and labelColor', function () {
snapshot(
makeBadge({
text: ['', 'grown'],
format: 'svg',
template: 'flat-square',
color: '#b3e',
labelColor: '#0f0',
logo: 'data:image/svg+xml;base64,PHN2ZyB4bWxu',
})
)
expectBadgeToMatchSnapshot({
label: '',
message: 'grown',
format: 'svg',
style: 'flat-square',
color: '#b3e',
labelColor: '#0f0',
logo: 'data:image/svg+xml;base64,PHN2ZyB4bWxu',
})
})
it('should match snapshots: message/label, with links', function () {
snapshot(
makeBadge({
text: ['cactus', 'grown'],
format: 'svg',
template: 'flat-square',
color: '#b3e',
labelColor: '#0f0',
links: ['https://shields.io/', 'https://www.google.co.uk/'],
})
)
expectBadgeToMatchSnapshot({
label: 'cactus',
message: 'grown',
format: 'svg',
style: 'flat-square',
color: '#b3e',
labelColor: '#0f0',
links: ['https://shields.io/', 'https://www.google.co.uk/'],
})
})
})
describe('"plastic" template badge generation', function () {
it('should match snapshots: message/label, no logo', function () {
snapshot(
makeBadge({
text: ['cactus', 'grown'],
format: 'svg',
template: 'plastic',
color: '#b3e',
labelColor: '#0f0',
})
)
expectBadgeToMatchSnapshot({
label: 'cactus',
message: 'grown',
format: 'svg',
style: 'plastic',
color: '#b3e',
labelColor: '#0f0',
})
})
it('should match snapshots: message/label, with logo', function () {
snapshot(
makeBadge({
text: ['cactus', 'grown'],
format: 'svg',
template: 'plastic',
color: '#b3e',
labelColor: '#0f0',
logo: 'data:image/svg+xml;base64,PHN2ZyB4bWxu',
})
)
expectBadgeToMatchSnapshot({
label: 'cactus',
message: 'grown',
format: 'svg',
style: 'plastic',
color: '#b3e',
labelColor: '#0f0',
logo: 'data:image/svg+xml;base64,PHN2ZyB4bWxu',
})
})
it('should match snapshots: message only, no logo', function () {
snapshot(
makeBadge({
text: ['', 'grown'],
format: 'svg',
template: 'plastic',
color: '#b3e',
})
)
expectBadgeToMatchSnapshot({
label: '',
message: 'grown',
format: 'svg',
style: 'plastic',
color: '#b3e',
})
})
it('should match snapshots: message only, with logo', function () {
snapshot(
makeBadge({
text: ['', 'grown'],
format: 'svg',
template: 'plastic',
color: '#b3e',
logo: 'data:image/svg+xml;base64,PHN2ZyB4bWxu',
})
)
expectBadgeToMatchSnapshot({
label: '',
message: 'grown',
format: 'svg',
style: 'plastic',
color: '#b3e',
logo: 'data:image/svg+xml;base64,PHN2ZyB4bWxu',
})
})
it('should match snapshots: message only, with logo and labelColor', function () {
snapshot(
makeBadge({
text: ['', 'grown'],
format: 'svg',
template: 'plastic',
color: '#b3e',
labelColor: '#0f0',
logo: 'data:image/svg+xml;base64,PHN2ZyB4bWxu',
})
)
expectBadgeToMatchSnapshot({
label: '',
message: 'grown',
format: 'svg',
style: 'plastic',
color: '#b3e',
labelColor: '#0f0',
logo: 'data:image/svg+xml;base64,PHN2ZyB4bWxu',
})
})
it('should match snapshots: message/label, with links', function () {
snapshot(
makeBadge({
text: ['cactus', 'grown'],
format: 'svg',
template: 'plastic',
color: '#b3e',
labelColor: '#0f0',
links: ['https://shields.io/', 'https://www.google.co.uk/'],
})
)
expectBadgeToMatchSnapshot({
label: 'cactus',
message: 'grown',
format: 'svg',
style: 'plastic',
color: '#b3e',
labelColor: '#0f0',
links: ['https://shields.io/', 'https://www.google.co.uk/'],
})
})
})
describe('"for-the-badge" template badge generation', function () {
// https://github.com/badges/shields/issues/1280
it('numbers should produce a string', function () {
const svg = makeBadge({
text: [1998, 1999],
format: 'svg',
template: 'for-the-badge',
})
expect(svg).to.include('1998').and.to.include('1999')
expect(
makeBadge({
label: 1998,
message: 1999,
format: 'svg',
style: 'for-the-badge',
})
)
.to.include('1998')
.and.to.include('1999')
})
it('lowercase/mixedcase string should produce uppercase string', function () {
const svg = makeBadge({
text: ['Label', '1 string'],
format: 'svg',
template: 'for-the-badge',
})
expect(svg).to.include('LABEL').and.to.include('1 STRING')
expect(
makeBadge({
label: 'Label',
message: '1 string',
format: 'svg',
style: 'for-the-badge',
})
)
.to.include('LABEL')
.and.to.include('1 STRING')
})
it('should match snapshots: message/label, no logo', function () {
snapshot(
makeBadge({
text: ['cactus', 'grown'],
format: 'svg',
template: 'for-the-badge',
color: '#b3e',
labelColor: '#0f0',
})
)
expectBadgeToMatchSnapshot({
label: 'cactus',
message: 'grown',
format: 'svg',
style: 'for-the-badge',
color: '#b3e',
labelColor: '#0f0',
})
})
it('should match snapshots: message/label, with logo', function () {
snapshot(
makeBadge({
text: ['cactus', 'grown'],
format: 'svg',
template: 'for-the-badge',
color: '#b3e',
labelColor: '#0f0',
logo: 'data:image/svg+xml;base64,PHN2ZyB4bWxu',
})
)
expectBadgeToMatchSnapshot({
label: 'cactus',
message: 'grown',
format: 'svg',
style: 'for-the-badge',
color: '#b3e',
labelColor: '#0f0',
logo: 'data:image/svg+xml;base64,PHN2ZyB4bWxu',
})
})
it('should match snapshots: message only, no logo', function () {
snapshot(
makeBadge({
text: ['', 'grown'],
format: 'svg',
template: 'for-the-badge',
color: '#b3e',
})
)
expectBadgeToMatchSnapshot({
label: '',
message: 'grown',
format: 'svg',
style: 'for-the-badge',
color: '#b3e',
})
})
it('should match snapshots: message only, with logo', function () {
snapshot(
makeBadge({
text: ['', 'grown'],
format: 'svg',
template: 'for-the-badge',
color: '#b3e',
logo: 'data:image/svg+xml;base64,PHN2ZyB4bWxu',
})
)
expectBadgeToMatchSnapshot({
label: '',
message: 'grown',
format: 'svg',
style: 'for-the-badge',
color: '#b3e',
logo: 'data:image/svg+xml;base64,PHN2ZyB4bWxu',
})
})
it('should match snapshots: message only, with logo and labelColor', function () {
snapshot(
makeBadge({
text: ['', 'grown'],
format: 'svg',
template: 'for-the-badge',
color: '#b3e',
labelColor: '#0f0',
logo: 'data:image/svg+xml;base64,PHN2ZyB4bWxu',
})
)
expectBadgeToMatchSnapshot({
label: '',
message: 'grown',
format: 'svg',
style: 'for-the-badge',
color: '#b3e',
labelColor: '#0f0',
logo: 'data:image/svg+xml;base64,PHN2ZyB4bWxu',
})
})
it('should match snapshots: message/label, with links', function () {
snapshot(
makeBadge({
text: ['cactus', 'grown'],
format: 'svg',
template: 'for-the-badge',
color: '#b3e',
labelColor: '#0f0',
links: ['https://shields.io/', 'https://www.google.co.uk/'],
})
)
expectBadgeToMatchSnapshot({
label: 'cactus',
message: 'grown',
format: 'svg',
style: 'for-the-badge',
color: '#b3e',
labelColor: '#0f0',
links: ['https://shields.io/', 'https://www.google.co.uk/'],
})
})
})
describe('"social" template badge generation', function () {
it('should produce capitalized string for badge key', function () {
const svg = makeBadge({
text: ['some-key', 'some-value'],
format: 'svg',
template: 'social',
})
expect(svg).to.include('Some-key').and.to.include('some-value')
expect(
makeBadge({
label: 'some-key',
message: 'some-value',
format: 'svg',
style: 'social',
})
)
.to.include('Some-key')
.and.to.include('some-value')
})
// https://github.com/badges/shields/issues/1606
it('should handle empty strings used as badge keys', function () {
const svg = makeBadge({
text: ['', 'some-value'],
format: 'json',
template: 'social',
})
expect(svg).to.include('""').and.to.include('some-value')
expect(
makeBadge({
label: '',
message: 'some-value',
format: 'json',
style: 'social',
})
)
.to.include('""')
.and.to.include('some-value')
})
it('should match snapshots: message/label, no logo', function () {
snapshot(
makeBadge({
text: ['cactus', 'grown'],
format: 'svg',
template: 'social',
color: '#b3e',
labelColor: '#0f0',
})
)
expectBadgeToMatchSnapshot({
label: 'cactus',
message: 'grown',
format: 'svg',
style: 'social',
color: '#b3e',
labelColor: '#0f0',
})
})
it('should match snapshots: message/label, with logo', function () {
snapshot(
makeBadge({
text: ['cactus', 'grown'],
format: 'svg',
template: 'social',
color: '#b3e',
labelColor: '#0f0',
logo: 'data:image/svg+xml;base64,PHN2ZyB4bWxu',
})
)
expectBadgeToMatchSnapshot({
label: 'cactus',
message: 'grown',
format: 'svg',
style: 'social',
color: '#b3e',
labelColor: '#0f0',
logo: 'data:image/svg+xml;base64,PHN2ZyB4bWxu',
})
})
it('should match snapshots: message only, no logo', function () {
snapshot(
makeBadge({
text: ['', 'grown'],
format: 'svg',
template: 'social',
color: '#b3e',
})
)
expectBadgeToMatchSnapshot({
label: '',
message: 'grown',
format: 'svg',
style: 'social',
color: '#b3e',
})
})
it('should match snapshots: message only, with logo', function () {
snapshot(
makeBadge({
text: ['', 'grown'],
format: 'svg',
template: 'social',
color: '#b3e',
logo: 'data:image/svg+xml;base64,PHN2ZyB4bWxu',
})
)
expectBadgeToMatchSnapshot({
label: '',
message: 'grown',
format: 'svg',
style: 'social',
color: '#b3e',
logo: 'data:image/svg+xml;base64,PHN2ZyB4bWxu',
})
})
it('should match snapshots: message only, with logo and labelColor', function () {
snapshot(
makeBadge({
text: ['', 'grown'],
format: 'svg',
template: 'social',
color: '#b3e',
labelColor: '#0f0',
logo: 'data:image/svg+xml;base64,PHN2ZyB4bWxu',
})
)
expectBadgeToMatchSnapshot({
label: '',
message: 'grown',
format: 'svg',
style: 'social',
color: '#b3e',
labelColor: '#0f0',
logo: 'data:image/svg+xml;base64,PHN2ZyB4bWxu',
})
})
it('should match snapshots: message/label, with links', function () {
snapshot(
makeBadge({
text: ['cactus', 'grown'],
format: 'svg',
template: 'social',
color: '#b3e',
labelColor: '#0f0',
links: ['https://shields.io/', 'https://www.google.co.uk/'],
})
)
expectBadgeToMatchSnapshot({
label: 'cactus',
message: 'grown',
format: 'svg',
style: 'social',
color: '#b3e',
labelColor: '#0f0',
links: ['https://shields.io/', 'https://www.google.co.uk/'],
})
})
})
describe('badges with logos should always produce the same badge', function () {
it('badge with logo', function () {
const svg = makeBadge({
text: ['label', 'message'],
expectBadgeToMatchSnapshot({
label: 'label',
message: 'message',
format: 'svg',
logo: 'data:image/svg+xml;base64,PHN2ZyB4bWxu',
})
snapshot(svg)
})
})
describe('text colors', function () {
it('should use black text when the label color is light', function () {
expectBadgeToMatchSnapshot({
label: 'cactus',
message: 'grown',
format: 'svg',
style: 'flat',
color: '#000',
labelColor: '#f3f3f3',
})
})
it('should use black text when the message color is light', function () {
expectBadgeToMatchSnapshot({
label: 'cactus',
message: 'grown',
format: 'svg',
style: 'for-the-badge',
color: '#e2ffe1',
labelColor: '#000',
})
})
})
})

View File

@@ -1,6 +1,6 @@
{
"name": "badge-maker",
"version": "3.2.0",
"version": "3.3.0",
"description": "Shields.io badge library",
"keywords": [
"GitHub",
@@ -35,9 +35,8 @@
"logo": "https://opencollective.com/opencollective/logo.txt"
},
"dependencies": {
"anafanafo": "^1.0.0",
"camelcase": "^6.0.0",
"is-css-color": "^1.0.0"
"anafanafo": "2.0.0",
"css-color-converter": "^2.0.0"
},
"scripts": {
"test": "echo 'Run tests from parent dir'; false"

View File

@@ -30,9 +30,6 @@ public:
__name: 'ALLOWED_ORIGIN'
__format: 'json'
persistence:
dir: 'PERSISTENCE_DIR'
services:
bitbucketServer:
authorizedOrigins: 'BITBUCKET_SERVER_ORIGINS'
@@ -64,7 +61,7 @@ public:
fetchLimit: 'FETCH_LIMIT'
shieldsProductionHerokuHacks: 'SHIELDS_PRODUCTION_HEROKU_HACKS'
requireCloudflare: 'REQUIRE_CLOUDFLARE'
private:
azure_devops_token: 'AZURE_DEVOPS_TOKEN'
@@ -74,6 +71,7 @@ private:
bitbucket_password: 'BITBUCKET_PASS'
bitbucket_server_username: 'BITBUCKET_SERVER_USER'
bitbucket_server_password: 'BITBUCKET_SERVER_PASS'
discord_bot_token: 'DISCORD_BOT_TOKEN'
drone_token: 'DRONE_TOKEN'
gh_client_id: 'GH_CLIENT_ID'
gh_client_secret: 'GH_CLIENT_SECRET'

View File

@@ -16,9 +16,6 @@ public:
cors:
allowedOrigin: []
persistence:
dir: './private'
services:
github:
baseUri: 'https://api.github.com/'
@@ -36,6 +33,6 @@ public:
fetchLimit: '10MB'
shieldsProductionHerokuHacks: false
requireCloudflare: false
private: {}

View File

@@ -1,5 +1,6 @@
private:
# These are the keys which are set on the production servers.
discord_bot_token: ...
gh_client_id: ...
gh_client_secret: ...
redis_url: ...

View File

@@ -18,7 +18,3 @@ public:
redirectUrl: 'https://shields.io/'
rasterUrl: 'https://raster.shields.io'
private:
# These are not really private; they should be moved to `public`.
shields_ips: ['192.99.59.72', '51.254.114.150', '149.56.96.133']

View File

@@ -146,9 +146,11 @@ class AuthHelper {
)
}
get _bearerAuthHeader() {
_bearerAuthHeader(bearerKey) {
const { _pass: pass } = this
return this.isConfigured ? { Authorization: `Bearer ${pass}` } : undefined
return this.isConfigured
? { Authorization: `${bearerKey} ${pass}` }
: undefined
}
static _mergeHeaders(requestParams, headers) {
@@ -168,9 +170,15 @@ class AuthHelper {
}
}
withBearerAuthHeader(requestParams) {
withBearerAuthHeader(
requestParams,
bearerKey = 'Bearer' // lgtm [js/hardcoded-credentials]
) {
return this._withAnyAuth(requestParams, requestParams =>
this.constructor._mergeHeaders(requestParams, this._bearerAuthHeader)
this.constructor._mergeHeaders(
requestParams,
this._bearerAuthHeader(bearerKey)
)
)
}

View File

@@ -46,6 +46,9 @@ class BaseGraphqlService extends BaseService {
* and custom error messages e.g: `{ 404: 'package not found' }`.
* This can be used to extend or override the
* [default](https://github.com/badges/shields/blob/master/core/base-service/check-error-response.js#L5)
* @param {Function} [attrs.transformJson=data => data] Function which takes the raw json and transforms it before
* further procesing. In case of multiple query in a single graphql call and few of them
* throw error, partial data might be used ignoring the error.
* @param {Function} [attrs.transformErrors=defaultTransformErrors]
* Function which takes an errors object from a GraphQL
* response and returns an instance of ShieldsRuntimeError.
@@ -61,6 +64,7 @@ class BaseGraphqlService extends BaseService {
variables = {},
options = {},
httpErrorMessages = {},
transformJson = data => data,
transformErrors = defaultTransformErrors,
}) {
const mergedOptions = {
@@ -74,7 +78,7 @@ class BaseGraphqlService extends BaseService {
options: mergedOptions,
errorMessages: httpErrorMessages,
})
const json = this._parseJson(buffer)
const json = transformJson(this._parseJson(buffer))
if (json.errors) {
const exception = transformErrors(json.errors)
if (exception instanceof ShieldsRuntimeError) {

View File

@@ -1,6 +1,6 @@
'use strict'
const Joi = require('@hapi/joi')
const Joi = require('joi')
const { expect } = require('chai')
const gql = require('graphql-tag')
const sinon = require('sinon')
@@ -12,15 +12,8 @@ const dummySchema = Joi.object({
}).required()
class DummyGraphqlService extends BaseGraphqlService {
static get category() {
return 'cat'
}
static get route() {
return {
base: 'foo',
}
}
static category = 'cat'
static route = { base: 'foo' }
async handle() {
const { requiredString } = await this._requestGraphql({

View File

@@ -1,6 +1,6 @@
'use strict'
const Joi = require('@hapi/joi')
const Joi = require('joi')
const { expect } = require('chai')
const sinon = require('sinon')
const BaseJsonService = require('./base-json')
@@ -10,15 +10,8 @@ const dummySchema = Joi.object({
}).required()
class DummyJsonService extends BaseJsonService {
static get category() {
return 'cat'
}
static get route() {
return {
base: 'foo',
}
}
static category = 'cat'
static route = { base: 'foo' }
async handle() {
const { requiredString } = await this._requestJson({

View File

@@ -2,28 +2,17 @@
const { expect } = require('chai')
const sinon = require('sinon')
const Joi = require('@hapi/joi')
const Joi = require('joi')
const makeBadge = require('../../badge-maker/lib/make-badge')
const BaseSvgScrapingService = require('./base-svg-scraping')
function makeExampleSvg({ label, message }) {
return makeBadge({ text: ['this is the label', 'this is the result!'] })
}
const schema = Joi.object({
message: Joi.string().required(),
}).required()
class DummySvgScrapingService extends BaseSvgScrapingService {
static get category() {
return 'cat'
}
static get route() {
return {
base: 'foo',
}
}
static category = 'cat'
static route = { base: 'foo' }
async handle() {
return this._requestSvg({
@@ -36,10 +25,7 @@ class DummySvgScrapingService extends BaseSvgScrapingService {
describe('BaseSvgScrapingService', function () {
const exampleLabel = 'this is the label'
const exampleMessage = 'this is the result!'
const exampleSvg = makeExampleSvg({
label: exampleLabel,
message: exampleMessage,
})
const exampleSvg = makeBadge({ label: exampleLabel, message: exampleMessage })
describe('valueFromSvgBadge', function () {
it('should find the correct value', function () {
@@ -123,9 +109,7 @@ describe('BaseSvgScrapingService', function () {
it('allows overriding the valueMatcher', async function () {
class WithValueMatcher extends BaseSvgScrapingService {
static get route() {
return {}
}
static route = {}
async handle() {
return this._requestSvg({

View File

@@ -1,6 +1,6 @@
'use strict'
const Joi = require('@hapi/joi')
const Joi = require('joi')
const { expect } = require('chai')
const sinon = require('sinon')
const BaseXmlService = require('./base-xml')
@@ -10,15 +10,8 @@ const dummySchema = Joi.object({
}).required()
class DummyXmlService extends BaseXmlService {
static get category() {
return 'cat'
}
static get route() {
return {
base: 'foo',
}
}
static category = 'cat'
static route = { base: 'foo' }
async handle() {
const { requiredString } = await this._requestXml({
@@ -57,9 +50,7 @@ describe('BaseXmlService', function () {
it('forwards options to _sendAndCacheRequest', async function () {
class WithCustomOptions extends BaseXmlService {
static get route() {
return {}
}
static route = {}
async handle() {
const { requiredString } = await this._requestXml({

View File

@@ -1,6 +1,6 @@
'use strict'
const Joi = require('@hapi/joi')
const Joi = require('joi')
const { expect } = require('chai')
const sinon = require('sinon')
const BaseYamlService = require('./base-yaml')
@@ -10,15 +10,8 @@ const dummySchema = Joi.object({
}).required()
class DummyYamlService extends BaseYamlService {
static get category() {
return 'cat'
}
static get route() {
return {
base: 'foo',
}
}
static category = 'cat'
static route = { base: 'foo' }
async handle() {
const { requiredString } = await this._requestYaml({

View File

@@ -5,7 +5,7 @@
// See available emoji at http://emoji.muan.co/
const emojic = require('emojic')
const Joi = require('@hapi/joi')
const Joi = require('joi')
const log = require('../server/log')
const { AuthHelper } = require('./auth-helper')
const { MetricHelper, MetricNames } = require('./metric-helper')
@@ -90,9 +90,7 @@ class BaseService {
throw new Error(`Category not set for ${this.name}`)
}
static get isDeprecated() {
return false
}
static isDeprecated = false
/**
* Route to mount this service on
@@ -119,9 +117,7 @@ class BaseService {
* @abstract
* @type {module:core/base-service/base~Auth}
*/
static get auth() {
return undefined
}
static auth = undefined
/**
* Array of Example objects describing example URLs for this service.
@@ -139,9 +135,7 @@ class BaseService {
* @abstract
* @type {module:core/base-service/base~Example[]}
*/
static get examples() {
return []
}
static examples = []
static get _cacheLength() {
const cacheLengths = {
@@ -160,9 +154,7 @@ class BaseService {
*
* @type {module:core/base-service/base~DefaultBadgeData}
*/
static get defaultBadgeData() {
return {}
}
static defaultBadgeData = {}
static render(props) {
throw new Error(`render() function not implemented for ${this.name}`)
@@ -228,9 +220,7 @@ class BaseService {
return checkErrorResponse(errorMessages)({ buffer, res })
}
static get enabledMetrics() {
return []
}
static enabledMetrics = []
static isMetricEnabled(metricName) {
return this.enabledMetrics.includes(metricName)

View File

@@ -1,6 +1,6 @@
'use strict'
const Joi = require('@hapi/joi')
const Joi = require('joi')
const chai = require('chai')
const { expect } = chai
const sinon = require('sinon')
@@ -29,32 +29,19 @@ const queryParamSchema = Joi.object({
.required()
class DummyService extends BaseService {
static get category() {
return 'other'
}
static category = 'other'
static route = { base: 'foo', pattern: ':namedParamA', queryParamSchema }
static get route() {
return {
base: 'foo',
pattern: ':namedParamA',
queryParamSchema,
}
}
static examples = [
{
pattern: ':world',
namedParams: { world: 'World' },
staticPreview: this.render({ namedParamA: 'foo', queryParamA: 'bar' }),
keywords: ['hello'],
},
]
static get examples() {
return [
{
pattern: ':world',
namedParams: { world: 'World' },
staticPreview: this.render({ namedParamA: 'foo', queryParamA: 'bar' }),
keywords: ['hello'],
},
]
}
static get defaultBadgeData() {
return { label: 'cat', namedLogo: 'appveyor' }
}
static defaultBadgeData = { label: 'cat', namedLogo: 'appveyor' }
static render({ namedParamA, queryParamA }) {
return {
@@ -68,9 +55,7 @@ class DummyService extends BaseService {
}
class DummyServiceWithServiceResponseSizeMetricEnabled extends DummyService {
static get enabledMetrics() {
return [MetricNames.SERVICE_RESPONSE_SIZE]
}
static enabledMetrics = [MetricNames.SERVICE_RESPONSE_SIZE]
}
describe('BaseService', function () {
@@ -124,9 +109,7 @@ describe('BaseService', function () {
})
class WithRoute extends BaseService {
static get route() {
return {}
}
static route = {}
}
it('Should throw if handle() is not overridden', function () {
return expect(WithRoute.invoke({}, {}, {})).to.be.rejectedWith(
@@ -390,9 +373,10 @@ describe('BaseService', function () {
const expectedFormat = 'svg'
expect(mockSendBadge).to.have.been.calledOnce
expect(mockSendBadge).to.have.been.calledWith(expectedFormat, {
text: ['cat', 'Hello namedParamA: bar with queryParamA: ?'],
label: 'cat',
message: 'Hello namedParamA: bar with queryParamA: ?',
color: 'lightgrey',
template: 'flat',
style: 'flat',
namedLogo: undefined,
logo: undefined,
logoWidth: undefined,
@@ -567,12 +551,10 @@ describe('BaseService', function () {
})
describe('auth', function () {
class AuthService extends DummyService {
static get auth() {
return {
passKey: 'myci_pass',
serviceKey: 'myci',
isRequired: true,
}
static auth = {
passKey: 'myci_pass',
serviceKey: 'myci',
isRequired: true,
}
async handle() {

View File

@@ -1,7 +1,7 @@
'use strict'
const assert = require('assert')
const Joi = require('@hapi/joi')
const Joi = require('joi')
const coalesce = require('./coalesce')
const serverStartTimeGMTString = new Date().toGMTString()

View File

@@ -1,6 +1,6 @@
'use strict'
const Joi = require('@hapi/joi')
const Joi = require('joi')
const categories = require('../../services/categories')
const isRealCategory = Joi.equal(...categories.map(({ id }) => id)).required()

View File

@@ -160,12 +160,10 @@ module.exports = function coalesceBadge(
}
return {
text: [
// Use `coalesce()` to support empty labels and messages, as in the
// static badge.
coalesce(overrideLabel, serviceLabel, defaultLabel, category),
coalesce(serviceMessage, 'n/a'),
],
// Use `coalesce()` to support empty labels and messages, as in the static
// badge.
label: coalesce(overrideLabel, serviceLabel, defaultLabel, category),
message: coalesce(serviceMessage, 'n/a'),
color: coalesce(
// In case of an error, disregard user's color override.
isError ? undefined : overrideColor,
@@ -179,7 +177,7 @@ module.exports = function coalesceBadge(
serviceLabelColor,
defaultLabelColor
),
template: style,
style,
namedLogo,
logo: logoSvgBase64,
logoWidth,

View File

@@ -7,63 +7,61 @@ const coalesceBadge = require('./coalesce-badge')
describe('coalesceBadge', function () {
describe('Label', function () {
it('uses the default label', function () {
expect(coalesceBadge({}, {}, { label: 'heyo' }).text).to.deep.equal([
'heyo',
'n/a',
])
expect(coalesceBadge({}, {}, { label: 'heyo' })).to.include({
label: 'heyo',
})
})
// This behavior isn't great and we might want to remove it.
it('uses the category as a default label', function () {
expect(
coalesceBadge({}, {}, {}, { category: 'cat' }).text
).to.deep.equal(['cat', 'n/a'])
expect(coalesceBadge({}, {}, {}, { category: 'cat' })).to.include({
label: 'cat',
})
})
it('preserves an empty label', function () {
expect(
coalesceBadge({}, { label: '', message: '10k' }, {}).text
).to.deep.equal(['', '10k'])
expect(coalesceBadge({}, { label: '', message: '10k' }, {})).to.include({
label: '',
})
})
it('overrides the label', function () {
expect(
coalesceBadge({ label: 'purr count' }, { label: 'purrs' }, {}).text
).to.deep.equal(['purr count', 'n/a'])
coalesceBadge({ label: 'purr count' }, { label: 'purrs' }, {})
).to.include({ label: 'purr count' })
})
})
describe('Message', function () {
it('applies the service message', function () {
expect(coalesceBadge({}, { message: '10k' }, {}).text).to.deep.equal([
undefined,
'10k',
])
expect(coalesceBadge({}, { message: '10k' }, {})).to.include({
message: '10k',
})
})
it('applies a numeric service message', function () {
// https://github.com/badges/shields/issues/1280
it('converts a number to a string', function () {
// While a number of badges use this, in the long run we may want
// `render()` to always return a string.
expect(coalesceBadge({}, { message: 10 }, {}).text).to.deep.equal([
undefined,
10,
])
expect(coalesceBadge({}, { message: 10 }, {})).to.include({
message: 10,
})
})
})
describe('Right color', function () {
it('uses the default color', function () {
expect(coalesceBadge({}, {}, {}).color).to.equal('lightgrey')
expect(coalesceBadge({}, {}, {})).to.include({ color: 'lightgrey' })
})
it('overrides the color', function () {
expect(
coalesceBadge({ color: '10ADED' }, { color: 'red' }, {}).color
).to.equal('10ADED')
coalesceBadge({ color: '10ADED' }, { color: 'red' }, {})
).to.include({ color: '10ADED' })
// also expected for legacy name
expect(
coalesceBadge({ colorB: 'B0ADED' }, { color: 'red' }, {}).color
).to.equal('B0ADED')
coalesceBadge({ colorB: 'B0ADED' }, { color: 'red' }, {})
).to.include({ color: 'B0ADED' })
})
context('In case of an error', function () {
@@ -73,21 +71,23 @@ describe('coalesceBadge', function () {
{ color: '10ADED' },
{ isError: true, color: 'lightgray' },
{}
).color
).to.equal('lightgray')
)
).to.include({ color: 'lightgray' })
// also expected for legacy name
expect(
coalesceBadge(
{ colorB: 'B0ADED' },
{ isError: true, color: 'lightgray' },
{}
).color
).to.equal('lightgray')
)
).to.include({ color: 'lightgray' })
})
})
it('applies the service color', function () {
expect(coalesceBadge({}, { color: 'red' }, {}).color).to.equal('red')
expect(coalesceBadge({}, { color: 'red' }, {})).to.include({
color: 'red',
})
})
})
@@ -97,20 +97,19 @@ describe('coalesceBadge', function () {
})
it('applies the service label color', function () {
expect(coalesceBadge({}, { labelColor: 'red' }, {}).labelColor).to.equal(
'red'
)
expect(coalesceBadge({}, { labelColor: 'red' }, {})).to.include({
labelColor: 'red',
})
})
it('overrides the label color', function () {
expect(
coalesceBadge({ labelColor: '42f483' }, { color: 'green' }, {})
.labelColor
).to.equal('42f483')
).to.include({ labelColor: '42f483' })
// also expected for legacy name
expect(
coalesceBadge({ colorA: 'B2f483' }, { color: 'green' }, {}).labelColor
).to.equal('B2f483')
coalesceBadge({ colorA: 'B2f483' }, { color: 'green' }, {})
).to.include({ labelColor: 'B2f483' })
})
it('converts a query-string numeric color to a string', function () {
@@ -120,8 +119,8 @@ describe('coalesceBadge', function () {
{ color: 123 },
{ color: 'green' },
{}
).color
).to.equal('123')
)
).to.include({ color: '123' })
// also expected for legacy name
expect(
coalesceBadge(
@@ -129,8 +128,8 @@ describe('coalesceBadge', function () {
{ colorB: 123 },
{ color: 'green' },
{}
).color
).to.equal('123')
)
).to.include({ color: '123' })
})
})
@@ -148,9 +147,9 @@ describe('coalesceBadge', function () {
})
it('applies the named logo', function () {
expect(coalesceBadge({}, { namedLogo: 'npm' }, {}).namedLogo).to.equal(
'npm'
)
expect(coalesceBadge({}, { namedLogo: 'npm' }, {})).to.include({
namedLogo: 'npm',
})
expect(coalesceBadge({}, { namedLogo: 'npm' }, {}).logo).to.equal(
getShieldsIcon({ name: 'npm' })
).and.not.to.be.empty
@@ -219,8 +218,8 @@ describe('coalesceBadge', function () {
it('overrides the logo with custom svg', function () {
const logoSvg = 'data:image/svg+xml;base64,PHN2ZyB4bWxu'
expect(
coalesceBadge({ logo: logoSvg }, { namedLogo: 'appveyor' }, {}).logo
).to.equal(logoSvg)
coalesceBadge({ logo: logoSvg }, { namedLogo: 'appveyor' }, {})
).to.include({ logo: logoSvg })
})
it('ignores the color when custom svg is provided', function () {
@@ -230,35 +229,36 @@ describe('coalesceBadge', function () {
{ logo: logoSvg, logoColor: 'brightgreen' },
{ namedLogo: 'appveyor' },
{}
).logo
).to.equal(logoSvg)
)
).to.include({ logo: logoSvg })
})
})
describe('Logo width', function () {
it('overrides the logoWidth', function () {
expect(coalesceBadge({ logoWidth: 20 }, {}, {}).logoWidth).to.equal(20)
expect(coalesceBadge({ logoWidth: 20 }, {}, {})).to.include({
logoWidth: 20,
})
})
it('applies the logo width', function () {
expect(
coalesceBadge({}, { namedLogo: 'npm', logoWidth: 275 }, {}).logoWidth
).to.equal(275)
coalesceBadge({}, { namedLogo: 'npm', logoWidth: 275 }, {})
).to.include({ logoWidth: 275 })
})
})
describe('Logo position', function () {
it('overrides the logoPosition', function () {
expect(
coalesceBadge({ logoPosition: -10 }, {}, {}).logoPosition
).to.equal(-10)
expect(coalesceBadge({ logoPosition: -10 }, {}, {})).to.include({
logoPosition: -10,
})
})
it('applies the logo position', function () {
expect(
coalesceBadge({}, { namedLogo: 'npm', logoPosition: -10 }, {})
.logoPosition
).to.equal(-10)
).to.include({ logoPosition: -10 })
})
})
@@ -279,20 +279,24 @@ describe('coalesceBadge', function () {
describe('Style', function () {
it('falls back to flat with invalid style', function () {
expect(coalesceBadge({ style: 'pill' }, {}, {}).template).to.equal('flat')
expect(coalesceBadge({ style: 7 }, {}, {}).template).to.equal('flat')
expect(coalesceBadge({ style: undefined }, {}, {}).template).to.equal(
'flat'
)
expect(coalesceBadge({ style: 'pill' }, {}, {})).to.include({
style: 'flat',
})
expect(coalesceBadge({ style: 7 }, {}, {})).to.include({
style: 'flat',
})
expect(coalesceBadge({ style: undefined }, {}, {})).to.include({
style: 'flat',
})
})
it('replaces legacy popout styles', function () {
expect(coalesceBadge({ style: 'popout' }, {}, {}).template).to.equal(
'flat'
)
expect(
coalesceBadge({ style: 'popout-square' }, {}, {}).template
).to.equal('flat-square')
expect(coalesceBadge({ style: 'popout' }, {}, {})).to.include({
style: 'flat',
})
expect(coalesceBadge({ style: 'popout-square' }, {}, {})).to.include({
style: 'flat-square',
})
})
})
@@ -300,8 +304,7 @@ describe('coalesceBadge', function () {
it('overrides the cache length', function () {
expect(
coalesceBadge({ style: 'pill' }, { cacheSeconds: 123 }, {})
.cacheLengthSeconds
).to.equal(123)
).to.include({ cacheLengthSeconds: 123 })
})
})
})

View File

@@ -1,6 +1,6 @@
'use strict'
const Joi = require('@hapi/joi')
const Joi = require('joi')
const camelcase = require('camelcase')
const BaseService = require('./base')
const { isValidCategory } = require('./categories')
@@ -26,33 +26,17 @@ function deprecatedService(attrs) {
)
return class DeprecatedService extends BaseService {
static get name() {
return name
? `Deprecated${name}`
: `Deprecated${camelcase(route.base.replace(/\//g, '_'), {
pascalCase: true,
})}`
}
static name = name
? `Deprecated${name}`
: `Deprecated${camelcase(route.base.replace(/\//g, '_'), {
pascalCase: true,
})}`
static get category() {
return category
}
static get isDeprecated() {
return true
}
static get route() {
return route
}
static get examples() {
return examples
}
static get defaultBadgeData() {
return { label }
}
static category = category
static isDeprecated = true
static route = route
static examples = examples
static defaultBadgeData = { label }
async handle() {
throw new Deprecated({ prettyMessage: message })

View File

@@ -1,6 +1,6 @@
'use strict'
const Joi = require('@hapi/joi')
const Joi = require('joi')
const { pathToRegexp, compile } = require('path-to-regexp')
const categories = require('../../services/categories')
const coalesceBadge = require('./coalesce-badge')
@@ -124,12 +124,7 @@ function transformExample(inExample, index, ServiceClass) {
documentation,
} = validateExample(inExample, index, ServiceClass)
const {
text: [label, message],
color,
template: style,
namedLogo,
} = coalesceBadge(
const { label, message, color, style, namedLogo } = coalesceBadge(
{},
staticPreview,
ServiceClass.defaultBadgeData,

View File

@@ -107,6 +107,20 @@ function handleRequest(cacheHeaderConfig, handlerOptions) {
} = handlerOptions
return (queryParams, match, end, ask) => {
/*
This is here for legacy reasons. The badge server and frontend used to live
on two different servers. When we merged them there was a conflict so we
did this to avoid moving the endpoint docs to another URL.
Never ever do this again.
*/
if (match[0] === '/endpoint' && Object.keys(queryParams).length === 0) {
ask.res.statusCode = 301
ask.res.setHeader('Location', '/endpoint/')
ask.res.end()
return
}
const reqTime = new Date()
// `defaultCacheLengthSeconds` can be overridden by
@@ -254,7 +268,7 @@ function handleRequest(cacheHeaderConfig, handlerOptions) {
let dataHasChanged = false
if (
cached !== undefined &&
cached.data.badgeData.text[1] !== badgeData.text[1]
cached.data.badgeData.message !== badgeData.message
) {
dataHasChanged = true
}

View File

@@ -3,28 +3,12 @@
const BaseJsonService = require('../base-json')
class GoodServiceOne extends BaseJsonService {
static get category() {
return 'build'
}
static get route() {
return {
base: 'good',
pattern: 'one',
}
}
static category = 'build'
static route = { base: 'good', pattern: 'one' }
}
class GoodServiceTwo extends BaseJsonService {
static get category() {
return 'build'
}
static get route() {
return {
base: 'good',
pattern: 'two',
}
}
static category = 'build'
static route = { base: 'good', pattern: 'two' }
}
module.exports = [GoodServiceOne, GoodServiceTwo]

View File

@@ -3,16 +3,8 @@
const BaseJsonService = require('../base-json')
class GoodService extends BaseJsonService {
static get category() {
return 'build'
}
static get route() {
return {
base: 'it/is',
pattern: 'good',
}
}
static category = 'build'
static route = { base: 'it/is', pattern: 'good' }
}
module.exports = GoodService

View File

@@ -3,28 +3,12 @@
const BaseJsonService = require('../base-json')
class GoodServiceOne extends BaseJsonService {
static get category() {
return 'build'
}
static get route() {
return {
base: 'good',
pattern: 'one',
}
}
static category = 'build'
static route = { base: 'good', pattern: 'one' }
}
class GoodServiceTwo extends BaseJsonService {
static get category() {
return 'build'
}
static get route() {
return {
base: 'good',
pattern: 'two',
}
}
static category = 'build'
static route = { base: 'good', pattern: 'two' }
}
module.exports = { GoodServiceOne, GoodServiceTwo }

View File

@@ -2,7 +2,7 @@
const camelcase = require('camelcase')
const emojic = require('emojic')
const Joi = require('@hapi/joi')
const Joi = require('joi')
const queryString = require('query-string')
const BaseService = require('./base')
const {
@@ -41,27 +41,15 @@ module.exports = function redirector(attrs) {
} = Joi.attempt(attrs, attrSchema, `Redirector for ${attrs.route.base}`)
return class Redirector extends BaseService {
static get name() {
if (name) {
return name
} else {
return `${camelcase(route.base.replace(/\//g, '_'), {
pascalCase: true,
})}Redirect`
}
}
static name =
name ||
`${camelcase(route.base.replace(/\//g, '_'), {
pascalCase: true,
})}Redirect`
static get category() {
return category
}
static get isDeprecated() {
return true
}
static get route() {
return route
}
static category = category
static isDeprecated = true
static route = route
static register({ camp, metricInstance }, { rasterUrl }) {
const { regex, captureNames } = prepareRoute({

View File

@@ -1,7 +1,7 @@
'use strict'
const escapeStringRegexp = require('escape-string-regexp')
const Joi = require('@hapi/joi')
const Joi = require('joi')
const { pathToRegexp } = require('path-to-regexp')
function makeFullUrl(base, partialUrl) {

View File

@@ -1,7 +1,7 @@
'use strict'
const { expect } = require('chai')
const Joi = require('@hapi/joi')
const Joi = require('joi')
const { test, given, forCases } = require('sazerac')
const {
prepareRoute,

View File

@@ -1,6 +1,6 @@
'use strict'
const Joi = require('@hapi/joi')
const Joi = require('joi')
// This should be kept in sync with the schema in
// `frontend/lib/service-definitions/index.ts`.

View File

@@ -1,7 +1,7 @@
'use strict'
const emojic = require('emojic')
const Joi = require('@hapi/joi')
const Joi = require('joi')
const trace = require('./trace')
function validate(

View File

@@ -1,6 +1,6 @@
'use strict'
const Joi = require('@hapi/joi')
const Joi = require('joi')
const { expect } = require('chai')
const sinon = require('sinon')
const trace = require('./trace')

View File

@@ -1,20 +1,6 @@
'use strict'
const config = require('config').util.toObject()
const secretIsValid = require('./secret-is-valid')
const RateLimit = require('./rate-limit')
const log = require('./log')
function secretInvalid(req, res) {
if (!secretIsValid(req.password)) {
// An unknown entity tries to connect. Let the connection linger for a minute.
setTimeout(() => {
res.json({ errors: [{ code: 'invalid_secrets' }] })
}, 10000)
return true
}
return false
}
function setRoutes({ rateLimit }, { server, metricInstance }) {
const ipRateLimit = new RateLimit({
@@ -29,12 +15,6 @@ function setRoutes({ rateLimit }, { server, metricInstance }) {
})
server.handle((req, res, next) => {
if (req.url.startsWith('/sys/')) {
if (secretInvalid(req, res)) {
return
}
}
if (rateLimit) {
const ip =
(req.headers['x-forwarded-for'] || '').split(', ')[0] ||
@@ -59,27 +39,6 @@ function setRoutes({ rateLimit }, { server, metricInstance }) {
next()
})
server.get('/sys/network', (req, res) => {
res.json({ ips: config.public.shields_ips })
})
server.ws('/sys/logs', socket => {
const listener = (...msg) => socket.send(msg.join(' '))
socket.on('close', () => log.removeListener(listener))
socket.on('message', msg => {
let req
try {
req = JSON.parse(msg)
} catch (e) {
return
}
if (!secretIsValid(req.secret)) {
return socket.close()
}
log.addListener(listener)
})
})
server.get('/sys/rate-limit', (req, res) => {
res.json({
ip: ipRateLimit.toJSON(),
@@ -95,6 +54,4 @@ function setRoutes({ rateLimit }, { server, metricInstance }) {
}
}
module.exports = {
setRoutes,
}
module.exports = { setRoutes }

View File

@@ -1,7 +1,5 @@
'use strict'
const serverSecrets = require('../../lib/server-secrets')
function constEq(a, b) {
if (a.length !== b.length) {
return false
@@ -13,9 +11,10 @@ function constEq(a, b) {
return zero === 0
}
module.exports = function secretIsValid(secret = '') {
return (
serverSecrets.shields_secret &&
constEq(secret, serverSecrets.shields_secret)
)
function makeSecretIsValid(shieldsSecret) {
return function secretIsValid(secret = '') {
return shieldsSecret && constEq(secret, shieldsSecret)
}
}
module.exports = { makeSecretIsValid }

View File

@@ -6,9 +6,10 @@
const path = require('path')
const url = require('url')
const { URL } = url
const cloudflareMiddleware = require('cloudflare-middleware')
const bytes = require('bytes')
const Camp = require('@shields_io/camp')
const originalJoi = require('@hapi/joi')
const originalJoi = require('joi')
const makeBadge = require('../../badge-maker/lib/make-badge')
const GithubConstellation = require('../../services/github/github-constellation')
const suggest = require('../../services/suggest')
@@ -117,9 +118,6 @@ const publicConfigSchema = Joi.object({
cors: {
allowedOrigin: Joi.array().items(optionalUrl).required(),
},
persistence: {
dir: Joi.string().required(),
},
services: Joi.object({
bitbucketServer: defaultService,
drone: defaultService,
@@ -148,13 +146,14 @@ const publicConfigSchema = Joi.object({
rateLimit: Joi.boolean().required(),
handleInternalErrors: Joi.boolean().required(),
fetchLimit: Joi.string().regex(/^[0-9]+(b|kb|mb|gb|tb)$/i),
shieldsProductionHerokuHacks: Joi.boolean(),
requireCloudflare: Joi.boolean().required(),
}).required()
const privateConfigSchema = Joi.object({
azure_devops_token: Joi.string(),
bintray_user: Joi.string(),
bintray_apikey: Joi.string(),
discord_bot_token: Joi.string(),
drone_token: Joi.string(),
gh_client_id: Joi.string(),
gh_client_secret: Joi.string(),
@@ -168,7 +167,6 @@ const privateConfigSchema = Joi.object({
npm_token: Joi.string(),
redis_url: Joi.string().uri({ scheme: ['redis', 'rediss'] }),
sentry_dsn: Joi.string(),
shields_ips: Joi.array().items(Joi.string().ip()),
shields_secret: Joi.string(),
sl_insight_userUuid: Joi.string(),
sl_insight_apiToken: Joi.string(),
@@ -186,6 +184,11 @@ const privateMetricsInfluxConfigSchema = privateConfigSchema.append({
influx_username: Joi.string().required(),
influx_password: Joi.string().required(),
})
function addHandlerAtIndex(camp, index, handlerFn) {
camp.stack.splice(index, 0, handlerFn)
}
/**
* The Server is based on the web framework Scoutcamp. It creates
* an http server, sets up helpers for token persistence and monitoring.
@@ -224,7 +227,6 @@ class Server {
}
this.githubConstellation = new GithubConstellation({
persistence: publicConfig.persistence,
service: publicConfig.services.github,
private: privateConfig,
})
@@ -278,6 +280,23 @@ class Server {
})
}
// See https://www.viget.com/articles/heroku-cloudflare-the-right-way/
requireCloudflare() {
// Set `req.ip`, which is expected by `cloudflareMiddleware()`. This is set
// by Express but not Scoutcamp.
addHandlerAtIndex(this.camp, 0, function (req, res, next) {
// On Heroku, `req.socket.remoteAddress` is the Heroku router. However,
// the router ensures that the last item in the `X-Forwarded-For` header
// is the real origin.
// https://stackoverflow.com/a/18517550/893113
req.ip = process.env.DYNO
? req.headers['x-forwarded-for'].split(', ').pop()
: req.socket.remoteAddress
next()
})
addHandlerAtIndex(this.camp, 1, cloudflareMiddleware())
}
/**
* Set up Scoutcamp routes for 404/not found responses
*/
@@ -295,7 +314,8 @@ class Server {
end
)(
makeBadge({
text: ['410', `${format} no longer available`],
label: '410',
message: `${format} no longer available`,
color: 'lightgray',
format: 'svg',
})
@@ -310,7 +330,8 @@ class Server {
end
)(
makeBadge({
text: ['404', 'raster badges not available'],
label: '404',
message: 'raster badges not available',
color: 'lightgray',
format: 'svg',
})
@@ -328,7 +349,8 @@ class Server {
end
)(
makeBadge({
text: ['404', 'badge not found'],
label: '404',
message: 'badge not found',
color: 'red',
format,
})
@@ -392,8 +414,6 @@ class Server {
rasterUrl: config.public.rasterUrl,
private: config.private,
public: config.public,
shieldsProductionHerokuHacks:
config.public.shieldsProductionHerokuHacks,
}
)
)
@@ -411,6 +431,7 @@ class Server {
ssl: { isSecure: secure, cert, key },
cors: { allowedOrigin },
rateLimit,
requireCloudflare,
} = this.config.public
log(`Server is starting up: ${this.baseUrl}`)
@@ -424,6 +445,10 @@ class Server {
key,
}))
if (requireCloudflare) {
this.requireCloudflare()
}
const { metricInstance } = this
this.cleanupMonitor = sysMonitor.setRoutes(
{ rateLimit },

View File

@@ -168,6 +168,28 @@ describe('The server', function () {
})
})
context('`requireCloudflare` is enabled', function () {
let server
afterEach(async function () {
if (server) {
server.stop()
}
})
it('should reject requests from localhost with an empty 200 response', async function () {
this.timeout(10000)
server = await createTestServer({ public: { requireCloudflare: true } })
await server.start()
const { statusCode, body } = await got(
`${server.baseUrl}badge/foo-bar-blue.svg`
)
expect(statusCode).to.be.equal(200)
expect(body).to.equal('')
})
})
describe('configuration', function () {
let server
afterEach(async function () {

View File

@@ -3,7 +3,7 @@
* @module
*/
const Joi = require('@hapi/joi')
const Joi = require('joi')
const { expect } = require('chai')
/**

View File

@@ -1,51 +0,0 @@
'use strict'
const fsos = require('fsos')
const TokenPersistence = require('./token-persistence')
class FsTokenPersistence extends TokenPersistence {
constructor({ path }) {
super()
this.path = path
}
async initialize() {
let contents
try {
contents = await fsos.get(this.path)
} catch (e) {
if (e.code === 'ENOENT') {
contents = '[]'
} else {
throw e
}
}
const tokens = JSON.parse(contents)
this._tokens = new Set(tokens)
return tokens
}
async save() {
const tokens = Array.from(this._tokens)
await fsos.set(this.path, JSON.stringify(tokens))
}
async onTokenAdded(token) {
if (!this._tokens) {
throw Error('initialize() has not been called')
}
this._tokens.add(token)
await this.save()
}
async onTokenRemoved(token) {
if (!this._tokens) {
throw Error('initialize() has not been called')
}
this._tokens.delete(token)
await this.save()
}
}
module.exports = FsTokenPersistence

View File

@@ -1,72 +0,0 @@
'use strict'
const fs = require('fs')
const tmp = require('tmp')
const readFile = require('fs-readfile-promise')
const { expect } = require('chai')
const FsTokenPersistence = require('./fs-token-persistence')
describe('File system token persistence', function () {
let path, persistence
beforeEach(function () {
path = tmp.tmpNameSync()
persistence = new FsTokenPersistence({ path })
})
context('when the file does not exist', function () {
it('does nothing', async function () {
const tokens = await persistence.initialize()
expect(tokens).to.deep.equal([])
})
it('saving creates an empty file', async function () {
await persistence.initialize()
await persistence.save()
const json = JSON.parse(await readFile(path))
expect(json).to.deep.deep.equal([])
})
})
context('when the file exists', function () {
const initialTokens = ['a', 'b', 'c'].map(char => char.repeat(40))
beforeEach(async function () {
fs.writeFileSync(path, JSON.stringify(initialTokens))
})
it('loads the contents', async function () {
const tokens = await persistence.initialize()
expect(tokens).to.deep.equal(initialTokens)
})
context('when tokens are added', function () {
it('saves the change', async function () {
const newToken = 'e'.repeat(40)
const expected = Array.from(initialTokens)
expected.push(newToken)
await persistence.initialize()
await persistence.noteTokenAdded(newToken)
const savedTokens = JSON.parse(await readFile(path))
expect(savedTokens).to.deep.equal(expected)
})
})
context('when tokens are removed', function () {
it('saves the change', async function () {
const expected = Array.from(initialTokens)
const toRemove = expected.pop()
await persistence.initialize()
await persistence.noteTokenRemoved(toRemove)
const savedTokens = JSON.parse(await readFile(path))
expect(savedTokens).to.deep.equal(expected)
})
})
})
})

View File

@@ -3,13 +3,13 @@
const { URL } = require('url')
const Redis = require('ioredis')
const log = require('../server/log')
const TokenPersistence = require('./token-persistence')
module.exports = class RedisTokenPersistence extends TokenPersistence {
module.exports = class RedisTokenPersistence {
constructor({ url, key }) {
super()
this.url = url
this.key = key
this.noteTokenAdded = this.noteTokenAdded.bind(this)
this.noteTokenRemoved = this.noteTokenRemoved.bind(this)
}
async initialize() {
@@ -40,4 +40,20 @@ module.exports = class RedisTokenPersistence extends TokenPersistence {
async onTokenRemoved(token) {
await this.redis.srem(this.key, token)
}
async noteTokenAdded(token) {
try {
await this.onTokenAdded(token)
} catch (e) {
log.error(e)
}
}
async noteTokenRemoved(token) {
try {
await this.onTokenRemoved(token)
} catch (e) {
log.error(e)
}
}
}

View File

@@ -1,44 +0,0 @@
'use strict'
const log = require('../server/log')
// This is currently bound to the legacy github auth code. That will be
// replaced with a dependency-injected token provider.
class TokenPersistence {
constructor() {
this.noteTokenAdded = this.noteTokenAdded.bind(this)
this.noteTokenRemoved = this.noteTokenRemoved.bind(this)
}
async initialize() {
throw Error('initialize() is not implemented')
}
async stop() {}
async onTokenAdded(token) {
throw Error('onTokenAdded() is not implemented')
}
async noteTokenAdded(token) {
try {
await this.onTokenAdded(token)
} catch (e) {
log.error(e)
}
}
async onTokenRemoved(token) {
throw Error('onTokenRemoved() is not implemented')
}
async noteTokenRemoved(token) {
try {
await this.onTokenRemoved(token)
} catch (e) {
log.error(e)
}
}
}
module.exports = TokenPersistence

View File

@@ -111,10 +111,7 @@ if (allFiles.length > 100) {
// eslint-disable-next-line promise/prefer-await-to-then
danger.git.diffForFile(file).then(({ diff }) => {
if (
(diff.includes('authHelper') || diff.includes('serverSecrets')) &&
!secretsDocs.modified
) {
if (diff.includes('authHelper') && !secretsDocs.modified) {
warn(
[
`:books: Remember to ensure any changes to \`config.private\` `,
@@ -134,11 +131,11 @@ if (allFiles.length > 100) {
)
}
if (diff.includes("require('joi')")) {
if (diff.includes("require('@hapi/joi')")) {
fail(
[
`Found import of 'joi' in \`${file}\`. <br>`,
"Joi must be imported as '@hapi/joi'.",
`Found import of '@hapi/joi' in \`${file}\`. <br>`,
"Joi must be imported as 'joi'.",
].join('')
)
}

View File

@@ -25,7 +25,7 @@ and learn about the [Github workflow](http://try.github.io/).
#### Node, NPM
Node 10 or later is required. If you don't already have them,
Node 12 or later is required. If you don't already have them,
install node and npm: https://nodejs.org/en/download/
### Setup a dev install
@@ -116,17 +116,10 @@ const { BaseService } = require('..')
// (3)
module.exports = class Example extends BaseService {
// (4)
static get category() {
return 'build'
}
static category = 'build'
// (5)
static get route() {
return {
base: 'example',
pattern: ':text',
}
}
static route = { base: 'example', pattern: ':text' }
// (6)
async handle({ text }) {
@@ -186,7 +179,7 @@ const { renderVersionBadge } = require('..//version')
const { BaseJsonService } = require('..')
// (4)
const Joi = require('@hapi/joi')
const Joi = require('joi')
const schema = Joi.object({
version: Joi.string().required(),
}).required()
@@ -194,22 +187,13 @@ const schema = Joi.object({
// (5)
module.exports = class GemVersion extends BaseJsonService {
// (6)
static get category() {
return 'version'
}
static category = 'version'
// (7)
static get route() {
return {
base: 'gem/v',
pattern: ':gem',
}
}
static route = { base: 'gem/v', pattern: ':gem' }
// (8)
static get defaultBadgeData() {
return { label: 'gem' }
}
static defaultBadgeData = { label: 'gem' }
// (11)
static render({ version }) {
@@ -298,23 +282,19 @@ Once we have implemented our badge, we can add it to the index so that users can
module.exports = class GemVersion extends BaseJsonService {
// ...
static get category() {
// (1)
return 'version'
}
// (1)
static category = 'version'
static get examples() {
// (2)
return [
{
// (3)
title: 'Gem',
namedParams: { gem: 'formatador' },
staticPreview: this.render({ version: '2.1.0' }),
keywords: ['ruby'],
},
]
}
// (2)
static examples = [
{
// (3)
title: 'Gem',
namedParams: { gem: 'formatador' },
staticPreview: this.render({ version: '2.1.0' }),
keywords: ['ruby'],
},
]
}
```
@@ -331,7 +311,7 @@ Save, run `npm start`, and you can see it [locally](http://127.0.0.1:3000/).
If you update `examples`, you don't have to restart the server. Run `npm run defs` in another terminal window and the frontend will update.
### (4.5) Write Tests <!-- Change the link below when you change the heading -->
### (4.5) Write Tests<!-- Change the link below when you change the heading -->
[write tests]: #45-write-tests

View File

@@ -34,6 +34,7 @@ Production hosting is managed by the Shields ops team:
| Cloudflare (CDN) | Access management | @espadrine |
| Cloudflare (CDN) | Admin access | @calebcartwright, @chris48s, @espadrine, @paulmelnikow, @PyvesB |
| Twitch | OAuth app | @PyvesB |
| Discord | OAuth app | @PyvesB |
| YouTube | Account owner | @PyvesB |
| OpenStreetMap (for Wheelmap) | Account owner | @paulmelnikow |
| DNS | Account owner | @olivierlacan |

View File

@@ -17,9 +17,7 @@ Legacy services look like:
```js
module.exports = class ExampleService extends LegacyService {
static get category() {
return 'build'
}
static category = 'build'
static registerLegacyRouteHandler({ camp, cache }) {
camp.route(
@@ -101,12 +99,7 @@ tests are passing, though.
const BaseJsonService = require('../base-json')
class ExampleDownloads extends BaseJsonService {
static get route() {
return {
base: 'example/d',
pattern: ':param1/:param2',
}
}
static route = { base: 'example/d', pattern: ':param1/:param2' }
static defaultBadgeData() {
return { label: 'downloads' } // or whatever
@@ -152,7 +145,7 @@ Once the route is working, fill out `render()` and `handle()`.
<details>
```js
const Joi = require('@hapi/joi')
const Joi = require('joi')
const { errorMessagesFor } = require('./github-helpers')
const issueSchema = Joi.object({
@@ -181,7 +174,7 @@ or create an abstract superclass like **PypiBase**:
<details>
```js
const Joi = require('@hapi/joi')
const Joi = require('joi')
const BaseJsonService = require('../base-json')
const schema = Joi.object({

View File

@@ -2,7 +2,7 @@
## Installation
You will need Node 10 or later, which you can install using a
You will need Node 12 or later, which you can install using a
[package manager][].
On Ubuntu / Debian:
@@ -184,9 +184,14 @@ Start the server using the Sentry DSN. You can set it:
sudo SENTRY_DSN=https://xxx:yyy@sentry.io/zzz node server
```
- or by `sentry_dsn` secret property defined in `private/secret.json`
Or via config as you would do with [server secrets](server-secrets.md):
```yml
private:
sentry_dsn: ...
```
```sh
sudo node server
```
@@ -200,3 +205,9 @@ METRICS_PROMETHEUS_ENABLED=true npm start
```
Metrics are available at `/metrics` resource.
### Cloudflare
Shields uses Cloudflare as a downstream CDN. If your installation does the same,
you can configure your server to only accept requests coming from Cloudflare's IPs.
Set `public.requireCloudflare: true`.

View File

@@ -105,6 +105,15 @@ self-hosted Shields installation access to private repositories hosted on bitbuc
Bitbucket badges use basic auth. Provide a username and password to give your
self-hosted Shields installation access to a private Bitbucket Server instance.
### Discord
Using a token for Dicsord is optional but will allow higher API rates.
- `DISCORD_BOT_TOKEN` (yml: `discord_bot_token`)
Register an application in the [Discord developer console](https://discord.com/developers).
To obtain a token, simply create a bot for your application.
### Drone
- `DRONE_ORIGINS` (yml: `public.services.drone.authorizedOrigins`)

View File

@@ -66,7 +66,7 @@ t.create('Build status')
- Note that when we call our badge, we are allowing it to communicate with an external service without mocking the response. We write tests which interact with external services, which is unusual practice in unit testing. We do this because one of the purposes of service tests is to notify us if a badge has broken due to an upstream API change. For this reason it is important for at least one test to call the live API without mocking the interaction.
- All badges on shields can be requested in a number of formats. As well as calling https://img.shields.io/wercker/build/wercker/go-wercker-api.svg to generate ![](https://img.shields.io/wercker/build/wercker/go-wercker-api.svg) we can also call https://img.shields.io/wercker/build/wercker/go-wercker-api.json to request the same content as JSON. When writing service tests, we request the badge in JSON format so it is easier to make assertions about the content.
- We don't need to explicitly call `/wercker/build/wercker/go-wercker-api.json` here, only `/build/wercker/go-wercker-api.json`. When we create a tester object with `createServiceTester()` the URL base defined in our service class (in this case `/wercker`) is used as the base URL for any requests made by the tester object.
3. `expectBadge()` is a helper function which accepts either a string literal or a [Joi][] schema for the different fields.
3. `expectBadge()` is a helper function which accepts either a string literal, a [RegExp][] or a [Joi][] schema for the different fields.
Joi is a validation library that is build into IcedFrisby which you can use to
match based on a set of allowed strings, regexes, or specific values. You can
refer to their [API reference][joi api].
@@ -82,6 +82,7 @@ harness will call it for you.
[icedfrisby api]: https://github.com/MarkHerhold/IcedFrisby/blob/master/API.md
[joi]: https://github.com/hapijs/joi
[joi api]: https://github.com/hapijs/joi/blob/master/API.md
[regexp]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp
### (3) Running the Tests

View File

@@ -129,7 +129,7 @@ function StyleTable({ style }: { style: string }): JSX.Element {
<tr>
<td>Description</td>
<td>Badges (new)</td>
<td>Badges (old)</td>
<td>Badges (img.shields.io)</td>
</tr>
</thead>
<tbody>

View File

@@ -1,8 +0,0 @@
import Enzyme from 'enzyme'
import Adapter from 'enzyme-adapter-react-16'
import chai from 'chai'
import chaiEnzyme from 'chai-enzyme'
Enzyme.configure({ adapter: new Adapter() })
chai.use(chaiEnzyme())

View File

@@ -45,7 +45,11 @@ function quoteAsciiDocAttribute(attr: string | null): string {
if (attr == null) {
return 'None'
} else {
const withQuotesEscaped = attr.replace(/"/g, '\\"')
// String values are prepared and returned to users who want to include their badge
// in an AsciiDoc document. We're not using the value in any actual processing, so
// no need to perform proper sanitization. We simply escape quotes, as mandated by
// http://asciidoc.org/userguide.html#X21
const withQuotesEscaped = attr.replace(/"/g, '\\"') // lgtm [js/incomplete-sanitization]
return `"${withQuotesEscaped}"`
}
}

View File

@@ -209,7 +209,7 @@ export default function EndpointPage(): JSX.Element {
<dt>logoColor</dt>
<dd>
Default: none. Same meaning as the query string. Can be overridden by
the query string.
the query string. Only works for named logos.
</dd>
<dt>logoWidth</dt>
<dd>

View File

@@ -12,8 +12,7 @@ function scrollToElementId(id) {
export function onRouteUpdate({ location: { hash } }) {
if (hash) {
if (!redirectLegacyRoutes()) {
window.setTimeout(() => scrollToElementId(hash), 10)
}
redirectLegacyRoutes()
window.setTimeout(() => scrollToElementId(hash), 10)
}
}

View File

@@ -1,7 +1,11 @@
'use strict'
const Joi = require('@hapi/joi')
const { toSvgColor } = require('../badge-maker/lib/color')
const Joi = require('joi')
const {
toSvgColor,
brightness,
normalizeColor,
} = require('../badge-maker/lib/color')
const coalesce = require('../core/base-service/coalesce')
const { svg2base64 } = require('./svg-helpers')
const logos = require('./load-logos')()
@@ -16,6 +20,8 @@ const logoAliases = {
stackoverflow: 'stack-overflow',
tfs: 'azure-devops',
}
const lightThreshold = 0.4
const darkThreshold = 0.6
function prependPrefix(s, prefix) {
if (s === undefined) {
@@ -67,27 +73,12 @@ function getShieldsIcon({ name, color }) {
}
}
function brightness({ r, g, b }) {
return +((r * 299 + g * 587 + b * 114) / 255000).toFixed(2)
}
const hexColorRegex = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i
function hexToRgb(hex) {
const result = hexColorRegex.exec(hex)
return {
r: parseInt(result[1], 16),
g: parseInt(result[2], 16),
b: parseInt(result[3], 16),
}
}
function getSimpleIconStyle({ icon, style }) {
const { hex } = icon
if (style !== 'social' && brightness(hexToRgb(hex)) <= 0.4) {
if (style !== 'social' && brightness(normalizeColor(hex)) <= lightThreshold) {
return 'light'
}
if (style === 'social' && brightness(hexToRgb(hex)) >= 0.6) {
if (style === 'social' && brightness(normalizeColor(hex)) >= darkThreshold) {
return 'dark'
}
return 'default'

View File

@@ -6,6 +6,7 @@ const {
prependPrefix,
isDataUrl,
prepareNamedLogo,
getSimpleIcon,
makeLogo,
} = require('./logos')
@@ -98,6 +99,13 @@ describe('Logo helpers', function () {
})
})
test(getSimpleIcon, () => {
// https://github.com/badges/shields/issues/4016
given({ name: 'get' }).expect(undefined)
// https://github.com/badges/shields/issues/4263
given({ name: 'get', color: 'blue' }).expect(undefined)
})
test(makeLogo, () => {
forCases([
given('npm', { logo: 'image/svg+xml;base64,PHN2ZyB4bWxu' }),

View File

@@ -1,15 +0,0 @@
'use strict'
const fs = require('fs')
const path = require('path')
const config = require('config').util.toObject()
const legacySecretsPath = path.join(__dirname, '..', 'private', 'secret.json')
if (fs.existsSync(legacySecretsPath)) {
console.error(
`Legacy secrets file found at ${legacySecretsPath}. It should be deleted and secrets replaced with environment variables or config/local.yml`
)
process.exit(1)
}
module.exports = config.private

View File

@@ -1,11 +0,0 @@
{
"version": 1,
"name": "shields",
"env": {
"PERSISTENCE_DIR": "/tmp/persistence"
},
"type": "npm",
"engines": {
"node": "8.x"
}
}

11047
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -22,47 +22,46 @@
"url": "https://github.com/badges/shields"
},
"dependencies": {
"@hapi/joi": "^17.1.1",
"@sentry/node": "^5.18.1",
"bytes": "^3.1.0",
"camelcase": "^5.3.1",
"@sentry/node": "^5.27.1",
"@shields_io/camp": "^18.0.0",
"chai-as-promised": "^7.1.1",
"badge-maker": "file:badge-maker",
"bytes": "^3.1.0",
"camelcase": "^6.1.0",
"chalk": "^4.1.0",
"check-node-version": "^4.0.3",
"chrome-web-store-item-property": "~1.2.0",
"config": "^3.3.1",
"cloudflare-middleware": "^1.0.4",
"config": "^3.3.2",
"cross-env": "^7.0.2",
"decamelize": "^3.2.0",
"dotenv": "^8.2.0",
"emojic": "^1.1.15",
"emojic": "^1.1.16",
"escape-string-regexp": "^4.0.0",
"fast-xml-parser": "^3.17.4",
"fsos": "^1.1.6",
"badge-maker": "file:badge-maker",
"glob": "^7.1.6",
"graphql": "^14.7.0",
"graphql-tag": "^2.10.4",
"graphql-tag": "^2.11.0",
"ioredis": "4.17.3",
"joi-extension-semver": "4.1.1",
"joi": "17.2.1",
"joi-extension-semver": "5.0.0",
"js-yaml": "^3.14.0",
"jsonpath": "~1.0.2",
"lodash.countby": "^4.6.0",
"lodash.groupby": "^4.6.0",
"lodash.times": "^4.3.2",
"moment": "^2.27.0",
"moment": "^2.29.1",
"node-env-flag": "^0.1.0",
"parse-link-header": "^1.0.1",
"path-to-regexp": "^5.0.0",
"pretty-bytes": "^5.3.0",
"pretty-bytes": "^5.4.1",
"priorityqueuejs": "^2.0.0",
"prom-client": "^11.5.3",
"query-string": "^6.13.1",
"query-string": "^6.13.6",
"request": "~2.88.2",
"semver": "~7.3.2",
"simple-icons": "2.18.0",
"simple-icons": "3.12.1",
"webextension-store-meta": "^1.0.2",
"xmldom": "~0.2.1",
"xpath": "~0.0.27"
"xpath": "~0.0.32"
},
"scripts": {
"coverage:test:core": "nyc npm run test:core",
@@ -96,8 +95,9 @@
"test": "run-s --silent --continue-on-error lint test:frontend test:package test:core test:entrypoint check-types:package check-types:frontend prettier:check",
"check-types:package": "tsd badge-maker",
"check-types:frontend": "tsc --noEmit --project .",
"depcheck": "check-node-version --node \">= 10.0\"",
"postinstall": "run-s --silent depcheck",
"depcheck": "check-node-version --node \">= 12.0\"",
"fix-issue-5294": "rimraf node_modules/@types/react-native",
"postinstall": "run-s --silent depcheck fix-issue-5294",
"prebuild": "run-s --silent depcheck",
"features": "node scripts/export-supported-features-cli.js > supported-features.json",
"defs": "node scripts/export-service-definitions-cli.js > service-definitions.yml",
@@ -141,21 +141,19 @@
]
},
"devDependencies": {
"@babel/core": "^7.10.4",
"@babel/polyfill": "^7.10.4",
"@babel/register": "7.10.4",
"@babel/core": "^7.12.3",
"@babel/polyfill": "^7.12.1",
"@babel/register": "7.12.1",
"@mapbox/react-click-to-select": "^2.2.0",
"@types/chai": "^4.2.11",
"@types/chai-enzyme": "^0.6.7",
"@types/enzyme": "^3.10.5",
"@types/chai": "^4.2.14",
"@types/lodash.debounce": "^4.0.6",
"@types/lodash.groupby": "^4.6.6",
"@types/mocha": "^7.0.2",
"@types/node": "^14.0.14",
"@types/react-helmet": "^6.0.0",
"@types/mocha": "^8.0.3",
"@types/node": "^14.11.8",
"@types/react-helmet": "^6.1.0",
"@types/react-modal": "^3.10.6",
"@types/react-select": "^3.0.14",
"@types/styled-components": "4.1.8",
"@types/react-select": "^3.0.22",
"@types/styled-components": "5.1.3",
"@typescript-eslint/eslint-plugin": "^2.34.0",
"@typescript-eslint/parser": "^2.34.0",
"babel-plugin-inline-react-svg": "^1.1.1",
@@ -163,55 +161,53 @@
"babel-preset-gatsby": "^0.5.1",
"caller": "^1.0.1",
"chai": "^4.1.2",
"chai-as-promised": "^7.1.1",
"chai-datetime": "^1.7.0",
"chai-enzyme": "^1.0.0-beta.1",
"chai-string": "^1.4.0",
"cheerio": "^1.0.0-rc.3",
"child-process-promise": "^2.2.1",
"clipboard-copy": "^3.1.0",
"concurrently": "^5.2.0",
"cypress": "^4.10.0",
"danger": "^10.2.1",
"concurrently": "^5.3.0",
"cypress": "^5.3.0",
"danger": "^10.5.0",
"danger-plugin-no-test-shortcuts": "^2.0.0",
"deepmerge": "^4.2.2",
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.2",
"eslint": "^6.8.0",
"eslint-config-prettier": "^6.11.0",
"eslint-config-prettier": "^6.13.0",
"eslint-config-standard": "^14.1.1",
"eslint-config-standard-react": "^9.2.0",
"eslint-plugin-chai-friendly": "^0.6.0",
"eslint-plugin-cypress": "^2.11.1",
"eslint-plugin-import": "^2.22.0",
"eslint-plugin-jsdoc": "^28.5.1",
"eslint-plugin-cypress": "^2.11.2",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-jsdoc": "^30.7.3",
"eslint-plugin-mocha": "^6.3.0",
"eslint-plugin-no-extension-in-require": "^0.2.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-react": "^7.20.3",
"eslint-plugin-react": "^7.21.5",
"eslint-plugin-react-hooks": "^2.5.1",
"eslint-plugin-sort-class-members": "^1.7.0",
"eslint-plugin-standard": "^4.0.1",
"eslint-plugin-sort-class-members": "^1.8.0",
"eslint-plugin-standard": "^4.0.2",
"fetch-ponyfill": "^6.1.1",
"form-data": "^3.0.0",
"fs-readfile-promise": "^3.0.1",
"gatsby": "2.24.2",
"gatsby": "2.24.73",
"gatsby-plugin-catch-links": "^2.3.10",
"gatsby-plugin-page-creator": "^2.3.12",
"gatsby-plugin-page-creator": "^2.3.33",
"gatsby-plugin-react-helmet": "^3.3.9",
"gatsby-plugin-remove-trailing-slashes": "^2.3.10",
"gatsby-plugin-styled-components": "^3.3.9",
"gatsby-plugin-typescript": "^2.4.13",
"got": "11.5.0",
"gatsby-plugin-typescript": "^2.4.24",
"got": "11.7.0",
"humanize-string": "^2.1.0",
"husky": "^4.2.5",
"husky": "^4.3.0",
"icedfrisby": "4.0.0",
"icedfrisby-nock": "^2.0.0",
"is-png": "^2.0.0",
"is-svg": "^4.2.1",
"js-yaml-loader": "^1.2.2",
"jsdoc": "^3.6.4",
"lint-staged": "^10.2.11",
"jsdoc": "^3.6.6",
"lint-staged": "^10.4.2",
"lodash.debounce": "^4.0.8",
"lodash.difference": "^4.5.0",
"minimist": "^1.2.5",
@@ -219,15 +215,15 @@
"mocha-env-reporter": "^4.0.0",
"mocha-junit-reporter": "^2.0.0",
"mocha-yaml-loader": "^1.0.3",
"nock": "13.0.2",
"node-mocks-http": "^1.8.1",
"nodemon": "^2.0.4",
"nock": "13.0.4",
"node-mocks-http": "^1.9.0",
"nodemon": "^2.0.6",
"npm-run-all": "^4.1.5",
"nyc": "^15.1.0",
"opn-cli": "^5.0.0",
"portfinder": "^1.0.26",
"prettier": "2.0.5",
"react": "^16.13.1",
"portfinder": "^1.0.28",
"prettier": "2.1.2",
"react": "^16.14.0",
"react-dom": "^16.13.1",
"react-error-overlay": "^6.0.7",
"react-helmet": "^6.1.0",
@@ -239,19 +235,19 @@
"require-hacker": "^3.0.1",
"rimraf": "^3.0.2",
"sazerac": "^2.0.0",
"sinon": "^9.0.2",
"sinon": "^9.2.0",
"sinon-chai": "^3.5.0",
"snap-shot-it": "^7.9.3",
"start-server-and-test": "1.11.0",
"styled-components": "^5.1.1",
"start-server-and-test": "1.11.5",
"styled-components": "^5.2.0",
"tmp": "0.2.1",
"tsd": "^0.12.1",
"ts-mocha": "^7.0.0",
"typescript": "^3.8.3"
"tsd": "^0.13.1",
"ts-mocha": "^8.0.0",
"typescript": "^4.0.3"
},
"engines": {
"node": "^10.16.3",
"npm": "^6.11.3"
"node": "^12.18.3",
"npm": "^6.14.7"
},
"babel": {
"plugins": [

View File

@@ -5,7 +5,6 @@ console.log(config)
const GithubConstellation = require('../services/github/github-constellation')
const { persistence } = new GithubConstellation({
persistence: config.public.persistence,
service: config.public.services.github,
private: config.private,
})

35
scripts/run_package_tests.sh Executable file
View File

@@ -0,0 +1,35 @@
#!/bin/bash
# https://discuss.circleci.com/t/switch-nodejs-version-on-machine-executor-solved/26675/3
# Start off less strict to work around various nvm errors.
set -e
export NVM_DIR="/opt/circleci/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && source "$NVM_DIR/nvm.sh"
nvm install $NODE_VERSION
nvm use $NODE_VERSION
# Stricter.
set -euo pipefail
node --version
# Install the shields.io dependencies.
if [[ "$NODE_VERSION" == "v10" ]]; then
# Avoid a depcheck error.
npm ci --ignore-scripts
else
npm ci
fi
# Run the package tests.
npm run test:package
npm run check-types:package
# Delete the shields.io dependencies.
rm -rf node_modules/
# Run a smoke test (render a badge with the CLI) with only the package
# dependencies installed.
cd badge-maker
npm link
badge cactus grown :green @flat

View File

@@ -1,6 +1,6 @@
'use strict'
const Joi = require('@hapi/joi')
const Joi = require('joi')
const { nonNegativeInteger } = require('../validators')
const { BaseJsonService } = require('..')
@@ -18,9 +18,7 @@ const schema = Joi.object({
}).required()
class BaseAmoService extends BaseJsonService {
static get defaultBadgeData() {
return { label: 'mozilla add-on' }
}
static defaultBadgeData = { label: 'mozilla add-on' }
async fetch({ addonId }) {
return this._requestJson({

View File

@@ -14,32 +14,20 @@ const documentation = `
`
class AmoWeeklyDownloads extends BaseAmoService {
static get category() {
return 'downloads'
}
static category = 'downloads'
static route = { base: 'amo/dw', pattern: ':addonId' }
static get route() {
return {
base: 'amo/dw',
pattern: ':addonId',
}
}
static examples = [
{
title: 'Mozilla Add-on',
namedParams: { addonId: 'dustman' },
staticPreview: this.render({ downloads: 120 }),
keywords,
documentation,
},
]
static get examples() {
return [
{
title: 'Mozilla Add-on',
namedParams: { addonId: 'dustman' },
staticPreview: this.render({ downloads: 120 }),
keywords,
documentation,
},
]
}
static get defaultBadgeData() {
return { label: 'downloads' }
}
static defaultBadgeData = { label: 'downloads' }
static render({ downloads }) {
return {

View File

@@ -9,7 +9,7 @@ const t = (module.exports = new ServiceTester({
}))
t.create('Weekly Downloads')
.get('/dw/dustman.json')
.get('/dw/duckduckgo-for-firefox.json')
.expectBadge({ label: 'downloads', message: isMetricOverTimePeriod })
t.create('Weekly Downloads (not found)')

View File

@@ -5,35 +5,25 @@ const { floorCount: floorCountColor } = require('../color-formatters')
const { BaseAmoService, keywords } = require('./amo-base')
module.exports = class AmoRating extends BaseAmoService {
static get category() {
return 'rating'
}
static category = 'rating'
static route = { base: 'amo', pattern: ':format(stars|rating)/:addonId' }
static get route() {
return {
base: 'amo',
pattern: ':format(stars|rating)/:addonId',
}
}
static get examples() {
return [
{
title: 'Mozilla Add-on',
pattern: 'rating/:addonId',
namedParams: { addonId: 'dustman' },
staticPreview: this.render({ format: 'rating', rating: 4 }),
keywords,
},
{
title: 'Mozilla Add-on',
pattern: 'stars/:addonId',
namedParams: { addonId: 'dustman' },
staticPreview: this.render({ format: 'stars', rating: 4 }),
keywords,
},
]
}
static examples = [
{
title: 'Mozilla Add-on',
pattern: 'rating/:addonId',
namedParams: { addonId: 'dustman' },
staticPreview: this.render({ format: 'rating', rating: 4 }),
keywords,
},
{
title: 'Mozilla Add-on',
pattern: 'stars/:addonId',
namedParams: { addonId: 'dustman' },
staticPreview: this.render({ format: 'stars', rating: 4 }),
keywords,
},
]
static render({ format, rating }) {
rating = Math.round(rating)

View File

@@ -1,6 +1,6 @@
'use strict'
const Joi = require('@hapi/joi')
const Joi = require('joi')
const { isStarRating } = require('../test-validators')
const t = (module.exports = require('../tester').createServiceTester())

View File

@@ -4,33 +4,19 @@ const { metric } = require('../text-formatters')
const { BaseAmoService, keywords } = require('./amo-base')
module.exports = class AmoUsers extends BaseAmoService {
static get category() {
return 'downloads'
}
static category = 'downloads'
static route = { base: 'amo/users', pattern: ':addonId' }
static get route() {
return {
base: 'amo/users',
pattern: ':addonId',
}
}
static examples = [
{
title: 'Mozilla Add-on',
namedParams: { addonId: 'dustman' },
staticPreview: this.render({ users: 750 }),
keywords,
},
]
static get examples() {
return [
{
title: 'Mozilla Add-on',
namedParams: { addonId: 'dustman' },
staticPreview: this.render({ users: 750 }),
keywords,
},
]
}
static get defaultBadgeData() {
return {
label: 'users',
}
}
static defaultBadgeData = { label: 'users' }
static render({ users }) {
return {

View File

@@ -4,27 +4,17 @@ const { renderVersionBadge } = require('../version')
const { BaseAmoService, keywords } = require('./amo-base')
module.exports = class AmoVersion extends BaseAmoService {
static get category() {
return 'version'
}
static category = 'version'
static route = { base: 'amo/v', pattern: ':addonId' }
static get route() {
return {
base: 'amo/v',
pattern: ':addonId',
}
}
static get examples() {
return [
{
title: 'Mozilla Add-on',
namedParams: { addonId: 'dustman' },
staticPreview: renderVersionBadge({ version: '2.1.0' }),
keywords,
},
]
}
static examples = [
{
title: 'Mozilla Add-on',
namedParams: { addonId: 'dustman' },
staticPreview: renderVersionBadge({ version: '2.1.0' }),
keywords,
},
]
async handle({ addonId }) {
const data = await this.fetch({ addonId })

View File

@@ -1,6 +1,6 @@
'use strict'
const Joi = require('@hapi/joi')
const Joi = require('joi')
const { floorCount } = require('../color-formatters')
const { BaseJsonService, InvalidResponse } = require('..')
@@ -19,32 +19,20 @@ class AnsibleGalaxyContent extends BaseJsonService {
}
module.exports = class AnsibleGalaxyContentQualityScore extends AnsibleGalaxyContent {
static get category() {
return 'analysis'
}
static category = 'analysis'
static route = { base: 'ansible/quality', pattern: ':projectId' }
static get route() {
return {
base: 'ansible/quality',
pattern: ':projectId',
}
}
static get examples() {
return [
{
title: 'Ansible Quality Score',
namedParams: {
projectId: '432',
},
staticPreview: this.render({ qualityScore: 4.125 }),
static examples = [
{
title: 'Ansible Quality Score',
namedParams: {
projectId: '432',
},
]
}
staticPreview: this.render({ qualityScore: 4.125 }),
},
]
static get defaultBadgeData() {
return { label: 'quality' }
}
static defaultBadgeData = { label: 'quality' }
static render({ qualityScore }) {
return {

View File

@@ -1,6 +1,6 @@
'use strict'
const Joi = require('@hapi/joi')
const Joi = require('joi')
const { downloadCount } = require('../color-formatters')
const { metric } = require('../text-formatters')
const { nonNegativeInteger } = require('../validators')
@@ -27,30 +27,18 @@ class AnsibleGalaxyRole extends BaseJsonService {
}
class AnsibleGalaxyRoleDownloads extends AnsibleGalaxyRole {
static get category() {
return 'downloads'
}
static category = 'downloads'
static route = { base: 'ansible/role/d', pattern: ':roleId' }
static get route() {
return {
base: 'ansible/role/d',
pattern: ':roleId',
}
}
static examples = [
{
title: 'Ansible Role',
namedParams: { roleId: '3078' },
staticPreview: this.render({ downloads: 76 }),
},
]
static get examples() {
return [
{
title: 'Ansible Role',
namedParams: { roleId: '3078' },
staticPreview: this.render({ downloads: 76 }),
},
]
}
static get defaultBadgeData() {
return { label: 'role downloads' }
}
static defaultBadgeData = { label: 'role downloads' }
static render({ downloads }) {
return {
@@ -66,32 +54,20 @@ class AnsibleGalaxyRoleDownloads extends AnsibleGalaxyRole {
}
class AnsibleGalaxyRoleName extends AnsibleGalaxyRole {
static get category() {
return 'other'
}
static category = 'other'
static route = { base: 'ansible/role', pattern: ':roleId' }
static get route() {
return {
base: 'ansible/role',
pattern: ':roleId',
}
}
static examples = [
{
title: 'Ansible Role',
namedParams: { roleId: '3078' },
staticPreview: this.render({
name: 'ansible-roles.sublimetext3_packagecontrol',
}),
},
]
static get examples() {
return [
{
title: 'Ansible Role',
namedParams: { roleId: '3078' },
staticPreview: this.render({
name: 'ansible-roles.sublimetext3_packagecontrol',
}),
},
]
}
static get defaultBadgeData() {
return { label: 'role' }
}
static defaultBadgeData = { label: 'role' }
static render({ name }) {
return { message: name, color: 'blue' }

View File

@@ -1,6 +1,6 @@
'use strict'
const Joi = require('@hapi/joi')
const Joi = require('joi')
const { renderLicenseBadge } = require('../licenses')
const { renderVersionBadge } = require('../version')
const { metric } = require('../text-formatters')
@@ -20,9 +20,7 @@ const schema = Joi.object({
})
class BaseAPMService extends BaseJsonService {
static get defaultBadgeData() {
return { label: 'apm' }
}
static defaultBadgeData = { label: 'apm' }
async fetch({ packageName }) {
return this._requestJson({
@@ -34,31 +32,19 @@ class BaseAPMService extends BaseJsonService {
}
class APMDownloads extends BaseAPMService {
static get category() {
return 'downloads'
}
static category = 'downloads'
static route = { base: 'apm/dm', pattern: ':packageName' }
static get route() {
return {
base: 'apm/dm',
pattern: ':packageName',
}
}
static examples = [
{
title: 'APM',
namedParams: { packageName: 'vim-mode' },
staticPreview: this.render({ downloads: '60043' }),
keywords,
},
]
static get examples() {
return [
{
title: 'APM',
namedParams: { packageName: 'vim-mode' },
staticPreview: this.render({ downloads: '60043' }),
keywords,
},
]
}
static get defaultBadgeData() {
return { label: 'downloads' }
}
static defaultBadgeData = { label: 'downloads' }
static render({ downloads }) {
return { message: metric(downloads), color: 'green' }
@@ -71,27 +57,17 @@ class APMDownloads extends BaseAPMService {
}
class APMVersion extends BaseAPMService {
static get category() {
return 'version'
}
static category = 'version'
static route = { base: 'apm/v', pattern: ':packageName' }
static get route() {
return {
base: 'apm/v',
pattern: ':packageName',
}
}
static get examples() {
return [
{
title: 'APM',
namedParams: { packageName: 'vim-mode' },
staticPreview: this.render({ version: '0.6.0' }),
keywords,
},
]
}
static examples = [
{
title: 'APM',
namedParams: { packageName: 'vim-mode' },
staticPreview: this.render({ version: '0.6.0' }),
keywords,
},
]
static render({ version }) {
return renderVersionBadge({ version })
@@ -110,31 +86,19 @@ class APMVersion extends BaseAPMService {
}
class APMLicense extends BaseAPMService {
static get category() {
return 'license'
}
static category = 'license'
static route = { base: 'apm/l', pattern: ':packageName' }
static get route() {
return {
base: 'apm/l',
pattern: ':packageName',
}
}
static examples = [
{
title: 'APM',
namedParams: { packageName: 'vim-mode' },
staticPreview: this.render({ license: 'MIT' }),
keywords,
},
]
static get examples() {
return [
{
title: 'APM',
namedParams: { packageName: 'vim-mode' },
staticPreview: this.render({ license: 'MIT' }),
keywords,
},
]
}
static get defaultBadgeData() {
return { label: 'license' }
}
static defaultBadgeData = { label: 'license' }
static render({ license }) {
return renderLicenseBadge({ license })

View File

@@ -1,6 +1,6 @@
'use strict'
const Joi = require('@hapi/joi')
const Joi = require('joi')
const { nonNegativeInteger } = require('../validators')
const { isBuildStatus } = require('../build-status')
const { BaseJsonService } = require('..')
@@ -21,9 +21,7 @@ const schema = Joi.object({
}).required()
module.exports = class AppVeyorBase extends BaseJsonService {
static get category() {
return 'build'
}
static category = 'build'
async fetch({ user, repo, branch }) {
let url = `https://ci.appveyor.com/api/projects/${user}/${repo}`

View File

@@ -4,26 +4,22 @@ const { renderBuildStatusBadge } = require('../build-status')
const AppVeyorBase = require('./appveyor-base')
module.exports = class AppVeyorBuild extends AppVeyorBase {
static get route() {
return this.buildRoute('appveyor/build')
}
static route = this.buildRoute('appveyor/build')
static get examples() {
return [
{
title: 'AppVeyor',
pattern: ':user/:repo',
namedParams: { user: 'gruntjs', repo: 'grunt' },
staticPreview: this.render({ status: 'success' }),
},
{
title: 'AppVeyor branch',
pattern: ':user/:repo/:branch',
namedParams: { user: 'gruntjs', repo: 'grunt', branch: 'master' },
staticPreview: this.render({ status: 'success' }),
},
]
}
static examples = [
{
title: 'AppVeyor',
pattern: ':user/:repo',
namedParams: { user: 'gruntjs', repo: 'grunt' },
staticPreview: this.render({ status: 'success' }),
},
{
title: 'AppVeyor branch',
pattern: ':user/:repo/:branch',
namedParams: { user: 'gruntjs', repo: 'grunt', branch: 'master' },
staticPreview: this.render({ status: 'success' }),
},
]
static render({ status }) {
return renderBuildStatusBadge({ status })

View File

@@ -5,38 +5,34 @@ const { NotFound } = require('..')
const AppVeyorBase = require('./appveyor-base')
module.exports = class AppVeyorJobBuild extends AppVeyorBase {
static get route() {
return {
base: 'appveyor/job/build',
pattern: ':user/:repo/:job/:branch*',
}
static route = {
base: 'appveyor/job/build',
pattern: ':user/:repo/:job/:branch*',
}
static get examples() {
return [
{
title: 'AppVeyor Job',
pattern: ':user/:repo/:job',
namedParams: {
user: 'wpmgprostotema',
repo: 'voicetranscoder',
job: 'Linux',
},
staticPreview: renderBuildStatusBadge({ status: 'success' }),
static examples = [
{
title: 'AppVeyor Job',
pattern: ':user/:repo/:job',
namedParams: {
user: 'wpmgprostotema',
repo: 'voicetranscoder',
job: 'Linux',
},
{
title: 'AppVeyor Job branch',
pattern: ':user/:repo/:job/:branch',
namedParams: {
user: 'wpmgprostotema',
repo: 'voicetranscoder',
job: 'Windows',
branch: 'master',
},
staticPreview: renderBuildStatusBadge({ status: 'success' }),
staticPreview: renderBuildStatusBadge({ status: 'success' }),
},
{
title: 'AppVeyor Job branch',
pattern: ':user/:repo/:job/:branch',
namedParams: {
user: 'wpmgprostotema',
repo: 'voicetranscoder',
job: 'Windows',
branch: 'master',
},
]
}
staticPreview: renderBuildStatusBadge({ status: 'success' }),
},
]
transform({ data, jobName }) {
if (!('build' in data)) {

View File

@@ -37,72 +37,68 @@ const commonPreviewProps = {
}
module.exports = class AppVeyorTests extends AppVeyorBase {
static get route() {
return {
...this.buildRoute('appveyor/tests'),
queryParamSchema: testResultQueryParamSchema,
}
static route = {
...this.buildRoute('appveyor/tests'),
queryParamSchema: testResultQueryParamSchema,
}
static get examples() {
return [
{
title: 'AppVeyor tests',
pattern: ':user/:repo',
namedParams: {
user: 'NZSmartie',
repo: 'coap-net-iu0to',
},
staticPreview: this.render(commonPreviewProps),
documentation,
static examples = [
{
title: 'AppVeyor tests',
pattern: ':user/:repo',
namedParams: {
user: 'NZSmartie',
repo: 'coap-net-iu0to',
},
{
title: 'AppVeyor tests (branch)',
pattern: ':user/:repo/:branch',
namedParams: {
user: 'NZSmartie',
repo: 'coap-net-iu0to',
branch: 'master',
},
staticPreview: this.render(commonPreviewProps),
documentation,
staticPreview: this.render(commonPreviewProps),
documentation,
},
{
title: 'AppVeyor tests (branch)',
pattern: ':user/:repo/:branch',
namedParams: {
user: 'NZSmartie',
repo: 'coap-net-iu0to',
branch: 'master',
},
{
title: 'AppVeyor tests (compact)',
pattern: ':user/:repo',
namedParams: {
user: 'NZSmartie',
repo: 'coap-net-iu0to',
},
queryParams: { compact_message: null },
staticPreview: this.render({
...commonPreviewProps,
isCompact: true,
}),
documentation,
staticPreview: this.render(commonPreviewProps),
documentation,
},
{
title: 'AppVeyor tests (compact)',
pattern: ':user/:repo',
namedParams: {
user: 'NZSmartie',
repo: 'coap-net-iu0to',
},
{
title: 'AppVeyor tests with custom labels',
pattern: ':user/:repo',
namedParams: {
user: 'NZSmartie',
repo: 'coap-net-iu0to',
},
queryParams: {
passed_label: 'good',
failed_label: 'bad',
skipped_label: 'n/a',
},
staticPreview: this.render({
...commonPreviewProps,
passedLabel: 'good',
failedLabel: 'bad',
skippedLabel: 'n/a',
}),
documentation,
queryParams: { compact_message: null },
staticPreview: this.render({
...commonPreviewProps,
isCompact: true,
}),
documentation,
},
{
title: 'AppVeyor tests with custom labels',
pattern: ':user/:repo',
namedParams: {
user: 'NZSmartie',
repo: 'coap-net-iu0to',
},
]
}
queryParams: {
passed_label: 'good',
failed_label: 'bad',
skipped_label: 'n/a',
},
staticPreview: this.render({
...commonPreviewProps,
passedLabel: 'good',
failedLabel: 'bad',
skippedLabel: 'n/a',
}),
documentation,
},
]
static get defaultBadgeData() {
return {

View File

@@ -1,7 +1,7 @@
'use strict'
const queryString = require('querystring')
const Joi = require('@hapi/joi')
const Joi = require('joi')
const t = (module.exports = require('../tester').createServiceTester())
const isAppveyorTestTotals = Joi.string().regex(

View File

@@ -1,6 +1,6 @@
'use strict'
const Joi = require('@hapi/joi')
const Joi = require('joi')
const { renderVersionBadge } = require('../version')
const { BaseJsonService } = require('..')
@@ -9,34 +9,25 @@ const schema = Joi.object({
}).required()
module.exports = class ArchLinux extends BaseJsonService {
static get category() {
return 'version'
static category = 'version'
static route = {
base: 'archlinux/v',
pattern: ':repository/:architecture/:packageName',
}
static get route() {
return {
base: 'archlinux/v',
pattern: ':repository/:architecture/:packageName',
}
}
static get examples() {
return [
{
title: 'Arch Linux package',
namedParams: {
architecture: 'x86_64',
repository: 'core',
packageName: 'pacman',
},
staticPreview: renderVersionBadge({ version: '5.1.3' }),
static examples = [
{
title: 'Arch Linux package',
namedParams: {
architecture: 'x86_64',
repository: 'core',
packageName: 'pacman',
},
]
}
staticPreview: renderVersionBadge({ version: '5.1.3' }),
},
]
static get defaultBadgeData() {
return { label: 'arch linux' }
}
static defaultBadgeData = { label: 'arch linux' }
async handle({ repository, architecture, packageName }) {
const data = await this._requestJson({

View File

@@ -1,6 +1,6 @@
'use strict'
const Joi = require('@hapi/joi')
const Joi = require('joi')
const { floorCount: floorCountColor } = require('../color-formatters')
const { addv, metric } = require('../text-formatters')
const { nonNegativeInteger } = require('../validators')
@@ -25,9 +25,7 @@ const aurSchema = Joi.object({
}).required()
class BaseAurService extends BaseJsonService {
static get defaultBadgeData() {
return { label: 'aur' }
}
static defaultBadgeData = { label: 'aur' }
static _validate(data, schema) {
if (data.resultcount === 0) {
@@ -51,30 +49,18 @@ class BaseAurService extends BaseJsonService {
}
class AurLicense extends BaseAurService {
static get category() {
return 'license'
}
static category = 'license'
static route = { base: 'aur/license', pattern: ':packageName' }
static get route() {
return {
base: 'aur/license',
pattern: ':packageName',
}
}
static examples = [
{
title: 'AUR license',
namedParams: { packageName: 'android-studio' },
staticPreview: this.render({ license: 'Apache' }),
},
]
static get examples() {
return [
{
title: 'AUR license',
namedParams: { packageName: 'android-studio' },
staticPreview: this.render({ license: 'Apache' }),
},
]
}
static get defaultBadgeData() {
return { label: 'license' }
}
static defaultBadgeData = { label: 'license' }
static render({ license }) {
return { message: license, color: 'blue' }
@@ -97,30 +83,19 @@ class AurLicense extends BaseAurService {
}
class AurVotes extends BaseAurService {
static get category() {
return 'rating'
}
static category = 'rating'
static get route() {
return {
base: 'aur/votes',
pattern: ':packageName',
}
}
static route = { base: 'aur/votes', pattern: ':packageName' }
static get examples() {
return [
{
title: 'AUR votes',
namedParams: { packageName: 'dropbox' },
staticPreview: this.render({ votes: '2280' }),
},
]
}
static examples = [
{
title: 'AUR votes',
namedParams: { packageName: 'dropbox' },
staticPreview: this.render({ votes: '2280' }),
},
]
static get defaultBadgeData() {
return { label: 'votes' }
}
static defaultBadgeData = { label: 'votes' }
static render({ votes }) {
return {
@@ -136,26 +111,17 @@ class AurVotes extends BaseAurService {
}
class AurVersion extends BaseAurService {
static get category() {
return 'version'
}
static category = 'version'
static get route() {
return {
base: 'aur/version',
pattern: ':packageName',
}
}
static route = { base: 'aur/version', pattern: ':packageName' }
static get examples() {
return [
{
title: 'AUR version',
namedParams: { packageName: 'visual-studio-code-bin' },
staticPreview: this.render({ version: '1.34.0-2', outOfDate: null }),
},
]
}
static examples = [
{
title: 'AUR version',
namedParams: { packageName: 'visual-studio-code-bin' },
staticPreview: this.render({ version: '1.34.0-2', outOfDate: null }),
},
]
static render({ version, outOfDate }) {
const color = outOfDate === null ? 'blue' : 'orange'
@@ -172,30 +138,19 @@ class AurVersion extends BaseAurService {
}
class AurMaintainer extends BaseAurService {
static get category() {
return 'other'
}
static category = 'other'
static get route() {
return {
base: 'aur/maintainer',
pattern: ':packageName',
}
}
static route = { base: 'aur/maintainer', pattern: ':packageName' }
static get examples() {
return [
{
title: 'AUR maintainer',
namedParams: { packageName: 'google-chrome' },
staticPreview: this.render({ maintainer: 'luzifer' }),
},
]
}
static examples = [
{
title: 'AUR maintainer',
namedParams: { packageName: 'google-chrome' },
staticPreview: this.render({ maintainer: 'luzifer' }),
},
]
static get defaultBadgeData() {
return { label: 'maintainer', color: 'blue' }
}
static defaultBadgeData = { label: 'maintainer', color: 'blue' }
static render({ maintainer }) {
return { message: maintainer }

18
services/aur/aur.spec.js Normal file
View File

@@ -0,0 +1,18 @@
'use strict'
const { test, given } = require('sazerac')
const { AurVersion } = require('./aur.service')
describe('AurVersion', function () {
test(AurVersion.render, () => {
given({ version: '1:1.1.42.622-1', outOfDate: 1 }).expect({
color: 'orange',
message: 'v1:1.1.42.622-1',
})
given({ version: '7', outOfDate: null }).expect({
color: 'blue',
message: 'v7',
})
})
})

View File

@@ -22,14 +22,6 @@ t.create('version (valid)')
color: 'blue',
})
t.create('version (valid, out of date)')
.get('/version/gog-gemini-rue.json')
.expectBadge({
label: 'aur',
message: isVPlusDottedVersionNClausesWithOptionalSuffix,
color: 'orange',
})
t.create('version (not found)')
.get('/version/not-a-package.json')
.expectBadge({ label: 'aur', message: 'package not found' })

View File

@@ -1,6 +1,6 @@
'use strict'
const Joi = require('@hapi/joi')
const Joi = require('joi')
const { BaseJsonService, NotFound } = require('..')
const latestBuildSchema = Joi.object({

View File

@@ -1,6 +1,6 @@
'use strict'
const Joi = require('@hapi/joi')
const Joi = require('joi')
const { renderBuildStatusBadge } = require('../build-status')
const { BaseSvgScrapingService, NotFound } = require('..')
const { keywords, fetch } = require('./azure-devops-helpers')
@@ -34,76 +34,70 @@ const documentation = `
`
module.exports = class AzureDevOpsBuild extends BaseSvgScrapingService {
static get category() {
return 'build'
static category = 'build'
static route = {
base: 'azure-devops/build',
pattern: ':organization/:projectId/:definitionId/:branch*',
queryParamSchema,
}
static get route() {
return {
base: 'azure-devops/build',
pattern: ':organization/:projectId/:definitionId/:branch*',
queryParamSchema,
}
}
static get examples() {
return [
{
title: 'Azure DevOps builds',
pattern: ':organization/:projectId/:definitionId',
namedParams: {
organization: 'totodem',
projectId: '8cf3ec0e-d0c2-4fcd-8206-ad204f254a96',
definitionId: '2',
},
staticPreview: renderBuildStatusBadge({ status: 'succeeded' }),
keywords,
documentation,
static examples = [
{
title: 'Azure DevOps builds',
pattern: ':organization/:projectId/:definitionId',
namedParams: {
organization: 'totodem',
projectId: '8cf3ec0e-d0c2-4fcd-8206-ad204f254a96',
definitionId: '2',
},
{
title: 'Azure DevOps builds (branch)',
pattern: ':organization/:projectId/:definitionId/:branch',
namedParams: {
organization: 'totodem',
projectId: '8cf3ec0e-d0c2-4fcd-8206-ad204f254a96',
definitionId: '2',
branch: 'master',
},
staticPreview: renderBuildStatusBadge({ status: 'succeeded' }),
keywords,
documentation,
staticPreview: renderBuildStatusBadge({ status: 'succeeded' }),
keywords,
documentation,
},
{
title: 'Azure DevOps builds (branch)',
pattern: ':organization/:projectId/:definitionId/:branch',
namedParams: {
organization: 'totodem',
projectId: '8cf3ec0e-d0c2-4fcd-8206-ad204f254a96',
definitionId: '2',
branch: 'master',
},
{
title: 'Azure DevOps builds (stage)',
namedParams: {
organization: 'totodem',
projectId: '8cf3ec0e-d0c2-4fcd-8206-ad204f254a96',
definitionId: '5',
},
queryParams: {
stage: 'Successful Stage',
},
staticPreview: renderBuildStatusBadge({ status: 'succeeded' }),
keywords,
documentation,
staticPreview: renderBuildStatusBadge({ status: 'succeeded' }),
keywords,
documentation,
},
{
title: 'Azure DevOps builds (stage)',
namedParams: {
organization: 'totodem',
projectId: '8cf3ec0e-d0c2-4fcd-8206-ad204f254a96',
definitionId: '5',
},
{
title: 'Azure DevOps builds (job)',
namedParams: {
organization: 'totodem',
projectId: '8cf3ec0e-d0c2-4fcd-8206-ad204f254a96',
definitionId: '5',
},
queryParams: {
stage: 'Successful Stage',
job: 'Successful Job',
},
staticPreview: renderBuildStatusBadge({ status: 'succeeded' }),
keywords,
documentation,
queryParams: {
stage: 'Successful Stage',
},
]
}
staticPreview: renderBuildStatusBadge({ status: 'succeeded' }),
keywords,
documentation,
},
{
title: 'Azure DevOps builds (job)',
namedParams: {
organization: 'totodem',
projectId: '8cf3ec0e-d0c2-4fcd-8206-ad204f254a96',
definitionId: '5',
},
queryParams: {
stage: 'Successful Stage',
job: 'Successful Job',
},
staticPreview: renderBuildStatusBadge({ status: 'succeeded' }),
keywords,
documentation,
},
]
async handle(
{ organization, projectId, definitionId, branch },

Some files were not shown because too many files have changed in this diff Show More