@putout/engine-runner 24.1.0 → 24.1.2

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/debug.js CHANGED
@@ -7,7 +7,7 @@ module.exports.createDebug = (namespace) => {
7
7
 
8
8
  return new Proxy(log, {
9
9
  apply(target, thisArg, args) {
10
- global.__putout_debug(namespace, ...args);
10
+ global.__putout_debug?.(namespace, ...args);
11
11
  return target(...args);
12
12
  },
13
13
  get(target, prop) {
@@ -88,6 +88,7 @@ const getTraverse = ({scan, rule, progress}) => ({push, options}) => ({
88
88
  const trackFile = createTrackFile(fileProgress);
89
89
 
90
90
  runSimple(fromSimple, {
91
+ shouldConvert: true,
91
92
  path,
92
93
  rootPath,
93
94
  isSimple,
@@ -105,7 +106,7 @@ const getTraverse = ({scan, rule, progress}) => ({push, options}) => ({
105
106
  });
106
107
 
107
108
  runSimple(toSimple, {
108
- condition: isSimple(),
109
+ shouldConvert: isSimple(),
109
110
  path,
110
111
  rootPath,
111
112
  isSimple,
@@ -120,10 +121,10 @@ const runFix = ({fix, isSimple}) => (...a) => {
120
121
  return fix(...a);
121
122
  };
122
123
 
123
- function runSimple(plugin, {path, isSimple, condition = true}) {
124
+ function runSimple(plugin, {path, isSimple, shouldConvert = true}) {
124
125
  const {traverse, fix} = plugin;
125
126
 
126
- if (!condition)
127
+ if (!shouldConvert)
127
128
  return;
128
129
 
129
130
  const push = runFix({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/engine-runner",
3
- "version": "24.1.0",
3
+ "version": "24.1.2",
4
4
  "type": "commonjs",
5
5
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
6
6
  "description": "Run 🐊Putout plugins",