putout 21.3.0 → 22.0.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,38 @@
1
+ 2021.11.10, v22.0.0
2
+
3
+ feature:
4
+ - (putout) remove apply-filter-boolean from default install, use remove-useless-functions instead'
5
+
6
+
7
+ 2021.11.10, v21.6.0
8
+
9
+ feature:
10
+ - (package) @putout/plugin-remove-useless-functions v2.0.0
11
+ - (@putout/plugin-remove-useless-functions) drop support of node < 14
12
+ - (putout) apply-filter-boolean: disabled and will be removed in next major version
13
+ - (@putout/plugin-remove-useless-functions) add support of id
14
+ - (eslint-plugin-putout) add babel options from @putout/engine-parser for TypeScript and Markdown
15
+ - (@putout/engine-parser) export babel/options
16
+ - (@putout/plugin-tape) add-stop-all: add support of test.only(), test.skip()
17
+ - (@putout/plugin-tape) remove-stop-all: add support of test.only(), test.skip()
18
+
19
+
20
+ 2021.11.10, v21.5.0
21
+
22
+ feature:
23
+ - (putout) terminal: add support of WebStorm, VS Code
24
+ - (@putout/plugin-tape) add remove-stop-all
25
+ - (@putout/plugin-tape) add add-await-to-re-import
26
+ - (@putout/plugin-tape) add-stop-all: add support of async functions
27
+ - (eslint-plugin-putout) add add-newlines-between-types-in-union
28
+
29
+
30
+ 2021.11.08, v21.4.0
31
+
32
+ feature:
33
+ - (@putout/plugin-remove-duplicates-from-union) add
34
+
35
+
1
36
  2021.11.08, v21.3.0
2
37
 
3
38
  feature:
package/README.md CHANGED
@@ -48,6 +48,7 @@ Putout is a tool for identifying, reporting and fixing patterns found in JavaScr
48
48
  - remove `boolean` from `assertion`;
49
49
  - remove `boolean` from `logical expressions`;
50
50
  - remove `duplicates` from `logical expressions`;
51
+ - remove `duplicates` from TypeScript `Union`;
51
52
  - remove `unreachable code`;
52
53
  - remove `duplicate keys`;
53
54
  - remove useless `typescripts` types;
package/lib/cli/index.js CHANGED
@@ -16,6 +16,10 @@ const {version} = require('../../package.json');
16
16
 
17
17
  const simport = createSimport(__filename);
18
18
 
19
+ const {env} = process;
20
+ const isIDE = env.TERMINAL_EMULATOR || env.TERM_PROGRAM === 'vscode';
21
+ const chooseName = (name, resolvedName) => !isIDE ? name : resolvedName;
22
+
19
23
  const {
20
24
  runProcessors,
21
25
  getFilePatterns,
@@ -322,7 +326,7 @@ module.exports = async ({argv, halt, log, write, logError, readFile, writeFile})
322
326
  const formatterProxy = createFormatterProxy({
323
327
  report,
324
328
  formatterOptions,
325
- name,
329
+ name: chooseName(name, resolvedName),
326
330
  places,
327
331
  index: currentIndex,
328
332
  count: length,
@@ -372,7 +376,7 @@ module.exports = async ({argv, halt, log, write, logError, readFile, writeFile})
372
376
  const line = report(currentFormat, {
373
377
  report,
374
378
  formatterOptions,
375
- name,
379
+ name: chooseName(name, resolvedName),
376
380
  source: rawSource,
377
381
  places,
378
382
  index: currentIndex,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "putout",
3
- "version": "21.3.0",
3
+ "version": "22.0.0",
4
4
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
5
5
  "description": "🐊 Pluggable and configurable code transformer with built-in eslint, babel plugins and jscodeshift codemods support of js, jsx typescript, flow files, markdown, yaml and json",
6
6
  "homepage": "http://github.com/coderaiser/putout",
@@ -71,7 +71,6 @@
71
71
  "@putout/plugin-apply-array-at": "^1.0.0",
72
72
  "@putout/plugin-apply-as-type-assertions": "^1.0.0",
73
73
  "@putout/plugin-apply-destructuring": "^5.0.0",
74
- "@putout/plugin-apply-filter-boolean": "^1.0.0",
75
74
  "@putout/plugin-apply-if-condition": "^1.0.0",
76
75
  "@putout/plugin-apply-is-array": "^2.0.0",
77
76
  "@putout/plugin-apply-numeric-separators": "^1.0.0",
@@ -129,6 +128,7 @@
129
128
  "@putout/plugin-remove-duplicate-interface-keys": "^3.0.0",
130
129
  "@putout/plugin-remove-duplicate-keys": "^2.0.0",
131
130
  "@putout/plugin-remove-duplicates-from-logical-expressions": "^1.0.0",
131
+ "@putout/plugin-remove-duplicates-from-union": "^1.0.0",
132
132
  "@putout/plugin-remove-empty": "^6.0.0",
133
133
  "@putout/plugin-remove-iife": "^1.0.0",
134
134
  "@putout/plugin-remove-nested-blocks": "^4.0.0",
@@ -148,7 +148,7 @@
148
148
  "@putout/plugin-remove-useless-continue": "^1.0.0",
149
149
  "@putout/plugin-remove-useless-escape": "^1.0.0",
150
150
  "@putout/plugin-remove-useless-for-of": "^2.0.0",
151
- "@putout/plugin-remove-useless-functions": "^1.0.3",
151
+ "@putout/plugin-remove-useless-functions": "^2.0.0",
152
152
  "@putout/plugin-remove-useless-map": "^1.0.0",
153
153
  "@putout/plugin-remove-useless-mapped-types": "^1.0.0",
154
154
  "@putout/plugin-remove-useless-mapping-modifiers": "^1.0.0",
package/putout.json CHANGED
@@ -140,7 +140,6 @@
140
140
  },
141
141
  "plugins": [
142
142
  "apply-array-at",
143
- "apply-filter-boolean",
144
143
  "apply-is-array",
145
144
  "apply-destructuring",
146
145
  "apply-optional-chaining",
@@ -190,6 +189,7 @@
190
189
  "remove-constant-conditions",
191
190
  "remove-boolean-from-assertions",
192
191
  "remove-boolean-from-logical-expressions",
192
+ "remove-duplicates-from-union",
193
193
  "remove-duplicates-from-logical-expressions",
194
194
  "remove-duplicate-interface-keys",
195
195
  "remove-duplicate-case",