5etools-utils 0.1.13 → 0.1.14

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/TestJson.js +4 -4
  2. package/package.json +1 -1
package/lib/TestJson.js CHANGED
@@ -109,8 +109,8 @@ class JsonTester {
109
109
  this._isSchemaLoaded = true;
110
110
  }
111
111
 
112
- _doRunOnDir ({dir, errors, errorsFull, ...opts}) {
113
- uf.listJsonFiles(dir, ...opts)
112
+ _doRunOnDir ({dir, errors, errorsFull, ...opts} = {}) {
113
+ uf.listJsonFiles(dir, opts)
114
114
  .forEach(filePath => {
115
115
  um.info(this._tagLog, `\tValidating "${filePath}"...`);
116
116
 
@@ -127,7 +127,7 @@ class JsonTester {
127
127
  * @param [opts]
128
128
  * @param [opts.dirBlacklist]
129
129
  */
130
- getErrors (dir, opts) {
130
+ getErrors (dir, opts = {}) {
131
131
  um.info(this._tagLog, `Validating JSON against schema`);
132
132
 
133
133
  this._doLoadSchema();
@@ -135,7 +135,7 @@ class JsonTester {
135
135
  const errors = [];
136
136
  const errorsFull = [];
137
137
 
138
- this._doRunOnDir({errors, errorsFull, dir, opts});
138
+ this._doRunOnDir({...opts, errors, errorsFull, dir});
139
139
 
140
140
  return {errors, errorsFull};
141
141
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "5etools-utils",
3
- "version": "0.1.13",
3
+ "version": "0.1.14",
4
4
  "description": "Shared utilities for the 5etools ecosystem.",
5
5
  "type": "module",
6
6
  "main": "lib/Api.js",