@putout/plugin-putout 8.10.0 → 9.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.
|
@@ -5,12 +5,8 @@ const {compare} = require('putout').operator;
|
|
|
5
5
|
module.exports.report = () => 'Identifier should be used instead of empty destructuring';
|
|
6
6
|
|
|
7
7
|
module.exports.match = () => ({
|
|
8
|
-
'({}) => __body': (vars, path) =>
|
|
9
|
-
|
|
10
|
-
},
|
|
11
|
-
'({}, __a) => __body': (vars, path) => {
|
|
12
|
-
return findUp(path, 'module.exports.__a = __');
|
|
13
|
-
},
|
|
8
|
+
'({}) => __body': (vars, path) => findUp(path, 'module.exports.__a = __'),
|
|
9
|
+
'({}, __a) => __body': (vars, path) => findUp(path, 'module.exports.__a = __'),
|
|
14
10
|
});
|
|
15
11
|
|
|
16
12
|
module.exports.replace = () => ({
|
|
@@ -6,9 +6,7 @@ const {isESM} = operator;
|
|
|
6
6
|
module.exports.report = () => `Use 'createTest(import.meta.url)' instead of 'createTest(__dirname)'`;
|
|
7
7
|
|
|
8
8
|
module.exports.match = () => ({
|
|
9
|
-
'createTest(__dirname, __a)': (vars, path) =>
|
|
10
|
-
return isESM(path);
|
|
11
|
-
},
|
|
9
|
+
'createTest(__dirname, __a)': (vars, path) => isESM(path),
|
|
12
10
|
});
|
|
13
11
|
|
|
14
12
|
module.exports.replace = () => ({
|
package/lib/declare/operator.js
CHANGED
|
@@ -3,13 +3,17 @@
|
|
|
3
3
|
module.exports = {
|
|
4
4
|
operator: `import {operator} from 'putout'`,
|
|
5
5
|
compare: `const {compare} = operator`,
|
|
6
|
+
compareAll: `const {compareAll} = operator`,
|
|
7
|
+
compareAny: `const {compareAny} = operator`,
|
|
6
8
|
contains: `const {contains} = operator`,
|
|
7
9
|
traverse: `const {traverse} = operator`,
|
|
8
10
|
declare: `const {declare} = operator`,
|
|
9
11
|
isSimpleRegExp: `const {isSimpleRegExp} = operator`,
|
|
10
12
|
getTemplateValues: `const {getTemplateValues} = operator`,
|
|
11
13
|
addArgument: `const {addArgument} = operator`,
|
|
12
|
-
replaceWith: `const {replaceWith} =
|
|
13
|
-
|
|
14
|
+
replaceWith: `const {replaceWith} = operator`,
|
|
15
|
+
replaceWithMultiple: `const {replaceWithMultiple} = operator`,
|
|
16
|
+
getProperties: `const {getProperties} = operator`,
|
|
17
|
+
isESM: `const {isESM} = operator`,
|
|
14
18
|
};
|
|
15
19
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@putout/plugin-putout",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "9.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",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"nodemon": "^2.0.1"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"putout": ">=
|
|
50
|
+
"putout": ">=24"
|
|
51
51
|
},
|
|
52
52
|
"license": "MIT",
|
|
53
53
|
"engines": {
|