redput 4.1.3 → 4.2.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
+ 2026.02.20, v4.2.0
2
+
3
+ feature:
4
+ - d6d55ea redput: get-report: get-report-from-add-args: add
5
+
6
+ 2026.02.19, v4.1.4
7
+
8
+ feature:
9
+ - 2c3827f redput: @putout/plugin-nodejs v21.0.0
10
+
1
11
  2026.02.19, v4.1.3
2
12
 
3
13
  feature:
@@ -1,11 +1,13 @@
1
1
  import putout from 'putout';
2
2
  import * as getReportPlugin from './plugin-get-report/index.js';
3
+ import * as getReportFromAddArgsPlugin from './plugin-get-report-from-add-args/index.js';
3
4
 
4
5
  export const getReport = (rule) => {
5
6
  const {places} = putout(rule, {
6
7
  fix: false,
7
8
  plugins: [
8
9
  ['get-report', getReportPlugin],
10
+ ['get-report-from-add-args', getReportFromAddArgsPlugin],
9
11
  ],
10
12
  });
11
13
 
@@ -0,0 +1,19 @@
1
+ import {operator} from 'putout';
2
+
3
+ const {
4
+ extract,
5
+ getTemplateValues,
6
+ } = operator;
7
+
8
+ export const report = (path) => {
9
+ const {__object} = getTemplateValues(path, 'addArgs(__object)');
10
+
11
+ const name = extract(__object.properties[0].key);
12
+
13
+ return `Argument '${name}' is missing`;
14
+ };
15
+
16
+ export const fix = () => {};
17
+ export const include = () => [
18
+ 'addArgs(__object)',
19
+ ];
@@ -35,7 +35,7 @@ function parseComment(comment) {
35
35
  if (parseError)
36
36
  return ['', raw];
37
37
 
38
- transform(ast, raw, {
38
+ transform(ast, {
39
39
  plugins: [
40
40
  ['apply-strings-tuple', applyStringsTuple],
41
41
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "redput",
3
- "version": "4.1.3",
3
+ "version": "4.2.0",
4
4
  "description": "CLI tool to convert source from 🐊Putout Editor to files",
5
5
  "main": "lib/redput.js",
6
6
  "bin": {
@@ -58,7 +58,7 @@
58
58
  "@putout/plugin-declare": "^8.0.0",
59
59
  "@putout/plugin-declare-before-reference": "^9.0.0",
60
60
  "@putout/plugin-esm": "^10.0.0",
61
- "@putout/plugin-nodejs": "^20.0.0",
61
+ "@putout/plugin-nodejs": "^21.0.0",
62
62
  "@putout/plugin-putout": "^29.0.0",
63
63
  "@putout/plugin-variables": "^1.3.1",
64
64
  "node-fetch": "^3.3.2",