@regressionproof/snapshotter 0.6.5 → 0.7.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.
@@ -1,2 +1,2 @@
1
- export { snapshot } from './snapshot.js';
1
+ export { snapshot, checkForPreviousSnapshotFailure } from './snapshot.js';
2
2
  export * from './snapshotter.types.js';
@@ -1,2 +1,2 @@
1
- export { snapshot } from './snapshot.js.js';
1
+ export { snapshot, checkForPreviousSnapshotFailure } from './snapshot.js.js';
2
2
  export * from './snapshotter.types.js.js';
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,125 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import { existsSync, mkdirSync, readFileSync, unlinkSync, writeFileSync, } from 'fs';
11
+ import path from 'path';
12
+ import { buildLog } from '@sprucelabs/spruce-skill-utils';
13
+ import { gitCommit, gitPush } from '../git.js.js';
14
+ import { syncFiles } from '../sync.js.js';
15
+ const ERROR_FILE_NAME = 'lastError.json';
16
+ const LOCK_FILE_NAME = 'snapshot.lock';
17
+ const PENDING_FILE_NAME = 'pending.json';
18
+ const log = buildLog('Snapshotter');
19
+ function main() {
20
+ return __awaiter(this, void 0, void 0, function* () {
21
+ const snapshotterDir = process.argv[2];
22
+ if (!snapshotterDir) {
23
+ console.error('Usage: runSnapshot <snapshotter-dir>');
24
+ process.exit(1);
25
+ }
26
+ const lockPath = path.join(snapshotterDir, LOCK_FILE_NAME);
27
+ if (existsSync(lockPath)) {
28
+ log.info('Another snapshot is running, exiting');
29
+ process.exit(0);
30
+ }
31
+ try {
32
+ writeFileSync(lockPath, process.pid.toString());
33
+ yield processLoop(snapshotterDir);
34
+ }
35
+ finally {
36
+ if (existsSync(lockPath)) {
37
+ unlinkSync(lockPath);
38
+ }
39
+ }
40
+ });
41
+ }
42
+ function processLoop(snapshotterDir) {
43
+ return __awaiter(this, void 0, void 0, function* () {
44
+ const pendingPath = path.join(snapshotterDir, PENDING_FILE_NAME);
45
+ while (existsSync(pendingPath)) {
46
+ const options = JSON.parse(readFileSync(pendingPath, 'utf-8'));
47
+ unlinkSync(pendingPath);
48
+ yield executeSnapshot(options);
49
+ }
50
+ });
51
+ }
52
+ function executeSnapshot(options) {
53
+ return __awaiter(this, void 0, void 0, function* () {
54
+ var _a;
55
+ const sourcePath = (_a = options.sourcePath) !== null && _a !== void 0 ? _a : process.cwd();
56
+ const { mirrorPath, testResults, remote } = options;
57
+ log.info('Starting snapshot', sourcePath, mirrorPath);
58
+ try {
59
+ yield syncFiles(sourcePath, mirrorPath);
60
+ log.info('Files synced', mirrorPath);
61
+ const snapshotterDir = path.join(mirrorPath, '.snapshotter');
62
+ mkdirSync(snapshotterDir, { recursive: true });
63
+ writeFileSync(path.join(snapshotterDir, 'testResults.json'), JSON.stringify(sortTestResults(testResults), null, 2));
64
+ log.info('Test results saved', snapshotterDir);
65
+ const committed = yield gitCommit(mirrorPath, log);
66
+ if (!committed) {
67
+ log.info('No changes to commit', mirrorPath);
68
+ clearError(mirrorPath);
69
+ return;
70
+ }
71
+ log.info('Commit created, pushing', remote.url);
72
+ yield gitPush(mirrorPath, remote, log);
73
+ log.info('Push completed', remote.url);
74
+ clearError(mirrorPath);
75
+ }
76
+ catch (err) {
77
+ const message = err instanceof Error ? err.message : String(err);
78
+ log.error('Snapshot failed (will surface on next test run)', message);
79
+ persistError(mirrorPath, err);
80
+ }
81
+ });
82
+ }
83
+ function persistError(mirrorPath, err) {
84
+ const snapshotterDir = path.join(mirrorPath, '.snapshotter');
85
+ mkdirSync(snapshotterDir, { recursive: true });
86
+ const errorPath = getErrorFilePath(mirrorPath);
87
+ const errorData = {
88
+ message: err instanceof Error ? err.message : String(err),
89
+ stack: err instanceof Error ? err.stack : undefined,
90
+ timestamp: new Date().toISOString(),
91
+ };
92
+ writeFileSync(errorPath, JSON.stringify(errorData, null, 2));
93
+ }
94
+ function clearError(mirrorPath) {
95
+ const errorPath = getErrorFilePath(mirrorPath);
96
+ if (existsSync(errorPath)) {
97
+ unlinkSync(errorPath);
98
+ }
99
+ }
100
+ function getErrorFilePath(mirrorPath) {
101
+ return path.join(mirrorPath, '.snapshotter', ERROR_FILE_NAME);
102
+ }
103
+ function sortTestResults(testResults) {
104
+ const suites = [...testResults.suites].map((suite) => (Object.assign(Object.assign({}, suite), { tests: [...suite.tests].sort((left, right) => left.name.localeCompare(right.name)) })));
105
+ suites.sort((left, right) => left.path.localeCompare(right.path));
106
+ const typeErrors = testResults.typeErrors
107
+ ? [...testResults.typeErrors].sort((left, right) => {
108
+ const fileCompare = left.file.localeCompare(right.file);
109
+ if (fileCompare !== 0) {
110
+ return fileCompare;
111
+ }
112
+ const lineCompare = left.line - right.line;
113
+ if (lineCompare !== 0) {
114
+ return lineCompare;
115
+ }
116
+ return left.column - right.column;
117
+ })
118
+ : undefined;
119
+ return Object.assign(Object.assign({}, testResults), { suites,
120
+ typeErrors });
121
+ }
122
+ main().catch((err) => {
123
+ console.error('Snapshot script failed:', err);
124
+ process.exit(1);
125
+ });
@@ -1,2 +1,3 @@
1
1
  import { SnapshotOptions } from './snapshotter.types.js';
