* chore(deps-dev): bump prettier from 2.8.8 to 3.0.0 Bumps [prettier](https://github.com/prettier/prettier) from 2.8.8 to 3.0.0. - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md) - [Commits](https://github.com/prettier/prettier/compare/2.8.8...3.0.0) --- updated-dependencies: - dependency-name: prettier dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * reformat all the things (prettier 3) * update tests to await calls to prettier.format() --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: chris48s <git@chris-shaw.dev>
31 lines
797 B
JavaScript
31 lines
797 B
JavaScript
import Joi from 'joi'
|
|
import LibrariesIoBase from '../librariesio/librariesio-base.js'
|
|
|
|
const schema = Joi.object()
|
|
.keys({
|
|
normalized_licenses: Joi.array()
|
|
.items(
|
|
// normalized_license may be [] if the package does not declare a license
|
|
Joi.string(),
|
|
)
|
|
.required(),
|
|
|
|
// Keys can be NULL for bower because bower
|
|
// has no registry to enforce any release exists
|
|
latest_release_number: Joi.string().allow(null),
|
|
latest_stable_release_number: Joi.string().allow(null),
|
|
})
|
|
.required()
|
|
|
|
export default class BaseBowerService extends LibrariesIoBase {
|
|
async fetch({ packageName }) {
|
|
return this._requestJson({
|
|
schema,
|
|
url: `/bower/${packageName}`,
|
|
httpErrors: {
|
|
404: 'package not found',
|
|
},
|
|
})
|
|
}
|
|
}
|