Skip to content

Commit a5282b8

Browse files
committed
New version: 3.4.1 (not published yet).
1 parent c3267f6 commit a5282b8

26 files changed

+328
-315
lines changed

.clinerules

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ stream-chain creates a chain of streams out of regular functions, asynchronous f
4343
- `npm run test:deno` — run with Deno
4444
- `npm run test:seq` — run sequentially (also `test:seq:bun`, `test:seq:deno`)
4545
- `npm run ts-check` — TypeScript type checking
46+
- `npm run ts-test` — TypeScript tests (also `ts-test:bun`, `ts-test:deno`)
4647
- `npm run lint` — Prettier check
4748
- `npm run lint:fix` — Prettier write
4849

.cursorrules

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ stream-chain creates a chain of streams out of regular functions, asynchronous f
4343
- `npm run test:deno` — run with Deno
4444
- `npm run test:seq` — run sequentially (also `test:seq:bun`, `test:seq:deno`)
4545
- `npm run ts-check` — TypeScript type checking
46+
- `npm run ts-test` — TypeScript tests (also `ts-test:bun`, `ts-test:deno`)
4647
- `npm run lint` — Prettier check
4748
- `npm run lint:fix` — Prettier write
4849

.github/dependabot.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
version: 2
77
updates:
8-
- package-ecosystem: "npm" # See documentation for possible values
9-
directory: "/" # Location of package manifests
8+
- package-ecosystem: 'npm' # See documentation for possible values
9+
directory: '/' # Location of package manifests
1010
schedule:
11-
interval: "weekly"
11+
interval: 'weekly'

.github/workflows/tests.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,16 @@ jobs:
2222
node-version: [20, 22, 24, 25]
2323

2424
steps:
25-
- uses: actions/checkout@v4
26-
# with:
27-
# submodules: true
28-
- name: Setup Node.js ${{matrix.node-version}}
29-
uses: actions/setup-node@v4
30-
with:
31-
node-version: ${{matrix.node-version}}
32-
- name: Install the package and run tests
33-
run: |
34-
npm ci
35-
npm run build --if-present
36-
npm test
37-
npm run ts-check --if-present
25+
- uses: actions/checkout@v4
26+
# with:
27+
# submodules: true
28+
- name: Setup Node.js ${{matrix.node-version}}
29+
uses: actions/setup-node@v4
30+
with:
31+
node-version: ${{matrix.node-version}}
32+
- name: Install the package and run tests
33+
run: |
34+
npm ci
35+
npm run build --if-present
36+
npm test
37+
npm run ts-check --if-present

.vscode/settings.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
11
{
2-
"cSpell.words": [
3-
"backpressure",
4-
"streamable",
5-
"unbundling"
6-
]
2+
"cSpell.words": ["backpressure", "streamable", "unbundling"]
73
}

.windsurfrules

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ stream-chain creates a chain of streams out of regular functions, asynchronous f
4343
- `npm run test:deno` — run with Deno
4444
- `npm run test:seq` — run sequentially (also `test:seq:bun`, `test:seq:deno`)
4545
- `npm run ts-check` — TypeScript type checking
46+
- `npm run ts-test` — TypeScript tests (also `ts-test:bun`, `ts-test:deno`)
4647
- `npm run lint` — Prettier check
4748
- `npm run lint:fix` — Prettier write
4849

AGENTS.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ npm install
2424
- **Test (sequential):** `npm run test:seq` (also `test:seq:bun`, `test:seq:deno`)
2525
- **Test (single file):** `node tests/test-<name>.mjs`
2626
- **TypeScript check:** `npm run ts-check`
27+
- **TypeScript tests:** `npm run ts-test` (also `ts-test:bun`, `ts-test:deno`)
2728
- **Lint:** `npm run lint` (Prettier check)
2829
- **Lint fix:** `npm run lint:fix` (Prettier write)
2930

@@ -76,7 +77,7 @@ stream-chain/
7677
- **Prettier** for formatting (see `.prettierrc`): 100 char width, single quotes, no bracket spacing, no trailing commas, arrow parens "avoid".
7778
- 2-space indentation.
7879
- Semicolons are enforced by Prettier (default `semi: true`).
79-
- Imports use `require()` syntax in source, `import` in tests (`.mjs`).
80+
- Imports use `require()` syntax in source, `import` in tests (`.mjs`/`.mts`).
8081
- The package is `stream-chain`. Internal symbols use `Symbol.for('object-stream.*')`.
8182

8283
## Critical rules

ARCHITECTURE.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,18 +63,19 @@ wiki/ # GitHub wiki documentation (git submodule)
6363

6464
Functions in a chain can return special values to control flow:
6565

66-
| Value | Symbol | Effect |
67-
|-------|--------|--------|
68-
| `none` | `object-stream.none` | Skip — no value passed downstream |
69-
| `null`/`undefined` || Same as `none` |
70-
| `stop` | `object-stream.stop` | Skip and terminate the generator (gen/fun only) |
71-
| `many(values)` | `object-stream.many` | Emit multiple values from a single input |
66+
| Value | Symbol | Effect |
67+
| ------------------- | --------------------- | -------------------------------------------------------------- |
68+
| `none` | `object-stream.none` | Skip — no value passed downstream |
69+
| `null`/`undefined` | | Same as `none` |
70+
| `stop` | `object-stream.stop` | Skip and terminate the generator (gen/fun only) |
71+
| `many(values)` | `object-stream.many` | Emit multiple values from a single input |
7272
| `finalValue(value)` | `object-stream.final` | Skip remaining chain steps, emit value directly (gen/fun only) |
73-
| `flushable(fn)` | `object-stream.flush` | Mark function to be called at stream end with `none` |
73+
| `flushable(fn)` | `object-stream.flush` | Mark function to be called at stream end with `none` |
7474

7575
### gen() — async generator pipeline
7676

7777
`gen(...fns)` takes multiple functions and returns a single async generator function that:
78+
7879
1. Processes each input value through the function pipeline sequentially.
7980
2. Handles all special return values (`none`, `stop`, `many`, `finalValue`).
8081
3. Supports regular, async, generator, and async generator functions.
@@ -92,6 +93,7 @@ Functions in a chain can return special values to control flow:
9293
### Stream detection
9394

9495
`chain()` detects stream types to decide how to integrate them:
96+
9597
- **Node streams**: `isReadableNodeStream`, `isWritableNodeStream`, `isDuplexNodeStream`
9698
- **Web streams**: `isReadableWebStream`, `isWritableWebStream`, `isDuplexWebStream`
9799
- Web streams are adapted to Node streams via `Readable.fromWeb()`, `Writable.fromWeb()`, `Duplex.fromWeb()`.
@@ -138,6 +140,7 @@ src/utils/* ── src/defs.js (most utilities use none, stop, many, flushable)
138140
- **Run with Deno**: `npm run test:deno`
139141
- **Run sequential**: `npm run test:seq` (also `test:seq:bun`, `test:seq:deno`)
140142
- **TypeScript check**: `npm run ts-check`
143+
- **TypeScript tests**: `npm run ts-test` (also `ts-test:bun`, `ts-test:deno`)
141144
- **Lint**: `npm run lint` (Prettier check)
142145
- **Lint fix**: `npm run lint:fix` (Prettier write)
143146

0 commit comments

Comments
 (0)