Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Backpressuring in Streams" doc: Update pipeline examples #6905

Merged
merged 2 commits into from
Jul 7, 2024

Conversation

caarmen
Copy link
Contributor

@caarmen caarmen commented Jul 5, 2024

Description

In the "Backpressuring in Streams" documentation, update the pipeline() examples:

  • Callback examples: Use the correct module (stream, not stream/promises).
  • Promise examples: Use stream/promises instead of promisify.

Validation

The updated page, when built locally (npm run dev) is http://localhost:3000/en/learn/modules/backpressuring-in-streams#the-problem-with-data-handling

Updated doc screenshots (click images to see full size):

Section CJS example MJS example
callback
promise

Related Issues

Check List

  • I have read the Contributing Guidelines and made commit messages that follow the guideline.
  • I have run npm run format to ensure the code follows the style guide.
  • I have run npm run test to check if all tests are passing.
  • I have run npx turbo build to check if the website builds without errors.
  • I've covered new added functionality with unit tests if necessary.

Copy link

vercel bot commented Jul 5, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
nodejs-org ✅ Ready (Inspect) Visit Preview Jul 5, 2024 9:41pm

Require `node:stream/promises` instead of using `utils.promisify`.
@caarmen caarmen marked this pull request as ready for review July 5, 2024 21:43
@caarmen caarmen requested a review from a team as a code owner July 5, 2024 21:43
Copy link
Member

@mikeesto mikeesto left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for your contribution

Copy link
Member

@AugustinMauroy AugustinMauroy left a comment

Choose a reason for hiding this comment

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

LGTM ! thank you for helping to keep these resources up to date.

Copy link

github-actions bot commented Jul 7, 2024

Lighthouse Results

URL Performance Accessibility Best Practices SEO Report
/en 🟢 98 🟢 100 🟢 100 🟢 91 🔗
/en/about 🟢 98 🟢 100 🟢 100 🟢 91 🔗
/en/about/previous-releases 🟢 98 🟢 100 🟢 100 🟢 92 🔗
/en/download 🟢 100 🟢 100 🟢 100 🟢 91 🔗
/en/blog 🟢 100 🟢 100 🟢 100 🟢 92 🔗

Copy link

github-actions bot commented Jul 7, 2024

Unit Test Coverage Report

Unit Test Report

Tests Skipped Failures Errors Time
131 0 💤 0 ❌ 0 🔥 5.344s ⏱️

@mikeesto mikeesto added this pull request to the merge queue Jul 7, 2024
Merged via the queue into nodejs:main with commit 2976eca Jul 7, 2024
12 checks passed
@caarmen caarmen deleted the update-pipeline-examples branch July 7, 2024 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants