no-mistakes 0.71.1 → 0.73.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "no-mistakes",
3
- "version": "0.71.1",
3
+ "version": "0.73.0",
4
4
  "description": "Deterministic impact maps, test plans, Playwright coverage, and repository checks for coding agents",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -45,9 +45,9 @@
45
45
  "access": "public"
46
46
  },
47
47
  "optionalDependencies": {
48
- "no-mistakes-darwin-arm64": "0.71.1",
49
- "no-mistakes-linux-arm64-gnu": "0.71.1",
50
- "no-mistakes-linux-x64-gnu": "0.71.1",
51
- "no-mistakes-win32-x64-msvc": "0.71.1"
48
+ "no-mistakes-darwin-arm64": "0.73.0",
49
+ "no-mistakes-linux-arm64-gnu": "0.73.0",
50
+ "no-mistakes-linux-x64-gnu": "0.73.0",
51
+ "no-mistakes-win32-x64-msvc": "0.73.0"
52
52
  }
53
53
  }
@@ -14,6 +14,11 @@ export interface PostgresCatalogOptions {
14
14
  coverage?: PostgresCatalogCoverage;
15
15
  /** Opt in to evidence for these exact schemas; absent or inaccessible schemas become null. */
16
16
  searchPathSchemas?: string[];
17
+ /**
18
+ * Non-empty name to record as `currentDatabase` instead of the connected database's name.
19
+ * Use the deployed database's name so regeneration does not depend on where it runs.
20
+ */
21
+ currentDatabase?: string;
17
22
  }
