Comparing version 0.11.3 to 0.12.0
{ | ||
"name": "archetype", | ||
"version": "0.11.3", | ||
"version": "0.12.0", | ||
"author": "Valeri Karpov <val@boosterfuels.com>", | ||
@@ -8,9 +8,8 @@ "dependencies": { | ||
"lodash.set": "4.x", | ||
"mpath": "0.5.1", | ||
"standard-error": "1.1.0" | ||
"mpath": "0.5.1" | ||
}, | ||
"devDependencies": { | ||
"acquit": "1.x", | ||
"acquit-ignore": "0.1.0", | ||
"acquit-markdown": "0.1.0", | ||
"acquit-ignore": "0.1.x", | ||
"acquit-markdown": "0.1.x", | ||
"co": "4.6.0", | ||
@@ -17,0 +16,0 @@ "mocha": "5.x", |
'use strict'; | ||
const StandardError = require('standard-error'); | ||
class CastError extends Error { | ||
@@ -14,3 +12,3 @@ constructor() { | ||
markError(path, error) { | ||
const standardized = new StandardError(error.message); | ||
const standardized = new ValidatorError(error.message); | ||
standardized.stack = error.stack; | ||
@@ -44,2 +42,8 @@ this.errors[path] = standardized; | ||
class ValidatorError extends Error { | ||
toJSON() { | ||
return { message: this.message }; | ||
} | ||
} | ||
module.exports = CastError; |
'use strict'; | ||
const StandardError = require('standard-error'); | ||
const ValidateError = require('./error'); | ||
@@ -5,0 +4,0 @@ const applyDefaults = require('../defaults'); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3
813
44215
- Removedstandard-error@1.1.0
- Removedstandard-error@1.1.0(transitive)