putout 38.0.7 → 38.0.9

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,74 @@
1
+ 2025.02.08, v38.0.9
2
+
3
+ fix:
4
+ - a5caadeb0 putout: get rid of sourceFileName
5
+ - 917e3cb49 @putout/operator-declare: rm unused check
6
+
7
+ feature:
8
+ - 49ca79f58 @putout/operator-declare: rm unused check
9
+ - 7e1a59001 @putout/compare: @putout/operate v13.0.0
10
+
11
+ 2025.02.06, v38.0.8
12
+
13
+ feature:
14
+ - 4269f7ad6 @putout/cli-process-file: @putout/operate v13.0.0
15
+ - 9a71fef9e @putout/operator-filesystem: drop support of 🐊 < 38
16
+ - a1a52770d @putout/operator-filesystem: @putout/operate v13.0.0
17
+ - f2d777785 @putout/engine-runner: @putout/operate v13.0.0
18
+ - f969a94bc putout: @putout/operator-ignore v2.0.0
19
+ - 3ac7372e5 @putout/operator-ignore: @putout/operate v13.0.0
20
+ - 961b4d737 @putout/plugin-filesystem: drop support of 🐊 < 38
21
+ - 883b1d69c @putout/plugin-filesystem: @putout/operate v13.0.0
22
+ - 613b55151 @putout/operator-add-args: @putout/compare v16.0.0
23
+ - 23f2ac211 @putout/operator-declare: @putout/operate v13.0.0
24
+ - 52551faf8 @putout/operator-declare: @putout/compare v16.0.0
25
+ - 4c736adab putout: @putout/traverse v12.0.0
26
+ - 90627cd70 @putout/traverse: @putout/compare v16.0.0
27
+ - 73169ee66 putout: @putout/engine-parser v12.0.0
28
+ - 3207f8fb1 @putout/operator-match-files: @putout/engine-parser v12.0.0
29
+ - b0e80c608 putout: @putout/operator-filesystem v6.0.0
30
+ - fa149fe34 @putout/operator-filesystem: @putout/engine-parser v12.0.0
31
+ - fc660f3d2 putout: @putout/cli-process-file v2.0.0
32
+ - f2af527ac @putout/cli-process-file: drop support of Flow
33
+ - 208b2ab01 putout: @putout/operator-declare v11.0.0
34
+ - 3049e07d4 @putout/operator-declare: drop support of 🐊 < 38
35
+ - 45dd802e8 @putout/operator-declare: @putout/engine-parser v12.0.0
36
+ - b5892c2f0 putout: @putout/operator-add-args v10.0.0
37
+ - 42a742372 @putout/operator-add-args: drop support of 🐊 < 38
38
+ - 3ad0c40a7 @putout/operator-add-args: @putout/engine-parser v12.0.0
39
+ - a363cd851 eslint-plugin-putout: @putout/engine-parser v12.0.0
40
+ - 7e804d899 putout: @putout/engine-runner v23.0.1
41
+ - c48edf3eb putout: @putout/compare v16.0.0
42
+ - 57b0233dd @putout/engine-runner: @putout/compare v16.0.0
43
+ - 1e43c45c2 @putout/engine-runner: @putout/engine-parser v12.0.0
44
+ - ac9a46a1f @putout/compare: @putout/engine-parser v12.0.0
45
+ - 22f168b30 putout: @putout/operate v13.0.0
46
+ - 43897393b putout: @putout/engine-parser v11.4.0
47
+ - 3ee67ae93 putout: @putout/plugin-remove-unused-variables v12.0.0
48
+ - d8c6f5199 putout: @putout/plugin-nodejs v13.1.1
49
+ - aa186521a putout: @putout/plugin-remove-empty v14.0.0
50
+ - 7796fa4d6 putout: @putout/plugin-remove-unused-expressions v11.0.0
51
+ - bb94b324b putout: @putout/plugin-remove-useless-spread v12.0.0
52
+ - 571e49674 putout: @putout/operator-keyword v2.0.0
53
+ - e90e45b5f @putout/plugin-remove-useless-spread: drop support of 🐊 < 38
54
+ - 034ac332d @putout/plugin-remove-useless-spread: drop support of recast
55
+ - c110a9b54 @putout/plugin-remove-unused-expressions: drop support 🐊 < 38
56
+ - fdd6c4a2b @putout/plugin-remove-empty: drop support of 🐊 < 38
57
+ - fe047333a @putout/plugin-remove-empty: drop support of recast
58
+ - 005b1d7ab @putout/plugin-putout: drop support of recast
59
+ - 925f0102c @putout/plugin-nodejs: drop support of 🐊 < 38
60
+ - f0ea8fa79 @putout/plugin-nodejs: drop support of recast
61
+ - 6e090d6bc @putout/operate: drop support of recast
62
+ - 8431e0ec1 putout: get rid of --flow
63
+ - c5fed41a4 @putout/plugin-remove-unused-variables: drop support of 🐊 < 38
64
+ - 9f1696e58 @putout/plugin-remove-unused-variables: drop support of flow
65
+ - f16737e5b @putout/operator-keyword: isTSKeyword: split reserved and unreserved
66
+ - 1da48c79c @putout/engine-parser: get rid of recast
67
+ - 93d6a4798 @putout/operator-keyword: class, extends, declare, mode, type
68
+ - 3f3144e42 @putout/eslint: NO_ESLINT: once
69
+ - b3ead03cb @putout/operator-keyword: isTSKeyword
70
+ - d7f61438d @putout/operator-keyword: readonly: add
71
+
1
72
  2025.02.05, v38.0.7
