no-mistakes 0.81.0 → 0.83.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.81.0",
3
+ "version": "0.83.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.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"
48
+ "no-mistakes-darwin-arm64": "0.83.0",
49
+ "no-mistakes-linux-arm64-gnu": "0.83.0",
50
+ "no-mistakes-linux-x64-gnu": "0.83.0",
51
+ "no-mistakes-win32-x64-msvc": "0.83.0"
52
52
  }
53
53
  }
@@ -16,10 +16,58 @@ export type PostgresSqlExpressionRoot =
16
16
  }
17
17
  | { kind: "parenthesized"; expression: PostgresSqlExpressionRoot }
18
18
  | { kind: "cast"; dataType: string; expression: PostgresSqlExpressionRoot }
19
- | { kind: "literal"; sql: string }
19
+ | { kind: "nullTest"; negated: boolean }
20
+ | { kind: "distinctness"; negated: boolean }
21
+ | { kind: "parameter"; placeholder: string }
22
+ | { kind: "typedLiteral"; dataType: string; value: string; sql: string }
23
+ | { kind: "literal"; sql: string; value: PostgresSqlLiteralValue }
20
24
  | { kind: "binary"; operator: string }
21
25
  | { kind: "unary"; operator: string; expression: PostgresSqlExpressionRoot }
22
26
  | { kind: "case" | "subquery" | "other" };
27
+ export type PostgresSqlExpressionChildRole =
28
+ | "argument"
29
+ | "binaryLeft"
30
+ | "binaryRight"
31
+ | "caseOperand"
32
+ | "caseWhenCondition"
33
+ | "caseWhenResult"
34
+ | "caseElse"
35
+ | "castOperand"
36
+ | "filterPredicate"
37
+ | "parenthesizedExpression"
38
+ | "unaryOperand"
39
+ | "nullOperand"
40
+ | "distinctLeft"
41
+ | "distinctRight"
42
+ | "other";
43
+ export type PostgresSqlExpressionChildRoot =
44
+ | { kind: "columnReference"; name: PostgresSqlName }
45
+ | {
46
+ kind: "functionCall";
47
+ name: PostgresSqlName;
48
+ argumentsComplete: boolean;
49
+ syntax: PostgresSqlFunctionSyntax;
50
+ modifiers: string[];
51
+ }
52
+ | { kind: "parenthesized" }
53
+ | { kind: "cast"; castKind: string; dataType: string }
54
+ | { kind: "nullTest"; negated: boolean }
55
+ | { kind: "distinctness"; negated: boolean }
56
+ | { kind: "parameter"; placeholder: string }
57
+ | { kind: "typedLiteral"; dataType: string; value: string; sql: string }
58
+ | { kind: "literal"; sql: string; value: PostgresSqlLiteralValue }
59
+ | { kind: "binary" | "unary"; operator: string }
60
+ | { kind: "case" | "subquery" | "other" };
61
+ export interface PostgresSqlExpressionChild {
62
+ role: PostgresSqlExpressionChildRole;
63
+ index: number | null;
64
+ argumentName?: PostgresSqlIdentifier;
65
+ sql: string;
66
+ span: PostgresSqlSpan | null;
67
+ root: PostgresSqlExpressionChildRoot;
68
+ children: PostgresSqlExpressionChild[];
69
+ childrenComplete: boolean;
70
+ }
23
71
  /** Bare CURRENT_TIMESTAMP is a value function; CURRENT_TIMESTAMP(3) uses call syntax. */
24
72
  export type PostgresSqlFunctionSyntax = "call" | "value";
25
73
  export interface PostgresSqlCallArgument {
@@ -28,3 +76,11 @@ export interface PostgresSqlCallArgument {
28
76
  span: PostgresSqlSpan | null;
29
77
  root: PostgresSqlExpressionRoot;
30
78
  }
79
+
80
+ /** Numbers preserve decimal spelling; string values are parser-decoded. */
81
+ export type PostgresSqlLiteralValue =
82
+ | { kind: "null" }
83
+ | { kind: "string"; value: string }
84
+ | { kind: "number"; value: string }
85
+ | { kind: "boolean"; value: boolean }
86
+ | { kind: "other"; sql: string };
@@ -12,6 +12,7 @@ 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,6 +20,36 @@ export interface PostgresSqlInsert {
19
20
  complete: boolean;
20
21
  diagnostics: PostgresSqlDiagnostic[];
21
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 };
22
53
  export type PostgresSqlInsertSource =
23
54
  | { kind: "values"; rows: PostgresSqlExpression[][]; span: PostgresSqlSpan | null }
24
55
  | { kind: "select"; query: PostgresSqlQuery; span: PostgresSqlSpan | null }
@@ -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";
@@ -58,6 +61,8 @@ export interface PostgresSqlExpression {
58
61
  columns: PostgresSqlName[];
59
62
  functions: PostgresSqlFunctionReference[];
60
63
  root: PostgresSqlExpressionRoot;
64
+ children: PostgresSqlExpressionChild[];
65
+ childrenComplete: boolean;
61
66
  }
62
67
  export interface PostgresSqlType {
63
68
  sql: string;