redput 1.6.0 → 1.8.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,17 @@
1
+ 2023.08.28, v1.8.0
2
+
3
+ feature:
4
+ - 00f012e redput: plugins: prepare to ESM: direct import instead of async
5
+ - 9d29ea2 package: @putout/plugin-declare v2.0.1
6
+ - 84f823b package: @putout/plugin-convert-esm-to-commonjs v6.0.0
7
+ - fcf48ac package: @putout/plugin-remove-unused-variables v6.0.2
8
+ - d584a26 package: @putout/plugin-putout v14.8.0
9
+
10
+ 2023.08.23, v1.7.0
11
+
12
+ feature:
13
+ - 44f4b4e redput: export: get-report
14
+
1
15
  2023.08.21, v1.6.0
2
16
 
3
17
  feature:
@@ -1,4 +1,4 @@
1
- import {access} from 'fs/promises';
1
+ import {access} from 'node:fs/promises';
2
2
  import {
3
3
  updateNestedIndex,
4
4
  updateOverallNestedFixtures,
@@ -1,5 +1,7 @@
1
1
  import putout from 'putout';
2
2
  import * as insertGetRulePlugin from './plugin-insert-get-rule/index.js';
3
+ import pluginPutout from '@putout/plugin-putout';
4
+ import removeUnusedVariables from '@putout/plugin-remove-unused-variables';
3
5
 
4
6
  export const addRule = (name, source) => {
5
7
  const {code} = putout(source, {
@@ -9,8 +11,8 @@ export const addRule = (name, source) => {
9
11
  }],
10
12
  },
11
13
  plugins: [
12
- 'putout',
13
- 'remove-unused-variables',
14
+ ['putout', pluginPutout],
15
+ ['remove-unused-variables', removeUnusedVariables],
14
16
  ['add-rule', insertGetRulePlugin],
15
17
  ],
16
18
  });
@@ -2,12 +2,12 @@ import {
2
2
  mkdir,
3
3
  readFile,
4
4
  writeFile,
5
- } from 'fs/promises';
5
+ } from 'node:fs/promises';
6
6
  import {
7
7
  basename,
8
8
  dirname,
9
9
  join,
10
- } from 'path';
10
+ } from 'node:path';
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';
@@ -1,11 +1,14 @@
1
1
  import putout from 'putout';
2
+ import convertESMToCommonjs from '@putout/plugin-convert-esm-to-commonjs';
3
+ import putoutPlugin from '@putout/plugin-putout';
4
+ import declare from '@putout/plugin-declare';
2
5
 
3
6
  export const prepareRule = (source) => {
4
7
  const {code} = putout(source, {
5
8
  plugins: [
6
- 'declare',
7
- 'convert-esm-to-commonjs',
8
- 'putout',
9
+ ['declare', declare],
10
+ ['convert-esm-to-commonjs', convertESMToCommonjs],
11
+ ['putout', putoutPlugin],
9
12
  ],
10
13
  });
11
14
 
@@ -2,12 +2,12 @@ import {
2
2
  mkdir,
3
3
  readFile,
4
4
  writeFile,
5
- } from 'fs/promises';
5
+ } from 'node:fs/promises';
6
6
  import {
7
7
  basename,
8
8
  dirname,
9
9
  join,
10
- } from 'path';
10
+ } from 'node:path';
11
11
  import rendy from 'rendy';
12
12
 
13
13
  export const writeRule = async (name, data) => {
package/package.json CHANGED
@@ -1,11 +1,14 @@
1
1
  {
2
2
  "name": "redput",
3
- "version": "1.6.0",
3
+ "version": "1.8.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",
@@ -54,6 +57,10 @@
54
57
  "node": ">=16"
55
58
  },
56
59
  "dependencies": {
60
+ "@putout/plugin-convert-esm-to-commonjs": "^6.0.0",
61
+ "@putout/plugin-declare": "^2.0.1",
62
+ "@putout/plugin-putout": "^14.8.0",
63
+ "@putout/plugin-remove-unused-variables": "^6.0.2",
57
64
  "node-fetch": "^3.3.2",
58
65
  "octokit": "^3.1.0",
59
66
  "putout": "^31.1.0",