@putout/engine-runner 13.6.0 → 13.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.
- package/lib/merge-visitors.js +1 -0
- package/lib/replace/index.js +3 -3
- package/lib/run-fix.js +5 -1
- package/lib/store.js +1 -0
- package/package.json +2 -2
package/lib/merge-visitors.js
CHANGED
package/lib/replace/index.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const isString = (a) => typeof a === 'string';
|
|
4
|
-
|
|
5
3
|
const {template} = require('@putout/engine-parser');
|
|
4
|
+
|
|
6
5
|
const {
|
|
7
6
|
remove,
|
|
8
7
|
replaceWith,
|
|
@@ -14,9 +13,10 @@ const {
|
|
|
14
13
|
setValues,
|
|
15
14
|
} = require('@putout/compare');
|
|
16
15
|
const debug = require('debug')('putout:runner:replace');
|
|
17
|
-
|
|
18
16
|
const maybeArray = require('../maybe-array');
|
|
17
|
+
|
|
19
18
|
const watermark = require('./watermark');
|
|
19
|
+
const isString = (a) => typeof a === 'string';
|
|
20
20
|
|
|
21
21
|
const log = (from, path) => {
|
|
22
22
|
debug.enabled && debug(`${from} -> ${path}\n`);
|
package/lib/run-fix.js
CHANGED
|
@@ -4,7 +4,9 @@ const tryCatch = require('try-catch');
|
|
|
4
4
|
const debug = require('debug')('putout:runner:fix');
|
|
5
5
|
const {enabled} = debug;
|
|
6
6
|
const {stringify} = JSON;
|
|
7
|
+
|
|
7
8
|
const isFn = (a) => typeof a === 'function';
|
|
9
|
+
const getPath = (path) => path.path || path;
|
|
8
10
|
|
|
9
11
|
const tryToFix = (fix, {path, position, options}) => {
|
|
10
12
|
const [e] = tryCatch(fix, path, {options});
|
|
@@ -26,7 +28,9 @@ module.exports = (is, fix, {path, rule, position, options}) => {
|
|
|
26
28
|
if (!is)
|
|
27
29
|
return;
|
|
28
30
|
|
|
29
|
-
|
|
31
|
+
if (enabled)
|
|
32
|
+
debug(`fix: ${rule}`, position, getPath(path).toString());
|
|
33
|
+
|
|
30
34
|
validate('fix', fix);
|
|
31
35
|
|
|
32
36
|
tryToFix(fix, {
|
package/lib/store.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@putout/engine-runner",
|
|
3
|
-
"version": "13.
|
|
3
|
+
"version": "13.7.0",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
|
|
6
6
|
"description": "run putout plugins",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"eslint-plugin-node": "^11.0.0",
|
|
48
48
|
"eslint-plugin-putout": "^15.0.0",
|
|
49
49
|
"just-camel-case": "^4.0.2",
|
|
50
|
-
"lerna": "^
|
|
50
|
+
"lerna": "^5.0.0",
|
|
51
51
|
"madrun": "^9.0.0",
|
|
52
52
|
"mock-require": "^3.0.3",
|
|
53
53
|
"montag": "^1.0.0",
|