no-mistakes 0.95.0 → 0.96.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.
@@ -45,27 +45,28 @@ import type {
45
45
  TraversePathsOptions,
46
46
  } from "./traversal-types";
47
47
 
48
- type BatchedProjectOptions = Omit<ProjectOptions, "root" | "tsconfig" | "config">;
49
- type BatchedFlowOptions = Omit<FlowOptions, "root" | "tsconfig" | "config">;
50
- type BatchedTraverseOptions = TraverseOptions & Pick<ProjectOptions, "config">;
51
- type BatchedDependencyTraverseOptions = (TraverseGraphOptions | TraversePathsOptions) &
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: Array<{
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.
@@ -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.95.0",
3
+ "version": "0.96.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.95.0",
69
- "no-mistakes-linux-arm64-gnu": "0.95.0",
70
- "no-mistakes-linux-x64-gnu": "0.95.0",
71
- "no-mistakes-win32-x64-msvc": "0.95.0"
68
+ "no-mistakes-darwin-arm64": "0.96.0",
69
+ "no-mistakes-linux-arm64-gnu": "0.96.0",
70
+ "no-mistakes-linux-x64-gnu": "0.96.0",
71
+ "no-mistakes-win32-x64-msvc": "0.96.0"
72
72
  }
73
73
  }
package/test-types.d.ts CHANGED
@@ -26,7 +26,8 @@ export type TestPlanFramework =
26
26
  | "dart"
27
27
  | "jest";
28
28
 
29
- interface TestsPlanOptionsBase {
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;