putout 23.0.0 → 23.4.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,58 @@
1
+ 2021.12.29, v23.4.0
2
+
3
+ feature:
4
+ - (package) @putout/plugin-package-json v2.0.0
5
+ - (@putout/package-json) drop support of putout < 23
6
+ - (@putout/plugin-putout) declare: add findProperties
7
+ - (@putout/plugin-package-json) add add-type
8
+ - (@putout/operate) add findProperties
9
+
10
+
11
+ 2021.12.26, v23.3.0
12
+
13
+ feature:
14
+ - (package) @putout/operate v6.13.0
15
+ - (package) @putout/plugin-convert-typeof-to-is-type v2.0.0
16
+ - (@putout/plugin-convert-typeof-to-is-type) drop support of putout < 23
17
+ - (@putout/plugin-convert-typeof-to-is-type) add support of MemberExpression
18
+ - (@putout/operate) getBinding/getBindingPath: name: string -> name: string | Node'
19
+ - (@putout/plugin-putout) add includer
20
+
21
+
22
+ 2021.12.25, v23.2.0
23
+
24
+ feature:
25
+ - (package) @putout/plugin-reuse-duplicate-init v3.0.0
26
+ - (package) @putout/plugin-remove-unused-types v2.0.0
27
+ - (package) @putout/engine-runner v12.0.0
28
+ - (@putout/plugin-reuse-duplicate-init) drop support of putout < 23
29
+ - (@putout/plugin-reuse-duplicate-init) add support of MemberExpression
30
+ - (@putout/plugin-remove-unused-types) drop support of putout < 23
31
+ - (@putout/plugin-remove-unused-types) store -> upstore
32
+ - (@putout/engine-runner) add support of upstore
33
+ - (@putout/engine-runner) improve support of Program: exit + exclude
34
+ - (@putout/plugin-github) traverse-property: callback -> return array
35
+ - (putout) rules: exclude "not-rule-*" glob
36
+ - (@putout/rule-add-readme-to-homepage) add
37
+
38
+
39
+ 2021.12.23, v23.1.0
40
+
41
+ fix:
42
+ - (@putout/plugin-convert-for-to-for-of) entries: count i references (should be more then 3)
43
+
44
+ feature:
45
+ - (@putout/plugin-remove-useless-array-entries) add
46
+ - (@putout/plugin-convert-for-to-for-of) length: add support of destructuring
47
+ - (@putout/plugin-convert-for-to-for-of) entries: add support of destructuring
48
+ - (@putout/plugin-convert-for-to-for-of) add support of entries with declared n
49
+ - (@putout/plugin-convert-for-to-for-of) add support of entries
50
+ - (eslint-plugin-putout) no-unresolved: add support of export declarations
51
+ - (@putout/plugin-remove-useless-escape) set RegExp raw
52
+ - (@putout/plugin-remove-useless-escape) improve support of handling "," in RegExp
53
+ - (@putout/plugin-regexp) remove-useless-group: add support of Alternative
54
+
55
+
1
56
  2021.12.21, v23.0.0
2
57
 
3
58
  feature:
@@ -8,9 +63,9 @@ feature:
8
63
  - (putout) drop jscodeshift support
9
64
  - (@putout/engine-loader) drop support of jscodeshift
10
65
  - (putout) apply @putout/recast v1.5.1 modifications
11
- - (eslint-plugin-putout) putout: add ability parse error instead of throw
66
+ - (eslint-plugin-putout) putout: add ability parse error instead of throw
12
67
  - (eslint-plugin-putout) ts: add no-redeclare
13
- - (@putout/plugin-tape) add-await-to-re-import: add suport of nested blocks
68
+ - (@putout/plugin-tape) add-await-to-re-import: add support of nested blocks
14
69
 
15
70
 
