no-mistakes 0.78.1 → 0.79.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.78.1",
3
+ "version": "0.79.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.78.1",
49
- "no-mistakes-linux-arm64-gnu": "0.78.1",
50
- "no-mistakes-linux-x64-gnu": "0.78.1",
51
- "no-mistakes-win32-x64-msvc": "0.78.1"
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"
52
52
  }
53
53
  }
@@ -0,0 +1,18 @@
1
+ import type { PostgresSqlName } from "./postgres-source-types";
2
+ import type { PostgresSqlFunctionArgument } from "./postgres-function-types";
3
+
4
+ export interface PostgresSqlComment {
5
+ objectType: string;
6
+ name: PostgresSqlName;
7
+ /** null means no signature was written; [] preserves an explicit (). */
8
+ arguments: PostgresSqlFunctionArgument[] | null;
9
+ comment: string | null;
10
+ }
11
+ export interface PostgresSqlAlterIndex {
12
+ name: PostgresSqlName;
13
+ ifExists: boolean;
14
+ operation: PostgresSqlAlterIndexOperation;
15
+ }
16
+ export type PostgresSqlAlterIndexOperation =
17
+ | { kind: "attachPartition"; partition: PostgresSqlName }
18
+ | { kind: "rename"; name: PostgresSqlName };
@@ -4,7 +4,11 @@ import type {
4
4
  PostgresSqlSpan,
5
5
  PostgresSqlStatement,
6
6
  } from "./postgres-source-types";
