no-mistakes 0.79.0 → 0.81.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.79.0",
3
+ "version": "0.81.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.79.0",
49
- "no-mistakes-linux-arm64-gnu": "0.79.0",
50
- "no-mistakes-linux-x64-gnu": "0.79.0",
51
- "no-mistakes-win32-x64-msvc": "0.79.0"
48
+ "no-mistakes-darwin-arm64": "0.81.0",
49
+ "no-mistakes-linux-arm64-gnu": "0.81.0",
50
+ "no-mistakes-linux-x64-gnu": "0.81.0",
51
+ "no-mistakes-win32-x64-msvc": "0.81.0"
52
52
  }
53
53
  }
@@ -17,7 +17,8 @@ export type PostgresSqlExpressionRoot =
17
17
  | { kind: "parenthesized"; expression: PostgresSqlExpressionRoot }
18
18
  | { kind: "cast"; dataType: string; expression: PostgresSqlExpressionRoot }
19
19
  | { kind: "literal"; sql: string }
20
- | { kind: "binary" | "unary"; operator: string }
20
+ | { kind: "binary"; operator: string }
21
+ | { kind: "unary"; operator: string; expression: PostgresSqlExpressionRoot }
21
22
  | { kind: "case" | "subquery" | "other" };
22
23
  /** Bare CURRENT_TIMESTAMP is a value function; CURRENT_TIMESTAMP(3) uses call syntax. */
23
24
  export type PostgresSqlFunctionSyntax = "call" | "value";