2
73
 
3
74
  fix:
package/README.md CHANGED
@@ -20,7 +20,6 @@ The main target is **JavaScript**, but:
20
20
 
21
21
  - ✅ JSX;
22
22
  - ✅ TypeScript;
23
- - ✅ Flow;
24
23
  - ✅ Yaml;
25
24
  - ✅ Markdown;
26
25
  - ✅ JSON;
@@ -189,7 +188,6 @@ Options:
189
188
  --enable-all enable all found rules and save them to '.putout.json' walking up parent directories
190
189
  --disable-all disable all found rules (set baseline) and save them to '.putout.json' walking up parent directories
191
190
  --match [pattern] read '.putout.json' and convert 'rules' to 'match' according to 'pattern'
192
- --flow enable flow
193
191
  --fresh generate a fresh cache
194
192
  --no-config avoid reading '.putout.json'
195
193
  --no-ci disable the CI detection
package/help.json CHANGED
@@ -14,7 +14,6 @@
14
14
  "--enable-all ": "enable all found rules and save them to '.putout.json' walking up parent directories",
15
15
  "--disable-all ": "disable all found rules (set baseline) and save them to '.putout.json' walking up parent directories",
16
16
  "--match [pattern] ": "read '.putout.json' and convert 'rules' to 'match' according to 'pattern'",
17
- "--flow ": "enable flow",
18
17
  "--fresh ": "generate a fresh cache",
19
18
  "--no-config ": "avoid reading '.putout.json'",
20
19
  "--no-ci ": "disable the CI detection",
