@putout/plugin-putout 20.10.0 → 21.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.
@@ -22,12 +22,14 @@ module.exports.match = () => ({
22
22
  if (__aPath.isBlockStatement())
23
23
  return false;
24
24
 
25
- for (const propertyPath of __aPath.get('properties')) {
26
- if (isPush(propertyPath) || isBlock(propertyPath))
27
- return true;
25
+ const properties = __aPath.get('properties');
26
+
27
+ for (const propertyPath of properties) {
28
+ if (!isPush(propertyPath) && !isBlock(propertyPath))
29
+ return false;
28
30
  }
29
31
 
30
- return false;
32
+ return true;
31
33
  },
32
34
  });
33
35
 
@@ -35,8 +37,9 @@ module.exports.replace = () => ({
35
37
  'module.exports.traverse = __a': (vars, path) => {
36
38
  const node = template.ast.fresh('module.exports.include = () => []');
37
39
  const __aPath = path.get('right.body');
40
+ const properties = __aPath.get('properties');
38
41
 
39
- for (const propertyPath of __aPath.get('properties')) {
42
+ for (const propertyPath of properties) {
40
43
  const name = getName(propertyPath);
41
44
 
42
45
  if (isPush(propertyPath) || isBlock(propertyPath)) {
@@ -1,7 +1,6 @@
1
1
  'use strict';
2
2
 
3
3
  const justCamelCase = require('just-camel-case');
4
-
5
4
  const {types, template} = require('putout');
6
5
 
7
6
  const TEST = `
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/plugin-putout",
3
- "version": "20.10.0",
3
+ "version": "21.0.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",
@@ -26,7 +26,7 @@
26
26
  },
27
27
  "dependencies": {
28
28
  "fullstore": "^3.0.0",
29
- "just-camel-case": "^6.0.1",
29
+ "just-camel-case": "^6.2.0",
30
30
  "parse-import-specifiers": "^1.0.2",
31
31
  "try-catch": "^3.0.0"
32
32
  },
@@ -38,11 +38,11 @@
38
38
  ],
39
39
  "devDependencies": {
40
40
  "@putout/plugin-tape": "*",
41
- "@putout/test": "^10.0.0",
41
+ "@putout/test": "^11.0.0",
42
42
  "c8": "^10.0.0",
43
43
  "eslint": "^9.0.0",
44
44
  "eslint-plugin-n": "^17.0.0",
45
- "eslint-plugin-putout": "^22.0.0",
45
+ "eslint-plugin-putout": "^23.0.0",
46
46
  "lerna": "^6.0.1",
47
47
  "madrun": "^10.0.0",
48
48
  "montag": "^1.2.1",
@@ -50,7 +50,7 @@
50
50
  "supertape": "^10.0.0"
51
51
  },
52
52
  "peerDependencies": {
53
- "putout": ">=35"
53
+ "putout": ">=36"
54
54
  },
55
55
  "license": "MIT",
56
56
  "engines": {