stream: refactor unnecessary optional chaining away#64253
Merged
Conversation
Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
Contributor
Author
|
Benchmark CI: https://ci.nodejs.org/view/Node.js%20benchmark/job/benchmark-node-micro-benchmarks/1880/ Results |
anonrig
approved these changes
Jul 2, 2026
Collaborator
mcollina
approved these changes
Jul 2, 2026
mcollina
left a comment
Member
There was a problem hiding this comment.
lgtm
Unlikely that would matter here in practice.
Collaborator
lpinca
approved these changes
Jul 3, 2026
gurgunday
approved these changes
Jul 3, 2026
Collaborator
Commit Queue failed- Loading data for nodejs/node/pull/64253 ✔ Done loading data for nodejs/node/pull/64253 ----------------------------------- PR info ------------------------------------ Title stream: refactor unnecessary optional chaining away (#64253) ⚠ Could not retrieve the email or name of the PR author's from user's GitHub profile! Branch aduh95:optional-optional-chaining -> nodejs:main Labels author ready, needs-ci, web streams Commits 1 - stream: refactor unnecessary optional chaining away Committers 1 - Antoine du Hamel <duhamelantoine1995@gmail.com> PR-URL: https://github.com/nodejs/node/pull/64253 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day> ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/64253 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day> -------------------------------------------------------------------------------- ℹ This PR was created on Thu, 02 Jul 2026 09:09:58 GMT ✔ Approvals: 4 ✔ - Yagiz Nizipli (@anonrig) (TSC): https://github.com/nodejs/node/pull/64253#pullrequestreview-4618774049 ✔ - Matteo Collina (@mcollina) (TSC): https://github.com/nodejs/node/pull/64253#pullrequestreview-4620379258 ✔ - Luigi Pinca (@lpinca): https://github.com/nodejs/node/pull/64253#pullrequestreview-4627711659 ✔ - Gürgün Dayıoğlu (@gurgunday): https://github.com/nodejs/node/pull/64253#pullrequestreview-4627959894 ✔ Last GitHub CI successful ℹ Last Benchmark CI on 2026-07-02T09:14:12Z: https://ci.nodejs.org/view/Node.js%20benchmark/job/benchmark-node-micro-benchmarks/1880/ ℹ Last Full PR CI on 2026-07-02T18:53:13Z: https://ci.nodejs.org/job/node-test-pull-request/74520/ - Querying data for job/node-test-pull-request/74520/ ✔ Build data downloaded ✔ Last Jenkins CI successful -------------------------------------------------------------------------------- ✔ No git cherry-pick in progress ✔ No git am in progress ✔ No git rebase in progress -------------------------------------------------------------------------------- - Bringing origin/main up to date... From https://github.com/nodejs/node * branch main -> FETCH_HEAD e76c573e45..51dbfd607c main -> origin/main ✔ origin/main is now up-to-date main is out of sync with origin/main. Mismatched commits: - 8f28dd8c6c doc: fix typo in examples - 51dbfd607c doc: fix typo in examples -------------------------------------------------------------------------------- HEAD is now at 51dbfd607c doc: fix typo in examples ✔ Reset to origin/main - Downloading patch for 64253 From https://github.com/nodejs/node * branch refs/pull/64253/merge -> FETCH_HEAD ✔ Fetched commits as 8410a918eaef..b1a7ae3ab4df -------------------------------------------------------------------------------- Auto-merging lib/internal/webstreams/readablestream.js Auto-merging lib/internal/webstreams/transformstream.js CONFLICT (content): Merge conflict in lib/internal/webstreams/transformstream.js Auto-merging lib/internal/webstreams/writablestream.js error: could not apply b1a7ae3ab4... stream: refactor unnecessary optional chaining away hint: After resolving the conflicts, mark them with hint: "git add/rm <pathspec>", then run hint: "git cherry-pick --continue". hint: You can instead skip this commit with "git cherry-pick --skip". hint: To abort and get back to the state before "git cherry-pick", hint: run "git cherry-pick --abort". hint: Disable this message with "git config set advice.mergeConflict false" ✘ Failed to apply patcheshttps://github.com/nodejs/node/actions/runs/28702199076 |
jasnell
approved these changes
Jul 4, 2026
Contributor
Author
|
Landed in 3ee5f31 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
According to https://adventures.nodeland.dev/archive/noop-functions-vs-optional-chaining-a-performance/, we should shave a few cycles
Most of those have become unnecessary since #63876