redput 3.4.0 → 3.5.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,11 @@
1
+ 2025.06.02, v3.5.0
2
+
3
+ feature:
4
+ - 81ec471 apply-namespace
5
+ - 7b40985 redput: octokit v5.0.3
6
+ - f5f6955 redput: @putout/plugin-remove-unused-variables v14.0.0
7
+ - 03cfc29 redput: eslint-plugin-putout v27.1.0
8
+
1
9
  2025.05.19, v3.4.0
2
10
 
3
11
  feature:
@@ -52,7 +52,7 @@ function parseValue(a) {
52
52
 
53
53
  operator.traverse(a, {
54
54
  ReturnStatement(path) {
55
- value = print(path.get('argument'));
55
+ value = path.get('argument').toString();
56
56
  },
57
57
  });
58
58
 
@@ -8,4 +8,3 @@ export const isTSCode = (source) => {
8
8
 
9
9
  return Boolean(error);
10
10
  };
11
-
@@ -4,6 +4,7 @@ import * as nodejs from '@putout/plugin-nodejs';
4
4
  import * as removeUnusedVariables from '@putout/plugin-remove-unused-variables';
5
5
  import * as esm from '@putout/plugin-esm';
6
6
  import * as insertGetRulePlugin from './plugin-insert-get-rule/index.js';
7
+ import * as applyNamespace from './plugin-apply-namespace/index.js';
7
8
 
8
9
  export const addRule = (name, source, ruleOptions) => {
9
10
  const {code} = putout(source, {
@@ -20,6 +21,7 @@ export const addRule = (name, source, ruleOptions) => {
20
21
  }],
21
22
  },
22
23
  plugins: [
24
+ ['apply-namespace', applyNamespace],
23
25
  ['nodejs', nodejs],
24
26
  ['putout', pluginPutout],
25
27
  ['remove-unused-variables', removeUnusedVariables],
@@ -0,0 +1,5 @@
1
+ export const report = () => `Apply namespace`;
2
+
3
+ export const replace = () => ({
4
+ 'import __a from "__b"': 'import * as __a from "__b"',
5
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "redput",
3
- "version": "3.4.0",
3
+ "version": "3.5.0",
4
4
  "description": "CLI tool to convert source from 🐊Putout Editor to files",
5
5
  "main": "lib/redput.js",
6
6
  "bin": {
@@ -60,9 +60,9 @@
60
60
  "@putout/plugin-esm": "^4.0.0",
61
61
  "@putout/plugin-nodejs": "^16.1.0",
62
62
  "@putout/plugin-putout": "^25.0.0",
63
- "@putout/plugin-remove-unused-variables": "^12.0.0",
63
+ "@putout/plugin-remove-unused-variables": "^14.0.0",
64
64
  "node-fetch": "^3.3.2",
65
- "octokit": "^4.0.2",
65
+ "octokit": "^5.0.3",
66
66
  "putout": "^40.0.1",
67
67
  "rendy": "^4.1.3",
68
68
  "try-catch": "^3.0.1",
@@ -73,7 +73,7 @@
73
73
  "c8": "^10.1.2",
74
74
  "escover": "^4.0.1",
75
75
  "eslint": "^9.0.0",
76
- "eslint-plugin-putout": "^26.1.0",
76
+ "eslint-plugin-putout": "^27.1.0",
77
77
  "madrun": "^11.0.0",
78
78
  "montag": "^1.2.1",
79
79
  "nodemon": "^3.0.1",