no-mistakes 0.84.1 → 0.85.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.84.1",
3
+ "version": "0.85.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.84.1",
49
- "no-mistakes-linux-arm64-gnu": "0.84.1",
50
- "no-mistakes-linux-x64-gnu": "0.84.1",
51
- "no-mistakes-win32-x64-msvc": "0.84.1"
48
+ "no-mistakes-darwin-arm64": "0.85.0",
49
+ "no-mistakes-linux-arm64-gnu": "0.85.0",
50
+ "no-mistakes-linux-x64-gnu": "0.85.0",
51
+ "no-mistakes-win32-x64-msvc": "0.85.0"
52
52
  }
53
53
  }
@@ -6,6 +6,7 @@ import type {
6
6
  PostgresSqlSpan,
7
7
  } from "./postgres-source-types";
8
8
  import type { PostgresSqlQuery } from "./postgres-query-types";
9
+ import type { PostgresSqlReturningItem } from "./postgres-query-statement-types";
9
10
  /** Syntactic facts only: complete does not establish replay safety. */
10
11
  export interface PostgresSqlInsert {
11
12
  table: PostgresSqlName | null;
@@ -15,6 +16,8 @@ export interface PostgresSqlInsert {
15
16
  columnSources: PostgresSqlInsertColumnSources;
16
17
  source: PostgresSqlInsertSource;
17
18
  onConflict: PostgresSqlConflict | null;
19
+ /** Empty when the statement has no RETURNING clause. */
20
+ returning: PostgresSqlReturningItem[];
18
21
  span: PostgresSqlSpan | null;
19
22
  /** Syntax completeness is independent of provenance and does not imply replay safety. */
20
23
  complete: boolean;
@@ -14,10 +14,35 @@ export interface PostgresSqlProceduralBlock {
14
14
  bodyEncoding: PostgresSqlBodyEncoding;
15
15
  bodySpan: PostgresSqlSpan;
16
16
  statements: PostgresSqlStatement[];
17
+ /** Classified source occurrences in source order. Visibility is not execution. */
18
+ occurrences: PostgresSqlProceduralOccurrence[];
17
19
  diagnostics: PostgresSqlDiagnostic[];
18
20
  complete: boolean;
19
21
  }
20
22
 
23
+ /** Closed classification for one procedural source occurrence. */
24
+ export type PostgresSqlProceduralOccurrenceKind =
25
+ | "utility"
26
+ | "controlFlow"
27
+ | "dml"
28
+ | "dynamicExecute"
29
+ | "unknown";
30
+
31
+ /** One statically visible occurrence and the occurrences it contains.
32
+ * `utility` is a non-DML command such as CREATE TYPE.
33
+ * `controlFlow` is IF, LOOP, RAISE, or another recognized procedural form.
34
+ * `dml` means INSERT, UPDATE, DELETE, or MERGE text is present; it does not run.
35
+ * `dynamicExecute` is EXECUTE of a non-literal command, including format and
36
+ * concatenation that is not wholly literal. `unknown` fails closed.
37
+ * Nested occurrences stay in source order. Spans use original source coordinates.
38
+ * Quoted strings and comments are not keywords.
39
+ */
40
+ export interface PostgresSqlProceduralOccurrence {
41
+ kind: PostgresSqlProceduralOccurrenceKind;
42
+ span: PostgresSqlSpan;
43
+ occurrences: PostgresSqlProceduralOccurrence[];
44
+ }
45
+
21
46
  /** Branch DDL describes source occurrences, never guaranteed execution. */
22
47
  export interface PostgresSqlConditionalBranch {
23
48
  condition: PostgresSqlExpression | null;
@@ -39,7 +64,8 @@ export interface PostgresSqlLiteralExecute {
39
64
  literalSpan: PostgresSqlSpan;
40
65
  bodyEncoding: PostgresSqlExecuteEncoding;
41
66
  decodedSql: string;
42
- /** Ordered source expressions, with enclosing source spans and no runtime evaluation. */
67
+ /** Ordered source expressions, with enclosing source spans and no runtime evaluation.
68
+ * A present span's source bytes equal `sql`, including call parentheses. */
43
69
  using: PostgresSqlExpression[];
44
70
  statements: PostgresSqlStatement[];
45
71
  diagnostics: PostgresSqlDiagnostic[];
@@ -5,7 +5,7 @@ import type {
5
5
  PostgresSqlName,
6
6
  PostgresSqlSpan,
7
7
  } from "./postgres-source-types";
8
- import type { PostgresSqlConflict } from "./postgres-insert-types";
8
+ import type { PostgresSqlConflict, PostgresSqlInsertColumnSources } from "./postgres-insert-types";
9
9
  import type { PostgresSqlQueryUnsupported } from "./postgres-query-types";
10
10
 
11
11
  /** Syntactic modifying bodies in source order, not PostgreSQL execution order.
@@ -37,6 +37,8 @@ export interface PostgresSqlCteInsert {
37
37
  alias: PostgresSqlIdentifier | null;
38
38
  columns: PostgresSqlName[];
39
39
  columnsOmitted: boolean;
40
+ /** Omitted for non-RETURNING CTE inserts. RETURNING keeps direct column lineage. */
41
+ columnSources?: PostgresSqlInsertColumnSources;
40
42
  source: PostgresSqlCteInsertSource;
41
43
  onConflict: PostgresSqlConflict | null;
42
44
  diagnostics: PostgresSqlDiagnostic[];
@@ -105,7 +105,21 @@ export interface PostgresSqlQueryEquality {
105
105
  export interface PostgresSqlQueryExists {
106
106
  scopeId: number;
107
107
  subqueryScopeId: number;
108
+ /** The EXISTS node's own flag. Wrapping `NOT` is not folded into this value. */
108
109
  negated: boolean;
110
+ /**
111
+ * NOT operators that apply to this EXISTS: each wrapping `NOT` (parentheses
112
+ * are transparent) plus one when `negated` is true.
113
+ */
114
+ notDepth: number;
115
+ /**
116
+ * `notDepth % 2 === 1` when this EXISTS is not under a boolean test, CASE,
117
+ * or other wrapper. `null` when `context.underBooleanTest`,
118
+ * `context.underCase`, or `context.underOther` is set: those wrappers can
119
+ * invert or hide polarity, and this field does not guess. Always present.
120
+ * Distinct from `negated` and from `context.underNot`.
121
+ */
122
+ effectiveNegated: boolean | null;
109
123
  context: PostgresSqlPredicateContext;
110
124
  correlated: boolean;
111
125
  correlations: PostgresSqlQueryColumn[];
@@ -57,8 +57,10 @@ export interface PostgresSqlFunctionReference {
57
57
  span: PostgresSqlSpan | null;
58
58
  }
59
59
  export interface PostgresSqlExpression {
60
+ /** Rendered SQL. A present `span` covers these exact source bytes when they occur verbatim. */
60
61
  sql: string;
61
62
  identity: string;
63
+ /** End-exclusive span in this fact's source coordinates. */
62
64
  span: PostgresSqlSpan | null;
63
65
  columns: PostgresSqlName[];
64
66
  functions: PostgresSqlFunctionReference[];