putout 26.17.0 → 26.20.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 +43 -0
- package/README.md +4 -0
- package/lib/cli/index.js +1 -0
- package/package.json +5 -2
- package/putout.json +4 -1
package/ChangeLog
CHANGED
|
@@ -1,3 +1,46 @@
|
|
|
1
|
+
2022.06.28, v26.20.0
|
|
2
|
+
|
|
3
|
+
fix:
|
|
4
|
+
- feature(@putout/engine-runner) run improve logging: determine nested level of path
|
|
5
|
+
- (@putout/operator-declare) module type get while find
|
|
6
|
+
- (@putout/plugin-declare-before-reference) no new line
|
|
7
|
+
- (@putout/plugin-convert-const-to-let) simplify
|
|
8
|
+
- (@putout/plugin-convert-const-to-let) report after transform
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
feature:
|
|
12
|
+
- (package) @putout/plugin-simplify-logical-expressions v3.0.0
|
|
13
|
+
- (@putout/plugin-simplify-logical-expressions) drop support of 🐊 < 26
|
|
14
|
+
- (@putout/eslint-config) yoda: disabled, @putout/apply-comparison-order used instead
|
|
15
|
+
- (@putout/plugin-apply-comparison-order) add
|
|
16
|
+
- (@putout/plugin-simplify-logical-expressions) add support of comparison with [], {}
|
|
17
|
+
- (eslint-plugin-putout) add-newline-before-return: improve loop: for begin -> from end
|
|
18
|
+
- (@putout/plugin-try-catch) add support of no error param
|
|
19
|
+
- (@putout/engine-runner) run fix: improve logging: determine nested level of path
|
|
20
|
+
- (@putout/eslint-config) padding-if: always: before and after
|
|
21
|
+
- (@putout/plugin-convert-const-to-let) improve support of multiple
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
2022.06.23, v26.19.0
|
|
25
|
+
|
|
26
|
+
feature:
|
|
27
|
+
- (@putout/plugin-convert-const-to-let) add
|
|
28
|
+
- (@putout/plugin-convert-for-each-to-for-of) add support of index
|
|
29
|
+
- (@putout/plugin-declare-before-reference) improve support of ancestry
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
2022.06.22, v26.18.0
|
|
33
|
+
|
|
34
|
+
fix:
|
|
35
|
+
- (@putout/engine-loader) add putout to peerDependencies to make putout work when installed with pnpm (#106)
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
feature:
|
|
39
|
+
- (@putout/plugin-declare-imports-ifrst) add
|
|
40
|
+
- (@putout/plugin-try-catch) args: exclude bind
|
|
41
|
+
- (eslint-plugin-putout) add add-newline-before-return
|
|
42
|
+
|
|
43
|
+
|
|
1
44
|
2022.06.21, v26.17.0
|
|
2
45
|
|
|
3
46
|
feature:
|
package/README.md
CHANGED
|
@@ -116,6 +116,7 @@ module.exports.replace = () => ({
|
|
|
116
116
|
- ✅ simplify `ternary`;
|
|
117
117
|
- ✅ simplify `logical expressions`;
|
|
118
118
|
- ✅ if absent `strict mode` directive in `commonjs` add it;
|
|
119
|
+
- ✅ convert `const` to `let` (when needed to avoid `TypeError`);
|
|
119
120
|
- ✅ convert `apply` to `spread`;
|
|
120
121
|
- ✅ convert `bitwise` to `logical` operator;
|
|
121
122
|
- ✅ convert `concat` to `flat`;
|
|
@@ -135,7 +136,9 @@ module.exports.replace = () => ({
|
|
|
135
136
|
- ✅ add `return await`;
|
|
136
137
|
- ✅ remove useless `Promise.resolve`;
|
|
137
138
|
- ✅ convert `Promise.reject` to `throw`;
|
|
139
|
+
- ✅ declare before `reference`;
|
|
138
140
|
- ✅ declare `undefined variables`;
|
|
141
|
+
- ✅ declare `imports` first;
|
|
139
142
|
- ✅ apply `as` type assertions;
|
|
140
143
|
- ✅ apply `utility types`;
|
|
141
144
|
- ✅ apply `array.at`;
|
|
@@ -143,6 +146,7 @@ module.exports.replace = () => ({
|
|
|
143
146
|
- ✅ apply [isArray](https://web.mit.edu/jwalden/www/isArray.html);
|
|
144
147
|
- ✅ apply `if condition`;
|
|
145
148
|
- ✅ apply `await import`;
|
|
149
|
+
- ✅ apply comparison order;
|
|
146
150
|
|
|
147
151
|
## Install
|
|
148
152
|
|
package/lib/cli/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "putout",
|
|
3
|
-
"version": "26.
|
|
3
|
+
"version": "26.20.0",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
|
|
6
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",
|
|
@@ -71,6 +71,7 @@
|
|
|
71
71
|
"@putout/operator-declare": "^4.0.0",
|
|
72
72
|
"@putout/operator-regexp": "^1.0.0",
|
|
73
73
|
"@putout/plugin-apply-array-at": "^2.0.0",
|
|
74
|
+
"@putout/plugin-apply-comparison-order": "^1.0.0",
|
|
74
75
|
"@putout/plugin-apply-destructuring": "^5.0.0",
|
|
75
76
|
"@putout/plugin-apply-early-return": "^2.0.0",
|
|
76
77
|
"@putout/plugin-apply-if-condition": "^1.0.0",
|
|
@@ -87,6 +88,7 @@
|
|
|
87
88
|
"@putout/plugin-convert-commonjs-to-esm": "^9.0.0",
|
|
88
89
|
"@putout/plugin-convert-comparison-to-boolean": "^3.0.0",
|
|
89
90
|
"@putout/plugin-convert-concat-to-flat": "^1.0.0",
|
|
91
|
+
"@putout/plugin-convert-const-to-let": "^1.0.0",
|
|
90
92
|
"@putout/plugin-convert-equal-to-strict-equal": "^1.0.0",
|
|
91
93
|
"@putout/plugin-convert-esm-to-commonjs": "^5.0.0",
|
|
92
94
|
"@putout/plugin-convert-for-each-to-for-of": "^7.0.0",
|
|
@@ -105,6 +107,7 @@
|
|
|
105
107
|
"@putout/plugin-convert-to-arrow-function": "^3.0.0",
|
|
106
108
|
"@putout/plugin-convert-typeof-to-is-type": "^2.0.0",
|
|
107
109
|
"@putout/plugin-declare-before-reference": "^1.0.0",
|
|
110
|
+
"@putout/plugin-declare-imports-first": "^1.0.0",
|
|
108
111
|
"@putout/plugin-declare-undefined-variables": "^7.0.0",
|
|
109
112
|
"@putout/plugin-eslint": "^4.0.0",
|
|
110
113
|
"@putout/plugin-extract-object-properties": "^8.0.0",
|
|
@@ -164,7 +167,7 @@
|
|
|
164
167
|
"@putout/plugin-remove-useless-variables": "^7.0.0",
|
|
165
168
|
"@putout/plugin-reuse-duplicate-init": "^4.0.0",
|
|
166
169
|
"@putout/plugin-simplify-assignment": "^1.0.0",
|
|
167
|
-
"@putout/plugin-simplify-logical-expressions": "^
|
|
170
|
+
"@putout/plugin-simplify-logical-expressions": "^3.0.0",
|
|
168
171
|
"@putout/plugin-simplify-ternary": "^3.0.0",
|
|
169
172
|
"@putout/plugin-split-nested-destructuring": "^1.0.0",
|
|
170
173
|
"@putout/plugin-split-variable-declarations": "^2.0.0",
|
package/putout.json
CHANGED
|
@@ -130,6 +130,7 @@
|
|
|
130
130
|
"apply-optional-chaining",
|
|
131
131
|
"apply-numeric-separators",
|
|
132
132
|
"apply-if-condition",
|
|
133
|
+
"apply-comparison-order",
|
|
133
134
|
"extract-object-properties",
|
|
134
135
|
"extract-sequence-expressions",
|
|
135
136
|
"madrun",
|
|
@@ -180,6 +181,7 @@
|
|
|
180
181
|
"simplify-assignment",
|
|
181
182
|
"simplify-logical-expressions",
|
|
182
183
|
"simplify-ternary",
|
|
184
|
+
"convert-const-to-let",
|
|
183
185
|
"convert-bitwise-to-logical",
|
|
184
186
|
"convert-esm-to-commonjs",
|
|
185
187
|
"convert-commonjs-to-esm",
|
|
@@ -209,8 +211,9 @@
|
|
|
209
211
|
"merge-destructuring-properties",
|
|
210
212
|
"merge-duplicate-imports",
|
|
211
213
|
"merge-if-statements",
|
|
212
|
-
"declare-
|
|
214
|
+
"declare-imports-first",
|
|
213
215
|
"declare-before-reference",
|
|
216
|
+
"declare-undefined-variables",
|
|
214
217
|
"strict-mode",
|
|
215
218
|
"putout",
|
|
216
219
|
"putout-config",
|