Paul Melnikow and GitHub
0db88d33e0
Add debug logging to BaseService and BaseJsonService ( #1867 )
...
Invoke this using `npm run test:services:trace`.
2018-08-10 15:22:13 -04:00
Paul Melnikow and GitHub
ada1dec815
Lengthen timeout on a flaky service test ( #1885 )
2018-08-10 15:10:31 -04:00
dependabot[bot] and Paul Melnikow
2ebb173a62
Bump simple-icons from 1.7.1 to 1.8.3 ( #1877 )
...
Bumps [simple-icons](https://github.com/simple-icons/simple-icons ) from 1.7.1 to 1.8.3.
- [Release notes](https://github.com/simple-icons/simple-icons/releases )
- [Commits](https://github.com/simple-icons/simple-icons/commits )
Signed-off-by: dependabot[bot] <support@dependabot.com >
2018-08-10 13:33:17 -04:00
dependabot[bot] and chris48s
be8fbc2308
Bump babel-eslint from 8.0.2 to 8.2.6 ( #1878 )
...
Bumps [babel-eslint](https://github.com/babel/babel-eslint ) from 8.0.2 to 8.2.6.
- [Release notes](https://github.com/babel/babel-eslint/releases )
- [Commits](https://github.com/babel/babel-eslint/compare/v8.0.2...v8.2.6 )
Signed-off-by: dependabot[bot] <support@dependabot.com >
2018-08-10 12:38:16 +01:00
dependabot[bot] and chris48s
049530c7a9
Bump node-fetch from 2.0.0 to 2.2.0 ( #1873 )
...
Bumps [node-fetch](https://github.com/bitinn/node-fetch ) from 2.0.0 to 2.2.0.
- [Release notes](https://github.com/bitinn/node-fetch/releases )
- [Changelog](https://github.com/bitinn/node-fetch/blob/master/CHANGELOG.md )
- [Commits](https://github.com/bitinn/node-fetch/compare/v2.0.0...v2.2.0 )
Signed-off-by: dependabot[bot] <support@dependabot.com >
2018-08-10 12:36:26 +01:00
dependabot[bot] and chris48s
96be0a94f9
Bump joi from 13.3.0 to 13.5.2 ( #1879 )
...
Bumps [joi](https://github.com/hapijs/joi ) from 13.3.0 to 13.5.2.
- [Release notes](https://github.com/hapijs/joi/releases )
- [Changelog](https://github.com/hapijs/joi/blob/master/CHANGELOG.md )
- [Commits](https://github.com/hapijs/joi/compare/v13.3.0...v13.5.2 )
Signed-off-by: dependabot[bot] <support@dependabot.com >
2018-08-10 12:34:32 +01:00
dependabot[bot] and chris48s
872fbf68b0
Bump eslint from 5.2.0 to 5.3.0 ( #1876 )
...
Bumps [eslint](https://github.com/eslint/eslint ) from 5.2.0 to 5.3.0.
- [Release notes](https://github.com/eslint/eslint/releases )
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md )
- [Commits](https://github.com/eslint/eslint/compare/v5.2.0...v5.3.0 )
Signed-off-by: dependabot[bot] <support@dependabot.com >
2018-08-10 12:29:13 +01:00
dependabot[bot] and chris48s
1640ff98c2
Bump sinon from 6.1.4 to 6.1.5 ( #1875 )
...
Bumps [sinon](https://github.com/sinonjs/sinon ) from 6.1.4 to 6.1.5.
- [Release notes](https://github.com/sinonjs/sinon/releases )
- [Changelog](https://github.com/sinonjs/sinon/blob/master/docs/changelog.md )
- [Commits](https://github.com/sinonjs/sinon/compare/v6.1.4...v6.1.5 )
Signed-off-by: dependabot[bot] <support@dependabot.com >
2018-08-10 12:28:31 +01:00
Paul Melnikow and GitHub
27170f85fc
Rm greenkeeper config ( #1871 )
2018-08-09 11:07:14 -04:00
dependabot[bot] and Paul Melnikow
fabc9f2b41
Bump nock from 9.3.2 to 9.5.0 ( #1865 )
...
Bumps [nock](https://github.com/nock/nock ) from 9.3.2 to 9.5.0.
- [Release notes](https://github.com/nock/nock/releases )
- [Changelog](https://github.com/nock/nock/blob/master/CHANGELOG.md )
- [Commits](https://github.com/nock/nock/compare/v9.3.2...v9.5.0 )
Signed-off-by: dependabot[bot] <support@dependabot.com >
2018-08-09 10:34:10 -04:00
dependabot[bot] and Paul Melnikow
8d669385e1
Bump classnames from 2.2.5 to 2.2.6 ( #1850 )
...
Bumps [classnames](https://github.com/JedWatson/classnames ) from 2.2.5 to 2.2.6.
- [Release notes](https://github.com/JedWatson/classnames/releases )
- [Changelog](https://github.com/JedWatson/classnames/blob/master/HISTORY.md )
- [Commits](https://github.com/JedWatson/classnames/commits )
Signed-off-by: dependabot[bot] <support@dependabot.com >
2018-08-09 10:00:40 -04:00
dependabot[bot] and Paul Melnikow
c7851e2d38
Bump prop-types from 15.6.0 to 15.6.2 ( #1851 )
...
Bumps [prop-types](https://github.com/facebook/prop-types ) from 15.6.0 to 15.6.2.
- [Release notes](https://github.com/facebook/prop-types/releases )
- [Changelog](https://github.com/facebook/prop-types/blob/master/CHANGELOG.md )
- [Commits](https://github.com/facebook/prop-types/commits/v15.6.2 )
Signed-off-by: dependabot[bot] <support@dependabot.com >
2018-08-09 09:59:02 -04:00
dependabot[bot] and Paul Melnikow
72d017d9ad
Bump query-string from 6.0.0 to 6.1.0 ( #1853 )
...
Bumps [query-string](https://github.com/sindresorhus/query-string ) from 6.0.0 to 6.1.0.
- [Release notes](https://github.com/sindresorhus/query-string/releases )
- [Commits](https://github.com/sindresorhus/query-string/compare/v6.0.0...v6.1.0 )
Signed-off-by: dependabot[bot] <support@dependabot.com >
2018-08-09 09:53:32 -04:00
dependabot[bot] and Paul Melnikow
efe639a0c7
Bump js-yaml from 3.11.0 to 3.12.0 ( #1860 )
...
Bumps [js-yaml](https://github.com/nodeca/js-yaml ) from 3.11.0 to 3.12.0.
- [Release notes](https://github.com/nodeca/js-yaml/releases )
- [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md )
- [Commits](https://github.com/nodeca/js-yaml/compare/3.11.0...3.12.0 )
Signed-off-by: dependabot[bot] <support@dependabot.com >
2018-08-09 09:52:44 -04:00
dependabot[bot] and Paul Melnikow
68e6ed9d5a
Bump prettier from 1.14.0 to 1.14.2 ( #1869 )
...
Bumps [prettier](https://github.com/prettier/prettier ) from 1.14.0 to 1.14.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/1.14.0...1.14.2 )
Signed-off-by: dependabot[bot] <support@dependabot.com >
2018-08-09 09:47:07 -04:00
Paul Melnikow and GitHub
8af48c0a21
Minor tweaks in [github] auth code ( #1862 )
...
* Move / rework is-valid-token
* TokenPool: Add allValidTokenIds method
* Minor cleanup in server.js
2018-08-09 07:22:54 -04:00
Paul Melnikow and GitHub
c11d97a192
Refactor [github] initialization ( #1861 )
...
This creates a new convenience class which consolidates all the Github initialization. It supports dependency injection and facilitates refactoring the persistence along the lines of #1205 .
Also ref #1848
2018-08-09 07:20:57 -04:00
Paul Melnikow and GitHub
7a664ca3e8
Run prettier ( #1866 )
...
Merging this separately so the commit with the tooling change is readable. This is a follow-on to #1167 which turned prettier on.
2018-08-08 17:57:14 -04:00
Paul Melnikow and GitHub
ab051b3804
Turn on prettier (except repo root) ( #1167 )
...
* Use prettier-check
* Update semi option
See discussion https://github.com/badges/shields/issues/948#issuecomment-349205606
* Developer documentation
* Run the same steps in both `main` jobs
* Move integration tests from `danger` to `main` where they belong
2018-08-08 17:49:06 -04:00
dependabot[bot] and Paul Melnikow
ff15e9bdab
Bump mocha from 5.0.0 to 5.2.0 ( #1864 )
...
Bumps [mocha](https://github.com/mochajs/mocha ) from 5.0.0 to 5.2.0.
- [Release notes](https://github.com/mochajs/mocha/releases )
- [Changelog](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md )
- [Commits](https://github.com/mochajs/mocha/compare/v5.0.0...v5.2.0 )
Signed-off-by: dependabot[bot] <support@dependabot.com >
2018-08-08 17:28:59 -04:00
Paul Melnikow and GitHub
e3b100504d
Add Joi-based request validation to BaseJsonService and rewrite [NPM] and [node] badges ( #1743 )
...
When JSON responses come back, they are sometimes not in the format expected by the API. As a result we have a lot of defensive coding (expressions like `(data || {}).someProperty`) to avoid exceptions being thrown in badge processing. Often we rely on the `try` blocks that wrap so much of the badge-processing code, which catch all JavaScript exceptions and return some error result, usually **invalid**. The problem with this is that these `try` blocks catch all sorts of programmer errors too, so when we see **invalid** we don't know whether the API returned something unexpected, or we've made a mistake. We also spend a lot of time writing defensive tests around malformed responses, and creating and maintaining the defensive coding.
A better solution is to validate the API responses using declarative contracts. Here the programmer says exactly what they expect from the API. That way, if the response isn't what we expect we can just say it's an **invalid json response**. And if our code then throws an exception, well that's our mistake; when we catch that we can call it a **shields internal error**. It's also less code and less error-prone. Over time we may be confident enough in the contracts that we won't need so many tests of malformed responses. The contract doesn't need to describe the entire response, only the part that's needed. Unknown keys can simply be dropped, preventing unvalidated parts of the response from creeping into the code. Checking what's in our response before calling values on it also makes our code more secure.
I used Joi here, since we're already using it for testing. There may be another contracts library that's a better fit, though I think we could look at that later.
Those changes are in base.js.
The rest is a rewrite of the remaining NPM badges, including the extraction of an NpmBase class. Inspired by @chris48s's work in #1740 , this class splits the service concerns into fetching, validation, transformation, and rendering. This is treated as a design pattern. See the PR discussion for more. There are two URL patterns, one which allows specifying a tag (used by e.g. the version badge `https://img.shields.io/npm/v/npm/next.svg `), and the other which does not accept a tag (e.g. the license badge `https://img.shields.io/npm/l/express.svg `). Subclasses like NpmLicense and NpmTypeDefinitions can specify the URL fragment, examples, the validation schema for the chunk of the package data they use, and a render function. The NpmVersion subclass uses a different endpoint, so it overrides the `handle` implementation from NpmBase.
The remaining services using BaseJsonService are shimmed, so they will keep working after the changes.
2018-08-08 17:08:16 -04:00
Pyves and GitHub
e1affea266
[GitHub] Fix undefined badges ( #1816 )
2018-08-08 20:57:57 +01:00
dependabot[bot] and Paul Melnikow
11cb3e3929
Bump danger from 3.8.3 to 3.8.4 ( #1857 )
...
Bumps [danger](https://github.com/danger/danger-js ) from 3.8.3 to 3.8.4.
- [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/3.8.3...3.8.4 )
Signed-off-by: dependabot[bot] <support@dependabot.com >
2018-08-07 23:28:11 -04:00
Paul Melnikow and GitHub
c7e28de025
Show test status on master, not latest build ( #1859 )
2018-08-07 23:27:35 -04:00
Paul Melnikow and GitHub
56fcb2e5ba
GithubApiProvider: injectible interface for code that calls github ( #1812 )
2018-08-07 16:46:12 -04:00
Pyves and Paul Melnikow
da403b7e3a
Increased default BADGE_MAX_AGE_SECONDS ( #1846 )
...
* Added note about default on website
2018-08-06 22:36:10 -04:00
chris48s and GitHub
7cd0cb65d7
don't run danger on dependabot PRs ( #1843 )
2018-08-04 22:53:29 +01:00
dependabot[bot] and chris48s
c69642a4e5
Bump eslint-plugin-react from 7.7.0 to 7.10.0 ( #1837 )
...
Bumps [eslint-plugin-react](https://github.com/yannickcr/eslint-plugin-react ) from 7.7.0 to 7.10.0.
- [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.7.0...v7.10.0 )
Signed-off-by: dependabot[bot] <support@dependabot.com >
2018-08-03 19:14:44 +01:00
dependabot[bot] and chris48s
e20ab7c412
Bump sinon from 6.0.0 to 6.1.4 ( #1832 )
...
Bumps [sinon](https://github.com/sinonjs/sinon ) from 6.0.0 to 6.1.4.
- [Release notes](https://github.com/sinonjs/sinon/releases )
- [Changelog](https://github.com/sinonjs/sinon/blob/master/docs/changelog.md )
- [Commits](https://github.com/sinonjs/sinon/compare/v6.0.0...v6.1.4 )
Signed-off-by: dependabot[bot] <support@dependabot.com >
2018-08-03 19:13:57 +01:00
dependabot[bot] and chris48s
4e5b6d077f
Bump concurrently from 3.5.1 to 3.6.1 ( #1835 )
...
Bumps [concurrently](https://github.com/kimmobrunfeldt/concurrently ) from 3.5.1 to 3.6.1.
- [Release notes](https://github.com/kimmobrunfeldt/concurrently/releases )
- [Commits](https://github.com/kimmobrunfeldt/concurrently/compare/3.5.1...3.6.1 )
Signed-off-by: dependabot[bot] <support@dependabot.com >
2018-08-03 19:12:54 +01:00
dependabot[bot] and chris48s
dee9524bd6
Bump check-node-version from 3.1.1 to 3.2.0 ( #1828 )
...
Bumps [check-node-version](https://github.com/parshap/check-node-version ) from 3.1.1 to 3.2.0.
- [Release notes](https://github.com/parshap/check-node-version/releases )
- [Changelog](https://github.com/parshap/check-node-version/blob/master/CHANGELOG.md )
- [Commits](https://github.com/parshap/check-node-version/compare/v3.1.1...v3.2.0 )
Signed-off-by: dependabot[bot] <support@dependabot.com >
2018-08-03 19:08:21 +01:00
dependabot[bot] and chris48s
89493f0eaf
Bump eslint-plugin-import from 2.9.0 to 2.13.0 ( #1836 )
...
Bumps [eslint-plugin-import](https://github.com/benmosher/eslint-plugin-import ) from 2.9.0 to 2.13.0.
- [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.9.0...v2.13.0 )
Signed-off-by: dependabot[bot] <support@dependabot.com >
2018-08-03 19:05:23 +01:00
dependabot[bot] and chris48s
672631a2d6
Bump eslint-plugin-promise from 3.6.0 to 3.8.0 ( #1829 )
...
Bumps [eslint-plugin-promise](https://github.com/xjamundx/eslint-plugin-promise ) from 3.6.0 to 3.8.0.
- [Release notes](https://github.com/xjamundx/eslint-plugin-promise/releases )
- [Changelog](https://github.com/xjamundx/eslint-plugin-promise/blob/master/CHANGELOG.md )
- [Commits](https://github.com/xjamundx/eslint-plugin-promise/compare/v3.6.0...v3.8.0 )
Signed-off-by: dependabot[bot] <support@dependabot.com >
2018-08-03 19:05:01 +01:00
dependabot[bot] and chris48s
258fdd0fbc
Bump sinon-chai from 3.0.0 to 3.2.0 ( #1830 )
...
Bumps [sinon-chai](https://github.com/domenic/sinon-chai ) from 3.0.0 to 3.2.0.
- [Release notes](https://github.com/domenic/sinon-chai/releases )
- [Commits](https://github.com/domenic/sinon-chai/compare/v3.0.0...v3.2.0 )
Signed-off-by: dependabot[bot] <support@dependabot.com >
2018-08-03 19:02:11 +01:00
chris48s and GitHub
cdce0b45e0
upgrade react and related dependencies ( #1840 )
2018-08-03 18:59:54 +01:00
Paul Melnikow and chris48s
5d102dabb3
Update several lockfile dependencies using npm audit fix ( #1833 )
2018-08-03 18:46:12 +01:00
Paul Melnikow and GitHub
2ff71dab6a
Start cleaning up github auth routes ( #1813 )
...
- Move github token debug route to separate module
- Use crypto.timingSafeEqual
- Rename getTokenDebugInfo -> serializeDebugInfo
2018-08-01 21:58:11 -04:00
dependabot[bot] and chris48s
2008623ba3
Bump gm from 1.23.0 to 1.23.1 ( #1821 )
...
Bumps [gm](https://github.com/aheckmann/gm ) from 1.23.0 to 1.23.1.
- [Release notes](https://github.com/aheckmann/gm/releases )
- [Changelog](https://github.com/aheckmann/gm/blob/master/History.md )
- [Commits](https://github.com/aheckmann/gm/compare/1.23.0...1.23.1 )
Signed-off-by: dependabot[bot] <support@dependabot.com >
2018-08-01 22:22:39 +01:00
dependabot[bot] and chris48s
dfdffa599c
Bump moment from 2.19.3 to 2.22.2 ( #1824 )
...
Bumps [moment](https://github.com/moment/moment ) from 2.19.3 to 2.22.2.
- [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.19.3...2.22.2 )
Signed-off-by: dependabot[bot] <support@dependabot.com >
2018-08-01 22:19:22 +01:00
dependabot[bot] and chris48s
d15250afcc
Bump danger from 3.7.14 to 3.8.3 ( #1822 )
...
Bumps [danger](https://github.com/danger/danger-js ) from 3.7.14 to 3.8.3.
- [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/commits/3.8.3 )
Signed-off-by: dependabot[bot] <support@dependabot.com >
2018-08-01 22:15:21 +01:00
dependabot[bot] and chris48s
e4af2d485c
Bump pretty-bytes from 5.0.0 to 5.1.0 ( #1825 )
...
Bumps [pretty-bytes](https://github.com/sindresorhus/pretty-bytes ) from 5.0.0 to 5.1.0.
- [Release notes](https://github.com/sindresorhus/pretty-bytes/releases )
- [Commits](https://github.com/sindresorhus/pretty-bytes/compare/v5.0.0...v5.1.0 )
Signed-off-by: dependabot[bot] <support@dependabot.com >
2018-08-01 22:11:06 +01:00
Danial and GitHub
317e19ea2a
Add support for simple-icons, colored icons with ?logoColor ( #1810 )
...
* add simple-icons
* handle undefined
* support logoColor param
* our icon > simple-icon
* dont crash ✅
* return false → undefined
* update test
* add test
* support logoColor on our logos
* cache as base64, pre-load-simple-icons, logo-helper
* add ?logoColor information
* and simple-icons reference, link to github master branch for our logos
* update simple-icons
update to 1.7.1
* Revert "and simple-icons reference, link to github master branch for our logos"
This reverts commit 5e99d5f8db .
* add link to simple-icons
* Add snapshot test
* support dash in place of space for logo name
2018-08-02 09:07:23 +12:00
greenkeeper[bot] and Paul Melnikow
8020ff00e3
Update eslint to the latest version 🚀 ( #1746 )
...
* Work around upstream issue https://github.com/standard/standard/issues/1156#issuecomment-400048419
2018-08-01 16:55:42 -04:00
Paul Melnikow and GitHub
7e04f25fc5
Tweak layout of services to conveniently handle large service families
2018-08-01 16:49:07 -04:00
chris48s and GitHub
df8877ac71
don't try to run greenkeeper-lockfile-upload in CI build ( #1819 )
2018-08-01 21:23:47 +01:00
chris48s and GitHub
7b10ba2f11
update dependabot tests ( #1820 )
2018-08-01 21:23:36 +01:00
chris48s and GitHub
901a7b8a43
Split front end into one page per category ( #1808 )
...
- Present 'downloads', 'version', etc as pages
- Don't show any badges on the index page,
just links to categories.
- Tweak search so we can search all badges
from the index page, but without rendering
every badge as soon as we press a key.
2018-08-01 21:02:55 +01:00
greenkeeper[bot] and Paul Melnikow
ca01b99e9f
Update prettier to the latest version 🚀 ( #1814 )
...
* chore(package): update prettier to version 1.14.0
* Update package-lock
2018-08-01 15:11:27 -04:00
Caleb Maclennan and Paul Melnikow
547ea162ab
Add Gitlab logo ( #1804 )
2018-08-01 14:49:00 -04:00
Pyves and GitHub
9335f607aa
[conda] Fixed wrong variable name ( #1817 )
2018-07-31 22:27:06 +01:00