redput 3.1.0 → 3.3.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,18 @@
1
+ 2025.05.08, v3.3.0
2
+
3
+ feature:
4
+ - e9285b6 redput: @putout/plugin-nodejs v16.1.0
5
+ - 0051886 redput: @putout/plugin-declare-before-reference v8.1.0
6
+
7
+ 2025.04.09, v3.2.0
8
+
9
+ feature:
10
+ - c72e004 redput: @putout/plugin-esm v4.0.0
11
+ - c9d2274 redput: supertape v11.1.0
12
+ - fedbcd9 redput: putout v40.0.1
13
+ - 17990f1 redput: @putout/test v13.0.1
14
+ - e99321c redput: @putout/plugin-putout v25.0.0
15
+
1
16
  2025.03.23, v3.1.0
2
17
 
3
18
  feature:
@@ -2,6 +2,7 @@ import putout from 'putout';
2
2
  import * as pluginPutout from '@putout/plugin-putout';
3
3
  import * as nodejs from '@putout/plugin-nodejs';
4
4
  import * as removeUnusedVariables from '@putout/plugin-remove-unused-variables';
5
+ import * as esm from '@putout/plugin-esm';
5
6
  import * as insertGetRulePlugin from './plugin-insert-get-rule/index.js';
6
7
 
7
8
  export const addRule = (name, source, ruleOptions) => {
@@ -12,6 +13,8 @@ export const addRule = (name, source, ruleOptions) => {
12
13
  name,
13
14
  ruleOptions,
14
15
  }],
16
+ 'esm': 'off',
17
+ 'esm/add-index-to-import': 'on',
15
18
  'putout/declare': ['on', {
16
19
  dismiss: 'getRule',
17
20
  }],
@@ -21,6 +24,7 @@ export const addRule = (name, source, ruleOptions) => {
21
24
  ['putout', pluginPutout],
22
25
  ['remove-unused-variables', removeUnusedVariables],
23
26
  ['add-rule', insertGetRulePlugin],
27
+ ['esm', esm],
24
28
  ],
25
29
  });
26
30
 
@@ -9,6 +9,7 @@ const {
9
9
  stringLiteral,
10
10
  isSpreadElement,
11
11
  } = types;
12
+
12
13
  const {traverse} = operator;
13
14
 
14
15
  export const report = () => `Insert 'getRule()'`;
@@ -78,4 +79,3 @@ const createCheck = (options) => ({__object}) => {
78
79
 
79
80
  return !exists;
80
81
  };
81
-
@@ -43,7 +43,7 @@ export const writeNestedTests = async (name, report) => {
43
43
  name,
44
44
  nested,
45
45
  report,
46
- importPath: '.',
46
+ importPath: './index.js',
47
47
  }));
48
48
  };
49
49
 
@@ -1,7 +1,7 @@
1
1
  import putout from 'putout';
2
2
  import * as putoutPlugin from '@putout/plugin-putout';
3
- import declare from '@putout/plugin-declare';
4
- import declareBeforeReference from '@putout/plugin-declare-before-reference';
3
+ import * as declare from '@putout/plugin-declare';
4
+ import * as declareBeforeReference from '@putout/plugin-declare-before-reference';
5
5
 
6
6
  export const prepareRule = (source) => {
7
7
  const {code} = putout(source, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "redput",
3
- "version": "3.1.0",
3
+ "version": "3.3.0",
4
4
  "description": "CLI tool to convert source from 🐊Putout Editor to files",
5
5
  "main": "lib/redput.js",
6
6
  "bin": {
@@ -56,19 +56,20 @@
56
56
  },
57
57
  "dependencies": {
58
58
  "@putout/plugin-declare": "^5.0.0",
59
- "@putout/plugin-declare-before-reference": "^6.2.0",
60
- "@putout/plugin-nodejs": "^15.0.0",
61
- "@putout/plugin-putout": "^24.0.0",
59
+ "@putout/plugin-declare-before-reference": "^8.1.0",
60
+ "@putout/plugin-esm": "^4.0.0",
61
+ "@putout/plugin-nodejs": "^16.1.0",
62
+ "@putout/plugin-putout": "^25.0.0",
62
63
  "@putout/plugin-remove-unused-variables": "^12.0.0",
63
64
  "node-fetch": "^3.3.2",
64
65
  "octokit": "^4.0.2",
65
- "putout": "^39.0.9",
66
+ "putout": "^40.0.1",
66
67
  "rendy": "^4.1.3",
67
68
  "try-catch": "^3.0.1",
68
69
  "try-to-catch": "^3.0.1"
69
70
  },
70
71
  "devDependencies": {
71
- "@putout/test": "^12.1.0",
72
+ "@putout/test": "^13.0.1",
72
73
  "c8": "^10.1.2",
73
74
  "escover": "^4.0.1",
74
75
  "eslint": "^9.0.0",
@@ -77,7 +78,7 @@
77
78
  "montag": "^1.2.1",
78
79
  "nodemon": "^3.0.1",
79
80
  "redlint": "^4.0.0",
80
- "supertape": "^10.1.0"
81
+ "supertape": "^11.1.0"
81
82
  },
82
83
  "publishConfig": {
83
84
  "access": "public"
@@ -1,7 +1,7 @@
1
- const {createTest} = require('@putout/test');
2
- const plugin = require('{{ importPath }}');
1
+ import {createTest} from '@putout/test';
2
+ import * as plugin from '{{ importPath }}';
3
3
 
4
- const test = createTest(__dirname, {
4
+ const test = createTest(import.meta.url, {
5
5
  plugins: [
6
6
  ['{{ name }}', plugin],
7
7
  ],