@putout/plugin-putout 11.4.0 → 11.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.
@@ -10,11 +10,19 @@ module.exports = addArgs({
10
10
  'test.only("__a", async (__args) => __body)',
11
11
  ],
12
12
  ],
13
+
13
14
  process: ['{process}', [
14
15
  'test("__a", async (__args) => __body)',
15
16
  'test.skip("__a", async (__args) => __body)',
16
17
  'test.only("__a", async (__args) => __body)',
17
18
  ],
18
19
  ],
20
+
21
+ noProcess: ['{noProcess}', [
22
+ 'test("__a", async (__args) => __body)',
23
+ 'test.skip("__a", async (__args) => __body)',
24
+ 'test.only("__a", async (__args) => __body)',
25
+ ],
26
+ ],
19
27
  });
20
28
 
@@ -6,17 +6,17 @@ const {
6
6
  types,
7
7
  } = require('putout');
8
8
 
9
- const {
10
- replaceWith,
11
- insertAfter,
12
- } = operator;
9
+ const fullstore = require('fullstore');
13
10
 
14
11
  const {
15
12
  Identifier,
16
13
  ObjectProperty,
17
14
  } = types;
18
15
 
19
- const fullstore = require('fullstore');
16
+ const {
17
+ replaceWith,
18
+ insertAfter,
19
+ } = operator;
20
20
 
21
21
  module.exports.report = () => {
22
22
  return `"operator.replaceWith" should be called instead of "path.replaceWith"`;
@@ -6,8 +6,9 @@ module.exports = {
6
6
  compareAll: `const {compareAll} = operator`,
7
7
  compareAny: `const {compareAny} = operator`,
8
8
  contains: `const {contains} = operator`,
9
- traverse: `const {traverse} = operator`,
10
9
  declare: `const {declare} = operator`,
10
+ extract: `const {extract} = operator`,
11
+ traverse: `const {traverse} = operator`,
11
12
  isSimpleRegExp: `const {isSimpleRegExp} = operator`,
12
13
  getTemplateValues: `const {getTemplateValues} = operator`,
13
14
  addArgs: `const {addArgs} = operator`,
@@ -21,13 +21,14 @@ const TRANSFORM = `
21
21
  const {
22
22
  Identifier,
23
23
  isIdentifier,
24
+ isObjectExpression,
24
25
  } = types;
25
26
 
26
27
  module.exports.report = () => 'Move require on top level';
27
28
 
28
29
  module.exports.match = () => ({
29
30
  [TEST]: ({__b}) => !isIdentifier(__b),
30
- [TRANSFORM]: ({__b}) => !isIdentifier(__b),
31
+ [TRANSFORM]: ({__b}) => !isIdentifier(__b) && !isObjectExpression(__b),
31
32
  });
32
33
 
33
34
  module.exports.replace = () => ({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/plugin-putout",
3
- "version": "11.4.0",
3
+ "version": "11.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",