@@ -1,3 +1,4 @@
1
+ import type { PostgresSqlWrapper } from "./postgres-wrapper-types";
1
2
  import type {
2
3
  PostgresSqlExpression,
3
4
  PostgresSqlIdentifier,
@@ -11,6 +12,8 @@ export interface PostgresSqlFunctionArgument {
11
12
  default: PostgresSqlExpression | null;
12
13
  }
13
14
  export interface PostgresSqlFunction {
15
+ /** Non-executing declaration; opaque bodies have incomplete child facts. */
16
+ wrapper: PostgresSqlWrapper;
14
17
  name: PostgresSqlName;
15
18
  arguments: PostgresSqlFunctionArgument[];
16
19
  returnType: PostgresSqlType | null;
@@ -15,6 +15,7 @@ export interface PostgresSqlInsert {
15
15
  source: PostgresSqlInsertSource;
16
16
  onConflict: PostgresSqlConflict | null;
17
17
  span: PostgresSqlSpan | null;
18
+ /** Syntax completeness is independent of provenance and does not imply replay safety. */
18
19
  complete: boolean;
19
20
  diagnostics: PostgresSqlDiagnostic[];
20
21
  }
@@ -32,7 +33,12 @@ export interface PostgresSqlConflict {
32
33
  export type PostgresSqlConflictTarget =
33
34
  | { kind: "omitted" }
34
35
  | { kind: "columns"; columns: PostgresSqlIdentifier[] }
35
- | { kind: "constraint"; name: PostgresSqlName };
36
+ | { kind: "constraint"; name: PostgresSqlName }
37
+ | {
38
+ kind: "expressions";
39
+ expressions: PostgresSqlExpression[];
40
+ operatorClasses?: (PostgresSqlArbiterOperatorClass | null)[];
41
+ };
36
42
  export type PostgresSqlConflictAction =
37
43
  | { kind: "doNothing" }
38
44
  | {
@@ -40,11 +46,29 @@ export type PostgresSqlConflictAction =
40
46
  assignments: PostgresSqlInsertAssignment[];
41
47
  predicate: PostgresSqlExpression | null;
42
48
  };
49
+ /** Ordered index expressions retain source spans; catalog resolution is not implied. */
50
+ export interface PostgresSqlAssignmentTarget {
51
+ base: PostgresSqlExpression;
52
+ subscripts: PostgresSqlExpression[];
53
+ indirection?: PostgresSqlAssignmentStep[];
54
+ span: PostgresSqlSpan | null;
55
+ }
56
+ export interface PostgresSqlArbiterOperatorClass {
57
+ name: PostgresSqlName;
58
+ parameters?: PostgresSqlArbiterParameter[];
59
+ span: PostgresSqlSpan | null;
60
+ }
61
+ export type PostgresSqlAssignmentStep =
62
+ | { kind: "subscript"; expression: PostgresSqlExpression; span: PostgresSqlSpan | null }
63
+ | { kind: "field"; name: PostgresSqlIdentifier; span: PostgresSqlSpan | null };
43
64
  export interface PostgresSqlInsertAssignment {
44
65
  columns: PostgresSqlName[];
66
+ target?: PostgresSqlAssignmentTarget;
45
67
  expression: PostgresSqlExpression;
68
+ /** Conservative syntactic lineage; derived and unresolved do not imply missing syntax. */
46
69
  provenance: PostgresSqlInsertProvenance;
47
70
  span: PostgresSqlSpan | null;
71
+ /** Whether the assignment syntax is fully represented, independently of provenance. */
48
72
  complete: boolean;
49
73
  }
50
74
  export type PostgresSqlInsertProvenance =
@@ -52,4 +76,10 @@ export type PostgresSqlInsertProvenance =
52
76
  | "excludedColumn"
53
77
  | "literal"
54
78
  | "placeholder"
79
+ | "derived"
55
80
  | "unresolved";
81
+
82
+ export interface PostgresSqlArbiterParameter {
83
+ name: PostgresSqlIdentifier;
84
+ value: PostgresSqlExpression;
85
+ }
@@ -26,4 +26,16 @@ export interface PostgresSqlConditionalBranch {
26
26
  }
27
27
 
28
28
  /** Original body source slices retain this enclosing literal encoding. */
29
- export type PostgresSqlBodyEncoding = "dollarQuoted" | "singleQuoted";
29
+ export type PostgresSqlBodyEncoding = "dollarQuoted" | "singleQuoted" | "escapedString";
30
+
31
+ /** Wrapper literalSpan uses enclosing source coordinates. All child spans and
32
+ * diagnostics use decodedSql coordinates, including nested expression spans.
33
+ * Source occurrences never imply that SQL executes. */
34
+ export interface PostgresSqlLiteralExecute {
35
+ literalSpan: PostgresSqlSpan;
36
+ bodyEncoding: PostgresSqlBodyEncoding;
37
+ decodedSql: string;
38
+ statements: PostgresSqlStatement[];
39
+ diagnostics: PostgresSqlDiagnostic[];
40
+ complete: boolean;
41
+ }
@@ -1,3 +1,5 @@
1
+ import type { PostgresSqlWrapper } from "./postgres-wrapper-types";
2
+ export type * from "./postgres-wrapper-types";
1
3
  import type { PostgresSqlFunction } from "./postgres-function-types";
2
4
  import type { PostgresSqlComment, PostgresSqlAlterIndex } from "./postgres-metadata-types";
3
5
  export type * from "./postgres-metadata-types";
@@ -13,6 +15,7 @@ export type * from "./postgres-drop-types";
13
15
  import type {
14
16
  PostgresSqlConditionalBranch,
15
17
  PostgresSqlProceduralBlock,
18
+ PostgresSqlLiteralExecute,
16
19
  } from "./postgres-procedural-types";
17
20
  export type * from "./postgres-procedural-types";
18
21
  /** Pure SQL source input. No repository, database, or filesystem options are needed. */
@@ -94,6 +97,8 @@ export interface PostgresSqlConstraint {
94
97
  onUpdate: string | null;
95
98
  characteristics: string | null;
96
99
  sql: string;
100
+ /** UTF-8 source range; null when no proven token boundary is available. */
101
+ span: PostgresSqlSpan | null;
97
102
  }
98
103
  export type PostgresSqlAlterOperation =
99
104
  | { kind: "addColumn"; column: PostgresSqlColumn }
@@ -117,6 +122,7 @@ export interface PostgresSqlIndexKey {
117
122
  export interface PostgresSqlIndex {
118
123
  name: PostgresSqlName | null;
119
124
  table: PostgresSqlName;
125
+ only: boolean;
120
126
  method: string;
121
127
  unique: boolean;
122
128
  nullsDistinct: boolean;
@@ -160,6 +166,7 @@ export interface PostgresSqlTrigger {
160
166
  export type PostgresSqlStatementKind =
161
167
  | { kind: "comment"; comment: PostgresSqlComment }
162
168
  | { kind: "alterIndex"; index: PostgresSqlAlterIndex }
169
+ | { kind: "wrapper"; wrapper: PostgresSqlWrapper }
163
170
  | { kind: "insert"; insert: PostgresSqlInsert }
164
171
  | { kind: "select"; query: PostgresSqlQuery }
165
172
  | {
@@ -175,6 +182,7 @@ export type PostgresSqlStatementKind =
175
182
  | { kind: "createTrigger"; trigger: PostgresSqlTrigger }
176
183
  | { kind: "createFunction"; function: PostgresSqlFunction }
177
184
  | { kind: "drop"; drop: PostgresSqlDrop }
185
+ | { kind: "literalExecute"; execute: PostgresSqlLiteralExecute }
178
186
  | { kind: "doBlock"; block: PostgresSqlProceduralBlock }
179
187
  | { kind: "conditional"; branches: PostgresSqlConditionalBranch[] }
180
188
  | { kind: "other" };
@@ -0,0 +1,16 @@
1
+ import type {
2
+ PostgresSqlDiagnostic,
3
+ PostgresSqlSpan,
4
+ PostgresSqlStatement,
5
+ } from "./postgres-source-types";
6
+ export type PostgresSqlExecution = "nonExecuting" | "executesForAnalysis" | "unknown";
7
+ export type PostgresSqlWrapperKind = "explain" | "prepare" | "functionDeclaration";
8
+ /** Ordered child source occurrences inherit the enclosing execution context. */
9
+ export interface PostgresSqlWrapper {
10
+ wrapperKind: PostgresSqlWrapperKind;
11
+ execution: PostgresSqlExecution;
12
+ statements: PostgresSqlStatement[];
13
+ span: PostgresSqlSpan | null;
14
+ complete: boolean;
15
+ diagnostics: PostgresSqlDiagnostic[];
16
+ }