putout 22.8.2 → 23.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 +66 -0
- package/README.md +2 -0
- package/lib/ignores.js +1 -4
- package/lib/parse-options/index.js +1 -1
- package/package.json +10 -9
- package/putout.json +2 -0
package/ChangeLog
CHANGED
|
@@ -1,3 +1,69 @@
|
|
|
1
|
+
2021.12.25, v23.2.0
|
|
2
|
+
|
|
3
|
+
feature:
|
|
4
|
+
- (package) @putout/plugin-reuse-duplicate-init v3.0.0
|
|
5
|
+
- (package) @putout/plugin-remove-unused-types v2.0.0
|
|
6
|
+
- (package) @putout/engine-runner v12.0.0
|
|
7
|
+
- (@putout/plugin-reuse-duplicate-init) drop support of putout < 23
|
|
8
|
+
- (@putout/plugin-reuse-duplicate-init) add support of MemberExpression
|
|
9
|
+
- (@putout/plugin-remove-unused-types) drop support of putout < 23
|
|
10
|
+
- (@putout/plugin-remove-unused-types) store -> upstore
|
|
11
|
+
- (@putout/engine-runner) add support of upstore
|
|
12
|
+
- (@putout/engine-runner) improve support of Program: exit + exclude
|
|
13
|
+
- (@putout/plugin-github) traverse-property: callback -> return array
|
|
14
|
+
- (putout) rules: exclude "not-rule-*" glob
|
|
15
|
+
- (@putout/rule-add-readme-to-homepage) add
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
2021.12.23, v23.1.0
|
|
19
|
+
|
|
20
|
+
fix:
|
|
21
|
+
- (@putout/plugin-convert-for-to-for-of) entries: count i references (should be more then 3)
|
|
22
|
+
|
|
23
|
+
feature:
|
|
24
|
+
- (@putout/plugin-remove-useless-array-entries) add
|
|
25
|
+
- (@putout/plugin-convert-for-to-for-of) length: add support of destructuring
|
|
26
|
+
- (@putout/plugin-convert-for-to-for-of) entries: add support of destructuring
|
|
27
|
+
- (@putout/plugin-convert-for-to-for-of) add support of entries with declared n
|
|
28
|
+
- (@putout/plugin-convert-for-to-for-of) add support of entries
|
|
29
|
+
- (eslint-plugin-putout) no-unresolved: add support of export declarations
|
|
30
|
+
- (@putout/plugin-remove-useless-escape) set RegExp raw
|
|
31
|
+
- (@putout/plugin-remove-useless-escape) improve support of handling "," in RegExp
|
|
32
|
+
- (@putout/plugin-regexp) remove-useless-group: add support of Alternative
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
2021.12.21, v23.0.0
|
|
36
|
+
|
|
37
|
+
feature:
|
|
38
|
+
- (package) @putout/engine-loader v5.0.0
|
|
39
|
+
- (package) @putout/engine-loader v5.0.0
|
|
40
|
+
- (package) @putout/plugin-regexp v4.0.0
|
|
41
|
+
- (@putout/plugin-regexp) drop support of putout < 23
|
|
42
|
+
- (putout) drop jscodeshift support
|
|
43
|
+
- (@putout/engine-loader) drop support of jscodeshift
|
|
44
|
+
- (putout) apply @putout/recast v1.5.1 modifications
|
|
45
|
+
- (eslint-plugin-putout) putout: add ability parse error instead of throw
|
|
46
|
+
- (eslint-plugin-putout) ts: add no-redeclare
|
|
47
|
+
- (@putout/plugin-tape) add-await-to-re-import: add support of nested blocks
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
2021.12.20, v22.9.0
|
|
51
|
+
|
|
52
|
+
fix:
|
|
53
|
+
- (@putout/plugin-putout) convert-replace-with: crawl
|
|
54
|
+
|
|
55
|
+
feature:
|
|
56
|
+
- (@putout/plugin-apply-await-import) exclude cases where parent not VariableDeclarator
|
|
57
|
+
- (@putout/plugin-apply-await-import) add
|
|
58
|
+
- (@putout/plugin-putout) declare: add replaceWith
|
|
59
|
+
- (@putout/plugin-tape) add-args: add support of async functions
|
|
60
|
+
- (package) ts-morph v13.0.2
|
|
61
|
+
- (@putout/plugin-declare-undefined-variables) add support of url
|
|
62
|
+
- (@putout/engine-loader) improve Yarn PnP support (#93)
|
|
63
|
+
- (@putout/plugin-remove-useless-return) improve handling of call expressions
|
|
64
|
+
- (@putout/plugin-tape) add-t-end: exclude case where callback used
|
|
65
|
+
|
|
66
|
+
|
|
1
67
|
2021.12.16, v22.8.2
|
|
2
68
|
|
|
3
69
|
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;
|
|
@@ -86,6 +87,7 @@
|
|
|
86
87
|
- apply `filter(Boolean)`;
|
|
87
88
|
- apply [isArray](https://web.mit.edu/jwalden/www/isArray.html);
|
|
88
89
|
- apply `if condition`;
|
|
90
|
+
- apply `await import`;
|
|
89
91
|
|
|
90
92
|
## Why?
|
|
91
93
|
|
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
|
|
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)
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "putout",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "23.2.0",
|
|
4
4
|
"author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
|
|
5
|
-
"description": "🐊 Pluggable and configurable code transformer with built-in eslint
|
|
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": "^
|
|
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": "^
|
|
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",
|
|
@@ -70,6 +70,7 @@
|
|
|
70
70
|
"@putout/operator-regexp": "^1.0.0",
|
|
71
71
|
"@putout/plugin-apply-array-at": "^1.0.0",
|
|
72
72
|
"@putout/plugin-apply-as-type-assertions": "^1.0.0",
|
|
73
|
+
"@putout/plugin-apply-await-import": "^1.0.0",
|
|
73
74
|
"@putout/plugin-apply-destructuring": "^5.0.0",
|
|
74
75
|
"@putout/plugin-apply-if-condition": "^1.0.0",
|
|
75
76
|
"@putout/plugin-apply-is-array": "^2.0.0",
|
|
@@ -118,7 +119,7 @@
|
|
|
118
119
|
"@putout/plugin-promises": "^6.0.0",
|
|
119
120
|
"@putout/plugin-putout": "^8.0.0",
|
|
120
121
|
"@putout/plugin-putout-config": "^2.0.0",
|
|
121
|
-
"@putout/plugin-regexp": "^
|
|
122
|
+
"@putout/plugin-regexp": "^4.0.0",
|
|
122
123
|
"@putout/plugin-remove-boolean-from-assertions": "^1.0.0",
|
|
123
124
|
"@putout/plugin-remove-boolean-from-logical-expressions": "^4.0.0",
|
|
124
125
|
"@putout/plugin-remove-console": "^3.0.0",
|
|
@@ -138,10 +139,11 @@
|
|
|
138
139
|
"@putout/plugin-remove-unused-expressions": "^4.0.0",
|
|
139
140
|
"@putout/plugin-remove-unused-for-of-variables": "^1.0.0",
|
|
140
141
|
"@putout/plugin-remove-unused-private-fields": "^1.0.0",
|
|
141
|
-
"@putout/plugin-remove-unused-types": "^
|
|
142
|
+
"@putout/plugin-remove-unused-types": "^2.0.0",
|
|
142
143
|
"@putout/plugin-remove-unused-variables": "*",
|
|
143
144
|
"@putout/plugin-remove-useless-arguments": "^5.0.0",
|
|
144
145
|
"@putout/plugin-remove-useless-array-constructor": "^1.0.0",
|
|
146
|
+
"@putout/plugin-remove-useless-array-entries": "^1.0.0",
|
|
145
147
|
"@putout/plugin-remove-useless-array-from": "^2.0.0",
|
|
146
148
|
"@putout/plugin-remove-useless-conditions": "^1.0.0",
|
|
147
149
|
"@putout/plugin-remove-useless-constructor": "^1.0.0",
|
|
@@ -162,7 +164,7 @@
|
|
|
162
164
|
"@putout/plugin-remove-useless-types": "^1.0.0",
|
|
163
165
|
"@putout/plugin-remove-useless-types-from-constants": "^1.0.0",
|
|
164
166
|
"@putout/plugin-remove-useless-variables": "^5.0.0",
|
|
165
|
-
"@putout/plugin-reuse-duplicate-init": "^
|
|
167
|
+
"@putout/plugin-reuse-duplicate-init": "^3.0.0",
|
|
166
168
|
"@putout/plugin-simplify-assignment": "^1.0.0",
|
|
167
169
|
"@putout/plugin-simplify-logical-expressions": "^1.0.0",
|
|
168
170
|
"@putout/plugin-simplify-ternary": "^2.0.0",
|
|
@@ -214,7 +216,6 @@
|
|
|
214
216
|
"devDependencies": {
|
|
215
217
|
"@babel/plugin-transform-react-jsx": "^7.14.5",
|
|
216
218
|
"@cloudcmd/stub": "^3.0.0",
|
|
217
|
-
"async-await-codemod": "https://github.com/sgilroy/async-await-codemod.git",
|
|
218
219
|
"babel-plugin-transform-inline-consecutive-adds": "^0.5.0-alpha.9",
|
|
219
220
|
"c8": "^7.5.0",
|
|
220
221
|
"currify": "^4.0.0",
|
package/putout.json
CHANGED
|
@@ -140,6 +140,7 @@
|
|
|
140
140
|
},
|
|
141
141
|
"plugins": [
|
|
142
142
|
"apply-array-at",
|
|
143
|
+
"apply-await-import",
|
|
143
144
|
"apply-is-array",
|
|
144
145
|
"apply-destructuring",
|
|
145
146
|
"apply-optional-chaining",
|
|
@@ -186,6 +187,7 @@
|
|
|
186
187
|
"remove-useless-functions",
|
|
187
188
|
"remove-useless-template-expressions",
|
|
188
189
|
"remove-useless-for-of",
|
|
190
|
+
"remove-useless-array-entries",
|
|
189
191
|
"remove-constant-conditions",
|
|
190
192
|
"remove-boolean-from-assertions",
|
|
191
193
|
"remove-boolean-from-logical-expressions",
|