@putout/plugin-package-json 7.0.0 β†’ 7.1.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
@@ -100,7 +100,8 @@ Check out in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/eb12c902c
100
100
 
101
101
  ## find-file
102
102
 
103
- Find `package.json` inside of `.filesystem.json` and applies all other `package-json` rules:
103
+ Find `package.json` inside of `.filesystem.json` and applies all other `package-json` rules.
104
+ Checkout in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/325233d19fde0acacadbcf1f42dd3bb2/124a50fe0e92c6c3cab24f8b87c33b202dc3e540).
104
105
 
105
106
  ```diff
106
107
  {
@@ -7,7 +7,6 @@ import {
7
7
  import rules from '../package-json.js';
8
8
 
9
9
  const {
10
- findFile,
11
10
  readFileContent,
12
11
  writeFileContent,
13
12
  toJS,
@@ -26,11 +25,8 @@ export const fix = (file, {ast, content}) => {
26
25
  writeFileContent(file, fromJS(print(ast)));
27
26
  };
28
27
 
29
- export const scan = (root, {push, progress}) => {
30
- const files = findFile(root, 'package.json');
31
- const n = files.length;
32
-
33
- for (const [i, file] of files.entries()) {
28
+ export const scan = (root, {push, trackFile}) => {
29
+ for (const file of trackFile(root, 'package.json')) {
34
30
  const content = toJS(readFileContent(file));
35
31
  const ast = parse(content);
36
32
  const places = transform(ast, content, {
@@ -45,10 +41,5 @@ export const scan = (root, {push, progress}) => {
45
41
  content,
46
42
  ast,
47
43
  });
48
-
49
- progress({
50
- i,
51
- n,
52
- });
53
44
  }
54
45
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/plugin-package-json",
3
- "version": "7.0.0",
3
+ "version": "7.1.0",
4
4
  "type": "module",
5
5
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
6
6
  "description": "🐊Putout plugin for package.json",