no-mistakes 0.34.0 → 0.35.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/README.md +14 -0
- package/flow-types.d.ts +6 -1
- package/package.json +1 -1
- package/test-types.d.ts +16 -2
- package/traversal-types.d.ts +12 -0
package/README.md
CHANGED
|
@@ -70,6 +70,8 @@ const {
|
|
|
70
70
|
framework: "vitest", // also supports "playwright", "dotnet", and "swift"
|
|
71
71
|
changedFiles: ["src/utils.mts"],
|
|
72
72
|
});
|
|
73
|
+
// Complete changed-file inventory, including paths that selected no tests.
|
|
74
|
+
console.log(plan.changed_files);
|
|
73
75
|
const targetCommands = await testsTargets({
|
|
74
76
|
root: process.cwd(),
|
|
75
77
|
framework: "vitest",
|
|
@@ -126,6 +128,18 @@ aliases isolated while shared code can still select all importing tests. Pass
|
|
|
126
128
|
`tsconfig` explicitly to force one config for a whole invocation when debugging
|
|
127
129
|
or preserving a legacy single-config workflow.
|
|
128
130
|
|
|
131
|
+
Graph queries also support `relationships: ["workflow"]` for canonical local
|
|
132
|
+
GitHub Actions traversal: workflow file -> virtual job -> virtual step,
|
|
133
|
+
`needs`, local reusable workflows/actions, supported literal `run:` targets and
|
|
134
|
+
package scripts, and same-run artifact handoffs. Virtual IDs are
|
|
135
|
+
`workflow.yml#job:<job>` and `workflow.yml#job:<job>/step:<zero-based-index>`.
|
|
136
|
+
Use the precise `workflow-job`, `workflow-step`, `workflow-needs`,
|
|
137
|
+
`workflow-uses`, `workflow-run`, or `workflow-artifact` filters to select a
|
|
138
|
+
semantic while retaining its required structural bridge edges. The legacy `ci`
|
|
139
|
+
relationship stays separate: it covers only workflow-file-to-Rust-binary Cargo
|
|
140
|
+
invocations. Remote actions/workflows, `workflow_run`, dynamic shell commands,
|
|
141
|
+
and paths outside the tracked graph are intentionally excluded.
|
|
142
|
+
|
|
129
143
|
External `no-mistakes-*` executables on `PATH` can be invoked as subcommands.
|
|
130
144
|
For example, after installing `no-mistakes-scripts`:
|
|
131
145
|
|
package/flow-types.d.ts
CHANGED
|
@@ -15,13 +15,18 @@ export interface FlowOptions {
|
|
|
15
15
|
|
|
16
16
|
export interface FlowNode {
|
|
17
17
|
id: string;
|
|
18
|
-
kind: "file" | "symbol" | "module" | "queue-job";
|
|
18
|
+
kind: "file" | "symbol" | "module" | "queue-job" | "workflow-job" | "workflow-step";
|
|
19
19
|
depth: number;
|
|
20
20
|
file?: string;
|
|
21
21
|
symbol?: string;
|
|
22
22
|
module?: string;
|
|
23
23
|
queueFile?: string;
|
|
24
|
+
/** Workflow file for a virtual GitHub Actions job or step node. */
|
|
25
|
+
workflowFile?: string;
|
|
26
|
+
/** GitHub Actions job identifier for a virtual workflow job or step node. */
|
|
24
27
|
job?: string;
|
|
28
|
+
/** Zero-based step index for a virtual GitHub Actions workflow step node. */
|
|
29
|
+
step?: number;
|
|
25
30
|
}
|
|
26
31
|
|
|
27
32
|
export interface FlowEdge {
|
package/package.json
CHANGED
package/test-types.d.ts
CHANGED
|
@@ -49,6 +49,8 @@ export interface TestsTargetsOptions {
|
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
export interface TestPlan {
|
|
52
|
+
/** Complete deterministic changed-file inventory, relative to the request root. */
|
|
53
|
+
changed_files: string[];
|
|
52
54
|
selected_tests: SelectedTest[];
|
|
53
55
|
groups?: TestPlanGroup[];
|
|
54
56
|
warnings: TestPlanWarning[];
|
|
@@ -66,6 +68,8 @@ export interface SelectedTest {
|
|
|
66
68
|
export interface TestExecutionTarget {
|
|
67
69
|
runner: "vitest" | "playwright" | "dotnet" | "swift";
|
|
68
70
|
config?: string | null;
|
|
71
|
+
/** True when config is a Vitest workspace/project-array source rendered with --workspace. */
|
|
72
|
+
workspace?: boolean;
|
|
69
73
|
project?: string | null;
|
|
70
74
|
base_command: string[];
|
|
71
75
|
runner_args: string[];
|
|
@@ -79,7 +83,7 @@ export interface ImpactReason {
|
|
|
79
83
|
via_details?: Array<ImpactEdgeDetail | null>;
|
|
80
84
|
}
|
|
81
85
|
|
|
82
|
-
export type ImpactEdgeDetail = ResourceImpactEdgeDetail;
|
|
86
|
+
export type ImpactEdgeDetail = ResourceImpactEdgeDetail | VitestSetupImpactEdgeDetail;
|
|
83
87
|
|
|
84
88
|
export interface ResourceImpactEdgeDetail {
|
|
85
89
|
type: "resource";
|
|
@@ -87,6 +91,11 @@ export interface ResourceImpactEdgeDetail {
|
|
|
87
91
|
call_sites: ResourceCallSite[];
|
|
88
92
|
}
|
|
89
93
|
|
|
94
|
+
export interface VitestSetupImpactEdgeDetail {
|
|
95
|
+
type: "vitest-setup";
|
|
96
|
+
field: "setupFiles" | "globalSetup";
|
|
97
|
+
}
|
|
98
|
+
|
|
90
99
|
export interface ResourceCallSite {
|
|
91
100
|
call_kind: ResourceCallKind;
|
|
92
101
|
line: number;
|
|
@@ -150,9 +159,14 @@ export interface WhyStep {
|
|
|
150
159
|
detail?: ImpactEdgeDetail | null;
|
|
151
160
|
}
|
|
152
161
|
|
|
162
|
+
/** A current or pre-`changed_files` plan accepted by saved-plan document APIs. */
|
|
163
|
+
export type SavedTestPlan = Omit<TestPlan, "changed_files"> & {
|
|
164
|
+
changed_files?: string[];
|
|
165
|
+
};
|
|
166
|
+
|
|
153
167
|
export interface TestsPlanDocumentOptions {
|
|
154
168
|
plan?: string;
|
|
155
|
-
planJson?:
|
|
169
|
+
planJson?: SavedTestPlan | string;
|
|
156
170
|
}
|
|
157
171
|
|
|
158
172
|
export interface TestGraph {
|
package/traversal-types.d.ts
CHANGED
|
@@ -12,6 +12,13 @@ export type Relationship =
|
|
|
12
12
|
| "queue"
|
|
13
13
|
| "md"
|
|
14
14
|
| "ci"
|
|
15
|
+
| "workflow"
|
|
16
|
+
| "workflow-job"
|
|
17
|
+
| "workflow-step"
|
|
18
|
+
| "workflow-needs"
|
|
19
|
+
| "workflow-uses"
|
|
20
|
+
| "workflow-run"
|
|
21
|
+
| "workflow-artifact"
|
|
15
22
|
| "http"
|
|
16
23
|
| "process"
|
|
17
24
|
| "asset"
|
|
@@ -41,7 +48,12 @@ export interface DependencyFile {
|
|
|
41
48
|
file?: string;
|
|
42
49
|
symbol?: string;
|
|
43
50
|
queueFile?: string;
|
|
51
|
+
/** Workflow file for a virtual GitHub Actions job or step node. */
|
|
52
|
+
workflowFile?: string;
|
|
53
|
+
/** GitHub Actions job identifier for a virtual workflow job or step node. */
|
|
44
54
|
job?: string;
|
|
55
|
+
/** Zero-based step index for a virtual GitHub Actions workflow step node. */
|
|
56
|
+
step?: number;
|
|
45
57
|
module?: string;
|
|
46
58
|
depth: number;
|
|
47
59
|
via?: string[];
|