redput 1.5.0 → 1.6.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.21, v1.6.0
2
+
3
+ feature:
4
+ - c9b5e9c redput: improve adding rule
5
+
6
+ 2023.08.21, v1.5.1
7
+
8
+ fix:
9
+ - c0511bf redput: parseLink
10
+
1
11
  2023.08.17, v1.5.0
2
12
 
3
13
  feature:
package/lib/redput.js CHANGED
@@ -2,6 +2,7 @@ import tryToCatch from 'try-to-catch';
2
2
  import {getReport} from './get-report/get-report.js';
3
3
  import {readGist} from './read-gist/read-gist.js';
4
4
  import {writePlugin} from './write/index.js';
5
+ import {parseLink} from './parse-link.js';
5
6
 
6
7
  const SUCCESS = [null, 'Done'];
7
8
 
@@ -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,6 +1,6 @@
1
1
  {
2
2
  "name": "redput",
3
- "version": "1.5.0",
3
+ "version": "1.6.0",
4
4
  "description": "CLI tool to convert source from 🐊Putout Editor to files",
5
5
  "main": "lib/redput.js",
6
6
  "bin": {
@@ -12,17 +12,16 @@
12
12
  "fresh:lint": "madrun fresh:lint",
13
13
  "lint:fresh": "madrun lint:fresh",
14
14
  "fix:lint": "madrun fix:lint",
15
- "test:only": "madrun test:only",
16
15
  "test": "madrun test",
16
+ "test:mock": "madrun test:mock",
17
17
  "watch:test": "madrun watch:test",
18
18
  "watch:tape": "madrun watch:tape",
19
19
  "watch:lint": "madrun watch:lint",
20
20
  "watcher": "madrun watcher",
21
21
  "coverage": "madrun coverage",
22
- "coverage:old": "madrun coverage:old",
22
+ "coverage:es": "madrun coverage:es",
23
23
  "report": "madrun report",
24
- "postpublish": "madrun postpublish",
25
- "hello": "madrun hello"
24
+ "wisdom": "madrun wisdom"
26
25
  },
27
26
  "repository": {
28
27
  "type": "git",