no-mistakes 0.31.6 → 0.32.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/analyze-project-types.d.ts +71 -0
- package/ci-types.d.ts +9 -0
- package/package.json +1 -1
- package/traversal-types.d.ts +1 -53
- package/types.d.ts +1 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import type { FlowOptions } from "./flow-types";
|
|
2
|
+
import type { ImportUsagesOptions } from "./import-usage-types";
|
|
3
|
+
import type {
|
|
4
|
+
EffectsOptions,
|
|
5
|
+
EffectsReport,
|
|
6
|
+
RscCallersOptions,
|
|
7
|
+
RscCallersReport,
|
|
8
|
+
} from "./named-query-types";
|
|
9
|
+
import type { PlaywrightOptions, PlaywrightRelatedOptions } from "./report-types";
|
|
10
|
+
import type {
|
|
11
|
+
ProjectOptions,
|
|
12
|
+
SymbolsListOptions,
|
|
13
|
+
SymbolsSignatureImpactOptions,
|
|
14
|
+
TraverseOptions,
|
|
15
|
+
} from "./traversal-types";
|
|
16
|
+
|
|
17
|
+
type BatchedProjectOptions = Omit<ProjectOptions, "root" | "tsconfig" | "config">;
|
|
18
|
+
type BatchedFlowOptions = Omit<FlowOptions, "root" | "tsconfig" | "config">;
|
|
19
|
+
type BatchedTraverseOptions = TraverseOptions & Pick<ProjectOptions, "config">;
|
|
20
|
+
type BatchedQueueRelatedOptions = BatchedProjectOptions & { files: string[] };
|
|
21
|
+
type BatchedServerRouteRelatedOptions = BatchedProjectOptions &
|
|
22
|
+
({ files: string[] } | { roots: string[] });
|
|
23
|
+
type BatchedReactUsagesOptions = Pick<
|
|
24
|
+
ProjectOptions,
|
|
25
|
+
"root" | "tsconfig" | "config" | "targets" | "include"
|
|
26
|
+
> &
|
|
27
|
+
Required<Pick<ProjectOptions, "target">>;
|
|
28
|
+
type BatchedCheckOptions = Pick<ProjectOptions, "root" | "tsconfig" | "config">;
|
|
29
|
+
|
|
30
|
+
export type AnalyzeProjectReportRequest =
|
|
31
|
+
| ({ type: "dependencies" | "dependents" | "related"; id?: string } & BatchedTraverseOptions)
|
|
32
|
+
| ({ type: "symbols"; id?: string } & (SymbolsListOptions | SymbolsSignatureImpactOptions))
|
|
33
|
+
| ({ type: "importUsages"; id?: string } & Omit<ImportUsagesOptions, "root">)
|
|
34
|
+
| ({ type: "flow"; id?: string } & BatchedFlowOptions)
|
|
35
|
+
| ({ type: "effects"; id?: string } & Omit<EffectsOptions, "root" | "tsconfig" | "config">)
|
|
36
|
+
| ({ type: "rscCallers"; id?: string } & Omit<RscCallersOptions, "root" | "tsconfig" | "config">)
|
|
37
|
+
| ({ type: "queues" | "queueEdges" | "queueCheck"; id?: string } & BatchedProjectOptions)
|
|
38
|
+
| ({ type: "queueRelated"; id?: string } & BatchedQueueRelatedOptions)
|
|
39
|
+
| ({
|
|
40
|
+
type: "serverRoutes" | "serverRouteList" | "serverRouteEdges";
|
|
41
|
+
id?: string;
|
|
42
|
+
} & BatchedProjectOptions)
|
|
43
|
+
| ({ type: "serverContracts"; id?: string } & BatchedProjectOptions)
|
|
44
|
+
| ({ type: "serverRouteRelated"; id?: string } & BatchedServerRouteRelatedOptions)
|
|
45
|
+
| ({ type: "reactAnalyze" | "reactCheck"; id?: string } & Pick<
|
|
46
|
+
ProjectOptions,
|
|
47
|
+
"targets" | "depth" | "assertNoFetch"
|
|
48
|
+
>)
|
|
49
|
+
| ({ type: "reactUsages"; id?: string } & BatchedReactUsagesOptions)
|
|
50
|
+
| ({
|
|
51
|
+
type: "playwrightCheck" | "playwrightEdges" | "playwrightTests";
|
|
52
|
+
id?: string;
|
|
53
|
+
} & Omit<PlaywrightOptions, "root" | "config">)
|
|
54
|
+
| ({ type: "playwrightRelated"; id?: string } & Omit<PlaywrightRelatedOptions, "root" | "config">)
|
|
55
|
+
| ({ type: "check"; id?: string } & BatchedCheckOptions);
|
|
56
|
+
|
|
57
|
+
export interface AnalyzeProjectOptions {
|
|
58
|
+
root?: string;
|
|
59
|
+
tsconfig?: string;
|
|
60
|
+
config?: string;
|
|
61
|
+
filters?: string[];
|
|
62
|
+
reports: AnalyzeProjectReportRequest[];
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export interface AnalyzeProjectResult {
|
|
66
|
+
reports: Array<{
|
|
67
|
+
id?: string;
|
|
68
|
+
type: AnalyzeProjectReportRequest["type"];
|
|
69
|
+
result: unknown | EffectsReport | RscCallersReport;
|
|
70
|
+
}>;
|
|
71
|
+
}
|
package/ci-types.d.ts
CHANGED
|
@@ -25,6 +25,8 @@ export interface ImpactedChecksOptions {
|
|
|
25
25
|
changedFiles?: string[];
|
|
26
26
|
changedFilesFile?: string;
|
|
27
27
|
diff?: string;
|
|
28
|
+
/** Include ordered analysis phase timings in the returned report. */
|
|
29
|
+
timings?: boolean;
|
|
28
30
|
}
|
|
29
31
|
|
|
30
32
|
export type TriggerMatch = "matched" | "always" | "not-matched" | "no-path-events";
|
|
@@ -99,9 +101,16 @@ export interface CheckCommand {
|
|
|
99
101
|
files?: string[];
|
|
100
102
|
}
|
|
101
103
|
|
|
104
|
+
export interface ImpactedChecksTiming {
|
|
105
|
+
phase: string;
|
|
106
|
+
duration_ms: number;
|
|
107
|
+
}
|
|
108
|
+
|
|
102
109
|
export interface ImpactedChecksReport {
|
|
103
110
|
changed_files: string[];
|
|
104
111
|
checks: CheckCommand[];
|
|
105
112
|
warnings: Array<{ type: string; message: string; file: string }>;
|
|
106
113
|
fallback_triggered: boolean;
|
|
114
|
+
/** Present only when `timings: true` was requested. */
|
|
115
|
+
timings?: ImpactedChecksTiming[];
|
|
107
116
|
}
|
package/package.json
CHANGED
package/traversal-types.d.ts
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
import type { ImportUsagesOptions } from "./import-usage-types";
|
|
2
|
-
import type { FlowOptions } from "./flow-types";
|
|
3
|
-
import type { PlaywrightOptions, PlaywrightRelatedOptions } from "./report-types";
|
|
4
|
-
|
|
5
1
|
export type Relationship =
|
|
6
2
|
| "import"
|
|
7
3
|
| "import-static"
|
|
8
4
|
| "import-dynamic"
|
|
9
5
|
| "import-type"
|
|
10
6
|
| "import-require"
|
|
7
|
+
| "route-import"
|
|
11
8
|
| "workspace"
|
|
12
9
|
| "package"
|
|
13
10
|
| "test"
|
|
@@ -173,52 +170,3 @@ export interface ProjectOptions {
|
|
|
173
170
|
/** `reactUsages` `--include` spec: comma-separated `stories,tests,props`. */
|
|
174
171
|
include?: string;
|
|
175
172
|
}
|
|
176
|
-
|
|
177
|
-
type BatchedProjectOptions = Omit<ProjectOptions, "root" | "tsconfig" | "config">;
|
|
178
|
-
type BatchedFlowOptions = Omit<FlowOptions, "root" | "tsconfig" | "config">;
|
|
179
|
-
type BatchedQueueRelatedOptions = BatchedProjectOptions & { files: string[] };
|
|
180
|
-
type BatchedServerRouteRelatedOptions = BatchedProjectOptions &
|
|
181
|
-
({ files: string[] } | { roots: string[] });
|
|
182
|
-
|
|
183
|
-
export type AnalyzeProjectReportRequest =
|
|
184
|
-
| ({ type: "dependencies" | "dependents" | "related"; id?: string } & Omit<
|
|
185
|
-
TraverseOptions,
|
|
186
|
-
"root" | "tsconfig"
|
|
187
|
-
>)
|
|
188
|
-
| ({ type: "symbols"; id?: string } & (SymbolsListOptions | SymbolsSignatureImpactOptions))
|
|
189
|
-
| ({ type: "importUsages"; id?: string } & Omit<ImportUsagesOptions, "root">)
|
|
190
|
-
| ({ type: "flow"; id?: string } & BatchedFlowOptions)
|
|
191
|
-
| ({ type: "queues" | "queueEdges" | "queueCheck"; id?: string } & BatchedProjectOptions)
|
|
192
|
-
| ({ type: "queueRelated"; id?: string } & BatchedQueueRelatedOptions)
|
|
193
|
-
| ({
|
|
194
|
-
type: "serverRoutes" | "serverRouteList" | "serverRouteEdges";
|
|
195
|
-
id?: string;
|
|
196
|
-
} & BatchedProjectOptions)
|
|
197
|
-
| ({ type: "serverContracts"; id?: string } & BatchedProjectOptions)
|
|
198
|
-
| ({ type: "serverRouteRelated"; id?: string } & BatchedServerRouteRelatedOptions)
|
|
199
|
-
| ({ type: "reactAnalyze" | "reactCheck"; id?: string } & Pick<
|
|
200
|
-
ProjectOptions,
|
|
201
|
-
"targets" | "depth" | "assertNoFetch"
|
|
202
|
-
>)
|
|
203
|
-
| ({
|
|
204
|
-
type: "playwrightCheck" | "playwrightEdges" | "playwrightTests";
|
|
205
|
-
id?: string;
|
|
206
|
-
} & Omit<PlaywrightOptions, "root" | "config">)
|
|
207
|
-
| ({ type: "playwrightRelated"; id?: string } & Omit<PlaywrightRelatedOptions, "root" | "config">)
|
|
208
|
-
| { type: "check"; id?: string };
|
|
209
|
-
|
|
210
|
-
export interface AnalyzeProjectOptions {
|
|
211
|
-
root?: string;
|
|
212
|
-
tsconfig?: string;
|
|
213
|
-
config?: string;
|
|
214
|
-
filters?: string[];
|
|
215
|
-
reports: AnalyzeProjectReportRequest[];
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
export interface AnalyzeProjectResult {
|
|
219
|
-
reports: Array<{
|
|
220
|
-
id?: string;
|
|
221
|
-
type: AnalyzeProjectReportRequest["type"];
|
|
222
|
-
result: unknown;
|
|
223
|
-
}>;
|
|
224
|
-
}
|