putout 22.6.1 → 22.8.1

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,73 @@
1
+ 2021.12.15, v22.8.1
2
+
3
+ feature:
4
+ - (putout) config: ignore .yarn directory
5
+
6
+
7
+ 2021.12.15, v22.8.0
8
+
9
+ fix:
10
+ - (@putout/processor-css) disable property-no-vendor-prefix, selector-no-vendor-prefix
11
+ - (@putout/engine-parser) try-catch: devDependencies -> dependencies (#92)
12
+ - (@putout/operate) try-catch: dependencies -> devDependencies
13
+
14
+ feature:
15
+ - (putout) formatters: use chalk v4 to have support of Yarn PnP (https://github.com/yarnpkg/berry/issues/3843)
16
+ - (putout) add support of yarn PnP by formatters loader (#93)
17
+ - (@putout/engine-loader) add support of Yarn PnP (#93)
18
+ - (package) stylelint-config-standard v24.0.0
19
+ - (package) stylelint v14.1.0
20
+ - (@putout/operate) compute: nested MemberExpressions: extract -> compute
21
+ - (@putout/plugin-convert-typeof-to-is-type) exclude undefined undeclared
22
+ - (@putout/operate) compute: exclude values of MemberExpression that cannot be extracted
23
+ - (@putout/plugin-remove-useless-variables) for-of: add support of ArrayPattern
24
+ - (eslint-plugin-putout) wrap: add getSpacesAfterNode
25
+ - (@putout/plugin-putout) add apply-create-test
26
+ - (@putout/plugin-putout) add convert-dirname-to-url
27
+ - (@putout/operator-declare) use isESM from @putout/operate
28
+ - (@putout/operate) add isESM
29
+ - (@putout/formatter-progress-bar) add color constant
30
+ - (@putout/operate) compute: isSimbleMemberExpression: simplify object check: not MemberExpression, not CallExpression -> not computed and Identifier'
31
+
32
+
33
+ 2021.12.12, v22.7.0
34
+
35
+ feature:
36
+ - (package) @putout/plugin-convert-comparison-to-boolean v2.0.0
37
+ - (@putout/operate) compute: add support of evaluate
38
+ - (@putout/plugin-convert-comparison-to-boolean) improve support of member expressions
39
+ - (@putout/plugin-convert-comparison-to-boolean) drop support of putout < 22
40
+ - (@putout/plugin-putout) check-replace-code: simplify
41
+ - (@putout/operate) compute: add support of Literal
42
+ - (@putout/plugin-putout) check-replace-code: use compute from operate
43
+ - (@putout/operate) add compute
44
+ - (@putout/plugin-putout) check-replace-code: add support of MemberExpression in computed property
45
+ - (@putout/plugin-convert-typeof-to-is-type) use getBindingPath from operate
46
+ - (@putout/operate) add getBinding, getBindingPath
47
+ - (@putout/operate) add getBinding
48
+ - (@putout/engine-runner) replace: validation output: ["__b"] ["__a"] -> ["__a"] -> ["__b"]
49
+ - (@putout/plugin-putout) add move-require-on-top-level
50
+ - (@putout/test) add support of createTest
51
+ - (@putout/engine-loader) is-enabled: use isBool
52
+ - (@putout/plugin-convert-typeof-to-is-type) improve binding search
53
+ - (@putout/plugin-putout) check-replace-code: exclude computed keys
54
+ - (@putout/plugin-convert-typeof-to-is-type) add support of isSymbol
55
+ - (@putout/plugin-declare-undefined-variables) add support of isSymbol
56
+
57
+ 2021.12.09, v22.6.2
58
+
59
+ fix:
60
+ - (eslint-plugin-putout) putout: traverse: use faster version
61
+
62
+ feature:
63
+ - (package) @putout/plugin-remove-useless-return v4.0.0
64
+ - (eslint-plugin-putout) safe: disable no-useless-return
65
+ - (@putout/plugin-remove-useless-return) report: Useless "return" should be avoided -> Avoid useless "return"
66
+ - (@putout/eslint-config) add space-in-parens
67
+ - (eslint-plugin-putout) putout: simplify according to https://github.com/eslint/eslint/issues/15394#issuecomment-989410995
68
+ - (package) @babel/traverse v7.16.3
69
+
70
+
1
71
  2021.12.08, v22.6.1
2
72
 
3
73
  fix:
@@ -1,6 +1,5 @@
1
1
  'use strict';
2
2
 
3
- const {createSimport} = require('simport');
4
3
  const tryToCatch = require('try-to-catch');
5
4
 
6
5
  const {
@@ -8,7 +7,8 @@ const {
8
7
  CANNOT_LOAD_FORMATTER,
9
8
  } = require('./exit-codes');
10
9
 
11
- const simport = createSimport(__filename);
10
+ const simpleImport = require('./simple-import');
11
+
12
12
  const stub = () => () => {};
13
13
 
14
14
  const {isArray} = Array;
@@ -48,7 +48,7 @@ async function loadFormatter(names) {
48
48
  let reporter;
49
49
 
50
50
  for (const name of names) {
51
- [e, reporter] = await tryToCatch(simport, name);
51
+ [e, reporter] = await tryToCatch(simpleImport, name);
52
52
 
53
53
  if (!e)
54
54
  return [null, reporter];
@@ -69,3 +69,4 @@ async function loadFormatter(names) {
69
69
 
70
70
  return [e];
71
71
  }
72
+
@@ -0,0 +1,7 @@
1
+ 'use strict';
2
+
3
+ // yarn doesn't understand how simport works
4
+ // https://github.com/coderaiser/putout/issues/93
5
+
6
+ module.exports = async (url) => (await import(url)).default;
7
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "putout",
3
- "version": "22.6.1",
3
+ "version": "22.8.1",
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",
@@ -84,7 +84,7 @@
84
84
  "@putout/plugin-convert-assignment-to-comparison": "^1.0.0",
85
85
  "@putout/plugin-convert-bitwise-to-logical": "^1.0.0",
86
86
  "@putout/plugin-convert-commonjs-to-esm": "^6.0.0",
87
- "@putout/plugin-convert-comparison-to-boolean": "^1.0.0",
87
+ "@putout/plugin-convert-comparison-to-boolean": "^2.0.0",
88
88
  "@putout/plugin-convert-concat-to-flat": "^1.0.0",
89
89
  "@putout/plugin-convert-equal-to-strict-equal": "^1.0.0",
90
90
  "@putout/plugin-convert-esm-to-commonjs": "^3.0.0",
@@ -154,7 +154,7 @@
154
154
  "@putout/plugin-remove-useless-mapping-modifiers": "^1.0.0",
155
155
  "@putout/plugin-remove-useless-new": "^1.0.0",
156
156
  "@putout/plugin-remove-useless-operand": "^1.0.0",
157
- "@putout/plugin-remove-useless-return": "^3.0.0",
157
+ "@putout/plugin-remove-useless-return": "^4.0.0",
158
158
  "@putout/plugin-remove-useless-spread": "^5.0.0",
159
159
  "@putout/plugin-remove-useless-template-expressions": "^1.0.0",
160
160
  "@putout/plugin-remove-useless-type-conversion": "^1.0.0",
package/putout.json CHANGED
@@ -102,6 +102,7 @@
102
102
  "**/node_modules",
103
103
  "**/fixture",
104
104
  "**/.nyc_output",
105
+ "**/.yarn",
105
106
  "**/coverage",
106
107
  "**/dist",
107
108
  "**/dist-dev",