Skip to content

Commit 42da7ad

Browse files
committed
stream: rename stream/new to stream/iter
1 parent 63c887d commit 42da7ad

28 files changed

+107
-107
lines changed

benchmark/fs/bench-filehandle-pull-vs-webstream.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ async function runWebStream() {
147147
// New streams path: pull() with uppercase transform + gzip transform
148148
// ---------------------------------------------------------------------------
149149
async function benchPull(n, filesize) {
150-
const { pull, compressGzip } = require('stream/new');
150+
const { pull, compressGzip } = require('stream/iter');
151151

152152
// Warm up
153153
await runPull(pull, compressGzip);

doc/api/fs.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -386,23 +386,23 @@ added: REPLACEME
386386
> Stability: 1 - Experimental
387387
388388
* `...transforms` {Function|Object} Optional transforms to apply via
389-
[`stream/new pull()`][].
389+
[`stream/iter pull()`][].
390390
* `options` {Object}
391391
* `signal` {AbortSignal}
392392
* `autoClose` {boolean} Close the file handle when the stream ends.
393393
**Default:** `false`.
394394
* Returns: {AsyncIterable\<Uint8Array\[]>}
395395
396396
Return the file contents as an async iterable using the
397-
[`node:stream/new`][] pull model. Reads are performed in 64 KB chunks.
398-
If transforms are provided, they are applied via [`stream/new pull()`][].
397+
[`node:stream/iter`][] pull model. Reads are performed in 64 KB chunks.
398+
If transforms are provided, they are applied via [`stream/iter pull()`][].
399399
400400
The file handle is locked while the iterable is being consumed and unlocked
401401
when iteration completes.
402402
403403
```mjs
404404
import { open } from 'node:fs/promises';
405-
import { text, compressGzip } from 'node:stream/new';
405+
import { text, compressGzip } from 'node:stream/iter';
406406

407407
const fh = await open('input.txt', 'r');
408408

@@ -416,7 +416,7 @@ const compressed = fh2.pull(compressGzip(), { autoClose: true });
416416
417417
```cjs
418418
const { open } = require('node:fs/promises');
419-
const { text, compressGzip } = require('node:stream/new');
419+
const { text, compressGzip } = require('node:stream/iter');
420420

421421
async function run() {
422422
const fh = await open('input.txt', 'r');
@@ -949,14 +949,14 @@ added: REPLACEME
949949
cleanup. Marks the writer as closed so subsequent writes fail immediately.
950950
Cannot honor `autoClose` (requires async I/O).
951951
952-
Return a [`node:stream/new`][] writer backed by this file handle.
952+
Return a [`node:stream/iter`][] writer backed by this file handle.
953953
954954
The writer supports `Symbol.asyncDispose`, so it can be used with
955955
`await using`.
956956
957957
```mjs
958958
import { open } from 'node:fs/promises';
959-
import { from, pipeTo, compressGzip } from 'node:stream/new';
959+
import { from, pipeTo, compressGzip } from 'node:stream/iter';
960960

961961
const fh = await open('output.gz', 'w');
962962
const w = fh.writer({ autoClose: true });
@@ -966,7 +966,7 @@ await w.end();
966966
967967
```cjs
968968
const { open } = require('node:fs/promises');
969-
const { from, pipeTo, compressGzip } = require('node:stream/new');
969+
const { from, pipeTo, compressGzip } = require('node:stream/iter');
970970

971971
async function run() {
972972
const fh = await open('output.gz', 'w');
@@ -8906,8 +8906,8 @@ the file contents.
89068906
[`inotify(7)`]: https://man7.org/linux/man-pages/man7/inotify.7.html
89078907
[`kqueue(2)`]: https://www.freebsd.org/cgi/man.cgi?query=kqueue&sektion=2
89088908
[`minimatch`]: https://github.com/isaacs/minimatch
8909-
[`node:stream/new`]: stream_new.md
8910-
[`stream/new pull()`]: stream_new.md#pullsource-transforms-options
8909+
[`node:stream/iter`]: stream_iter.md
8910+
[`stream/iter pull()`]: stream_iter.md#pullsource-transforms-options
89118911
[`util.promisify()`]: util.md#utilpromisifyoriginal
89128912
[bigints]: https://tc39.github.io/proposal-bigint
89138913
[caveats]: #caveats

doc/api/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
* [Modules: Packages](packages.md)
4141
* [Modules: TypeScript](typescript.md)
4242
* [Net](net.md)
43-
* [New Streams API](stream_new.md)
43+
* [Iterable Streams API](stream_iter.md)
4444
* [OS](os.md)
4545
* [Path](path.md)
4646
* [Performance hooks](perf_hooks.md)

0 commit comments

Comments
 (0)