Skip to content

Commit 3300159

Browse files
committed
Fixed runtime versions.
1 parent d214246 commit 3300159

8 files changed

Lines changed: 13 additions & 13 deletions

File tree

.clinerules

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ stream-json/
8989

9090
## Code style
9191

92-
- **ESM** throughout (`"type": "module"` in package.json). Requires Node.js 22+.
92+
- **ESM** throughout (`"type": "module"` in package.json). Runs on currently-supported Node.js (floor in `engines`).
9393
- **No transpilation** — code runs directly.
9494
- **Prettier** for formatting (see `.prettierrc`): 160 char width, single quotes, no bracket spacing, no trailing commas, arrow parens "avoid".
9595
- 2-space indentation.
@@ -119,7 +119,7 @@ stream-json/
119119
- `asm.tapChain` is a function for use in `chain()`.
120120
- **Disassembler** (`src/disassembler.js`) does the inverse: JS objects → token stream.
121121
- **Stringer** (`src/stringer.js`) converts a token stream back to JSON text. Functional: `flushable` + `asStream()`.
122-
- **Emitter** (`src/emitter.js`) factory returning a `Writable` that re-emits tokens as named EventEmitter events (subscribe with `.on(name, fn)`). Web counterpart (`src/web/emitter.js`) returns an `EventTarget` with a `.writable` `WritableStream` attached; each token dispatches as a `CustomEvent(name, {detail: value})` (subscribe with `.addEventListener(name, ev => ev.detail)`). EventTarget + CustomEvent are universal across Node 22+, Bun, Deno, and browsers. For hot paths, prefer the `for await` form over the emitter — same model, no per-token `CustomEvent` allocation, no listener-registry indirection.
122+
- **Emitter** (`src/emitter.js`) factory returning a `Writable` that re-emits tokens as named EventEmitter events (subscribe with `.on(name, fn)`). Web counterpart (`src/web/emitter.js`) returns an `EventTarget` with a `.writable` `WritableStream` attached; each token dispatches as a `CustomEvent(name, {detail: value})` (subscribe with `.addEventListener(name, ev => ev.detail)`). EventTarget + CustomEvent are universal across modern Node, Bun, Deno, and browsers. For hot paths, prefer the `for await` form over the emitter — same model, no per-token `CustomEvent` allocation, no listener-registry indirection.
123123
- **Filters** (`src/filters/`) edit the token stream: `pick`, `replace`, `ignore`, `filter`. All built on `filterBase`.
124124
- `filterBase` provides a state machine that tracks JSON path stack and applies accept/reject actions.
125125
- `makeStackDiffer` generates structural tokens to reconstruct the surrounding JSON envelope.

.cursorrules

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ stream-json/
8989

9090
## Code style
9191

92-
- **ESM** throughout (`"type": "module"` in package.json). Requires Node.js 22+.
92+
- **ESM** throughout (`"type": "module"` in package.json). Runs on currently-supported Node.js (floor in `engines`).
9393
- **No transpilation** — code runs directly.
9494
- **Prettier** for formatting (see `.prettierrc`): 160 char width, single quotes, no bracket spacing, no trailing commas, arrow parens "avoid".
9595
- 2-space indentation.
@@ -119,7 +119,7 @@ stream-json/
119119
- `asm.tapChain` is a function for use in `chain()`.
120120
- **Disassembler** (`src/disassembler.js`) does the inverse: JS objects → token stream.
121121
- **Stringer** (`src/stringer.js`) converts a token stream back to JSON text. Functional: `flushable` + `asStream()`.
122-
- **Emitter** (`src/emitter.js`) factory returning a `Writable` that re-emits tokens as named EventEmitter events (subscribe with `.on(name, fn)`). Web counterpart (`src/web/emitter.js`) returns an `EventTarget` with a `.writable` `WritableStream` attached; each token dispatches as a `CustomEvent(name, {detail: value})` (subscribe with `.addEventListener(name, ev => ev.detail)`). EventTarget + CustomEvent are universal across Node 22+, Bun, Deno, and browsers. For hot paths, prefer the `for await` form over the emitter — same model, no per-token `CustomEvent` allocation, no listener-registry indirection.
122+
- **Emitter** (`src/emitter.js`) factory returning a `Writable` that re-emits tokens as named EventEmitter events (subscribe with `.on(name, fn)`). Web counterpart (`src/web/emitter.js`) returns an `EventTarget` with a `.writable` `WritableStream` attached; each token dispatches as a `CustomEvent(name, {detail: value})` (subscribe with `.addEventListener(name, ev => ev.detail)`). EventTarget + CustomEvent are universal across modern Node, Bun, Deno, and browsers. For hot paths, prefer the `for await` form over the emitter — same model, no per-token `CustomEvent` allocation, no listener-registry indirection.
123123
- **Filters** (`src/filters/`) edit the token stream: `pick`, `replace`, `ignore`, `filter`. All built on `filterBase`.
124124
- `filterBase` provides a state machine that tracks JSON path stack and applies accept/reject actions.
125125
- `makeStackDiffer` generates structural tokens to reconstruct the surrounding JSON envelope.

