@putout/plugin-putout 12.3.0 → 12.5.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.
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # @putout/plugin-putout [![NPM version][NPMIMGURL]][NPMURL]
2
2
 
3
3
  [NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-putout.svg?style=flat&longCache=true
4
- [NPMURL]: https://npmjs.org/package/@putout/plugin-putout"npm"
4
+ [NPMURL]: https://npmjs.org/package/@putout/plugin-putout "npm"
5
5
 
6
6
  🐊[**Putout**](https://github.com/coderaiser/putout) plugin helps with plugins development.
7
7
 
@@ -80,7 +80,10 @@ module.exports = (rootPath, key) => {
80
80
  ],
81
81
  });
82
82
 
83
- return [transformError, result?.code];
83
+ return [
84
+ transformError,
85
+ result?.code,
86
+ ];
84
87
  };
85
88
 
86
89
  function createVarStore(path) {
@@ -119,7 +119,10 @@ function parseKey(propertyPath) {
119
119
  Error(`Replace key cannot be computed: '${keyPath.toString()}'`),
120
120
  ];
121
121
 
122
- return [null, key];
122
+ return [
123
+ null,
124
+ key,
125
+ ];
123
126
  }
124
127
 
125
128
  function hasMatch(path) {
@@ -9,11 +9,9 @@ const {
9
9
  const {StringLiteral} = types;
10
10
  const {compare} = operator;
11
11
 
12
- const isPush = (path) => path
13
- .get('value')
14
- .isIdentifier({
15
- name: 'push',
16
- });
12
+ const isPush = (path) => path.get('value').isIdentifier({
13
+ name: 'push',
14
+ });
17
15
 
18
16
  module.exports.report = () => 'Includer should be used instead of Traverser';
19
17
 
@@ -19,12 +19,11 @@ const {
19
19
  getProperty,
20
20
  } = operator;
21
21
 
22
- const selector = 'createTest(__dirname, __object)';
23
-
24
22
  module.exports.report = () => `Apply modifications to 'createTest()' options`;
25
23
 
26
24
  module.exports.include = () => [
27
- selector,
25
+ 'createTest(__dirname, __object)',
26
+ 'createTest(import.meta.url, __object)',
28
27
  ];
29
28
 
30
29
  module.exports.fix = (path, {options}) => {
@@ -20,4 +20,5 @@ module.exports = {
20
20
  isESM: `const {isESM} = operator`,
21
21
  getProperty: `const {getProperty} = operator`,
22
22
  getProperties: `const {getProperties} = operator`,
23
+ isSimple: `const {isSimple} = operator`,
23
24
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/plugin-putout",
3
- "version": "12.3.0",
3
+ "version": "12.5.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",