* add and consistently use parseDate and renderDateBadge helpers
also move
- age
- formatDate
- formatRelativeDate
to date.js
* fix bug in wordpress last update badge
* validate in formatDate() and age()
it is going to be unlikely we'll invoke either of these
directly now, but lets calidate here too
* remove unusued imports
* reverse colours for galaxy toolshed
* Refactor luarocks to use renderVersionBadge
Loarocks does not appear to have version conventions and there are no issues in history that require usage of existing color usage.
For better consistency use color scheme as the rest of the badges.
Also add scm and cvs as preview in renderVersionBadge
* add missing test for version color formatter
* refactor nuget to use renderVersionBadge
* Refactor GitlabTag to use renderVersionBadge
* add comment about non-standard render of coljarsVersion
* Refactor FeedzVersionService to use renderVersionBadge from version.js
* Refactor nuget.tester.js to remove unnecessary version tests
* add missing label in gitlab-tag.spec
* init GithubCreatedAt service
* render raw created_at
* impl formatted date
* add color
* add test for absent repo
* add `reversed` parameter to `age` color formatter
* inverse the colors of the badge
---------
Co-authored-by: Studio <studio@192.168.1.20>
This moves a few helpers from `lib/` to `services/`:
build-status.js
build-status.spec.js
color-formatters.js
color-formatters.spec.js
contributor-count.js
licenses.js
licenses.spec.js
php-version.js
php-version.spec.js
text-formatters.js
text-formatters.spec.js
version.js
version.spec.js
And one from `lib/` to `core/`:
unhandled-rejection.spec.js
The diff is long, but the changes are straightforward.
Ref #2832