putout 22.9.0 → 23.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,63 @@
1
+ 2021.12.26, v23.3.0
2
+
3
+ feature:
4
+ - (package) @putout/operate v6.13.0
5
+ - (package) @putout/plugin-convert-typeof-to-is-type v2.0.0
6
+ - (@putout/plugin-convert-typeof-to-is-type) drop support of putout < 23
7
+ - (@putout/plugin-convert-typeof-to-is-type) add support of MemberExpression
8
+ - (@putout/operate) getBinding/getBindingPath: name: string -> name: string | Node'
9
+ - (@putout/plugin-putout) add includer
10
+
11
+
12
+ 2021.12.25, v23.2.0
13
+
14
+ feature:
15
+ - (package) @putout/plugin-reuse-duplicate-init v3.0.0
16
+ - (package) @putout/plugin-remove-unused-types v2.0.0
17
+ - (package) @putout/engine-runner v12.0.0
18
+ - (@putout/plugin-reuse-duplicate-init) drop support of putout < 23
19
+ - (@putout/plugin-reuse-duplicate-init) add support of MemberExpression
20
+ - (@putout/plugin-remove-unused-types) drop support of putout < 23
21
+ - (@putout/plugin-remove-unused-types) store -> upstore
22
+ - (@putout/engine-runner) add support of upstore
23
+ - (@putout/engine-runner) improve support of Program: exit + exclude
24
+ - (@putout/plugin-github) traverse-property: callback -> return array
25
+ - (putout) rules: exclude "not-rule-*" glob
26
+ - (@putout/rule-add-readme-to-homepage) add
27
+
28
+
29
+ 2021.12.23, v23.1.0
30
+
31
+ fix:
32
+ - (@putout/plugin-convert-for-to-for-of) entries: count i references (should be more then 3)
33
+
34
+ feature:
35
+ - (@putout/plugin-remove-useless-array-entries) add
36
+ - (@putout/plugin-convert-for-to-for-of) length: add support of destructuring
37
+ - (@putout/plugin-convert-for-to-for-of) entries: add support of destructuring
38
+ - (@putout/plugin-convert-for-to-for-of) add support of entries with declared n
39
+ - (@putout/plugin-convert-for-to-for-of) add support of entries
40
+ - (eslint-plugin-putout) no-unresolved: add support of export declarations
41
+ - (@putout/plugin-remove-useless-escape) set RegExp raw
42
+ - (@putout/plugin-remove-useless-escape) improve support of handling "," in RegExp
43
+ - (@putout/plugin-regexp) remove-useless-group: add support of Alternative
44
+
45
+
46
+ 2021.12.21, v23.0.0
47
+
48
+ feature:
49
+ - (package) @putout/engine-loader v5.0.0
50
+ - (package) @putout/engine-loader v5.0.0
51
+ - (package) @putout/plugin-regexp v4.0.0
52
+ - (@putout/plugin-regexp) drop support of putout < 23
53
+ - (putout) drop jscodeshift support
54
+ - (@putout/engine-loader) drop support of jscodeshift
55
+ - (putout) apply @putout/recast v1.5.1 modifications
56
+ - (eslint-plugin-putout) putout: add ability parse error instead of throw
57
+ - (eslint-plugin-putout) ts: add no-redeclare
58
+ - (@putout/plugin-tape) add-await-to-re-import: add support of nested blocks
59
+
60
+
1
61
  2021.12.20, v22.9.0
2
62
 
3
63
  fix:
package/README.md CHANGED
@@ -36,6 +36,7 @@
36
36
  - remove useless `typeof`;
37
37
  - remove useless `template expressions`;
38
38
  - remove useless `for-of`;
39
+ - remove useless `array.entries()`;
39
40
  - remove `debugger` statement;
40
41
  - remove `iife`;
41
42
  - remove nested blocks;
package/lib/ignores.js CHANGED
@@ -17,10 +17,7 @@ module.exports = (dirOpt, resolvedName, options = {}) => {
17
17
  };
18
18
 
