putout 22.7.0 → 22.9.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,62 @@
1
+ 2021.12.20, v22.9.0
2
+
3
+ fix:
4
+ - (@putout/plugin-putout) convert-replace-with: crawl
5
+
6
+ feature:
7
+ - (@putout/plugin-apply-await-import) exclude cases where parent not VariableDeclarator
8
+ - (@putout/plugin-apply-await-import) add
9
+ - (@putout/plugin-putout) declare: add replaceWith
10
+ - (@putout/plugin-tape) add-args: add support of async functions
11
+ - (package) ts-morph v13.0.2
12
+ - (@putout/plugin-declare-undefined-variables) add support of url
13
+ - (@putout/engine-loader) improve Yarn PnP support (#93)
14
+ - (@putout/plugin-remove-useless-return) improve handling of call expressions
15
+ - (@putout/plugin-tape) add-t-end: exclude case where callback used
16
+
17
+
18
+ 2021.12.16, v22.8.2
19
+
20
+ fix:
21
+ - (@putout/formatter-memory) memry -> memory
22
+
23
+ feature:
24
+ - (putout) options: ignore: add .pnp.*
25
+ - (@putout/engine-loader) improve support of Yarn PnP (#93)
26
+
27
+
28
+ 2021.12.15, v22.8.1
29
+
30
+ feature:
31
+ - (putout) config: ignore .yarn directory
32
+
33
+
34
+ 2021.12.15, v22.8.0
35
+
36
+ fix:
37
+ - (@putout/processor-css) disable property-no-vendor-prefix, selector-no-vendor-prefix
38
+ - (@putout/engine-parser) try-catch: devDependencies -> dependencies (#92)
39
+ - (@putout/operate) try-catch: dependencies -> devDependencies
40
+
41
+ feature:
42
+ - (putout) formatters: use chalk v4 to have support of Yarn PnP (https://github.com/yarnpkg/berry/issues/3843)
43
+ - (putout) add support of yarn PnP by formatters loader (#93)
44
+ - (@putout/engine-loader) add support of Yarn PnP (#93)
45
+ - (package) stylelint-config-standard v24.0.0
46
+ - (package) stylelint v14.1.0
47
+ - (@putout/operate) compute: nested MemberExpressions: extract -> compute
48
+ - (@putout/plugin-convert-typeof-to-is-type) exclude undefined undeclared
49
+ - (@putout/operate) compute: exclude values of MemberExpression that cannot be extracted
50
+ - (@putout/plugin-remove-useless-variables) for-of: add support of ArrayPattern
51
+ - (eslint-plugin-putout) wrap: add getSpacesAfterNode
52
+ - (@putout/plugin-putout) add apply-create-test
53
+ - (@putout/plugin-putout) add convert-dirname-to-url
54
+ - (@putout/operator-declare) use isESM from @putout/operate
55
+ - (@putout/operate) add isESM
56
+ - (@putout/formatter-progress-bar) add color constant
57
+ - (@putout/operate) compute: isSimbleMemberExpression: simplify object check: not MemberExpression, not CallExpression -> not computed and Identifier'
58
+
59
+
1
60
  2021.12.12, v22.7.0
2
61
 
3
62
  feature:
package/README.md CHANGED
@@ -86,6 +86,7 @@
86
86
  - apply `filter(Boolean)`;
87
87
  - apply [isArray](https://web.mit.edu/jwalden/www/isArray.html);
88
88
  - apply `if condition`;
89
+ - apply `await import`;
89
90
 
90
91
  ## Why?
91
92
 
@@ -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.7.0",
3
+ "version": "22.9.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",
@@ -69,6 +69,7 @@
69
69
  "@putout/operator-declare": "^2.0.0",
70
70
  "@putout/operator-regexp": "^1.0.0",
71
71
  "@putout/plugin-apply-array-at": "^1.0.0",
72
+ "@putout/plugin-apply-await-import": "^1.0.0",
72
73
  "@putout/plugin-apply-as-type-assertions": "^1.0.0",
73
74
  "@putout/plugin-apply-destructuring": "^5.0.0",
74
75
  "@putout/plugin-apply-if-condition": "^1.0.0",
package/putout.json CHANGED
@@ -102,6 +102,8 @@
102
102
  "**/node_modules",
103
103
  "**/fixture",
104
104
  "**/.nyc_output",
105
+ "**/.yarn",
106
+ "**/.pnp.*",
105
107
  "**/coverage",
106
108
  "**/dist",
107
109
  "**/dist-dev",
@@ -138,6 +140,7 @@
138
140
  },
139
141
  "plugins": [
140
142
  "apply-array-at",
143
+ "apply-await-import",
141
144
  "apply-is-array",
142
145
  "apply-destructuring",
143
146
  "apply-optional-chaining",