16
71
  2021.12.20, v22.9.0
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,10 @@
1
1
  {
2
2
  "name": "putout",
3
- "version": "23.0.0",
3
+ "version": "23.4.0",
4
+ "type": "commonjs",
4
5
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
5
6
  "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",
7
+ "homepage": "http://github.com/coderaiser/putout#readme",
7
8
  "main": "./lib/putout.js",
8
9
  "exports": {
9
10
  ".": {
@@ -54,7 +55,7 @@
54
55
  "@putout/engine-loader": "^5.0.0",
55
56
  "@putout/engine-parser": "^4.0.0",
56
57
  "@putout/engine-processor": "^4.0.0",
57
- "@putout/engine-runner": "^11.0.0",
58
+ "@putout/engine-runner": "^12.0.0",
58
59
  "@putout/formatter-codeframe": "^3.0.0",
59
60
  "@putout/formatter-dump": "^3.0.0",
60
61
  "@putout/formatter-frame": "^2.0.0",
@@ -64,7 +65,7 @@
64
65
  "@putout/formatter-progress": "^3.0.0",
65
66
  "@putout/formatter-progress-bar": "^2.0.0",
66
67
  "@putout/formatter-stream": "^3.0.0",
67
- "@putout/operate": "^6.0.0",
68
+ "@putout/operate": "^6.13.0",
68
69
  "@putout/operator-add-args": "^1.0.0",
69
70
  "@putout/operator-declare": "^2.0.0",
70
71
  "@putout/operator-regexp": "^1.0.0",
@@ -102,7 +103,7 @@
102
103
  "@putout/plugin-convert-template-to-string": "^1.0.0",
103
104
  "@putout/plugin-convert-to-arrow-function": "^3.0.0",
104
105
  "@putout/plugin-convert-top-level-return": "^4.0.0",
105
- "@putout/plugin-convert-typeof-to-is-type": "^1.0.0",
106
+ "@putout/plugin-convert-typeof-to-is-type": "^2.0.0",
106
107
  "@putout/plugin-declare-undefined-variables": "^6.0.0",
107
108
  "@putout/plugin-eslint": "^2.0.0",
108
109
  "@putout/plugin-extract-object-properties": "^6.0.0",
@@ -115,7 +116,7 @@
115
116
  "@putout/plugin-merge-if-statements": "^3.0.0",
116
117
  "@putout/plugin-nodejs": "^1.0.0",
117
118
  "@putout/plugin-npmignore": "^2.0.0",
118
- "@putout/plugin-package-json": "^1.0.0",
119
+ "@putout/plugin-package-json": "^2.0.0",
119
120
  "@putout/plugin-promises": "^6.0.0",
120
121
  "@putout/plugin-putout": "^8.0.0",
121
122
  "@putout/plugin-putout-config": "^2.0.0",
@@ -139,10 +140,11 @@
139
140
  "@putout/plugin-remove-unused-expressions": "^4.0.0",
140
141
  "@putout/plugin-remove-unused-for-of-variables": "^1.0.0",
141
142
  "@putout/plugin-remove-unused-private-fields": "^1.0.0",
142
- "@putout/plugin-remove-unused-types": "^1.0.0",
143
+ "@putout/plugin-remove-unused-types": "^2.0.0",
143
144
  "@putout/plugin-remove-unused-variables": "*",
144
145
  "@putout/plugin-remove-useless-arguments": "^5.0.0",
145
146
  "@putout/plugin-remove-useless-array-constructor": "^1.0.0",
147
+ "@putout/plugin-remove-useless-array-entries": "^1.0.0",
146
148
  "@putout/plugin-remove-useless-array-from": "^2.0.0",
147
149
  "@putout/plugin-remove-useless-conditions": "^1.0.0",
148
150
  "@putout/plugin-remove-useless-constructor": "^1.0.0",
@@ -163,7 +165,7 @@
163
165
  "@putout/plugin-remove-useless-types": "^1.0.0",
164
166
  "@putout/plugin-remove-useless-types-from-constants": "^1.0.0",
165
167
  "@putout/plugin-remove-useless-variables": "^5.0.0",
166
- "@putout/plugin-reuse-duplicate-init": "^2.0.0",
168
+ "@putout/plugin-reuse-duplicate-init": "^3.0.0",
167
169
  "@putout/plugin-simplify-assignment": "^1.0.0",
168
170
  "@putout/plugin-simplify-logical-expressions": "^1.0.0",
169
171
  "@putout/plugin-simplify-ternary": "^2.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",