Commit Graph

11 Commits

Author SHA1 Message Date
chris48s
5cdef88bcc Add renderDateBadge helper; affects [aur BitbucketLastCommit chrome date eclipse factorio galaxytoolshed GiteaLastCommit GistLastCommit GithubCreatedAt GithubHacktoberfest GithubIssueDetail GithubLastCommit GithubReleaseDate GitlabLastCommit maven npm openvsx snapcraft SourceforgeLastCommit steam vaadin visualstudio wordpress] (#10682)
* 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
2024-11-17 13:15:28 +00:00
jNullj
f767fabf43 remove prefix v for commit hash version (#10597)
* addv ignore commit hash

some services might return version as a commit hash like aur.
it makes no sense to prefix v before the commit.

Fixes #10591

* add addv commit hash tests

add both full commit hash and short commit hash tests to addv.
expected result - no v prefix.
2024-10-12 09:21:27 +00:00
Prashant Rawat
da615eeef7 add docstrings for text-formatters service (#9188)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2023-05-20 19:18:06 +00:00
chris48s
8f4662bd0b fix formatRelativeDate error handling; run [date] (#8497)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-10-08 10:43:29 +00:00
Jonah Lawrence
e8686395b1 refactor(deps): Replace moment with dayjs (#8192) 2022-07-14 20:34:38 -05:00
Tapan Chudasama
9069459435 [HackerNews] Show User Karma (#7411)
hackernews: add hn user karma badge
2021-12-28 20:12:00 +00:00
Pierre-Yves B
23c0406bed Migrate from CommonJS to ESM (#6651) 2021-07-09 12:53:55 +01:00
François Hodierne
0d8a2d5ca0 Update to eslint 6.8.0 [appveyor githubissuedetail packagist] (#4489)
* update to eslint 6.8.0 and related packages

* Fixes for no-prototype-builtins

* Updates for explicit-function-return-type

* Add ignores for no-explicit-any

* update to eslint 6.8.0 and related packages

* Fixes for no-prototype-builtins

* Updates for explicit-function-return-type

* Add ignores for no-explicit-any

* package: activate eslint-config-standard

* apply updated eslint configuration

* lint: apply eslint feedback after rebase

* Update lockfile

* Update lockfile

* Restore missing deps

* Update lockfile

* Re-add eslint-plugin-node

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

* Clean lint

Co-authored-by: Paul Melnikow <github@paulmelnikow.com>
2020-02-29 11:06:36 -06:00
Pierre-Yves B
3dbe655611 Display one decimal for metrics smaller than 10 (#3735)
* Display one decimal for metrics smaller than 10

* Update test validators

* Run Prettier

* Update GitHub regexes
2019-07-17 20:00:29 +01:00
Paul Melnikow
388b0eefbb Add query param validation to remaining new-style services [azuredevops appveyor npm] (#3164)
Remove now-obsolete code.

Close #2675
2019-03-06 18:13:36 -05:00
Paul Melnikow
fafb22efee Move "good" badge helpers from lib/ to services/ (#3101)
This moves a few helpers from `lib/` to `services/`:

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

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

unhandled-rejection.spec.js

The diff is long, but the changes are straightforward.

Ref #2832
2019-02-27 20:47:46 -05:00