putout 42.21.0 → 42.22.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/ChangeLog CHANGED
@@ -1,3 +1,28 @@
1
+ 2026.10.23, v42.22.1
2
+
3
+ feature:
4
+ - f000a1715 eslint-plugin-putout: typescript/no-unused-vars: off
5
+ - ec9f20f78 putout: types: runners
6
+ - 620dfafc2 @putout/types: runners
7
+
8
+ 2026.10.23, v42.22.0
9
+
10
+ fix:
11
+ - 6132ee735 @putout/plugin-apply-push: duplicate declaration
12
+
13
+ feature:
14
+ - f55962b7b putout: runners: add
15
+ - 90b1a0898 @putout/engine-loader: runners: add
16
+ - c6152122b @putout/engine-runner: runners: add
17
+ - 044998c8d @putout/test: runners: add support
18
+ - 153aa035f @putout/engine-runner: build-plugin: move
19
+ - 13c71e873 @putout/engine-runner: buildPlugin: move out
20
+ - 2d5211922 @putout/engine-runner: buildPlugin
21
+ - 0effb21fe @putout/plugin-try-catch: finally: improve support
22
+ - 1ac4a8de8 @putout/plugin-logical-expressions: remove-useless-coalescing
23
+ - 041a48c24 @putout/plugin-apply-push: declared
24
+ - 6a2149311 @putout/plugin-apply-push: no-declaration
25
+
1
26
  2026.10.10, v42.21.0
2
27
 
3
28
  fix:
@@ -12,6 +12,7 @@ export const defaultOptions = (opts = {}) => {
12
12
  loadPluginsAsync = loader.loadPluginsAsync,
13
13
  runPlugins = runner.runPlugins,
14
14
  progress = createProgress(),
15
+ runners = {},
15
16
  } = opts;
16
17
 
17
18
  return {
@@ -24,5 +25,6 @@ export const defaultOptions = (opts = {}) => {
24
25
  loadPluginsAsync,
25
26
  runPlugins,
26
27
  progress,
28
+ runners,
27
29
  };
28
30
  };
package/lib/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import {Node} from '@putout/babel';
2
2
  import {PrinterOptions, ParseOptions} from '@putout/engine-parser';
3
- import {PutoutPlugin} from '@putout/types/plugin';
3
+ import {PutoutPlugin, Report} from '@putout/types/plugin';
4
4
 
5
5
  export type * from '@putout/types/plugin';
6
6
  export * as operator from '../types/operator.ts';
@@ -34,6 +34,21 @@ type RuleValue = RuleState | RuleTuple;
34
34
 
35
35
  export type Rules = Record<string, RuleValue>;
36
36
 
37
+ type Runners = Record<string, (item: {
38
+ plugin: {
39
+ report: Report;
40
+ [key: string]: unknown;
41
+ };
42
+ [key: string]: unknown;
43
+ }) => {
44
+ rule: string;
45
+ msg?: string;
46
+ options?: Record<string, unknown>;
47
+ plugin: {
48
+ report: Report;
49
+ };
50
+ }>;
51
+
37
52
  export type TransformOptions = {
38
53
  plugins?: (string | [string, Record<string, unknown>] | [string, PutoutPlugin])[];
39
54
  rules?: Rules;
@@ -41,6 +56,7 @@ export type TransformOptions = {
41
56
  fixCount?: number;
42
57
  parser?: string;
43
58
  printer?: PrinterConfig;
59
+ runners?: Runners;
44
60
  };
45
61
 
46
62
  type Options = ParseOptions & TransformOptions;
package/lib/transform.js CHANGED
@@ -16,6 +16,7 @@ export const transform = (ast, opts) => {
16
16
  loadPlugins,
17
17
  runPlugins,
18
18
  progress,
19
+ runners,
19
20
  } = opts;
20
21
 
21
22
  const [validationError] = tryCatch(validateRulesRelations, {
@@ -26,6 +27,7 @@ export const transform = (ast, opts) => {
26
27
  const plugins = loadPlugins({
27
28
  pluginNames,
28
29
  rules,
30
+ runners,
29
31
  });
30
32
 
31
33
  const places = runPlugins({
@@ -34,6 +36,7 @@ export const transform = (ast, opts) => {
34
36
  fixCount,
35
37
  plugins,
36
38
  progress,
39
+ runners,
37
40
  });
38
41
 
39
42
  return [
@@ -53,6 +56,7 @@ export const transformAsync = async (ast, opts) => {
53
56
  loadPluginsAsync,
54
57
  runPlugins,
55
58
  progress,
59
+ runners,
56
60
  } = opts;
57
61
 
58
62
  const [validationError] = tryCatch(validateRulesRelations, {
@@ -63,6 +67,7 @@ export const transformAsync = async (ast, opts) => {
63
67
  const plugins = await loadPluginsAsync({
64
68
  pluginNames,
65
69
  rules,
70
+ runners,
66
71
  });
67
72
 
68
73
  const places = runPlugins({
@@ -71,6 +76,7 @@ export const transformAsync = async (ast, opts) => {
71
76
  fixCount,
72
77
  plugins,
73
78
  progress,
79
+ runners,
74
80
  });
75
81
 
76
82
  return [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "putout",
3
- "version": "42.21.0",
3
+ "version": "42.22.1",
4
4
  "type": "module",
5
5
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
6
6
  "description": "🐊 Pluggable and configurable code transformer with built-in ESLint, Babel and support of js, jsx, typescript, flow, markdown, yaml and json",