.windsurfrules

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ stream-json/
8989

9090
## Code style
9191

92-
- **ESM** throughout (`"type": "module"` in package.json). Requires Node.js 22+.
92+
- **ESM** throughout (`"type": "module"` in package.json). Runs on currently-supported Node.js (floor in `engines`).
9393
- **No transpilation** — code runs directly.
9494
- **Prettier** for formatting (see `.prettierrc`): 160 char width, single quotes, no bracket spacing, no trailing commas, arrow parens "avoid".
9595
- 2-space indentation.
@@ -119,7 +119,7 @@ stream-json/
119119
- `asm.tapChain` is a function for use in `chain()`.
120120
- **Disassembler** (`src/disassembler.js`) does the inverse: JS objects → token stream.
121121
- **Stringer** (`src/stringer.js`) converts a token stream back to JSON text. Functional: `flushable` + `asStream()`.
122-
- **Emitter** (`src/emitter.js`) factory returning a `Writable` that re-emits tokens as named EventEmitter events (subscribe with `.on(name, fn)`). Web counterpart (`src/web/emitter.js`) returns an `EventTarget` with a `.writable` `WritableStream` attached; each token dispatches as a `CustomEvent(name, {detail: value})` (subscribe with `.addEventListener(name, ev => ev.detail)`). EventTarget + CustomEvent are universal across Node 22+, Bun, Deno, and browsers. For hot paths, prefer the `for await` form over the emitter — same model, no per-token `CustomEvent` allocation, no listener-registry indirection.
122+
- **Emitter** (`src/emitter.js`) factory returning a `Writable` that re-emits tokens as named EventEmitter events (subscribe with `.on(name, fn)`). Web counterpart (`src/web/emitter.js`) returns an `EventTarget` with a `.writable` `WritableStream` attached; each token dispatches as a `CustomEvent(name, {detail: value})` (subscribe with `.addEventListener(name, ev => ev.detail)`). EventTarget + CustomEvent are universal across modern Node, Bun, Deno, and browsers. For hot paths, prefer the `for await` form over the emitter — same model, no per-token `CustomEvent` allocation, no listener-registry indirection.
123123
- **Filters** (`src/filters/`) edit the token stream: `pick`, `replace`, `ignore`, `filter`. All built on `filterBase`.
124124
- `filterBase` provides a state machine that tracks JSON path stack and applies accept/reject actions.
125125
- `makeStackDiffer` generates structural tokens to reconstruct the surrounding JSON envelope.

AGENTS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ stream-json/
8989

9090
## Code style
9191

