@putout/plugin-putout 12.6.0 → 12.7.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.
@@ -54,6 +54,11 @@ module.exports = (rootPath, key) => {
54
54
  return;
55
55
  }
56
56
 
57
+ if (/__args/.test(name)) {
58
+ path.node.name = getVar(name);
59
+ return;
60
+ }
61
+
57
62
  if (name === '__array') {
58
63
  if (path.parentPath.isVariableDeclarator())
59
64
  return replaceWith(path, ArrayPattern([]));
@@ -119,10 +119,7 @@ function parseKey(propertyPath) {
119
119
  Error(`Replace key cannot be computed: '${keyPath.toString()}'`),
120
120
  ];
121
121
 
122
- return [
123
- null,
124
- key,
125
- ];
122
+ return [null, key];
126
123
  }
127
124
 
128
125
  function hasMatch(path) {
@@ -23,4 +23,3 @@ module.exports.include = () => [
23
23
  'isNumberLiteral(__a)',
24
24
  'NumberLiteral(__a)',
25
25
  ];
26
-
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/plugin-putout",
3
- "version": "12.6.0",
3
+ "version": "12.7.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",