putout 42.7.3 → 42.7.5

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,16 @@
1
+ 2026.06.21, v42.7.5
2
+
3
+ feature:
4
+ - 9f0295ca1 @putout/operator-ignore: TS
5
+
6
+ 2026.06.21, v42.7.4
7
+
8
+ feature:
9
+ - 9e9180230 @putout/operator-jsx: add TS support
10
+ - 32d55e833 @putout/operator-json: add TS types
11
+ - bdec737f4 @putout/traverse: add TS types
12
+ - 9fa8b35ab @putout/plugin-variables: convert-const-to-let: exclude VariableDeclaration with VariableDeclarator without init inside ExportDeclaration
13
+
1
14
  2026.06.19, v42.7.3
2
15
 
3
16
  feature:
package/lib/index.d.ts CHANGED
@@ -5,6 +5,7 @@ import {
5
5
  } from '@putout/babel';
6
6
  import {PutoutPlugin} from '../types/plugins.ts';
7
7
 
8
+ export type * from '../types/plugins.ts';
8
9
  export * as operator from '../types/operator.ts';
9
10
 
10
11
  export declare function parse(source: string): Program;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "putout",
3
- "version": "42.7.3",
3
+ "version": "42.7.5",
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",
package/types/operator.ts CHANGED
@@ -1,3 +1,7 @@
1
1
  export * from '@putout/operate';
2
2
  export * from '@putout/compare';
3
+ export * from '@putout/traverse';
4
+ export * from '@putout/operator-json';
5
+ export * from '@putout/operator-jsx';
6
+ export * from '@putout/operator-ignore';
3
7
 
package/types/plugins.ts CHANGED
@@ -7,15 +7,27 @@ export type Traverse = (helpers: {
7
7
  pathStore: (path?: NodePath) => NodePath[];
8
8
  }) => Record<string, (path: NodePath) => void>;
9
9
 
10
- export interface PutoutPlugin {
10
+ export type Traverser = {
11
11
  report: Report;
12
- replace?: Replace;
13
- fix?: Fix;
14
- include?: Include;
12
+ traverse: Traverse;
13
+ fix: Fix;
14
+ };
15
+
16
+ export type Replacer = {
17
+ report: Report;
18
+ replace: Replace;
19
+ match?: Match;
20
+ };
21
+
22
+ export type Includer = {
23
+ report: Report;
24
+ fix: Fix;
25
+ include: Include;
15
26
  exclude?: Exclude;
16
27
  filter?: Filter;
17
- traverse?: Traverse;
18
- }
28
+ };
29
+
30
+ export type PutoutPlugin = Replacer | Includer | Traverser;
19
31
 
20
32
  export type Report = () => string;
21
33
 
@@ -23,9 +35,9 @@ export type Include = () => string[];
23
35
 
24
36
  export type Exclude = () => string[] | (() => boolean);
25
37
 
26
- export interface PluginOptions {
38
+ export type PluginOptions = {
27
39
  options?: Record<string, unknown>;
28
- }
40
+ };
29
41
 
30
42
  export type Filter = (path: NodePath, options: PluginOptions) => boolean;
31
43
 
@@ -34,3 +46,7 @@ export type Fix = (path: NodePath, options: PluginOptions) => void;
34
46
  type ReplaceResolver = (vars: Record<string, Node>, path: NodePath) => string | NodePath | '';
35
47
 
36
48
  export type Replace = () => Record<string, string | ReplaceResolver>;
49
+
50
+ type MatchResolver = (vars: Record<string, Node>, path: NodePath) => boolean;
51
+
52
+ export type Match = () => Record<string, MatchResolver>;