putout 26.16.1 → 26.19.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,29 @@
1
+ 2022.06.23, v26.19.0
2
+
3
+ feature:
4
+ - (@putout/plugin-convert-const-to-let) add
5
+ - (@putout/plugin-convert-for-each-to-for-of) add support of index
6
+ - (@putout/plugin-declare-before-reference) improve support of ancestry
7
+
8
+
9
+ 2022.06.22, v26.18.0
10
+
11
+ fix:
12
+ - (@putout/engine-loader) add putout to peerDependencies to make putout work when installed with pnpm (#106)
13
+
14
+
15
+ feature:
16
+ - (@putout/plugin-declare-imports-ifrst) add
17
+ - (@putout/plugin-try-catch) args: exclude bind
18
+ - (eslint-plugin-putout) add add-newline-before-return
19
+
20
+
21
+ 2022.06.21, v26.17.0
22
+
23
+ feature:
24
+ - (putout) ESM: disable strict-mode/add-missing
25
+
26
+
1
27
  2022.06.20, v26.16.1
2
28
 
3
29
  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`;
package/lib/cli/index.js CHANGED
@@ -168,6 +168,7 @@ module.exports = async ({argv, halt, log, write, logError, readFile, writeFile})
168
168
  if (args.help) {
169
169
  const help = require('./help');
170
170
  log(help());
171
+
171
172
  return exit();
172
173
  }
173
174
 
@@ -27,6 +27,7 @@ function esm() {
27
27
  match: {
28
28
  '*.js': {
29
29
  'convert-commonjs-to-esm': 'on',
30
+ 'strict-mode/add-missing': 'off',
30
31
  },
31
32
  '.eslintrc.json': {
32
33
  'eslint': 'on',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "putout",
3
- "version": "26.16.1",
3
+ "version": "26.19.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",
@@ -87,6 +87,7 @@
87
87
  "@putout/plugin-convert-commonjs-to-esm": "^9.0.0",
88
88
  "@putout/plugin-convert-comparison-to-boolean": "^3.0.0",
89
89
  "@putout/plugin-convert-concat-to-flat": "^1.0.0",
90
+ "@putout/plugin-convert-const-to-let": "^1.0.0",
90
91
  "@putout/plugin-convert-equal-to-strict-equal": "^1.0.0",
91
92
  "@putout/plugin-convert-esm-to-commonjs": "^5.0.0",
92
93
  "@putout/plugin-convert-for-each-to-for-of": "^7.0.0",
@@ -105,6 +106,7 @@
105
106
  "@putout/plugin-convert-to-arrow-function": "^3.0.0",
106
107
  "@putout/plugin-convert-typeof-to-is-type": "^2.0.0",
107
108
  "@putout/plugin-declare-before-reference": "^1.0.0",
109
+ "@putout/plugin-declare-imports-first": "^1.0.0",
108
110
  "@putout/plugin-declare-undefined-variables": "^7.0.0",
109
111
  "@putout/plugin-eslint": "^4.0.0",
110
112
  "@putout/plugin-extract-object-properties": "^8.0.0",
package/putout.json CHANGED
@@ -180,6 +180,7 @@
180
180
  "simplify-assignment",
181
181
  "simplify-logical-expressions",
182
182
  "simplify-ternary",
183
+ "convert-const-to-let",
183
184
  "convert-bitwise-to-logical",
184
185
  "convert-esm-to-commonjs",
185
186
  "convert-commonjs-to-esm",
@@ -209,8 +210,9 @@
209
210
  "merge-destructuring-properties",
210
211
  "merge-duplicate-imports",
211
212
  "merge-if-statements",
212
- "declare-undefined-variables",
213
+ "declare-imports-first",
213
214
  "declare-before-reference",
215
+ "declare-undefined-variables",
214
216
  "strict-mode",
215
217
  "putout",
216
218
  "putout-config",