19
19
  function mergeIgnores(ignores) {
20
- const n = ignores.length;
21
-
22
- for (let i = 0; i < n; i++) {
23
- const str = ignores[i];
20
+ for (const [i, str] of ignores.entries()) {
24
21
  const positiveIndex = ignores.indexOf(positive(str));
25
22
 
26
23
  if (isNegative(str) && positiveIndex > i)
@@ -97,7 +97,7 @@ function _readOptions(name) {
97
97
  ];
98
98
  }
99
99
 
100
- const isInclude = (a) => a !== 'node_modules';
100
+ const isInclude = (a) => !/(^not-rule-.*|^node_modules$)/.test(a);
101
101
 
102
102
  function readRules(dirOpt, rulesDir) {
103
103
  if (!rulesDir)
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "putout",
3
- "version": "22.9.0",
3
+ "version": "23.3.0",
4
4
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
5
- "description": "🐊 Pluggable and configurable code transformer with built-in eslint, babel plugins and jscodeshift codemods support of js, jsx typescript, flow files, markdown, yaml and json",
6
- "homepage": "http://github.com/coderaiser/putout",
5
+ "description": "🐊 Pluggable and configurable code transformer with built-in eslint and babel plugins support of js, jsx typescript, flow files, markdown, yaml and json",
6
+ "homepage": "http://github.com/coderaiser/putout#readme",
7
7
  "main": "./lib/putout.js",
8
8
  "exports": {
9
9
  ".": {
@@ -51,10 +51,10 @@
51
51
  "@putout/cli-ruler": "^1.0.0",
52
52
  "@putout/cli-validate-args": "^1.0.0",
53
53
  "@putout/compare": "^8.0.0",
54
- "@putout/engine-loader": "^4.0.0",
54
+ "@putout/engine-loader": "^5.0.0",
55
55
  "@putout/engine-parser": "^4.0.0",
56
56
  "@putout/engine-processor": "^4.0.0",
57
- "@putout/engine-runner": "^11.0.0",
57
+ "@putout/engine-runner": "^12.0.0",
58
58
  "@putout/formatter-codeframe": "^3.0.0",
59
59
  "@putout/formatter-dump": "^3.0.0",
60
60
  "@putout/formatter-frame": "^2.0.0",
@@ -64,13 +64,13 @@
64
64
  "@putout/formatter-progress": "^3.0.0",
65
65
  "@putout/formatter-progress-bar": "^2.0.0",
66
66
  "@putout/formatter-stream": "^3.0.0",
67
- "@putout/operate": "^6.0.0",
67
+ "@putout/operate": "^6.13.0",
68
68
  "@putout/operator-add-args": "^1.0.0",
69
69
  "@putout/operator-declare": "^2.0.0",
70
70
  "@putout/operator-regexp": "^1.0.0",
71
71
  "@putout/plugin-apply-array-at": "^1.0.0",
72
- "@putout/plugin-apply-await-import": "^1.0.0",
73
72
  "@putout/plugin-apply-as-type-assertions": "^1.0.0",
73
+ "@putout/plugin-apply-await-import": "^1.0.0",
74
74
  "@putout/plugin-apply-destructuring": "^5.0.0",
75
75
  "@putout/plugin-apply-if-condition": "^1.0.0",
76
76
  "@putout/plugin-apply-is-array": "^2.0.0",
@@ -102,7 +102,7 @@
102
102
  "@putout/plugin-convert-template-to-string": "^1.0.0",
103
103
  "@putout/plugin-convert-to-arrow-function": "^3.0.0",
104
104
  "@putout/plugin-convert-top-level-return": "^4.0.0",
105
- "@putout/plugin-convert-typeof-to-is-type": "^1.0.0",
105
+ "@putout/plugin-convert-typeof-to-is-type": "^2.0.0",
106
106
  "@putout/plugin-declare-undefined-variables": "^6.0.0",
107
107
  "@putout/plugin-eslint": "^2.0.0",
108
108
  "@putout/plugin-extract-object-properties": "^6.0.0",
@@ -119,7 +119,7 @@
119
119
  "@putout/plugin-promises": "^6.0.0",
120
120
  "@putout/plugin-putout": "^8.0.0",
121
121
  "@putout/plugin-putout-config": "^2.0.0",
122
- "@putout/plugin-regexp": "^3.0.0",
122
+ "@putout/plugin-regexp": "^4.0.0",
123
123
  "@putout/plugin-remove-boolean-from-assertions": "^1.0.0",
124
124
  "@putout/plugin-remove-boolean-from-logical-expressions": "^4.0.0",
125
125
  "@putout/plugin-remove-console": "^3.0.0",
@@ -139,10 +139,11 @@
139
139
  "@putout/plugin-remove-unused-expressions": "^4.0.0",
140
140
  "@putout/plugin-remove-unused-for-of-variables": "^1.0.0",
141
141
  "@putout/plugin-remove-unused-private-fields": "^1.0.0",
142
- "@putout/plugin-remove-unused-types": "^1.0.0",
142
+ "@putout/plugin-remove-unused-types": "^2.0.0",
143
143
  "@putout/plugin-remove-unused-variables": "*",
144
144
  "@putout/plugin-remove-useless-arguments": "^5.0.0",
145
145
  "@putout/plugin-remove-useless-array-constructor": "^1.0.0",
146
+ "@putout/plugin-remove-useless-array-entries": "^1.0.0",
146
147
  "@putout/plugin-remove-useless-array-from": "^2.0.0",
147
148
  "@putout/plugin-remove-useless-conditions": "^1.0.0",
148
149
  "@putout/plugin-remove-useless-constructor": "^1.0.0",
@@ -163,7 +164,7 @@
163
164
  "@putout/plugin-remove-useless-types": "^1.0.0",
164
165
  "@putout/plugin-remove-useless-types-from-constants": "^1.0.0",
165
166
  "@putout/plugin-remove-useless-variables": "^5.0.0",
166
- "@putout/plugin-reuse-duplicate-init": "^2.0.0",
167
+ "@putout/plugin-reuse-duplicate-init": "^3.0.0",
167
168
  "@putout/plugin-simplify-assignment": "^1.0.0",
168
169
  "@putout/plugin-simplify-logical-expressions": "^1.0.0",
169
170
  "@putout/plugin-simplify-ternary": "^2.0.0",
@@ -215,7 +216,6 @@
215
216
  "devDependencies": {
216
217
  "@babel/plugin-transform-react-jsx": "^7.14.5",
217
218
  "@cloudcmd/stub": "^3.0.0",
218
- "async-await-codemod": "https://github.com/sgilroy/async-await-codemod.git",
219
219
  "babel-plugin-transform-inline-consecutive-adds": "^0.5.0-alpha.9",
220
220
  "c8": "^7.5.0",
221
221
  "currify": "^4.0.0",
package/putout.json CHANGED
@@ -187,6 +187,7 @@
187
187
  "remove-useless-functions",
188
188
  "remove-useless-template-expressions",
189
189
  "remove-useless-for-of",
190
+ "remove-useless-array-entries",
190
191
  "remove-constant-conditions",
191
192
  "remove-boolean-from-assertions",
192
193
  "remove-boolean-from-logical-expressions",