redput 1.5.1 → 1.7.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/ChangeLog CHANGED
@@ -1,3 +1,13 @@
1
+ 2023.08.23, v1.7.0
2
+
3
+ feature:
4
+ - 44f4b4e redput: export: get-report
5
+
6
+ 2023.08.21, v1.6.0
7
+
8
+ feature:
9
+ - c9b5e9c redput: improve adding rule
10
+
1
11
  2023.08.21, v1.5.1
2
12
 
3
13
  fix:
@@ -9,6 +9,8 @@ export const addRule = (name, source) => {
9
9
  }],
10
10
  },
11
11
  plugins: [
12
+ 'putout',
13
+ 'remove-unused-variables',
12
14
  ['add-rule', insertGetRulePlugin],
13
15
  ],
14
16
  });
@@ -11,13 +11,16 @@ import {
11
11
  import rendy from 'rendy';
12
12
  import {addRule} from './add-rule/add-rule.js';
13
13
  import {insertTest} from './insert-test/insert-test.js';
14
+ import {prepareRule} from './prepare-rule/prepare-rule.js';
14
15
 
15
16
  export const writeNestedRule = async (name, data) => {
16
17
  await mkdir(`./${name}`, {
17
18
  recursive: true,
18
19
  });
19
20
 
20
- await writeFile(`./${name}/index.js`, data);
21
+ const code = prepareRule(data);
22
+
23
+ await writeFile(`./${name}/index.js`, code);
21
24
  };
22
25
 
23
26
  export const writeNestedFixtures = async (name, data) => {
package/package.json CHANGED
@@ -1,28 +1,30 @@
1
1
  {
2
2
  "name": "redput",
3
- "version": "1.5.1",
3
+ "version": "1.7.0",
4
4
  "description": "CLI tool to convert source from 🐊Putout Editor to files",
5
5
  "main": "lib/redput.js",
6
6
  "bin": {
7
7
  "redput": "bin/redput.js"
8
8
  },
9
+ "exports": {
10
+ "./plugin/get-report": "./lib/get-report/plugin-get-report/index.js"
11
+ },
9
12
  "type": "module",
10
13
  "scripts": {
11
14
  "lint": "madrun lint",
12
15
  "fresh:lint": "madrun fresh:lint",
13
16
  "lint:fresh": "madrun lint:fresh",
14
17
  "fix:lint": "madrun fix:lint",
15
- "test:only": "madrun test:only",
16
18
  "test": "madrun test",
19
+ "test:mock": "madrun test:mock",
17
20
  "watch:test": "madrun watch:test",
18
21
  "watch:tape": "madrun watch:tape",
19
22
  "watch:lint": "madrun watch:lint",
20
23
  "watcher": "madrun watcher",
21
24
  "coverage": "madrun coverage",
22
- "coverage:old": "madrun coverage:old",
25
+ "coverage:es": "madrun coverage:es",
23
26
  "report": "madrun report",
24
- "postpublish": "madrun postpublish",
25
- "hello": "madrun hello"
27
+ "wisdom": "madrun wisdom"
26
28
  },
27
29
  "repository": {
28
30
  "type": "git",