no-mistakes 0.77.1 → 0.78.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/index.d.ts CHANGED
@@ -1,3 +1,9 @@
1
+ import type { TypeScriptModulesOptions, TypeScriptModulesReport } from "./typescript-module-types";
2
+ export type * from "./typescript-module-types";
3
+ /** Analyze selected TS/JS modules asynchronously with source-local binding semantics. */
4
+ export function analyzeTypeScriptModules(
5
+ options: WithInvocationOptions<TypeScriptModulesOptions>,
6
+ ): Promise<TypeScriptModulesReport>;
1
7
  import type { PostgresSqlSource, PostgresSqlFacts } from "./postgres-source-types";
2
8
  export type * from "./postgres-source-types";
3
9
  /** Parse SQL on the native async worker without repository I/O or a database. */
package/index.js CHANGED
@@ -24,6 +24,7 @@ function createJsonApis(descriptors) {
24
24
  }
25
25
 
26
26
  const jsonApis = createJsonApis({
27
+ analyzeTypeScriptModules: "analyzeTypeScriptModulesJson",
27
28
  parsePostgresSql: "parsePostgresSqlJson",
28
29
  generatePostgresCatalog: "generatePostgresCatalogJson",
29
30
  analyzeProject: "analyzeProjectJson",
@@ -112,6 +113,7 @@ const version = () => native.version();
112
113
  module.exports.createWorkflowTopologyIndex = createWorkflowTopologyIndex;
113
114
  module.exports.version = version;
114
115
  module.exports.analyzeProject = analyzeProject;
116
+ module.exports.analyzeTypeScriptModules = jsonApis.analyzeTypeScriptModules;
115
117
  module.exports.writePlanningImpactArtifacts = writePlanningImpactArtifacts;
116
118
  module.exports.callSites = jsonApis.callSites;
117
119
  module.exports.check = jsonApis.check;
package/index.mjs CHANGED
@@ -5,6 +5,7 @@ const cjs = require("./index.js");
5
5
 
6
6
  export const {
7
7
  analyzeProject,
8
+ analyzeTypeScriptModules,
8
9
  callSites,
9
10
  check,
10
11
  ciEnv,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "no-mistakes",
3
- "version": "0.77.1",
3
+ "version": "0.78.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.77.1",
49
- "no-mistakes-linux-arm64-gnu": "0.77.1",
50
- "no-mistakes-linux-x64-gnu": "0.77.1",
51
- "no-mistakes-win32-x64-msvc": "0.77.1"
48
+ "no-mistakes-darwin-arm64": "0.78.0",
49
+ "no-mistakes-linux-arm64-gnu": "0.78.0",
50
+ "no-mistakes-linux-x64-gnu": "0.78.0",
51
+ "no-mistakes-win32-x64-msvc": "0.78.0"
52
52
  }
53
53
  }
@@ -0,0 +1,27 @@
1
+ import type {
2
+ PostgresSqlExpression,
3
+ PostgresSqlIdentifier,
4
+ PostgresSqlName,
5
+ PostgresSqlType,
6
+ } from "./postgres-source-types";
7
+ export interface PostgresSqlFunctionArgument {
8
+ name: PostgresSqlIdentifier | null;
9
+ mode: string | null;
10
+ dataType: PostgresSqlType;
11
+ default: PostgresSqlExpression | null;
12
+ }
13
+ export interface PostgresSqlFunction {
14
+ name: PostgresSqlName;
15
+ arguments: PostgresSqlFunctionArgument[];
16
+ returnType: PostgresSqlType | null;
17
+ returnsSet: boolean;
18
+ language: string | null;
19
+ behavior: string | null;
20
+ bodySql: string | null;
21
+ orReplace: boolean;
22
+ temporary: boolean;
23
+ calledOnNull: string | null;
24
+ parallel: string | null;
25
+ configuration: string[];
26
+ security: string | null;
27
+ }
@@ -0,0 +1,55 @@
1
+ import type {
2
+ PostgresSqlDiagnostic,
3
+ PostgresSqlExpression,
4
+ PostgresSqlIdentifier,
5
+ PostgresSqlName,
6
+ PostgresSqlSpan,
7
+ } from "./postgres-source-types";
8
+ import type { PostgresSqlQuery } from "./postgres-query-types";
9
+ /** Syntactic facts only: complete does not establish replay safety. */
10
+ export interface PostgresSqlInsert {
11
+ table: PostgresSqlName | null;
12
+ alias: PostgresSqlIdentifier | null;
13
+ columns: PostgresSqlName[];
14
+ columnsOmitted: boolean;
15
+ source: PostgresSqlInsertSource;
16
+ onConflict: PostgresSqlConflict | null;
17
+ span: PostgresSqlSpan | null;
18
+ complete: boolean;
19
+ diagnostics: PostgresSqlDiagnostic[];
20
+ }
21
+ export type PostgresSqlInsertSource =
22
+ | { kind: "values"; rows: PostgresSqlExpression[][]; span: PostgresSqlSpan | null }
23
+ | { kind: "select"; query: PostgresSqlQuery; span: PostgresSqlSpan | null }
24
+ | { kind: "defaultValues" }
25
+ | { kind: "unsupported"; reason: string };
26
+ export interface PostgresSqlConflict {
27
+ target: PostgresSqlConflictTarget;
28
+ predicate: PostgresSqlExpression | null;
29
+ action: PostgresSqlConflictAction;
30
+ span: PostgresSqlSpan | null;
31
+ }
32
+ export type PostgresSqlConflictTarget =
33
+ | { kind: "omitted" }
34
+ | { kind: "columns"; columns: PostgresSqlIdentifier[] }
35
+ | { kind: "constraint"; name: PostgresSqlName };
36
+ export type PostgresSqlConflictAction =
37
+ | { kind: "doNothing" }
38
+ | {
39
+ kind: "doUpdate";
40
+ assignments: PostgresSqlInsertAssignment[];
41
+ predicate: PostgresSqlExpression | null;
42
+ };
43
+ export interface PostgresSqlInsertAssignment {
44
+ columns: PostgresSqlName[];
45
+ expression: PostgresSqlExpression;
46
+ provenance: PostgresSqlInsertProvenance;
47
+ span: PostgresSqlSpan | null;
48
+ complete: boolean;
49
+ }
50
+ export type PostgresSqlInsertProvenance =
51
+ | "targetColumn"
52
+ | "excludedColumn"
53
+ | "literal"
54
+ | "placeholder"
55
+ | "unresolved";
@@ -1,3 +1,7 @@
1
+ import type { PostgresSqlFunction } from "./postgres-function-types";
2
+ export type * from "./postgres-function-types";
3
+ import type { PostgresSqlInsert } from "./postgres-insert-types";
4
+ export type * from "./postgres-insert-types";
1
5
  import type { PostgresSqlExpressionRoot } from "./postgres-expression-types";
2
6
  export type * from "./postgres-expression-types";
3
7
  import type { PostgresSqlQuery } from "./postgres-query-types";
@@ -151,28 +155,8 @@ export interface PostgresSqlTrigger {
151
155
  executionKind: string | null;
152
156
  characteristics: string | null;
153
157
  }
154
- export interface PostgresSqlFunctionArgument {
155
- name: PostgresSqlIdentifier | null;
156
- mode: string | null;
157
- dataType: PostgresSqlType;
158
- default: PostgresSqlExpression | null;
159
- }
160
- export interface PostgresSqlFunction {
161
- name: PostgresSqlName;
162
- arguments: PostgresSqlFunctionArgument[];
163
- returnType: PostgresSqlType | null;
164
- returnsSet: boolean;
165
- language: string | null;
166
- behavior: string | null;
167
- bodySql: string | null;
168
- orReplace: boolean;
169
- temporary: boolean;
170
- calledOnNull: string | null;
171
- parallel: string | null;
172
- configuration: string[];
173
- security: string | null;
174
- }
175
158
  export type PostgresSqlStatementKind =
159
+ | { kind: "insert"; insert: PostgresSqlInsert }
176
160
  | { kind: "select"; query: PostgresSqlQuery }
177
161
  | {
178
162
  kind: "createTable";
@@ -0,0 +1,88 @@
1
+ /** Explicit files only; no package resolution or whole-project traversal. */
2
+ export interface TypeScriptModulesOptions {
3
+ /** Project root. Defaults to the current working directory. */
4
+ root?: string;
5
+ files: string[];
6
+ }
7
+ /** Half-open UTF-8 byte offsets into the original source, not JS UTF-16 indexes. */
8
+ export interface TypeScriptModuleSpan {
9
+ start: number;
10
+ end: number;
11
+ }
12
+ export interface TypeScriptBindingReference {
13
+ span: TypeScriptModuleSpan;
14
+ runtime: boolean;
15
+ typeOnly: boolean;
16
+ }
17
+ export interface TypeScriptModuleBinding {
18
+ /** Module-local stable identifier; do not compare IDs across modules or runs. */
19
+ id: number;
20
+ name: string;
21
+ scopeId: number;
22
+ span: TypeScriptModuleSpan;
23
+ imported: boolean;
24
+ /** A syntactically declared runtime value, without resolving imported modules. */
25
+ runtime: boolean;
26
+ typeOnly: boolean;
27
+ shadows: number | null;
28
+ references: TypeScriptBindingReference[];
29
+ }
30
+ export interface TypeScriptModuleScope {
31
+ id: number;
32
+ parentId: number | null;
33
+ }
34
+ export type TypeScriptImportBindingKind = "default" | "named" | "namespace";
35
+ export interface TypeScriptModuleImportBinding {
36
+ imported: string;
37
+ local: string;
38
+ kind: TypeScriptImportBindingKind;
39
+ typeOnly: boolean;
40
+ bindingId: number;
41
+ span: TypeScriptModuleSpan;
42
+ }
43
+ export interface TypeScriptModuleImport {
44
+ specifier: string;
45
+ typeOnly: boolean;
46
+ span: TypeScriptModuleSpan;
47
+ /** Empty for side-effect imports. */
48
+ bindings: TypeScriptModuleImportBinding[];
49
+ }
50
+ export interface TypeScriptModuleExport {
51
+ specifier: string | null;
52
+ /** "*" for star or namespace re-exports; empty for defaults without a local binding or source-only exports. */
53
+ local: string;
54
+ /** Empty for source-only exports such as `export {} from "./dep"`. */
55
+ exported: string;
56
+ typeOnly: boolean;
57
+ span: TypeScriptModuleSpan;
58
+ }
59
+ export type TypeScriptModuleLoadKind = "dynamicImport" | "require";
60
+ export interface TypeScriptModuleLoad {
61
+ kind: TypeScriptModuleLoadKind;
62
+ specifier: string;
63
+ span: TypeScriptModuleSpan;
64
+ }
65
+ export type TypeScriptModuleDiagnosticKind =
66
+ | "sourceError"
67
+ | "parseError"
68
+ | "semanticError"
69
+ | "unsupported";
70
+ export interface TypeScriptModuleDiagnostic {
71
+ kind: TypeScriptModuleDiagnosticKind;
72
+ message: string;
73
+ span: TypeScriptModuleSpan | null;
74
+ }
75
+ export interface TypeScriptModuleFacts {
76
+ fileName: string;
77
+ /** False for source/read/parser errors and explicitly unsupported dynamic forms. */
78
+ complete: boolean;
79
+ imports: TypeScriptModuleImport[];
80
+ exports: TypeScriptModuleExport[];
81
+ bindings: TypeScriptModuleBinding[];
82
+ scopes: TypeScriptModuleScope[];
83
+ loads: TypeScriptModuleLoad[];
84
+ diagnostics: TypeScriptModuleDiagnostic[];
85
+ }
86
+ export interface TypeScriptModulesReport {
87
+ modules: TypeScriptModuleFacts[];
88
+ }