fix: multi-repo local dev (file:../ deps, package exports, missing deps)
This commit is contained in:
+8
@@ -0,0 +1,8 @@
|
||||
declare class AddonResolveError extends Error {
|
||||
readonly code: string
|
||||
|
||||
static INVALID_ADDON_SPECIFIER(msg: string): AddonResolveError
|
||||
static INVALID_PACKAGE_NAME(msg: string): AddonResolveError
|
||||
}
|
||||
|
||||
export = AddonResolveError
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
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
|
||||
)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user