commits
Task<T> is now a single conditional type: PromiseLike<T> for value
tasks, AsyncIterable<T> for streaming tasks, or the base dispatch
shape when unparameterized. Classes renamed to PromiseLikeTask<T>
and AsyncIterableTask<T>.
BREAKING CHANGE: Task and StreamTask classes renamed; public type
signatures now use Task<T> throughout.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Pool workers are now ref'd for the lifetime of the pool, preventing the
Node.js event loop from exiting prematurely when using top-level await.
Dedicated workers ref/unref with active counting around each dispatch.
Moves ref/unref responsibility out of the shared dispatch layer
(execute/setupWorker) and into the callers — pool workers stay ref'd,
dedicated workers track an active count and only unref when idle.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Move mo() calls from test files to fixtures (stream-context, stream-pipeline)
- Fix unhandled rejection from track().finally() in worker-pool
- Fix error test to use await using for clean disposal
- Drop --experimental-strip-types (Node 24 native) and --test-force-exit
- Quote test glob so Node expands it (shell ** misses top-level files)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Shell glob ** doesn't match files in the immediate directory in sh,
only subdirectories. Quoting lets Node's test runner handle the glob
which correctly matches test/*.test.ts and test/**/*.test.ts.
Node 24 strips types natively so the flag is unnecessary.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add tsconfig.build.json for emitting JS + declarations to dist/
- Add build script and publishConfig exports for dist/
- Source exports preserved for local development
- Add build step to publish workflow
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
CI runs on all pushes and PRs. Publish runs only on push to main,
with lint/typecheck/test as gates before the publish step.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add prettier for linting with lint/lint:fix scripts
- Add @changesets/cli for version management and npm publishing
- Add .tangled/workflows/ci.yaml (lint, typecheck, test on push/PR)
- Add .tangled/workflows/publish.yaml (changeset version + publish on main)
- Format codebase with prettier
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add Streaming section to README covering streaming moroutines,
channel() fan-out, and pipeline chaining
- Add @param/@returns TSDoc to mo(), channel(), Runner, Task,
StreamTask, ChannelOptions, and transfer()
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Task<T> is now a single conditional type: PromiseLike<T> for value
tasks, AsyncIterable<T> for streaming tasks, or the base dispatch
shape when unparameterized. Classes renamed to PromiseLikeTask<T>
and AsyncIterableTask<T>.
BREAKING CHANGE: Task and StreamTask classes renamed; public type
signatures now use Task<T> throughout.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Pool workers are now ref'd for the lifetime of the pool, preventing the
Node.js event loop from exiting prematurely when using top-level await.
Dedicated workers ref/unref with active counting around each dispatch.
Moves ref/unref responsibility out of the shared dispatch layer
(execute/setupWorker) and into the callers — pool workers stay ref'd,
dedicated workers track an active count and only unref when idle.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Move mo() calls from test files to fixtures (stream-context, stream-pipeline)
- Fix unhandled rejection from track().finally() in worker-pool
- Fix error test to use await using for clean disposal
- Drop --experimental-strip-types (Node 24 native) and --test-force-exit
- Quote test glob so Node expands it (shell ** misses top-level files)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Shell glob ** doesn't match files in the immediate directory in sh,
only subdirectories. Quoting lets Node's test runner handle the glob
which correctly matches test/*.test.ts and test/**/*.test.ts.
Node 24 strips types natively so the flag is unnecessary.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add prettier for linting with lint/lint:fix scripts
- Add @changesets/cli for version management and npm publishing
- Add .tangled/workflows/ci.yaml (lint, typecheck, test on push/PR)
- Add .tangled/workflows/publish.yaml (changeset version + publish on main)
- Format codebase with prettier
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>