package/lib/cli/index.js CHANGED
@@ -84,7 +84,6 @@ module.exports = async ({argv, halt, log, write, logError, readFile, writeFile,
84
84
  raw,
85
85
  rulesdir,
86
86
  format,
87
- flow: isFlow,
88
87
  disable,
89
88
  disableAll,
90
89
  enable,
@@ -242,7 +241,6 @@ module.exports = async ({argv, halt, log, write, logError, readFile, writeFile,
242
241
 
243
242
  const options = {
244
243
  fix,
245
- isFlow,
246
244
  fixCount,
247
245
  raw,
248
246
  ruler: {
package/lib/putout.js CHANGED
@@ -29,20 +29,15 @@ function putout(source, opts) {
29
29
  const {
30
30
  parser,
31
31
  isTS,
32
- isFlow,
33
32
  isJSX,
34
- sourceFileName,
35
- sourceMapName,
36
33
  printer,
37
34
  } = opts;
38
35
 
39
36
  const [clearSource, shebang] = cutShebang(source);
40
37
 
41
38
  const ast = parse(clearSource, {
42
- sourceFileName,
43
39
  parser,
44
40
  isTS,
45
- isFlow,
46
41
  isJSX,
47
42
  printer,
48
43
  });
@@ -56,7 +51,6 @@ function putout(source, opts) {
56
51
  };
57
52
 
58
53
  const printed = print(ast, {
59
- sourceMapName,
60
54
  printer,
61
55
  });
62
56
 
@@ -75,20 +69,15 @@ module.exports.putoutAsync = async (source, opts) => {
75
69
  const {
76
70
  parser,
77
71
  isTS,
78
- isFlow,
79
72
  isJSX,
80
- sourceFileName,
81
- sourceMapName,
82
73
  printer,
83
74
  } = opts;
84
75
 
85
76
  const [clearSource, shebang] = cutShebang(source);
86
77
 
87
78
  const ast = parse(clearSource, {
88
- sourceFileName,
89
79
  parser,
90
80
  isTS,
91
- isFlow,
92
81
  isJSX,
93
82
  printer,
94
83
  });
@@ -102,7 +91,6 @@ module.exports.putoutAsync = async (source, opts) => {
102
91
  };
103
92
 
104
93
  const printed = print(ast, {
105
- sourceMapName,
106
94
  printer,
107
95
  });
108
96
 
package/lib/shebang.js CHANGED
@@ -1,12 +1,10 @@
1
1
  'use strict';
2
2
 
3
- const maybeNewline = (a) => a[0] === '\n' ? a : `\n${a}`;
4
-
5
3
  module.exports.mergeShebang = (shebang, source) => {
6
4
  if (!shebang)
7
5
  return source;
8
6
 
9
- return shebang + maybeNewline(source);
7
+ return `${shebang}\n${source}`;
10
8
  };
11
9
 
12
10
  module.exports.cutShebang = (source) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "putout",
3
- "version": "38.0.7",
3
+ "version": "38.0.9",
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, Babel and support of js, jsx, typescript, flow, markdown, yaml and json",
@@ -56,16 +56,16 @@
56
56
  "@putout/cli-choose-formatter": "^4.0.0",
57
57
  "@putout/cli-keypress": "^2.0.0",
58
58
  "@putout/cli-match": "^2.0.0",
59
- "@putout/cli-process-file": "^1.0.0",
59
+ "@putout/cli-process-file": "^2.0.0",
60
60
  "@putout/cli-ruler": "^3.0.0",
61
61
  "@putout/cli-staged": "^1.0.0",
62
62
  "@putout/cli-validate-args": "^2.0.0",
63
- "@putout/compare": "^15.0.0",
63
+ "@putout/compare": "^16.0.0",
64
64
  "@putout/engine-loader": "^15.0.0",
65
- "@putout/engine-parser": "^11.0.0",
65
+ "@putout/engine-parser": "^12.0.0",
66
66
  "@putout/engine-processor": "^13.0.0",
67
67
  "@putout/engine-reporter": "^3.0.0",
68
- "@putout/engine-runner": "^22.0.0",
68
+ "@putout/engine-runner": "^23.0.1",
69
69
  "@putout/eslint": "^3.0.0",
70
70
  "@putout/formatter-codeframe": "^8.0.0",
71
71
  "@putout/formatter-dump": "^5.0.0",
@@ -77,13 +77,13 @@
77
77
  "@putout/formatter-progress-bar": "^4.0.0",
78
78
  "@putout/formatter-stream": "^5.0.0",
79
79
  "@putout/formatter-time": "^3.0.0",
80
- "@putout/operate": "^12.0.0",
81
- "@putout/operator-add-args": "^9.0.0",
82
- "@putout/operator-declare": "^10.0.0",
83
- "@putout/operator-filesystem": "^5.0.0",
84
- "@putout/operator-ignore": "^1.0.0",
80
+ "@putout/operate": "^13.0.0",
81
+ "@putout/operator-add-args": "^10.0.0",
82
+ "@putout/operator-declare": "^11.0.0",
83
+ "@putout/operator-filesystem": "^6.0.0",
84
+ "@putout/operator-ignore": "^2.0.0",
85
85
  "@putout/operator-json": "^2.0.0",
86
- "@putout/operator-keyword": "^1.0.0",
86
+ "@putout/operator-keyword": "^2.0.0",
87
87
  "@putout/operator-match-files": "^5.0.0",
88
88
  "@putout/operator-regexp": "^1.0.0",
89
89
  "@putout/operator-rename-files": "^2.0.0",
@@ -135,7 +135,7 @@
135
135
  "@putout/plugin-merge-duplicate-functions": "^2.0.0",
136
136
  "@putout/plugin-montag": "^3.0.0",
137
137
  "@putout/plugin-new": "^3.0.1",
138
- "@putout/plugin-nodejs": "^13.0.0",
138
+ "@putout/plugin-nodejs": "^13.1.1",
139
139
  "@putout/plugin-npmignore": "^5.0.0",
140
140
  "@putout/plugin-optional-chaining": "^1.0.1",
141
141
  "@putout/plugin-package-json": "^9.0.0",
@@ -149,16 +149,16 @@
149
149
  "@putout/plugin-remove-debugger": "^7.0.0",
150
150
  "@putout/plugin-remove-duplicate-case": "^3.0.0",
151
151
  "@putout/plugin-remove-duplicate-keys": "^6.0.0",
152
- "@putout/plugin-remove-empty": "^13.0.0",
152
+ "@putout/plugin-remove-empty": "^14.0.0",
153
153
  "@putout/plugin-remove-iife": "^4.0.0",
154
154
  "@putout/plugin-remove-nested-blocks": "^7.0.0",
155
155
  "@putout/plugin-remove-unreachable-code": "^2.0.0",
156
156
  "@putout/plugin-remove-unreferenced-variables": "^4.0.0",
157
- "@putout/plugin-remove-unused-expressions": "^10.0.0",
157
+ "@putout/plugin-remove-unused-expressions": "^11.0.0",
158
158
  "@putout/plugin-remove-unused-for-of-variables": "^3.0.0",
159
159
  "@putout/plugin-remove-unused-labels": "^1.0.1",
160
160
  "@putout/plugin-remove-unused-private-fields": "^2.0.0",
161
- "@putout/plugin-remove-unused-variables": "^11.0.0",
161
+ "@putout/plugin-remove-unused-variables": "^12.0.0",
162
162
  "@putout/plugin-remove-useless-arguments": "^10.0.0",
163
163
  "@putout/plugin-remove-useless-array": "^1.0.0",
164
164
  "@putout/plugin-remove-useless-array-constructor": "^2.0.0",
@@ -173,7 +173,7 @@
173
173
  "@putout/plugin-remove-useless-operand": "^2.0.0",
174
174
  "@putout/plugin-remove-useless-push": "^1.0.0",
175
175
  "@putout/plugin-remove-useless-replace": "^1.0.1",
176
- "@putout/plugin-remove-useless-spread": "^11.0.0",
176
+ "@putout/plugin-remove-useless-spread": "^12.0.0",
177
177
  "@putout/plugin-remove-useless-template-expressions": "^2.0.0",
178
178
  "@putout/plugin-remove-useless-variables": "^12.0.0",
179
179
  "@putout/plugin-return": "^1.0.0",
@@ -195,7 +195,7 @@
195
195
  "@putout/processor-json": "^9.0.0",
196
196
  "@putout/processor-markdown": "^12.0.0",
197
197
  "@putout/processor-yaml": "^8.0.0",
198
- "@putout/traverse": "^11.0.0",
198
+ "@putout/traverse": "^12.0.0",
199
199
  "ajv": "^8.8.2",
200
200
  "chalk": "^5.3.0",
201
201
  "ci-info": "^4.0.0",