2
- export declare function snapshot(options: SnapshotOptions): Promise<boolean>;
2
+ export declare function snapshot(options: SnapshotOptions): void;
3
+ export declare function checkForPreviousSnapshotFailure(mirrorPath: string): void;
@@ -1,73 +1,40 @@
1
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
- return new (P || (P = Promise))(function (resolve, reject) {
4
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
- step((generator = generator.apply(thisArg, _arguments || [])).next());
8
- });
9
- };
10
- import { mkdirSync, writeFileSync } from 'fs';
1
+ import { spawn } from 'child_process';
2
+ import { existsSync, mkdirSync, readFileSync, unlinkSync, writeFileSync, } from 'fs';
11
3
  import path from 'path';
12
4
  import { buildLog } from '@sprucelabs/spruce-skill-utils';
13
- import { gitCommit, gitPush } from './git.js.js';
14
- import { syncFiles } from './sync.js.js';
15
- class Snapshotter {
16
- constructor() {
17
- this.log = buildLog('Snapshotter');
18
- }
19
- snapshot(options) {
20
- return __awaiter(this, void 0, void 0, function* () {
21
- var _a;
22
- const sourcePath = (_a = options.sourcePath) !== null && _a !== void 0 ? _a : process.cwd();
23
- const { mirrorPath, testResults, remote } = options;
24
- this.log.info('Starting snapshot', sourcePath, mirrorPath);
25
- try {
26
- yield syncFiles(sourcePath, mirrorPath);
27
- this.log.info('Files synced', mirrorPath);
28
- const snapshotterDir = path.join(mirrorPath, '.snapshotter');
29
- mkdirSync(snapshotterDir, { recursive: true });
30
- writeFileSync(path.join(snapshotterDir, 'testResults.json'), JSON.stringify(sortTestResults(testResults), null, 2));
31
- this.log.info('Test results saved', snapshotterDir);
32
- const committed = yield gitCommit(mirrorPath, this.log);
33
- if (!committed) {
34
- this.log.info('No changes to commit', mirrorPath);
35
- return false;
36
- }
37
- this.log.info('Commit created, pushing', remote.url);
38
- yield gitPush(mirrorPath, remote, this.log);
39
- this.log.info('Push completed', remote.url);
40
- return true;
41
- }
42
- catch (err) {
43
- const message = err instanceof Error ? err.message : String(err);
44
- this.log.error('Snapshot failed', message);
45
- throw err;
46
- }
47
- });
5
+ const ERROR_FILE_NAME = 'lastError.json';
6
+ const log = buildLog('Snapshotter');
7
+ const scriptPath = path.join(__dirname, 'scripts', 'runSnapshot.js');
8
+ export function snapshot(options) {
9
+ const snapshotterDir = writeOptionsFile(options);
10
+ spawnSnapshotProcess(snapshotterDir);
11
+ log.info('Snapshot queued (running in background)', options.mirrorPath);
12
+ }
13
+ export function checkForPreviousSnapshotFailure(mirrorPath) {
14
+ const errorPath = getErrorFilePath(mirrorPath);
15
+ if (existsSync(errorPath)) {
16
+ const errorData = JSON.parse(readFileSync(errorPath, 'utf-8'));
17
+ unlinkSync(errorPath);
18
+ throw new Error(`Previous snapshot failed: ${errorData.message}\n` +
19
+ `Timestamp: ${errorData.timestamp}\n` +
20
+ `This error was from a background snapshot that failed. ` +
21
+ `The snapshot has been retried - if this error persists, check your configuration.`);
48
22
  }
49
23
  }
50
- export function snapshot(options) {
51
- return __awaiter(this, void 0, void 0, function* () {
52
- return new Snapshotter().snapshot(options);
24
+ function writeOptionsFile(options) {
25
+ const snapshotterDir = path.join(options.mirrorPath, '.snapshotter');
26
+ mkdirSync(snapshotterDir, { recursive: true });
27
+ const optionsPath = path.join(snapshotterDir, 'pending.json');
28
+ writeFileSync(optionsPath, JSON.stringify(options, null, 2));
29
+ return snapshotterDir;
30
+ }
31
+ function spawnSnapshotProcess(snapshotterDir) {
32
+ const child = spawn('node', [scriptPath, snapshotterDir], {
33
+ detached: true,
34
+ stdio: 'ignore',
53
35
  });
36
+ child.unref();
54
37
  }
55
- function sortTestResults(testResults) {
56
- const suites = [...testResults.suites].map((suite) => (Object.assign(Object.assign({}, suite), { tests: [...suite.tests].sort((left, right) => left.name.localeCompare(right.name)) })));
57
- suites.sort((left, right) => left.path.localeCompare(right.path));
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 });
38
+ function getErrorFilePath(mirrorPath) {
39
+ return path.join(mirrorPath, '.snapshotter', ERROR_FILE_NAME);
73
40
  }
package/build/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export { snapshot } from './snapshot.js';
1
+ export { snapshot, checkForPreviousSnapshotFailure } from './snapshot.js';
2
2
  export * from './snapshotter.types.js';
package/build/index.js CHANGED
@@ -14,7 +14,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.snapshot = void 0;
17
+ exports.checkForPreviousSnapshotFailure = exports.snapshot = void 0;
18
18
  var snapshot_js_1 = require("./snapshot.js");
19
19
  Object.defineProperty(exports, "snapshot", { enumerable: true, get: function () { return snapshot_js_1.snapshot; } });
20
+ Object.defineProperty(exports, "checkForPreviousSnapshotFailure", { enumerable: true, get: function () { return snapshot_js_1.checkForPreviousSnapshotFailure; } });
20
21
  __exportStar(require("./snapshotter.types.js"), exports);
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,120 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const fs_1 = require("fs");
7
+ const path_1 = __importDefault(require("path"));
8
+ const spruce_skill_utils_1 = require("@sprucelabs/spruce-skill-utils");
9
+ const git_js_1 = require("../git.js");
10
+ const sync_js_1 = require("../sync.js");
11
+ const ERROR_FILE_NAME = 'lastError.json';
12
+ const LOCK_FILE_NAME = 'snapshot.lock';
13
+ const PENDING_FILE_NAME = 'pending.json';
14
+ const log = (0, spruce_skill_utils_1.buildLog)('Snapshotter');
15
+ async function main() {
16
+ const snapshotterDir = process.argv[2];
17
+ if (!snapshotterDir) {
18
+ console.error('Usage: runSnapshot <snapshotter-dir>');
19
+ process.exit(1);
20
+ }
21
+ const lockPath = path_1.default.join(snapshotterDir, LOCK_FILE_NAME);
22
+ if ((0, fs_1.existsSync)(lockPath)) {
23
+ log.info('Another snapshot is running, exiting');
24
+ process.exit(0);
25
+ }
26
+ try {
27
+ (0, fs_1.writeFileSync)(lockPath, process.pid.toString());
28
+ await processLoop(snapshotterDir);
29
+ }
30
+ finally {
31
+ if ((0, fs_1.existsSync)(lockPath)) {
32
+ (0, fs_1.unlinkSync)(lockPath);
33
+ }
34
+ }
35
+ }
36
+ async function processLoop(snapshotterDir) {
37
+ const pendingPath = path_1.default.join(snapshotterDir, PENDING_FILE_NAME);
38
+ while ((0, fs_1.existsSync)(pendingPath)) {
39
+ const options = JSON.parse((0, fs_1.readFileSync)(pendingPath, 'utf-8'));
40
+ (0, fs_1.unlinkSync)(pendingPath);
41
+ await executeSnapshot(options);
42
+ }
43
+ }
44
+ async function executeSnapshot(options) {
45
+ const sourcePath = options.sourcePath ?? process.cwd();
46
+ const { mirrorPath, testResults, remote } = options;
47
+ log.info('Starting snapshot', sourcePath, mirrorPath);
48
+ try {
49
+ await (0, sync_js_1.syncFiles)(sourcePath, mirrorPath);
50
+ log.info('Files synced', mirrorPath);
51
+ const snapshotterDir = path_1.default.join(mirrorPath, '.snapshotter');
52
+ (0, fs_1.mkdirSync)(snapshotterDir, { recursive: true });
53
+ (0, fs_1.writeFileSync)(path_1.default.join(snapshotterDir, 'testResults.json'), JSON.stringify(sortTestResults(testResults), null, 2));
54
+ log.info('Test results saved', snapshotterDir);
55
+ const committed = await (0, git_js_1.gitCommit)(mirrorPath, log);
56
+ if (!committed) {
57
+ log.info('No changes to commit', mirrorPath);
58
+ clearError(mirrorPath);
59
+ return;
60
+ }
61
+ log.info('Commit created, pushing', remote.url);
62
+ await (0, git_js_1.gitPush)(mirrorPath, remote, log);
63
+ log.info('Push completed', remote.url);
64
+ clearError(mirrorPath);
65
+ }
66
+ catch (err) {
67
+ const message = err instanceof Error ? err.message : String(err);
68
+ log.error('Snapshot failed (will surface on next test run)', message);
69
+ persistError(mirrorPath, err);
70
+ }
71
+ }
72
+ function persistError(mirrorPath, err) {
73
+ const snapshotterDir = path_1.default.join(mirrorPath, '.snapshotter');
74
+ (0, fs_1.mkdirSync)(snapshotterDir, { recursive: true });
75
+ const errorPath = getErrorFilePath(mirrorPath);
76
+ const errorData = {
77
+ message: err instanceof Error ? err.message : String(err),
78
+ stack: err instanceof Error ? err.stack : undefined,
79
+ timestamp: new Date().toISOString(),
80
+ };
81
+ (0, fs_1.writeFileSync)(errorPath, JSON.stringify(errorData, null, 2));
82
+ }
83
+ function clearError(mirrorPath) {
84
+ const errorPath = getErrorFilePath(mirrorPath);
85
+ if ((0, fs_1.existsSync)(errorPath)) {
86
+ (0, fs_1.unlinkSync)(errorPath);
87
+ }
88
+ }
89
+ function getErrorFilePath(mirrorPath) {
90
+ return path_1.default.join(mirrorPath, '.snapshotter', ERROR_FILE_NAME);
91
+ }
92
+ function sortTestResults(testResults) {
93
+ const suites = [...testResults.suites].map((suite) => ({
94
+ ...suite,
95
+ tests: [...suite.tests].sort((left, right) => left.name.localeCompare(right.name)),
96
+ }));
97
+ suites.sort((left, right) => left.path.localeCompare(right.path));
98
+ const typeErrors = testResults.typeErrors
99
+ ? [...testResults.typeErrors].sort((left, right) => {
100
+ const fileCompare = left.file.localeCompare(right.file);
101
+ if (fileCompare !== 0) {
102
+ return fileCompare;
103
+ }
104
+ const lineCompare = left.line - right.line;
105
+ if (lineCompare !== 0) {
106
+ return lineCompare;
107
+ }
108
+ return left.column - right.column;
109
+ })
110
+ : undefined;
111
+ return {
112
+ ...testResults,
113
+ suites,
114
+ typeErrors,
115
+ };
116
+ }
117
+ main().catch((err) => {
118
+ console.error('Snapshot script failed:', err);
119
+ process.exit(1);
120
+ });
@@ -1,2 +1,3 @@
1
1
  import { SnapshotOptions } from './snapshotter.types.js';
2
- export declare function snapshot(options: SnapshotOptions): Promise<boolean>;
2
+ export declare function snapshot(options: SnapshotOptions): void;
3
+ export declare function checkForPreviousSnapshotFailure(mirrorPath: string): void;
package/build/snapshot.js CHANGED
@@ -4,68 +4,44 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.snapshot = snapshot;
7
+ exports.checkForPreviousSnapshotFailure = checkForPreviousSnapshotFailure;
8
+ const child_process_1 = require("child_process");
7
9
  const fs_1 = require("fs");
8
10
  const path_1 = __importDefault(require("path"));
9
11
  const spruce_skill_utils_1 = require("@sprucelabs/spruce-skill-utils");
10
- const git_js_1 = require("./git.js");
11
- const sync_js_1 = require("./sync.js");
12
- class Snapshotter {
13
- constructor() {
14
- this.log = (0, spruce_skill_utils_1.buildLog)('Snapshotter');
15
- }
16
- async snapshot(options) {
17
- const sourcePath = options.sourcePath ?? process.cwd();
18
- const { mirrorPath, testResults, remote } = options;
19
- this.log.info('Starting snapshot', sourcePath, mirrorPath);
20
- try {
21
- await (0, sync_js_1.syncFiles)(sourcePath, mirrorPath);
22
- this.log.info('Files synced', mirrorPath);
23
- const snapshotterDir = path_1.default.join(mirrorPath, '.snapshotter');
24
- (0, fs_1.mkdirSync)(snapshotterDir, { recursive: true });
25
- (0, fs_1.writeFileSync)(path_1.default.join(snapshotterDir, 'testResults.json'), JSON.stringify(sortTestResults(testResults), null, 2));
26
- this.log.info('Test results saved', snapshotterDir);
27
- const committed = await (0, git_js_1.gitCommit)(mirrorPath, this.log);
28
- if (!committed) {
29
- this.log.info('No changes to commit', mirrorPath);
30
- return false;
31
- }
32
- this.log.info('Commit created, pushing', remote.url);
33
- await (0, git_js_1.gitPush)(mirrorPath, remote, this.log);
34
- this.log.info('Push completed', remote.url);
35
- return true;
36
- }
37
- catch (err) {
38
- const message = err instanceof Error ? err.message : String(err);
39
- this.log.error('Snapshot failed', message);
40
- throw err;
41
- }
12
+ const ERROR_FILE_NAME = 'lastError.json';
13
+ const log = (0, spruce_skill_utils_1.buildLog)('Snapshotter');
14
+ const scriptPath = path_1.default.join(__dirname, 'scripts', 'runSnapshot.js');
15
+ function snapshot(options) {
16
+ const snapshotterDir = writeOptionsFile(options);
17
+ spawnSnapshotProcess(snapshotterDir);
18
+ log.info('Snapshot queued (running in background)', options.mirrorPath);
19
+ }
20
+ function checkForPreviousSnapshotFailure(mirrorPath) {
21
+ const errorPath = getErrorFilePath(mirrorPath);
22
+ if ((0, fs_1.existsSync)(errorPath)) {
23
+ const errorData = JSON.parse((0, fs_1.readFileSync)(errorPath, 'utf-8'));
24
+ (0, fs_1.unlinkSync)(errorPath);
25
+ throw new Error(`Previous snapshot failed: ${errorData.message}\n` +
26
+ `Timestamp: ${errorData.timestamp}\n` +
27
+ `This error was from a background snapshot that failed. ` +
28
+ `The snapshot has been retried - if this error persists, check your configuration.`);
42
29
  }
43
30
  }
44
- async function snapshot(options) {
45
- return new Snapshotter().snapshot(options);
31
+ function writeOptionsFile(options) {
32
+ const snapshotterDir = path_1.default.join(options.mirrorPath, '.snapshotter');
33
+ (0, fs_1.mkdirSync)(snapshotterDir, { recursive: true });
34
+ const optionsPath = path_1.default.join(snapshotterDir, 'pending.json');
35
+ (0, fs_1.writeFileSync)(optionsPath, JSON.stringify(options, null, 2));
36
+ return snapshotterDir;
37
+ }
38
+ function spawnSnapshotProcess(snapshotterDir) {
39
+ const child = (0, child_process_1.spawn)('node', [scriptPath, snapshotterDir], {
40
+ detached: true,
41
+ stdio: 'ignore',
42
+ });
43
+ child.unref();
46
44
  }
47
- function sortTestResults(testResults) {
48
- const suites = [...testResults.suites].map((suite) => ({
49
- ...suite,
50
- tests: [...suite.tests].sort((left, right) => left.name.localeCompare(right.name)),
51
- }));
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;
66
- return {
67
- ...testResults,
68
- suites,
69
- typeErrors,
70
- };
45
+ function getErrorFilePath(mirrorPath) {
46
+ return path_1.default.join(mirrorPath, '.snapshotter', ERROR_FILE_NAME);
71
47
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@regressionproof/snapshotter",
3
- "version": "0.6.5",
3
+ "version": "0.7.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": "352f13a4d1696f99936450a1ae88c195457b22ad"
97
+ "gitHead": "860c3695ab884487c654e5cf794262bff8ea1570"
98
98
  }