1
0
mirror of https://github.com/badges/shields.git synced 2025-04-18 19:44:04 +03:00

[Packagist] Update default domain for repo metadata (#10920)

* Update default packagist domain for repo metadata

* prettier

---------

Co-authored-by: chris48s <git@chris-shaw.dev>
This commit is contained in:
Jordi Boggiano 2025-03-05 08:32:22 +01:00 committed by GitHub
parent 8a98824e5e
commit be9cdc2276
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -32,7 +32,7 @@ class BasePackagistService extends BaseJsonService {
* @param {string} attrs.server URL for the packagist registry server (Optional)
* @returns {object} Parsed response
*/
async fetch({ user, repo, schema, server = 'https://packagist.org' }) {
async fetch({ user, repo, schema, server = 'https://repo.packagist.org' }) {
const url = `${server}/p2/${user.toLowerCase()}/${repo.toLowerCase()}.json`
return this._requestJson({
@ -56,7 +56,12 @@ class BasePackagistService extends BaseJsonService {
* @param {string} attrs.server URL for the packagist registry server (Optional)
* @returns {object} Parsed response
*/
async fetchDev({ user, repo, schema, server = 'https://packagist.org' }) {
async fetchDev({
user,
repo,
schema,
server = 'https://repo.packagist.org',
}) {
const url = `${server}/p2/${user.toLowerCase()}/${repo.toLowerCase()}~dev.json`
return this._requestJson({