92-
- **ESM** throughout (`"type": "module"` in package.json). Requires Node.js 22+.
92+
- **ESM** throughout (`"type": "module"` in package.json). Runs on currently-supported Node.js (floor in `engines`).
9393
- **No transpilation** — code runs directly.
9494
- **Prettier** for formatting (see `.prettierrc`): 160 char width, single quotes, no bracket spacing, no trailing commas, arrow parens "avoid".
9595
- 2-space indentation.
@@ -119,7 +119,7 @@ stream-json/
119119
- `asm.tapChain` is a function for use in `chain()`.
120120
- **Disassembler** (`src/disassembler.js`) does the inverse: JS objects → token stream.
121121
- **Stringer** (`src/stringer.js`) converts a token stream back to JSON text. Functional: `flushable` + `asStream()`.
122-
- **Emitter** (`src/emitter.js`) factory returning a `Writable` that re-emits tokens as named EventEmitter events (subscribe with `.on(name, fn)`). Web counterpart (`src/web/emitter.js`) returns an `EventTarget` with a `.writable` `WritableStream` attached; each token dispatches as a `CustomEvent(name, {detail: value})` (subscribe with `.addEventListener(name, ev => ev.detail)`). EventTarget + CustomEvent are universal across Node 22+, Bun, Deno, and browsers. For hot paths, prefer the `for await` form over the emitter — same model, no per-token `CustomEvent` allocation, no listener-registry indirection.
122+
- **Emitter** (`src/emitter.js`) factory returning a `Writable` that re-emits tokens as named EventEmitter events (subscribe with `.on(name, fn)`). Web counterpart (`src/web/emitter.js`) returns an `EventTarget` with a `.writable` `WritableStream` attached; each token dispatches as a `CustomEvent(name, {detail: value})` (subscribe with `.addEventListener(name, ev => ev.detail)`). EventTarget + CustomEvent are universal across modern Node, Bun, Deno, and browsers. For hot paths, prefer the `for await` form over the emitter — same model, no per-token `CustomEvent` allocation, no listener-registry indirection.
123123
- **Filters** (`src/filters/`) edit the token stream: `pick`, `replace`, `ignore`, `filter`. All built on `filterBase`.
124124
- `filterBase` provides a state machine that tracks JSON path stack and applies accept/reject actions.
125125
- `makeStackDiffer` generates structural tokens to reconstruct the surrounding JSON envelope.

ARCHITECTURE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ The Web `emitter.js` returns an `EventTarget` with a `.writable` `WritableStream
7777
attached; consumers subscribe with `.addEventListener(name, ev => ev.detail)`.
7878
Same model — token-name as event name, token-value as event payload — different
7979
substrate APIs. `utils/emit.js` has the same Node/Web split. EventTarget +
80-
CustomEvent are universal across Node 22+, Bun, Deno, and browsers, so no
80+
CustomEvent are universal across modern Node, Bun, Deno, and browsers, so no
8181
polyfill is needed.
8282

8383
## Core concepts
@@ -247,7 +247,7 @@ src/jsonc/verifier.js ── stream-chain (gen, flushable, none, asStream, fixUt
247247

248248
## Import paths
249249

250-
`stream-json` 3.x is ESM-only. Requires Node.js 22+.
250+
`stream-json` 3.x is ESM-only and runs on currently-supported Node.js (floor in `package.json` `engines`).
251251

252252
```js
253253
// Main API

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Each stage is a building block; `stream-chain` wires them into one stream and ha
4848
npm install --save stream-json
4949
```
5050
51-
ESM only; the current version requires Node 22+ (also runs on Bun and Deno).
51+
ESM only; runs on actively-maintained Node, plus Bun and Deno — see [Supported runtimes](https://github.com/uhop/stream-json/wiki/Supported-runtimes).
5252
5353
## What's in the box
5454

llms-full.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ chain([
339339
- **Node** (`stream-json/emitter.js`) — a `Writable` (EventEmitter). Subscribe with `.on(name, fn)`; the value is passed positionally.
340340
- **Web** (`stream-json/web/emitter.js`) — an `EventTarget` with a `.writable` `WritableStream` attached. Each token dispatches `new CustomEvent(name, {detail: value})`. Subscribe with `.addEventListener(name, ev => ev.detail)`.
341341

342-
`EventTarget` + `CustomEvent` are universal across Node 22+, Bun, Deno, and browsers — no polyfill needed.
342+
`EventTarget` + `CustomEvent` are universal across modern Node, Bun, Deno, and browsers — no polyfill needed.
343343

344344
```js
345345
// Node

wiki

Submodule wiki updated from ce059fc to fcce4d2

0 commit comments

Comments
 (0)