@regressionproof/snapshotter 0.5.7 → 0.6.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.
@@ -55,5 +55,19 @@ export function snapshot(options) {
55
55
  function sortTestResults(testResults) {
56
56
  const suites = [...testResults.suites].map((suite) => (Object.assign(Object.assign({}, suite), { tests: [...suite.tests].sort((left, right) => left.name.localeCompare(right.name)) })));
57
57
  suites.sort((left, right) => left.path.localeCompare(right.path));
58
- return Object.assign(Object.assign({}, testResults), { suites });
58
+ const typeErrors = testResults.typeErrors
59
+ ? [...testResults.typeErrors].sort((left, right) => {
60
+ const fileCompare = left.file.localeCompare(right.file);
61
+ if (fileCompare !== 0) {
62
+ return fileCompare;
63
+ }
64
+ const lineCompare = left.line - right.line;
65
+ if (lineCompare !== 0) {
66
+ return lineCompare;
67
+ }
68
+ return left.column - right.column;
69
+ })
70
+ : undefined;
71
+ return Object.assign(Object.assign({}, testResults), { suites,
72
+ typeErrors });
59
73
  }
@@ -6,6 +6,18 @@ export interface TestResult {
6
6
  /** Full error message + callstack (only present if failed) */
7
7
  error?: string;
8
8
  }
9
+ export interface TypeCheckError {
10
+ /** File path relative to project root */
11
+ file: string;
12
+ /** Line number (1-indexed) */
13
+ line: number;
14
+ /** Column number (1-indexed) */
15
+ column: number;
16
+ /** TypeScript error code (e.g., "TS2322") */
17
+ code: string;
18
+ /** Error message */
19
+ message: string;
20
+ }
9
21
  export interface SuiteResult {
10
22
  /** Path to test file, relative to project root */
11
23
  path: string;
@@ -35,6 +47,8 @@ export interface TestResults {
35
47
  summary: TestResultsSummary;
36
48
  /** Array of suite results */
37
49
  suites: SuiteResult[];
50
+ /** TypeScript type check errors (only present if project has tsconfig.json) */
51
+ typeErrors?: TypeCheckError[];
38
52
  }
39
53
  export interface RemoteOptions {
40
54
  /** Gitea repo URL to push to */
package/build/snapshot.js CHANGED
@@ -50,8 +50,22 @@ function sortTestResults(testResults) {
50
50
  tests: [...suite.tests].sort((left, right) => left.name.localeCompare(right.name)),
51
51
  }));
52
52
  suites.sort((left, right) => left.path.localeCompare(right.path));
53
+ const typeErrors = testResults.typeErrors
54
+ ? [...testResults.typeErrors].sort((left, right) => {
55
+ const fileCompare = left.file.localeCompare(right.file);
56
+ if (fileCompare !== 0) {
57
+ return fileCompare;
58
+ }
59
+ const lineCompare = left.line - right.line;
60
+ if (lineCompare !== 0) {
61
+ return lineCompare;
62
+ }
63
+ return left.column - right.column;
64
+ })
65
+ : undefined;
53
66
  return {
54
67
  ...testResults,
55
68
  suites,
69
+ typeErrors,
56
70
  };
57
71
  }
@@ -6,6 +6,18 @@ export interface TestResult {
6
6
  /** Full error message + callstack (only present if failed) */
7
7
  error?: string;
8
8
  }
9
+ export interface TypeCheckError {
10
+ /** File path relative to project root */
11
+ file: string;
12
+ /** Line number (1-indexed) */
13
+ line: number;
14
+ /** Column number (1-indexed) */
15
+ column: number;
16
+ /** TypeScript error code (e.g., "TS2322") */
17
+ code: string;
18
+ /** Error message */
19
+ message: string;
20
+ }
9
21
  export interface SuiteResult {
10
22
  /** Path to test file, relative to project root */
11
23
  path: string;
@@ -35,6 +47,8 @@ export interface TestResults {
35
47
  summary: TestResultsSummary;
36
48
  /** Array of suite results */
37
49
  suites: SuiteResult[];
50
+ /** TypeScript type check errors (only present if project has tsconfig.json) */
51
+ typeErrors?: TypeCheckError[];
38
52
  }
39
53
  export interface RemoteOptions {
40
54
  /** Gitea repo URL to push to */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@regressionproof/snapshotter",
3
- "version": "0.5.7",
3
+ "version": "0.6.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -94,5 +94,5 @@
94
94
  "@sprucelabs/spruce-core-schemas": "^42.1.3",
95
95
  "@sprucelabs/spruce-skill-utils": "^34.0.3"
96
96
  },
97
- "gitHead": "ba416f2d5f545086e283bdcb0489dba2668cbf2c"
97
+ "gitHead": "8ee36b6a7c70f4e675abc5205a5815266be1cdab"
98
98
  }