18
23
  export interface PostgresOrderingCatalog {
19
24
  formatVersion: 2;
@@ -0,0 +1,29 @@
1
+ import type {
2
+ PostgresSqlIdentifier,
3
+ PostgresSqlName,
4
+ PostgresSqlSpan,
5
+ } from "./postgres-source-types";
6
+ /** Syntactic root; wrappers never promote a nested call through an unrelated operator. */
7
+ export type PostgresSqlExpressionRoot =
8
+ | { kind: "columnReference"; name: PostgresSqlName }
9
+ | {
10
+ kind: "functionCall";
11
+ name: PostgresSqlName;
12
+ arguments: PostgresSqlCallArgument[];
13
+ argumentsComplete: boolean;
14
+ syntax: PostgresSqlFunctionSyntax;
15
+ modifiers: string[];
16
+ }
17
+ | { kind: "parenthesized"; expression: PostgresSqlExpressionRoot }
18
+ | { kind: "cast"; dataType: string; expression: PostgresSqlExpressionRoot }
19
+ | { kind: "literal"; sql: string }
20
+ | { kind: "binary" | "unary"; operator: string }
21
+ | { kind: "case" | "subquery" | "other" };
22
+ /** Bare CURRENT_TIMESTAMP is a value function; CURRENT_TIMESTAMP(3) uses call syntax. */
23
+ export type PostgresSqlFunctionSyntax = "call" | "value";
24
+ export interface PostgresSqlCallArgument {
25
+ name: PostgresSqlIdentifier | null;
26
+ sql: string;
27
+ span: PostgresSqlSpan | null;
28
+ root: PostgresSqlExpressionRoot;
29
+ }
@@ -0,0 +1,127 @@
1
+ import type {
2
+ PostgresSqlIdentifier,
3
+ PostgresSqlName,
4
+ PostgresSqlSpan,
5
+ } from "./postgres-source-types";
6
+ /** Syntactic SELECT facts; IDs are deterministic and local to this query report. */
7
+ export interface PostgresSqlQuery {
8
+ scopes: PostgresSqlQueryScope[];
9
+ relations: PostgresSqlQueryRelation[];
10
+ joins: PostgresSqlQueryJoin[];
11
+ columns: PostgresSqlQueryColumn[];
12
+ equalities: PostgresSqlQueryEquality[];
13
+ exists: PostgresSqlQueryExists[];
14
+ ctes: PostgresSqlQueryCte[];
15
+ unsupported: PostgresSqlQueryUnsupported[];
16
+ complete: boolean;
17
+ }
18
+ export type PostgresSqlQueryClause =
19
+ | "root"
20
+ | "setBranch"
21
+ | "cte"
22
+ | "from"
23
+ | "projection"
24
+ | "where"
25
+ | "joinOn"
26
+ | "having"
27
+ | "groupBy"
28
+ | "orderBy"
29
+ | "limit"
30
+ | "offset"
31
+ | "other";
32
+ export interface PostgresSqlQueryScope {
33
+ id: number;
34
+ parentScopeId: number | null;
35
+ clause: PostgresSqlQueryClause;
36
+ cteDefinitionId: number | null;
37
+ setOperation: string | null;
38
+ setQuantifier: string | null;
39
+ span: PostgresSqlSpan | null;
40
+ }
41
+ export type PostgresSqlQueryRelationKind = "table" | "cte" | "derived" | "joined" | "unsupported";
42
+ export interface PostgresSqlQueryRelation {
43
+ id: number;
44
+ scopeId: number;
45
+ kind: PostgresSqlQueryRelationKind;
46
+ name: PostgresSqlName | null;
47
+ alias: PostgresSqlIdentifier | null;
48
+ columnAliases: PostgresSqlIdentifier[];
49
+ cteId: number | null;
50
+ subqueryScopeId: number | null;
51
+ members: number[];
52
+ lateral: boolean;
53
+ span: PostgresSqlSpan | null;
54
+ }
55
+ export type PostgresSqlQueryJoinKind =
56
+ | "inner"
57
+ | "left"
58
+ | "right"
59
+ | "full"
60
+ | "cross"
61
+ | "semi"
62
+ | "anti"
63
+ | "other";
64
+ export interface PostgresSqlQueryJoin {
65
+ id: number;
66
+ scopeId: number;
67
+ kind: PostgresSqlQueryJoinKind;
68
+ left: number[];
69
+ right: number[];
70
+ constraint: string;
71
+ usingColumns: PostgresSqlName[];
72
+ span: PostgresSqlSpan | null;
73
+ }
74
+ export type PostgresSqlQueryColumnResolution = "resolved" | "unqualified" | "unknown" | "ambiguous";
75
+ export interface PostgresSqlQueryColumn {
76
+ scopeId: number;
77
+ clause: PostgresSqlQueryClause;
78
+ name: PostgresSqlName;
79
+ relationId: number | null;
80
+ relationScopeId: number | null;
81
+ resolution: PostgresSqlQueryColumnResolution;
82
+ span: PostgresSqlSpan | null;
83
+ }
84
+ export interface PostgresSqlPredicateContext {
85
+ mandatory: boolean;
86
+ underOr: boolean;
87
+ underNot: boolean;
88
+ underCase: boolean;
89
+ underBooleanTest: boolean;
90
+ underOther: boolean;
91
+ }
92
+ export interface PostgresSqlQueryEquality {
93
+ scopeId: number;
94
+ clause: PostgresSqlQueryClause;
95
+ joinId: number | null;
96
+ left: PostgresSqlQueryColumn | null;
97
+ right: PostgresSqlQueryColumn | null;
98
+ context: PostgresSqlPredicateContext;
99
+ span: PostgresSqlSpan | null;
100
+ }
101
+ export interface PostgresSqlQueryExists {
102
+ scopeId: number;
103
+ subqueryScopeId: number;
104
+ negated: boolean;
105
+ context: PostgresSqlPredicateContext;
106
+ correlated: boolean;
107
+ correlations: PostgresSqlQueryColumn[];
108
+ span: PostgresSqlSpan | null;
109
+ }
110
+ export interface PostgresSqlQueryCte {
111
+ id: number;
112
+ ownerScopeId: number;
113
+ queryScopeId: number;
114
+ name: PostgresSqlIdentifier;
115
+ columnAliases: PostgresSqlIdentifier[];
116
+ recursive: boolean;
117
+ referenced: boolean;
118
+ used: boolean;
119
+ cyclic: boolean;
120
+ span: PostgresSqlSpan | null;
121
+ }
122
+ export interface PostgresSqlQueryUnsupported {
123
+ scopeId: number;
124
+ clause: PostgresSqlQueryClause;
125
+ reason: string;
126
+ span: PostgresSqlSpan | null;
127
+ }
@@ -1,3 +1,7 @@
1
+ import type { PostgresSqlExpressionRoot } from "./postgres-expression-types";
2
+ export type * from "./postgres-expression-types";
3
+ import type { PostgresSqlQuery } from "./postgres-query-types";
4
+ export type * from "./postgres-query-types";
1
5
  import type { PostgresSqlDrop } from "./postgres-drop-types";
2
6
  export type * from "./postgres-drop-types";
3
7
  import type {
@@ -44,6 +48,7 @@ export interface PostgresSqlExpression {
44
48
  span: PostgresSqlSpan | null;
45
49
  columns: PostgresSqlName[];
46
50
  functions: PostgresSqlFunctionReference[];
51
+ root: PostgresSqlExpressionRoot;
47
52
  }
48
53
  export interface PostgresSqlType {
49
54
  sql: string;
@@ -168,6 +173,7 @@ export interface PostgresSqlFunction {
168
173
  security: string | null;
169
174
  }
170
175
  export type PostgresSqlStatementKind =
176
+ | { kind: "select"; query: PostgresSqlQuery }
171
177
  | {
172
178
  kind: "createTable";
173
179
  table: PostgresSqlName;