7
- /** Nested facts are procedural source occurrences, never guaranteed execution. */
7
+ /** Nested facts are procedural source occurrences, never guaranteed execution.
8
+ * Supported nested ALTER TABLE constraints use the same typed operations as
9
+ * top-level statements. Their spans retain original global source coordinates.
10
+ * Inspect diagnostics even when safely attributed statements are present.
11
+ */
8
12
  export interface PostgresSqlProceduralBlock {
9
13
  language: string;
10
14
  bodyEncoding: PostgresSqlBodyEncoding;
@@ -0,0 +1,86 @@
1
+ import type {
2
+ PostgresSqlDiagnostic,
3
+ PostgresSqlExpression,
4
+ PostgresSqlIdentifier,
5
+ PostgresSqlName,
6
+ PostgresSqlSpan,
7
+ } from "./postgres-source-types";
8
+ import type { PostgresSqlConflict } from "./postgres-insert-types";
9
+ import type { PostgresSqlQueryUnsupported } from "./postgres-query-types";
10
+
11
+ /** Syntactic modifying bodies in source order, not PostgreSQL execution order.
12
+ * IDs reference the containing PostgresSqlQuery report, including nested CTEs.
13
+ * cteId is null for a modifying query body outside a CTE definition.
14
+ */
15
+ export interface PostgresSqlQueryStatementProvenance {
16
+ ordinal: number;
17
+ cteId: number | null;
18
+ queryScopeId: number;
19
+ parentScopeId: number | null;
20
+ /** Exact original source slice. Empty only when span is unavailable/incomplete. */
21
+ sql: string;
22
+ span: PostgresSqlSpan | null;
23
+ returning: PostgresSqlReturningItem[];
24
+ complete: boolean;
25
+ unsupported: PostgresSqlQueryUnsupported[];
26
+ }
27
+ export type PostgresSqlQueryStatementKind =
28
+ | { kind: "insert"; insert: PostgresSqlCteInsert }
29
+ | { kind: "update"; update: PostgresSqlCteUpdate }
30
+ | { kind: "delete"; delete: PostgresSqlCteDelete }
31
+ | { kind: "merge"; merge: PostgresSqlCteMerge }
32
+ | { kind: "unsupported"; reason: string };
33
+ export type PostgresSqlQueryStatement = PostgresSqlQueryStatementProvenance &
34
+ PostgresSqlQueryStatementKind;
35
+ export interface PostgresSqlCteInsert {
36
+ table: PostgresSqlName | null;
37
+ alias: PostgresSqlIdentifier | null;
38
+ columns: PostgresSqlName[];
39
+ columnsOmitted: boolean;
40
+ source: PostgresSqlCteInsertSource;
41
+ onConflict: PostgresSqlConflict | null;
42
+ diagnostics: PostgresSqlDiagnostic[];
43
+ }
44
+ export type PostgresSqlCteInsertSource =
45
+ | { kind: "values"; rows: PostgresSqlExpression[][]; span: PostgresSqlSpan | null }
46
+ | { kind: "select"; queryScopeId: number; span: PostgresSqlSpan | null }
47
+ | { kind: "defaultValues" }
48
+ | { kind: "unsupported"; reason: string };
49
+ export interface PostgresSqlCteUpdate {
50
+ targetRelationIds: number[];
51
+ fromRelationIds: number[];
52
+ assignments: PostgresSqlDmlAssignment[];
53
+ predicate: PostgresSqlExpression | null;
54
+ }
55
+ export interface PostgresSqlCteDelete {
56
+ targetRelationIds: number[];
57
+ usingRelationIds: number[];
58
+ predicate: PostgresSqlExpression | null;
59
+ }
60
+ export interface PostgresSqlCteMerge {
61
+ targetRelationIds: number[];
62
+ sourceRelationIds: number[];
63
+ predicate: PostgresSqlExpression;
64
+ clauses: PostgresSqlMergeClause[];
65
+ }
66
+ export interface PostgresSqlDmlAssignment {
67
+ columns: PostgresSqlName[];
68
+ expression: PostgresSqlExpression;
69
+ span: PostgresSqlSpan | null;
70
+ }
71
+ export interface PostgresSqlMergeClause {
72
+ matchKind: string;
73
+ predicate: PostgresSqlExpression | null;
74
+ span: PostgresSqlSpan | null;
75
+ action: PostgresSqlMergeAction;
76
+ }
77
+ export type PostgresSqlMergeAction =
78
+ | { kind: "insert"; columns: PostgresSqlName[]; rows: PostgresSqlExpression[][] }
79
+ | { kind: "update"; assignments: PostgresSqlDmlAssignment[] }
80
+ | { kind: "delete" }
81
+ | { kind: "doNothing" }
82
+ | { kind: "unsupported"; reason: string };
83
+ export type PostgresSqlReturningItem =
84
+ | { kind: "expression"; expression: PostgresSqlExpression; alias: PostgresSqlIdentifier | null }
85
+ | { kind: "wildcard"; qualifier: PostgresSqlName | null; span: PostgresSqlSpan | null }
86
+ | { kind: "unsupported"; reason: string; span: PostgresSqlSpan | null };
@@ -1,3 +1,5 @@
1
+ import type { PostgresSqlQueryStatement } from "./postgres-query-statement-types";
2
+ export type * from "./postgres-query-statement-types";
1
3
  import type {
2
4
  PostgresSqlIdentifier,
3
5
  PostgresSqlName,
@@ -12,6 +14,8 @@ export interface PostgresSqlQuery {
12
14
  equalities: PostgresSqlQueryEquality[];
13
15
  exists: PostgresSqlQueryExists[];
14
16
  ctes: PostgresSqlQueryCte[];
17
+ /** Data-modifying query bodies in original source order; SELECT CTEs are excluded. */
18
+ nestedStatements: PostgresSqlQueryStatement[];
15
19
  unsupported: PostgresSqlQueryUnsupported[];
16
20
  complete: boolean;
17
21
  }
@@ -1,4 +1,6 @@
1
1
  import type { PostgresSqlFunction } from "./postgres-function-types";
2
+ import type { PostgresSqlComment, PostgresSqlAlterIndex } from "./postgres-metadata-types";
3
+ export type * from "./postgres-metadata-types";
2
4
  export type * from "./postgres-function-types";
3
5
  import type { PostgresSqlInsert } from "./postgres-insert-types";
4
6
  export type * from "./postgres-insert-types";
@@ -156,6 +158,8 @@ export interface PostgresSqlTrigger {
156
158
  characteristics: string | null;
157
159
  }
158
160
  export type PostgresSqlStatementKind =
161
+ | { kind: "comment"; comment: PostgresSqlComment }
162
+ | { kind: "alterIndex"; index: PostgresSqlAlterIndex }
159
163
  | { kind: "insert"; insert: PostgresSqlInsert }
160
164
  | { kind: "select"; query: PostgresSqlQuery }
161
165
  | {