@putout/engine-runner 28.1.0 → 28.1.1

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
@@ -53,7 +53,7 @@ export const replace = () => ({
53
53
  });
54
54
 
55
55
  // optional
56
- export const filter = (path) => {
56
+ export const filter = (path, {options}) => {
57
57
  return true;
58
58
  };
59
59
 
@@ -162,7 +162,7 @@ export const include = () => ['debugger'];
162
162
  export const exclude = () => {};
163
163
 
164
164
  // optional
165
- export const filter = (path) => {
165
+ export const filter = (path, {options}) => {
166
166
  return true;
167
167
  };
168
168
  ```
@@ -98,7 +98,7 @@ function getStore(plugin, {fix, rule, msg, options}) {
98
98
  const push = (path, pathOptions) => {
99
99
  const position = getPosition(path);
100
100
  const message = msg || plugin.report(path, {
101
- ...options,
101
+ options,
102
102
  ...pathOptions,
103
103
  });
104
104
 
package/lib/run-fix.js CHANGED
@@ -7,21 +7,12 @@ const isFn = (a) => typeof a === 'function';
7
7
  const getPath = (path) => path.path || path;
8
8
  const debug = createDebug('putout:runner:fix');
9
9
 
10
- const chooseFixArgs = ({path, pathOptions, options}) => {
11
- if (pathOptions)
12
- return [
13
- path,
14
- pathOptions, {
15
- options,
16
- },
17
- ];
18
-
19
- return [
20
- path, {
21
- options,
22
- },
23
- ];
24
- };
10
+ const chooseFixArgs = ({path, pathOptions, options}) => [
11
+ path, {
12
+ options,
13
+ ...pathOptions,
14
+ },
15
+ ];
25
16
 
26
17
  const tryToFix = (fix, {path, pathOptions, position, options}) => {
27
18
  const [e] = tryCatch(fix, ...chooseFixArgs({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/engine-runner",
3
- "version": "28.1.0",
3
+ "version": "28.1.1",
4
4
  "type": "module",
5
5
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
6
6
  "description": "Run 🐊Putout plugins",