no-mistakes 0.95.0 → 0.97.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 +26 -16
- package/check-report-types.d.ts +1 -0
- package/executed-postgres-sql-types.d.ts +27 -1
- package/package.json +5 -5
- package/postgres-mutable-sql-registry-types.d.ts +15 -0
- package/postgres-query-annotation-types.d.ts +2 -0
- package/postgres-unbounded-identifier-types.d.ts +15 -0
- package/test-types.d.ts +2 -1
- package/types.d.ts +2 -0
|
@@ -45,27 +45,28 @@ import type {
|
|
|
45
45
|
TraversePathsOptions,
|
|
46
46
|
} from "./traversal-types";
|
|
47
47
|
|
|
48
|
-
|
|
49
|
-
type
|
|
50
|
-
type
|
|
51
|
-
type
|
|
48
|
+
/** Shared `analyzeProject()` options after the request-level `root`/`tsconfig`/`config`. */
|
|
49
|
+
export type BatchedProjectOptions = Omit<ProjectOptions, "root" | "tsconfig" | "config">;
|
|
50
|
+
export type BatchedFlowOptions = Omit<FlowOptions, "root" | "tsconfig" | "config">;
|
|
51
|
+
export type BatchedTraverseOptions = TraverseOptions & Pick<ProjectOptions, "config">;
|
|
52
|
+
export type BatchedDependencyTraverseOptions = (TraverseGraphOptions | TraversePathsOptions) &
|
|
52
53
|
Pick<ProjectOptions, "config">;
|
|
53
|
-
type BatchedQueueRelatedOptions = BatchedProjectOptions & { files: string[] };
|
|
54
|
-
type BatchedServerRouteRelatedOptions = BatchedProjectOptions &
|
|
54
|
+
export type BatchedQueueRelatedOptions = BatchedProjectOptions & { files: string[] };
|
|
55
|
+
export type BatchedServerRouteRelatedOptions = BatchedProjectOptions &
|
|
55
56
|
({ files: string[] } | { roots: string[] });
|
|
56
|
-
type BatchedReactUsagesOptions = Pick<
|
|
57
|
+
export type BatchedReactUsagesOptions = Pick<
|
|
57
58
|
ProjectOptions,
|
|
58
59
|
"root" | "tsconfig" | "config" | "targets" | "include" | "effort"
|
|
59
60
|
> &
|
|
60
61
|
Required<Pick<ProjectOptions, "target">>;
|
|
61
|
-
type BatchedCheckOptions = Pick<
|
|
62
|
+
export type BatchedCheckOptions = Pick<
|
|
62
63
|
CheckOptions,
|
|
63
64
|
"root" | "tsconfig" | "config" | "includeSuppressed" | "effort"
|
|
64
65
|
> &
|
|
65
66
|
Pick<CheckOptions, "includeRunnerConfigDeadlines" | "includeSqlVerdicts">;
|
|
66
|
-
type BatchedQueryFileOptions<T> = Omit<T, "root" | "tsconfig">;
|
|
67
|
-
type BatchedRootConfigOptions<T> = Omit<T, "root" | "config">;
|
|
68
|
-
type BatchedRootTsConfigOptions<T> = Omit<T, "root" | "tsconfig" | "config">;
|
|
67
|
+
export type BatchedQueryFileOptions<T> = Omit<T, "root" | "tsconfig">;
|
|
68
|
+
export type BatchedRootConfigOptions<T> = Omit<T, "root" | "config">;
|
|
69
|
+
export type BatchedRootTsConfigOptions<T> = Omit<T, "root" | "tsconfig" | "config">;
|
|
69
70
|
|
|
70
71
|
export type AnalyzeProjectReportRequest =
|
|
71
72
|
| ({ type: "dependencies"; id?: string } & BatchedDependencyTraverseOptions)
|
|
@@ -152,12 +153,21 @@ export interface AnalyzeProjectOptions {
|
|
|
152
153
|
reports: AnalyzeProjectReportRequest[];
|
|
153
154
|
}
|
|
154
155
|
|
|
156
|
+
/** Discriminant for `analyzeProject()` report requests and result entries. */
|
|
157
|
+
export type AnalyzeProjectReportType = AnalyzeProjectReportRequest["type"];
|
|
158
|
+
|
|
159
|
+
/** Payload carried on one `analyzeProject()` result entry. */
|
|
160
|
+
export type AnalyzeProjectReportResult = unknown | EffectsReport | RscCallersReport;
|
|
161
|
+
|
|
162
|
+
/** One entry in `analyzeProject()` `reports`. */
|
|
163
|
+
export interface AnalyzeProjectReport {
|
|
164
|
+
id?: string;
|
|
165
|
+
type: AnalyzeProjectReportType;
|
|
166
|
+
result: AnalyzeProjectReportResult;
|
|
167
|
+
}
|
|
168
|
+
|
|
155
169
|
export interface AnalyzeProjectResult {
|
|
156
|
-
reports:
|
|
157
|
-
id?: string;
|
|
158
|
-
type: AnalyzeProjectReportRequest["type"];
|
|
159
|
-
result: unknown | EffectsReport | RscCallersReport;
|
|
160
|
-
}>;
|
|
170
|
+
reports: AnalyzeProjectReport[];
|
|
161
171
|
/**
|
|
162
172
|
* Set when this call's resolved `jobs` differs from the process-wide Rayon pool.
|
|
163
173
|
* Omitted when the pool was just created or the resolved count already matches.
|
package/check-report-types.d.ts
CHANGED
|
@@ -43,6 +43,7 @@ export interface SqlExecutorProfile {
|
|
|
43
43
|
executorFactoryNames: string[];
|
|
44
44
|
executorTypeNames: string[];
|
|
45
45
|
trustedSqlTags: { module: string; name: string }[];
|
|
46
|
+
sqlLiteralHelpers?: string[];
|
|
46
47
|
}
|
|
47
48
|
/** Zero-based ordinal among enabled applications of the same rule in config order. */
|
|
48
49
|
export interface SqlRuleApplication {
|
|
@@ -14,7 +14,7 @@ export interface ExecutedPostgresResolvedImport {
|
|
|
14
14
|
toFileName: string;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
export interface ExecutedPostgresSqlOptions {
|
|
17
|
+
export interface ExecutedPostgresSqlOptions<Diagnostics extends boolean = false> {
|
|
18
18
|
sources: ExecutedPostgresSource[];
|
|
19
19
|
/** Module whose named imports provide the configured executors. */
|
|
20
20
|
importSpecifier: string;
|
|
@@ -27,6 +27,8 @@ export interface ExecutedPostgresSqlOptions {
|
|
|
27
27
|
resolveImports?: boolean;
|
|
28
28
|
/** Explicit edges for aliases or package imports; relative supplied paths resolve automatically. */
|
|
29
29
|
resolvedImports?: ExecutedPostgresResolvedImport[];
|
|
30
|
+
/** Include executor-type and unresolved-receiver diagnostics without treating them as SQL. */
|
|
31
|
+
includeDiagnostics?: Diagnostics;
|
|
30
32
|
}
|
|
31
33
|
|
|
32
34
|
export type ExecutedPostgresSqlKind = "inline" | "immutableLocal" | "composed" | "dynamic";
|
|
@@ -47,7 +49,31 @@ export interface ExecutedPostgresSql {
|
|
|
47
49
|
incompleteReason: string | null;
|
|
48
50
|
}
|
|
49
51
|
|
|
52
|
+
/** Omitted member-call sites grouped by their imported receiver type identity. */
|
|
53
|
+
export interface UndeclaredExecutorTypeSummary {
|
|
54
|
+
type: string;
|
|
55
|
+
module: string;
|
|
56
|
+
count: number;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/** Configured imported receiver types whose call ownership is still unresolved. */
|
|
60
|
+
export type UnresolvedExecutorReceiverSummary = UndeclaredExecutorTypeSummary;
|
|
61
|
+
|
|
62
|
+
export interface ExecutedPostgresSqlReport {
|
|
63
|
+
statements: ExecutedPostgresSql[];
|
|
64
|
+
/** Sorted by type, then module; empty when no undeclared receiver types were found. */
|
|
65
|
+
undeclaredExecutorTypes: UndeclaredExecutorTypeSummary[];
|
|
66
|
+
/** Configured types with unsupported receiver shapes, sorted by type and module. */
|
|
67
|
+
unresolvedExecutorReceivers: UnresolvedExecutorReceiverSummary[];
|
|
68
|
+
}
|
|
69
|
+
|
|
50
70
|
/** Extract configured PostgreSQL executor calls from supplied TS/JS source. */
|
|
71
|
+
export function extractExecutedPostgresSql(
|
|
72
|
+
options: ExecutedPostgresSqlOptions<true> & { includeDiagnostics: true },
|
|
73
|
+
): Promise<ExecutedPostgresSqlReport>;
|
|
51
74
|
export function extractExecutedPostgresSql(
|
|
52
75
|
options: ExecutedPostgresSqlOptions,
|
|
53
76
|
): Promise<ExecutedPostgresSql[]>;
|
|
77
|
+
export function extractExecutedPostgresSql(
|
|
78
|
+
options: ExecutedPostgresSqlOptions<boolean>,
|
|
79
|
+
): Promise<ExecutedPostgresSql[] | ExecutedPostgresSqlReport>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "no-mistakes",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.97.0",
|
|
4
4
|
"description": "Deterministic impact maps, test plans, Playwright coverage, and repository checks for coding agents",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -65,9 +65,9 @@
|
|
|
65
65
|
}
|
|
66
66
|
},
|
|
67
67
|
"optionalDependencies": {
|
|
68
|
-
"no-mistakes-darwin-arm64": "0.
|
|
69
|
-
"no-mistakes-linux-arm64-gnu": "0.
|
|
70
|
-
"no-mistakes-linux-x64-gnu": "0.
|
|
71
|
-
"no-mistakes-win32-x64-msvc": "0.
|
|
68
|
+
"no-mistakes-darwin-arm64": "0.97.0",
|
|
69
|
+
"no-mistakes-linux-arm64-gnu": "0.97.0",
|
|
70
|
+
"no-mistakes-linux-x64-gnu": "0.97.0",
|
|
71
|
+
"no-mistakes-win32-x64-msvc": "0.97.0"
|
|
72
72
|
}
|
|
73
73
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Effort, Unanalyzable } from "./traversal-types";
|
|
2
|
+
|
|
3
|
+
/** Configuration for the `postgres-no-mutable-sql-registry` check rule. */
|
|
4
|
+
export interface PostgresNoMutableSqlRegistryOptions {
|
|
5
|
+
include?: string[];
|
|
6
|
+
exclude?: string[];
|
|
7
|
+
importSpecifier?: string;
|
|
8
|
+
executorNames?: string[];
|
|
9
|
+
executorFactoryNames?: string[];
|
|
10
|
+
executorTypeNames?: string[];
|
|
11
|
+
trustedSqlTags?: { module: string; name: string }[];
|
|
12
|
+
effort?: Effort;
|
|
13
|
+
unanalyzable?: Unanalyzable;
|
|
14
|
+
unanalyzableSql?: Unanalyzable;
|
|
15
|
+
}
|
|
@@ -11,6 +11,8 @@ export interface PostgresRequireQueryAnnotationOptions {
|
|
|
11
11
|
executorNames?: string[];
|
|
12
12
|
executorFactoryNames?: string[];
|
|
13
13
|
executorTypeNames?: string[];
|
|
14
|
+
/** Exact module#export wrappers accepting one string or interpolation-free template literal. */
|
|
15
|
+
sqlLiteralHelpers?: string[];
|
|
14
16
|
/** @deprecated At effort "low" only; ignored there and warns when configured. Still used at effort "max". */
|
|
15
17
|
trustedSqlTags?: { module: string; name: string }[];
|
|
16
18
|
effort?: Effort;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Effort, Unanalyzable } from "./traversal-types";
|
|
2
|
+
|
|
3
|
+
/** Configuration for the `postgres-no-unbounded-sql-identifier` check rule. */
|
|
4
|
+
export interface PostgresNoUnboundedSqlIdentifierOptions {
|
|
5
|
+
include?: string[];
|
|
6
|
+
exclude?: string[];
|
|
7
|
+
importSpecifier?: string;
|
|
8
|
+
executorNames?: string[];
|
|
9
|
+
executorFactoryNames?: string[];
|
|
10
|
+
executorTypeNames?: string[];
|
|
11
|
+
trustedSqlTags?: { module: string; name: string }[];
|
|
12
|
+
effort?: Effort;
|
|
13
|
+
unanalyzable?: Unanalyzable;
|
|
14
|
+
unanalyzableSql?: Unanalyzable;
|
|
15
|
+
}
|
package/test-types.d.ts
CHANGED
|
@@ -26,7 +26,8 @@ export type TestPlanFramework =
|
|
|
26
26
|
| "dart"
|
|
27
27
|
| "jest";
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
/** Shared option bag for `testsPlan()`. Direct-owner plans omit incompatible fields via `TestsPlanOptions`. */
|
|
30
|
+
export interface TestsPlanOptionsBase {
|
|
30
31
|
framework?: TestPlanFramework;
|
|
31
32
|
/** Project root. Defaults to the current working directory. */
|
|
32
33
|
root?: string;
|
package/types.d.ts
CHANGED
|
@@ -15,7 +15,9 @@ export * from "./named-query-types";
|
|
|
15
15
|
export * from "./mermaid-types";
|
|
16
16
|
export * from "./resolve-config-types";
|
|
17
17
|
export * from "./postgres-query-annotation-types";
|
|
18
|
+
export type * from "./postgres-unbounded-identifier-types";
|
|
18
19
|
export * from "./postgres-catalog-types";
|
|
19
20
|
export * from "./planning-impact-artifacts-types";
|
|
20
21
|
export * from "./declared-payload-types";
|
|
21
22
|
export type * from "./forbidden-call-types";
|
|
23
|
+
export type * from "./postgres-mutable-sql-registry-types";
|