no-mistakes 0.20.1 → 0.22.0
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 +6 -0
- package/index.d.ts +6 -1
- package/package.json +1 -1
- package/traversal-types.d.ts +50 -1
package/README.md
CHANGED
|
@@ -48,6 +48,12 @@ const {
|
|
|
48
48
|
files: ["src/utils.mts"],
|
|
49
49
|
include: "both",
|
|
50
50
|
});
|
|
51
|
+
const signatureImpact = await symbols({
|
|
52
|
+
root: process.cwd(),
|
|
53
|
+
files: ["src/utils.mts"],
|
|
54
|
+
mode: "signature-impact",
|
|
55
|
+
symbol: "parseDate",
|
|
56
|
+
});
|
|
51
57
|
const plan = await testsPlan({
|
|
52
58
|
root: process.cwd(),
|
|
53
59
|
framework: "vitest",
|
package/index.d.ts
CHANGED
|
@@ -15,8 +15,11 @@ import type {
|
|
|
15
15
|
ReactUsagesReport,
|
|
16
16
|
ReactViolation,
|
|
17
17
|
ServerRoutesReport,
|
|
18
|
+
SignatureImpactResult,
|
|
19
|
+
SymbolsListOptions,
|
|
18
20
|
SymbolsOptions,
|
|
19
21
|
SymbolsResult,
|
|
22
|
+
SymbolsSignatureImpactOptions,
|
|
20
23
|
TestGraph,
|
|
21
24
|
TestPlan,
|
|
22
25
|
TestsImpactOptions,
|
|
@@ -33,7 +36,9 @@ export function dependencies(options: TraverseOptions): Promise<DependencyResult
|
|
|
33
36
|
export function dependents(options: TraverseOptions): Promise<DependencyResult>;
|
|
34
37
|
export function related(options: TraverseOptions): Promise<DependencyResult>;
|
|
35
38
|
export function analyzeProject(options: AnalyzeProjectOptions): Promise<AnalyzeProjectResult>;
|
|
36
|
-
export function symbols(options:
|
|
39
|
+
export function symbols(options: SymbolsSignatureImpactOptions): Promise<SignatureImpactResult>;
|
|
40
|
+
export function symbols(options: SymbolsListOptions): Promise<SymbolsResult>;
|
|
41
|
+
export function symbols(options: SymbolsOptions): Promise<SymbolsResult | SignatureImpactResult>;
|
|
37
42
|
export function fetches(options?: FetchesOptions): Promise<unknown>;
|
|
38
43
|
export function check(options?: ProjectOptions): Promise<CheckReport>;
|
|
39
44
|
export function testsPlan(options: TestsPlanOptions): Promise<TestPlan>;
|
package/package.json
CHANGED
package/traversal-types.d.ts
CHANGED
|
@@ -68,10 +68,23 @@ export interface SymbolsOptions {
|
|
|
68
68
|
files: string[];
|
|
69
69
|
root?: string;
|
|
70
70
|
tsconfig?: string;
|
|
71
|
+
config?: string;
|
|
72
|
+
mode?: "list" | "signature-impact";
|
|
73
|
+
symbol?: string;
|
|
71
74
|
kinds?: ExportKind[];
|
|
72
75
|
include?: "exports" | "imports" | "both";
|
|
73
76
|
}
|
|
74
77
|
|
|
78
|
+
export type SymbolsListOptions = Omit<SymbolsOptions, "mode" | "symbol"> & {
|
|
79
|
+
mode?: "list";
|
|
80
|
+
symbol?: string;
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
export type SymbolsSignatureImpactOptions = SymbolsOptions & {
|
|
84
|
+
mode: "signature-impact";
|
|
85
|
+
symbol: string;
|
|
86
|
+
};
|
|
87
|
+
|
|
75
88
|
export interface SymbolExport {
|
|
76
89
|
name: string;
|
|
77
90
|
kind: string;
|
|
@@ -103,6 +116,42 @@ export interface SymbolsResult {
|
|
|
103
116
|
files: SymbolFile[];
|
|
104
117
|
}
|
|
105
118
|
|
|
119
|
+
export interface SignatureImpactLocation {
|
|
120
|
+
file: string;
|
|
121
|
+
symbol: string;
|
|
122
|
+
line: number;
|
|
123
|
+
kind: string;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export interface SignatureImpactCaller {
|
|
127
|
+
file: string;
|
|
128
|
+
symbol?: string;
|
|
129
|
+
depth: number;
|
|
130
|
+
via: string[];
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export interface SignatureImpactTest {
|
|
134
|
+
file: string;
|
|
135
|
+
depth: number;
|
|
136
|
+
via: string[];
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export interface SignatureImpactWarning {
|
|
140
|
+
type: string;
|
|
141
|
+
message: string;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export interface SignatureImpactResult {
|
|
145
|
+
roots: string[];
|
|
146
|
+
symbol: string;
|
|
147
|
+
definition: SignatureImpactLocation;
|
|
148
|
+
exports: SignatureImpactLocation[];
|
|
149
|
+
productionCallers: SignatureImpactCaller[];
|
|
150
|
+
testCallers: SignatureImpactCaller[];
|
|
151
|
+
suggestedTests: SignatureImpactTest[];
|
|
152
|
+
warnings: SignatureImpactWarning[];
|
|
153
|
+
}
|
|
154
|
+
|
|
106
155
|
export interface ProjectOptions {
|
|
107
156
|
root?: string;
|
|
108
157
|
tsconfig?: string;
|
|
@@ -136,7 +185,7 @@ export type AnalyzeProjectReportRequest =
|
|
|
136
185
|
TraverseOptions,
|
|
137
186
|
"root" | "tsconfig"
|
|
138
187
|
>)
|
|
139
|
-
| ({ type: "symbols"; id?: string } &
|
|
188
|
+
| ({ type: "symbols"; id?: string } & (SymbolsListOptions | SymbolsSignatureImpactOptions))
|
|
140
189
|
| ({ type: "queues" | "queueEdges" | "queueCheck"; id?: string } & BatchedProjectOptions)
|
|
141
190
|
| ({ type: "queueRelated"; id?: string } & BatchedQueueRelatedOptions)
|
|
142
191
|
| ({
|