@feasibleone/blong-chain 1.9.0 โ†’ 1.10.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 CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.10.0](https://github.com/feasibleone/blong/compare/blong-chain-v1.9.0...blong-chain-v1.10.0) (2026-09-24)
4
+
5
+
6
+ ### Features
7
+
8
+ * sequence diagram progress points ([dc5b153](https://github.com/feasibleone/blong/commit/dc5b15327f31698a26a75ec73bdf9a0956a43dd9))
9
+
3
10
  ## [1.9.0](https://github.com/feasibleone/blong/compare/blong-chain-v1.8.2...blong-chain-v1.9.0) (2026-09-15)
4
11
 
5
12
 
package/README.md CHANGED
@@ -2,9 +2,9 @@
2
2
 
3
3
  **Parallel test execution with automatic dependency detection through thenable proxies.**
4
4
 
5
- `blong-chain` is a TypeScript test framework that automatically detects
6
- dependencies between test steps and executes them in parallel when possible,
7
- maximizing performance while maintaining correctness.
5
+ `blong-chain` is a TypeScript test framework that automatically detects dependencies between test
6
+ steps and executes them in parallel when possible, maximizing performance while maintaining
7
+ correctness.
8
8
 
9
9
  ## Key Features
10
10
 
@@ -14,10 +14,8 @@ maximizing performance while maintaining correctness.
14
14
  - ๐ŸŽฏ **Thenable Proxies** - Natural async/await syntax for step dependencies
15
15
  - ๐Ÿ“ˆ **Performance Metrics** - Queue time, execution time, and critical path analysis
16
16
  - ๐ŸŒณ **Nested Groups** - Hierarchical test organization with proper indentation
17
- - ๐Ÿ”ง **Error Handling** - Graceful failure with continued execution of
18
- independent steps
19
- - ๐Ÿงช **Test Framework Integration** - Works seamlessly with node:test, tap,
20
- and others
17
+ - ๐Ÿ”ง **Error Handling** - Graceful failure with continued execution of independent steps
18
+ - ๐Ÿงช **Test Framework Integration** - Works seamlessly with node:test, tap, and others
21
19
 
22
20
  ## Installation
23
21
 
@@ -32,7 +30,7 @@ import {TestExecutor} from '@feasibleone/blong-chain';
32
30
  import assert from 'node:assert/strict';
33
31
  import {test} from 'node:test';
34
32
 
35
- test('parallel execution example', async (t) => {
33
+ test('parallel execution example', async t => {
36
34
  const executor = new TestExecutor({concurrency: 10});
37
35
 
38
36
  const steps = [
@@ -69,8 +67,7 @@ test('parallel execution example', async (t) => {
69
67
 
70
68
  ### Thenable Proxies
71
69
 
72
- Steps access previous results through thenable proxies that automatically track
73
- dependencies:
70
+ Steps access previous results through thenable proxies that automatically track dependencies:
74
71
 
75
72
  ```typescript
76
73
  // Pattern 1: Direct await
@@ -89,7 +86,14 @@ async function step3(assert, {previousStep}) {
89
86
  }
90
87
 
91
88
  // Pattern 4: Deep destructuring
92
- async function step4(assert, {previousStep: {user: {name}}}) {
89
+ async function step4(
90
+ assert,
91
+ {
92
+ previousStep: {
93
+ user: {name},
94
+ },
95
+ },
96
+ ) {
93
97
  const userName = await name;
94
98
  }
95
99
  ```
@@ -155,23 +159,37 @@ Organize steps into hierarchical groups for better structure and output:
155
159
 
156
160
  ```typescript
157
161
  const databaseSetup = [
158
- async function connect() { return {connected: true}; },
159
- async function createSchema() { return {created: true}; },
160
- async function seedData() { return {users: []}; },
162
+ async function connect() {
163
+ return {connected: true};
164
+ },
165
+ async function createSchema() {
166
+ return {created: true};
167
+ },
168
+ async function seedData() {
169
+ return {users: []};
170
+ },
161
171
  ] as any;
162
172
  databaseSetup.name = 'Database Setup';
163
173
 
164
174
  const apiTests = [
165
- async function testEndpoint1() { return {status: 200}; },
166
- async function testEndpoint2() { return {status: 200}; },
175
+ async function testEndpoint1() {
176
+ return {status: 200};
177
+ },
178
+ async function testEndpoint2() {
179
+ return {status: 200};
180
+ },
167
181
  ] as any;
168
182
  apiTests.name = 'API Tests';
169
183
 
170
184
  const steps = [
171
- async function initialize() { return {ready: true}; },
172
- databaseSetup, // Nested group
173
- apiTests, // Nested group
174
- async function cleanup() { return {done: true}; },
185
+ async function initialize() {
186
+ return {ready: true};
187
+ },
188
+ databaseSetup, // Nested group
189
+ apiTests, // Nested group
190
+ async function cleanup() {
191
+ return {done: true};
192
+ },
175
193
  ];
176
194
 
177
195
  await executor.execute(steps, {}, t);
@@ -194,9 +212,13 @@ await executor.execute(steps, {}, t);
194
212
  โœ” cleanup
195
213
  ```
196
214
 
197
- ### Checkpoints (Synchronization Barriers)
215
+ ### Sync Barriers
216
+
217
+ Use empty arrays `[]` as sync barriers to synchronize parallel execution. All steps before a barrier
218
+ must complete before any steps after it begin:
198
219
 
199
- Use empty arrays `[]` as checkpoints to synchronize parallel execution. All steps before a checkpoint must complete before any steps after it begin:
220
+ (A _snapshot marker_ โ€” `snapshot('name', ...steps)` โ€” is a different thing: it waits for steps
221
+ **and** snapshots their results. A sync barrier snapshots nothing.)
200
222
 
201
223
  ```typescript
202
224
  const steps = [
@@ -216,7 +238,7 @@ const steps = [
216
238
  return {loggerReady: true};
217
239
  },
218
240
 
219
- // Checkpoint: Wait for all Phase 1 steps to complete
241
+ // Sync barrier: Wait for all Phase 1 steps to complete
220
242
  [],
221
243
 
222
244
  // Phase 2: These run in parallel, but only after Phase 1 completes
@@ -230,7 +252,7 @@ const steps = [
230
252
  return await fetchProducts(config.apiUrl);
231
253
  },
232
254
 
233
- // Another checkpoint
255
+ // Another barrier
234
256
  [],
235
257
 
236
258
  // Phase 3: Runs only after Phase 2 completes
@@ -243,6 +265,7 @@ const steps = [
243
265
  ```
244
266
 
245
267
  **Use Cases:**
268
+
246
269
  - **Phased execution**: Separate initialization, data loading, processing, and cleanup phases
247
270
  - **Resource management**: Ensure all resources are ready before proceeding
248
271
  - **Testing stages**: Complete all setup before running tests, then cleanup
@@ -255,7 +278,7 @@ Monitor test execution in real-time:
255
278
  ```typescript
256
279
  const executor = new TestExecutor({concurrency: 10});
257
280
 
258
- executor.on('test:start', (progress) => {
281
+ executor.on('test:start', progress => {
259
282
  console.log('Test started:', progress.testName);
260
283
  });
261
284
 
@@ -314,9 +337,7 @@ console.log(`Critical path: ${latency.criticalPath.join(' โ†’ ')}`);
314
337
 
315
338
  // View bottlenecks
316
339
  for (const bottleneck of latency.bottlenecks) {
317
- console.log(
318
- `${bottleneck.stepName} blocked ${bottleneck.blockedSteps.length} steps`
319
- );
340
+ console.log(`${bottleneck.stepName} blocked ${bottleneck.blockedSteps.length} steps`);
320
341
  }
321
342
 
322
343
  // View individual step metrics
@@ -391,7 +412,7 @@ const executor = new TestExecutor({
391
412
  ## Real-World Example
392
413
 
393
414
  ```typescript
394
- test('e-commerce checkout flow', async (t) => {
415
+ test('e-commerce checkout flow', async t => {
395
416
  const executor = new TestExecutor({concurrency: 5});
396
417
 
397
418
  const steps = [
@@ -421,9 +442,7 @@ test('e-commerce checkout flow', async (t) => {
421
442
  return {amount: product.price * 0.08};
422
443
  },
423
444
 
424
- async function calculateTotal(assert, {
425
- loadProduct, calculateShipping, calculateTax
426
- }) {
445
+ async function calculateTotal(assert, {loadProduct, calculateShipping, calculateTax}) {
427
446
  const product = await loadProduct;
428
447
  const shipping = await calculateShipping;
429
448
  const tax = await calculateTax;
@@ -438,9 +457,7 @@ test('e-commerce checkout flow', async (t) => {
438
457
  };
439
458
  },
440
459
 
441
- async function processPayment(assert, {
442
- calculateTotal, validateInventory
443
- }) {
460
+ async function processPayment(assert, {calculateTotal, validateInventory}) {
444
461
  const total = await calculateTotal;
445
462
  const inventory = await validateInventory;
446
463
 
@@ -465,10 +482,14 @@ test('e-commerce checkout flow', async (t) => {
465
482
  },
466
483
  ];
467
484
 
468
- await executor.execute(steps, {
469
- testId: 'checkout-001',
470
- environment: 'test',
471
- }, t);
485
+ await executor.execute(
486
+ steps,
487
+ {
488
+ testId: 'checkout-001',
489
+ environment: 'test',
490
+ },
491
+ t,
492
+ );
472
493
 
473
494
  // Verify results
474
495
  const progress = executor.getProgress();
@@ -494,8 +515,7 @@ In this example:
494
515
 
495
516
  - **[SHOWCASE.md](./SHOWCASE.md)** - Comprehensive feature showcase with all patterns
496
517
  - **[TESTING.md](./TESTING.md)** - Testing guide and CI integration
497
- - **[NESTED_TEST_CONTEXT.md](./NESTED_TEST_CONTEXT.md)** - Test framework
498
- integration details
518
+ - **[NESTED_TEST_CONTEXT.md](./NESTED_TEST_CONTEXT.md)** - Test framework integration details
499
519
  - **[test-types.ts](./test-types.ts)** - Complete TypeScript API documentation
500
520
 
501
521
  ## Running Tests
@@ -514,17 +534,17 @@ npm run test:all
514
534
 
515
535
  ## How It Works
516
536
 
517
- 1. **Detection Phase**: When you destructure or access `context.stepName`, a
518
- thenable proxy is returned
537
+ 1. **Detection Phase**: When you destructure or access `context.stepName`, a thenable proxy is
538
+ returned
519
539
  2. **Dependency Tracking**: The access is recorded as a dependency
520
540
  3. **Scheduling Phase**: Steps are added to a priority queue based on dependencies
521
541
  4. **Execution Phase**: Steps run as soon as all their dependencies complete
522
542
  5. **Resolution Phase**: Step results are stored and proxies are resolved
523
- 6. **Checkpoints**: Empty arrays `[]` create synchronization barriers, waiting for
524
- all previous steps to complete before continuing
543
+ 6. **Sync Barriers**: Empty arrays `[]` create synchronization barriers, waiting for all previous
544
+ steps to complete before continuing
525
545
 
526
- This creates a dynamic dependency graph that enables maximum parallelization
527
- while ensuring correctness, with optional synchronization points for phased execution.
546
+ This creates a dynamic dependency graph that enables maximum parallelization while ensuring
547
+ correctness, with optional synchronization points for phased execution.
528
548
 
529
549
  ## Use Cases
530
550
 
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Demonstration of nested test context with automatic indentation
3
+ * Run with: node --test demo.test.js
4
+ */
5
+ export {};
6
+ //# sourceMappingURL=demo.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"demo.test.d.ts","sourceRoot":"","sources":["../../examples/demo.test.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"demo.test.js","sourceRoot":"","sources":["../../examples/demo.test.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EAAC,QAAQ,E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AG,CAAC,MAAM,OAAO,CAAC,KAAK,CAAmC,CAAC;gBACnE,MAAM,EAAE,GAAG,CAAC,MAAM,OAAO,CAAC,KAAK,CAAmC,CAAC;gBACnE,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;gBAClC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;gBAChC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;gBAChC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;gBAChC,OAAO,EAAC,WAAW,EAAE,IAAI,EAAC,CAAC;YAC/B,CAAC;SACJ,CAAC;QAEF,MAAM,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;QAErC,MAAM,QAAQ,GAAG,QAAQ,CAAC,WAAW,EAAE,CAAC;QACxC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC;IAC7C,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Demonstration of error reporting in nested test contexts
3
+ *
4
+ * This file shows how errors are properly reported with indentation and tracking.
5
+ * Run with: node --test error-demo.test.js
6
+ *
7
+ * You'll see that:
8
+ * 1. Errors appear in the nested test output with proper indentation
9
+ * 2. Error details (message, stack trace) are captured
10
+ * 3. Progress tracking records all error information
11
+ * 4. Other independent steps continue executing
12
+ */
13
+ export {};
14
+ //# sourceMappingURL=error-demo.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error-demo.test.d.ts","sourceRoot":"","sources":["../../examples/error-demo.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error-demo.test.js","sourceRoot":"","sources":["../../examples/error-demo.test.ts"],"names":[],"mapp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,+BAA+B,CAAC,CAAC;AAC7C,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;AAC5B,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC;AACvC,OAAO,CAAC,GAAG,CAAC,qDAAqD,CAAC,CAAC;AACnE,OAAO,CAAC,GAAG,CAAC,oDAAoD,CAAC,CAAC;AAClE,OAAO,CAAC,GAAG,CAAC,4CAA4C,CAAC,CAAC;AAC1D,OAAO,CAAC,GAAG,CAAC,iDAAiD,CAAC,CAAC;AAC/D,OAAO,CAAC,GAAG,CAAC,0DAA0D,CAAC,CAAC;AACxE,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC"}
@@ -0,0 +1,87 @@
1
+ /**
2
+ * Parallel Test Executor
3
+ *
4
+ * Implements the new parallel test execution framework with:
5
+ * - Thenable proxies for automatic dependency detection
6
+ * - Parallel execution with configurable concurrency
7
+ * - Dependency graph tracking
8
+ * - Live progress tracking
9
+ * - Enhanced error reporting
10
+ * - Latency metrics
11
+ */
12
+ import { EventEmitter } from 'node:events';
13
+ import type { IDependencyGraph, IMeta, ITestEvents, ITestExecutorConfig, ITestFrameworkContext, ITestLatency, ITestProgress, StepArray } from './test-types.js';
14
+ /**
15
+ * Main test executor class
16
+ */
17
+ export declare class TestExecutor extends EventEmitter {
18
+ private config;
19
+ private queue;
20
+ private dependencyTracker;
21
+ private log?;
22
+ private progress;
23
+ private graph;
24
+ private latencyMetrics;
25
+ private realContext;
26
+ private promiseManager;
27
+ private testContext?;
28
+ private stepNamesUsed;
29
+ constructor(config?: ITestExecutorConfig);
30
+ /**
31
+ * Executes an array of test steps
32
+ */
33
+ execute(steps: StepArray, $meta: IMeta, testContext?: ITestFrameworkContext): Promise<void>;
34
+ /**
35
+ * Recursively executes steps, handling both functions and nested arrays
36
+ */
37
+ private _executeSteps;
38
+ /**
39
+ * Executes a single step function
40
+ */
41
+ private _executeStep;
42
+ /**
43
+ * Counts total number of steps (including nested)
44
+ */
45
+ private _countSteps;
46
+ /**
47
+ * Collects all step names (including nested)
48
+ */
49
+ private _collectStepNames;
50
+ /**
51
+ * Checks for duplicate step names and throws an error if found
52
+ */
53
+ private _checkForDuplicateStepName;
54
+ /**
55
+ * Applies the chain-level `mask` (and optional per-call `extraPaths`) to
56
+ * `value`. Returns the original reference unchanged when no masking is
57
+ * configured. Falls back to the deprecated `maskFn` when supplied.
58
+ */
59
+ private _applyMask;
60
+ /**
61
+ * Gets the current progress snapshot
62
+ */
63
+ getProgress(): ITestProgress;
64
+ /**
65
+ * Gets the dependency graph
66
+ */
67
+ getDependencyGraph(): IDependencyGraph;
68
+ /**
69
+ * Gets latency metrics
70
+ */
71
+ getLatencyReport(): ITestLatency;
72
+ /**
73
+ * Calculates the critical path (longest dependency chain)
74
+ */
75
+ private _calculateCriticalPath;
76
+ /**
77
+ * Identifies bottleneck steps that blocked many other steps
78
+ */
79
+ private _identifyBottlenecks;
80
+ /**
81
+ * Type-safe event emitter
82
+ */
83
+ on<E extends keyof ITestEvents>(event: E, handler: ITestEvents[E]): this;
84
+ emit<E extends keyof ITestEvents>(event: E, ...args: Parameters<ITestEvents[E]>): boolean;
85
+ }
86
+ export type * from './test-types.js';
87
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,EAAC,YAAY,EAAC,MAAM,aAAa,CAAC;AAEzC,OAAO,KAAK,EAER,gBAAgB,EAChB,KAAK,EAOL,WAAW,EACX,mBAAmB,EACnB,qBAAqB,EACrB,YAAY,EAEZ,aAAa,EAEb,SAAS,EAEZ,MAAM,iBAAiB,CAAC;AAsXzB;;GAEG;AACH,qBAAa,YAAa,SAAQ,YAAY;IAC1C,OAAO,CAAC,MAAM,CAAsB;IACpC,OAA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