GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — doc: update readable.read() for v26 one-chunk behaviour by Fuma2514 · Pull Request #67341 · nodejs/node

Conversation

@Fuma2514

@Fuma2514 Fuma2514 commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

Fixes #67323.

Since #60441 (v26.0.0, semver-major), readable.read() without a size argument returns one buffered chunk per call, but doc/api/stream.md still said it returns "all of the data contained in the internal buffer". This PR:

  • Rewords that paragraph to describe the current behaviour and documents the migration hint from stream: readable read one buffer at a time #60441 (readable.read(readable.readableLength), with the readable.read(0) caveat).
  • Adds a changes: entry for v26.0.0 linking stream: readable read one buffer at a time #60441.

Docs only, no code changes. Verified that no other part of the example text depends on the old wording; the while (null !== (chunk = readable.read())) loop example remains correct under the new behaviour (it now drains one chunk per iteration until null).

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@nodejs-github-bot nodejs-github-bot added doc Issues and PRs related to Node.js documentation. stream Issues and PRs related to Node.js streams. labels Nov 8, 2026
@github-actions github-actions Bot added the agentscan:automated-account label Nov 8, 2026
@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

Welcome to Node.js, and thank you for your first contribution!

Before review, please take a moment to read:

  • the guide for first-time contributors
  • the contribution and automation policies
  • the pull request guide
  • the AI use policy
  • the Code of Conduct

Please make sure every commit is signed off. For a first pull request, GitHub Actions require collaborator approval and Jenkins CI must be started by a collaborator or triager, so an initial wait is normal.

Caution

AgentScan found account activity patterns that may be consistent with automation. This is a heuristic, not proof that this pull request was opened by an agent or violates policy. AI-assisted contributions are permitted, but automated tooling must not open pull requests without advance approval, and contributors must personally understand, test, verify, and take responsibility for every submitted change. See the AgentScan analysis, AI use policy, and automation policy for additional context.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@MikeMcC399

This comment was marked as resolved.

Sign in to view
@MikeMcC399 MikeMcC399 mentioned this pull request Nov 8, 2026
doc: document crypto RNG behaviour across snapshot/checkpoint restore #67342
Closed
@Fuma2514
doc: update readable.read() for v26 one-chunk behaviour
9cbb860
Signed-off-by: Fuma2514 <[email protected]>
@Fuma2514
Fuma2514 force-pushed the doc-stream-read-v26 branch from 6edfe47 to 9cbb860 Compare November 8, 2026 14:42
@MikeMcC399

MikeMcC399 commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

According to #60441 (comment) from @mcollina


actually, no doc changes are needed.

and quoting from https://nodejs.org/docs/latest/api/stream.html#readablereadsize

Each call to readable.read() returns a chunk of data or null, signifying that there's no more data to read at that moment. These chunks aren't automatically concatenated. Because a single read() call does not return all the data, using a while loop may be necessary to continuously read chunks until all data is retrieved. When reading a large file, .read() might return null temporarily, indicating that it has consumed all buffered content but there may be more data yet to be buffered. In such cases, a new 'readable' event is emitted once there's more data in the buffer, and the 'end' event signifies the end of data transmission.


due to PR #60441 which landed in Node.js 26.0.0

This PR should be reviewed by the original author of #60441 @ronag & @mcollina

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@MikeMcC399
MikeMcC399 requested review from mcollina and ronag November 8, 2026 21:11
ronag
ronag approved these changes Nov 8, 2026
View reviewed changes
@MikeMcC399 MikeMcC399 added author ready PRs with CI started, the required approvals, and no outstanding review comments. commit-queue PRs queued for automated landing through the Commit Queue. dont-land-on-v22.x PRs that should not land on the v22.x-staging branch and should not be released in v22.x. dont-land-on-v24.x PRs that should not land on the v24.x-staging branch and should not be released in v24.x. labels Nov 8, 2026
@nodejs-github-bot nodejs-github-bot added the lacks-second-approval Commit Queue PRs awaiting a second collaborator approval or completion of the required wait. label Nov 10, 2026
gurgunday
gurgunday approved these changes Nov 10, 2026
View reviewed changes

@gurgunday gurgunday left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@nodejs-github-bot
nodejs-github-bot merged commit ab11f83 into nodejs:main Nov 10, 2026
34 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot

nodejs-github-bot commented Nov 10, 2026

Copy link
Copy Markdown
Collaborator

Landed in ab11f83

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot nodejs-github-bot removed commit-queue PRs queued for automated landing through the Commit Queue. lacks-second-approval Commit Queue PRs awaiting a second collaborator approval or completion of the required wait. labels Nov 10, 2026
aduh95 pushed a commit that referenced this pull request Nov 11, 2026
@Fuma2514 @aduh95
doc: update readable.read() for v26 one-chunk behaviour
402682e
Signed-off-by: Fuma2514 <[email protected]>
PR-URL: #67341
Reviewed-By: Robert Nagy <[email protected]>
Reviewed-By: Gürgün Dayıoğlu <[email protected]>
@github-actions github-actions Bot mentioned this pull request Nov 11, 2026
2026-11-12, Version 27.0.0-alpha.0.1.0 (Alpha) #67415
Merged
aduh95 pushed a commit that referenced this pull request Nov 12, 2026
@Fuma2514 @aduh95
doc: update readable.read() for v26 one-chunk behaviour
7d763b2
Signed-off-by: Fuma2514 <[email protected]>
PR-URL: #67341
Reviewed-By: Robert Nagy <[email protected]>
Reviewed-By: Gürgün Dayıoğlu <[email protected]>
aduh95 pushed a commit that referenced this pull request Nov 12, 2026
@Fuma2514 @aduh95
doc: update readable.read() for v26 one-chunk behaviour
6e90b7c
Signed-off-by: Fuma2514 <[email protected]>
PR-URL: #67341
Reviewed-By: Robert Nagy <[email protected]>
Reviewed-By: Gürgün Dayıoğlu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@ronag ronag ronag approved these changes
@gurgunday gurgunday gurgunday approved these changes
@mcollina mcollina Awaiting requested review from mcollina

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

agentscan:automated-account author ready PRs with CI started, the required approvals, and no outstanding review comments. doc Issues and PRs related to Node.js documentation. dont-land-on-v22.x PRs that should not land on the v22.x-staging branch and should not be released in v22.x. dont-land-on-v24.x PRs that should not land on the v24.x-staging branch and should not be released in v24.x. stream Issues and PRs related to Node.js streams.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

doc: readable.read() still documents pre-v26 behaviour (returns all buffered data when size is omitted)

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@Fuma2514 @MikeMcC399 @nodejs-github-bot @ronag @gurgunday
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.