adapt-schemas 2.0.0 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/Schema.js +2 -2
  2. package/package.json +1 -1
package/lib/Schema.js CHANGED
@@ -302,10 +302,10 @@ class Schema extends EventEmitter {
302
302
  const errors = compiled.errors && compiled.errors
303
303
  .filter(e => e.keyword === 'required' ? !opts.ignoreRequired : true)
304
304
  .map(e => e.instancePath ? `${e.instancePath} ${e.message}` : e.message)
305
- .reduce((s, e) => `${s}${e}, `, '')
305
+ .join(', ')
306
306
 
307
307
  if (errors?.length) {
308
- throw new SchemaError('VALIDATION_FAILED', `Validation failed for schema: ${this.name}`, {
308
+ throw new SchemaError('VALIDATION_FAILED', `Validation failed for schema: ${this.name} with errors: ${errors}`, {
309
309
  schemaName: this.name,
310
310
  errors,
311
311
  data
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "type": "git",
5
5
  "url": "https://github.com/cgkineo/adapt-schemas"
6
6
  },
7
- "version": "2.0.0",
7
+ "version": "2.0.1",
8
8
  "description": "Standalone JSON Schema library for the Adapt framework",
9
9
  "type": "module",
10
10
  "main": "index.js",