@putout/plugin-putout 17.3.0 → 18.1.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.
@@ -3,8 +3,9 @@
3
3
  const {types, operator} = require('putout');
4
4
 
5
5
  const {compute, rename} = operator;
6
-
7
6
  const {Identifier} = types;
7
+
8
+ const isString = (a) => typeof a === 'string';
8
9
  const chooseType = (a) => a === '__ignore' ? '__array' : '__object';
9
10
 
10
11
  const getShortName = (a) => {
@@ -33,6 +34,9 @@ module.exports.traverse = ({push}) => ({
33
34
  if (!is)
34
35
  return;
35
36
 
37
+ if (!isString(value))
38
+ return;
39
+
36
40
  if (!value.includes('__putout_processor'))
37
41
  return;
38
42
 
@@ -84,6 +84,7 @@ module.exports.traverse = ({push}) => ({
84
84
  path,
85
85
  });
86
86
  },
87
+ '__.map(push)'() {},
87
88
  'push(__a)'(path) {
88
89
  const __aPath = path.get('arguments.0');
89
90
 
@@ -121,7 +122,7 @@ function isFilesystemPath(path) {
121
122
  if (!computed)
122
123
  return false;
123
124
 
124
- if (path.node.key.name !== '__filesystem')
125
+ if (path.node.key.name !== '__filesystem' && path.node.key.name !== 'FS')
125
126
  return false;
126
127
 
127
128
  return !path.parentPath.parentPath.isReturnStatement();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/plugin-putout",
3
- "version": "17.3.0",
3
+ "version": "18.1.0",
4
4
  "type": "commonjs",
5
5
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
6
6
  "description": "🐊Putout plugin helps with plugins development",
@@ -37,23 +37,23 @@
37
37
  "putout"
38
38
  ],
39
39
  "devDependencies": {
40
- "@putout/test": "^7.0.0",
40
+ "@putout/test": "^8.0.0",
41
41
  "c8": "^8.0.0",
42
42
  "eslint": "^8.0.1",
43
43
  "eslint-plugin-n": "^16.0.0",
44
- "eslint-plugin-putout": "^21.0.0",
44
+ "eslint-plugin-putout": "^22.0.0",
45
45
  "lerna": "^6.0.1",
46
- "madrun": "^9.0.0",
46
+ "madrun": "^10.0.0",
47
47
  "montag": "^1.2.1",
48
48
  "nodemon": "^3.0.1",
49
- "supertape": "^8.7.0"
49
+ "supertape": "^9.0.0"
50
50
  },
51
51
  "peerDependencies": {
52
- "putout": ">=33"
52
+ "putout": ">=34"
53
53
  },
54
54
  "license": "MIT",
55
55
  "engines": {
56
- "node": ">=16"
56
+ "node": ">=18"
57
57
  },
58
58
  "publishConfig": {
59
59
  "access": "public"