Notably, this gets us `@actions/github` 6.0.1, which is necessary for `github.context.runAttempt` (so I have also updated `package.json` accordingly). On that note... great job following semver, GitHub! Between this and the non-breaking major version change on `@actions/cache`, I'm starting to feel like nobody on the Actions team understands how software versioning works.
31 lines
642 B
JavaScript
31 lines
642 B
JavaScript
module.exports = class AddonResolveError extends Error {
|
|
constructor(msg, code, fn = AddonResolveError) {
|
|
super(`${code}: ${msg}`)
|
|
this.code = code
|
|
|
|
if (Error.captureStackTrace) {
|
|
Error.captureStackTrace(this, fn)
|
|
}
|
|
}
|
|
|
|
get name() {
|
|
return 'AddonResolveError'
|
|
}
|
|
|
|
static INVALID_ADDON_SPECIFIER(msg) {
|
|
return new AddonResolveError(
|
|
msg,
|
|
'INVALID_ADDON_SPECIFIER',
|
|
AddonResolveError.INVALID_ADDON_SPECIFIER
|
|
)
|
|
}
|
|
|
|
static INVALID_PACKAGE_NAME(msg) {
|
|
return new AddonResolveError(
|
|
msg,
|
|
'INVALID_PACKAGE_NAME',
|
|
AddonResolveError.INVALID_PACKAGE_NAME
|
|
)
|
|
}
|
|
}
|