* [PyPI] Fix license for packages following PEP 639
PEP 639 states that the preferred way of documenting a Python project's
license is an SPDX expression in a `License-Expression` metadata field.
PyPI exposes this information in `info.license_expression` in its JSON
data.
Fixes: #11000
* add license_expression to pypi response schema
* move comments inline into the relevant blocks
* assign both license and license_expression to intermediate variables
* always pass a license_expression in test input objects
---------
Co-authored-by: chris48s <git@chris-shaw.dev>
* [sourceforge] update commit count service to support repo param
follow-up to #10935
sourceforge commit count also requires the new repo param for some projects.
* [sourceforge] add redirector for legacy commit count URLs
* fix missing openapi path
* [sourceforge] add repo param to last commit service
some sourceforge projects have multiple repositories, so we need to
specify the repository to use for the last commit service.
* [sourceforge] add redirect for old project param only URLs
* feat: pass matching mime type to xmldom
If the `Content-Type` header contains one of the mime types supported by `DOMParser`, the first matching mime type will be used instead of `text/xml`.
The default is still `text/xml` for cases when the header is not present or none of the mime types from the list are present.
* factor out and add tests
---------
Co-authored-by: chris48s <git@chris-shaw.dev>
* update ESLint related packages
* migrate to flat config format
* Fix prefer-const error
Fixes
'overrideLogoSize' is never reassigned. Use 'const' instead
* remove irrelevant eslint-disable comment
These comments came from a swizzled upstream
component but never did anything in our codebase.
ESLint 9 does not allow disable comments
for rules that are not registered.
* remove irrelevant eslint-disable comments
These were here because in the past we were applying
mocha lint rules to files which contained no tests
ESLint 9 now flags eslint-disable comments
that aren't doing anythings
* remove irrelevant eslint-disable comment
ESLint 9 now flags eslint-disable comments
that aren't doing anything
* there are no .tsx files in our code any more
* include .mjs files in linting and formatting
* update sort-class-members rule for openApi property
and update the handful of files violating it
* Add Coderabbit PR Stats service and tests
- Implemented a new service `CoderabbitStats` to fetch and display pull request statistics from the CodeRabbit API.
- Created a corresponding tester file to validate the service's functionality, including tests for valid repositories, repository not found, and server errors.
- The service returns a badge with the number of PRs and appropriate error messages based on the API response.
This addition enhances the analysis capabilities of the application by integrating CodeRabbit statistics.
* Refactor CoderabbitStats service to track reviews instead of PRs
- Updated the service to fetch and display the number of reviews from the CodeRabbit API, changing the schema and badge labels accordingly.
- Modified the tester file to reflect the new endpoint and expected responses, including regex for message validation.
- Enhanced error handling in the service to return more descriptive error messages for invalid repositories and server errors.
This change improves the accuracy of the statistics provided by the service, aligning it with the intended functionality of tracking reviews.
* Enhance CodeRabbitStats service and tests
- Updated the CodeRabbitStats service to include OpenAPI documentation and improved error handling for repository not found scenarios.
- Changed badge label from 'CodeRabbit' to 'CodeRabbit Reviews' for clarity.
- Modified the tester file to reflect the new badge format and error messages, ensuring consistency with the service updates.
- Adjusted regex patterns for message validation in tests.
These changes improve the usability and accuracy of the CodeRabbit statistics service.
* Update services/coderabbit/coderabbit-stats.tester.js
Co-authored-by: jNullj <15849761+jNullj@users.noreply.github.com>
* Addressed codereview comments, changed tests.
* Fix label casing in CodeRabbitStats service and tests
* Update services/coderabbit/coderabbit-stats.service.js
Co-authored-by: chris48s <chris48s@users.noreply.github.com>
* Update CodeRabbitStats service and tests to improve error messaging
- Changed example section in CodeRabbitStats service from 'github, gitlab, bitbucket' to 'github' as per review comment.
- Updated error message for 404 response to 'provider or repo not found', to reflect the right code.
* Added github, gitlab, bitbucket to provider.
* Changing names to match the service name, removing unneeded test.
---------
Co-authored-by: jNullj <15849761+jNullj@users.noreply.github.com>
Co-authored-by: chris48s <chris48s@users.noreply.github.com>
* add Reproducible Central in Dependencies
* first updates based on feedback
* use new artifact-level json data = map version -> RB result
* fix unit tests
* improve code with provided snippets: thank you
* add description
* add renderSizeBadge helper, use it everywhere
- switch from pretty-bytes to byte-size
- add renderSizeBadge() helper function
- match upstream conventions for metric/IEC units
- add new test helpers and use them in service tests
* unrelated: fix npm unpacked size query param schema
not strictly related to this PR
but I noticed it was broken
* chromewebstore: reformat size string, test against isIecFileSize
* remove obsolete test for version without size
changes upstream removed all null crate_size
see also rust-lang/crates.io#9926
* remove null handling in CratesSize service
* 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.