putout 42.7.6 → 42.7.8

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.23, v42.7.8
2
+
3
+ feature:
4
+ - 6743844d1 putout: types: operator
5
+ - 19cbce9fc @putout/operator-add-args: types
6
+
7
+ 2026.06.23, v42.7.7
8
+
9
+ feature:
10
+ - 0433b5d60 @putout/operator-ignore: simplify types
11
+ - 596691127 @putout/types: add
12
+ - 05044a596 @putout/engine-loader: diff-match-patch: drop
13
+
1
14
  2026.06.22, v42.7.6
2
15
 
3
16
  feature:
package/lib/index.d.ts CHANGED
@@ -1,24 +1,17 @@
1
- import {Program, Node} from '@putout/babel';
1
+ import {Node} from '@putout/babel';
2
2
  import {PrinterOptions, ParseOptions} from '@putout/engine-parser';
3
- import {PutoutPlugin} from '../types/plugins.ts';
4
- export type * from '../types/plugins.ts';
3
+ import {PutoutPlugin} from '@putout/types/plugin';
4
+
5
+ export type * from '@putout/types/plugin';
5
6
  export * as operator from '../types/operator.ts';
6
7
 
8
+ export * from '@putout/engine-parser';
7
9
  export type {
8
10
  PrinterOptions,
9
11
  ParseOptions,
10
12
  };
11
- export {traverse, types} from '@putout/babel';
12
-
13
- export function parse(source: string, options?: ParseOptions): Program;
14
13
 
15
- export function template(source: string, options?: Record<string, unknown>): (...args: unknown[]) => Node;
16
- export declare namespace template {
17
- export function ast(source: string, options?: Record<string, unknown>): Node;
18
- export function program(source: string, options?: Record<string, unknown>): (...args: unknown[]) => Node;
19
- export function extractExpression(node: Node): Node;
20
- }
21
- export function generate(node: Node, options?: Record<string, unknown>, sourceMaps?: Record<string, unknown>): string;
14
+ export {traverse, types} from '@putout/babel';
22
15
 
23
16
  type PutoutReturn = {
24
17
  code: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "putout",
3
- "version": "42.7.6",
3
+ "version": "42.7.8",
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",
@@ -188,6 +188,7 @@
188
188
  "@putout/processor-toml": "^1.0.0",
189
189
  "@putout/processor-yaml": "^10.0.0",
190
190
  "@putout/traverse": "^16.0.0",
191
+ "@putout/types": "^1.0.0",
191
192
  "ajv": "^8.8.2",
192
193
  "ci-info": "^4.0.0",
193
194
  "deepmerge": "^4.0.0",
package/types/operator.ts CHANGED
@@ -4,4 +4,5 @@ export * from '@putout/traverse';
4
4
  export * from '@putout/operator-json';
5
5
  export * from '@putout/operator-jsx';
6
6
  export * from '@putout/operator-ignore';
7
+ export * from '@putout/operator-add-args';
7
8
 
package/types/plugins.ts DELETED
@@ -1,52 +0,0 @@
1
- import {NodePath} from '@putout/babel';
2
-
3
- export type Traverse = (helpers: {
4
- push: (path: NodePath) => void;
5
- store: (key?: string, value?: unknown) => unknown;
6
- listStore: (path?: NodePath) => NodePath[];
7
- pathStore: (path?: NodePath) => NodePath[];
8
- }) => Record<string, (path: NodePath) => void>;
9
-
10
- export type Traverser = {
11
- report: Report;
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;
26
- exclude?: Exclude;
27
- filter?: Filter;
28
- };
29
-
30
- export type PutoutPlugin = Replacer | Includer | Traverser;
31
-
32
- export type Report = () => string;
33
-
34
- export type Include = () => string[];
35
-
36
- export type Exclude = () => string[] | (() => boolean);
37
-
38
- export type PluginOptions = {
39
- options?: Record<string, unknown>;
40
- };
41
-
42
- export type Filter = (path: NodePath, options: PluginOptions) => boolean;
43
-
44
- export type Fix = (path: NodePath, options: PluginOptions) => void;
45
-
46
- type ReplaceResolver = (vars: Record<string, Node>, path: NodePath) => string | NodePath | '';
47
-
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>;