no-mistakes 0.80.0 → 0.82.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.80.0",
3
+ "version": "0.82.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.80.0",
49
- "no-mistakes-linux-arm64-gnu": "0.80.0",
50
- "no-mistakes-linux-x64-gnu": "0.80.0",
51
- "no-mistakes-win32-x64-msvc": "0.80.0"
48
+ "no-mistakes-darwin-arm64": "0.82.0",
49
+ "no-mistakes-linux-arm64-gnu": "0.82.0",
50
+ "no-mistakes-linux-x64-gnu": "0.82.0",
51
+ "no-mistakes-win32-x64-msvc": "0.82.0"
52
52
  }
53
53
  }
@@ -17,8 +17,46 @@ 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"; operator: string }
21
+ | { kind: "unary"; operator: string; expression: PostgresSqlExpressionRoot }
22
+ | { kind: "case" | "subquery" | "other" };
23
+ export type PostgresSqlExpressionChildRole =
24
+ | "argument"
25
+ | "binaryLeft"
26
+ | "binaryRight"
27
+ | "caseOperand"
28
+ | "caseWhenCondition"
29
+ | "caseWhenResult"
30
+ | "caseElse"
31
+ | "castOperand"
32
+ | "filterPredicate"
33
+ | "parenthesizedExpression"
34
+ | "unaryOperand"
35
+ | "other";
36
+ export type PostgresSqlExpressionChildRoot =
37
+ | { kind: "columnReference"; name: PostgresSqlName }
38
+ | {
39
+ kind: "functionCall";
40
+ name: PostgresSqlName;
41
+ argumentsComplete: boolean;
42
+ syntax: PostgresSqlFunctionSyntax;
43
+ modifiers: string[];
44
+ }
45
+ | { kind: "parenthesized" }
46
+ | { kind: "cast"; castKind: string; dataType: string }
47
+ | { kind: "literal"; sql: string }
20
48
  | { kind: "binary" | "unary"; operator: string }
21
49
  | { kind: "case" | "subquery" | "other" };
50
+ export interface PostgresSqlExpressionChild {
51
+ role: PostgresSqlExpressionChildRole;
52
+ index: number | null;
53
+ argumentName?: PostgresSqlIdentifier;
54
+ sql: string;
55
+ span: PostgresSqlSpan | null;
56
+ root: PostgresSqlExpressionChildRoot;
57
+ children: PostgresSqlExpressionChild[];
58
+ childrenComplete: boolean;
59
+ }
22
60
  /** Bare CURRENT_TIMESTAMP is a value function; CURRENT_TIMESTAMP(3) uses call syntax. */
23
61
  export type PostgresSqlFunctionSyntax = "call" | "value";
