@putout/engine-runner 20.2.0 → 20.3.0

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/README.md CHANGED
@@ -254,8 +254,6 @@ export const scan = (rootPath) => {
254
254
  };
255
255
  ```
256
256
 
257
-
258
-
259
257
  ### Finder
260
258
 
261
259
  **Finder** gives you all the control over traversing, but it's the slowest format.
package/lib/progress.js CHANGED
@@ -13,11 +13,12 @@ module.exports.createProgress = () => {
13
13
  pluginsCount = 0;
14
14
  };
15
15
 
16
- progress.file = ({i, n, rule}) => {
16
+ progress.file = ({i, n, percent, rule}) => {
17
17
  progress.emit('file', {
18
18
  i,
19
19
  n,
20
20
  rule,
21
+ percent,
21
22
  });
22
23
  };
23
24
 
@@ -42,9 +42,13 @@ const watchPush = ({push, rule, progress}) => (...a) => {
42
42
  };
43
43
 
44
44
  const createFileProgress = ({rule, progress}) => ({i, n}) => {
45
+ ++i;
46
+ const percent = `${Math.round(i / n * 100)}%`;
47
+
45
48
  progress.file({
46
49
  i,
47
50
  n,
51
+ percent,
48
52
  rule,
49
53
  });
50
54
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/engine-runner",
3
- "version": "20.2.0",
3
+ "version": "20.3.0",
4
4
  "type": "commonjs",
5
5
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
6
6
  "description": "Run 🐊Putout plugins",