This adds a badge for collaborator count. When evaluating a library, it can be useful to know that there's not a single-contributor bottleneck for publishing. Having more than one collaborator is a sign of library maturity. It adds another badge for dependency version of published dependencies, which solves a similar problem as the node-version badge. I will find this useful for making sure dependencies are up to date in a library.
27 lines
536 B
JavaScript
27 lines
536 B
JavaScript
'use strict'
|
|
|
|
const Joi = require('joi').extend(require('joi-extension-semver'))
|
|
|
|
module.exports = {
|
|
nonNegativeInteger: Joi.number()
|
|
.integer()
|
|
.min(0)
|
|
.required(),
|
|
|
|
anyInteger: Joi.number()
|
|
.integer()
|
|
.required(),
|
|
|
|
semver: Joi.semver()
|
|
.valid()
|
|
.required(),
|
|
|
|
semverRange: Joi.semver()
|
|
.validRange()
|
|
.required(),
|
|
|
|
// TODO This accepts URLs with query strings and fragments, which for some
|
|
// purposes should be rejected.
|
|
optionalUrl: Joi.string().uri({ scheme: ['http', 'https'] }),
|
|
}
|