24
62
  export interface PostgresSqlCallArgument {
@@ -12,12 +12,44 @@ export interface PostgresSqlInsert {
12
12
  alias: PostgresSqlIdentifier | null;
13
13
  columns: PostgresSqlName[];
14
14
  columnsOmitted: boolean;
15
+ columnSources: PostgresSqlInsertColumnSources;
15
16
  source: PostgresSqlInsertSource;
16
17
  onConflict: PostgresSqlConflict | null;
17
18
  span: PostgresSqlSpan | null;
19
+ /** Syntax completeness is independent of provenance and does not imply replay safety. */
18
20
  complete: boolean;
19
21
  diagnostics: PostgresSqlDiagnostic[];
20
22
  }
23
+ export type PostgresSqlInsertColumnSources =
24
+ | { kind: "mapped"; columns: PostgresSqlInsertColumnSource[]; complete: boolean }
25
+ | {
26
+ kind: "unsupported";
27
+ reason: PostgresSqlInsertColumnSourcesReason;
28
+ branchPath?: number[];
29
+ rowIndex?: number;
30
+ expectedColumns?: number;
31
+ sourceColumns?: number;
32
+ };
33
+ export type PostgresSqlInsertColumnSourcesReason =
34
+ | "columnsOmitted"
35
+ | "defaultValues"
36
+ | "unsupportedSource"
37
+ | "wildcardProjection"
38
+ | "aliasExpansion"
39
+ | "setOperationByName"
40
+ | "nestingLimit"
41
+ | "sourceArityMismatch"
42
+ | "duplicateTargetColumn"
43
+ | "emptySource"
44
+ | "cteSourceDelegated";
45
+ export interface PostgresSqlInsertColumnSource {
46
+ columnIndex: number;
47
+ column: PostgresSqlName;
48
+ sources: PostgresSqlInsertSourceExpression[];
49
+ }
50
+ export type PostgresSqlInsertSourceExpression =
51
+ | { kind: "values"; branchPath: number[]; rowIndex: number; expression: PostgresSqlExpression }
52
+ | { kind: "select"; branchPath: number[]; expression: PostgresSqlExpression };
21
53
  export type PostgresSqlInsertSource =
22
54
  | { kind: "values"; rows: PostgresSqlExpression[][]; span: PostgresSqlSpan | null }
23
55
  | { kind: "select"; query: PostgresSqlQuery; span: PostgresSqlSpan | null }
@@ -32,7 +64,12 @@ export interface PostgresSqlConflict {
32
64
  export type PostgresSqlConflictTarget =
33
65
  | { kind: "omitted" }
34
66
  | { kind: "columns"; columns: PostgresSqlIdentifier[] }
35
- | { kind: "constraint"; name: PostgresSqlName };
67
+ | { kind: "constraint"; name: PostgresSqlName }
68
+ | {
69
+ kind: "expressions";
70
+ expressions: PostgresSqlExpression[];
71
+ operatorClasses?: (PostgresSqlArbiterOperatorClass | null)[];
72
+ };
36
73
  export type PostgresSqlConflictAction =
37
74
  | { kind: "doNothing" }
38
75
  | {
@@ -40,11 +77,29 @@ export type PostgresSqlConflictAction =
40
77
  assignments: PostgresSqlInsertAssignment[];
41
78
  predicate: PostgresSqlExpression | null;
42
79
  };
80
+ /** Ordered index expressions retain source spans; catalog resolution is not implied. */
81
+ export interface PostgresSqlAssignmentTarget {
82
+ base: PostgresSqlExpression;
83
+ subscripts: PostgresSqlExpression[];
84
+ indirection?: PostgresSqlAssignmentStep[];
85
+ span: PostgresSqlSpan | null;
86
+ }
87
+ export interface PostgresSqlArbiterOperatorClass {
88
+ name: PostgresSqlName;
89
+ parameters?: PostgresSqlArbiterParameter[];
90
+ span: PostgresSqlSpan | null;
91
+ }
92
+ export type PostgresSqlAssignmentStep =
93
+ | { kind: "subscript"; expression: PostgresSqlExpression; span: PostgresSqlSpan | null }
94
+ | { kind: "field"; name: PostgresSqlIdentifier; span: PostgresSqlSpan | null };
43
95
  export interface PostgresSqlInsertAssignment {
44
96
  columns: PostgresSqlName[];
97
+ target?: PostgresSqlAssignmentTarget;
45
98
  expression: PostgresSqlExpression;
99
+ /** Conservative syntactic lineage; derived and unresolved do not imply missing syntax. */
46
100
  provenance: PostgresSqlInsertProvenance;
47
101
  span: PostgresSqlSpan | null;
102
+ /** Whether the assignment syntax is fully represented, independently of provenance. */
48
103
  complete: boolean;
49
104
  }
50
105
  export type PostgresSqlInsertProvenance =
@@ -52,4 +107,10 @@ export type PostgresSqlInsertProvenance =
52
107
  | "excludedColumn"
53
108
  | "literal"
54
109
  | "placeholder"
110
+ | "derived"
55
111
  | "unresolved";
112
+
113
+ export interface PostgresSqlArbiterParameter {
114
+ name: PostgresSqlIdentifier;
115
+ value: PostgresSqlExpression;
116
+ }
@@ -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
+ }
@@ -6,7 +6,10 @@ export type * from "./postgres-metadata-types";
6
6
  export type * from "./postgres-function-types";
7
7
  import type { PostgresSqlInsert } from "./postgres-insert-types";
8
8
  export type * from "./postgres-insert-types";
9
- import type { PostgresSqlExpressionRoot } from "./postgres-expression-types";
9
+ import type {
10
+ PostgresSqlExpressionChild,
11
+ PostgresSqlExpressionRoot,
12
+ } from "./postgres-expression-types";
10
13
  export type * from "./postgres-expression-types";
11
14
  import type { PostgresSqlQuery } from "./postgres-query-types";
12
15
  export type * from "./postgres-query-types";
@@ -15,6 +18,7 @@ export type * from "./postgres-drop-types";
15
18
  import type {
16
19
  PostgresSqlConditionalBranch,
17
20
  PostgresSqlProceduralBlock,
21
+ PostgresSqlLiteralExecute,
18
22
  } from "./postgres-procedural-types";
19
23
  export type * from "./postgres-procedural-types";
20
24
  /** Pure SQL source input. No repository, database, or filesystem options are needed. */
@@ -57,6 +61,8 @@ export interface PostgresSqlExpression {
57
61
  columns: PostgresSqlName[];
58
62
  functions: PostgresSqlFunctionReference[];
59
63
  root: PostgresSqlExpressionRoot;
64
+ children: PostgresSqlExpressionChild[];
65
+ childrenComplete: boolean;
60
66
  }
61
67
  export interface PostgresSqlType {
62
68
  sql: string;
@@ -96,6 +102,8 @@ export interface PostgresSqlConstraint {
96
102
  onUpdate: string | null;
97
103
  characteristics: string | null;
98
104
  sql: string;
105
+ /** UTF-8 source range; null when no proven token boundary is available. */
106
+ span: PostgresSqlSpan | null;
99
107
  }
100
108
  export type PostgresSqlAlterOperation =
101
109
  | { kind: "addColumn"; column: PostgresSqlColumn }
@@ -119,6 +127,7 @@ export interface PostgresSqlIndexKey {
119
127
  export interface PostgresSqlIndex {
120
128
  name: PostgresSqlName | null;
121
129
  table: PostgresSqlName;
130
+ only: boolean;
122
131
  method: string;
123
132
  unique: boolean;
124
133
  nullsDistinct: boolean;
@@ -178,6 +187,7 @@ export type PostgresSqlStatementKind =
178
187
  | { kind: "createTrigger"; trigger: PostgresSqlTrigger }
179
188
  | { kind: "createFunction"; function: PostgresSqlFunction }
180
189
  | { kind: "drop"; drop: PostgresSqlDrop }
190
+ | { kind: "literalExecute"; execute: PostgresSqlLiteralExecute }
181
191
  | { kind: "doBlock"; block: PostgresSqlProceduralBlock }
182
192
  | { kind: "conditional"; branches: PostgresSqlConditionalBranch[] }
183
193
  | { kind: "other" };