* Update docker version tester to check Python instead of Memcached
Memcached tags don't follow semver, might fail depending on which tag was last added.
Python seems to follow semver for all tags.
fixes#10689
* Update docker version tester to check docker-dev instead of python
its a depricated image and is not expected to change tags
tag is semver
* Update docker version tester to check example-voting-app-vote
deprecated yet by docker, i think we can count on that to be stable
* 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
* feat: add forcePrerelease option to renderVersionBadge function
Sometimes API would indicate if a version is pre-release while the version number does not have to be semantically a prerelease like in github-release service.
We don't use a isPrerelease that can also force a non-preleases as we trust here developer semantic over API tagging.
* refactor: GithubRelease to use renderVersionBadge
* refactor: GithubTag use renderVersionBadge
* refactor: change forcePrerelease to isPrerelease
* fix failing test 'Locked version of VCS dependency'
replaced tested package which is missing with another example
* Add regex validator for commit hash format
* fix vcs dependency test to use pipenv's pypiserver
* feat: add winget version badge
* chore: accept dotted path instead of slashed
* test: add test for winget-version
* fix: remove debug code
* chore: use winget-specific version compare algorithm
* fix: support latest and unknown
* fix(winget/version): trailing '.0' handling is incorrect
* fix(winget/version): latest returns last newest version instead of the first newest version
* fix(winget/version): confusing subpackage and version name
* fix(winget/version): example for latest is incorrect
* add a couple of extra test cases for latest()
---------
Co-authored-by: chris48s <git@chris-shaw.dev>
* Added npm last update badge
* extended NpmBase class instead of BaseJsonService.
* added scoped packages to last update.
* introduced additionalQueryParamSchema
this is to add other query params schema, other than the one present in NpmBase.
* removed version query param
* in absence of modified date, it'll fetch created.
* removed version query param.
* added dist-tags.
* Update services/npm/npm-last-update.service.js
Co-authored-by: jNullj <15849761+jNullj@users.noreply.github.com>
* refactored handle method for dist-tags.
* Update services/npm/npm-last-update.service.js
Co-authored-by: chris48s <chris48s@users.noreply.github.com>
* added date validation check.
* added date validation check.
* added date validation check.
---------
Co-authored-by: jNullj <15849761+jNullj@users.noreply.github.com>
Co-authored-by: chris48s <chris48s@users.noreply.github.com>
* 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
* scoop-license service is added.
* refactored scoop badges - added scoop base
* refactor - description changed to base class.
* refactor - description changed to base class.
* Update services/scoop/scoop-license.tester.js
Co-authored-by: jNullj <15849761+jNullj@users.noreply.github.com>
* refactor - buckets variable is moved to base class, also updated tester with createTestService.
* moved queryParamSchema to base class.
---------
Co-authored-by: jNullj <15849761+jNullj@users.noreply.github.com>
HackageDeps will allways return a landing page with 200 and no text about outdated packages.
The site is down and looking for someone to take over.
Therefor api information is false and non functional.
* add jsdoc for crates fetch func
* add BaseCratesUserService for user stats api route
part of solution for #10614
* Add CratesUserDownloads service and tester
This commit adds the CratesUserDownloads service and tester files. The CratesUserDownloads service shows the user total downloads at Crates.io.
as requested by #10614
* render userid in code block
* add non-exsistent user CratesUserDownloads test
userid for API usage is int32, therefor to minimize chance of user taking the id used the max value for int32 is used.
* fixed typo
* use defaultLabel in renderVersionBadge without tag
As we refactor the codebase to use renderVersionBadge.
some badges need to show default label regardless of tag existance.
This is usefull for cases where the label is dynamic.
This change requires fixing test for npm, not sure how it worked before.
* Refactor AurVersion to use renderVersionBadge
part of #2026
* Refactor CondaVersion to use renderVersionBadge
part of #2026
* Refactor WordpressRequiresVersion to use renderVersionBadge
* add postfix option to renderVersionBadge
* add missing tests for renderVersionBadge
add defaultLabel without tag test
add postfix test
add test for all options together
* Refactor WordpressPluginTestedVersion to use renderVersionBadge
* add prefix override to renderVersionBadge
adds tests for all options with prefix as well
used for #2026 but also usefull for usage letting people override v prefix for versions all over the project once #2026 is done as requested for example in #10574
* Refactor RequiresPHPVersionForType to use renderVersionBadge
use iptables as its a stable long term package that uses more standard version numbers
archlinux uses upstream versions which makes version regex for tests hard to predict
* Added badge for Maven-Cenral last update.
* Update services/maven-central/maven-central-last-update.service.js
Co-authored-by: chris48s <chris48s@users.noreply.github.com>
* updated according to the review comments.
* added Snapcraft last updated badges.
* made changes according to the review.
---------
Co-authored-by: chris48s <chris48s@users.noreply.github.com>
* 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.
* Added badge for Maven-Cenral last update.
* Update services/maven-central/maven-central-last-update.service.js
Co-authored-by: chris48s <chris48s@users.noreply.github.com>
* updated according to the review comments.
---------
Co-authored-by: chris48s <chris48s@users.noreply.github.com>
* Add snapcraft license. Update snapcraft version to inherit from snapcraft-base class. Add snapcraft base url in configurations.
* Fix spec tests after making method static
* remove snapcraft configurations, move into base class
* Update services/snapcraft/snapcraft-base.js
---------
Co-authored-by: chris48s <chris48s@users.noreply.github.com>
* add file_url param
Add file_url param to allow pulling from non-github sources
* add test for file_url param
Add test using file_url variant of OSS Lifecycle badge using Netflix OSSTracker repo
* remove old pattern from main service
Remove all references and code for the old /{user}/{repo} and /{user}/{repo}/{branch} functionality.
This will be replaced by a redirect service.
Also updated all tests to use the new file_url method
* add osslifecycle redirector
add a redirector for the original osslifecycle pattern
* tweaks to docs and handle function
Tweak the Description to remove reference to GitHub as now works with any repository,
and updated handle function to remove reference to unused variables.
* add some basic tests for size badge
* add crate size to crates fetch
* add crate size service
* change test to reflect base-10 counting instead
* fix downloads tests to work with new crate_size scheme addition
* move handling of unknown size to handle