5etools-utils 0.1.21 → 0.1.22

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.
package/lib/TestJson.js CHANGED
@@ -127,7 +127,7 @@ class JsonTester {
127
127
  /**
128
128
  * @param dir
129
129
  * @param [opts]
130
- * @param [opts.dirBlacklist]
130
+ * @param [opts.dirBlocklist]
131
131
  */
132
132
  getErrors (dir, opts = {}) {
133
133
  um.info(this._tagLog, `Validating JSON against schema`);
package/lib/UtilFs.js CHANGED
@@ -32,20 +32,20 @@ function readJSON (path, {isIncludeRaw = false} = {}) {
32
32
  /**
33
33
  * @param dir
34
34
  * @param [opts]
35
- * @param [opts.dirBlacklist]
35
+ * @param [opts.dirBlocklist]
36
36
  * @param [state]
37
37
  */
38
38
  function listJsonFiles (dir, opts, state) {
39
- const {dirBlacklist = null} = opts || {};
39
+ const {dirBlocklist = null} = opts || {};
40
40
  state = state || {};
41
- state.dirBlacklist = state.dirBlacklist
42
- || (dirBlacklist ? new Set([...dirBlacklist].map(it => path.normalize(it))) : new Set());
41
+ state.dirBlocklist = state.dirBlocklist
42
+ || (dirBlocklist ? new Set([...dirBlocklist].map(it => path.normalize(it))) : new Set());
43
43
 
44
44
  const dirContent = fs.readdirSync(dir, "utf8")
45
45
  .map(file => dir === "." ? file : `${dir}/${file}`);
46
46
  return dirContent.reduce((acc, file) => {
47
47
  if (isDirectory(file)) {
48
- if (!state.dirBlacklist.has(path.normalize(file))) acc.push(...listJsonFiles(file, opts, state));
48
+ if (!state.dirBlocklist.has(path.normalize(file))) acc.push(...listJsonFiles(file, opts, state));
49
49
  } else {
50
50
  if (file.toLowerCase().endsWith(".json")) acc.push(file);
51
51
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "5etools-utils",
3
- "version": "0.1.21",
3
+ "version": "0.1.22",
4
4
  "description": "Shared utilities for the 5etools ecosystem.",
5
5
  "type": "module",
6
6
  "main": "lib/Api.js",