@putout/plugin-putout 29.4.0 → 29.6.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.
@@ -12,11 +12,14 @@ export const {
12
12
  'test.skip("__a", async (__args) => __body)',
13
13
  'test.only("__a", async (__args) => __body)',
14
14
  ]],
15
- process: ['{process}', [
16
- 'test("__a", async (__args) => __body)',
17
- 'test.skip("__a", async (__args) => __body)',
18
- 'test.only("__a", async (__args) => __body)',
19
- ]],
15
+ process: ['{process}', {
16
+ type: 'call',
17
+ include: [
18
+ 'test("__a", async (__args) => __body)',
19
+ 'test.skip("__a", async (__args) => __body)',
20
+ 'test.only("__a", async (__args) => __body)',
21
+ ],
22
+ }],
20
23
  noProcess: ['{noProcess}', [
21
24
  'test("__a", async (__args) => __body)',
22
25
  'test.skip("__a", async (__args) => __body)',
@@ -1,8 +1,17 @@
1
1
  export const report = (path) => {
2
- const {value} = path.get('arguments.1').node;
2
+ const [first, second] = path.get('arguments');
3
+
4
+ if (second) {
5
+ const {value} = second.node;
6
+ return `Use \`{name: '${value}'}\` instead of '${value}'`;
7
+ }
8
+
9
+ const {value} = first.node;
10
+
3
11
  return `Use \`{name: '${value}'}\` instead of '${value}'`;
4
12
  };
5
13
 
6
14
  export const replace = () => ({
7
15
  'isIdentifier(__a, "__b")': 'isIdentifier(__a, {name: "__b"})',
16
+ '__a.isIdentifier("__b")': '__a.isIdentifier({name: "__b"})',
8
17
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/plugin-putout",
3
- "version": "29.4.0",
3
+ "version": "29.6.0",
4
4
  "type": "module",
5
5
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
6
6
  "description": "🐊Putout plugin helps with plugins development",
@@ -48,7 +48,7 @@
48
48
  "@putout/plugin-nodejs": "*",
49
49
  "@putout/plugin-tape": "*",
50
50
  "@putout/test": "^15.0.0",
51
- "c8": "^10.0.0",
51
+ "c8": "^11.0.0",
52
52
  "eslint": "^10.0.0",
53
53
  "eslint-plugin-n": "^17.0.0",
54
54
  "eslint-plugin-putout": "^31.0.0",