@feasibleone/blong-chain 1.5.0 → 1.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.
- package/CHANGELOG.md +16 -0
- package/dist/package.json +2 -4
- package/index.ts +33 -2
- package/package.json +4 -5
- package/test-types.ts +18 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.6.0](https://github.com/feasibleone/blong/compare/blong-chain-v1.5.1...blong-chain-v1.6.0) (2026-05-12)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* implement rationale misalignment TODO items (Items 4-14) ([#145](https://github.com/feasibleone/blong/issues/145)) ([a7b3b44](https://github.com/feasibleone/blong/commit/a7b3b44c4389a8f6313819e42ff8053fb90e1904))
|
|
9
|
+
|
|
10
|
+
## [1.5.1](https://github.com/feasibleone/blong/compare/blong-chain-v1.5.0...blong-chain-v1.5.1) (2026-04-26)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* dependencies ([705b2f7](https://github.com/feasibleone/blong/commit/705b2f7a72ac2dc93aea0f586394dde71192c1b6))
|
|
16
|
+
* eslint ([a3b9f2b](https://github.com/feasibleone/blong/commit/a3b9f2bed4f958abfb378d97d372b3e7a6cd5a21))
|
|
17
|
+
* remove heft lint ([c4d0eaa](https://github.com/feasibleone/blong/commit/c4d0eaa81714c04e9f9adec01c6ae7fa068f1948))
|
|
18
|
+
|
|
3
19
|
## [1.5.0](https://github.com/feasibleone/blong/compare/blong-chain-v1.4.0...blong-chain-v1.5.0) (2026-04-01)
|
|
4
20
|
|
|
5
21
|
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@feasibleone/blong-chain",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.1",
|
|
4
4
|
"description": "Parallel testing with automatic dependencies",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"blong",
|
|
@@ -27,13 +27,11 @@
|
|
|
27
27
|
"p-queue": "^9.1.0"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@rushstack/eslint-config": "^4.6.4",
|
|
31
30
|
"@rushstack/heft": "^1.2.6",
|
|
32
31
|
"@rushstack/heft-lint-plugin": "^1.2.6",
|
|
33
32
|
"@rushstack/heft-typescript-plugin": "^1.3.1",
|
|
34
33
|
"@types/node": "^24",
|
|
35
|
-
"
|
|
36
|
-
"tap": "^21.6.2",
|
|
34
|
+
"tap": "^21.6.3",
|
|
37
35
|
"typescript": "^5.9.3"
|
|
38
36
|
}
|
|
39
37
|
}
|
package/index.ts
CHANGED
|
@@ -366,6 +366,9 @@ function captureSourceLocation(fn: Function): ISourceLocation {
|
|
|
366
366
|
};
|
|
367
367
|
}
|
|
368
368
|
|
|
369
|
+
/** Default number of retry attempts per failing step when `rerun.enabled` is true */
|
|
370
|
+
const DEFAULT_MAX_RETRIES = 1;
|
|
371
|
+
|
|
369
372
|
/**
|
|
370
373
|
* Main test executor class
|
|
371
374
|
*/
|
|
@@ -416,6 +419,7 @@ export class TestExecutor extends EventEmitter {
|
|
|
416
419
|
captureStackTraces: config.captureStackTraces ?? false,
|
|
417
420
|
framework: config.framework,
|
|
418
421
|
log: config.log,
|
|
422
|
+
rerun: config.rerun,
|
|
419
423
|
};
|
|
420
424
|
this.log = config.log;
|
|
421
425
|
|
|
@@ -615,8 +619,31 @@ export class TestExecutor extends EventEmitter {
|
|
|
615
619
|
this.dependencyTracker,
|
|
616
620
|
);
|
|
617
621
|
|
|
618
|
-
// Execute the step
|
|
619
|
-
const
|
|
622
|
+
// Execute the step (with optional retry loop)
|
|
623
|
+
const maxRetries =
|
|
624
|
+
this.config.rerun?.enabled ? (this.config.rerun.maxRetries ?? DEFAULT_MAX_RETRIES) : 0;
|
|
625
|
+
let result: unknown;
|
|
626
|
+
let lastError: Error | undefined;
|
|
627
|
+
|
|
628
|
+
for (let attempt = 0; attempt <= maxRetries; attempt++) {
|
|
629
|
+
try {
|
|
630
|
+
result = await fn(assert, context);
|
|
631
|
+
lastError = undefined;
|
|
632
|
+
break;
|
|
633
|
+
} catch (err) {
|
|
634
|
+
lastError = err as Error;
|
|
635
|
+
if (attempt < maxRetries) {
|
|
636
|
+
this.log?.warn?.(
|
|
637
|
+
{err},
|
|
638
|
+
`step ${stepName} failed (attempt ${attempt + 1}/${maxRetries + 1}), retrying`,
|
|
639
|
+
);
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
if (lastError !== undefined) {
|
|
645
|
+
throw lastError;
|
|
646
|
+
}
|
|
620
647
|
|
|
621
648
|
// Store result in real context
|
|
622
649
|
this.realContext[stepName] = result;
|
|
@@ -903,3 +930,7 @@ export class TestExecutor extends EventEmitter {
|
|
|
903
930
|
|
|
904
931
|
// Export all types
|
|
905
932
|
export type * from './test-types.js';
|
|
933
|
+
|
|
934
|
+
// Export snapshot helper
|
|
935
|
+
export {maskPaths, snapshot} from './snapshot.js';
|
|
936
|
+
export type {ISnapshotContext, ISnapshotOptions} from './snapshot.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@feasibleone/blong-chain",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"description": "Parallel testing with automatic dependencies",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"blong",
|
|
@@ -12,19 +12,18 @@
|
|
|
12
12
|
},
|
|
13
13
|
"type": "module",
|
|
14
14
|
"exports": {
|
|
15
|
-
".": "./index.ts"
|
|
15
|
+
".": "./index.ts",
|
|
16
|
+
"./snapshot": "./snapshot.ts"
|
|
16
17
|
},
|
|
17
18
|
"dependencies": {
|
|
18
19
|
"p-queue": "^9.1.0"
|
|
19
20
|
},
|
|
20
21
|
"devDependencies": {
|
|
21
|
-
"@rushstack/eslint-config": "^4.6.4",
|
|
22
22
|
"@rushstack/heft": "^1.2.6",
|
|
23
23
|
"@rushstack/heft-lint-plugin": "^1.2.6",
|
|
24
24
|
"@rushstack/heft-typescript-plugin": "^1.3.1",
|
|
25
25
|
"@types/node": "^24",
|
|
26
|
-
"
|
|
27
|
-
"tap": "^21.6.2",
|
|
26
|
+
"tap": "^21.6.3",
|
|
28
27
|
"typescript": "^5.9.3"
|
|
29
28
|
},
|
|
30
29
|
"scripts": {
|
package/test-types.ts
CHANGED
|
@@ -340,6 +340,24 @@ export interface ITestExecutorConfig {
|
|
|
340
340
|
framework?: unknown;
|
|
341
341
|
/** Logger instance for reporting step failures */
|
|
342
342
|
log?: ITestLogger;
|
|
343
|
+
/**
|
|
344
|
+
* Automatic rerun configuration for failing steps (Phase 1).
|
|
345
|
+
*
|
|
346
|
+
* When enabled, a step that throws an error is retried up to `maxRetries`
|
|
347
|
+
* times before being reported as failed. This is useful for flaky tests
|
|
348
|
+
* caused by race conditions or transient network issues.
|
|
349
|
+
*
|
|
350
|
+
* Phase 2 (diagnostic attachment) is not yet implemented.
|
|
351
|
+
*/
|
|
352
|
+
rerun?: {
|
|
353
|
+
/** Whether to enable the retry mechanism (default: false) */
|
|
354
|
+
enabled?: boolean;
|
|
355
|
+
/**
|
|
356
|
+
* Maximum number of retry attempts per failing step (default: 1).
|
|
357
|
+
* Set to 0 to detect failures without retrying.
|
|
358
|
+
*/
|
|
359
|
+
maxRetries?: number;
|
|
360
|
+
};
|
|
343
361
|
}
|
|
344
362
|
|
|
345
363
|
/**
|