5etools-utils 0.15.5 → 0.15.6

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/BrewCleaner.js +3 -11
  2. package/package.json +1 -1
@@ -158,7 +158,7 @@ export class BrewCleaner {
158
158
  jsonOut = getCleanJson(jsonOut);
159
159
 
160
160
  if (isDry) {
161
- if (jsonOut !== raw) ALL_ERRORS.push(`${file} would be reformatted!`);
161
+ if (jsonOut !== raw) Um.warn(`CLEANER`, `"${file}" would be reformatted!`);
162
162
  continue;
163
163
  }
164
164
 
@@ -170,27 +170,19 @@ export class BrewCleaner {
170
170
  throw new Error(`Errors were found. See above.`);
171
171
  }
172
172
 
173
- return {cntFiles: files.length, cntErrors: ALL_ERRORS.length};
173
+ return files.length;
174
174
  }
175
175
 
176
176
  static run ({isDry = false} = {}) {
177
177
  const tStart = Date.now();
178
178
 
179
179
  let ttlFiles = 0;
180
- let ttlErrors = 0;
181
180
 
182
181
  Uf.runOnDirs((dir) => {
183
182
  Um.info(`CLEANER`, `${isDry ? "Checking" : "Cleaning"} dir "${dir}"...`);
184
- const {cntFiles, cntErrors} = this._cleanFolder({dir, isDry});
185
- ttlFiles += cntFiles;
186
- ttlErrors += cntErrors;
183
+ ttlFiles += this._cleanFolder({dir, isDry});
187
184
  });
188
185
 
189
186
  Um.info(`CLEANER`, `${isDry ? "Check" : "Cleaning"} complete. ${isDry ? "Checked" : "Cleaned"} ${ttlFiles} file${ttlFiles === 1 ? "" : "s"}. Ran in ${((Date.now() - tStart) / 1000).toFixed(2)}s.`);
190
-
191
- if (ttlErrors && isDry) {
192
- Um.info(`CLEANER`, `Found ${ttlErrors} error${ttlErrors === 1 ? "" : "s"}!`);
193
- process.exit(1);
194
- }
195
187
  }
196
188
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "5etools-utils",
3
- "version": "0.15.5",
3
+ "version": "0.15.6",
4
4
  "description": "Shared utilities for the 5etools ecosystem.",
5
5
  "type": "module",
6
6
  "main": "lib/Api.js",