no-mistakes 0.33.0 → 0.33.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 +2 -0
- package/analyze-project-types.d.ts +3 -0
- package/ci-types.d.ts +7 -0
- package/flow-types.d.ts +5 -0
- package/import-usage-types.d.ts +1 -0
- package/named-query-types.d.ts +9 -0
- package/package.json +1 -1
- package/report-types.d.ts +6 -0
- package/scripts/install/retry.js +9 -3
- package/test-types.d.ts +12 -0
- package/traversal-types.d.ts +8 -0
package/README.md
CHANGED
|
@@ -77,6 +77,8 @@ const {
|
|
|
77
77
|
});
|
|
78
78
|
const projectCheck = await check({
|
|
79
79
|
root: process.cwd(),
|
|
80
|
+
// Path to tsconfig.json for alias resolution; searched upward if omitted.
|
|
81
|
+
// In monorepos, pass the workspace-scoped tsconfig (e.g. "web/tsconfig.json").
|
|
80
82
|
tsconfig: "tsconfig.json",
|
|
81
83
|
});
|
|
82
84
|
const localFlow = await flow({
|
|
@@ -55,8 +55,11 @@ export type AnalyzeProjectReportRequest =
|
|
|
55
55
|
| ({ type: "check"; id?: string } & BatchedCheckOptions);
|
|
56
56
|
|
|
57
57
|
export interface AnalyzeProjectOptions {
|
|
58
|
+
/** Project root. Defaults to the current working directory. */
|
|
58
59
|
root?: string;
|
|
60
|
+
/** Path to tsconfig.json for alias resolution. Searched upward if omitted. */
|
|
59
61
|
tsconfig?: string;
|
|
62
|
+
/** Path to the no-mistakes config file (e.g. .no-mistakes.yml). Auto-discovered in root if omitted. */
|
|
60
63
|
config?: string;
|
|
61
64
|
filters?: string[];
|
|
62
65
|
reports: AnalyzeProjectReportRequest[];
|
package/ci-types.d.ts
CHANGED
|
@@ -3,22 +3,29 @@
|
|
|
3
3
|
// snake_case to match the serde-serialized output.
|
|
4
4
|
|
|
5
5
|
export interface CiImpactOptions {
|
|
6
|
+
/** Project root. Defaults to the current working directory. */
|
|
6
7
|
root?: string;
|
|
8
|
+
/** Path to the no-mistakes config file (e.g. .no-mistakes.yml). Auto-discovered in root if omitted. */
|
|
7
9
|
config?: string;
|
|
8
10
|
/** Changed file paths (relative to root or absolute). */
|
|
9
11
|
files: string[];
|
|
10
12
|
}
|
|
11
13
|
|
|
12
14
|
export interface CiEnvOptions {
|
|
15
|
+
/** Project root. Defaults to the current working directory. */
|
|
13
16
|
root?: string;
|
|
17
|
+
/** Path to the no-mistakes config file (e.g. .no-mistakes.yml). Auto-discovered in root if omitted. */
|
|
14
18
|
config?: string;
|
|
15
19
|
/** Environment variable name (case-sensitive). */
|
|
16
20
|
var: string;
|
|
17
21
|
}
|
|
18
22
|
|
|
19
23
|
export interface ImpactedChecksOptions {
|
|
24
|
+
/** Project root. Defaults to the current working directory. */
|
|
20
25
|
root?: string;
|
|
26
|
+
/** Path to the no-mistakes config file (e.g. .no-mistakes.yml). Auto-discovered in root if omitted. */
|
|
21
27
|
config?: string;
|
|
28
|
+
/** Path to tsconfig.json for alias resolution. Searched upward if omitted. */
|
|
22
29
|
tsconfig?: string;
|
|
23
30
|
base?: string;
|
|
24
31
|
head?: string;
|
package/flow-types.d.ts
CHANGED
|
@@ -2,8 +2,11 @@ import type { Relationship } from "./traversal-types";
|
|
|
2
2
|
|
|
3
3
|
export interface FlowOptions {
|
|
4
4
|
target: string;
|
|
5
|
+
/** Project root. Defaults to the current working directory. */
|
|
5
6
|
root?: string;
|
|
7
|
+
/** Path to tsconfig.json for alias resolution. Searched upward if omitted. */
|
|
6
8
|
tsconfig?: string;
|
|
9
|
+
/** Path to the no-mistakes config file (e.g. .no-mistakes.yml). Auto-discovered in root if omitted. */
|
|
7
10
|
config?: string;
|
|
8
11
|
direction?: "deps" | "dependents" | "both";
|
|
9
12
|
depth?: number;
|
|
@@ -35,7 +38,9 @@ export interface FlowReport {
|
|
|
35
38
|
}
|
|
36
39
|
|
|
37
40
|
export interface FetchesOptions {
|
|
41
|
+
/** Project root. Defaults to the current working directory. */
|
|
38
42
|
root?: string;
|
|
43
|
+
/** Path to the no-mistakes config file (e.g. .no-mistakes.yml). Auto-discovered in root if omitted. */
|
|
39
44
|
config?: string;
|
|
40
45
|
targets?: string[];
|
|
41
46
|
}
|
package/import-usage-types.d.ts
CHANGED
package/named-query-types.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
// Named query modes (issue #419): data-pw, effects, rsc-callers, registry-extension.
|
|
2
2
|
|
|
3
3
|
export interface DataPwOptions {
|
|
4
|
+
/** Project root. Defaults to the current working directory. */
|
|
4
5
|
root?: string;
|
|
6
|
+
/** Path to the no-mistakes config file (e.g. .no-mistakes.yml). Auto-discovered in root if omitted. */
|
|
5
7
|
config?: string;
|
|
6
8
|
/** The selector-attribute value to find (e.g. `search-bar`). */
|
|
7
9
|
value: string;
|
|
@@ -29,8 +31,11 @@ export interface DataPwReport {
|
|
|
29
31
|
}
|
|
30
32
|
|
|
31
33
|
export interface EffectsOptions {
|
|
34
|
+
/** Project root. Defaults to the current working directory. */
|
|
32
35
|
root?: string;
|
|
36
|
+
/** Path to tsconfig.json for alias resolution. Searched upward if omitted. */
|
|
33
37
|
tsconfig?: string;
|
|
38
|
+
/** Path to the no-mistakes config file (e.g. .no-mistakes.yml). Auto-discovered in root if omitted. */
|
|
34
39
|
config?: string;
|
|
35
40
|
/** Effect kind to resolve (a key under `effects:` in config). */
|
|
36
41
|
kind: string;
|
|
@@ -59,8 +64,11 @@ export interface EffectsReport {
|
|
|
59
64
|
}
|
|
60
65
|
|
|
61
66
|
export interface RscCallersOptions {
|
|
67
|
+
/** Project root. Defaults to the current working directory. */
|
|
62
68
|
root?: string;
|
|
69
|
+
/** Path to tsconfig.json for alias resolution. Searched upward if omitted. */
|
|
63
70
|
tsconfig?: string;
|
|
71
|
+
/** Path to the no-mistakes config file (e.g. .no-mistakes.yml). Auto-discovered in root if omitted. */
|
|
64
72
|
config?: string;
|
|
65
73
|
/** Component file to find RSC callers of. */
|
|
66
74
|
component: string;
|
|
@@ -81,6 +89,7 @@ export interface RscCallersReport {
|
|
|
81
89
|
}
|
|
82
90
|
|
|
83
91
|
export interface RegistryExtensionOptions {
|
|
92
|
+
/** Project root. Defaults to the current working directory. */
|
|
84
93
|
root?: string;
|
|
85
94
|
/** Registry file to summarize the entry pattern of. */
|
|
86
95
|
registryFile: string;
|
package/package.json
CHANGED
package/report-types.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export interface PlaywrightOptions {
|
|
2
|
+
/** Project root. Defaults to the current working directory. */
|
|
2
3
|
root?: string;
|
|
4
|
+
/** Path to the no-mistakes config file (e.g. .no-mistakes.yml). Auto-discovered in root if omitted. */
|
|
3
5
|
config?: string;
|
|
4
6
|
playwrightConfig?: string[];
|
|
5
7
|
project?: string;
|
|
@@ -40,7 +42,9 @@ export interface GraphEdge {
|
|
|
40
42
|
}
|
|
41
43
|
|
|
42
44
|
export interface InfraOptions {
|
|
45
|
+
/** Project root. Defaults to the current working directory. */
|
|
43
46
|
root?: string;
|
|
47
|
+
/** Path to the no-mistakes config file (e.g. .no-mistakes.yml). Auto-discovered in root if omitted. */
|
|
44
48
|
config?: string;
|
|
45
49
|
/** `infraResourceRefs` address (`<type>.<name>`). */
|
|
46
50
|
address?: string;
|
|
@@ -79,7 +83,9 @@ export interface TestForRow {
|
|
|
79
83
|
}
|
|
80
84
|
|
|
81
85
|
export interface SwiftOptions {
|
|
86
|
+
/** Project root. Defaults to the current working directory. */
|
|
82
87
|
root?: string;
|
|
88
|
+
/** Path to the no-mistakes config file (e.g. .no-mistakes.yml). Auto-discovered in root if omitted. */
|
|
83
89
|
config?: string;
|
|
84
90
|
/** The Swift source file to query (relative to root). */
|
|
85
91
|
file?: string;
|
package/scripts/install/retry.js
CHANGED
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
// A GitHub Releases asset download or its separate .sha256 checksum fetch can
|
|
4
|
+
// hit a short-lived CDN 5xx, timeout, or connection reset. These defaults give
|
|
5
|
+
// each network operation a bounded multi-attempt window (~15s avg / ~31s worst
|
|
6
|
+
// case total sleep) to ride that out, rather than exhausting a tiny budget in a
|
|
7
|
+
// few seconds. Override via NO_MISTAKES_DOWNLOAD_MAX_ATTEMPTS /
|
|
8
|
+
// NO_MISTAKES_DOWNLOAD_RETRY_BASE_MS.
|
|
9
|
+
const DEFAULT_MAX_ATTEMPTS = 6;
|
|
10
|
+
const DEFAULT_RETRY_BASE_MS = 1_000;
|
|
11
|
+
const RETRY_MAX_DELAY_MS = 30_000;
|
|
6
12
|
const RETRYABLE_NETWORK_CODES = new Set([
|
|
7
13
|
"ECONNRESET",
|
|
8
14
|
"ECONNREFUSED",
|
package/test-types.d.ts
CHANGED
|
@@ -2,8 +2,11 @@ import type { SymbolEntrypoint } from "./traversal-types";
|
|
|
2
2
|
|
|
3
3
|
export interface TestsPlanOptions {
|
|
4
4
|
framework?: "vitest" | "playwright" | "dotnet" | "swift";
|
|
5
|
+
/** Project root. Defaults to the current working directory. */
|
|
5
6
|
root?: string;
|
|
7
|
+
/** Path to the no-mistakes config file (e.g. .no-mistakes.yml). Auto-discovered in root if omitted. */
|
|
6
8
|
config?: string;
|
|
9
|
+
/** Path to tsconfig.json for alias resolution. Searched upward if omitted. */
|
|
7
10
|
tsconfig?: string;
|
|
8
11
|
base?: string;
|
|
9
12
|
head?: string;
|
|
@@ -24,8 +27,11 @@ export interface TestsPlanOptions {
|
|
|
24
27
|
}
|
|
25
28
|
|
|
26
29
|
export interface TestsImpactOptions {
|
|
30
|
+
/** Project root. Defaults to the current working directory. */
|
|
27
31
|
root?: string;
|
|
32
|
+
/** Path to the no-mistakes config file (e.g. .no-mistakes.yml). Auto-discovered in root if omitted. */
|
|
28
33
|
config?: string;
|
|
34
|
+
/** Path to tsconfig.json for alias resolution. Searched upward if omitted. */
|
|
29
35
|
tsconfig?: string;
|
|
30
36
|
/** Entrypoints to trace impact from: strings may use file#export, or pass { file, symbol }. */
|
|
31
37
|
entrypoints: Array<string | SymbolEntrypoint>;
|
|
@@ -35,7 +41,9 @@ export interface TestsImpactOptions {
|
|
|
35
41
|
|
|
36
42
|
export interface TestsTargetsOptions {
|
|
37
43
|
framework: "vitest" | "playwright" | "dotnet" | "swift";
|
|
44
|
+
/** Project root. Defaults to the current working directory. */
|
|
38
45
|
root?: string;
|
|
46
|
+
/** Path to the no-mistakes config file (e.g. .no-mistakes.yml). Auto-discovered in root if omitted. */
|
|
39
47
|
config?: string;
|
|
40
48
|
files: string[];
|
|
41
49
|
}
|
|
@@ -100,8 +108,11 @@ export interface TestTargetWarning {
|
|
|
100
108
|
}
|
|
101
109
|
|
|
102
110
|
export interface TestsWhyOptions {
|
|
111
|
+
/** Project root. Defaults to the current working directory. */
|
|
103
112
|
root?: string;
|
|
113
|
+
/** Path to the no-mistakes config file (e.g. .no-mistakes.yml). Auto-discovered in root if omitted. */
|
|
104
114
|
config?: string;
|
|
115
|
+
/** Path to tsconfig.json for alias resolution. Searched upward if omitted. */
|
|
105
116
|
tsconfig?: string;
|
|
106
117
|
test: string;
|
|
107
118
|
changed?: string;
|
|
@@ -124,6 +135,7 @@ export interface TestGraph {
|
|
|
124
135
|
}
|
|
125
136
|
|
|
126
137
|
export interface LockfileDiffOptions {
|
|
138
|
+
/** Project root. Defaults to the current working directory. */
|
|
127
139
|
root?: string;
|
|
128
140
|
base: string;
|
|
129
141
|
head?: string;
|
package/traversal-types.d.ts
CHANGED
|
@@ -23,7 +23,9 @@ export type Relationship =
|
|
|
23
23
|
|
|
24
24
|
export interface TraverseOptions {
|
|
25
25
|
files: Array<string | SymbolEntrypoint>;
|
|
26
|
+
/** Project root. Defaults to the current working directory. */
|
|
26
27
|
root?: string;
|
|
28
|
+
/** Path to tsconfig.json for alias resolution. Searched upward if omitted. */
|
|
27
29
|
tsconfig?: string;
|
|
28
30
|
depth?: number;
|
|
29
31
|
filters?: string[];
|
|
@@ -68,8 +70,11 @@ export type ExportKind =
|
|
|
68
70
|
|
|
69
71
|
export interface SymbolsOptions {
|
|
70
72
|
files: string[];
|
|
73
|
+
/** Project root. Defaults to the current working directory. */
|
|
71
74
|
root?: string;
|
|
75
|
+
/** Path to tsconfig.json for alias resolution. Searched upward if omitted. */
|
|
72
76
|
tsconfig?: string;
|
|
77
|
+
/** Path to the no-mistakes config file (e.g. .no-mistakes.yml). Auto-discovered in root if omitted. */
|
|
73
78
|
config?: string;
|
|
74
79
|
mode?: "list" | "signature-impact";
|
|
75
80
|
symbol?: string;
|
|
@@ -155,8 +160,11 @@ export interface SignatureImpactResult {
|
|
|
155
160
|
}
|
|
156
161
|
|
|
157
162
|
export interface ProjectOptions {
|
|
163
|
+
/** Project root. Defaults to the current working directory. */
|
|
158
164
|
root?: string;
|
|
165
|
+
/** Path to tsconfig.json for alias resolution. Searched upward if omitted. */
|
|
159
166
|
tsconfig?: string;
|
|
167
|
+
/** Path to the no-mistakes config file (e.g. .no-mistakes.yml). Auto-discovered in root if omitted. */
|
|
160
168
|
config?: string;
|
|
161
169
|
filters?: string[];
|
|
162
170
|
targets?: string[];
|